I am using docker on an IPv6 only host.
I did it as document
/etc/docker/daemon.json
{
"ipv6": true,
"fixed-cidr-v6": "xxxx:xxxx:xxxx:xxxx::/64"
}
Restart docker.
Create a new network
docker network create --ipv6 --subnet=xxxx:xxxx:xxxx::/64 awx
Connect a running application inside docker to the new network
docker network connect awx awx_web
From here I know should do these two things
- /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"
I ran ip -6 route
got
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:xxxx::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:xxxx::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:xxxx::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:xxxx::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:xxxx::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:xxxx::/19 dev lo metric 1024 error -113 pref medium
xxxx:xxxx:xxxx::/64 dev br-xxxxxxxx proto kernel metric 256 pref medium
xxxx:xxxx:xxxx::/64 dev br-xxxxxxxx metric 1024 pref medium
xxxx:xxxx:xxxx:xxxx::/64 dev lan0 proto kernel metric 256 pref medium
xxxx:xxxx:xxxx:xxxx::/64 dev docker0 proto kernel metric 256 pref medium
xxxx:xxxx:xxxx:xxxx::/64 dev docker0 metric 1024 pref medium
unreachable xxxx:xxxx::/32 dev lo metric 1024 error -113 pref medium
fb80::/64 dev lan0 proto kernel metric 256 pref medium
fb80::/64 dev docker0 proto kernel metric 256 pref medium
fb80::/64 dev br-xxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev br-xxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev br-xxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev br-xxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev br-xxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev xxxxxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev xxxxxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev xxxxxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev xxxxxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev xxxxxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev br-xxxxxxxx proto kernel metric 256 pref medium
fb80::/64 dev xxxxxxxxxxx proto kernel metric 256 pref medium
default via xxxx:xxxx:xxxx:xxxx::ffff dev lan0 metric 1 pref medium
Then ran
# /usr/sbin/sysctl net.ipv6.conf.lan0.proxy_ndp=1
(sccessed)
# ip -6 neigh add proxy $(docker inspect --format {{.NetworkSettings.Networks.awx.GlobalIPv6Address}} awx_web) dev lan0
(sccessed)
I check IPv6Address value in awx_web container
# docker inspect --format {{.NetworkSettings.Networks.awx.GlobalIPv6Address}} awx_web
xxxx:xxxx:xxxx::2
Login to the web container check ip a
also can find this IP(xxxx:xxxx:xxxx::2). But can’t ping remote server by IPv6 in the container.
Does the dev lan0
right in the ip -6 neigh add proxy
command?
Why the networks didn’t bind together?