How to use PING

Apr 21, 2009

The ping (Packet Internet Groper) is used to send ICMP (Internet Control Message
Protocol) packets from one host to another. Ping transmits packets using the ICMP
ECHO_REQUEST command and expects an ICMP ECHO_REPLY. Ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution.

ping [-t] [-a] [-n Count] [-l Size] [-f] [-i TTL] [-v TOS] [-r Count] [-s Count] [{-j HostList | -k HostList}] [-w Timeout] [TargetName]

-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.

The following example shows ping command output:


Pinging [] with 32 bytes of data:
Reply from bytes=32 time=101ms TTL=124
Reply from bytes=32 time=100ms TTL=124
Reply from bytes=32 time=120ms TTL=124
Reply from bytes=32 time=120ms TTL=124

To pingthe destination and resolve to its host name, 
type: ping -a

To ping the destination with 10 Echo Request messages, each of which has a Data field of 1000 bytes, 
type: ping-n 10 -l 1000

To ping the destination and record the route for 4 hops,
type: ping-r 4

To ping the destination and specify the loose source route of,
type: ping -j


Anonymous said...

Hi Ritesh,
Nice articles, Hey i have a problem with my command da, i cant use the commands like ping,help,ipconfig and more. It says that "the command is not recognised as an internal.."

Any solution?

Post a Comment


Connect With ME