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
└─> docker run --rm -ti --network external_ipv6 alpine
docker: Error response from daemon: failed to create endpoint confident_gould on network external_ipv6: NetworkDriver.CreateEndpoint: failed to get initial IP address via DHCP: context deadline exceeded.
my bridge interface works fine, as it has a dhcp6 address from my /64 subnet.
└─> ping6 ipv6.google.com
PING ipv6.google.com(iad30s43-in-x0e.1e100.net (2607:f8b0:4004:82f::200e)) 56 data bytes
64 bytes from iad30s43-in-x0e.1e100.net (2607:f8b0:4004:82f::200e): icmp_seq=1 ttl=118 time=17.6 ms
64 bytes from iad30s43-in-x0e.1e100.net (2607:f8b0:4004:82f::200e): icmp_seq=2 ttl=118 time=17.4 ms
64 bytes from iad30s43-in-x0e.1e100.net (2607:f8b0:4004:82f::200e): icmp_seq=3 ttl=118 time=18.5 ms
64 bytes from iad30s43-in-x0e.1e100.net (2607:f8b0:4004:82f::200e): icmp_seq=4 ttl=118 time=18.1 ms
The text was updated successfully, but these errors were encountered:
-o ipv6 will use DHCPv6 to obtain ipv6 address. However, for router it is often the case that ipv6 address is obtained through SLAAC, and is configured by kernel itself instead of docker-net-dhcp's udhcpc6.
When router is configured to be Stateless DHCPv6, DHCPv6 is just used to fetch information like DNS servers, but not IPv6 address, thus will result in the error failed to get initial IP address via DHCP.
To obtain an ipv6 address, either to use Stateful DHCPv6 with configured IPv6 address pool (then use -o ipv6=true to use udhcpc6), or use linux kernel's automatic SLAAC configuration (with -o ipv6=false or not set).
However, for docker container's SLAAC to work, you need to modify some sysctl options, because automatic SLAAC is disabled for docker's deault sysctl setting (see docker/for-linux#1373). There are two ways to fix it:
--sysctl net.ipv6.conf.all.forwarding=0: the easiest way. And
--sysctl net.ipv6.conf.{main interface in container}.accept_ra=2: the proper way if you want ipv6 forwarding. Note allCANNOT be used here because of a linux kernel bug: see here and here
my bridge interface works fine, as it has a dhcp6 address from my /64 subnet.
The text was updated successfully, but these errors were encountered: