CCIE Pursuit Blog

September 1, 2007

Ping Record Option

Filed under: Cisco,Cisco Certification,Cool Commands,IOS — cciepursuit @ 3:28 pm

Over at Cisco Notepad there is a nice post about the record ping option.  I haven’t used this option before.  From the Cisco documentation:

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

I generally use trace route in situations were I want to follow the path of a packet through the network, but the record option in ping does give one advantage over trace route: it shows you the path that the packet takes back to the source.

Take this simple network for instance:

Record Ping Network Diagram

We have two routes from r4 to the loopback on r5: via the serial link or through the Frame Relay cloud: 

r4#sh ip route 150.1.5.5
Routing entry for 150.1.5.0/24
  Known via “eigrp 100”, distance 90, metric 2306560, type internal
  Redistributing via eigrp 100
  Last update from 155.1.0.5 on Serial0/0, 00:11:19 ago
  Routing Descriptor Blocks:
  * 155.1.45.5, from 155.1.45.5, 00:11:19 ago, via Serial0/1
      Route metric is 2306560, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1536 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
    155.1.0.5, from 155.1.0.5, 00:11:19 ago, via Serial0/0
      Route metric is 2306560, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1536 Kbit
      Reliability 244/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1

Let’s trace to 150.1.5.5:

r4#trace 150.1.5.5
Type escape sequence to abort.
Tracing the route to 150.1.5.5
  1 155.1.45.5 4 msec
    155.1.0.5 4 msec *

We can see that the trace packets take both routes.  Let’s try pinging the same address (2 packets) with the record option:

r4#ping
Protocol [ip]:
Target IP address: 150.1.5.5
Repeat count [5]: 2
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: record
Number of hops [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 2, 100-byte ICMP Echos to 150.1.5.5, timeout is 2 seconds:
Packet has IP options:  Total option bytes= 39, padded length=40
 Record route: <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)

Reply to request 0 (4 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (155.1.45.4) <-s0/1
   (150.1.5.5)  <-destination
   (155.1.45.5) <-return path
   (155.1.45.4) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list

Reply to request 1 (8 ms).  Received packet has options
 Total option bytes= 40, padded length=40
 Record route:
   (155.1.0.4) <-s0/0
   (150.1.5.5) <-destination
   (155.1.0.5) <-return path
   (155.1.0.4) <*>
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
   (0.0.0.0)
 End of list

Success rate is 100 percent (2/2), round-trip min/avg/max = 4/6/8 ms

In the real world, this option may not be of much use because of the 9 hop limit, plus the fact that most Internet addresses are not going to respond to the record option for security purposes.  But, in the lab, this can be a nice addition to your troubleshooting tool belt.


Cisco Documentation

Using the Extended ping and Extended traceroute Commands

Advertisements

1 Comment »

  1. I have a doubt, Why the record route has only 9 like option? why not 10 or 11?

    Comment by fffrrr — September 17, 2009 @ 12:05 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: