Leases based on MAC addresses

Simon Hobson dhcp1 at thehobsons.co.uk
Sun Feb 8 22:46:22 UTC 2009


sthaug at nethelp.no wrote:

>For me this is situation is not quite the same as a static lease. Aside
>from possibly breaking the standard, I think it's perfectly reasonable
>to want a DHCP server with the following characteristics:
>
>- Leases should *always* be based on MAC address, not UID. If the same
>MAC address asks again, it should always receive the same answer. One
>implication of this is only one IP address per MAC address. Another is
>that as soon as a MAC address has been "seen" by the DHCP server, the
>IP address handed out by the server must be remembered "forever" (or
>at least until manually removed).
>- The actual value of the IP address itself is uninteresting (server
>can pick) - this makes it different from a static lease.

Then you are another voice asking for a feature that got on the 
roadmap but I believe dropped (or at least put to one side). There 
was talk of having a config option to change the primary key. At the 
moment, it is hardcoded to be "pick first value(client id, 
hardware)", what you want is to change it to just "hardware".

There were some patches, but that was some time ago and I don't know 
if they were ever kept up with current versions. These were to solve 
a different but related problem of multi-boot machines where one OS 
sends the hardware MAC address as the client id, while others send 
nothing.

I believe the patch did something like "if the client id is empty, 
then set it to the value of hardware". A simpler patch for you might 
be to simply blank out the client id in any received packet.


All of these are 'broken" as far as the standards are concerned, but 
in some cases are less broken than the alternatives.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list