Installing a Fixed Ethernet Driver for Realtek RTL8101E/8102E on Linux

Get the packages (linux headers and build tools):

sudo aptitude install linux-headers-$(uname -r) build-essential

blacklist the wrong driver, get the fixed driver sources and unpack them:

echo 'blacklist r8169' | sudo tee -a /etc/modprobe.d/blacklist
cd ~/Downloads
mv r8101-1.010.00.ta.gz r8101-1.010.00.tar.gz
tar xvzf r8101-1.010.00.tar.gz
cd ~/Downloads/r8101-1.010.00

change line line 34 of the file src/Makefile to

$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

and add the following line in the top of the file

PWD := $(shell pwd)

then compile

sudo make
sudo insmod ./src/r8101.ko
sudo depmod -a
sudo update-initramfs -u

restart and check:

lsmod | grep r8101

if nothing shows up run and check then again:

sudo modprobe r8101