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

After enable ipv6 in the docker, it works for only static ipv6 address, but not DHCP ipv6 address #2675

Open
WallaceSUI opened this issue Mar 24, 2023 · 1 comment

Comments

@WallaceSUI
Copy link

Warning
libnetwork was moved to https://github.com/moby/moby/tree/master/libnetwork

libnetwork has been merged to the main repo of Moby since Docker 22.06.

The old libnetwork repo (https://github.com/moby/libnetwork) now only accepts PR for Docker 20.10,
and will be archived after the EOL of Docker 20.10.

Sorry to trouble all of you.
Recently, I follow the guidance to enable ipv6 for the docker in my linux machine

I directly edit the /etc/docker/daemon.json file for adding these parameters:
"ipv6": true,
"ip6tables": true,
"experimental": true,
"fixed-cidr-v6": "2001:db8:abc1::/64"
Then just restart the docker.

Then for example, here are two ipv6 addresses
static ipv6 address A
DHCP(dynamic) generated ipv6 address B

Case1:
When I use "ping6 A" in my linux machine, it works with response

Case2:
When I use "ping6 B" in my linux machine, it works but should have a zone identifier behind, like "B%eth0"

Case3:
when I use "docker exec -it myDocker bash" to get inside a docker, and then run "ping6 A", it works with response

Case4:
when I use "docker exec -it myDocker bash" to get inside a docker, and then run "ping6 B", it always throws the error message "ping6: sendto: Invalid argument"
Then I also try "ping6 B%eth0", it will be time out without any response.

For case4, I do not understand, for DHCP generated ipv6 address, why we cannot use it or ping6 it inside the docker? Why the docker cannot automatically assign a zone identifier to it? what is the problem here? how to fix it?

Thanks a lot. Really need your help.

@kapiteined
Copy link

kapiteined commented Mar 25, 2023 via email

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