Kitz ADSL Broadband Information
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
 

Difference between revisions of "PING"

From kitz wiki
Jump to: navigation, search
m (PING Commands)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
== The PING utility ==
 
PING is a utility that allows us to check if a specific IP address is online or accessible and therefore used to help troubleshoot network (or internet) connections.
 
PING is a utility that allows us to check if a specific IP address is online or accessible and therefore used to help troubleshoot network (or internet) connections.
  
Line 4: Line 5:
  
 
Although there are various programs that will PING an IP address for you, probably the quickest way for Windows users is to use the "ping" command from the DOS prompt.
 
Although there are various programs that will PING an IP address for you, probably the quickest way for Windows users is to use the "ping" command from the DOS prompt.
(Mac OS X and Linux users should use the Unix commands located here.)
+
(Mac OS X and Linux users should use the Unix commands located [http://www.rt.com/man/ping.8.html here].)
  
 
To do this Start >>> run >>> type "cmd"
 
To do this Start >>> run >>> type "cmd"
 
Then from the prompt type "ping [IP address]".
 
Then from the prompt type "ping [IP address]".
  
[[File:Example.jpg]]
 
  
  
'''Interpreting the results.'''
 
  
Reply from 212.58.228.154 The host IP no that responded
+
=='''Interpreting the results.'''==
bytes=32 No of bytes sent in the packet
+
[[File:ping.jpg]]
time=24ms Time in milliseconds to reach the host
 
TTL=249 Time To Live. - Indication of hops along the way.*
 
Packets sent Total no of packets sent during the test
 
Packets received No of packets received by the host
 
Packets lost No of packets not received (lost on the way)
 
  
 +
Reply from 212.58.228.154  ~ The host IP no that responded
  
'''Tips'''
+
bytes=32  ~  No of bytes sent in the packet
 +
 
 +
time=24ms  ~  Time in milliseconds to reach the host
 +
 
 +
TTL=249 Time To Live. ~ Indication of hops along the way.*
 +
 
 +
Packets sent  ~  Total no of packets sent during the test
 +
 
 +
Packets received  ~  No of packets received by the host
 +
 
 +
Packets lost  ~  No of packets not received (lost on the way)
 +
 
 +
 
 +
=='''Tips'''==
  
 
The time taken for a packet to reach the host is also called latency. This response is an indication of the round trip to the host, and may involve a series of hops along the way.
 
The time taken for a packet to reach the host is also called latency. This response is an indication of the round trip to the host, and may involve a series of hops along the way.
Line 34: Line 42:
 
For e.g. try "ping -w 5000 [IP address]" to allow responses within 5 seconds.
 
For e.g. try "ping -w 5000 [IP address]" to allow responses within 5 seconds.
  
'''TTL'''
+
=='''TTL'''==
  
 
Every ping packet that is sent out has a TTL value which by default is 255.
 
Every ping packet that is sent out has a TTL value which by default is 255.
Line 45: Line 53:
 
   
 
   
  
'''PING Commands'''
+
=='''PING Commands'''==
  
syntax
+
'''syntax'''
 
''PING [options] destination_host''
 
''PING [options] destination_host''
  
 
'''Options'''
 
'''Options'''
 +
 
-a Resolve address to hostname.
 
-a Resolve address to hostname.
 +
 
-f Set "Don't fragment flag" in packet.
 
-f Set "Don't fragment flag" in packet.
 +
 
-i TTL Time To Live.
 
-i TTL Time To Live.
 +
 
-j host-list Loose source route along host-list.
 
-j host-list Loose source route along host-list.
 +
 
-k host-list Strict source route along host-list.
 
-k host-list Strict source route along host-list.
 +
 
-l size Send buffer size.
 
-l size Send buffer size.
 +
 
-n count Number of echo requests to send.
 
-n count Number of echo requests to send.
 +
 
-r count Record route for count hops
 
-r count Record route for count hops
 +
 
-s count Timestamp for count hops.
 
-s count Timestamp for count hops.
 +
 
-t Pings the specified host until interrupted.
 
-t Pings the specified host until interrupted.
 +
 
-v TOS Type Of Service.
 
-v TOS Type Of Service.
 +
 
-w timeout Timeout in milliseconds to wait for each reply.
 
-w timeout Timeout in milliseconds to wait for each reply.
 +
 
   
 
   
 
'''Commands'''
 
'''Commands'''
Line 69: Line 90:
 
Ctrl + C Stop Ping
 
Ctrl + C Stop Ping
 
> c:\filename.txt Send results to a text file
 
> c:\filename.txt Send results to a text file
 +
 +
(Small edit by newtest)

Latest revision as of 11:28, 10 December 2011

The PING utility

PING is a utility that allows us to check if a specific IP address is online or accessible and therefore used to help troubleshoot network (or internet) connections.

It works by sending packet(s) of data to the IP address and checking the response time.

Although there are various programs that will PING an IP address for you, probably the quickest way for Windows users is to use the "ping" command from the DOS prompt. (Mac OS X and Linux users should use the Unix commands located here.)

To do this Start >>> run >>> type "cmd" Then from the prompt type "ping [IP address]".



Interpreting the results.

Ping.jpg

Reply from 212.58.228.154 ~ The host IP no that responded

bytes=32 ~ No of bytes sent in the packet

time=24ms ~ Time in milliseconds to reach the host

TTL=249 Time To Live. ~ Indication of hops along the way.*

Packets sent ~ Total no of packets sent during the test

Packets received ~ No of packets received by the host

Packets lost ~ No of packets not received (lost on the way)


Tips

The time taken for a packet to reach the host is also called latency. This response is an indication of the round trip to the host, and may involve a series of hops along the way. Depending upon the location of the remote host, a good time would be less than 100ms (0.1 second).

If you see a variation in the times this is called latency "jitter", and you may receive poor communication with the host.

A response of "Request timed out" means there was no response in the default time period of one second. If the latency of the response is more than one second, try using the -w option on the ping command to increase the time-out. For e.g. try "ping -w 5000 [IP address]" to allow responses within 5 seconds.

TTL

Every ping packet that is sent out has a TTL value which by default is 255. For every router hop that the packet passes through, the TTL figure gets decreased by one. So in the example above the TTL of 249 means (255 - 249) 6 hops. Variations in the TTL show that the packets are traversing different routes which isn't really a good thing :/

Although the default Unix ICMP echo_request is 255, some remote hosts (servers) may have their TTL response value set to 128 or 64, so you may have to adjust the calculation accordingly.


PING Commands

syntax PING [options] destination_host

Options

-a Resolve address to hostname.

-f Set "Don't fragment flag" in packet.

-i TTL Time To Live.

-j host-list Loose source route along host-list.

-k host-list Strict source route along host-list.

-l size Send buffer size.

-n count Number of echo requests to send.

-r count Record route for count hops

-s count Timestamp for count hops.

-t Pings the specified host until interrupted.

-v TOS Type Of Service.

-w timeout Timeout in milliseconds to wait for each reply.


Commands

Ctrl + Break To see statistics and continue Ctrl + C Stop Ping > c:\filename.txt Send results to a text file

(Small edit by newtest)