Rashmi Bhardwaj | Blog,Config & Troubleshoot

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 –

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 is directly connected, FastEthernet0/0 is subnetted, 1 subnets
C is directly connected, Loopback0 is subnetted, 1 subnets
D [90/409600] via, 00:13:12, FastEthernet0/0

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

Interface                    IP-Address       OK?              Method     Status                                Protocol
FastEthernet0/0        YES              manual     up                                        up
FastEthernet0/1     unassigned          YES               unset        administratively down  down
Loopback0                     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    


Leave a Comment

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

Shopping Cart