[dhclient] persistent database

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[dhclient] persistent database

Yury Stankevich
Hello,

i have not stable dhcpd server (over WiFi) and it took some time to get a lease,

but problem is that after client ifdown/ifup - dhclient tell 'No working leases in persistent database - sleeping.'
this is strange, cause server configured to give lease for few days.

i found that on ifdown - dhclient updates leases file,
so before ifdown it looks like:
>>>
lease {
  interface "wlan1";
  fixed-address 192.168.1.70;
  option dhcp-lease-time 864000;
  renew 0 2017/06/04 02:40:44;
  rebind 4 2017/06/08 11:06:05;
  expire 5 2017/06/09 17:06:05;
}
lease {
  interface "wlan1";
  fixed-address 192.168.1.70;
  option dhcp-lease-time 864000;
  renew 6 2017/06/03 19:28:21;
  rebind 4 2017/06/08 11:09:11;
  expire 5 2017/06/09 17:09:11;
}
<<<

and after ifdown
>>>
lease {
  interface "wlan1";
  fixed-address 192.168.1.70;
  option dhcp-lease-time 864000;
  renew 6 2017/06/03 19:28:21;
  rebind 4 2017/06/08 11:09:11;
  expire 5 2017/06/09 17:09:11;
}
lease {
  interface "wlan1";
  fixed-address 192.168.1.70;
  option dhcp-lease-time 864000;
  renew 2 2017/05/30 17:14:46;
  rebind 2 2017/05/30 17:14:46;
  expire 2 2017/05/30 17:14:46;
}
<<<

today is 2017/05/30 17:14:46,
dhclient writes expired lease to persistent database, and unable to reuse one after start.

is this expected behaviour ?


ps:
debian 8, isc-dhclient-4.3.5.
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [dhclient] persistent database

Simon Hobson
Yury Stankevich <[hidden email]> wrote:

> i have not stable dhcpd server (over WiFi) and it took some time to get a lease,
>
> but problem is that after client ifdown/ifup - dhclient tell 'No working leases in persistent database - sleeping.'
> this is strange, cause server configured to give lease for few days.
>
> i found that on ifdown - dhclient updates leases file,

Check the logs - both client and server. My *guess* is that your system is releasing the lease before shutting down the interface. In that case, it would be correct to also update the leases file to show the lease as expired - otherwise the client could later try and use an address that the server doesn't have listed as currently leased out (it could even have been re-allocated to another client).

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