Docker Community Forums

Share and learn in the Docker community.

Configuring IPv6 with Docker Toolbox

I am trying to get some basic IPv6 connectivity working with Docker Toolbox and VirtualBox.
I add the following arguments when the VM is created:

--engine-opt ipv6=true \
--engine-opt fixed-cidr-v6="d0c::/64" \

I add the following to on the VM: ip -6 addr add F00:FACE::101/64 dev eth1
I edit the VirtualBox Adapter on Windows and add an IPv6 address: F00:FACE::100

I observe the following:

  • I can ping F00:FACE::100 from the VM
  • I can ping F00:FACE::101 from Windows

I launch a Docker container based on ubuntu and install various packages.
Now I observe the following:
I can ping6 F00:FACE::101 (VM) from the container
I can ping (Windows) from the container.
I CANNOT ping6 F00:FACE::100 (Windows) from the container

In Wireshark I can see that the source address of ipv4 pings is
But interestingly I see that the source address of ipv6 pings is d0c::242:ac11:2 – my container’s IP address.

Is there something required in iptables to get this to work?
Is the problem that Windows doesn’t know how to route a response back to d0c::242:ac11:2?

Update: I do the following on Windows:
netsh interface ipv6 add route d0c::/64 26 F00:FACE::101
I can now access Windows from inside a container. Is it necessary to do this? Or is there some IP masquerade that should be going on. Seems I don’t have to do this for IPv4.

Thanks for any help!

I have learned that routing rules will be required in most cases. If there are no routing rules in place the IPv6 stack will attempt to learn the owner of the IPv6 source address by using NDP (neighbor discovery protocol). Unless you configure the NDP Proxy as described on the Docker IPv6 page the containers cannot respond to these and hence will be unreachable.

There is an open source project that configures NAT for IPv6 similar to how it is done for IPv4. Also there has been a lot of discussion on a few Docker issues about providing a NAT option to make IPv6 work “out of the box”. But for deploying IPv6 in a real network routing should be set up as per the Docker IPv6 docs.