ping

Sends ICMP echo requests to the specified IP or host.

Syntax

ping [ [ A.B.C.D | NAME ] | [ ipv6 [ IPADDR | NAME ] ] [ count 1-1000 | datagram-size 64-9000 | quiet | timeout 1-60 ]

Parameters

A.B.C.D
Specifies the destination IPv4 address.
IPADDR
Specifies the destination IPv6 address.
NAME
Specifies the destination host name.
count 1-1000
Specifies the number of attempts to ping the host. The range is 1-1000, default is 5.
datagram-size 18-9000
Specifies the size of the ping frame. The range is 64-9000, default is 64 bytes.
quiet
Specifies that there is no output except the start-up and finishing line.
timeout
Specifies the timeout value in seconds. The range is 1-60. The default is 5 seconds.

Modes

Exec mode

Usage Guidelines

This command is available only to users with the admin role.

This command is also supported on gNOI.

Examples

The following example shows how to use the ping command.

device# ping 10.20.73.129 count 3 datagram-size 1000 timeout 2 

PING 10.20.73.129 (10.20.73.129) 1000(1028) bytes of data. 
1008 bytes from 10.20.73.129: icmp_seq=1 ttl=63 time=1.91 ms 
1008 bytes from 10.20.73.129: icmp_seq=2 ttl=63 time=0.684 ms 
1008 bytes from 10.20.73.129: icmp_seq=3 ttl=63 time=0.592 ms 

 --- 10.20.73.129 ping statistics --- 
3 packets transmitted, 3 received, 0% packet loss, time 2013ms 
rtt min/avg/max/mdev = 0.592/1.064/1.916/0.603 ms 

device# ping www.google.com                                    
PING www.google.com (172.217.165.132) 64(92) bytes of data. 
72 bytes from 172.217.165.132 (172.217.165.132): icmp_seq=1 ttl=107 time=66.4 ms 
72 bytes from 172.217.165.132 (172.217.165.132): icmp_seq=2 ttl=107 time=66.4 ms 
72 bytes from 172.217.165.132 (172.217.165.132): icmp_seq=3 ttl=107 time=66.4 ms 
72 bytes from 172.217.165.132 (172.217.165.132): icmp_seq=4 ttl=107 time=66.4 ms 
72 bytes from 172.217.165.132 (172.217.165.132): icmp_seq=5 ttl=107 time=66.5 ms 

--- www.google.com ping statistics --- 
5 packets transmitted, 5 received, 0% packet loss, time 4005ms 
rtt min/avg/max/mdev = 66.469/66.488/66.502/0.010 ms 

device# ping -6 www.google.com                                    
PING www.google.com(sfo03s01-in-x04.1e100.net) 56 data bytes 
64 bytes from sfo03s01-in-x04.1e100.net: icmp_seq=1 ttl=121 time=1.44 ms 
64 bytes from sfo03s01-in-x04.1e100.net: icmp_seq=2 ttl=121 time=1.51 ms 
64 bytes from sfo03s01-in-x04.1e100.net: icmp_seq=3 ttl=121 time=1.52 ms 
64 bytes from sfo03s01-in-x04.1e100.net: icmp_seq=4 ttl=121 time=1.54 ms 
64 bytes from sfo03s01-in-x04.1e100.net: icmp_seq=5 ttl=121 time=1.51 ms 

--- www.google.com ping statistics --- 
5 packets transmitted, 5 received, 0% packet loss, time 4005ms 
rtt min/avg/max/mdev = 1.446/1.510/1.545/0.041 ms