Tuesday, October 21, 2008

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

Author: David Davis

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




No comments: