Creating or removing aliases
You can create or remove an alias if you are changing the IP address of an interface. You should use the alias command to create an alias IP address, and use the -alias command to remove an alias IP address.
About this task
- The alias addresses are lost when the storage system reboots. If you want to make these changes persistent, include the ifconfig commands, which are used for configuring the alias addresses, in the /etc/rc file for the root volume.
- For IPv4 addresses, you can add an alias address only if a primary address for the interface exists.
For IPv6 addresses, the link-local and autoconfigured addresses are automatically added as alias addresses even without a primary address configured for an interface.
- To create or remove an alias, enter the following command: ifconfig interface_name [-]alias address
The following example creates the alias IP address 192.0.2.30 for the interface e0 (already configured with IP address 192.0.2.21): ifconfig e0 alias 192.0.2.30
The following example removes the 192.0.2.30 alias for the interface e0 specified in the previous example: ifconfig e0 -alias 192.0.2.30