http://blog.alwaysthenetwork.com/?p=208After reading that blog post, I got to thinking about IOS commands I use day to day that are the most useful to me and make life easier in one way or another.
What are some other commands you all use that are very useful?
One of my favorites by far is
show proc cpu history
That commands gives you an ascii graph of the cpu utilization for the past 60 seconds, 60 minutes, and 72 hours.
Works on routers and switches.
UPDATE: As requested, I have posted most of the commands in the replies in the main thread. Some of the commands I did not post were ones which I could not test/use to provide an accurate description of what they were (all of them are in Steven King and Vitos post)
Code:
show interface description
shows list of interfaces, their current state, and their description
Code:
show ip bgp summary
shows summary of BGP neighbor status
Code:
show run, then type /(text)
After you enter show run, typing the / will tell the IOS to search for the specified string that is typed after the /. For example:
Code:
show run
/wccp
You will be taken to the first line with wccp in it.
Code:
show run | redirect tftp://##.##.##.##/bob.cfg
Easy backup or kick reports to a tftp server
Quote:
show standby brief
Code:
show standby brief
shows router redundancy information (HSRP)
Code:
show interface status | exclude disa
shows interface status and excludes interfaces in the disabled state
Code:
show cdp neighbor detail | include Device | IP address
Shows cdp neighbor device id (name) and its IP address
Code:
show ver | i uptime
SHO INT | I FastE|never
In combination, usefull for telling you what ports on a switch are not used but still patched in by matching when the last input/output with the uptime of the switch.
Code:
traceroute mac ip <source ip> <destination ip>
Usefull for doing traces across a layer 2 network
Code:
wr
reload in 10
< make changes >
reload cancel
wr
Gives you a ten minute window to make changes and if you lose
connectivity the device, it reloads in 10 minutes and reverts back
to the startup-config, just remember to save AFTER you cancel the reload
Code:
verify (image location)
make sure your IOS is not corrupt before reloading and ending up in ROMMON.
Code:
show proc cpu sort | excl 0.00%__0.00%__0.00%
shows only active CPU procs
Quote:
more system:run
ASA command, Shows your running config with more details. For example when you need to see the pre-shared key between a site-to-site VPN.
Quote:
show interface status
shows current interfaces with current status (connected/not connected), vlan of each interface, duplex and speed.
Code:
show interface stats
displays how much traffic goes across an interface, as well as how much of that traffic is process switched or cache switched.
Code:
show vlan brief
Gives you what vlans are on switch and what ports on the switch are in those vlans without the extra "fluff" of show vlan.
Fluff being the extra chart at the bottom of a show vlan that show MTU, parentID, etc..
Code:
sh cry isa sa
Active security associations, also known as tunnels
Code:
sh cry ipsec sa
Shows encryption statistics detailed by access list entry for each tunnel
Code:
sh cry isa policy
Shows phase 1 and 2 settings for tunnels
Code:
clear cry isa sa
Shuts down a tunnel and waits for re-negotiation of phase 1
Code:
show users
Shows users logged into vty lines
Code:
clear line vty line #
And once you know the line of the person you don't want on your router.
Code:
term no mon
Disable terminal monitoring