Friday, September 19, 2008

Define new IOS commands with the alias functionality

Cisco IOS allows you to define aliases for the commands you commonly use with the alias global configuration command. The alias command accepts the CLI mode (exec, configuration ...) for the new command and the string that replaces the command name. If you specify additional parameters in the new command, they are appended to the alias string.

For example, if want to have the ipconfig command that displays interface IP configuration, you can configure
#alias exec ipconfig show ip interface

When you execute ipconfig ifname the alias is expanded into show ip interface ifname and displays the IP configuration of a single interface.

1 comment:

Anonymous said...

598 4
309 7
145 2
609 8
87 5
589 0
363 3
266 5