Podemos crear una nueva VLAN sobre un virtual interface de NetApp que contiene VLANs de forma no disruptiva siguiendo este procedimiento:
1) Accedemos por SSH/Telnet al contexto de Data Ontap de la controladora NetApp
2) Podemos ver los interfaces de red activos con el comando ifconfig -a
FAS2240-A> ifconfig -a e0a: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0b: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0c: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0d: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0M: flags=0x2b0c866<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,MGMT_PORT> mtu 1500 ether 00:00:00:00:00:00 (auto-100tx-fd-up) flowcontrol full e0P: flags=0x2b4c867<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM,ACP_PORT> mtu 1500 PRIVATE inet 172.25.0.48 netmask 0xffffff00 broadcast 172.25.0.255 noddns ether 00:00:00:00:00:00 (auto-100tx-fd-up) flowcontrol full lo: flags=0x1b48049<UP,LOOPBACK,RUNNING,MULTICAST,TCPCKSUM> mtu 9188 inet 127.0.0.1 netmask 0xff000000 broadcast 127.0.0.1 losk: flags=0x40a400c9<UP,LOOPBACK,RUNNING> mtu 9188 inet 127.0.20.1 netmask 0xff000000 broadcast 127.0.20.1 vif1: flags=0xa2f0c862<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (Enabled interface groups) nfo enabled vif1-30: flags=0x2b4c863<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500 inet 192.168.1.65 netmask 0xffffff00 broadcast 192.168.1.255 partner vif1-30 (not in use) ether 00:00:00:00:00:00 (vlan-on-ifgrp-up) nfo enabled vif1-50: flags=0x2b4c863<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500 inet 192.168.2.230 netmask 0xfffffe00 broadcast 192.168.3.255 partner vif1-50 (not in use) ether 00:00:00:00:00:00 (vlan-on-ifgrp-up) nfo enabled vif1-60: flags=0x2b4c863<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500 inet 192.168.30.40 netmask 0xffffff00 broadcast 192.168.30.255 partner vif1-60 (not in use) ether 00:00:00:00:00:00 (vlan-on-ifgrp-up) nfo enabled
En el ejemplo tenemos un virtual interface vif1 formado por 4 puertos (e0a, e0b, e0c, e0d). Esta configuración se carga desde el fichero RC juntamente con el fichero de HOSTS ambos ubicados en la ruta /vol_root/etc/.
3) Consultamos la configuración de red y la almacenamos, por ejemplo, en un fichero de texto
FAS2240-A> rdfile /etc/rc #Configuración VIF LACP con VLAN Tagging para CIFS, NFS e iSCSI hostname FAS2240-A ifgrp create lacp vif1 -b ip e0a e0b e0c e0d vlan create vif1 30 50 60 ifconfig vif1-30 `hostname`-vif1-30 netmask 255.255.255.0 partner vif1-30 ifconfig vif1-50 `hostname`-vif1-50 netmask 255.255.254.0 partner vif1-50 ifconfig vif1-60 `hostname`-vif1-60 netmask 255.255.255.0 partner vif1-60 ifconfig e0a mediatype auto ifconfig e0b mediatype auto ifconfig e0c mediatype auto ifconfig e0d mediatype auto ifconfig e0a flowcontrol send ifconfig e0b flowcontrol send ifconfig e0c flowcontrol send ifconfig e0d flowcontrol send ifconfig vif1 nfo ifconfig vif1-30 nfo ifconfig vif1-50 nfo ifconfig vif1-60 nfo route add default 192.168.1.1 1 routed on options dns.domainname davidsole.es options dns.enable on options nis.enable off savecore
FAS2240-A> rdfile /etc/hosts #Configuración de las IPs para `hostname` en cada VLAN 127.0.0.1 localhost localhost-stack 127.0.10 localhost-10 localhost-bsd 127.0.20.1 localhost-20 localhost-sk 192.168.1.65 FAS2240-A FAS2240-A-vif1-30 192.168.2.230 FAS2240-A FAS2240-A-vif1-50 192.168.30.40 FAS2240-A FAS2240-A-vif1-60
En la configuración podemos ver la asociación de cada VLAN con su IP dentro del fichero de hosts.
4) Creamos la nueva VLAN con el comando vlan add vif1 #VLANID no sin antes desactivar el negotiated failover (si está configurado, como es el caso de este ejemplo). Luego lo volveremos a activar.
FAS2240-A> ifconfig vif1 -nfo FAS2240-A> vlan add vif1 62 vlan: vif1-62 has been created FAS2240-A> ifconfig vif1 nfo
5) Editamos el fichero de hosts para que contenga una nueva línea con la configuración de red de la nueva VLAN. Podemos hacerlo modificando el fichero de texto y luego «plancharlo» con wrfile /etc/hosts o bien añadir la nueva linea como sigue:
FAS2240-A> wrfile -a /etc/hosts 192.168.35.40 FAS2240-A FAS2240-A-vif1-62
6) Aplicamos la configuración de red al nuevo interfaz de VLAN:
FAS2240-A> ifconfig vif1-62 `hostname`-vif1-62 netmask 255.255.255.0 partner vif1-62
Este cambio se deberá almacenar en el fichero RC para que la configuración se mantenga cuando se produzca un reinicio o failover de la controladora. Consultamos nuevamente los interfaces para verificar el estado del nuevo:
FAS2240-A> ifconfig -a e0a: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0b: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0c: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0d: flags=0x89f0c867<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (auto-1000t-fd-up) flowcontrol send trunked vif1 e0M: flags=0x2b0c866<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,MGMT_PORT> mtu 1500 ether 00:00:00:00:00:00 (auto-100tx-fd-up) flowcontrol full e0P: flags=0x2b4c867<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM,ACP_PORT> mtu 1500 PRIVATE inet 172.25.0.48 netmask 0xffffff00 broadcast 172.25.0.255 noddns ether 00:00:00:00:00:00 (auto-100tx-fd-up) flowcontrol full lo: flags=0x1b48049<UP,LOOPBACK,RUNNING,MULTICAST,TCPCKSUM> mtu 9188 inet 127.0.0.1 netmask 0xff000000 broadcast 127.0.0.1 losk: flags=0x40a400c9<UP,LOOPBACK,RUNNING> mtu 9188 inet 127.0.20.1 netmask 0xff000000 broadcast 127.0.20.1 vif1: flags=0xa2f0c862<BROADCAST,RUNNING,MULTICAST,TCPCKSUM,VLAN> mtu 1500 ether 00:00:00:00:00:00 (Enabled interface groups) nfo enabled vif1-30: flags=0x2b4c863<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500 inet 192.168.1.65 netmask 0xffffff00 broadcast 192.168.1.255 partner vif1-30 (not in use) ether 00:00:00:00:00:00 (vlan-on-ifgrp-up) nfo enabled vif1-50: flags=0x2b4c863<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500 inet 192.168.2.230 netmask 0xfffffe00 broadcast 192.168.3.255 partner vif1-50 (not in use) ether 00:00:00:00:00:00 (vlan-on-ifgrp-up) nfo enabled vif1-60: flags=0x2b4c863<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500 inet 192.168.30.40 netmask 0xffffff00 broadcast 192.168.30.255 partner vif1-60 (not in use) ether 00:00:00:00:00:00 (vlan-on-ifgrp-up) nfo enabled vif1-62: flags=0x2b4c863<UP,BROADCAST,RUNNING,MULTICAST,TCPCKSUM> mtu 1500 inet 192.168.35.40 netmask 0xffffff00 broadcast 192.168.35.255 partner vif1-62 (not in use) ether 00:00:00:00:00:00 (vlan-on-ifgrp-up) nfo enabled
Para finalizar deberemos tener en cuenta que en la electrónica de red donde están conectados los puertos de la controladora deberemos permitir la nueva VLAN.
This Post by David Solé Pérez is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License