AN EXCELLENT IOS COMMAND
I just found and amazing Cisco IOS command, that i should have learned years ago. This IOS command is very handy, specially when making lengthy configurations on a large number of routers.
The said command works as a macro and can actually assigns a "keyword" (which can be a single alphabet) for a lengthy IOS command. This command is issued from global config mode and the syntax of this command is;
Router(config)# alias (config mode) (your keyword) (complete command)
where,
config mode: It is the mode from which the actual command (or keyword) will be issued. This mode can be EXEC, CONFIG, INTERFACE mode etc.
your keyword: It is your keyword that you want to use in-place of lengthy command.
complete command: It is the complete command that the router will assume instead of the keyword.
Example 1, To assign keyword "SII" for command "Show Ip Interface" (which in entered in exec mode), you can use following command;
Router(config)# alias exec SII Show Ip Interface
Now, when keyword "SII" will be typed in exec-mode (# mode), it will be treated by router as complete command "Show Ip Interface" were entered.
Example 2, To assign keyword "NS" for command "No Shut" for enabling an interface, we can use this as;
Router(config)# alias interface NS No Shut
After that, whenever keyword NS will be entered in any interface configuration mode, it will be treated as complete command "No Shutdown" were entered.
As a general guideline, I am also showing some most commonly used aliases. You just copy them in the global config mode of your Router / Switch.
I just found and amazing Cisco IOS command, that i should have learned years ago. This IOS command is very handy, specially when making lengthy configurations on a large number of routers.
The said command works as a macro and can actually assigns a "keyword" (which can be a single alphabet) for a lengthy IOS command. This command is issued from global config mode and the syntax of this command is;
Router(config)# alias (config mode) (your keyword) (complete command)
where,
config mode: It is the mode from which the actual command (or keyword) will be issued. This mode can be EXEC, CONFIG, INTERFACE mode etc.
your keyword: It is your keyword that you want to use in-place of lengthy command.
complete command: It is the complete command that the router will assume instead of the keyword.
Example 1, To assign keyword "SII" for command "Show Ip Interface" (which in entered in exec mode), you can use following command;
Router(config)# alias exec SII Show Ip Interface
Now, when keyword "SII" will be typed in exec-mode (# mode), it will be treated by router as complete command "Show Ip Interface" were entered.
Example 2, To assign keyword "NS" for command "No Shut" for enabling an interface, we can use this as;
Router(config)# alias interface NS No Shut
After that, whenever keyword NS will be entered in any interface configuration mode, it will be treated as complete command "No Shutdown" were entered.
As a general guideline, I am also showing some most commonly used aliases. You just copy them in the global config mode of your Router / Switch.
Router(config)# alias configure sir show ip route
Router(config)# alias configure siib show ip interface brief
Router(config)# alias exec sir show ip route
Router(config)# alias exec siib show ip interface brief
Router(config)# alias exec s sh run
Router(config)# alias exec c conf t
Router(config)# alias exec map show frame map
Router(config)# alias exec pvc show frame pvc
Router(config)# alias interface ns no shutdown
Router(config)# alias interface sa switchport mode access
Router(config)# alias exec w write memory
No comments:
Post a Comment