Use this command to determine the availability of another node on the network by sending the node an ICMP echo-request packet and receiving an ICMP echo-reply back.
-s bytes | (Optional) Specifies the number of data bytes to be sent. The default value is 56, which translates into 64 ICMP/ICMP6 data bytes when combined with the 8 bytes of ICMP/ICMP6 header data. The maximum data size for IPv4 is 65507 bytes. The maximum data size for IPv6 is 65487 bytes. |
-c count | (Optional) Number of ping packets. The default value is 4. |
-n | (Optional) Avoids any communications with nameservers. An IP address has to be supplied as a hostname if this option is used. |
-p pattern | (Optional) Specify up to a 16 bit hexadecimal pattern to fill outgoing packet with (ex. -p ff). |
-t hops | (Optional) Specifies the maximum number of hops for the ping. Time To Live (TTL) for IPv4; Hop Limit (HL) for IPv6. The default value for both Time TTL and HL is 64. |
-I interface | (Optional) Source IP Interface. Valid values are IP interfaces, for example vlan.0.5 for VLAN 5. |
-S ip-address | (Optional) Source IP address. |
-Q service-type | (Optional) Specifies the Type of Service in the IPv4 header or the traffic class in the IPv6 header. Valid Range: 0 - 255. The default value is 0. |
-r | (Optional) Bypass the normal routing tables and send directly to a host on an attached network. |
-i | (Optional) Specifies the time in milliseconds to wait for ping timeouts and between sending ping packets. The default value is 1 second. |
-v | (Optional) Forces ping to a specific ip version. Valid Values: 4: Use IPv4 ping, 6: Use IPv6 ping. The default value is auto-detect. Auto-detect is not configurable. |
-V router | (Optional) Specify a virtual router name for this ping. The default value is 0 (default router). |
host | Specifies the IP address or a hostname of the receiving device. |
All command modes.
This example shows how to ping IP address 127.0.0.1 with 10 packets:
System(rw)->ping -c 10 127.0.0.1 PING 127.0.0.1 (localhost) 64 bytes of data. 64 bytes from 127.0.0.1 (localhost): icmp_seq=0 ttl=64 time=1.58 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=1 ttl=64 time=1.52 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=2 ttl=64 time=1.57 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=3 ttl=64 time=2.26 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=4 ttl=64 time=1.42 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=5 ttl=64 time=2.44 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=6 ttl=64 time=1.61 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=7 ttl=64 time=1.40 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=8 ttl=64 time=2.32 ms 64 bytes from 127.0.0.1 (localhost): icmp_seq=9 ttl=64 time=1.54 ms --- 127.0.0.1 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 8997 ms rtt min/avg/max = 1/1/2 ms System(rw)->