You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
The text was updated successfully, but these errors were encountered:
Even though the default gw selection is based on IPv4 only, connecting to a new network should not fail just because those networks also provide IPv6 connectivity.
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:The text was updated successfully, but these errors were encountered: