Skip to content

Five Cisco IOS tips to make you more efficient

Over the years, Ive offered a ton of Cisco IOS tips and tricks in the Cisco Routers and Switches newsletter. However, some of the best tips are too short to support a full-length article. This week, I want to share five quick tips for using the Cisco IOS that will help make you a more efficient network admin.

#1: Cut yourself off I assume that just about everyone who uses the Cisco IOS also knows that it accepts the fewest unique letters that represent a valid IOS command. However, I still notice some network admins typing out entire commands or even more letters than they have to. If you add up all the time it takes to enter those unneeded letters, how much time have you wasted? Here are a couple examples of command uniqueness: show ip route = sh ip ro show running-configuration = sh run show ip ospf = sh ip o On another note, why not use the shortest command for the job? Instead of using copy running-configuration startup-configuration or even co run start, why not use wr? The old write command actually does the same thing, but its a lot fewer characters to type. Even better, why not make these little short commands into aliases? Check out œEnter commands more efficiently with Cisco command aliases to learn more.

#2: Make time work for you Many times, router events can happen so quickly that multiple events happen in the same second (especially on large routers that have a lot of routes). To make sure your log can tell you exactly what happened at what time, use this command: service timestamps log datetime localtime show-timezone msec year. This command make sure the router timestamps all of your logging messages with the current time, the time zone (for those of you with remote routers in different time zones), the millisecond that the event occurred, and the year. (For those whose routers dont usually have many events, it can be nice to know the year.) Heres what the timestamp looks like (without the year): *Oct 21 15:31:54.955 CDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down In addition, you can use the service sequence-numbers command to include an absolute number that identifies each event and shows the sequence that events occurred. Entering this command tells the router to add a number next to each logging message, which both identifies that event and orders the events by numbered sequence.

#3: Start with a clean slate Lets say youve configured an interface on your router but later decide that you want to reconfigure it. Without having to remove what you set, command by command, or without having to wonder which commands you added and which were defaults, you can quickly bring a single interface back to its œdefault configuration in one command. Just use the default interface command, as in default interface Fa0/0.

#4: Change your filter If youre a Linux admin, you know how to œpipe things to more or œfilter with grep, right? It amazes me when I see Cisco admins who look through a huge running-configuration when they know what theyre looking for. The next time youre looking for something in a Cisco IOS command output, use begin or include. For example, to start at the OSPF configuration, use sh run | beg router ospf. Or, to show all IP addresses configure on the router, use sh run | inc ip address. You can also use exclude. Trust me, there are a million ways to use these command-filtering techniques.

#5: Just do it How many of you tend go to back and forth from Global Configuration to Privileged Mode to configure things as opposed to show things? (I admit it, Im holding up my hand.) Its a habit, right? Its how we learned to configure the IOS ” always changing from œconfiguration mode to œshow mode. Its time to break that habit and start saving time by using the do command. This command allows you to run Privileged Mode commands from Global Configuration Mode. Even better, its short ” a whole lot shorter than exiting back to Privileged Mode, entering your command, and then going back to Global Configuration Mode. All you have to do is use do in front of the command.

Using this command, you can perform any exec mode (Privileged Mode) command from any of the Global Configuration Mode prompts. Lets say youre configuring OSPF and want to see if your neighbors came up. Heres an example: Router(config)# router eigrp 100 Router(config-router)# do sh ip ei nei IP-EIGRP neighbors for process 100 H Address Interface Hold Uptime SRTT RTO Q Seq 2 Fa0/0 13 00:52:47 88 2280 0 6581 Summary Finding ways to do your job more efficiently is always important. These five quick tips will help you accomplish the same Cisco IOS tasks youre already doing ” but more quickly and easily by using some Cisco IOS commands that you may not have been aware of.

Posted in Cisco.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Anti-Spam Protection by WP-SpamFree