Configuring and Managing Aliases 123
Configuring and Managing Aliases
An alias is a string that represents an IP address. You can use aliases as
shortcuts in CLI commands. For example, you can configure alias pubs1
for IP address 10.10.10.20, and enter ping pubs1 as a shortcut for ping
10.10.10.20.
Aliases take precedence over DNS. When you enter a hostname, MSS
checks for an alias with that name first, before using DNS to resolve the
name.
Adding an Alias To add an alias, use the following command:
set ip alias name ip-addr
Specify an alias of up to 32 alphanumeric characters.
To add an alias HR1 for IP address 192.168.1.2, type the following
command:
WX1200# set ip alias HR1 192.168.1.2
success: change accepted.
After configuring the alias, you can use HR1 in commands in place of the
IP address. For example, to ping 192.168.1.2, you can type the command
ping HR1.
Removing an Alias To remove an alias, use the following command:
clear ip alias name
Displaying Aliases To display aliases, use the following command:
display ip alias [name]
Here is an example:
WX1200# display ip alias
Name IP Address
-------------------- --------------------
HR1 192.168.1.2
payroll 192.168.1.3
radius1 192.168.7.2