I have another idea which is pretty “weird” but in some senses simpler.
Rather than trying to spread the /64 addressing across two interfaces, I’ve tested this approach that works.
- Setup lxcbr0 with the
2a00:1234:1:5678::1/64
address and remove the2a00:1234:1:5678::1/128
address from the host’s eth0 interface (so that its just left with link-local address and no global addresses). - Ensure eth0 on the host doesn’t accept router advertisements.
- You should still be able to setup the static and default IPv6 routes to
2a00:1234:1::1
as before. - Add an IP neigh proxy for your lxcbr0 IP6 address on the host’s eth0.
- Check you can ping your default gateway and an external IPv6 address (the host should use the IPv6 address on the lxcbr0 interface as the source address of packets leaving eth0).
Now for the containers:
- They should be able to ping lxcbr0’s IPv6 address normally.
- You will need to add static IP neigh proxy entries for each container’s IP (or automate it) on the LXD host’s eth0 interface.
This would allow full communication (it works in my test lab).
LXD host:
ip a
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:16:3e:36:04:d4 brd ff:ff:ff:ff:ff:ff
inet 10.128.213.2/24 brd 10.128.213.255 scope global enp5s0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe36:4d4/64 scope link
valid_lft forever preferred_lft forever
3: lxdbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:12:c7:8f brd ff:ff:ff:ff:ff:ff
inet 10.237.24.1/24 scope global lxdbr0
valid_lft forever preferred_lft forever
inet6 fd42:b545:2e58:ec06::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe12:c78f/64 scope link
valid_lft forever preferred_lft forever
ip -6 r
::1 dev lo proto kernel metric 256 pref medium
fd42:b545:2e58:ec06::1 dev enp5s0 metric 1024 pref medium
fd42:b545:2e58:ec06::/64 dev lxdbr0 proto kernel metric 256 pref medium
fe80::/64 dev enp5s0 proto kernel metric 256 pref medium
fe80::/64 dev lxdbr0 proto kernel metric 256 pref medium
default via fd42:b545:2e58:ec06::1 dev enp5s0 metric 1024 pref medium
ip neigh show proxy
fd42:b545:2e58:ec06::2 dev enp5s0 proxy
fd42:b545:2e58:ec06:216:3eff:fe94:4d2f dev enp5s0 proxy
lxc network show lxdbr0
config:
ipv4.address: 10.237.24.1/24
ipv4.nat: "true"
ipv6.address: fd42:b545:2e58:ec06::2/64
ipv6.nat: "false"
description: ""
name: lxdbr0
type: bridge
lxc ls
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| c1 | RUNNING | 10.237.24.80 (eth0) | fd42:b545:2e58:ec06:216:3eff:fe94:4d2f (eth0) | CONTAINER | 0 |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
Container:
lxc exec c1 -- ip a
4: eth0@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:94:4d:2f brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.237.24.80/24 brd 10.237.24.255 scope global dynamic eth0
valid_lft 2890sec preferred_lft 2890sec
inet6 fd42:b545:2e58:ec06:216:3eff:fe94:4d2f/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 3146sec preferred_lft 3146sec
inet6 fe80::216:3eff:fe94:4d2f/64 scope link
valid_lft forever preferred_lft forever
lxc exec c1 -- ip -6 r
fd42:b545:2e58:ec06::/64 dev eth0 proto ra metric 100 expires 3130sec pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::216:3eff:fe12:c78f dev eth0 proto ra metric 100 expires 1330sec mtu 1500 pref medium