ping

Sends ICMP echo requests to the specified IP or host.

Syntax

ping [ IPADDR | NAME ] [ count 1-1000 | datagram-size 18-9000 | quiet | timeout 1-60 ]

Parameters

IPADDR
Specifies the destination IPV4/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 ping frame. The range is 18-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, default is 5 seconds.

Modes

Exec mode

Usage Guidelines

This command is available only to users with admin role.

Table 1. Error messages
Error Reason
Broadcast address not allowed Address entered in multicast format; for example, 255.255.255.255
Host resolution failed Host address entered incorrectly or host does not exist.

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 255.255.255.255 
Error: Broadcast address not allowed 

device# ping abcd     
Error: Host resolution failed