ubuntu eth0 not reconnecting after cable unplugged
Try this:
> sudo /etc/init.d/networking restart
If this does not help, check that the cable is "really" plugged - i.e. do the lights on the interface and on the switch/router are lit on.
Please, also, post as part of the question the output of these commands:
> ifconfig
> ping 192.168.1.1
> cat /etc/resolv.conf
> route
Related videos on Youtube
Comments
-
Alex over 1 year
I'm running kubuntu 9.10 w/ gnome, I have a static IP defined in /etc/network/interfaces
When I unplugged my network cable and rebooted, then reconnected the network cable I was not able to connect. I tried using sudo ifup eth0, and then ifconfig and it seemed as though the IP address had been assigned and I was connected, but I wasn't. I then did ifdown eth0, and again ifup eth0. For some reason I'm not able to access the network. Furthermore, I also attempted to connect via wlan, and was able to connect to the wireless network, but cannot "see" the network. I can't transfer data or access the internet or anything on the network including the router.
How do I resolve this?
topsy@monolyth:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:1c:25:1c:df:70 inet addr:192.168.1.145 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::21c:25ff:fe1c:df70/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5720 errors:0 dropped:0 overruns:0 frame:0 TX packets:565 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:378035 (378.0 KB) TX bytes:46832 (46.8 KB) Memory:fe000000-fe020000 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:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)
By access the network I mean the local network as well as the internet.
topsy@monolyth:~$ ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=9.14 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.24 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=1.01 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=1.00 ms [snip... all OK, icmp_seq from 5-30, time between 0.981-1.25ms] ^C --- 192.168.1.1 ping statistics --- 30 packets transmitted, 30 received, 0% packet loss, time 29035ms rtt min/avg/max/mdev = 0.971/1.300/9.140/1.458 ms topsy@monolyth:~$ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1000 0 0 eth0 default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0 root@monolyth:~# cat /etc/resolv.conf # Generated by NetworkManager
-
quack quixote about 14 yearsthe
ping
output shows you are accessing the local network; what exactly isn't working?
-
-
Alex about 14 yearsI have tried your suggestion, but to no avail. I added my ifconfig. The network lights both on the laptop and the router for that network cable are on.
-
Sunny about 14 yearsCan you ping 192.168.1.145? Oh, and btw, pls edit your answer once more, unfortunately I don't have enough rep to do it. Mark all the ipconfig output, and click on the smal icon with 1s and 0s above the edit window. this will mark it as "code", and will format it properly for display. Before saving the edit, check the output, so you see how it looks. Cheers.
-
Sunny about 14 yearsI also added in my answer some more commands for you to show the output. Looks like the interface itself is working, so the problem should be either DNS, or routing. Pls, also define "access the network" - the local network, or Internet.
-
Alex about 14 yearsI have added the information you requested.
-
Sunny about 14 yearsFrom what you post, you can access local network. So, pls, re-phrase your q. to tell us what exactly is not working.
-
Alex about 14 yearsI cannot access any network shares, any computers on the network, the internet, basically anything that involves networking. This is the same for my file manager, browser, instant messenger, package manager etc. I have temporarily resolved the problem by editing my /etc/network/interfaces to remove the lines specifying a manual ip, subnet, and gateway and rebooted, however the problem returns if I add those lines again and unplug my network cable.