Community discussions

MUM Europe 2020
User avatar
just joined
Topic Author
Posts: 3
Joined: Tue Sep 01, 2015 3:54 pm

Order of DHCP delegation assignment

Sun Jan 12, 2020 10:52 pm

My IPv6 comes from Comcast via a /56 allocation over DHCP:
/ipv6 dhcp-client add add-default-route=yes interface=ether1-gateway pool-name=comcast-ipv6 request=prefix

 /ipv6 dhcp-client print

Flags: D - dynamic, X - disabled, I - invalid
 #    INTERFACE       STATUS             REQUEST         PREFIX
 0    ether1-gateway  bound              prefix          2603:1234:abcd:x000::/56, 3d56m56s

/ipv6 pool print
Flags: D - dynamic
 #   NAME                                  PREFIX                                      PREFIX-LENGTH EXPIRES-AFTER
 0   ULA-pool6                             fd00::/64                                              64
 1 D comcast-ipv6                          2603:1234:abcd:x000::/56                               64 3d54m17s
Internally I allocate /64 prefixes to interfaces, using that address pool:
/ipv6 address add address=::1 advertise=no from-pool=comcast-ipv6 interface=ether1-gateway
/ipv6 address add address=::1 from-pool=comcast-ipv6 interface=ether2
/ipv6 address add address=::1 from-pool=comcast-ipv6 interface=vlan2
I recently suffered an outage from Comcast, had to reset the modem. The mikrotik router did not reset, it's been up for a while, possibly since my last RouterOS update.

When things came back to life again, the different interfaces had been allocated /64s in a different order. This was catastrophic to systems requiring a static assignment such as the authoritative nameserver, the domain controllers, firewall rules to allow inbound services, the DNS assignment to the router interfaces, all kinds of stuff like that.

IPv4 is NATed so I can use private addressing internally. If the IPv4 assignment changes most stuff will still work. However since IPv6 is not NATed I am dependant on Comcast's allocation for internal systems' IPv6 addresses.

Is there a method to provide allocations from a pool in a specific order? Any other recommendations that might help here? (static address assignments is perhaps the most obvious but that requires a significant )

Forum Guru
Forum Guru
Posts: 5031
Joined: Mon Apr 20, 2009 9:11 pm

Re: Order of DHCP delegation assignment

Wed Jan 15, 2020 9:30 pm

Currently the only way is probably lease script and configuring addresses/subnets yourself from there. But it's not admin friendly, there should be simpler way. I'd expect to be able to use e.g.:
/ipv6 address
add address=::1:0:0:0:1/64 from-pool=dhcp interface=lan1
add address=::2:0:0:0:1/64 from-pool=dhcp interface=lan2
add address=::ff:0:0:0:1/64 from-pool=dhcp interface=lanx
So not only right 64 bits could be set, but also some in left half. Bits set in address would then be combined with prefix from ISP and I'd have static subnets (as long as prefix wouldn't change). Current RouterOS doesn't support that.

On the other hand, it's not so easy. The example is for /56. But what if next time ISP decides to give only /60, how should poor router handle that? First two addresses would still fit, but it probably couldn't do anything else with the last one than to mark it as invalid. That's why I don't like DHCPv6 PD much, as user I have no control over what I get and I'm always at ISP's mercy. Actually, it's not different from IPv4 DHCP, if used by ISP.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.

Who is online

Users browsing this forum: barracuda, che, eworm, gerarivero and 180 guests