-
Notifications
You must be signed in to change notification settings - Fork 885
Closed
Description
For IPv4 I've noticed that when connected to multiple (user-defined) networks, NAT and gateway are always configured for the network with the alphabetically lowest network name (see #1141).
If a running container gets connected to a new network (docker network connect <network> <container>), and this network's name comes before the current "gateway network", the default gateway in the controller is changed to the new network's gateway. This, however, does not work for IPv6:
docker network create --ipv6 --subnet=fd00:aaa::/48 aaa
docker network create --ipv6 --subnet=fd00:bbb::/48 bbb
docker run -d --name=test1 --net=aaa alpine sleep 10
docker network connect bbb test1
# no problem here, because it keeps gateway of "aaa"
docker run -d --name=test2 --net=bbb alpine sleep 10
docker network connect aaa test2
Error response from daemon: failed to set IPv6 gateway while updating gateway: file exists
# this breaks, cannot change gateway from "bbb" to "aaa"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels