Saturday, February 16, 2008

PING: The Connectivity Detective Tool

ping is a computer network tool used to test whether a particular host is reachable across an IP network. It works by sending ICMP “echo request” packets to the target host and listening for ICMP “echo response” replies. ping estimates the round-trip time, generally in milliseconds, and records any packet loss, and prints a statistical summary when finished. This is essential useful to troubleshoot your own connection problems at home. To test if you're actually on the internet or not.

Example: Let's say you can't connect to the internet. There maybe many reasons why you can't connect but using the ping command can limit down some of the potential reasons why you can't connect. The Ping command will let you "Talk to" a website and have the website "Reply" to you, acknowledging your existance on the internet. To initiate a "Ping" Command Let's first examine it's components.

Use: ping domain.com -variableifneeded

-t Ping the specifed host until interrupted
-a Resolve addresses to hostnames
-n count Number of echo requests to send
-l size Send buffer size
-f Set Don't Fragment flag in packet
-i TTL Time To Live
-v TOS Type Of Service
-r count Record route for count hops
-s count Timestamp for count hops
-j host-list Loose source route along host
-list
-k host-list Strict source route along host-list
-w timeout Timeout in milliseconds to wait for each reply

Example of use:
You can't connect onlineIf you're using Windows XP/Vista/2k
Windows 2k/XP/Vista
Step 1. [START] > Run ; In the Run Prompt on the [OPEN] Line, type "CMD" and Click [OK]

For Vista Users: Click [Windows Orb] > All Programs > Accessories > "Command Prompt"

Step 2. Clicking [OK] will yield the Command Prompt, a black DOS based screen usually prompting "C:/Documents and settings/User/Whatever/>

Step 3. At the End of the prompt above, type in "ping www.google.com" and Click Enter: You will get the following as an example.

\\ You'll see the following:
C:\Documents and Settings\Administrator>ping www.google.com

Pinging www.l.google.com [72.14.205.103] with 32 bytes of data:
Reply from 72.14.205.103: bytes=32 time=25ms TTL=244
Reply from 72.14.205.103: bytes=32 time=27ms TTL=244
Reply from 72.14.205.103: bytes=32 time=22ms TTL=244
Reply from 72.14.205.103: bytes=32 time=22ms TTL=244

Ping statistics for 72.14.205.103:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 22ms, Maximum = 27ms, Average = 24ms
C:\Documents and Settings\Administrator>



Now let's try with a variable:

C:\Documents and Settings\Administrator>ping www.google.com -n 15

Pinging www.l.google.com [72.14.205.103] with 32 bytes of data:

Reply from 72.14.205.103: bytes=32 time=20ms TTL=244
Reply from 72.14.205.103: bytes=32 time=21ms TTL=244
Reply from 72.14.205.103: bytes=32 time=20ms TTL=244
Reply from 72.14.205.103: bytes=32 time=22ms TTL=244
Reply from 72.14.205.103: bytes=32 time=23ms TTL=244
Reply from 72.14.205.103: bytes=32 time=21ms TTL=244
Reply from 72.14.205.103: bytes=32 time=21ms TTL=244
Reply from 72.14.205.103: bytes=32 time=20ms TTL=244
Reply from 72.14.205.103: bytes=32 time=23ms TTL=244
Reply from 72.14.205.103: bytes=32 time=20ms TTL=244
Reply from 72.14.205.103: bytes=32 time=28ms TTL=244
Reply from 72.14.205.103: bytes=32 time=21ms TTL=244
Reply from 72.14.205.103: bytes=32 time=22ms TTL=244
Reply from 72.14.205.103: bytes=32 time=22ms TTL=244
Reply from 72.14.205.103: bytes=32 time=25ms TTL=244

Ping statistics for 72.14.205.103:

Packets: Sent = 15, Received = 15, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 20ms, Maximum = 28ms, Average = 21ms
C:\Documents and Settings\Administrator>

As you can see the above, I'm able to communicate with google.com I said hello, and they replied back. In this situation we know 2 things. DNS is working, and We're able to communicate on the internet. We're online for sure. Now, if you go to your browser and you can't connect and see a page, it's no longer an ISP issue, You should look into disabling your firewall, or configurating or perhaps a security issue. Another problem might be the configuration of your browser, check that aswell.

No comments: