This problem has been around forever, Linux seems to think it is fine to use the r8169 driver for an r8168 NIC but this often causes problems including the link not working at all.
In my case ethttool shows the link up and detected but it simply does not work especially on a laptop that has been resumed from suspension. Sometimes it takes several minutes for it to work or to unplug and replug the ethernet.
Here is the solution:
Install the r8168 Driver:
sudo apt-get install r8168-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
r8168-dkms
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 85.0 kB of archives.
After this operation, 1,109 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 r8168-dkms all 8.041.00-1 [85.0 kB]
Fetched 85.0 kB in 0s (98.3 kB/s)
Selecting previously unselected package r8168-dkms.
(Reading database ... 325617 files and directories currently installed.)
Preparing to unpack .../r8168-dkms_8.041.00-1_all.deb ...
Unpacking r8168-dkms (8.041.00-1) ...
Setting up r8168-dkms (8.041.00-1) ...
Loading new r8168-8.041.00 DKMS files...
First Installation: checking all kernels...
Building only for 4.4.0-170-generic
Building initial module for 4.4.0-170-generic
Done.
r8168:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-170-generic/updates/dkms/
depmod.....................................................
Backing up initrd.img-4.4.0-170-generic to /boot/initrd.img-4.4.0-170-generic.old-dkms
Making new initrd.img-4.4.0-170-generic
(If next boot fails, revert to initrd.img-4.4.0-170-generic.old-dkms image)
update-initramfs....
DKMS: install completed.
Blacklist the r8169 driver from loading on reboot:
echo "blacklist r8169" > /etc/modprobe.d/blacklist-r8169.conf
Now to enable it right away:
*Note this will take down your network connection:
sudo rmmod r8169
sudo modprobe r8168
sudo systemctl restart networking
sudo systemctl restart network-manager
After that your network should come back up and work better.
ubuntu, debian, linux, mint, solutionthis, nic, ethttool, detected, laptop, resumed, suspension, unplug, replug, ethernet, install, sudo, apt, dkms, lists, dependency, packages, installed, upgraded, newly, kb, archives, additional, disk, http, archive, xenial, amd, fetched, selecting, previously, unselected, database, directories, currently, preparing, unpack, dkms_, _all, deb, unpacking, loading, installation, kernels, generic, initial, module, sanity, kernel, installing, lib, modules, updates, depmod, backing, initrd, img, fails, revert, update, initramfs, completed, blacklist, reboot, echo, quot, etc, modprobe, conf, enable, rmmod, systemctl, restart, networking,