How to use Ping command

How to use Ping command


Ping command is used to check whether the computer can be reached on the network and if so, how long it takes. Ping command is the basic network test done by the system administrators. We can use the IP address or the computer name to test whether the system is reachable in the network where we are searching for. Generally ping command is used for the network diagnostic test.

The ping command can be used by the following syntax

Ping (computer name or IP address)

Example: ping yahoo.com
Example: ping 67.195.160.76

Once the above command is been executed, you will get the result as follows:

Pinging yahoo.com [67.195.160.76] with 32 bytes of data:

Reply from 67.195.160.76: bytes=32 time=384ms TTL=45
Reply from 67.195.160.76: bytes=32 time=338ms TTL=45
Request timed out.
Reply from 67.195.160.76: bytes=32 time=279ms TTL=45

Ping statistics for 67.195.160.76:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 279ms, Maximum = 384ms, Average = 333ms

The result will inform you about the packets received successfully and packets losses during the transaction. TTL is nothing but Time To Live where in which it describes about the life of the packets before its been discarded.

Also there are lots of switches available with the ping command for the diagnostic test and they are

-t Ping the specified host until stopped.
-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.

Example: ping yahoo.com –t

This will ping the yahoo.com server until we forcibly stop this ping request. Once this command executed, the following request will appear on your command prompt:

Pinging yahoo.com [67.195.160.76] with 32 bytes of data:

Reply from 67.195.160.76: bytes=32 time=402ms TTL=45
Reply from 67.195.160.76: bytes=32 time=353ms TTL=45
Reply from 67.195.160.76: bytes=32 time=438ms TTL=45
Request timed out.
Reply from 67.195.160.76: bytes=32 time=280ms TTL=45
Reply from 67.195.160.76: bytes=32 time=393ms TTL=45
Reply from 67.195.160.76: bytes=32 time=336ms TTL=45
Reply from 67.195.160.76: bytes=32 time=289ms TTL=45
Reply from 67.195.160.76: bytes=32 time=326ms TTL=45
Reply from 67.195.160.76: bytes=32 time=356ms TTL=45
Reply from 67.195.160.76: bytes=32 time=328ms TTL=45
Reply from 67.195.160.76: bytes=32 time=336ms TTL=45
Reply from 67.195.160.76: bytes=32 time=291ms TTL=45
Reply from 67.195.160.76: bytes=32 time=401ms TTL=45

Request Timed Out (generally referred as RTO) will be displayed if the server is unreached at the specified time limit. If the system is not available in the network at all, then you will get the RTO when you try to ping that particular system.

0 comments:

Post a Comment

 
^ Scroll to Top