Home > Uncategorized > Ubuntu not recognizing eth0 network

Ubuntu not recognizing eth0 network

August 10th, 2009

I’ve just managed to get my network repaired on my home server that I’ve been running for a little while now. For some reason, Ubuntu decided to not load the module required for the ethernet card :/ I’ve outlined the steps I took to get it working (there were some others, but this was the route that actually worked for me), mainly to help others who encounter the same situation; but also for my own use next time it happens :)

Firstly, as a disclaimer, I am not a Linux guru or expert. Most of the reasons behind what I did is beyond me, and I’m just outlining what it is that I did. Where I can though, I’ll point out the reasoning behind what I did. Secondly, if you’re not wanting the long-winded walkthrough, you can take a look at the summary at the very bottom.

Okay, so, first of all, I tried executing ifconfig, the see which network interfaces were being returned to me. Predictably enough, eth0 was not being returned in this list.

Next thing I did was executed lspci -v | grep -i ethernet, which returned the details of my network card. So, after this little exercise, I know that Ubuntu is picking up my network card, but it doesn’t seem to be loading it correctly – if at all.

So, after some reading up on the intertubes (here and here), I took a look at the file located at /etc/udev/rules.d/70-persistent-net.rules. Within the file, there is a line that says “PCI device… “, with a module name in brackets at the end. I selected this module name, and then installed the module (modprobe “module_name”). I then reloaded networking, and everything was hunky dory and working again! Thankully, there wasn’t too much hassle involved! The only thing is, is that I haven’t tested whether this holds through another restart, or whether I’ll have to do the same thing when the server is restarted again.

But now, the summary of the steps taken:

  1. Check if network card is loaded and recognized (ifconfig eth0, then lspci -v | grep -i ethernet).
  2. Retrieved module name from /etc/udev/rules.d/70-persistent-net.rules (The bracketed text at the end of the “PCI device…” line)
  3. Executed modprobe module_name.
  4. Reloaded networking: sudo /etc/init.d/networking restart.
  5. ifconfig, to ensure that it has been enabled correctly.

If you have anything to add, then let us all know in the comments.

UPDATE: I’ve just tested it when restarting, and the module was not loaded dynamically. This was easily remedied by adding another line to the /etc/modules file, with the module name on it’s own line. Restart, and you’ll see that it should be loaded on boot :)

Author: Geoff Garbers Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.
Security Code: