Prefix Delegation: Use only part of prefix and redistribute in mesh network

I get a prefix assigned from my Fritz!Box /64 on my wan interface.

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'

I would like to divide that prefix I get and redistribute it in a mesh network. Not sure how I can do this. Or, I would like to get multiple /64 prefixes assigned and only use one.

It is a Layer3 Mesh-Network. :wink:
I'm using olsrv2, but I could switch to babel.

  +----------+     +-------+     +------------+    +-----------+
  | Fritz!Box+-----+OpenWrt+-----+ Mesh|Hop|1 +----+Mesh|Hop|2 |
  +----------+     +-------+     +------------+    +-----------+

I will try looking at dhcpv6 relay. But maybe there is another way?

I tried something like

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'
	option reqprefix '64'
	option ip6assign '128'

but it does not work.

Related Links:

Ask your ISP to give you a proper prefix or get another ISP. /64 is the smallest size each subnet should have, so you cannot break it down into smaller subnets. While technically it's possible to have smaller subnets, the IPv6 spec officially doesn't support it and stuff can break. For example, SLAAC doesn't work with a smaller than /64 subnet and there's probably more stuff that is broken.


I think the ISP assigned subnet prefix is bigger, but I only get a 64 via dhcpv6. :confused: Can I request just several 64? Or can I just use the prefix without any dhcp configuration?



option reqprefix '60' (or 62, or…) should work, assuming Fritz!OS honours the prefix request (you're at AVM's mercy here, not a whole lot you can do from OpenWrt's side).


In the Fritz!Box, please check:
Which size is the prefix assigned by the ISP?
Did you enable downstream prefix delegation for the LAN?

 -> Netzwerk
 -> Netzwerkeinstellungen
 -> IPv6-Adressen
 -> DHCPv6-Server im Heimnetz

Thanks everyone it's working! :slight_smile: I want to renew the config and afterwards I will post my config here, so people that have the same question can just use this thread.


Oh no. I slept and woke up and everything is broken again. xD

The prefix is not static... So my static configuration will always fail after a while. :confused:
Anyone with experience with hnet? I think it is capable of automated prefix delegation in layer 3 networks?

My configuration until now was:

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'
	option reqprefix '57'

Look into ip -6 route to see what prefix u got assigned.
Redistribute it by setting

ip6prefix '2001::/60` ...

on all other routers.

Further I have to enable lan-import plugin so my dhcp network is originated.

config lan_import
	list 'name' '0'
	option 'prefix_length' '64'

I do not understand how I can accomplish the same with hnet. :confused:

I wrote a script with the help of babel routing protocol and source specific routing, that allows you to automatically adopt the gateway! :smiley:

comments welcome

1 Like