Unable to connect to wired DHCP connection via my PC?

The kernel incorrectly matches this NIC with the r8169 kernel module. This is shown by the lshw trace where it shows that the NIC has been disabled.

According to this article, the NIC should be associated with the r8168 kernel module. With the incorrect kernel module you will either get slow speeds or no connection what-so-ever.

According to Launchpad - this is also a recognised bug with Oneiric - however, it looks like it has been resolved for 12.04 since Precise uses a newer kernel (v3.2)


hardware issues

First, let's rule out a NIC hardware failure - NICs can go bad (the firmware/ROM) - an indication of this is the fact that the MAC address is recognised as FF:FF:FF:FF:FF

If you last had a working NIC with Natty (or previous Ubuntu version) - then boot your PC with a LiveUSB/LiveCD.

Test your wired connection - rerun sudo lshw -class network. Look for the MAC address. Also look to see if it still says disabled.

If it still fails to connect via a live usb/cd with the version of ubuntu it last worked with then you have a strong indication of hardware failure.


potential software solutions

Once you have ruled out hardware issues, then lets concentrate on possible software solutions.

For the solutions below you will still need a valid internet connection...

If you have a spare NIC card that is not of this model I would insert this into your PC and connect to the internet via a wired connection. If you can connect via wireless - do so. Otherwise, you may need to move your hard-drive into another computer to do the following and then transfer it back to your original PC.

FIRST - BACKUP YOUR SYSTEM with a good backup tool such as Clonezilla

Suggested Fix 1

According to the launchpad bug report, this is potentially fixed if you enable the proposed repository in software sources and install the package linux-backports-modules-3.0.0

Suggested Fix 2

You may be able to download the Precise kernel (v3.2) and install this.

From the mainline kernel area of launchpad:

Download the amd64 headers.deb, headers_all.deb and the image_amd64.deb files

then install the kernel using the syntax:

sudo dpkg -i [package_name].deb

Suggested Fix 3

This is something you may be able to resolve by downloading the realtek driver and compiling it yourself.

Download the Linux source - at the time of writing this it is v8.028.00

Unpack the tarball :

tar vjxf r8168*.tar.bz2

Change to the directory:

cd r8168-8*

Compile:

sudo ./autorun.sh 

You can check whether the driver is loaded by using following commands.

lsmod | grep r8168
ifconfig -a

If there is a device name, ethX, shown on the monitor, the linux driver is loaded. Then, you can use the following command to activate the ethX.

ifconfig ethX up

Finally, blacklist the r8169 driver add the following to /etc/modprobe.d/blacklist.conf

#blacklist r8169 driver
blacklist r8169

Potential workarounds

A similar bug-report mentioning odd-MAC addresses for the r8169 kernel module on older kernels gave a couple of suggested workarounds.

work around 1

Once booted stop and start the kernel module:

sudo rmmod r8169 && sudo modprobe r8169

work around 2

Boot from your Natty live CD - run ifconfig -a and record the MAC address for eth0.

Boot into oneiric. Examine your udev persistent rules and map the correct MAC address to eth0

sudo cp /etc/udev/rules.d/70-persistent-net.rules /
sudo nano /etc/udev/rules.d/70-persistent-net.rules

change the MAC address. If in doubt - please add to your question the contents of your rules file.