Community discussions

MikroTik App
 
ech1965
just joined
Topic Author
Posts: 23
Joined: Wed Mar 20, 2019 3:53 pm

IPV6 RB4011 as Subrouter in DHCP-PD chain: pool prefix-length:68

Fri Apr 16, 2021 5:54 pm

( cross posted in reddit):
https://www.reddit.com/r/mikrotik/comme ... hain_pool/

Mysetup (homelab)
  • ISP supplies a /56 IPV6 though Prefix delegation ( over IPV4 PPPOE)
    internet facing router is opnsense.
    IPV6 is OK on OPENSENSE interfaces ( using Track interface and setting prefix id to > 0x80)
    On of the OPENSENSE interface is a TRANSIT vlan connected to a RB4011
    DHCPV6 server is configured on the TRANSIT interface to delegate a /60 prefix
I'd like the opnsense to delegate to the RB4011 a /60 ( 16 networks).

Here is part of the rb4011 config
/ipv6 dhcp-server
add address-pool=TRANSIT interface=LAN name=dhcpv6_LAN
add address-pool=TRANSIT interface=INT name=dhcpv6_INT
add address-pool=TRANSIT interface=EXT name=dhcpv6_EXT
/ipv6 address
add address=::1 from-pool=TRANSIT interface=LAN
add address=::1000:0:0:1 from-pool=TRANSIT interface=INT
/ipv6 dhcp-client
add add-default-route=yes interface=TRANSIT pool-name=TRANSIT pool-prefix-length=48 prefix-hint=::/60 request=address,prefix
/ipv6 nd
set [ find default=yes ] mtu=1480
add interface=EXT mtu=1480
add interface=INT mtu=1480
add interface=LAN mtu=1480
/ipv6 settings
set accept-router-advertisements=yes
[admin@RB-01] /ipv6> pool/print
Flags: D - DYNAMIC
Columns: NAME, PREFIX, PREFIX-LENGTH, EXPIRES-AFTER
  #     NAME     PREFIX                    PR  EXPIRES-
  0  D  TRANSIT  2a02:xxxx:yyyy:3250::/60  68  1h49m27s
[admin@RB-01] /ipv6> address/print
12   G  2a02:xxxx:yyyy:3250::1/64       TRANSIT  LAN           yes
13   G  2a02:xxxx:yyyy:3250:1000::1/64  TRANSIT  INT           yes
In opnsense,
for an unknown reason, the pool is created with a prefix-length of 68.

The addresses extracted from the pool are then in the same /64 subnet instead of from different /64

I'd expect something along the line of
LAN: 2a02:xxxx:yyyy:3250::1/64
INT: 2a02:xxxx:yyyy:3251::1/64
Any Idea ?
 
ech1965
just joined
Topic Author
Posts: 23
Joined: Wed Mar 20, 2019 3:53 pm

Re: IPV6 RB4011 as Subrouter in DHCP-PD chain: pool prefix-length:68

Fri Apr 16, 2021 6:49 pm

Quick follow up

If I force the pool prefix length with
/ipv6/pool> set 0 prefix-length=64
before assigning addresses, it works ( interfaces get /64 addresses
  12   G  2a02:xxxx:yyyy:3240::1/64     TRANSIT  LAN           yes
  13   G  2a02:xxxx:yyyy:3241::1/64     TRANSIT  INT           yes
  14   G  2a02:xxxx:yyyy:3242::1/64     TRANSIT  EXT           yes
  
but this setting is not persistant ( maybe because the pool is dynamic): if I disable the dhcpclient then reenable it .. addreses are wrong again.
What I'd need is a way to force the prefix-length of the dynamic pool.
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1347
Joined: Mon Sep 23, 2019 1:04 pm

Re: IPV6 RB4011 as Subrouter in DHCP-PD chain: pool prefix-length:68

Fri Apr 16, 2021 8:20 pm

[...]
Here is part of the rb4011 config
[...]
/ipv6 dhcp-client
add add-default-route=yes interface=TRANSIT pool-name=TRANSIT pool-prefix-length=48 prefix-hint=::/60 request=address,prefix
[...]
for an unknown reason, the pool is created with a prefix-length of 68.
The addresses extracted from the pool are then in the same /64 subnet instead of from different /64
Any Idea ?
Quick follow up
If I force the pool prefix length with
/ipv6/pool> set 0 prefix-length=64
before assigning addresses, it works ( interfaces get /64 addresses
[...]
but this setting is not persistant ( maybe because the pool is dynamic): if I disable the dhcpclient then reenable it .. addreses are wrong again.
What I'd need is a way to force the prefix-length of the dynamic pool.
Well it's kinda obvious since your settings try to create the pool with /48 which ain't possible to get out of an /60. Recheck your dhcp-client settings.
And fix your config while you recheck your dhcp-client settings. *pool-prefix-length=64
Nothing unknown here.
Last edited by Znevna on Sat Apr 17, 2021 1:19 pm, edited 1 time in total.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11439
Joined: Thu Mar 03, 2016 10:23 pm

Re: IPV6 RB4011 as Subrouter in DHCP-PD chain: pool prefix-length:68

Fri Apr 16, 2021 9:20 pm

Actually don't bother setting the prefix length and prefix hint, DHCP server on opensense will delegate /60 prefix if you configured it as such. My ISP also delegates /56 prefixes and I'm getting one without setting prefix hint.

pool-prefix-length is the key setting (even though it's set on dhcp-client): leave it at default (which is /64) and you'll get /64 addresses when using add address=::1 from-pool=TRANSIT interface=LAN construct.
 
ech1965
just joined
Topic Author
Posts: 23
Joined: Wed Mar 20, 2019 3:53 pm

Re: IPV6 RB4011 as Subrouter in DHCP-PD chain: pool prefix-length:68

Fri Apr 16, 2021 10:17 pm

Actually don't bother setting the prefix length and prefix hint, DHCP server on opensense will delegate /60 prefix if you configured it as such. My ISP also delegates /56 prefixes and I'm getting one without setting prefix hint.

pool-prefix-length is the key setting (even though it's set on dhcp-client): leave it at default (which is /64) and you'll get /64 addresses when using add address=::1 from-pool=TRANSIT interface=LAN construct.
[/quote

Thanks a lot for your help
I worked perfectly with recreating the dhcp client without the pool-prefix-length

Etienne

Who is online

Users browsing this forum: Bolendox, Google [Bot], LeoNaXe and 37 guests