PDA

View Full Version : What is Ping?


satanta
22-08-09, 20:08
Question.
What is Ping?

Answer
It is a loop test to ensure there a communication path between two IP addresses on a network.

The Ping command features are in the form below:

C:\>ping /?

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name

Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-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 (IPv4-only).
-i TTL Time To Live.
-v TOS Type Of Service (IPv4-only).
-r count Record route for count hops (IPv4-only).
-s count Timestamp for count hops (IPv4-only).
-j host-list Loose source route along host-list (IPv4-only).
-k host-list Strict source route along host-list (IPv4-only).
-w timeout Timeout in milliseconds to wait for each reply.
-R Use routing header to test reverse route also (IPv6-only).
-S srcaddr Source address to use (IPv6-only).
-4 Force using IPv4.
-6 Force using IPv6.

The common way to use the command is to open a Dos window and when you have the Dos prompt -
Type: ping (the destination IP address you wish to check if communication is possible)

e.g. C:\>Ping 192.168.1.10

Pinging 192.168.1.10 with 32 bytes of data:

Reply from 192.168.1.10: bytes=32 time=4ms TTL=63
Reply from 192.168.1.10: bytes=32 time=106ms TTL=63
Reply from 192.168.1.10: bytes=32 time=2ms TTL=63
Reply from 192.168.1.10: bytes=32 time=94ms TTL=63

Ping statistics for 192.168.1.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 106ms, Average = 51ms

C:\>
The above was successful.

Or if it fails, this will be reported.

C:\>Ping 192.168.1.10

Pinging 192.168.1.10 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.10:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:/>

As you can see from above, this is a basic tool to initially check your communication path.