how dhcp-server select a ip-address to client?

Simon Hobson dhcp1 at thehobsons.co.uk
Mon Mar 5 13:19:22 UTC 2012


One other thing ...

The leases file on disk is read exactly once during server startup - 
after that is it never read. The server operates exclusively from 
tables held in memory.

Every time there is a state change, a new record is appended to the 
lease file to record it on disk - thus when reading/parsing the file 
you should read only the last record that matches a particular 
client/lease.

To prevent the file growing indefinitely, the server has a cleanup 
process (compiled in at one hour intervals). This writes a new clean 
file from the in-memory tables, moves the live file, and moves the 
new file to be the live file.
-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.


More information about the dhcp-users mailing list