Cisco IOS Tips16 Mar 2008Keyboard shortcutsThese shortcuts can be used to speed up operating with the CLI:
Filter outputMost show commands support filtering with the pipe (|) character, allowing a user to display only the information he's looking for. Filter options are include, exclude, and begin. The remaining characters after one of these filter types is processed as a regular expression, which could be a simple string (as in the example above) or something a bit more complex. The example below demonstrates filtering for interface numbers and any assigned IP addresses. You can also filter by section. Thanks to Carl Baccus to reminding me to include this.
Skip through the configurationYou can begin viewing a configuration with the You can also skip forward to a certain line once you've already begun viewing the configuration by hitting
Do the doExec commands can be issued from within configuration mode via the do command. This can be handy for double-checking the current configuration before applying any changes.
Insert question marksYou can insert question marks into literal strings (such as interface descriptions) by typing CTRL+V immediately before the question mark. This acts as an escape character and prevents the command line from summoning the help menu. The interface description will appear as "Where does this go?" Disable domain lookup on typosDon't you hate it when this happens? You can disable automatic DNS lookups with no ip domain-lookup, which will remove the delay before returning a new console prompt. However, this will also prevent you from referencing remote hosts by name, for example when telneting.
Synchronous loggingWhen logging to the console is enabled, a Cisco device will often dump messages directly to the screen. This can become irritating when it interrupts you in the midst of typing a command. (FYI, you can continue typing normally and the command will still take, but this still throws some people off.) Synchronous logging can be enabled to "clean up" the CLI when this happens, outputting a fresh prompt below the message, along with any partially completed command.
Revert a configuration to its defaultThe default command, called from global configuration, can be used to revert any part of a configuration to its default value (which is often nothing). For example, it can be used to remove all configuration from a particular interface:
Show only applied access listsFor reasons unknown to me, IOS doesn't include a command to view what interfaces have ACLs applied. The closest we can get is drudging through the entire output of show ip interface. But, with a little ingenuity and the help of regular expressions, we can summon an efficient view of where our ACLs are applied. For those curious, the regex above matches a line which either a) contains the string "line protocol", or b) contains the string "access list is " followed by a single word. This matches an ACL number or name (which can't contain spaces) but not "not set". Speed up running-config displayWhen the Hat tip to Jeremy Cioara for blogging this! |
Navigation
Armory
Online Toolbox
|
Very useful..Thanks!
Thanks.. Need to look at once..
Regarding the section above on Synchronous logging: You can also hit the Tab key if your command is interrupted by a logging message. This will drop you to a new line with your command intact. Great site by the way.
thanks bro great job
Hi, there is a another way to do away with the typos.
line con 0 transport preferred none
Using this, you can still use your router to do the DNS resolution without being bothered by the "typos".
Very Cool! Another cool trick I learned the other day is:
The "sec" stands for "section", and only seems to be available in 12.4 series IOS, but still really useful also. Just thought I would throw that in there.
Man, You people are doing a very fine job. I love you techies. The contents are awesome... Please keeps it up.
I like these tips thanks man
Men this site is very helpfull, especialy the part where you talk about the regular expressions! Verry usefull! Keep up the good work
Dan
sh int | i proto|input rateUseful when looking for broadcast storm.
Very helpful and useful site..Thanks for all your effort