Today I restarted my linux box, and following the restart, my linux box has no network connection.
Here's what I've tried so far:
Use an different ethernet cable that works on my other computer. No change.
In NetworkManager (KDE) remove and re-create the wired network connection. Didn't work. I'm still getting system notifications in the lower right corner of the screen saying
Network Interface Connection New Wired Connection failed
> sudo /etc/init.d/networking restartIt seemed to restart successfully but still no network connection.
/etc/network/interfaces. The only code in there is what the internet says it's supposed to be:
auto lo iface lo inet loopback
Made sure it's not just a DNS issue by trying to ping one of google's public DNS servers
$ ping 126.96.36.199 connect: Network is unreachable
Doesn't appear to be a DNS issue.
NEW Fix routing. I used the
routecommand to add a default gateway pointing to my router's IP address (thanks @chaos).
$ /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
NEW See if I have an IP address
$ /sbin/ifconfig -a eth0 Link encap:Ethernet HWaddr 74:d4:35:5f:0b:09 inet6 addr: fe80::76d4:35ff:fe5f:b09/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2999 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:1711 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:365026 (356.4 KiB) TX bytes:0 (0.0 B) Interrupt:73 Base address:0xc000 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:16436 Metric:1 RX packets:4913 errors:0 dropped:0 overruns:0 frame:0 TX packets:4913 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1559718 (1.4 MiB) TX bytes:1559718 (1.4 MiB)
It looks like I have an IPv6 address but not an IPv4 address? I would expect
eth0 to have a line starting with
inet addr:, but it doesn't.
So how do I obtain an IP address?
Here's some more information that may (or may not) be helpful:
$ uname -a Linux mocha 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1 x86_64 GNU_Linux
$ lspci | grep -i eth 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
What should I do next?