-   Linux - Networking (
-   -   dnsmasq users? (

TheRealDeal 04-27-2004 10:22 PM

dnsmasq users?

I have a dhcp and dnsmasq server running.

All I want to know is how I can get the server to automatically clear the dhcp.leases and dhcp.leases~ files automatically?

The reason being, we are in an environment where a machine is put on the network once and probably only for 4 or 5 minutes. Then shipped off. We are doing this probably 20 - 30 times a day, and I don't want the dhcp to be clogged up.

Anyone know a way I can get around this? I've a feeling it is a dhcpd option but am unsure.

Thanks alot!!!

>Craig :)

DavidPhillips 04-28-2004 11:18 AM

Set the lease to five minutes.

TheRealDeal 04-28-2004 05:04 PM

Hi David,

Thanks for the reply, I really appreciate it.

I know this might be a stupid question, but do you mean the DHCP release?

This is what I already have as the first two lines in my dhcpd.conf file....

default-lease-time 600;
max-lease-time 7200;

However, in dhcpd.leases and dhcpd.leases~ I still have entries from January this year in there, this is when the server was first built.

Any ideas?

>Craig :)

DavidPhillips 04-28-2004 05:45 PM

The are expired leases, and should not be a problem. You could remove them, but it's not really necessary. It's actually best to leave it as is.

The free ip's will be reclaimed when needed.

TheRealDeal 04-28-2004 05:58 PM

Great thanks alot David!!! You've been a great help :)

So when the scope needs new IP's it will automatically overwrite the ones that have gone over the lease time?

Thanks alot.

Have a good day.

DavidPhillips 04-29-2004 01:21 AM

Even if you have static ips out there in the dhcp servers ip range of addresses it will check for that when it prepares to assign the ip and abandon it. It will claim it again later if it becomes free.


TheRealDeal 04-29-2004 01:24 AM

Great gotcha. Thanks David!!!

You've helped me heaps.

>Craig :)

All times are GMT -5. The time now is 06:32 PM.