VLAN (Virtual Local Area Network) can be used to create different network segments for different devices to communicate with each other as if they were in a private network regardless of their physical location. Devices joined to a VLAN can only be accessed by other devices of the same VLAN ID.
QNAP NAS can be integrated in a VLAN by using the VLAN feature. By adding the NAS to the VLAN, only the devices using the same VLAN are able to access the NAS. This increases the data security of the NAS.
This tutorial shows how to set up a VLAN in a VMware vSphere environment and how to join the NAS to a VLAN to allow private access to the NAS.
Follow the steps below to integrate the NAS to your virtualization environment by VLAN.
1. Configure VLAN on a switch
To allow VLAN packets to be transmitted through the switch or router, you may need to configure port settings. In this example, we use a Cisco 2960G switch and have configured the network port to support 802.1Q. After logging into the Cisco switch with the administrator's account, enter the following commands (where XX is the specific network port number for VLAN communication).
# configure terminal
# interface gigabitEthernet 0/XX
# switchport mode trunk
Please refer to the user manual of your switch for VLAN configuration.
2. Enable VLAN on QNAP NAS
Note: VLAN is only supported by x86-based QNAP NAS.
Log into the NAS as an administrator, go to "Main Menu" > "Network & Virtual Switch" > "Interfaces", choose the network interface to add a VLAN ID, and click "Configure".
- If your NAS only has two LAN ports, we recommend enabling VLAN on only one network interface first. If a wrong VLAN is chosen and you cannot connect to the NAS via VLAN, you can connect to the NAS using the second network interface.
- If you change the VLAN on every network interface and lose connectivity, press the reset button on the NAS for 3 seconds to restore the default network configuration.
On the "Configure" page, select "VLAN" and click "Enable VLAN (802.1Q)". Enter the VLAN ID (a value between 0-4094) and click "Apply"
3. Configure VMware vSphere VLAN
In the vSphere management tool, you can add a new virtual switch in the virtual server and configure the VLAN settings as shown below. After finishing the configuration, open the virtual server management console. You can set up a datastore that connects to the NAS, or use the network command in the console to test the connection. Please refer to the manual of your virtualization system for details.