ONTAP Discussions

vfiler add IP and ifconfig alias

TMADOCTHOMAS
13,423 Views

Hello,

I need to add an IP address to a vFiler, and need to know the proper procedure.  Should I use vfiler add IP to add the IP to the vFiler, and then use ifconfig alias on the interface the vFiler uses to make the IP available / accessible? Alternatively, can I just enter vfiler add ip and bypass ifconfig alias?  What does the vfiler add ip command actually accomplish?

9 REPLIES 9

clackamas
13,423 Views

We use vfilers in non default ipspaces, so each vfiler has its own ipspace and vlan, I just use the ifconfig alias to add an ip address.

TMADOCTHOMAS
13,423 Views

Thanks clackamas!  As it turns out, we don't need to do this anymore but I would still love to know what the purpose of vfiler add ip is, and what it accomplishes vs ifconfig alias.

cscott
13,423 Views

There are two steps to adding an IP to a vfiler and another for having it remain after a reboot, the first is to make the IP available to the vfiler, the second is to make it active on the system, but this does not make persistent across reboots.  The ifconfig line for the alias must be added to /etc/rc for persistence.

You run ifconfig <interface> alias <ip_address>, but that does not attach it to the vfiler.

You run vfiler add <vfiler> -i <ip_address> but it does not add it to the /etc/rc for persistence across reboots

By running both commands, the vfiler can use the IP immediately and then once the required alias entry is added to /etc/rc it will remain when the controller is rebooted.

- Scott

Message was edited by: Scott Chubb after a good catch by aborzenkov I had edited parts of the message and submitted without completing parts.

TMADOCTHOMAS
13,423 Views

Excellent, thank you cscott!

aborzenkov
13,423 Views

Are you sure? You still need to manually add ifconfig alias to /etc/rc - this does not happen automagically.

JGPSHNTAP
13,423 Views

to add - can't be added prior to vfiler config b/c I think it checks the rc file to make sure .. I could be wrong.. I would have to double-check in lab

TMADOCTHOMAS
13,423 Views

Definately has to be added to rc at some point.

aborzenkov
13,423 Views

I think it checks whether address is currently active (configured on any interface), but may be it has additional undocumented checks.

cscott
13,423 Views

Added an edit, thanks for the catch on that.

- Scott

Public