dchpd refuses to update leases file: why?

dchpd refuses to update leases file: why?

Post by Mike Kle » Sat, 05 Jun 1999 04:00:00



I am running RedHat 5.1 with 2.0.36 kernel for a small home network.
The machine is a dhcp server in addition to lots of other stuff (router,
firewall, samba and netatalk server, print server, mail, web, etc.).

The dhcp server is from the RPM dhcp-2_0b1pl1-2_i386.rpm.  The server
serves IP addresses fine at the moment, but the leases file is always
empty, even well after the maximum lease time defined.  This is causing
problems because DNS for the internal network relies on the leases file
for its mappings.

Some more history.  I have my dhcpd.conf file set up with some fixed
addresses based on the host name, and the majority of the available
address range (192.168.0.32 through 254) available for dynamic
assignment (rare in our case).  The dhcpd.conf file entry for each known
host looked like:

        host tory {
                fixed-address 192.168.0.21;
        }          

This all worked fine and the expected IP addresses were handed out to
the correct hosts.  dhcpd was maintaining the leases file appropriately
(appending to the end and occasionally rewriting), as expected.

A few weeks ago something changed.  dhcpd started handing out IP
addresses in the dynamic range to known host names: 192.168.0.32 for
example, to a known host that should have gotten 192.168.0.23.  The
leases file started containing *only* these new, and incorrect, leases,
and forgot entirely about the older leases that matched the "host"
blocks in the dhcpd.conf file.

I restarted dhcpd multiple times, I searched for errors in the
dhcpd.conf file and any hints in any of the log files under /var/log, I
searched through documentation and queried Deja News and the web, and
nobody else seems to have this problem.  Lucky me, I get to blaze a new
trail :-) !!

Since then I tried emptying the leases file and restarting dhcpd in an
effort to have dhcpd write out the renewed leases as it got them, and
that didn't help (the leases file remains empty).  I have rebooted, no
change.  I downloaded, compiled, and successfully installed
dhcp-2.0b1pl27, and there is no change (although the lease file location
has changed).  Still an empty lease file!  All the while the clients are
getting all the correct addresses for their IP and the various other
network hosts required.

Are there any hints at all on what might be the problem here?

                -Mike Klein

 
 
 

dchpd refuses to update leases file: why?

Post by Mike Kle » Sat, 05 Jun 1999 04:00:00


I have one clarification to make:


>I have my dhcpd.conf file set up with some fixed
>addresses based on the host name, and the majority of the available
>address range (192.168.0.32 through 254) available for dynamic
>assignment (rare in our case).  The dhcpd.conf file entry for each known
>host looked like:

>        host tory {
>                fixed-address 192.168.0.21;
>        }          

...

Quote:>A few weeks ago something changed.  dhcpd started handing out IP
>addresses in the dynamic range to known host names: 192.168.0.32 for
>example, to a known host that should have gotten 192.168.0.23.

I fixed the above IP address problem by adding the "hardware ethernet"
statement into each host block, on the assumption that maybe the host
name wasn't being matched correctly for some reason.  That fixed the IP
address problem, and now all clients are getting the fixed IP addresses
they should be.  Each host block now looks like:

        host tory {
                hardware ethernet XX:XX:XX:XX:XX:XX;      # fake
                fixed-address 192.168.0.21;
        }

So the correct IP addresses are now consistently handed out correctly
again, but still the leases file remains empty.

                -Mike

 
 
 

dchpd refuses to update leases file: why?

Post by Dani?l Verlou » Sat, 05 Jun 1999 04:00:00



>I fixed the above IP address problem by adding the "hardware ethernet"
>statement into each host block, on the assumption that maybe the host
>name wasn't being matched correctly for some reason.  That fixed the IP
>address problem, and now all clients are getting the fixed IP addresses
>they should be.  Each host block now looks like:

> host tory {
> hardware ethernet XX:XX:XX:XX:XX:XX;      # fake
> fixed-address 192.168.0.21;
> }

>So the correct IP addresses are now consistently handed out correctly
>again, but still the leases file remains empty.

I seem to have the exact same problem here. I too have some fixed addresses
and all other hosts are given dynamic adresses in the range 192.168.0.10 to
192.168.0.200

Hope someone knows how to solve this one...

---

 
 
 

1. Why doesn't dhcpd update leases file when hardware ethernet used?

Does anyone have any idea how to get dhcpd to maintain (update) its
leases file when the "hardware ethernet" clause is used in a host
declaration?

My basic dhcp setup desired is to have the 5 or 6 known hosts on our
network be assigned fixed addresses, so that firewall rules can be
easily developed to limit access.  There is a range of dynamic addresses
available as well for temporary use.

When I have the following host declaration in /etc/dhcpd.conf:

        host abcd {
                fixed-address 192.168.0.X;
        }

then host "abcd" never gets handed the address 192.168.0.X, but gets one
from the dynamic address range instead.  However, at least the leases
file maintained by dhcpd contains the information about the lease
including the IP address that is assigned to host "abcd".  It would
appear that the host declaration above is not matched when dhcpd
searches for it.

When I add the hardware ethernet clause:

        host abcd {
                hardware ethernet XX:XX:XX:XX:XX:XX;
                fixed-address 192.168.0.X;
        }

then host "abcd" is definitely given the IP address 192.168.0.X because
the ethernet address matches.  BUT -- the problem -- the leases file
contains *no data* about this lease!  The IP address does not even
appear at all in the leases file!

I have tried many combinations of other options in dhcpd.conf but
nothing else seems to have the desired effect.

It is imperative to have the leases file updated so that DNS can be
dynamically updated.

Any hints?

I am running RH5.1 with dhcpd compiled from the sources for
dhcp-2.0b1pl27.  A previous version of dhcp from standard RPM
distributions acted the same way.

Thanks for any help,

                -Mike

2. Elsa Winner 2000 Pro 4Mb & 32Bit colors in XFree 3.1.2

3. no dhcp leases in leases file

4. Can't Boot LinuxPPC on a StarMax clone

5. Debian-sarge gateway refuses to renew it's DHCP-lease

6. Wierd problem with multiple NICs

7. Why is OpenBSD's locate update beating FreeBSD's locate update speed?

8. boolean text search engine source

9. isc dhcpd: update-static-leases not working

10. dhcpd fails to update dhcpd.leases

11. Combining leased lines into a super leased line

12. Need to lease-to-buy or lease a x86 solaris machine

13. update to glibc-2.3.2-4.80 makes ssh refuse connections