Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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?

share|improve this question
    
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
show 4 more comments

1 Answer 1

up vote 0 down vote accepted

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 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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