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?
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.
Comments