====== Docker Networks: IPVlan ======
IPVlan Networks are like Virtual Switches on Hyper-V. It allows the containers direct access to the network without NAT or other crap.
It also works with IPv6
[[https://docs.docker.com/network/ipvlan/|Docker Docs]]
==== Setup ====
docker network create -d ipvlan \
-o eth0 \
--gateway=192.168.21.1 \
--subnet=192.168.21.0/24 \
externet
==== VLANs ====
It is also possible to use VLANs for certain containers this way.
docker network create -d ipvlan \
-o eth0.21 \
--gateway=192.168.21.1 \
--subnet=192.168.21.0/24 \
externet
==== IPv6 Dual Stack ====
docker network create -d ipvlan \
-o eth0.21 \
--gateway=192.168.21.1 \
--subnet=192.168.21.0/24 \
--subnet=2001:db8:abc2::/64 --gateway=2001:db8:abc2::22 \
externet_v6