Updated and now network eth0 is missing

I’m running Ubuntu 14.04. This morning I had no Ethernet connectivity after I resumed the computer (showing as Disconnected). I have the latest updates installed, but I’ve tried booting into older builds via the GRUB menu but still had the same issue with the disconnected ethernet. I also very recently installed VMWare Player (VM is also Ubuntu) but was able to resume with no problems afterwards.

I had a problem with Network Manager’s management of the interfaces before, and so I have blacklisted r8169 in /etc/modprobe.d/blacklist.conf. After doing that, the Ethernet interface worked flawlessly until now (about 2 months).

In lspci the device is shown as:

Ethernet controller: Realtek Semiconductor Co., Ltd. 
 RTL8111/8186/8411 PCI Express Gigabit Ethernet Controller (rev 0c). 

In ifconfig -a, eth0 is not shown at all, only lo, vmnet1 and vmnet8.

I removed the Ethernet interface that was shown in network manager but it didn’t re-populate as I’d hoped (in vain) that it would. The Network manager applet does have networking enabled, but no network connections (probably my own fault).

My /etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface lo inet dhcp

sudo lshw -C network:

*-network UNCLAIMED
  description: Ethernet controller
  product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
  vendor: Realtek Semiconductor Co., Ltd.
  physical id: 0
  bus info: pci@0000:03:00.0
  version: 0c
  width: 64 bits
  clock: 33MHz
  capabilities: pm msi pciexpress msix vpd bus_master cap_list
  configuration: latency=0
  resources: ioport:d000(size=256) memory:fe800000-fe80fff memory:d0000000-d0003fff

Any tips on where to go from here would be greatly appreciated. 🙂

Answer

I fixed it and so I thought I’d post what I did here in case it helps someone.

lspci wasn’t showing any device drivers loaded for the Realtek card. I’m pretty sure that it’s because I’d blacklisted the r8169 driver but perhaps it didn’t have a fallback. I’d downloaded the r8168 drivers (luckily enough) so I extracted them (tar -xvf r8168-8.00.020.00.tar.bz2) and then compiled them with the autorun.sh.

My connectivity did not instantly come back. I had re-added “blacklist r8169” in /etc/modprobe.d/blacklist.conf already. I re-ran “lsmod | grep r81*” and then saw that the r8168 driver was loaded. I restarted networking (sudo /etc/init.d/networking restart” but network manager didn’t automatically connect. I noticed that ifconfig was now showing eth0, along with the MAC address. I opened the network manager applet and added a new connection and was able to now select the MAC from the list, and everything was working again, even with network manager.

Hope that helps someone. 🙂

Attribution
Source : Link , Question Author : Ingytron , Answer Author : Ingytron

Leave a Comment