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>} [ethernet mpid] [source data {interface|source-address|vrf}] [repeat <Echo Requests>] [size <Payload Size>] [summarized]
|
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). |
|||||||||||||||||||||||||||||||||||||||
|
ethernet mpid <Endpoint ID> domain <CFM Domain Name> |
Configures a Layer-2 ping - Ethernet Connectivity Fault Management (CFM) per IEEE 802.1ag. This is a loopback message. |
|||||||||||||||||||||||||||||||||||||||
|
source voip interface |
(Optional) Defines the interface from where you want to ping. This can be one of the following:
|
|||||||||||||||||||||||||||||||||||||||
|
repeat |
(Optional) Defines the number (1-300) of echo requests. |
|||||||||||||||||||||||||||||||||||||||
|
size |
(Optional) Defines the payload size (0-max packet size). |
|||||||||||||||||||||||||||||||||||||||
|
source data interface |
(Optional) Specifies the interface from where you want to send the ping packet. The source IP address is selected automatically.
|
|||||||||||||||||||||||||||||||||||||||
|
source data source-address |
(Optional) Specifies the source interface (IP address of the interface) from where you want to send the ping packet.
|
|||||||||||||||||||||||||||||||||||||||
|
source data vrf |
(Optional) Specifies the VRF name from where you want to send the ping packet. |
|||||||||||||||||||||||||||||||||||||||
|
summarized |
Displays a summary of the ping results. |
Command Mode
Basic and Privileged User
Note
To terminate the ping, use the key combination Ctrl+C.
Example
| ■ | Pinging an FQDN: |
ping corp.abc.com source voip interface vlan 1
| ■ | Sending 3 ICMP packets with 555 bytes payload size to 10.4.0.1 via interface VLAN 1: |
ping 10.4.0.1 source data 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 IPv6 destination address: |
ping ipv6 2001:15::300