添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I ran docker daemon for using it with global IPv6 for containers:

docker daemon --ipv6 --fixed-cidr-v6="xxxx:xxxx:xxxx:xxxx::/64"

After it I ran docker container:

docker run -d --name my-container some-image

It successfully got Global IPv6 address( I checked by docker inspect my-container). But I can't to ping my container by this ip:

Destination unreachable: Address unreachable

But I can successfully ping docker0 bridge by it's IPv6 address. Output of route -n -6 contains next lines:

    Destination                     Next Hop                   Flag Met Ref Use If
    xxxx:xxxx:xxxx:xxxx::/64         ::                         U    256 0     0 docker0
    xxxx:xxxx:xxxx:xxxx::/64         ::                         U    1024 0     0 docker0
    fe80::/64                        ::                         U    256 0     0 docker0

docker0 interface has global IPv6 address:

inet6 addr: xxxx:xxxx:xxxx:xxxx::1/64 Scope:Global

xxxx:xxxx:xxxx:xxxx:: everywhere is the same, and it's global IPv6 address of my eth0 interface

Does docker required something additional configs for accessing my containers via IPv6?

Assuming IPv6 in your guest OS is properly configured probably you are pinging the container not from host OS, but outside and network discovery protocol is not configured. Other hosts does not know if your container is behind of your host. I'm doing this after start of container with IPv6 (in host OS) (in ExecStartPost clauses of Systemd .service file)

  • /usr/sbin/sysctl net.ipv6.conf.interface_name.proxy_ndp=1
  • /usr/bin/ip -6 neigh add proxy $(docker inspect --format {{.NetworkSettings.GlobalIPv6Address}} container_name) dev interface_name"
  • Beware of IPv6: docker developers say in replies to bug reports they do not have enough time to make IPv6 production-ready in version 1.10 and say nothing about 1.11.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.