Failover/load-balancing with dhcp client bug on "seconds elapsed" field
dhcp1 at thehobsons.co.uk
Thu Apr 15 15:46:47 UTC 2010
Daniel Duarte wrote:
>>Yes. Both servers will respond and offer the same address, the
>>client will accept one of the offers.
>We've just finished testing the configuration. It solved our
>problems. The clients are finally being served (thanks for the tip).
>However we saw a different behaviour than expected. DHCP1 now
>immediately answers the discovers, but dhcp0 continues ignoring
>them. From what we saw we believe that:
>- the pool is no longer being balanced between servers (confirmed on
>the leases file);
>- however the clients seem to continue being split between servers.
There are two cases to consider. If a client already has a lease and
is renewing it then it will attempt to renew with the server that
issued the lease. As long as that server keeps responding then the
client will not spontaneously switch servers.
If the client does not already have a lease, or it has been unable to
renew and it's lease is running out, then it will broadcast Discover
packets in an attempt to get an offer from any server(s) available.
Under these conditions, clients will tend to get split between
servers according to how quickly they respond - how a client selects
which offer to accept is undefined, in practice most clients seem to
just take the first one that meets it's requirements.
In the third case where a client has a lease but is configuring an
interface (booting up, waking from sleep, cable just plugged in, ...)
then in principal it has several options available to it - it
shouldn't just carry on using the address as it may have moved to a
different network where it's not valid. The main one is to broadcast
a request for the address it already has a lease for and get
confirmation from any DHCP server that it may continue using it. The
ack may come from a different server to the one that originally
leased the address and the client will switch - in practice, this is
likely to be on teh basis of which answers first.
>Looks like that dhcp0 will only answer when seconds elapsed becomes
>greater than the configured max seconds.
That will still be true - it's doing what you told it to !
> On this specific scenario, it means that the only redundancy
>available for dhcp1 is to manually shut down the server and changing
>dhcp0 to partner down mode.
If they aren't running failover, then there is nothing to alter.
Either server will either answer or not according to how you
configure it - if your clients are broken in a manner that conflicts
with your config, then yes, you have no redundancy (but all you have
to do is remove the max seconds config that's stopping one of them
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