Router(config)#alias exec sib show ip interface brief
Router(config)#alias exec sir show ip route
Router(config)#alias configure show do show
Let's test if the alias commands really work.
Router#sib
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Router#sir
Codes: C - connected, S - static, 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
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 not set
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Well it did! Lets check what we will see in IOS help.
Router#s?
*s=show *sib="show ip interface brief" *sir="show ip route" sdlc
send set setup show
slip snasw squeeze ssh
start-chat systat
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#s?
*show="do show" sap-priority-list scheduler scripting
secure security service sgbp
signaling-class sip-ua sna snasw
snmp snmp-server source-bridge srcp
standby state-machine stun su-mac
su-tag subscriber subscriber-policy subscription
Now we see the aliases we made and they have the preceeding asterisk before them. *s=show is the default alias in the router. Cool! Try other aliases in different modes, make your own aliases and just be creative!
Hi !
Very interresting, but I tried to do a funnier 'alias in alias' stuff, and it did'nt work.
SIR = show ip route
Try SIR vrf 111_prod for example : ok done
Now let's make an alias for "vrf 111_prod" for example, why not alias exec prd vrf 111_prod.
Let's try show ip route prd => KO, he won't take the alias "prd" as an alias, but as a hostname.
There is no "alias show xxx" command, so how simplify the usage of VRF ?
Ideas ?