-   Linux - Networking (
-   -   dhcpd server not letting go of leases (

Jase 01-14-2002 07:45 PM

dhcpd server not letting go of leases
my dhcpd server is not letting go of the leases. Is this common? I have computers not even attached to the network which still have a leased dhcp address. any thoughts on this?

FunkFlex 01-15-2002 01:30 AM

DHCPd letting go of leases too soon!!
Well i'm having the exact opposite of u..

my max lease time is 7200 (is that in sec or mins?)
instead each client has IP address for only 2 minutes or less, and then requests for a new (or same in my case) IP address :confused:

do i need to change default-lease to a higher number

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

:confused: :confused:

hommih 01-15-2002 05:59 AM

Have you checked out dhcpd.leases Jase? Probably in /var/state/dhcp/, or similar...


Jase 01-15-2002 07:41 AM

yes thats why I am post this thread ;)

default-lease-time 86400;
max-lease-time 604800;

here is what I am running for lease times,.......should I tweak this any?

hommih 01-15-2002 10:38 AM

Okay, so the leases in dhcpd.leases for the computers that no longer are attached to the network has expired, but the addresses are still reserved... strange :)

Is it more than 7 days since you removed those computers?


Jase 01-15-2002 06:37 PM


lease {
        starts 0 2002/01/06 19:24:21;
        ends 1 2002/01/07 19:24:21;
        hardware ethernet 00:03:6d:1c:7d:f6;
        uid 01:00:03:6d:1c:7d:f6;
        client-hostname "Jase";

this is still in my dhcpd.leases lol

Jase 01-15-2002 06:39 PM

also what does this mean?


Shutting down dhcpd: [  OK  ]
Starting dhcpd: SIOCADDRT: File exists
[  OK  ]

hommih 01-16-2002 09:20 AM

You probably have to clean up your dhcpd.leases yourself, if you don't want old leases to be in there. When a lease is given it starts at a given time and date, and ends after the default lease time has expired. In your case this is 86400s ( = 24 h ). The ip-address becomes available to other hosts after the max lease time has expired, which in your case is 604800s ( = 7 days ).
So that means that your ip is probably available again ( became available on 2002/01/06 19:24:21 + 7 days = 2002/01/13 19:24:21 ), even though the lease still excists in dhcpd.leases.

And, about that last message: have no idea... :)


dguy 01-16-2002 09:58 AM

"SIOCADDRT: File exists" message

I was receiving the same message for some time--not only does it appear to be harmless, but also easy to eliminate.

The script which I was using to control the dhcp daemon contained a line which was trying to add a route to every time the script was executed.

A temporary fix was to remove "route add -host dev eth0" from the script. Ideally, I'd like to add to the script a test for the above route, only adding it should it not already exist.

"route -n | grep -c "" works well enough from the command line, now I just have to figure out how to execute it properly from the script.

Stay tuned...


Jase 01-17-2002 05:54 PM

ahh good call,.....I had already added the route,...but was still trying to call it in the startup script,....../me is dumb :D thanks bro

Jase 01-17-2002 05:57 PM

ohh for the route,....just add a route like this dhcp I added this to my host table,...restart networking and blam,...all done :)

All times are GMT -5. The time now is 11:28 PM.