Skip to main content
NetApp Knowledge Base

Can I add an alias or alternate IP to a vif (ifgrp)?

Views:
911
Visibility:
Public
Votes:
0
Category:
data-ontap-7
Specialty:
7dot
Last Updated:

 

Applies to

Data ONTAP 7
Data ONTAP 8 7-mode

Answer

 You can add an alias to a vif or ifgrp using the following command:

Note:  The term "vif" is depreciated in 8.0.x and above. It has been replaced by "ifgrp."

ifconfig vifname alias ip-address

Update the /etc/rc file adding the alias configuration lines after the related vif (ifgrp) config line.

Example:

vif1: flags=948043<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500
inet 192.168.100.126 netmask 0xffffff00 broadcast 192.168.100.255
ether 02:a0:98:06:c9:8e (Enabled virtual interface)
filer1>ifconfig vif1 alias 192.168.100.127
filer1> ifconfig vif1 alias 192.168.100.128
filer1> ifconfig -a
vif1: flags=948043<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500
inet 192.168.100.126 netmask 0xffffff00 broadcast 192.168.100.255
inet 192.168.100.127 netmask 0xffffff00 broadcast 192.168.100.255
inet 192.168.100.128 netmask 0xffffff00 broadcast 192.168.100.255

IP subnet configuration

If the desired alias is for a different class of IP address than the original vif (ifgrp) IP address (such as A, B, or C), then ensure that you include the subnet mask of the original IP address of the vif (ifgrp) being aliased. If the subnet mask is not included, then the vif (ifgrp) may behave as if it has lost its default route.

Example:
ifconfig vif_LAN alias xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx

Removing an alias

If you notice routing problems or errors that appear after adding an alias, it can be easily removed using this syntax:
ifconfig vif_LAN -alias xxx.xxx.xxx.xxx

 

WARNING:

If the 'netmask' keyword is not specified when adding an alias in the '/etc/rc' file or CLI, the default network mask for the IP Address Class will be selected, which may result in the alias IP not being reachable.

Example: 

For IP 10.145.24.125 - Class A - 255.0.0.0

For IP 192.168.100.127 - Class C - 255.255.255.0

 

Additional Information

Data ONTAP Manual page: ifgrp

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.