1

I'm using an ubuntu:xenial spawned container in LXD/LXC and can't work out why it keeps booting with an IPv6 link local address (fe80::). If it's at all relevant, I'm also using Xenial as the container host.

There are no IPv6 entries in /etc/hosts. There are no IPv6 addresses defined in any of /etc/network/interfaces*.

I've added net.ipv6.conf.*.disable_ipv6=1 to /etc/sysctl.conf and although this works to clear the assigned link local addresses when you run sysctl -p after boot, it doesn't seem to run during boot so the container starts with the IPv6 link local addresses assigned.

I've added ipv6.disable=1 ipv6.disable_ipv6=1 to GRUB_CMDLINE_LINUX_DEFAULT inside the container in /etc/default/grub.d/50-cloudimg-settings.cfg but that seems to do nothing. This makes sense as there's no update-grub2 inside these containers so presumably Grub plays no part in the container startup process. I haven't managed to work out how the container decides what to try and enable or disable inside it's view of the kernel, otherwise I would try putting a setting there.

It seems I'm missing some fundamental understanding of what's causing these link local addresses to get assigned during container boot.

Any ideas or suggestions?

Please don't waste time preaching how I should learn to love IPv6. My employer is not going to use IPv6 for a long time as there is so much legacy network connected equipment that is extremely expensive and will never work on IPv6 that you would be wasting your typing.

0

An answer (or kludge), but not what I consider the answer is to add /sbin/sysctl -p to /etc/rc.local.

I hope there's a more elegant solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.