Ubuntu LAN connection not working

Jarno

Good morning.

My internet connection on Ubuntu is not working. I remember when I installed Ubuntu it wasn't working as well, after lots of struggling I finally got it working. But last weekend I had to pull out the LAN cable out of my PC and I've got it back in now. Unfortunately my internet connection isn't working anymore now.

It does work on Windows 7 (dual boot).

I did these commands to show you the output:

$ sudo ethtool eth0

Settings for eth0:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available

-

$ ifconfig

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2942 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2942 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:247513 (247.5 KB)  TX bytes:247513 (247.5 KB)

-

$ lspci -nn | grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)

EDIT after StallionSA comment

I tried your first commands, without result:

$ sudo ip link set dev eth0 down
Cannot find device "eth0"

$ sudo dhclient eth0
Cannot find device "eth0"

$ sudo ip addr add 192.168.1.14/24 dev eth0
Cannot find device "eth0"

$ sudo ip link set dev eth0 up
Cannot find device "eth0"

$ sudo ip route add default via 192.168.1.1
RTNETLINK answers: Network is unreachable

After that, I tried both to edit the interfaces file, trying a dynamic and static IP both without result:

$ sudo /etc/init.d/networking restart

[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
 failed!

This was in the interfaces file before I edited it:

auto lo
iface lo inet loopback

EDIT 2

This command works for the internet connection:

sudo modprobe r8169 && dmesg | grep r816

I have to re-enter the command each time I reboot, how could I fix this?

chili555

To automate loading the driver, open a terminal and do:

sudo -i
echo r8169  >>  /etc/modules
exit

You should be all set. If this is ineffective, check to see if the module is blacklisted:

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

Use nano or kate or leafpad if you don't have the text editor gedit. Check to see if there is a line blacklisting r8169. If so remove it. Proofread carefully, save and close the text editor.

Also, check to see if there is any specific file blacklisting it:

ls /etc/modprobe.d

If you find such a file, remove it. Reboot and tell us if it is working.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

LAN connection not working on Ubuntu 16.04

From Dev

LAN to WAN connection not working

From Dev

Lan DNS not working after reinstall of Ubuntu 13.10

From Dev

Wake on LAN working in Windows, but not in Ubuntu 16.04

From Dev

Ethernet connection not working on Ubuntu 20.04

From Dev

Disable internet connection but leave the LAN working on windows 10

From Dev

LAN connection not working in network with two routers (WiFi works)

From Dev

Sharing a dial-up connection from Ubuntu 12.04 to another on a LAN

From Dev

How to configure a LAN connection between two Ubuntu machines?

From Dev

How to configure a LAN connection between two Ubuntu machines?

From Dev

Sharing a dial-up connection from Ubuntu 12.04 to another on a LAN

From Dev

Wired connection to LAN but no internet after upgrading to Ubuntu 16.04

From Dev

How to configure Ubuntu server to accept only LAN connection through SSH?

From Dev

Lan not working

From Dev

Ubuntu 12.04 Internet Connection not working (anymore)

From Dev

ubuntu vm: name resolution working, no internet connection

From Dev

Wired connection not working Ubuntu 14.04 64 bit

From Dev

Gigabit connection not working properly on Ubuntu 14.04

From Dev

internet connection stopped working, but wifi connection looks fine (ubuntu 18.04.2)

From Dev

Synology LAN connection

From Dev

Problem with LAN cable connection

From Dev

Booting Ubuntu causes LAN to stop working in Ubuntu and Windows until BIOS reset

From Dev

How do I share my Ubuntu's Internet connection with a LAN (via hardware router)

From Dev

How do I share my Ubuntu's Internet connection with a LAN (via hardware router)

From Dev

Ethernet connection not working after installing Ubuntu 14.04 LTS

From Dev

Ethernet connection not working after installing Ubuntu 14.04 LTS

From Dev

Wake On Lan not working

From Dev

IIS 5.1 Not working on LAN

From Dev

Wake On Lan not working

Related Related

  1. 1

    LAN connection not working on Ubuntu 16.04

  2. 2

    LAN to WAN connection not working

  3. 3

    Lan DNS not working after reinstall of Ubuntu 13.10

  4. 4

    Wake on LAN working in Windows, but not in Ubuntu 16.04

  5. 5

    Ethernet connection not working on Ubuntu 20.04

  6. 6

    Disable internet connection but leave the LAN working on windows 10

  7. 7

    LAN connection not working in network with two routers (WiFi works)

  8. 8

    Sharing a dial-up connection from Ubuntu 12.04 to another on a LAN

  9. 9

    How to configure a LAN connection between two Ubuntu machines?

  10. 10

    How to configure a LAN connection between two Ubuntu machines?

  11. 11

    Sharing a dial-up connection from Ubuntu 12.04 to another on a LAN

  12. 12

    Wired connection to LAN but no internet after upgrading to Ubuntu 16.04

  13. 13

    How to configure Ubuntu server to accept only LAN connection through SSH?

  14. 14

    Lan not working

  15. 15

    Ubuntu 12.04 Internet Connection not working (anymore)

  16. 16

    ubuntu vm: name resolution working, no internet connection

  17. 17

    Wired connection not working Ubuntu 14.04 64 bit

  18. 18

    Gigabit connection not working properly on Ubuntu 14.04

  19. 19

    internet connection stopped working, but wifi connection looks fine (ubuntu 18.04.2)

  20. 20

    Synology LAN connection

  21. 21

    Problem with LAN cable connection

  22. 22

    Booting Ubuntu causes LAN to stop working in Ubuntu and Windows until BIOS reset

  23. 23

    How do I share my Ubuntu's Internet connection with a LAN (via hardware router)

  24. 24

    How do I share my Ubuntu's Internet connection with a LAN (via hardware router)

  25. 25

    Ethernet connection not working after installing Ubuntu 14.04 LTS

  26. 26

    Ethernet connection not working after installing Ubuntu 14.04 LTS

  27. 27

    Wake On Lan not working

  28. 28

    IIS 5.1 Not working on LAN

  29. 29

    Wake On Lan not working

HotTag

Archive