Recently I see that I often lose internet connectivity on my Linux machines. I am starting to think that it may be a router problem, but I have no idea to check if this is indeed the problem.

Basically what happens is that if I type ifconfig I get the list of all the interfaces, but none of them have an assigned IP address. Even when I use dhclient to pull a random IP address, I still am not able to ping or surf the web.

This is an example of ifconfig output:

eth0      Link encap:Ethernet  HWaddr 08:00:27:b3:da:a1  
          inet6 addr: fe80::a00:27ff:feb3:daa1/64 Scope:Link
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1351 (1.3 KB)  TX bytes:6466 (6.4 KB)

How can I troubleshoot internet connectivity issues? What files do I have to look at?

  • Are you using IPv6 on your LAN? That interface output shows an IPv6 address but no IPv4 address. – Tim Jul 26 '13 at 13:09
  • @Tim that's right, but I am not using IPv6. I have a Windows machine that uses IPv4 and doesn't have any connectivity problems. – user1301428 Jul 26 '13 at 13:49
  • If the ifconfig output you have listed above is what shows right after you have run dhclient then I would suspect something is wrong with your DHCP server. If DHCP is provided by the router, then try disabling IPv6 support. You could also just try a static IP to determine the source of the problem being DHCP. – Tim Jul 26 '13 at 14:20
  • @Tim for example, now I rebooted the router and I see that a machine has successfully pulled an IP address and Internet connectivity is working. How can I check if DHCP is indeed the problem? – user1301428 Jul 26 '13 at 14:53
  • Lookup how to set a static IP for your distro. Once it is setup and ou reboot or restart networking, wait for a while to see if you have the same intermittent problems with a static IP. If the problems do not arise then it is certainly DHCP being weird. – Tim Jul 26 '13 at 15:01

After some tinkering with the configuration files I have found out that the problem often involved the routing table. After configuring the route manually the problem was solved.

route add -net netmask gw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.