Ah, the mighty ping. I use this command every damned day, so you would think that I would know this command very well. If you did so, you would be completely underestimating how incredibly lame I am.
I know how to send a simple, 5 packet ping a la "ping 10.1.1.1″. I also know how to send an "extended ping” by simply typing "ping” + ‘enter’ and filling in the information at the prompts. The most frustrating thing about the extended ping is that a lot of the time I type the IP address at the "Protocol [ip]” prompt instead of hitting ‘enter’:
Simple Ping:
router#ping 10.1.1.1 Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/8 ms
Extended Ping:
router#ping
What I Usually Do:
Protocol [ip]:
Target IP address: 10.1.1.1
Repeat count [5]: 100
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 4/7/8 ms
router#ping
Protocol [ip]: 10.1.1.1
% Unknown protocol - "10.1.1.1", type "ping ?" for help
FUCK!!!!
A couple of months ago I was troubleshooting with a collegue over my shoulder. I did an extended ping and of course put the IP address in the "Protocol [ip]” prompt. Argh!!!! My co-worker then showed me a cool variation of the ping command. Simply type "ping ip” and then ‘enter’. This will start the extended ping prompt, but safely bypass the stupid "Protocol [ip]” prompt.
Danger Averted:
router#ping ip
Target IP address: 10.1.1.1
Repeat count [5]: 100
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 4/7/8 ms
Up until this week, that was the coolest ping tip I had ever received.
95% of the time I use an extended ping simply to send more than the standard 5 packets. "ping ip” + ‘enter’ + IP Address + Number of pings + ‘enter’ + ‘enter’+ ‘enter’ + ‘enter’. I am no longer a slave to the extended ping prompts now that I have tapped the power of the "ping x.x.x.x repeat x” command.
Sweet:
router#ping 10.1.1.1 repeat 100
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 4/7/8 ms
If I want to get fancy, I can throw in the datagram size by simply tacking on "size x":
Changing the Datagram Size and Conserving Keystrokes:
router#ping 10.1.1.1 re 100 si 1500
Type escape sequence to abort.
Sending 100, 1500-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 8/8/12 ms
Now I only need to use the extended ping prompts in those rare occasions that I need to use extended commands or sweeps.
Command Reference:
ping ip
To test network connectivity on IP networks, use the ping ip command in privileged EXEC mode.
ping ip {host-name | ip-address} [data [hex-data-pattern] | df-bit | repeat [repeat-count] | size [datagram-size] [timeout seconds] [validate] [verbose]
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080093f22.shtml
Comment by Andreas — June 9, 2009 @ 4:43 am |