Community discussions

MikroTik App
 
washcroft
just joined
Topic Author
Posts: 6
Joined: Tue Apr 09, 2024 1:50 pm

DHCP IPv6 Dynamic Binding (PPP) - Make Static

Wed Apr 10, 2024 8:11 am

Hello,
We're running IPv6 over PPP, but we'd like to make the prefixes dynamically assigned to PPP clients/sessions static so that:

(a) they get the same prefix every time they connect, and
(b) a different PPP client/session isn't dynamically assigned the same prefix as one who is temporarily not connected

The Make Static button on the DHCPv6 binding should do this, but it complains about it being a dynamic server. How else can a dynamically assigned binding be reserved/made static?

Thanks!

ROS v7.11
Screenshot 2024-04-10 060642.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11736
Joined: Thu Mar 03, 2016 10:23 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Wed Apr 10, 2024 11:58 am

Is the prefix pool ... which DHCPv6 uses to fetch prefixes for clients ... a dynamic (i.e. fetched from upstream DHCPv6 server) or a static one?
 
washcroft
just joined
Topic Author
Posts: 6
Joined: Tue Apr 09, 2024 1:50 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Wed Apr 10, 2024 12:04 pm

No, the pool itself is static.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11736
Joined: Thu Mar 03, 2016 10:23 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Wed Apr 10, 2024 12:06 pm

Show config ... the /ipv6/dhcp-server/export part at least.
 
washcroft
just joined
Topic Author
Posts: 6
Joined: Tue Apr 09, 2024 1:50 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Wed Apr 10, 2024 12:33 pm

Thanks for helping.
/ipv6/dhcp-server> export
# 2024-04-10 10:24:21 by RouterOS 7.11
# software id = 19FD-8JXB
#
# model = CCR2004-16G-2S+
# serial number = xxxx

/ipv6/dhcp-server> print
Flags: D - DYNAMIC
Columns: NAME, INTERFACE, ADDRESS-POOL, PREFERENCE, LEASE-TIME
#   NAME                     INTERFACE                ADDRESS-POOL  PREFERENCE  LEASE-TIME
0 D <pppoe-sn_dsnw2845b478>  <pppoe-sn_dsnw2845b478>  static-only          255  1d        
1 D <pppoe-sn_dsnw2845b110>  <pppoe-sn_dsnw2845b110>  IPV6 PD POOL         255  3d        

/ipv6/pool> export
# 2024-04-10 10:24:47 by RouterOS 7.11
# software id = 19FD-8JXB
#
# model = CCR2004-16G-2S+
# serial number = xxxx
/ipv6 pool
add name="IPV6 PPPOE POOL" prefix=2a05:b100::/54 prefix-length=64
add name="IPV6 PD POOL" prefix=2a05:b100:800::/47 prefix-length=56

/ipv6/pool> print
Columns: NAME, PREFIX, PREFIX-LENGTH
# NAME             PREFIX              PREFIX-LENGTH
0 IPV6 PPPOE POOL  2a05:b100::/54                 64
1 IPV6 PD POOL     2a05:b100:800::/47             56

/ipv6/address> export
# 2024-04-10 10:26:31 by RouterOS 7.11
# software id = 19FD-8JXB
#
# model = CCR2004-16G-2S+
# serial number = xxx
/ipv6 address
add address=2a04:1701:7::2 interface=ether1

/ipv6/address> print
Flags: D - DYNAMIC; G - GLOBAL, L - LINK-LOCAL
Columns: ADDRESS, INTERFACE, ADVERTISE
 #    ADDRESS                       INTERFACE                ADVERTISE
 0 DL fe80::f413:6638:9600:3d0b/64  WG-HALE-LAB2-OZY         no       
 1 DL fe80::2c88:5dff:fe28:eec5/64  Loopback Bridge          no       
 2 DL fe80::4aa9:8aff:fe43:6150/64  OLT MGMT Bridge          no       
 3 DL fe80::4aa9:8aff:fe43:615f/64  sfp-sfpplus2             no       
 4 DL fe80::4aa9:8aff:fe43:615f/64  ONT MGMT VLAN 101        no       
 5 DL fe80::4aa9:8aff:fe43:615f/64  ONT INTERNET VLAN 201    no       
 6 DL fe80::4aa9:8aff:fe43:615f/64  GUEST WIFI VLAN 202      no       
 7 DL fe80::4aa9:8aff:fe43:615f/64  TV WIFI VLAN 203         no       
 8 DL fe80::4aa9:8aff:fe43:615f/64  SW MGMT VLAN 701         no       
 9 DL fe80::4aa9:8aff:fe43:614f/64  ether1                   no       
10 DL fe80::4aa9:8aff:fe43:615d/64  ether15                  no       
11  G 2a04:1701:7::2/64             ether1                   yes      
12 DL fe80::f0:60/64                <pppoe-sn_dsnw2845b478>  no       
13 DG 2a05:b100::f0:60/64           <pppoe-sn_dsnw2845b478>  no       
14 DL fe80::f0:64/64                <pppoe-sn_dsnw2845b110>  no       
15 DG 2a05:b100:0:2::f0:64/64       <pppoe-sn_dsnw2845b110>  no       
16 DL fe80::892:10ff:fe1f:bc08/64   bridge1                  no       
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11736
Joined: Thu Mar 03, 2016 10:23 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Wed Apr 10, 2024 2:29 pm

So far I didn't stumble upon setup where DHCPv6 server was dynamic, so I'm a bit lost here. In your case, how does DHCPv6 server pppoe-sn_dsnw2845b110 get created?

Since pools are all static, you should be able to create static DHCPv6 serve as well ... and in that case, you should be able to make leases static as well.
 
jhbarrantes
Frequent Visitor
Frequent Visitor
Posts: 55
Joined: Wed Aug 21, 2019 2:56 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Tue Apr 16, 2024 9:58 am

Can you delegate the prefixes just by DHCPv6 Server? I mean, once the PPP session is stablished with your client you run the DHCPv6 Server on top of this interface, and client will request the PD using DHCPv6 Client. In the server side, you and do then static bindings to the prefixes delegated. I don't know if that is 100% what you need, but definitely can be done. Another option will be maybe to create a PPPoE server binding that associate your client with a given prefix from this pool. Not sure if this can be done, didn't try.

Find below an example. My provider delivers me IPv4 over a PPP conenction called "internet", and then I request the prefix from this interface, using DHCPv6. Then, with the dynamic pool created, I can sub-delegate part of this prefix with my own DHCPv6 server for remote routers (provide IPv6 to some LTE devices without IPv6 deployed in the middle of nowhere). This final binding you see as dynamic in the top level tab can be made static by just pressing "Make Static" option.
ipv6-pd.png
Regards!
You do not have the required permissions to view the files attached to this post.
 
washcroft
just joined
Topic Author
Posts: 6
Joined: Tue Apr 09, 2024 1:50 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Tue Apr 16, 2024 10:57 am

So far I didn't stumble upon setup where DHCPv6 server was dynamic, so I'm a bit lost here. In your case, how does DHCPv6 server pppoe-sn_dsnw2845b110 get created?

Since pools are all static, you should be able to create static DHCPv6 serve as well ... and in that case, you should be able to make leases static as well.
The DHCPv6 server is created dynamically by the PPP server, upon a PPP client/session being connected, they are given their own DHCPv6 server with the relevant V6 pools as configured in the PPP server profile. The DHCPv6 server is automatically removed when the PPP session ends.
 
washcroft
just joined
Topic Author
Posts: 6
Joined: Tue Apr 09, 2024 1:50 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Tue Apr 16, 2024 10:59 am

Can you delegate the prefixes just by DHCPv6 Server? I mean, once the PPP session is stablished with your client you run the DHCPv6 Server on top of this interface, and client will request the PD using DHCPv6 Client. In the server side, you and do then static bindings to the prefixes delegated. I don't know if that is 100% what you need, but definitely can be done. Another option will be maybe to create a PPPoE server binding that associate your client with a given prefix from this pool. Not sure if this can be done, didn't try.
As above, that's what happens dynamically for each PPP session - but the DHCPv6 servers cannot be created as static / in advance because the PPP "interfaces" don't exist until the PPP session is established (and the sessions come and go).
 
jhbarrantes
Frequent Visitor
Frequent Visitor
Posts: 55
Joined: Wed Aug 21, 2019 2:56 pm

Re: DHCP IPv6 Dynamic Binding (PPP) - Make Static

Wed Apr 17, 2024 11:27 am

Ahh! I get your point, I have been able to replicate your issue. As the DHCP Server is created dinamicaly out of the PPPoE session, neither DHCPv6 server or DHCPv6 binding to pool can be converted into static. However, you can still convert the PPPoE session to a static one (associated to the user) and see if that gets the job done. I have done a quick test and it seems it does, but I only tested with one router and restarting the server server/client gets the same prefix delegated (but oviously there are no others claiming for that).

For converting the PPPoE session to static you just need to go to first tab "Interface" at PPP locate your user, open the dynamic seesion and hit copy, then save it. Next time the same user will connect, it will pick up this one. It is the only way I can imagine this can be done (appart from manually splitting the IPv6 pool per user, which is not really handy).

If you got an infra with more users, can you test that? I guess somehow ppp session, dhcp-server and ipv6 server binging should be interconnected, and maybe just fixing the first one the rest always stay giving the same prefixes.

I later I have some time, I will put a second router and see what happens when playing with two or more sessions.

Kind regards!

Who is online

Users browsing this forum: jmrp87 and 17 guests