![Cisco ASR 14000 Series Management Command Reference Download Page 97](http://html.mh-extra.com/html/cisco/asr-14000-series/asr-14000-series_management-command-reference_66667097.webp)
Configuration Management Commands on Cisco IOS XR Software
alias
SMR-95
Cisco ASR 14000 Series Router System Management Command Reference
OL-17231-01
An alias name should not be a subset of the keywords that it represents as alias. Substitution is done only
when the entered input match fails completely. For instance, the attempt to define an alias with
config
as
the alias name fails, as shown here:
RP/0/RP0/CPU0:router# (config)#
alias config set_host hostname router
RP/0/RP0/CPU0:router# (config)#
show configuration
alias set_host hostname router
Use the
command to display all command aliases or the command aliases in a specified
mode.
Task ID
Examples
The following example shows how to create an alias named ipbr for the
show ipv4 interface brief
command, commit the configuration, enter EXEC mode, and then enter the configured alias:
RP/0/RP0/CPU0:router#
configure
RP/0/RP0/CPU0:router(config)#
alias ipbr show ipv4 interface brief
RP/0/RP0/CPU0:router(config)#
show configuration
Building configuration...
alias ipbr show ipv4 interface brief
end
RP/0/RP0/CPU0:router(config)#
commit
RP/0/RP0/CPU0:Feb 21 04:42:57.017 : config[65689]: %MGBL-LIBTARCFG-6-COMMIT : Co
nfiguration committed by user 'lab'. Use 'show configuration commit changes 1000000022'
to view the changes.
RP/0/RP0/CPU0:router(config)#
end
RP/0/RP0/CPU0:Mar 27 22:19:05 : config[65739]: %SYS-5-CONFIG_I : Configured from
console by lab
RP/0/RP0/CPU0:router#
ipbr
RP/0/RP0/CPU0:router#
show ipv4 interface brief
Interface IP-Address Status Protocol
Loopback0 1.1.1.1 Up Up
Loopback999 unassigned Up Up
MgmtEth0/0/CPU0/0 12.29.56.21 Up Up
RP/0/RP0/CPU0:router#
The following example shows how to define an alias, cisco’s-pos, for interface POS1/0/2/3 and then how
to use that alias to shut down the interface:
RP/0/RP0/CPU0:router(config)#
alias cisco's-pos POS1/0/2/3
RP/0/RP0/CPU0:router(config)#
interface cisco's-pos
RP/0/RP0/CPU0:router(config-if)#
shutdown
RP/0/RP0/CPU0:router(config-if)#
exit
RP/0/RP0/CPU0:router(config)#
The following example shows the use of a parameter name in an alias definition:
RP/0/RP0/CPU0:router(config)#
alias shint (intname) show interface $intname
The following example shows an alias defined with one parameter and two commands:
Task ID
Operations
logging
read, write