Cisco IOS Alias
Cisco IOS alias can be used to shorten commonly used commands to a command alias.
To save time and the repetition of entering the same command multiple times, you can use a command alias. An alias can be configured to do anything that can be done at the command line, but an alias cannot move between modes, type in passwords, or perform any interactive functions
Cisco DOC
Default Command Aliases
Cisco IOS includes some built-in command aliases. Depending on different IOS version, default alias may be slightly different
You can check the built-in alias using the following command in privileged mode
Router#show aliases
Exec mode aliases:
h help
lo logout
p ping
r resume
s show
u undebug
un undebug
w where
Router#
As you can see there are couple of aliases already defined.
Configuring Alias
Suppose you want to configure an alias named int_br which lists all the interface and brief details about it.
Under config mode, use this command
Router(config)#alias exec int_br show ip interface brief
Now we can use this alias in privileged mode
Router#int_br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Router#
int_br = show ip interface brief
Here are some more useful aliases
Router(config)#alias exec c config terminal Router(config)#alias exec w write memory Router(config)#alias exec sr show ip route
Summary
Alias is very useful and time saving IOS command. Long repetitive commands can be shortened with alias. This can be very useful in CCIE labs or where time is limited.
Check out Cisco DOC for further details.
| This entry was posted by Arsalan A. Suzuki on August 15, 2010 at 3:11 pm, and is filed under Cisco, IOS. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
