Library Table of Contents Index Previous Next Comments

Configuring an alias for an interface

Available options  Top

There are two alias options available for the ifconfig command:

Using the alias option  Top

The alias option is useful when you are changing the IP address of an interface to a new address, but also want to keep accepting packets addressed to the old IP address.

You can use the alias option at the command line. However, the IP address configured using the alias option at the command line is lost if the filer reboots. If you want to make your changes persistent across reboots, include these changes in the /etc/rc file of the root volume.

You cannot set up an IP address and an alias for an interface in the same ifconfig command; you must configure the IP address for the interface before setting up the alias.

Using the -alias option  Top

The -alias option is useful when you want to stop using the old IP address configured on an interface but do not want to reboot the filer.

Configuring an alias  Top

To configure an alias for an interface, complete the following step.

Step

Action

1

Enter the following command:

ifconfig interface alias address [netmask mask]

interface is the interface you want to set up an alias for.

address is the alias IP address of the interface.

mask is the subnet mask.

Example

In this example, the interface e0 (already configured with an IP address of 172.28.50.21) is set up with an alias IP address of 172.28.50.30.

ifconfig e0 alias 172.28.50.30 netmask 255.255.255.0 

Library Table of Contents Index Previous Next Comments