ISC DHCP: peer holds all free leases

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

ISC DHCP: peer holds all free leases

Post by ^rooker »

[PROBLEM]
For some (yet unknown) reason, I'm recently having issues with my ISC DHCP server setup. It usually runs incredibly reliable, but now, some clients just won't get a reply from the DHCP server :(
There's a nice list of ISC DHCP troubleshooting tips in an article on "prefetch.net".

The first thing to do is check the logs. By default, the ISC-DHCP server writes to /var/log/messages and/or /var/log/syslog.
Syslog seems to contain more information in some cases, and it looks like it also contains the things that go to "messages". Let's take a look:

Code: Select all

$ tail /var/log/syslog
In my case, the requests of the failing clients didn't even show up. So it wasn't the case of a "DHCPNACK" (not-acknowledged) - but it seemed that the request didn't even reach the server.

So I tried "tcpdump" to see if the DHCP-requests are coming in:

Code: Select all

$ sudo tcpdump -n -i eth0 port bootps or port bootpc
Well, the requests did show up:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:43:50.935162 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:56:97:xx:xx, length 300
15:43:53.891102 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:56:97:xx:xx, length 300
15:43:58.474148 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:56:97:xx:xx, length 300
15:44:01.797033 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:56:97:xx:xx, length 300
15:44:07.946109 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:56:97:xx:xx, length 300
[...]
...but the DHCP server didn't feel like it should respond :(

Checking /var/log/syslog again, I now had the following lines in there:
Jul 2 15:57:41 hostname dhcpd: DHCPDISCOVER from 00:50:56:97:xx:xx via eth0: peer holds all free leases
Jul 2 15:57:45 hostname dhcpd: DHCPDISCOVER from 00:50:56:97:xx:xx via eth0: peer holds all free leases
Jul 2 15:57:50 hostname dhcpd: DHCPDISCOVER from 00:50:56:97:xx:xx via eth0: peer holds all free leases
[SOLUTION]
My setup is configured with 2 failover-DHCPs, where one is currently offline.
I tried to set the state of the running dhcpd to "partner-down", since the secondary dhcpd is down for maintenance for a longer time.

Thanks to the DHCPd failover article on Frederik's blog, I got an idea of how to configure the "omapi" for using "omshell".
The state of the dhcpd must be changed to "partner-down", but I'm still reading up on how to do this.


Links:
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply