Enabling mutliple VLANs from the WebUI appears to not be possible. Luckily since it's linux under the hood, we can just edit the config files and add multiple vlans and restart the network service.
First, edit the current config for the network interface, in my case 'eth0':
root@synology:~# cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
EOF
Now, create the config files for each vlan. I'll create them in a simple for-loop using bash:
root@synology:~# for vlan in 10 11 12 13; do cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0.${vlan}
DEVICE=eth0.${vlan}
VLAN_ROW_DEVICE=eth0
VLAN_ID=${vlan}
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.31.${vlan}.248
NETMASK=255.255.255.0
IPV6INIT=off
EOF
done
After all the VLAN-Definitions have been created, make sure to restart the network service:
root@synology:~# /etc/rc.network restart
Once the Service is restarted, the vlans should be present:
root@synology:~# ip -c link show | grep -iE 'eth0'
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
6: eth0.10@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
7: eth0.11@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
8: eth0.12@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
9: eth0.13@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
Feel free to comment and / or suggest a topic.
Comments
Post a Comment