Docker Community Forums

Share and learn in the Docker community.

How to fix the mac address on custom network

docker

(Gtf21) #1

I have several containers connected to a VPN (to provide a tunnel for ip6 traffic)

container <> network(vpn_connect) <> bridge(br0) <> vpn(tap0) <> world

Now I am fixing the IP addresses on this network so they are easily accessible, but I am unable to fix the mac address. I don’t mind having a generated mac address, but docker engine generates the same mac address for each container on a different host (I have two hosts). This breaks ip6.

I am using ansible to provision, but I can’t find anything in the docker documentation for specifying both the mac address and ip6 address of a container on a custom network (via network connect).