2016-07-31

Network is gone on a server: "r8169 0000:03:00.0: eth0: link up"

I got this one lately a few times (after putting millions of connections/queries to a MySQL server):

Jul 31 12:01:25 mysql-data-node1 kernel: [76159.918858] r8169 0000:03:00.0: eth0: link up
Jul 31 12:01:25 mysql-data-node1 kernel: [76159.990707] r8169 0000:03:00.0: eth0: link up
Jul 31 12:01:56 mysql-data-node1 kernel: [76190.838088] r8169 0000:03:00.0: eth0: link up

Found the answer here.

Copy/Paste for posterity: [I also added the download here, in case it gets removed]

cd /usr/src
wget http://djlab.com/stuff/r8168-8.032.00.tar.bz2
tar jxvf r8168-8.032.00.tar.bz2
cd r8168-8.032.00
make clean modules
make install
depmod -a
echo "blacklist r8169" >> /etc/modprobe.d/blacklist-network.conf
update-initramfs -u
apt-get install dkms gcc

cat < /usr/src/r8168-8.032.00/dkms.conf
PACKAGE_NAME=r8168
PACKAGE_VERSION=8.032.00
MAKE[0]="'make'"
BUILT_MODULE_NAME[0]=r8168
BUILT_MODULE_LOCATION[0]="src/"
DEST_MODULE_LOCATION[0]="/kernel/updates/dkms"
AUTOINSTALL="YES"
EOF
dkms add -m r8168 -v 8.032.00
dkms build -m r8168 -v 8.032.00
dkms install -m r8168 -v 8.032.00 --force

Then, reboot the box and check which driver you’re using with ‘ethtool -i eth0’. It should now be r8168 instead of r8169:
driver: r8168
version: 8.032.00-NAPI
firmware-version:
bus-info: 0000:01:00.0



No comments: