Using the Extended ping and Extended traceroute Commands

Cisco - Using the Extended ping and Extended traceroute Commands

Using the Extended ping and Extended traceroute Commands

TAC Notice: What's Changing on TAC Web

Contents

Introduction Prerequisites Requirements Components Used Conventions The ping Command The Extended ping Command ping Command Field Descriptions The traceroute Command The Extended traceroute Command traceroute Command Field Descriptions Cisco Support Community - Featured Conversations Related Information

Help us help you.

Please rate this document.

Excellent Good Average Fair Poor

This document solved my problem.

Introduction

This document illustrates how to use the extended ping and extended traceroute commands. Standard ping and traceroute commands are covered extensively in these documents:

Understanding the ping and traceroute Commands Using the traceroute Command on Operating Systems

Prerequisites

Requirements

This document requires an understanding of the ping and traceroute commands which are described in detail in the links given in the Introduction section of this document.

Components Used

The information in this document is based on these software and hardware versions: Cisco IOS? Software Release 12.2(10b) All Cisco series routers

Yes No Just browsing

Suggestions for improvement:

(256 character limit)

Send

[3/16/2010 8:51:55 AM]

Cisco - Using the Extended ping and Extended traceroute Commands

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

The ping Command

The ping (Packet InterNet Groper) command is a very common method for troubleshooting the accessibility of devices. It uses two Internet Control Message Protocol (ICMP) query messages, ICMP echo requests, and ICMP echo replies to determine whether a remote host is active. The ping command also measures the amount of time it takes to receive the echo reply.

The ping command first sends an echo request packet to an address, and then it waits for a reply. The ping is successful only if the ECHO REQUEST gets to the destination, and the destination is able to get an ECHO REPLY back to the source of the ping within a predefined time interval.

The Extended ping Command

When a normal ping command is sent from a router, the source address of the ping is the IP address of the interface that the packet uses to exit the router. If an extended ping command is used, the source IP address can be changed to any IP address on the router. The extended ping is used to perform a more advanced check of host reachability and network connectivity. The extended ping command works only at the privileged EXEC command line. The normal ping works both in the user EXEC mode and the privileged EXEC mode. In order to use this feature, enter ping at the command line and press Return. You are prompted for the fields as given in the ping Command Field Descriptions section of this document.

ping Command Field Descriptions

This table lists the ping command field descriptions. These fields can be modified with the use of the extended ping command.

Field

Description

Prompts for a supported protocol. Enter appletalk, Protocol [ip]: clns, ip, novell, apollo, vines, decnet, or xns. The

default is ip.

Target IP address:

Prompts for the IP address or host name of the destination node you plan to ping. If you have specified a supported protocol other than IP, enter an appropriate address for that protocol here. The default is none.

Repeat count Number of ping packets that are sent to the

[3/16/2010 8:51:55 AM]

Cisco - Using the Extended ping and Extended traceroute Commands

[5]:

destination address. The default is 5.

Datagram size Size of the ping packet (in bytes). Default: 100

[100]:

bytes.

Timeout in seconds [2]:

Timeout interval. Default: 2 (seconds). The ping is declared successful only if the ECHO REPLY packet is received before this time interval.

Extended

Specifies whether or not a series of additional

commands [n]: commands appears. The default is no.

The interface or IP address of the router to use as a source address for the probes. The router normally picks the IP address of the outbound interface to use. The interface can also be mentioned, but with Source address the correct syntax as shown here: or interface:

Source address or interface: ethernet 0

Note: This is a partial output of the extended ping command. The interface cannot be written as e0.

Type of service [0]:

Specifies the Type of Service (ToS). The requested ToS is placed in each probe, but there is no guarantee that all routers process the ToS. It is the Internet service's quality selection. The default is 0.

Set DF bit in IP header? [no]:

Specifies whether or not the Don't Fragment (DF) bit is to be set on the ping packet. If yes is specified, the Don't Fragment option does not allow this packet to be fragmented when it has to go through a segment with a smaller maximum transmission unit (MTU), and you will receive an error message from the device that wanted to fragment the packet. This is useful for determining the smallest MTU in the path to a destination. The default is no.

Validate reply Specifies whether or not to validate the reply data. data? [no]: The default is no.

Data pattern [0xABCD]

Specifies the data pattern. Different data patterns are used to troubleshoot framing errors and clocking problems on serial lines. The default is [0xABCD].

[3/16/2010 8:51:55 AM]

Cisco - Using the Extended ping and Extended traceroute Commands

IP header options. This prompt offers more than one option to be selected. They are:

Verbose is automatically selected along with any other option.

Record is a very useful option because it displays the address(es) of the hops (up to nine) the packet goes through.

Loose allows you to influence the path by specifying the address(es) of the hop(s) you want the packet to go through.

Loose, Strict, Record, Timestamp, Verbose[none]:

Strict is used to specify the hop(s) that you want the packet to go through, but no other hop(s) are allowed to be visited.

Timestamp is used to measure roundtrip time to particular hosts.

The difference between using the Record option of this command and using the traceroute command is that, the Record option of this command not only informs you of the hops that the echo request (ping) went through to get to the destination, but it also informs you of the hops it visited on the return path. With the traceroute command, you do not get information about the path that the echo reply takes. The traceroute command issues prompts for the required fields. Note that the traceroute command places the requested options in each probe. However, there is no guarantee that all routers (or end nodes) process the options. The default is none.

Sweep range of sizes [n]:

Allows you to vary the sizes of the echo packets that are sent. This is used to determine the minimum sizes of the MTUs configured on the nodes along the path to the destination address. Performance problems caused by packet fragmentation is thus reduced. The default is no.

Each exclaimation point (!) denotes receipt of a

reply. A period (.) denotes that the network server

!!!!!

timed out while waiting for a reply. Refer to ping

characters for a description of the remaining

characters.

Percentage of packets successfully echoed back to

[3/16/2010 8:51:55 AM]

Cisco - Using the Extended ping and Extended traceroute Commands

Success rate is 100 percent

the router. Anything less than 80 percent is usually considered problematic.

round-trip

Round-trip travel time intervals for the protocol

min/avg/max = echo packets, including minimum/average/maximum

1/2/4 ms

(in milliseconds).

In this diagram, Host 1 and Host 2 are unable to ping each other. You can troubleshoot this problem on the routers in order to determine if there is a routing problem, or if one of the two hosts does not have its default gateway correctly set.

In order for the ping from Host 1 to Host 2 to succeed, each host needs to point its default gateway to the router on its respective LAN segment, or the host needs to exchange network information with the routers that use a routing protocol. If either host does not have its default gateway set correctly, or it does not have the correct routes in its routing table, it is not able to send packets to destinations not present in its Address Resolution Protocol (ARP) cache. It is also possible that the hosts cannot ping each other because one of the routers does not have a route to the subnet from which the host is sourcing its ping packets.

Example

This is an example of the extended ping command sourced from the Router A Ethernet 0 interface and destined for the Router B Ethernet interface. If this ping succeeds, it is an indication that there is no routing problem. Router A knows how to get to the Ethernet of Router B, and Router B knows how to get to the Ethernet of Router A. Also both hosts have their default gateways set correctly.

If the extended ping command from Router A fails, it means that there is a routing problem. There could be a routing problem on any of the three routers. Router A could be missing a route to the subnet of Router B's Ethernet, or to the subnet between Router C and Router B. Router B could be missing a route to the subnet of Router A's subnet, or to the subnet between Router C and Router A; and Router C could be missing a route to the subnet of Router A's or Router B's Ethernet segments. You should correct any routing problems, and then Host 1 should try to ping Host 2. If Host 1 still cannot ping Host 2, then both hosts' default gateways should be checked. The connectivity between the Ethernet

[3/16/2010 8:51:55 AM]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download