Realtek ethernet driver error ubuntu 16.04

48,564

Solution 1

Get an internet connection(i got through wifi). Use the command:

sudo apt-get install r8168-dkms

Enter your password. This will install the latest version of the driver. Ethernet connection should be established after installing (you may reboot & check again).

Solution 2

For product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller the above solution didn't work. I had to download driver from here and install with ./autorun.sh.

After that I still couldn't connect to the internet. But the r8101 kernel module was loaded and in nm the connection came up. I noticed there was no mac address. With the following command I forced a random chosen mac address.

sudo ifconfig enp3s0 hw ether 00:04:FE:11:22:38

where enp3s0 was my ethernet nic. with this I got my internet connection but is wasn't persistent. I had to add

pre-up ifconfig enp3s0 hw ether 00:04:FE:11:22:38

at the end of /etc/network/interfaces file

sudo nano /etc/network/interfaces  
Share:
48,564

Related videos on Youtube

Sumit Kumar
Author by

Sumit Kumar

Updated on September 18, 2022

Comments

  • Sumit Kumar
    Sumit Kumar over 1 year

    I have recently upgraded from Ubuntu 15.10 to 16.04. when i was using 15.10 ethernet works flawlessly. But after upgrading to 16.04 it doesn't work anymore showing network cable unplugged. I tried reinstalling driver & end up getting following error

    sumit@Lenovo-Z50-70:~/Desktop/r8168-8.041.01$ sudo ./autorun.sh
    [sudo] password for sumit:
    
    Check old driver and unload it.
    rmmod r8169
    Build the module and install
    make[2]: *** No rule to make target 'kernel/drivers/net/ethernet/realtek'.  Stop.
    make[1]: *** [install] Error 2
    make: *** [install] Error 2
    

    When i had installed in 15.10 it was installed successfully. My ethernet controller is: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev10). I have done all proxy settings same as they were in 15.10.

    Please help. :(

  • OTH
    OTH about 7 years
    I have been wrestling with this problem for a really long while. Thank you so much, that really helped :) I did the exact same thing but changed "enp3s0" to the name "enp0s31f6" that I found by typing "ifconfig"
  • coderunner
    coderunner over 6 years
    I have the same RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller and tried the above method. Still my connection is not persistent. There is a packet loss if I do a ping 165 packets transmitted, 163 received, 1% packet loss, time 164241ms rtt min/avg/max/mdev = 5.053/11.794/131.199/16.516 ms. What can be a further debugging I can perform to solve this problem?
  • rubo77
    rubo77 about 6 years
    The driver page only servers a driver for kernel 4.7, how can i get this running on Ubuntu 16.04 with kernel 4.8?