Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xirixiz/0964bd49bd5fa3e478744f81465fca5a to your computer and use it in GitHub Desktop.
Save xirixiz/0964bd49bd5fa3e478744f81465fca5a to your computer and use it in GitHub Desktop.
Docker containers using VLAN network on Synology DSM 6.X
First we need to create the VLAN on the Synology from the command line:
See: https://nielshagoort.com/2016/03/30/synology-vlan-tagging/
Then add Network to Docker using maclvan driver
See: https://docs.docker.com/engine/userguide/networking/get-started-macvlan/#macvlan-8021q-trunk-bridge-mode-example-usage
Details...
/etc/sysconfig/network-scripts
DEVICE=bond0.99
VLAN_ROW_DEVICE=bond0
VLAN_ID=99
BOOTPROTO=dhcp
ONBOOT=yes
BONDING_OPTS="mode=2 use_carrier=1 miimon=100 updelay=100"
USERCTL=no
docker network create -d macvlan \
--subnet=192.168.50.0/24 \
--gateway=192.168.50.1 \
-o parent=eth0.50 macvlan50
docker network create -d macvlan \
--subnet=172.7.0.0/24 \
--gateway=172.7.0.1 \
-o parent=bond.99 secure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment