IPv6 routing problem

I've received a native IPv6 /64 subnet from my server provider, but I can't get it to play the way I want it.

I'm running virtual machines, and I want them to have their own public ip(s).

Let's pretend I got the following information:

IPs: 1:1:1:1::/64, gateway: 1:1:1:0::1

Now I want the host machine to have ip 1:1:1:1::1, and the rest routed from eth0 to the internal br0 where all the virtual machines are bridged.

It's possible to ping6 ipv6.google.com from the root machine, so it seems to work so far.

I've enabled routing, and it seems as the packets are properly forwarded from the internal machine (from br0) through eth0 - but nothing more than that... no reply.

Note, eth0 is not a part of br0.

Any ideas?


Solution 1:

Unless your provider really routes your subnet to your host, you'll have to setup your host so that it proxies ICMPv6 neighbourhood discovery (ND) for the IPs of your guests.

Assuming you have been assigned 2001:0DB8:A::/64, your host is 2001:0DB8:A::1 on eth0, and your guest VM uses 2001:0DB8:A::2 (on a virtual bridge br0). To tell your host to proxy ND queries issue the following command:

ip -6 neigh add proxy 2001:0DB8:A::2 dev eth0

Also make sure that you have fowarding and ND proxying enabled for IPv6:

sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -w net.ipv6.conf.all.proxy_ndp=1

On the guest, you either use the link-local address of the host on br0 as default gateway. Or you add an additional IP on the br0 interface on the host, and use that as default gateway in the guests.