Reachability Commands
Use the ping and traceroute commands to determine reachability of destinations in the network.
- Use the ping command to send an ICMP or ICMPv6 echo request packet. In the following example, the request packet is sent to IP address 192.35.42.1, with a packet count of 10 and a timeout value of 10 seconds:
host1#ping 192.35.42.1 10 timeout 10Use the traceroute command to discover routes that router packets follow when traveling to their destination. In the following example, the trace destination IP address is 192.56.20.1, the maximum number of hops of the trace is 20, and the timeout value is 10 seconds: host1#traceroute 192.56.20.1 20 timeout 10ping
- Use to send an ICMP or ICMPv6 echo request packet to the IP address that you specify.
- You can specify a VRF context.
- Use the source interface keywords to specify a source interface other than the one from which the probe originates.
- Use the source address keywords to specify a source IP address other than the one from which the probe originates.
- You can specify the following options:
- packetCountNumber of packets to send to the destination IP address. If you specify a zero (0), echo requests packets are sent indefinitely.
- data-patternSets the type of bits contained in the packet to all ones, all zeros, a random mixture of ones and zeros, or a specific hexadecimal data pattern that can range from 0x00xFFFFFFFF. The default is all zeros.
- data-sizeSets the number of bytes comprising the IP packet and reflected in the IP header in the range 064000; the default is 100 bytes.
- extended header attributesSet the following:
- A value to be set in the type of service (ToS) byte, in the range 0255, to support quality of service (QoS) offerings
- Don't-fragment bit to prevent IP from fragmenting the packet if it is too long for the MTU of a given link; if the nonfragmented packet cannot be delivered, it is discarded.
- Strict-source or loose-source routing, including the IP address of the hops the packets must traverse. For loose-source-route, you specify some or all of the hops, but they do not have to be adjacent. For strict-source-route, you must specify every adjacent hop through which the packet must traverse.
- The IP addresses to be recorded for a specified number of routers that the packets traverse.
- The time that a packet traverses a router to be recorded for a specified number of routers.
- An interface type and specifier of a destination address on the router that is configured for external loopback; the command succeeds only if the specified interface is configured for external loopback.
- The traffic class value to match in the Traffic Class field of each packet (IPv6 only)
- The flow label value to match in the Flow Label field of each packet (IPv6 only)
- sweep-intervalSpecifies the change in the size of subsequent ping packets while sweeping across a range of sizes. For example, you can configure the sweep interval to sweep across the range of packets from 100 bytes to 1000 bytes in increments equal to the sweep interval. By default the router increments packets by one byte; for example, it sends 100, 101, 102, 103, ... 1000. If the sweep interval is 5, the router sends 100, 105, 110, 115, ... 1000.
- sweep-sizesEnables you to vary the sizes of the echo packets being sent. This capability is useful for determining the minimum sizes of the MTUs configured on the nodes along the path to the destination address. Determining the minimum size reduces packet fragmentation, which contributes to performance problems. The default is not to sweep (all packets are the same size).
- timeoutSets the number of seconds to wait for an ICMP echo reply packet before the connection attempt times out.
- ttlSets the time-to-live hop count in the range 1255; the default is 32.
- !Reply received
- .Timed out while waiting for a reply
- ?Unknown packet type
- AAddress mask request message
- aAddress mask reply message
- DRouter discovery advertisement message
- dRouter discovery request message
- HHost unreachable
- IInformation request message
- iInformation reply message
- LTTL expired message
- MCould not fragment, DF bit set
- mParameter problem message
- NNetwork unreachable
- PProtocol unreachable
- QSource quench
- rRedirect message
- TTimestamp request message
- t Timestamp reply message
- UDestination unreachable
host1(config)#interface serial 5/2:1/1host1(config-if)#ip address 172.16.1.1 255.255.255.0host1(config-if)#exithost1#ping 172.16.1.1 extended interface serial 5/2:1/1There is no no version. traceroute
- Use to discover the routes that router packets follow when traveling to their destination.
- You can specify:
- A VRF context
- Destination IP or IPv6 address
- Source interface for each of the transmitted packets
- Source address for each of the transmitted packets
- Maximum number of hops of the trace and a timeout value
- Size of the IP packets (not the ICMP payload) in the range 064000 bytes sent with the traceroute command. Including a size might help locate any MTU problems that exist between your router and a particular device.
- Extended IP header attributes, including the ToS byte (IP only), whether to set the DF bit for the transmitted packets (IP only), the traffic class (IPv6 only), and flow label (IPv6 only).
- You can also force transmission of the packets on a specified interface regardless of what the IP address lookup indicates.
- Example
host1#traceroute 172.20.13.1 20 timeout 10There is no no version.