In a previous post, I discussed my setup of a Synology NAS. I have multiple VLANs at home, and I find a need to connect my Synology NAS to some of them. My NAS device has two network interfaces and can be connected to different VLANs on each interface. However, I have configured dynamic link aggregation which offers higher aggregate throughput across multiple users and automatic failover, and I do not want to be limited to only two VLANs that I can connect to.

Synology DSM supports VLAN, so I can configure my switch ports to which NAS is connected to a trunk port (i.e., support multiple VLANs if the connected device can explicitly tag packets with VLANs) instead of being a VLAN-aware port (i.e., the switch adds VLAN tags to packets received from the interface so the connected device does not have to know about VLAN). But make sure you can access your Synology web interface on the default VLAN.

Configure the “bond” interface (link aggregation) to have VLAN enabled with the first VLAN. In my case, it is VLAN 10. Click “Apply” and the NAS is now connected to my VLAN 10. Now, we need to duplicate config files via SSH as this is not supported by Synology DSM’s web interface.

Go to /etc/sysconfig/network-scripts as root. Along with ifcfg-bond0, ifcfg-eth0 and ifcfg-eth1, You should find an ifcfg-bond0.<VLAN> file there, such as ifcfg-bond0.10 for VLAN 10. Then copy this file by replacing the <VLAN> section with your next VLAN, such as VLAN 20: cp ifcfg-bond0.10 ifcfg-bond0.20.

Now you should edit ifcfg-bond0.20 with vi to correctly configure it. You should rename DEVICE to bond0.<VLAN>, set the correct VLAN_ID, and correct interface address and network mask. After edit, the file content should look like this:

NETMASK=<mask for VLAN 20>

Save and edit vi.

Then you can either reboot the NAS or restart its network stack with /etc/ restart. Then if you refresh your DSM web interface, you should see two Bond 1 interfaces with different IP addresses and VLAN IDs! Your NAS is now accessible by both addresses in two VLANs.

Further Reads

This is the post series. Other posts can be found under HomeNetwork tag.