15.1. Network Diagnosis Commands

15.1.1. ping

Command Purpose

The switch supports IP ping, which you can use to test connectivity to remote hosts. Ping sends an echo request packet to an address and waits for a reply. Ping returns one of these responses:

Normal response- The normal response (hostname is alive) occurs in 1 to 10 seconds, depending on network traffic.

Destination does not respond- If the host does not respond, a no-answer message is returned.

Unknown host- If the host does not exist, an unknown host message is returned.

Destination unreachable- If the default gateway cannot reach the specified network, a destination-unreachable message is returned.

Network or host unreachable- If there is no entry in the route table for the host or network, a network or host unreachable message is return.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ping ( ip | mgmt-if ) WORD

ping ( vrf WORD | ) [ -a WORD | -si IFNAME | -m INTERVAL | -c COUNT | -s DATASIZE | -f | -tos TOS | -h TTL | -t TIMEOUT ] WORD

ping ( mgmt-if | vrf WORD | ) ipv6 [ -a WORD | -m INTERVAL | -c COUNT | -s DATASIZE | -tc TC | -h HL | -t TIMEOUT ] WORD ( interface IFNAME | )

Parameter

Parameter Description

Parameter Value

-a WORD

Select source IP address, the default is the IP address of the output interface

-

-si IFNAME

Set the specified interface as the source interface of ping packet

Support physical/aggregation/loopback/tunnel/vlan ports

ip

Public network IPv4 echo

-

vrf WORD

VPN Routing/Forwarding instance

Up to 15 characters

mgmt-if

Management interface

-

WORD

Ping destination IPv4 or IPv6 address or hostname

-

ipv6

Public network IPv6 echo

-

interface

Outgoing interface for LinkLocal address/host

-

IFNAME

Interface`s name

Support physical/aggregation/loopback/tunnel/vlan ports

-m INTERVAL

specify interval for sending ping packets

10-10000 millisecond

-c COUNT

specify the number of ping packets

1-4294967295

-s DATASIZE

specify the data size of ping packet

20-9600 bytes

-f

specify the Don`t Fragment flag in packet

-

-tos TOS

Specify the packet tos value

0-255

-h TTL

specify the TTL value in ping packet

1-255

-tc TC

specify the Traffic Class value in ipv6 ping packet

0-255

-h HL

specify the Hop Limit value in ipv6 ping packet

1-255

-t TIMEOUT

specify the timeout value to wait for replay packet

0-100 second,0 stands for continuous waiting

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

This example shows how to ping a host from management interface:

Switch# ping mgmt-if 10.10.29.247

PING 10.10.29.247 (10.10.29.247) 56(84) bytes of data.
64 bytes from 10.10.29.247: icmp_seq=1 ttl=64 time=0.194 ms
64 bytes from 10.10.29.247: icmp_seq=2 ttl=64 time=0.131 ms
64 bytes from 10.10.29.247: icmp_seq=3 ttl=64 time=0.134 ms
64 bytes from 10.10.29.247: icmp_seq=4 ttl=64 time=0.121 ms
64 bytes from 10.10.29.247: icmp_seq=5 ttl=64 time=0.135 ms
--- 10.10.29.247 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3996ms
rtt min/avg/max/mdev = 0.121/0.143/0.194/0.025 ms

15.1.2. traceroute

Command Purpose

You can use IP traceroute to identify the path that packets take through the network on a hop-by-hop basis. The command output displays all network layer (Layer 3) devices, such as routers, that the traffic passes through on the way to the destination.

Your switches can participate as the source or destination of the traceroute privileged EXEC command and might or might not appear as a hop in the traceroute command output. If the switch is the destination of the traceroute, it is displayed as the final destination in the traceroute output. Intermediate switches do not show up in the traceroute output if they are only bridging the packet from one port to another within the same VLAN. However, if the intermediate switch is a multilayer switch that is routing a particular packet, this switch shows up as a hop in the traceroute output.

The traceroute privileged EXEC command uses the Time To Live (TTL) field in the IP header to cause routers and servers to generate specific return messages. Traceroute starts by sending a User Datagram Protocol (UDP) datagram to the destination host with the TTL field set to 1. If a router finds a TTL value of 1 or 0, it drops the datagram and sends back an Internet Control Message Protocol (ICMP) time-to-live-exceeded message to the sender. Traceroute determines the address of the first hop by examining the source address field of the ICMP time-to-live-exceeded message.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

traceroute ( ip | vrf WORD | mgmt-if | ) WORD

traceroute ( vrf WORD | ) ipv6 WORD

Parameter

Parameter Description

Parameter Value

-a

Select source IP address, the default is the IP address of the output interface

-

-si

Set the specified interface as the source interface of traceroute packet

-

ip

Public network IPv4 echo

-

ipv6

Public network IPv6 echo

-

vrf WORD

VPN Routing/Forwarding instance

-

mgmt-if

Management interface

-

WORD

Destination IP address or hostname

-

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following example is sample dialog from the traceroute command using default values:

Switch# traceroute 1.1.1.2

traceroute to 1.1.1.2 (1.1.1.2), 30 hops max, 38 byte packets
 1  1.1.1.2 (1.1.1.2)  108.129 ms  99.313 ms  94.720 ms

Related Commands

ping