To send ICMP echo request packets to another node on the network, use the ping Privileged EXEC mode command.
Syntax
ping ip {ipv4-address | hostname} [count packet_count]
ping ipv6 {ipv6-address | hostname} [count packet_count]
Parameters
ipv4-address—IPv4 address to ping.
ipv6-address—Unicast or multicast IPv6 address to ping.
hostname—Hostname to ping.
count packet_count—(Optional) Specifies the number of packets to send. The default is 4 packets. (Range: 1 to 65535)
Command Mode
Privileged EXEC mode
Examples
Example 1—The following example pings an IP address:
switchxxxxxx# ping ip 10.1.1.1
PING 10.1.1.1 (10.1.1.1): 56 data bytes
--- 10.1.1.1 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
Example 2—The following example pings a site:
switchxxxxxx# ping ip yahoo.com
Pinging yahoo.com [66.218.71.198] with 64 bytes of data:
64 bytes from 10.1.1.1: icmp_seq=0. time=11 ms
64 bytes from 10.1.1.1: icmp_seq=1. time=8 ms
64 bytes from 10.1.1.1: icmp_seq=2. time=8 ms
64 bytes from 10.1.1.1: icmp_seq=3. time=7 ms
----10.1.1.1 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms) min/avg/max = 7/8/11
Example 3—The following example pings an IPv6 address:
switchxxxxxx# ping ipv6 3003::11
Pinging 3003::11 with 64 bytes of data:
64 bytes from 3003::11: icmp_seq=1. time=0 ms
64 bytes from 3003::11: icmp_seq=2. time=50 ms
64 bytes from 3003::11: icmp_seq=3. time=0 ms
64 bytes from 3003::11: icmp_seq=4. time=0 ms
----3003::11 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/12/50