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 and traceroute can fail for VRF routes if you use large packet sizes for the operation. Do not use packet sizes larger than the following:
  • Ping for VRF: 1480 bytes

  • Traceroute for VRF: 1444 bytes

Note

Note

Exception: large packets for VRF routes are supported on the CLIP Segmented Management Instance.

A management instance ID can be specified to enable the system to use the correct source for the outgoing ICMP ECHO request packet.

Procedure

  1. To enter User EXEC mode, log on to the switch.
  2. Ping an IP network connection:

    ping WORD<0–256> [-d] [-I <1–60>] [-s] [-t <1–120>] [count <1–9999>] [datasize <28-9216|28-51200>] [grt] [interface gigabitEthernet {slot/port[sub-port]}|mgmtEthernet mgmt | tunnel <1–2000> | vlan <1-4059>] [scopeid <1–9999>] [source WORD<1-256>] [vrf WORD<1–16>]

    Note

    Note

    The mgmtEthernet mgmt parameter is only supported on VSP 8600 Series.

    Note

    Note

    The grt parameter is not supported on VSP 8600 Series.

  3. Ping an IP network connection using a Global Routing Table (GRT):

    ping WORD<0–256> [-d] [-I <1–60>] [-s] [-t <1–120>] [count <1–9999>] [datasize <28-9216|28-51200>] grt [interface gigabitEthernet {slot/port[sub-port]}| tunnel <1–2000> | vlan <1-4059>][source WORD<1-246>]

  4. Ping a network connection using a Segmented Management Instance:

    ping WORD<0–256> [-s] [-t <1–120>] [count <1–9999>] [datasize <28-9216|28-51200>] mgmt [clip | oob | vlan]

    Note

    Note

    If you do not use the mgmt parameter, the ping command uses the VOSS IP routing stack to initiate the ping request.

    Note

    Note

    If you ping a device using a management CLIP, the ping source IP address is configured as the management CLIP IP address. If you ping a device using a management VLAN, the ping source IP address is configured as the management VLAN IP address.

Example

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]}|mgmtEthernet mgmt| tunnel <1–2000> | vlan <1-4059>

Specifies the outgoing interface.

Additional ping interface parameters:

  • gigabitEthernet {slot/port[sub-port]}: gigabitethernet port

  • mgmtEthernet mgmt: identifies the physical management port

    Note:

    mgmtEthernet is only supported on VSP 8600 Series.

  • tunnel: tunnel ID as a value from 1 to 2000

  • vlan:

    Specifies the VLAN ID in the range of 1 to 4059. By default, VLAN IDs 1 to 4059 are configurable and the system reserves VLAN IDs 4060 to 4094 for internal use. On switches that support the vrf-scaling and spbm-config-mode boot configuration flags, if you enable these flags, the system also reserves VLAN IDs 3500 to 3998. VLAN ID 1 is the default VLAN and you cannot create or delete VLAN ID 1.

This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter.

mgmt [clip | oob | vlan]

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.

Note:

The vlan and oob parameters are not supported on VSP 8600 Series. For more information about feature support, see VOSS Feature Support Matrix.

-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.