ping

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.

Syntax

ping [-s bytes] [-c count] [-n] [-p pattern] [-t milliseconds] [-I interface] [-S ip-address] [-Q service-type] [-r] [-i milliseconds] [-v {4 | 6}] [-V router] host

Parameters

-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.

Defaults

  • If -s is not specified, the number of data bytes sent is 56.
  • If -c is not specified, the number of ping packets is 4.
  • If -I is not specified, the route table chooses the source IP interface.
  • If -n is not specified, communication with name servers is not avoided.
  • If -p is not specified, no hexadecimal pattern is used to fill the outgoing packet.
  • If -t is not specified, the maximum number of hops for the ping is 64.
  • If -S is not specified the source IP address is the address belonging to the management interface.
  • If -Q is not specified, the type of service or traffic class is 0.
  • If -r is not specified, the routing tables are not bypassed when forwarding to a host on an attached network.
  • If -S is not specified, the route table chooses the source IP address.
  • If -i is not specified, the ping timeout and time between pings is 1 second.
  • If -v is not specified, the IP version is auto-detected (not configurable).
  • If -V is not specified, the virtual router to forward the ICMP echo-reply to is 0 (default router).

Mode

All command modes.

Example

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)->