Thursday, September 23, 2010

Make a shorcut of any cisco ios command

The ‘alias’ configuration command allows you to create aliases for just about any command or command string that you would like to run. For example, you may find yourself running the ‘show ip route’ command in privileged mode quite often. With the ‘alias’ command you can create an alias for that command string. For example:
Router(config)#alias [privilege level where to be executed] [the alias you want to use] the command string the alias is to execute
As you can see now when I type ‘sir’ it will now run the ‘show ip route’ command:
Router(config)#alias exec sir show ip route
Router#sir
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B – BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E – EGP
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
{TRUNCATED}

No comments:

Post a Comment