Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when updating IPv6 gateway #1142

Closed
robbertkl opened this issue Apr 28, 2016 · 1 comment
Closed

Error when updating IPv6 gateway #1142

robbertkl opened this issue Apr 28, 2016 · 1 comment

Comments

@robbertkl
Copy link

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"
@aboch
Copy link
Contributor

aboch commented Apr 28, 2016

Thanks for reporting this. It's a bug.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants