Rahul Sharma wrote:
> Hi Friends,
> I am new to openBSD.
> I have a problem with dhcpd.
> Whenever I delete dhcpd.leases and again create it via touch command then
it
> does not create the list of clients that are assigned the dynamic IP's.
> I have tried all sort of combinations like rebooting the server which is
> openBSD in my case. Also, rebooting the client which in my case is CentOS
> etc.
> But next day when I turned on my server and looked at dhcpd.leases it give
> the MAC address with the IP that are allocated
>
> I wanted to know whether there is any time limit after which the
> dhcpd.leases file is updated after i remove it and create it an empty file
> of the same name.
>
> Also i wanted to know the behaviour of dhcpd when an IP lease is finished.
> i.e. whether the name of the client(MAC address) and IP will be removed
from
> the dhcpd.leases file or not.
> Plz help me.
> Thanks for ur precious time in reading this mail.
>
>
Never delete the dhcpd.leases file with the daemon running. First kill
it, then delete the file, touch it, and only then start the daemon.

Also, from the dhcpd man page:

In order to keep track of leases across system reboots and server
     restarts, dhcpd keeps a list of leases it has assigned in the
     dhcpd.leases(5) file.  Before dhcpd grants a lease to a host, it
records the lease in this file and makes sure that the contents of the
file are flushed to disk.  This ensures that even in the event of a
system crash, dhcpd will not forget about a lease that it has assigned.
 On startup, after reading the dhcpd.conf file, dhcpd reads the
dhcpd.leases file to refresh its memory about what leases have been
assigned.

My regards,
--
Giancarlo Razzolini
Linux User 172199
Moleque Sem Conteudo Numero #002
Slackware Current
OpenBSD Stable
Snike Tecnologia em Informatica
4386 2A6F FFD4 4D5F 5842  6EA0 7ABE BBAB 9C0E 6B85

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc]

Reply via email to