[lxc-users] Static IPv6 address does not work after container startup

MegaBrutal megabrutal at gmail.com
Wed Jan 22 06:18:33 UTC 2014


Hello,

I have an LXC container with static IPv6 address configured like this:

lxc.network.type = veth
lxc.network.hwaddr = 00:16:3e:76:13:c6
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv6 = 2001:XXXX::XXXX:XXXX/64

For some reason, when I start the container, this static IPv6 address
doesn't work. However the same interface (seen as eth0 within the
container) picks another IPv6 address for itself from the MAC address, and
that address works correctly. If I add any other addresses while the
container is running, they work perfectly. When I delete the static address
from the interface and then add it again, it works. But it doesn't work
right after the container boots.

With tcpdump within the container, I determined that ICMP6 echo requests
arrive to the container, but the container doesn't reply on that address.
Any other addresses added after container bootup are properly pingable.
This is really strange, as I experience this on the very same interface.


$ ip -6 addr show

31: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:XXXX::16:3eff:fe76:13c6/64 scope global dynamic
       valid_lft 85692sec preferred_lft 13692sec
    inet6 2001:XXXX::XXXX:XXXX/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe76:13c6/64 scope link
       valid_lft forever preferred_lft forever


$ ip -6 route

2001:XXXX::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256
default via fe80::XXXX:XXff:feXX:XXXX dev eth0  proto ra  metric 1024
expires 423sec


/etc/network/interfaces - hopefully auto-generated, as I don't remember
modifying it... however it's possible that I did:

auto eth0
iface eth0 inet dhcp

iface eth0 inet6 static
    address 2001:XXXX::XXXX:XXXX
    netmask 64


Other containers those don't have a static IPv6 set up work correctly with
SLAAC + privacy extensions.

I have no idea what might cause the container to not work with the
statically set IPv6 address. Actually, I want it to only use this address,
I don't even want it to pick the MAC-based address with SLAAC. I already
disabled IPv6 privacy extensions within the container.

Is it an LXC bug or am I overlooking something?

Ask away if you'd like to see more data.


Regards,
MegaBrutal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140122/07e7e075/attachment.html>


More information about the lxc-users mailing list