ping

Verifies network connectivity between a source and a destination on a TCP/IP network.

Syntax

ping dest-ipv4-addr [ ipv6 dest-ipv6-addr ] [ host-name ] [ count [ number ] [ interface { Ethernetslot/port| management | ve vlan_id } ] ] [ timeout seconds ] [ datagram-size bytes ] [ quiet ] [ numeric ] [ vrf { mgmt-vrf | default-vrf |vrf-name } }

Command Default

The default for count is 5. The default for timeout is 1. The default for datagram-size is 56.

Parameters

dest-ipv4-addr
Specifies the IPv4 address of the destination device.
ipv6 dest-ipv6-addr
Specifies the IPv6 address of the destination device.
host-name
Specifies the destination host name. The default value is 1.
count number
Specifies the number of transmissions (pings). The range is from 1 through 7200.
interface Ethernet
Represents a valid, physical Ethernet interface.
slot
Specifies a valid slot number.
port
Specifies a valid port number.
interface management
Specifies the management interface.
interface ve vlan_id
Specifies the interface is a virtual Ethernet, and specifies the VLAN ID of the interface.
timeout seconds
Specifies the time (in seconds) to wait for a response. The range is from 1 through 60. The default value is 1.
Note

Note

This option applies only to IPv4.
datagram-size bytes
Specifies the datagram size (also known as the maximum transmission unit, or MTU) in bytes. The range is from 36 through 9100. The default value is 56.
quiet
Prints only the first and last line of the command output.
numeric
Does not look up host names.
vrf
Pings the specified VRF instance.
mgmt-vrf
Specifies the management VRF.
default-vrf
Specifies the default-vrf.
vrf-name
Specifies a VRF name.

Modes

Privileged EXEC mode

Usage Guidelines

This command sends a specified number of pings with configured parameters to the specified destination device.

Examples

This example pings an IPv4 destination address.

device# ping 172.16.4.80
Type Control-c to abort
PING 172.16.4.80 (172.16.4.80): 56 data bytes
64 bytes from 172.16.4.80: icmp_seq=0 ttl=120 time=101.466 ms
64 bytes from 172.16.4.80: icmp_seq=1 ttl=120 time=122.914 ms
64 bytes from 172.16.4.80: icmp_seq=2 ttl=120 time=145.637 ms
64 bytes from 172.16.4.80: icmp_seq=3 ttl=120 time=170.032 ms
64 bytes from 172.16.4.80: icmp_seq=4 ttl=120 time=103.036 ms
--- 172.16.4.80 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 101.466/128.617/170.032/26.188 ms

This example pings an IPv4 destination address in quiet mode.

device# ping 172.16.4.80 quiet
Type Control-c to abort
PING 172.16.4.80 (172.16.4.80): 56 data bytes
--- 172.16.4.80 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 100.605/146.372/192.552/32.505 ms

This example pings an IPv6 destination address in numeric mode with a datagram size.

device# ping ipv6 fec0:60:69bc:92:218:8bff:fe40:1470 count 3 datagram-size 48
numeric timeout 3
Type Control-c to abort
PING fec0:60:69bc:92:218:8bff:fe40:1470 (fec0:60:69bc:92:218:8bff:fe40:1470): 48
data bytes
56 bytes from fec0:60:69bc:92:218:8bff:fe40:1470: icmp_seq=0 ttl=64 time=6.356 ms
56 bytes from fec0:60:69bc:92:218:8bff:fe40:1470: icmp_seq=1 ttl=64 time=0.170 ms
56 bytes from fec0:60:69bc:92:218:8bff:fe40:1470: icmp_seq=2 ttl=64 time=0.171 ms
--- fec0:60:69bc:92:218:8bff:fe40:1470 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.170/2.232/6.356/2.916 ms