Testing the path between the switch and another device on an IP network

The ping test uses ICMP echo requests and ICMP echo replies to determine if another device is alive. It also measures the amount of time it takes to receive a reply from the specified destination. The ping command has several extended commands that allow advanced checking of destination availability.

Syntax:


ping {<ip-address | hostname>} [repetitions <1-10000>] [timeout <1-60>] [source < {ip-address | <vlan-id> | loopback <0-7>>}] [data-size <0-65471>] [data-fill <0-1024>] [ip-option {<record-route | loose-source-route | strict-source-route | include-timestamp | include-timestamp-and-address | include timestamp-from} >] [tos <0-255>]

ping6 {<ipv6-address | hostname>} [repetitions <1-10000>] [timeout <1-60>] [source < {ip-address | vlan-id | loopback <0-7>>}] [data-size <0-65471>] [data-fill <0-1024>]

Sends ICMP echo requests to determine if another device is alive.

{< ip-address | hostname >}

Target IP address or hostname of the destination node being pinged

repetitions <1-10000>

Number of ping packets sent to the destination address.

Default: 1

timeout <1-60>

Timeout interval in seconds; the ECHO REPLY must be received before this time interval expires for the ping to be successful.

Default: 5

source {< ip-addr | vid | loopback <0-7>>}

Source IP address, VLAN ID, or loopback address used for the ping.

The source IP address must be owned by the router.If a VLAN is specified, the IP address associated with the specified VLAN is used.

data-size <0-65471>

Size of packet sent.

Default: 0 (zero)

data-fill <0-1024>

The data pattern in the packet.

Default: Zero length string

ip-option

Specify an IP option, such as loose or strict source routing, or an include-timestamp option:include-timestamp: Adds the timestamp option to the IP header. The timestamp displays the amount of travel time to and from a host.

Default: 9include-timestamp-and-address: Records the intermediate router's timestamp and IP address.

Default: 4include-timestamp-from: Records the timestamp of the specified router addresses.loose-source-route <IP-addr> : The loose-source-route option prompts for the IP address of each source IP on the path. It allows you to specify the IP addresses that you want the ping packet to go through; the packet may go through other IP addresses as well.record-route <1-9> : Displays the IP addresses of the interfaces that the ping packet goes through on its way to the destination and on the way back.

When specified without loose or strict recording, the source route is not recorded. The source route is automatically recorded when loose or strict source routing is enabled.

Default: 9strict-source-route <IP-addr> : Restricts the ping packet to only those IP addresses that have been specified and no other addresses.

tos <0-255>

Specifies the type of service to be entered in the header packet.

Default: 0 (zero)

Ping tests

switch# ping 10.10.10.10
10.10.10.10 is alive, time = 15 ms

switch# ping 10.10.10.10 repetitions 3
10.10.10.10 is alive, iteration 1, time = 15 ms
10.10.10.10 is alive, iteration 1, time = 15 ms
10.10.10.10 is alive, iteration 1, time = 15 ms

switch# ping 10.10.10.10 timeout 2
10.10.10.10 is alive, time = 10 ms

switch# ping 10.11.12.13
The destination address is unreachable.