After connecting phones to our switches, I discovered that they all show up in the “show cdp neighbors” output. This can be a bit of a problem when you want to find something other than a phone! So instead use “show cdp neighbors | exclude SEP” to remove the phones from the output.
Category Archives: Tips
Adding comments to debugs
When reading debugs, I often use a page or so of blank prompts to separate various things (VoIP calls, etc.) by hitting enter a bunch of times. You can also add comments to the break by prefixing them with an exclamation point.
router#
router#
router#! inbound call 1
router#
router#
This makes finding the breaks between calls, VPN setup attempts, etc. a lot easier.
Converting DSCP AF values to decimal
To convert DSCP AF values to decimal, multiply the first digit by 8, and the second digit by 2, and add the two values:
AF21 – (2*8) + (1*2) = 18
AF31 – (3*8) + (1*2) = 26
The process can be reversed by deviding the decimal value by 8, and the remainder by 2:
30 – 30/8 = 3, remainder of 6, 6/2 = 3 = AF33
CS codes can just be converted by multiplying by 8, CS3 = 24
Decrypting router passwords with a router
The command “show key chain” shows the decrypted key strings, and because of that, can be used to decrypt other type 7 passwords:
R1(config)#username cisco password cisco
R1(config)#do show run | include password 7
username cisco password 7 05080F1C2243
password 7 ****
R1(config)#key chain CRACK
R1(config-keychain)#key 1
R1(config-keychain-key)#key-string 7 05080F1C2243
R1(config-keychain-key)#do show key chain
Key-chain CRACK:
key 1 — text “cisco”
accept lifetime (always valid) – (always valid) [valid now]
send lifetime (always valid) – (always valid) [valid now]
R1(config-keychain-key)#
Configuration mistake bailout
A lot of times we need to make changes on a router or switch that could break connectivity, and often these need to be done from a remote location, and after hours. Instead of keeping someone in the office or on call, here is a much easier bailout. Before you begin to make the changes, issue the command reload in 10 to schedule a reload in 10 minutes (replace 10 in the command with the number of minutes if 10 doesn’t work.) After you make the changes, if you lose connectivity, the router reboots, reverting to the old configuration, or you can issue the reload cancel command to cancel the reload if everything goes well.