Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to systematically find culprit behind loss of internet in linux?

I do know

that to to download files/access webpage/use ssh/etc , there are several layers of communication made: application,transport,internet,link ( wikipedia )

I don't know

  • How each of these layers (excluding application layer) map to programs/components in linux?
  • How to check each of these components efficiently - if they are working correctly?
  • In which order to check them

My goal is

to have (reasonably) simple system for tracking down the problem. In pseudo code it would look something like

 for(component in A..Z) // from hardwarefailure,missing drivers to configuration in /etc/network/interfaces
     if  cmd_to_check(component).output == _OK_
     then continue // problem is 100% not here, continue with next item
     else break    // problem is 100% with current component

I want to focus here on problems which happens on MY machine, not problems with remote or intermediary servers


If there are differences

  • between distributions, debian is preferred
  • between wire vs wireless then wire is preferred
  • between any other aspect, then most standard is preferred

If available free resources would be preferred

Thanks in advance for any answers and/or references

share|improve this question

closed as not a real question by Ward, Shane Madden, mailq, Scott Pack, Chris S Jan 9 '12 at 3:32

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

Steps for testing the Internet connectivity:

  • test if the Ethernet links is up and has the expected negotiated speed and duplex: ethtool eth0
  • test if the next hop (neighbor router) is available: ping -c 3 next_hop_ip
  • test if a well known remote site is available (e.g. ping the google DNS): ping -c 3
  • test if the DNS is working: host
  • test if a website is answering: wget -O -
  • if the workstations are directly connected you should be able to see them with arp even if a firewall is configured on them: sudo arping workstation_ip
  • test if workstations are reachable from the server: ping workstation_ip

When you fail one step, try to find what is happening before going to next one.

share|improve this answer

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