The ping command is a method for troubleshooting the accessibility of devices and outputs the statistics results.


Command Syntax

ping <ip-address> [<packets>] [vrf <vrf-name>] [source <source-ip-address>] [deadline <deadline-time>] [ttl <ttl-value>] [interval <interval-value>] [pattern <pattern-value>] [size <size-value>] [tos <tos-value>]

run ping <ip-address> [<packets>] [vrf <vrf-name>] [source <source-ip-address>] [deadline <deadline-time>] [ttl <ttl-value>] [interval <interval-value>] [pattern <pattern-value>] [size <size-value>] [tos <tos-value>]


Parameter

Parameter

Description

<ipv4-address>

Specifies the domain name or IPv4 address of the destination host.

<packets>

Optional. Specifies the number of ICMP Echo Request packets sent.

vrf <vrf-name>

Optional. Specifies a VRF name. The value is a string.

  •   When a VRF name is specified, find the next hop routing information from the specified VRF domain.
  •   When no VRF is specified, find the next hop routing information from the default VRF.

source <source-ip-address>

Optional. Specifies the source IP address of the ICMP Echo Request message. If the source IP address is not specified, the IP address of the outbound interface is used as the source IP address of the ICMP Echo Request message.

deadline <deadline-time>

Optional. Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline to expire or until count probes are answered or for some error notification from network.

ttl <ttl-value>

Optional. Specifies the TTL value.

If the TTL field is reduced to 0 during message forwarding, the Layer 3 device that the message reaches sends an ICMP timeout message to the source host, indicating that the destination host is unreachable.

The value is an integer that ranges from 1 to 255.

interval <interval-value>

Optional. Specify the interval for sending ICMP Echo Request message. The value is an integer in second.

pattern <pattern-value>

Optional. Specifies pad characters for ICMP Echo Request messages.

By configuring pad characters for ICMP Echo Request messages, you can identify a specific message among the large number of received ICMP Echo Reply messages.

The value is a hexadecimal integer.

size <size-value>

Optional. Specifies the maximum payload length of an ICMP Echo Request message. The value is an integer.

tos <tos-value>

Optional. Specifies the ToS value of the sent ICMP Echo Request messages. The ToS value is used to set the packet priority.

The value is an integer that ranges from 0 to 254.

Example

admin@Xorplus> ping 10.10.51.1
PING 10.10.51.1 (10.10.51.1) 56(84) bytes of data.
64 bytes from 10.10.51.1: icmp_seq=1 ttl=64 time=1.94 ms
64 bytes from 10.10.51.1: icmp_seq=2 ttl=64 time=2.03 ms
64 bytes from 10.10.51.1: icmp_seq=3 ttl=64 time=2.00 ms
64 bytes from 10.10.51.1: icmp_seq=4 ttl=64 time=146 ms
64 bytes from 10.10.51.1: icmp_seq=5 ttl=64 time=2.01 ms
 

--- 10.10.51.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
rtt min/avg/max/mdev = 1.943/30.832/146.173/57.670 ms