DHCP restart with bulk lease data

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Sep 27 17:21:17 UTC 2019


Surya Teja <suryateja042 at gmail.com> wrote:
> 
> Hi Simon Thanks for reply,
>  Periodically, default is every hour, the server will write out a fresh leases file from it's internal structures  --->
> I have a doubt when the server write out a fresh leases file from it's internal structures will the dhcpd service be in off state at this duration?

The question is a little ambiguous.
If you mean, will this happen while the server is stopped, no it won't.
If you mean, does the server stop serving clients while it's doing this, AFAIK it continues as normal.

>> this file will contain no duplicate entries --->
> Hi I have seen the duplicate entry in my server lease file
>  sample  snippet:
> ==============
> lease 192.168.2.52 {
>   starts 5 2019/09/27 07:21:32;
>   ends 5 2019/09/27 08:21:32;
>   tstp 5 2019/09/27 08:51:32;
>   tsfp 5 2019/09/27 08:21:32;
>   cltt 5 2019/09/27 07:21:32;
>   binding state active;
>   next binding state expired;
>   hardware ethernet 70:bb:e9:37:d9:9e;
>   uid "\001p\273\3517\331\236";
>   set vendor-class-identifier = "android-dhcp-9";
>   client-hostname "RedmiNote6Pro";
> }
> lease 192.168.2.52 {
>   starts 5 2019/09/27 07:21:32;
>   ends 5 2019/09/27 08:21:32;
>   tstp 5 2019/09/27 08:51:32;
>   tsfp 5 2019/09/27 08:51:32;
>   atsfp 5 2019/09/27 08:51:32;
>   cltt 5 2019/09/27 07:21:32;
>   binding state active;
>   next binding state expired;
>   hardware ethernet 70:bb:e9:37:d9:9e;
>   uid "\001p\273\3517\331\236";
>   set vendor-class-identifier = "android-dhcp-9";
>   client-hostname "RedmiNote6Pro";
> }
> Yes It has same data, I don't see any issue on client side  but want to make sure that, Is this acceptable in lease file ?

The lease file will be clean **immediately** after it's been re-written. Once clients are served, then new records will be appended and there is likely to be more than one record for some clients.
Looking at the above, are you running failover ? If so, then I suspect one of the records is from the partner server making an offer to a client at the same time as this server does.



More information about the dhcp-users mailing list