USING ALIASES FOR CISCO COMMAND SHORTCUTS

Rashmi Bhardwaj | Blog,Config & Troubleshoot
Google ADs

In an endeavour to make life easy for Cisco device implementors and, Cisco uses the concept of “Aliases” – to save time and keystrokes on repetitive Cisco IOS commands. What Aliases does is to make long commands short by giving them alias or short names. Let’s see how some of the frequently used cisco commands like “show ip route” and “show ip interface brief” can be given a short alias name – “sir” and “sib” respectively. Below examples show how to implement alias to make work easy for Cisco techies –

R1(config)#alias exec sir show ip route
R1(config)#alias exec sien show ip eigrp neighbors
R1(config)#alias exec sib show ip interface brief

Now that configuration has been done for the 3 cisco commands and their corresponsing alias names , lets see the output when we run the commands on cisco CLI –

R1#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
C    192.168.12.0/24 is directly connected, FastEthernet0/0
1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/409600] via 192.168.12.2, 00:13:12, FastEthernet0/0

R1#sien
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold       Uptime   SRTT   RTO     Q     Seq
(sec)               (ms)          Cnt Num
0   192.168.12.2            Fa0/0             14       00:11:36 192    1152    0      3

R1#sib
Interface                    IP-Address       OK?              Method     Status                                Protocol
FastEthernet0/0     192.168.12.1        YES              manual     up                                        up
FastEthernet0/1     unassigned          YES               unset        administratively down  down
Loopback0                1.1.1.1               YES               manual     up                                        up

R1#show aliases
Exec mode aliases:
h                         help
lo                        logout
p                         ping
r                          resume
s                          show
u                         undebug
un                      undebug
w                        where
sir                 show ip route
sien              show ip eigrp neighbors
sib                show ip interface brief    

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart