Fw: Failover + non-expiring leases

Alessandro Gherardi alessandro.gherardi at yahoo.com
Thu Mar 17 17:33:30 UTC 2016



   
 Hi,My goals are to configure dhcpd such that:1. dhcpd dynamically assigns IP addresses to DHCP clients2. When dhcpd assigns an IP address to a client it hasn't seen before, the lease never expires3. For high-availability, dhcpd runs on 2 servers in a failover configuration.
I set both default-lease-time and max-lease-time to -1 (full dhcpd.conf's are below). My problem is that dhcpd never doles out a non-expiring lease. My expectation was that the very lease from the client would expire after MCLT, but the following leases would have never expire. Here's a reference:
 https://lists.isc.org/pipermail/dhcp-users/2015-February/018577.html:
DHCP Failover cluster uses MCLT value as lease time
>> Is this is bug or a feature?It's how the DHCP Failover protocol works, it gives out an MCLT lease
the first time a client gets a lease from the failover pair, that then
allows the peers to sync their leases databases in the background and
when the client renews it will get it's full 24h lease.

Here's dhcpd.conf on the primary:
ddns-update-style none;
default-lease-time -1;
max-lease-time -1;
authoritative;
log-facility local7;#option ntp-servers 10.220.178.50,10.220.178.119;failover peer "dhcp-failover" {
        primary;
        address 192.168.56.2;
        port 647;
        peer address 192.168.56.3;
        peer port 648;
        max-response-delay 30;
        max-unacked-updates 10;
        load balance max seconds 3;
        mclt 120;
        split 128;
}omapi-port 7911;
omapi-key omapi_key;key omapi_key {
     algorithm hmac-md5;
     secret ...;
}subnet 192.168.56.0 netmask 255.255.255.0 {
        option routers 192.168.56.1;
        option broadcast-address 192.168.56.255;
        pool {
                failover peer "dhcp-failover";
                range 192.168.56.10 192.168.56.254;
        }
        default-lease-time -1;
        max-lease-time -1;
}

Here's dhcpd.conf on the secondary:
ddns-update-style none;
default-lease-time -1;
max-lease-time -1;
authoritative;
log-facility local7;#option ntp-servers 10.220.178.50,10.220.178.119;failover peer "dhcp-failover" {
        secondary;
        address 192.168.56.3;
        port 648;
        peer address 192.168.56.2;
        peer port 647;
        max-response-delay 30;
        max-unacked-updates 10;
        load balance max seconds 3;
}omapi-port 7911;
omapi-key omapi_key;key omapi_key {
     algorithm hmac-md5;
     secret ...;
}
subnet 192.168.56.0 netmask 255.255.255.0 {
        option routers 192.168.56.1;
        option broadcast-address 192.168.56.255;
        pool {
                failover peer "dhcp-failover";
                range 192.168.56.10 192.168.56.254;
        }
        default-lease-time -1;
        max-lease-time -1;
}
Here's a snippet from /var/lib/dhcp/dhcpd.leases on the primary:
failover peer "dhcp-failover" state {
  my state normal at 4 2016/03/17 15:32:28;
  partner state normal at 4 2016/03/17 15:32:25;
}
lease 192.168.56.132 {
  starts 4 2016/03/17 16:03:03;
  ends 4 2016/03/17 16:05:03;
  tstp 0 2152/04/23 22:32:18;
  tsfp 4 2016/03/17 16:04:02;
  atsfp 4 2016/03/17 16:04:02;
  cltt 4 2016/03/17 16:03:03;
  binding state active;
  next binding state expired;
  hardware ethernet 08:00:27:5c:f4:e5;
  client-hostname "dhcpclient";
}
Any suggestions?
Thank you in advance.



  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20160317/cc0c75fe/attachment.html>


More information about the dhcp-users mailing list