1

I now know the answer: I did a bad mistake and did not even tell you. There was also a running radvd for router advertisment and instead of RA'ing a 64-net I was RA'ing a 56-net. So the router and/or the gateway always asked a who has... solicitation message, which means that it thought it is in the same subnet as the ping'ed server.

I am playing around with some IPv6 routing and addresses and facing a weird problem and can't figure out. I can only ping from one direction but not the other way around.

Let's say I have 3 PC's and a router:

Client[eth0] <---> [lan1]Router[wan] <---> [box0]Gateway[eth0] <---> [eth0]Server

The Client, Gateway and Server are LXC Container and are working totally fine with IPv4!

The Gateway is running a DHCPv6 server which delegates a prefix (2001:db8:0:1::/56) through interface box0 so the router gets an IP-address (2001:db8:0:1:8856:7cf8:8e46:d8cb) and the client configures itself.

The interface box0 on the gateway has a static IP from the same subnet: 2001:db8:0:1::1234:1.

The interface eth0 on the gateway has a static IP from another subnet: 2001:db8:0:2::4321:1. See the changed 2 in the prefix.

The interface eth0 of the server has a static IP from the same subnet as eth0@gateway has: 2001:db8:0:2::4321:2

I first enabled IPv6 forwarding with

sysctl net.ipv6.conf.all.forwarding=1

Now I did set up a route on the gateway which leads into the /56 subnet

ip -6 route add 2001:db8:0:1::/56 via 2001:db8:0:1:8856:7cf8:8e46:d8cb

And a default route for the server

ip -6 route add default via 2001:db8:0:2::4321:1

My Problem is: I can ping everything from the server side (except the client because the router blocks it) but I'm unable to ping anything behind eth0@gateway from the router side.

Did you encounter this, for me, strange behaviour? Do you need further information, like routing table etc.?

Kev Inski
  • 141
  • 9
  • 1
    The routing on the servers should be setup automatically. IPv6 has a lot more auto-configuration than IPv4. Try removing the route you manually added. – BillThor Aug 17 '16 at 13:09
  • The DHCP server only runs on box0@gateway and not on eth0. So I need to set it up manually. I know I can run a second DHCP server but it is not necessary for me in this scenario. If I remove the route I have to use `ping6 -I eth0 ...` on the server to ping the gateway. – Kev Inski Aug 18 '16 at 06:18

1 Answers1

1

The answer is pretty simple and is traced back to missconfiguration.

There was also a running radvd for router advertisement and instead of RA'ing a 64-net I was RA'ing a 56-net. So the router and/or the gateway always asked a who has... solicitation message, which means that it thought it is in the same subnet as the ping'ed server.

Kev Inski
  • 141
  • 9