Network Support | PING Command

You can use the PING utility to query another IP device on the network to determine if the IP device is “alive” and how long it takes a packet to reach the device. This utility is one of the first tools you should use if the problem appears to be caused by a lack of connectivity between IP devices. The PING utility uses Internet Control Message Protocol (ICMP) echo packets to perform tests on the network.


You use the following syntax to launch the PING utility:

PING [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list

The parameters are explained below:

  • -t: Use this parameter to ping the host continuously. To stop this test, press <Ctrl>C.
  • -a: Use this parameter to resolve addresses to host names.
  • -n: count Use this parameter to determine the number of echo requests to send.
  • -l: size Use this parameter to determine the ping packet size.
  • -f: Use this parameter to set the Don’t Fragment flag on the packet. This flag ensures that the packet is sent to the destination device in its entirety. If you set this flag, routers will be unable to fragment the packet to cross media that support smaller packet sizes. If a route includes such media, a router discards the packet and sends an ICMP destination unreachable packet to the sender.
  • -i: TTL Use this parameter to set the Time To Live (TTL) flag, which indicates the number of routers (hops) that a packet may cross. To limit the distance an ICMP echo packet can travel, you should define a small TTL value.
  • -v: TOS Use this parameter to set the Type Of Service (TOS) flag. If the network has been configured to support, you can force the PING utility to use a specific type of service for the connectivity test.
  • -r: count Use this parameter to record the number of hops to the destination IP device.
  • -s: count Use this parameter to timestamp the hops.
  • -j: host-list Use this parameter to test loose source route along host list. This test specifies certain devices a packet must cross to reach a destination. This test does not specify the exact route, which can include other devices.
  • -k: host-list Use this parameter to test strict source route along host-list. This test specifies all the devices a packet must cross to reach a destination. The packet cannot cross other devices.
  • -w: timeout Use this parameter to set the timeout in milliseconds. The timeout determines how long the IP device waits for a reply.



If a device is having problems communicating on the network, enter the following command at the DOS prompt: PING 127.0.0.1

The address 127.0.0.1 is the loopback address. If you enter this command, the device pings its own TCP/IP stack. if the device can’t see its own TCP/IP stack, the device can’t communicate on the network.
The Windows TCP/IP stack places an identifying pattern in each device’s ping packets. This identifying pattern, which is typically the alphabet, is located inside the ping packet padding area. You can use this identifying pattern to determine if a device is using the Windows TCP/IP stack.

You should not use the -t parameter unless you want to track and manually terminate the ping test. This parameter causes a continuous transmission of ping packets and may generate significant traffic on the network.

If you want to test the maximum packet size supported between two devices, use the -1 parameter (to define the maximum packet size) with the -f flag (to prevent the fragmentation of the packet). For example, if you wanted to know if you could send a 4 KB packet from a workstation to a NetWare 5 server in another building, you would enter the following command.

PING -f -l 4096 [destination]

You could then send the 4 KB packet to the server and find out if and where the packet would need to be fragmented.

2 comments

Post a Comment

http://www.basicnetworking.org/

Copyright © Basic Networking | Terms and Conditions | Privacy Policy