Ten useful Cisco IOS tips

Platform: - Cisco IOS routers and switches
Keywords: - : Useful Cisco tips, Very good IOS commands,
Reference: - cisco.com
Author: - Dinesh Aggarwal

Tip 1:
Do Command:
Introduced in Cisco IOS Software Release 12.2(5) T, the do command allows you to run EXEC-level commands in global configuration mode or other configuration modes or submodes. You can use this command during configuration, such as an interface, if you need to check other parts of the configuration (for example, the Internet address).
   do <EXEC-level command>
3600-4(config)#int e2/0
3600-4(config-if)#do show int e2/1
Ethernet2/1 is up, line protocol is down
  Hardware is AmdP2, address is 00b0.643d.f321 (bia 00b0.643d.f321)
  Internet address is
Tip 2:
Privilege Command Enhancement:
Introduced in Cisco IOS Software Release 12.2(11)T, the enhanced privilege command allows privilege levels to be set more efficiently (in the past, each level needed to be set independently). Use the privilege command whenever a privilege level is set.
   privilege <mode> all level x <submode>
In the example shown below, a privilege level of 5 is assigned. Only users with level 5 or higher privilege will be allowed to configure ARP.
3600-4(config)#privilege config all level 5 arp

Tip 3:
Show Output Line Numbering:
Introduced in Cisco IOS Software Release 12.2(4), this command displays line numbers to a show output. It is especially useful when you call the Cisco Technical Assistance Center (TAC) and need to identify a particular portion of a very large configuration.
   show run linenum
3600-4#show run linenum
Building configuration...
Current configuration : 209254 bytes  
1 : !  
2 : ! Last configuration change at 22:02:42 PDT Mon May 3 1993  
3 : ! NVRAM config last updated at 21:49:44 PST Sat Mar 13 1993  
4 : !  
5 : version 12.2  
6 : service timestamps debug datetime msec localtime  
7 : service timestamps log datetime msec localtime
3600-4#show run linenum | include rtr 
88 : rtr responder 
90 : rtr 1 
92 : rtr schedule 1 start-time 12:54:00 Mar 19 
93 : rtr 2 
95 : rtr schedule 2 start-time 09:45:00 Mar 19 
96 : rtr 3 
98 : rtr schedule 3 start-time 11:02:00 Mar 19 
99 : rtr 4 
101 : rtr schedule 4 start-time 11:02:00 Mar 19
Tip 4:
Show Redirect
Introduced in Cisco IOS Software Release 12.2(8)T, this command allows the show output to be directed to other devices, such as slot, ftp, tftp, or disk. You can use the show redirect command to analyze show output offline (see example).
   show <command> | redirect <URL>
Gsr-10#show version | redirect slot0:ver.txt
Gsr-10#show tech | redirect tftp://
Tip 5:
Console Memory Reservation
Introduced in Cisco IOS Software Release 12.0(11)S, this command reserves memory for console access. Without reserving console memory, when the router is very low in memory or memory is highly fragmented, console access isn’t allowed. Simple servicing of the router is denied. With this command, a small block of memory is reserved to ensure console access.
   memory reserved console <nKB>
   show memory console reserve
Router#dir nvram:
Directory of nvram:/  
123 -rw- 1962 <no date>
124 ---- 46 <no date> private-config  
1 -rw- 0 <no date> ifIndex-table  
2 -rw- 12 <no date> persistent-data  
3 -rw- 12 <no date> persistent-data
129016 bytes total (123884 bytes free)
Router#memory reserved console 387 (three times of 129K)
Router#show memory console reserve
Memory reserved for console is 262144 bytes
 Note that the general rule is to reserve memory three times that of NVRAM. NVRAM memory can be seen with the dir nvram: command.

Tip 6:
Fiber Patch Cable Testing
Here is an easy way to test if your multi- or single-mode fiber patch cables are damaged: Plug a working Gigabit Interface Converter (GBIC) into a switch or a router. Simultaneously connect both receive connectors to the GBIC, and if the cable is OK, you should get a link up. Do the same with the transmit connectors. Of course, this won't tell you if the cable is degraded, but it is a good way to troubleshoot fiber connection problems in a multipatch link with multiple fiber cables and patch panels involved.

Tip 7:
Deleting Individual Interfaces
When a router is fully configured but you want to delete any interface configuration alone, use the default interface command:
   router(config)#default interface serial0
This deletes all the configurations under that interface and saves you from using the no form of the reverse command to disable the functionality.

Tip 8:
To view output of "show tech-support" page by page, use the command,
show tech-support page
Tip 9:
To view the running config without going back to privilege exec mode, when you are in the global configuration mode, use command

(config)#do show run
The do command can infact execute any command in the privilege mode from the global configuration mode. (like, "do show ip route")

Tip 10: 
To remove a specific interface configuration, totally, rather than erasing the configs, use, command "default interface <interface>" command. This will clear all configs on that particular interface.

If you have any suggestions or want to add more to this article do write us an email articles@knowurtech.com

What Next?

If you liked this article, you can share it with others using the following link:

Related Content :