FreeNAS® uses FreeBSD's vlan(4) interface to demultiplex frames with IEEE 802.1q tags. This allows nodes on different VLANs to communicate through a layer 3 switch or router. A vlan interface must be assigned a parent interface and a numeric VLAN tag. A single parent can be assigned to multiple vlan interfaces provided they have different tags. If you click Network → VLANs → Add VLAN, you will see the screen shown in Figure 5.6a:
NOTE: VLAN tagging is the only 802.1q feature that is implemented. Additionally, not all Ethernet interfaces support full VLAN processing–see the HARDWARE section of vlan(4) for details.
Figure 5.6a: Adding a VLAN
Table 5.6a summarizes the configurable fields.
Table 5.6a: Adding a VLAN
|Virtual Interface||string||use the format vlanX where X is a number representing the vlan interface|
|Parent Interface||drop down menu||usually an Ethernet card connected to a properly configured switch port; if using a newly created lagg device, it will not appear in the drop-down until the FreeNAS® system is rebooted|
|VLAN Tag||integer||should match a numeric tag configured in the switched network|
The parent interface of a vlan has to be up, but it can have an IP address or it can be unconfigured, depending upon the requirements of the VLAN configuration. This makes it difficult for the GUI to do the right thing without trampling the configuration. To remedy this, after adding the VLAN, go to Network → Interfaces → Add Interface. Select the parent interface from the NIC drop-down menu and in the Options field, type up. This will bring up the parent interface. If an IP address is required, it can be configured using the rest of the options in the Add Interface screen.