IPv6 sub-delegating a delegated prefix

Hi.

I request and receive a /56 prefix delegation from my ISP. The ISP talks to me on eth0. I have a lan interface, eth1 with a /64 assigned from the /56 block. Similarly I have a wireguard interface assigned with a /64.

What I want to do now is run my 3rd interface 'eth2' delegating another /64 to a 'sub' router. This router is from my ISP and is going to (hopefully) be used purely to provide connectivity to their VOIP service. It needs an IPv6 prefix delegated to it.

I thought that openwrt's odhcpd would do this sort of thing but all it says to me is "DHCPV6 SOLICIT IA_PD from 0003000100a3881352b3 on VOIP: no prefix available"

Clues gratefully received.

ifstatus VOIP
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 1320,
	"l3_device": "eth2",
	"proto": "static",
	"device": "eth2",
	"updated": [
		"addresses"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		{
			"address": "192.168.218.254",
			"mask": 29
		}
	],
	"ipv6-address": [
		
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		{
			"address": "2a02:c7f:f000:f040::",
			"mask": 64,
			"preferred": 3274,
			"valid": 3274,
			"local-address": {
				"address": "2a02:c7f:f000:f040::",
				"mask": 64
			}
		}
	],
	"route": [
		
	],
	"dns-server": [
		
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		
	}
}

Iā€™m no expert, but for the sake of discussion, the sub-router is going to request a /64 from the VOIP interface that itself was only assigned a /64? What if you assign a /60 to VOIP?

I might be showing my ignorance. :lying_face:

You're absolutely right - if I assign a /63 to the interface then it looks like the 'spare' /64 gets delegated onward.

Hmm, I wonder if there's a way of telling openwrt not to assign an address or not 'claim' the /64 and just delegate it.

Is this a bug?

Setting the ip6assign-parameter to a value < 64 will allow the DHCPv6-server to hand out all but the first /64 via DHCPv6-Prefix Delegation to downstream routers on the interface.

If all addresses on an interface have prefixes shorter than /64, then DHCPv6 Prefix Delegation is enabled for downstream routers.

That's all I've come up with so far. I think assigning the prefix is mandatory to allow the downstream PD.

2 Likes

That's pretty definitive. Thanks for finding that and pointing it out to me.

That's correct.

I use /62 for delegating downstream. The router then receives a /63 PD, uses a /64 on the OpenWrt - and one unused.