Home > Desktop User > Network Troubleshooting Using Ping

Network Troubleshooting Using Ping

If your physical network is set up correctly then the Debian install should pick up all the settings needed to get you straight on to the internet. Connecting you to a network may take a little more input, but is still quite straightforward.
Network protocols and hardware are pretty standard no matter what operating system you use. You still need the same hardware you would if you were still using Windows or Mac. If the machine you installed Debian on was already part of a network then there should be nothing you need to do. When I installed my version of Debian it found all the settings automatically and connected me to the internet without input from me.
As with any system, things can go wrong. You have to troubleshoot in Linux in the same way you would with any other system. Examine the symptoms, figure out the most likely causes and work through them. You have tools which can help in these situations, and one of the most important ones for network issues is Ping.

Ping stands for Packet Internet Groper.
It is usually the first port of call when troubleshooting network issues. Think of it as a virtual wave to the device you are trying to connect to. All it does is send a short ‘hello’ message to the destination asking if it exists or is alive. Then it feeds back the results to you. If it receives a reply then it will tell you how long it took. If it doesn’t receive as reply then you know there is something wrong with the connection.

The command is: ping –c 5 192.169.102.134
Ping is the command. –c 5 is to ping the destination 5 times. If you don’t add this then the ping will be continuous until you press Ctrl C. 192.169.102.134 is the destination address you want to reach.

You can ping to a destination hostname if you like, but it then brings DNS into the mix and that’s a whole other post!

That command would be: ping –c 5 http://www.google.com
In this example the ping succeeds and even tells you how long it took to get a response. The lower the number, the better the network.

$ JKavanagh>ping http://www.google.com

Pinging http://www.l.google.com [209.85.227.147] with 32 bytes of data:

Reply from 209.85.227.147: bytes=32 time=29ms TTL=242
Reply from 209.85.227.147: bytes=32 time=26ms TTL=242
Reply from 209.85.227.147: bytes=32 time=26ms TTL=242
Reply from 209.85.227.147: bytes=32 time=25ms TTL=242

Ping statistics for 209.85.227.147:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 25ms, Maximum = 29ms, Average = 26ms

You can see that the system queries the DNS server and gets the IP address of 1.google.com [209.85.227.147]. Then it sends a ping request and gets a reply.

Pinging a known working device will then tell you whether the problem is at the local end, i.e. the machine you are using or the destination or far end. If your ping returns from the known working machine then you know the problem is likely at the far end or somewhere in between depending on your network routing. If the ping doesn’t return then you should look a little closer to home!

About these ads
  1. June 10, 2009 at 10:54 pm

    When troubleshooting network connectivity with ping make sure that firewall on remote/local host do not block ping echo reply/request packages. That will save you a lot of time while troubleshooting.

  2. Ajmaal Firdowzi
    August 3, 2009 at 6:49 pm

    I am not an expert in computers, but I didn’t not know about this ping operation until I came across this article. thanks alot… The only two posts which helped me is http://www.levoltz.com/2009/07/19/network-troubleshooting/ & this post.

    I solved my network issue. thanks to your posts

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 55 other followers

%d bloggers like this: