PING (Packet InterNet Groper)
The ping command is a software tool used to test the network connectivity from one computer to another. If a computer cannot be contacted via the web (http), or via ftp, then the first tool to use to check what is wrong is generally ping.
The ping command works by sending an Internet Command Message Protocol (ICMP) packet named "ICMP_ECHO" from the local computer, to the remote computer specified, and waiting for a response called "ICMP_ECHOREPLY". Each ICMP packet is identified by a sequence number, and the time at which it was transmitted, with these identifiers being encoded in the packet.
With transmission time data being logged, it is then possible to calculate the response time (if the ICMP packet returns successfully). This is a valuable measure of how well the network is working.
>ping 192.168.1.0
Pinging 192.168.1.0 with 32 bytes of data:
Reply from 192.168.1.0: bytes=32 time<1ms TTL=64
Reply from 192.168.1.0: bytes=32 time<1ms TTL=64
Reply from 192.168.1.0: bytes=32 time<1ms TTL=64
Reply from 192.168.1.0: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.1.0:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
>
|
If the ping command fails, normally, it will return a message indicating 100% packet loss.
>ping 192.168.1.200
Pinging 192.168.1.200 with 32 bytes of data:
Request timed out
Request timed out
Request timed out
Request timed out
Ping statistics for 192.168.1.200:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
>
|
References
- TCP/IP Network Administration - Craig Hunt - O'Reilly & Associates, Inc - ISBN: 0-937175-82-X
- Getting Connected: the Internet at 56K and Up - Kevin Dowd - O'Reilly & Associates, Inc- ISBN: 1-56592-203-4
- Practical UNIX and Internet Security - Simson Garfinkel & Gene Spafford - O'Reilly & Associates, Inc - ISBN: 1-56592-148-8