How configure docker with ipv6?


I was following the steps of the official docker documentation ( about to enable ipv6 in docker and the containers have ip6 but when I execute ping6, all packages are lost. The container does not have a connection using ip6 with the external hosts.

I’ve configured the next in the daemon.json:

"ipv6": true,
"fixed-cidr-v6": "xxxx:xxxx:xxxx/124"

I use /124 because DigitalOcean only give 14 ipv6 addresses. Also, I execute the following commands too:

net.ipv6.conf.default.forwarding = 1

The container has a ip6:

18: eth0@if19: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 state UP
    inet6 2604:a880:2:d0::a02:f002/124 scope global flags 02
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe11:2/64 scope link
       valid_lft forever preferred_lft forever

And when I execute:


The result is:

--- ping statistics ---
9 packets transmitted, 0 packets received, 100% packet loss

Can somebody help me?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The fixed-cidr-v6 subnet should be minimum /80