Passing IPv6 prefix delegations through a downstream router

I'm thinking of restructuring my home network to add another FreeBSD router host between the "general" purpose network and my various lab subnets.

Currently all subnets are directly connected to my single FreeBSD router host, as follows:

Code:
Internet ────── router ───┬─ igb0:    192.168.0.0/24 (general subnet)
                          ├─ lagg0:   10.0.1.0/24 (lab subnet 1)
                          ├─ lagg0.2: 10.0.2.0/24 (lab subnet 2)
                          ├─ lagg0.3: 10.0.3.0/24 (lab subnet 3)
                          └─ lagg0.4: 10.0.4.0/24 (lab subnet 4)

My ISP delegates a native IPv6 /48 prefix, and I'm advertising /64's from this block to my subnets with the following net/dhcp6 configuration:
Code:
# /usr/local/etc/dhcp6c.conf

interface ng0 {
  send ia-pd 0;
};

id-assoc pd 0 {
  prefix ::/48 infinity;
  prefix-interface igb0 {
    sla-id 0;
    sla-len 16;
  };
  prefix-interface lagg0 {
    sla-id 1;
    sla-len 16;
  };
  prefix-interface lagg0.2 {
    sla-id 2;
    sla-len 16;
  };
  prefix-interface lagg0.3 {
    sla-id 3;
    sla-len 16;
  };
  prefix-interface lagg0.4 {
    sla-id 4;
    sla-len 16;
  };
};

The hosts on all subnets use SLAAC for IPv6 configuration.

What I'd like to do instead is organise things like this:

Code:
Internet ── router1 ─── igb0: 192.168.0.0/24 (general subnet) ─── router2 ───┬─ lagg0: 10.0.1.0/24 (lab subnet 1)
                                                                             ├─ lagg0.2: 10.0.2.0/24 (lab subnet 2)
                                                                             ├─ lagg0.3: 10.0.3.0/24 (lab subnet 3)
                                                                             └─ lagg0.4: 10.0.4.0/24 (lab subnet 4)

What I need to work out is how to pass some of the IPv6 /64 prefixes through to router2 to use on the subnets behind it.

The only idea I've come up with is to replicate whats already being done between router1 and the upstream router at the ISP, but between router2 and router1 instead. I'd have to install a DHCPv6 server on router1, listening on the LAN interface, and manually configure it to re-delegate a smaller prefix, say /56, from the /48 that the ISP already delegated, and install a DHCPv6 client on router2 to request that delegation and then assign /64's to the lab VLANs . However, this means having to watch which prefix my ISP assigns, and manually reconfigure the DHCPv6 server if it ever changes. This isn't ideal.

Is there any other way to achieve what I'm after without using a second layer of DHCPv6 server and client, or lots of manual configuration?
 
I've thought about how to approach this situation as well, but the only thing I've come up with is to leave the IPv6 gateway(s) on the router closest to the ISP so that it can use the prefix assigned by the ISP via DHCPv6, and move any IPv4 networks I'd like routed elsewhere further down. In your example, igb0 on router 1 would route the 192.168.0.0/24 network for IPv4, but would also have interfaces for the other 4 subnets so that it can also route IPv6 for them. You might need to get creative with how your VLANs are set up since it looks like your final diagram would have two untagged VLAN 1 networks for 192.168.0.0/24 and 10.0.1.0/24, but I imagine this would be possible if your lagg0 on router 2 was changed to lagg0.2 and the rest were incremented by 1. I'm assuming you're using the same VLAN ID as your subinterface number, but if that's not the case then maybe that isn't an issue here.
 
  • Thanks
Reactions: jem
Back
Top