Friday 14 September 2012

How to create a VLAN and assign the IP alias to the interfaces on NetApp

How to create a VLAN and assign the IP alias to the interfaces on NetApp

NOTE: VLAN commands are NOT persistent across a reboot and must be added in /etc/rc files to make them permanent.
NetApp> vlan create “Interface name” vlan id
For ex:
NetApp> vlan create np1- vif1 801 802
NetApp> ifconfig np1-vif1-801 192.168.0.51 netmask 255.255.255.0
NetApp> ifconfig np1- vif1-803 192.168.0.52 netmask 255.255.255.0
Same entry you need to do in /etc/rc file to make it permanent, if you will not do it, then in reboot these vlan will get deleted.
Now if you need to add IP alias to the vlan interface vif1-803 then you can add, you can add up to 3 alias (according to my knowledge).
For ip alias
NetApp> ifconfig np1- vif1-803 alias 192.168.0.34 netmask 255.255.255.0
NetApp> ifconfig np1- vif1-803 alias 192.168.0.44 netmask 255.255.255.0
Similary for IP alias also you need to do the entry in the /etc/rc files to make it permanent.
If you did any entry in /etc/rc files and you want to reload that entry in NetApp memory than you no need to reboot the filer, you can run the cmd “source”
For ex:
NetApp> source /etc/rc
Then all the entry which are there in /etc/rc files will get load to the memory without rebooting the filer.
Below I will show the /etc/rc files entries for your help, so that you will be able to understand how the entries are done on /etc/rc files.

Note: There should be no space between lines and always do the entry above the savecore line, don’t do it below savecore . If you will add an # in front of any line then that line will be act as comment line, means that line is as equal to deleted line, means it will not get loaded to the NetApp storage memory.


Sample /etc/rc
 #Auto-generated by setup Mon Mar 14 08:18:30 GMT 2005
hostname FAS1
vif create multi MultiTrunk1 e0 e1
ifconfig MultiTrunk1 172.25.66.10 partner MultiTrunk2
vif favor e0
ifconfig e5a `hostname`-e5a mediatype auto flowcontrol full netmask 255.255.255.0 partner 10.41.72.101
vlan create np1-vif1 801 803
ifconfig np1-vif1-801 192.168.0.51 netmask 255.255.255.0
route add default 10.41.72.1 1
routed on
options dns.domainname corp.acme.com
options dns.enable on
options nis.enable off
savecore

Now suppose your IT head told you to add the partner interface for the vlan you created, so that when the failover happen then it should happen to the partner interface of that particular vlan interface.
Now in storage when you do the initial setup at that time it will ask for the failover partner interface for the particular vifs, but it will not ask for the vlan failover interface, because vlan are created after the initial setup is done, so you need to maulally run the cmd for the failover partner for the specific vlan interfaces.
For ex: In above ex I have created a two vlan and assigned the IP for them and now suppose the partner filer also have the two same vlan with other ip, for ex assume that the partner filer have the vlan interface named np2-vif1-801 and np2-vif1-803 and their ip is 192.168.0.53 and 192.168.0.54
Now I want that my filer1 vlan interface np1-vif1-801 partner failover ip should be np2-vif1-801 then cmd for it.
NetApp> ifconfig np1-vif1-801 192.168.0.51 partner 192.168.0.53
Now same entry you need to do in /etc/rc files to make it permanent, if you will not do it, then entry will get removed after reboot.
Now if you see above sample /etc/rc file there I have shown one vlan interface entry, you just add “partner 192.168.0.53” in front of the valn entry in /etc/rc , and your entry will become permanent.

For ex:
ifconfig np1-vif1-801 192.168.0.51 netmask 255.255.255.0 partner 192.168.0.53

Don’t add the new entry for the partner interface in /etc/rc because some times because of multiple ifconfig entries they does not get loaded in the memory, so if you reboot the filer you will see the entry in the /etc/rc files but you will not able to do the failover to the partner interface because the entry does not got loaded to the memory.
So be careful while doing the entry on /etc/rc files, always take backup of /etc/rc files before doing any modification on it.

I hope that you were able to understand, what I was trying to say in this blog, because I faced difficulty while doing this activity, and I want you all to be aware of these things while doing such type of activity.
  



1 comment:

  1. My doubt got clear about VLAN. Thanks for sharing it.

    ReplyDelete