DHCPv6 - multiple addresses from different prefixes

classic Classic list List threaded Threaded
2 messages Options
Tj
Reply | Threaded
Open this post in threaded view
|

DHCPv6 - multiple addresses from different prefixes

Tj
We've been attempting to assign multiple IPv6 addresses, each from a
different prefix, as descried in RFC8415 6.6 "Multiple Addresses and
Prefixes".

With "dhclient -6 -N -N" the clients can request multiple addresses.

However it appears there is no way to write a dhcpd6.conf to achieve
this. Multiple 'subnet6' in a 'shared-network' issues all addresses from
the first 'subnet6' (and from reading source-code and docs will do that
until the first range is exhausted).

There's a note in ./server/dhcpv6.c:

 * TODO: support multiple shared_networks on each interface (this
 *       will allow the server to issue multiple IPv6 addresses to
 *       a single interface)

So we assume this was thought of but not implemented, at least via
'shared-network'.

We tried adding two 'shared-network' blocks, one for each prefix, but
only the last is acted on.

As the RFC says, one use-case is when a network is being renumbered. In
our use-case we need to issue ULAs (fd00::/8) and one or more globally
routable prefixes.

Is there a way to do this? If not is Kea currently capable of this (from
reading the docs and Wiki it looks like Kea has the same problem as dhcpd) ?

That seems to leave us with a couple of options:

1. Switch to a server than can (possibly Dhcpy6d)
2. Patch dhcpd
  a. add support for multiple shared-networks (big job)
  b. hack pick_v6_address() to always increment pond->last_ipv6_pool via
'i' as is done for attempts > 1 which would work if the client requests
the same number of addresses as there are 'subnet6' blocks and ranges.

Are there other options we've missed?

Tj
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCPv6 - multiple addresses from different prefixes

Simon Hobson-2
Tj <[hidden email]> wrote:

> However it appears there is no way to write a dhcpd6.conf to achieve
> this. Multiple 'subnet6' in a 'shared-network' issues all addresses from
> the first 'subnet6' (and from reading source-code and docs will do that
> until the first range is exhausted).

The only thing I can think of would be to write a script that created dummy leases for all addresses in each prefix - interleaving them. That way, when teh server is allocating an address, there's no "never used before" addresses, so it will then reallocate a previously used address. As this latter stage is done "least recently used" first, the addresses allocated would then be interleaved.

It wouldn't be a guarantee once all the addresses had been used since then it would be pseudo-random and clients could get addresses all from one range, all from another, or any combination depending on when they were last used.

A bit of a fudge, but it would work. And if your ranges are large enough that you never actually use all the addresses, it would effectively work for a long time. The danger is that you get used to it working, and ina  few years time no-one remembers why it works - and then it breaks leaving you scratching your heads in frustration !

Simon

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users