I can't connect to ethernet in ubuntu 15.10

11,200

Solution 1

If you do not have any other internet connection. you can install r8168-dkms offline.

Download theese files:

http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.040.00-1_all.deb http://mirrors.kernel.org/ubuntu/pool/main/d/dkms/dkms_2.2.0.3-2ubuntu6_all.deb

You can do it using some other computer. Copy these files to Ubuntu Home folder and run in terminal:

sudo dpkg -i r8168-dkms_8.040.00-1_all.deb dkms_2.2.0.3-2ubuntu6_all.deb
sudo modprobe -r r8169
sudo modprobe r8168

But in your case you just have a wrong config in /etc/network/interfaces.

Solution 2

Okay you are using a realtek network card some of the realtek drivers are really bad you are going to have to change driver to make things work.

Do the following:

sudo apt-get install r8168-dkms

Now you have to blacklist the old driver, do this by opening the blacklist file and adding the drivername to the bottom of the file on a new line:

sudo gedit  /etc/modprobe.d/blacklist.conf

Add: r8169

Then reboot

sudo reboot

And it should now work.

Share:
11,200

Related videos on Youtube

Erik Jakobsson
Author by

Erik Jakobsson

Updated on September 18, 2022

Comments

  • Erik Jakobsson
    Erik Jakobsson over 1 year

    In 14.04 32 bit Ethernet worked fine but after installing 15.10 64 bit it doesn't work. My computer can't use WiFi so I have no internet connection at all.

    I have heard people saying to check /etc/network/properties but I can't edit that file I have no permission to do that. I'm missing something in there (i have forgotten the name of it but I think it's another word for Ethernet).

    Output of lspci -knn | grep Eth -A2 :

    03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
    Subsystem: Gigabyte Technology CO., Ltd Motherboard [1458:e000]
    Kernel driver in use: r8169
    

    Output of cat /etc/network/interfaces:

    # interfaces (5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    

    Output of lspci -nnk | grep -iA2 eth Is the same output as lspci -knn | grep Eth -A2

    edit*

    I have now added auto eth0 allow-hotplug eth0 iface eth0 inet dhcp to the file called: /etc/network/interfaces but still does not work. Is it something else missing in that file?

    EDIT*

    I found a very good tutorial on youtube that tells you how to set up interfaces and fix your ip-adress. So now I have that symbol in the top right hand corner that indicates that I´m connected with ethernet but I´m only conneceted to my router, not to the rest of the world. Maybe it´s a problem with my dns.

    This is how /etc/resolv.conf look like:

    `# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    

    DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

    nameserver 127.0.0.1 search mydomain.local`

    I have not changed the file but I have fixed so I now have permission to change it.

    Maybe this will help you finding an answer to the problem, when i type ifconfig it tells me that enp3s0 inet addr:192.168.0.240 Bcast:192.168.0.255 Mask:255.255.255.0

    and lo inet addr:127.0.0.1 Mask:255.0.0.0

    So my /etc/network/interfacesfile looks like this:

        # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    
    
    auto eth0
    iface eth0 inet static
    adress 192.168.0.240
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.1.1      
    

    EDIT* Internet works fine now when I updated the drivers

    • Raphael
      Raphael over 8 years
      Please post the output of lspci | grep Ethernet
    • Pilot6
      Pilot6 over 8 years
      Better lspci -knn | grep Eth -A2
    • Pilot6
      Pilot6 over 8 years
      Your settings in /etc/network/interfaces are wrong. Gateway is not in the same subnet as the interface. It should be 192.168.0.1 or the IP address should be another, etc.
    • Erik Jakobsson
      Erik Jakobsson over 8 years
      Now when i startet my computer again I can´t even acces the router. Changig the gateway in /etc/network/interfaces did not work.
    • Erik Jakobsson
      Erik Jakobsson over 8 years
      8 mins later connected to router again... so random
    • Erik Jakobsson
      Erik Jakobsson over 8 years
      5 mins later with new drivers works fine!
  • Maokei
    Maokei over 8 years
    If you have any other information about which ethernet / wireless module you have it can be useful.
  • Erik Jakobsson
    Erik Jakobsson over 8 years
    How do you write these fancy letters from the terminal?
  • Erik Jakobsson
    Erik Jakobsson over 8 years
    Dont´t you need a internet connection to download a new driver?
  • Erik Jakobsson
    Erik Jakobsson over 8 years
    When I do sudo apt-get install r8168-dkms it says "can not find the package r8168-dkms"
  • Pilot6
    Pilot6 over 8 years
    @edwardtorvalds There was a more important error. I fixed it.
  • Maokei
    Maokei over 8 years
    The package is in the repository if you have problems finding it you can also download it here: ubuntuupdates.org/package/core/wily/universe/base/r8168-dkms or use the synaptic package manager too search for it.
  • Maokei
    Maokei over 8 years
    With your keyboard, if you have trouble you can copy and paste them.
  • Tim
    Tim over 7 years
    This worked perfectly for me. I Downloaded r8168-dkms as well as the base dkms package (ubuntuupdates.org/package/core/xenial/main/base/dkms) to a flash drive, installed with dpkg -i <file>, blacklisted r8169 and rebooted and my internet works perfectly now. Thanks :)