dhcpd.leases synchronization in DHCP failover

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dhcpd.leases synchronization in DHCP failover

DUPALUT, Benjamin
Hello all,

I want to monitor the percentage of use for some of my DHCP pools.

I intended to write a script who would have parsed dhcpd.leases but i found out that my failover dhcp servers doesn't have the same active leases in their dhcpd.leases files. Is this the expected behavior or are my servers wrongly configured ?

I cannot find clear documentations about this topic.

Thanks in advance for your help.

Cordialement,

Benjamin Dupalut
Ingénieur système et réseau
Service Informatique, Télécommunications, Audiovisuel et Reprographie (SITAR)
ESIEE Paris
2 bd Blaise Pascal - 93162 Noisy-le-Grand Cedex
T : +33 1 45 92 66 17
[hidden email]
www.esiee.fr / www.cci-paris-idf.fr

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: dhcpd.leases synchronization in DHCP failover

Bob Harold

On Fri, Dec 21, 2018 at 9:44 AM DUPALUT, Benjamin <[hidden email]> wrote:
Hello all,

I want to monitor the percentage of use for some of my DHCP pools.

I intended to write a script who would have parsed dhcpd.leases but i found out that my failover dhcp servers doesn't have the same active leases in their dhcpd.leases files. Is this the expected behavior or are my servers wrongly configured ?

I cannot find clear documentations about this topic.

Thanks in advance for your help.

Cordialement,

Benjamin Dupalut
Ingénieur système et réseau
Service Informatique, Télécommunications, Audiovisuel et Reprographie (SITAR)
ESIEE Paris
2 bd Blaise Pascal - 93162 Noisy-le-Grand Cedex
T : +33 1 45 92 66 17
[hidden email]
www.esiee.fr / www.cci-paris-idf.fr


New leases are added to the end of the lease file.  Only occasionally is the whole file rewritten.  That is for performance reasons.  The latest lease info should match between the primary and failover, older info and the order of the entries will not be the same.

But I would recommend using SNMP:
ISC DHCP SNMP pool tracker
dhcpd-snmp is an extension for the Net-SNMP agent and the ISC DHCP server. It allows you to monitor and track the address usage of your dynamic IP address pools through SNMP. On Github.

-- 
Bob Harold


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: dhcpd.leases synchronization in DHCP failover

Eugene Grosbein
In reply to this post by DUPALUT, Benjamin
21.12.2018 21:44, DUPALUT, Benjamin wrote:

> I want to monitor the percentage of use for some of my DHCP pools.
>
> I intended to write a script who would have parsed dhcpd.leases but i found out that my failover dhcp servers doesn't have the same active leases in their dhcpd.leases files. Is this the expected behavior or are my servers wrongly configured ?
>
> I cannot find clear documentations about this topic.
>
> Thanks in advance for your help.

We use http://dhcpd-pools.sourceforge.net/ for same goal and with failover setup, too.
It gives extensive stats like this:

shared net name     first ip           last ip            max   cur    percent  touch   t+c  t+c perc     bu  bu perc
HotSpot             X.X.X.65         - X.X.Y.126         62     4      6.452     49    53    85.484      9   14.516
HotSpot             Y.Y.Y.64         - Y.Y.Y.254        447    31      6.935    303   334    74.720    113   25.280

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users