ping

This command sends (pings) ICMP echo request messages to a remote destination (IP address or FQDN) to check connectivity. Pings have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of "pad" bytes used to fill out the packet. Ping works with both IPv4 and IPv6.

Syntax

ping {<IPv4 Address>|ipv6 <IPv6 Address>|<Hostname>} [source voip interface {vlan <VLAN ID>|name <Interface Name>}] [repeat <Echo Requests>] [size <Payload Size>] [tos|traffic-class <0-254>] 

Command

Description

<IPv4 Address>

Configures an IPv4 IP address in dotted-decimal notation.

ipv6 <IPv6 Address>

Configures an IPv6 address as X:X::X:X.

<Hostname>

Configures a hostname or FQDN (.g., abc.com).

source voip interface

(Optional) Defines the interface from where you want to ping. This can be one of the following:

vlan (configures the VLAN ID)
name (configures the IP network interface name)

repeat

(Optional) Defines the number (1-300) of echo requests.

size

(Optional) Defines the payload size (0-max packet size).  

tos|traffic-class

(Optional) Defines the QoS of the ping packets by setting a value (0-254) in the IPv4 (tos) or IPv6 (traffic-class) header.

Command Mode

Basic and Privileged User

Note

To terminate the ping, use the key combination Ctrl+C.

Example

Sending 3 ICMP packets with 555 bytes payload size to 10.4.0.1 via interface VLAN 1:
ping 10.4.0.1 source voip interface vlan 1 repeat 3 size 555
PING 10.4.0.1 (10.4.0.1): 555 data bytes
563 bytes from 10.4.0.1: icmp_seq=0 ttl=255 time=1.3 ms
563 bytes from 10.4.0.1: icmp_seq=1 ttl=255 time=1.1 ms
563 bytes from 10.4.0.1: icmp_seq=2 ttl=255 time=1.2 ms
--- 10.4.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0 packet loss
round-trip min/avg/max = 1.1/1.2/1.3 ms
Pinging an FQDN:
ping corp.abc.com source voip interface vlan 1
Pinging an IPv6 destination address with QoS definition:
ping ipv6 2001:15::300 traffic-class 100