[lxc-users] configuring ipv6 from container config file

Richard Hector richard at walnut.gen.nz
Sat Feb 9 03:45:21 UTC 2019


Hi all,

I have 2 similar container hosts - both debian stretch, both the same
lxc version.

I'm not using lxd.

On one, all my containers have their ip addresses configured via the
container config files, and I've been able to add ipv6 addresses that
way and it works fine.

On the other, I used to set up the ip addresses within the container
(/etc/network/interfaces). When I add v6 on those, by that method, it's
fine. More recent containers have been set up using the container config
file, and ipv4 works but ipv6 doesn't.

I can't see any obvious difference between the two hosts.

Any tips on where I should be looking?

Are there general preferences for each way of configuring networking?

Here's a section of a sample config that doesn't work:

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 192.168.122.112/24
lxc.network.ipv4.gateway = 192.168.122.1
lxc.network.ipv6 = fd75:5198:8dc2:7905::70/64
lxc.network.ipv6.gateway = fd75:5198:8dc2:7905::1

As I say, IPv4 is working, and has been for ages. IPv6 is newly added,
and doesn't.

192.168.122.1 and fd75:5198:8dc2:7905::1 are both configured on the br0
in the host.

Cheers,
Richard


More information about the lxc-users mailing list