ping


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

NOTE:

When ping a link-local address, the outband VLAN interface must be specified together, otherwise it will result link unreachable.


Command Syntax

  •   From the ">" prompt, use the following format,

ping <ip-address> [interface <interface-name>] [packets <packets>] [vrf <mgmt-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>]

  •   From the "#" prompt, add run in front of the command,

run ping <ip-address> [interface <interface-name>] [packets <packets>] [vrf <mgmt-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

<ip-address>

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

interface <interface-name>Optional. Specifies the outgoing interface which can be the VLAN interface name, the loopback interface name, the routed interface or the sub-interface name.

packets<packets>

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

vrf <mgmt-vrf | vrf-name>

Optional. Specifies a VRF name. The value is a string that could be mgmt-vrf or a user-defined VRF name.

  •   mgmt-vrf: management VRF is specified.
  •   vrf-name: a user-defined VRF set by using command set ip vrf <vrf-name> [description <string>].

NOTE:

  •   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

  •   Check whether the host at 10.10.51.1 is reachable. 
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

Copyright © 2024 Pica8 Inc. All Rights Reserved.