Ping an IP Device
About this task
Ping a device to test the connection between the switch and another network device. After you ping a device, the switch sends an Internet Control Message Protocol (ICMP) packet to the target device. If the device receives the packet, it sends a ping reply. After the switch receives the reply, a message displays that indicates traffic can reach the specified IP address. If the switch does not receive a reply, the message indicates the address does not respond.
-
Ping for VRF: 1480 bytes
-
Traceroute for VRF: 1444 bytes
Note
Exception: large packets for VRF routes are supported on the CLIP Segmented Management Instance.
You can specify a management instance ID to use the correct source for the outgoing ICMP ECHO request packet.
Procedure
Examples
Ping an IP device from a GRT VLAN IP interface:
Switch:1#ping 192.0.2.16 grt interface vlan 1 192.0.2.16 is alive
Ping a device using the management routing table:
Switch:1#ping 192.0.2.12 mgmt
Ping a device using a management CLIP:
Switch:1#ping 192.0.2.12 mgmt clip
Ping an IP device using a management VLAN:
Switch:1#ping 192.0.2.12 mgmt vlan
Variable Definitions
The following table defines parameters for the ping command.
Variable |
Value |
---|---|
count <1–9999> |
Specifies the number of times to ping. The default is 1. |
-d |
Configures the ping debug mode. This variable detects local software failures (ping related threads creation or write to sending socket) and receiving issues (icmp packet too short or wrong icmp packet type). This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter. |
datasize <28-9216|28-51200> |
Specifies the size of ping data sent in bytes. The datasize for IPv4 addresses is 28-9216. The datasize for IPv6 addresses is 28-51200. The default is 64. |
grt |
Specifies the ping in Global Routing Table context. |
-I <1–60> |
Specifies the interval between transmissions in seconds. |
interface gigabitEthernet {slot/port[sub-port]}| tunnel <1–2000> | vlan <1-4059> |
Specifies the outgoing interface. Additional ping interface parameters:
This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter. |
mgmt [clip | oob | vlan] Note:
Exception: oob not supported on 5320 Series. |
Specifies the Segmented Management Instance as the source for the outgoing ICMP ECHO packet. The packet goes out this specific interface only. If you do not specify the management interface type, the ping command uses the management routing table to determine the best management interface and selects the source IP based on the egress management interface. |
-s |
Configures the continuous ping at the interval rate defined by the [-I] parameter or until you enter a Ctrl + C keystroke. |
scopeid <1–9999> |
Specifies the circuit ID for IPv6. This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter. |
source WORD<1-256> |
Specifies the source IP address for the ping command. This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter. |
-t <1–120> |
Specifies the no-answer timeout value in seconds. The default is 5. |
WORD<0–256> |
Specifies the host name or IPv4 (a.b.c.d) or IPv6 (x:x:x:x:x:x:x:x) address. |
vrf WORD<1–16> |
Specifies the virtual router and forwarder (VRF) name. This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter. |