Help me make DHCP's documentation better.

David W. Hankins David_Hankins at isc.org
Tue Aug 29 15:08:17 UTC 2006


On Tue, Aug 29, 2006 at 11:36:01AM +0200, Patrick Schoo wrote:
> IMHO the concept of MAC address affinity (or call it client identifier 
> affinity) is not a useful property when load balancing the pools. Suppose a 
> client enters your network that it has visited before. In this case there is 
> a free lease in the leases database that contains the client identifier. When 
> a DHCPDISCOVER is broadcasted on the network both servers can find the lease 
> in the database and hand out the IP address that belongs to this lease. Even 
> when one of the DHCP partners is down the other can hand out the lease, no 
> matter whether the lease is in free of backup state. In other words, the 
> primary can hand out the lease even if it is in 'backup' state. The secondary 
> can hand out the lease even it is in the 'free' state.

To do so would violate the failover protocol on a very fundamental level.

On the other hand, if you mark the lease 'reserved' for this particular
client, then yes you can get precisely this behaviour.  Reserving a
lease to a client effectively allocates it to that client in more or
less perpetuity.

The reason the failover protocol does not allow this behaviour on
non-reserved leases is because once a lease enters the 'free' state,
from then on the secondary does not know if the primary has allocated
that lease to a different client (and has not yet received a binding
update to that effect).  It can quickly and easily lead to duplicate
allocations (one lease, multiple clients) which are not guaranteed to
be discovered by the clients (and if they are, the resulting behaviour
is generally to 'break' the lease until an operator intervenes).

On the other hand, if we preload primary and secondary with leases
they are probable to re-deliver when balancing the pool, we reduce
the rate of churn and increase the probability that client addresses
will more or less remain fixed.

Also: I think it's a very bad idea to discard LBA at any corner case
the server finds while in 'normal' state.  Even if both servers are
about to answer the question with the same results, it is still
best practice to divide the load.

> But since this is only 
> relevant for clients that you have never seen before, balancing the pools 
> using the client identifier is not useful.

You are essentially describing a situation in which once a single
lease is allocated to a client, it is never reallocated to any other
client ever again.

While this behaviour may be desirable in some scenarios, I think it
is a undesirable default, and unusable in the majority of scenarios.

-- 
ISC Training!  October 16-20, 2006, in the San Francisco Bay Area,
covering topics from DNS to DDNS & DHCP.  Email training at isc.org.
-- 
David W. Hankins	"If you don't do it right the first time,
Software Engineer		you'll just have to do it again."
Internet Systems Consortium, Inc.	-- Jack T. Hankins


More information about the dhcp-users mailing list