statistics in a dhcp failover pair

David W. Hankins dhankins at isc.org
Tue Jul 21 18:03:12 UTC 2009


On Sun, Jul 19, 2009 at 10:22:20PM +0100, Daniel Duarte wrote:
> 1. For each pool, it seems that approximately half of the leases are
> missing on the lease file. Is this normal if they have never been
> used? Or they should appear as "free"?

Never-used-never-allocated free leases are omitted from being written
to the dhcpd.leases file.  This is essentially an optimization,
because no entry is equivalent to the initial startup state, the
"default state" leases are entered into when created from reading
dhcpd.conf.  I'm kind of confused by this, but I've left it stand
because it doesn't seem to be harming anything; this includes leases
that are unused but have non-zero ATSFP/TSFP values.  These aren't
recorded, so on restart they may be renegotiated every time?  This
doesn't actually seem to have any real impact on server performance,
or at least no one's found any problem where this was the cause.

Anyway.

As leases start to get stale/previous-client information attached to
them, they will start to appear in the free state.

Never-used-backup-leases are recorded in dhcpd.leases because
otherwise servers' startup state would be inconsistent.

I don't know if you'd get better results following the 'pool' log
lines from syslog...

> 2. My analysis is the following:
> 793 leases are active;
> 523 are in state free, which mean that they ready to be allocated by
> the primary server;
> 1892 are in state backup, and they are ready to be allocated by the
> secondary server;
> Is this correct?

It seems that way to me.

> 3. The total number of available (not used) leases is:
> Available = Total Size - Active - Release - Abandoned - Reset - Backup
> - Reserved

Also expired.  There isn't a reserved state, it's a flag on the
lease which may be in any other state, but I can see how it could
influence statistics...

'Abandoned' is a funny state that means 'allocation of last resort by
the primary,' but it is probably most correct for statistics to treat
it separately from 'free' leases.

It is fairly common practice to disable processing of declines, as
this can be abused to effect a DOS, and sometimes network conditions,
or just broken clients, can flood declines.

> It means that on this pool I have available 3300 leases. From this,
> 523 are free, 1892 are backup, and the remaining, 885, have never been
> used and are not allocated to the primary or secondary server. Is it
> correct?

The absent 885 leases are understood by both servers to be in the
free state, so they are available only to the primary for allocation.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090721/f717919c/attachment.bin>


More information about the dhcp-users mailing list