DHCPv6 - multiple addresses from different prefixes

Simon Hobson simon at thehobsons.co.uk
Mon Jan 4 09:23:34 UTC 2021

Tj <ml.isc at elloe.vision> 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 !


More information about the dhcp-users mailing list