Networking

Use extended ping and extended traceroute to better troubleshoot your Cisco network

Every admin is familiar with the well-known troubleshooting commands ping and traceroute. David Davis shows you how to use these commands in their extended versions to become an expert at troubleshooting your Cisco network.

What can extended ping do for you?

The ping command is just about as simple as it gets when it comes to troubleshooting. It asks, "Are you there?" and waits for a response. However, there is a lot more to ping if you use the Cisco IOS extended version.

There are a lot of assumptions and default settings in the standard version of ping. Extended ping allows you, the network admin, to see and determine every option that you want to specify for your ping test. For example, here are some of the many options that you can specify with extended ping:

  • Protocols: While 99 percent of the time you will use IP, most admins don't know that you can do an AppleTalk, CLNS, Novell, or other types of ping with extended ping.
  • Repeat count: How many pings do you want to send? The default is five with standard ping, but you could send 999 with extended ping. Perhaps your network is having trouble periodically -- you could test this with extended ping.
  • Datagram size: While the default is to send a 100-byte ping, with extended ping you could send very large ping packets. Perhaps your network is having trouble with large data transfers.
  • Timeout: The default timeout is two seconds, but you could allow ping to wait much longer for a reply if you choose to do so.
  • Source interface: I think this is very important -- you can specify the source of your ping because, otherwise, the receiving router may not be able to see all interfaces of your router and your standard ping may fail.
  • Loose, Strict, Record, Timestamp, Verbose: You can specify these options to gain additional information about your ping tests, such as forcing the ping to take a strict path through the network.

Here is an example of an extended ping:

Router# ping
Protocol [ip]:
Target IP address: 1.1.1.1
Repeat count [5]: 10
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 2.2.2.2
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!!!!!!
Success rate is 100 percent (10/10), round-trip min/avg/max = 20/98/157 ms
Router#

You can actually perform an extended ping, all on the command line, like this:

ping ip 1.1.1.1 data 0000 repeat 500 size 18000 verbose
Also, to break out of an extended ping or traceroute, you can press [Ctrl]+[Shift]6.

For more information on the extended ping command, please see the Cisco documentation "Using the Extended Ping and Extended Traceroute Commands."

How do you use extended traceroute?

Just as you can use the extended ping command to determine what kind of connectivity problems you're having, you can use the extended traceroute command to narrow down where the problem is happening. The basic traceroute command tests for the same thing as ping, but its benefit is that it lists the routers at each hop of the route to the destination. Extended traceroute goes much further, allowing you to tweak how it works.

Here is an example:

Router# traceroute 1.1.1.1
Source address: 2.2.2.2
Numeric display [n]:
Timeout in seconds [4]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 1.1.1.1
  1 3.3.3.1 16 msec 16 msec 16 msec
  2 3.3.3.2 28 msec 28 msec 32 msec
  3 2.2.2.2 32 msec 28 msec *
 

For more information on extended route, please see Cisco's documentation "Using the Extended Ping and Extended Traceroute Commands."

For more information on these commands, also see my TechRepublic article "Implement Regular Monitoring and Improve Cisco Router Performance."

Want to learn more about router and switch management? TechRepublic’s Cisco Routers and Switches newsletter has you covered. Delivered every Friday, this newsletter will make sure you can configure, secure, and manage your routers and switches like a pro. Automatically sign up today!

3 comments
khansen
khansen

Back about fifteen years ago when I had to deal with IP and Netbios (bridged, not wrapped in IP) across WAN connections, I had a problem where IP was working and Netbios was not. I used Cisco's extended ping and set the Extended Data Pattern to test pings w/ all ones and all zeros. The result? All ones passed, all zeros did not. It turned out the telco had a MUX in their environment that was set to discard any string of eight 0's that it saw instead of passing them. It took a week of troubleshooting to convince them to look at their gear and correct the problem, but it showed me back then the power of using the extended capabilities of ping/traceroute, and not just on the Cisco command line, but Unix/Windows environents as well.

Photogenic Memory
Photogenic Memory

From a host, the pings can show latency in the connection to outside or internal sources. However; and without replacing an appliance, how do you determine where the loss could be happening? Is there a log on a cisco device that records this? Will sh interface show resets? I've seen CRC listed there troubleshooting T1 physical problems. Am I going in the right direction?