Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


synology_multi_vlans

Synology - Multiple VLANs

  • Configure your first VLAN via the WebUI.
  • Configure and run script as many times you need VLANs. You may need to change eth0 to bond0:
    interface=eth0
    vlan=5
    ipaddr=1.2.3.4
    broadcast=1.2.3.255
    netmask=255.255.255.0
    
    vconfig add $interface $vlan
    ifconfig $interface.$vlan $ipaddr broadcast $broadcast netmask $netmask
    cat > /etc/sysconfig/network-scripts/ifcfg-$interface.$vlan << END
    DEVICE=$interface.$vlan
    VLAN_ROW_DEVICE=$interface
    VLAN_ID=$vlan
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=$ipaddr
    NETMASK=$netmask
    END
synology_multi_vlans.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1