[SOLVED] Not detecting ethernet connection on Debian
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I have recently gotten a computer installed with Debian and I can't seem to get it to connect to the internet. I've tried ifconfig eth0, but that says it doesn't have any device, but ifconfig eth1 and eth2 show up but don't connect. I've also tried to ping google.com, but it returns unknown host. Maybe it doesn't have the software needed to use the ethernet ports?
No, I'm not connected to the router, my router is actually 192.168.1.1, and it doesn't receive any response so linux doesn't even think I have connected my ethernet cord yet, but it does say that is has the right hardware in network devices.
I don't know if i'm using dchp, I don't think I did anything in particular to make it use dhcp.
It's been a while since I had debian running but I would assume that some form of network manager should handle this. Assuming this is not an option, I curious, do you have two ethernet ports? Its also quite odd that your ethernet devices don't start at 0.
If nothing else is working see if you can set it up manually. try this.
I think that this is more along the lines of some hardware-software configuration. The computer I have Debian installed on (the hard drive) was actually installed from another computer and then the hard drive was transferred to the current computer. For some reason it wouldn't accept a boot disk or a flash drive, so I had to install Debian on the hard drive on another machine, which might have messed up some kind of configuration with the Ethernet ports. I actually have 2 machines with the same problem, the status of the Ethernet ports In The network manager device list says 'unknown' even if its plugged in.
So is there any way to reset the network configurations that were set up on install that were specific to the hardware on the machine installed on?
Not sure if it'll work but a sysctl at the command line will allow modification of kernel parameters.
It appears that you will need to use Eth1 as your network interface. Something else has grabbed hold of Eth0 so it's not usable. So do the lspci to get the correct information. Use that information to setup your network. You're almost there.
The computer I have Debian installed on (the hard drive) was actually installed from another computer and then the hard drive was transferred to the current computer.
This is explains why eth0 is missing. There will be a file (possibly 70-persistent-net.rules) in /etc/udev/rules.d that will have the mac address of the network device in the old machine set to eth0. If you comment out this line and restart udev (or perhaps just reboot), you should get an eth0. There will also probably be lines assigning eth1 and eth2 to the mac addresses in the new machine: modify as desired.
Quote:
So is there any way to reset the network configurations that were set up on install that were specific to the hardware on the machine installed on?
See above. To proceed further you'll need to tell us what you are using to manage your network devices. For example it could be one of:
1. network-manager
2. wicd
3. /etc/network/interfaces
Do you know which of these (if any) you are using?
The computer I have Debian installed on (the hard drive) was actually installed from another computer and then the hard drive was transferred to the current computer.
^^This.
eth0 is assigned to the nic on the previous box.
If you delete /etc/udev/rules.d/70-persistent-net.rules & reboot, it will recreate this file, getting rid of the old reference & listing your two interfaces as eth0 & eth1.
Your lspci shows both, and that they are using the tg3 kernel driver, so should "just work".
If they are listed in /etc/network/interfaces comment them out and they should become manageble with network-manager applet.
Or put in the correct stanza's to load them automatically at boot (either with static details or dhcp).
So I tried deleting the file, but it didn't get my internet to work, but It did re-create with a smaller file
here is the old one
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x14e4:0x167a (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1a:a0:c7:e1:89", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x168c:0x0013 (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0f:b5:28:bf:1e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# PCI device 0x14e4:0x16a6 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:45:5d:1a:f7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x14e4:0x16a6 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:45:5d:1a:f6", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
and the new one that was created
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x14e4:0x16a6 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:45:5d:1a:f7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x14e4:0x16a6 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:45:5d:1a:f6", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
It still looks like it doesn't have the drivers (DRIVERS=="?*") so maybe thats the problem?
here is more info
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.