ping

This topic explains the command that tests connectivity to an IPv4 address, IPv6 address, or hostname.

Syntax

ping {a.b.c.d | hostname | x:x::x:x} [count number]

Parameter

a.b.c.d: Sets the IPv4 address to be pinged, which is represented by a.b.c.d.

hostname: Sets the host name, which is represented by hostname.

x:x::x:x: Sets the IPv6 address to be pinged, which is represented by x:x::x:x.

count <number>: As an option, specify how many times the ping must be sent. The number parameter represents the number of times, which can be from 1 to 999999999. If you do not use the count keyword and do not specify the number parameter, the ping is sent four times.

Default

No default value.

Mode

User EXEC, Privileged EXEC

Usage

Use this command to ping an IPv4 address, IPv6 address, or hostname.

Example: This example shows how to ping a host with IPv4 address 192.168.0.111:

PYTHON
Switch# ping 192.168.0.111
PING 192.168.0.111 (192.168.0.111): 56 data bytes
64 bytes from 192.168.0.111: icmp_seq=0 ttl=128 time=10.0 ms
64 bytes from 192.168.0.111: icmp_seq=1 ttl=128 time=0.0 ms
64 bytes from 192.168.0.111: icmp_seq=2 ttl=128 time=0.0 ms
64 bytes from 192.168.0.111: icmp_seq=3 ttl=128 time=0.0 ms

--- 192.168.0.111 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.0/2.5/10.0 ms