peer holds all free leases

David McGaughey mcgoy1 at clearwire.net
Wed Feb 4 17:48:10 UTC 2009


Greetings again list!

 

I could never figure out how to get more in the logs than the not so very
helpful "peer holds all free leases".  Had great fun exploring that log
thing and dhcpd-eval and dhcp-options.  Never could touch that DHCPDISCOVER
error message, so I ask myself, "Self, what is it that you really want out
of this?"  What I really wanted was a dump of the relay 82 options when this
error was happening.  So I did the following hack to dhcp.c:

 

diff dhcp.c.orig dhcp.c

339a340

>                       {

341a343,362

>                        if (!packet->raw->options) log_error ("%s: no
options",msgbuf);

>                          else

>                          {

>                           char DMopts[2*DHCP_MAX_OPTION_LEN+4];

>                           int DMi,DMj;

>                           DMj = -1;

>                           for (DMi=0;DMi<DHCP_MAX_OPTION_LEN;DMi++)

>                           {

>
sprintf(&DMopts[DMi*2],"%02x",*(packet->raw->options+DMi));

>                            if (DMi>0)

>                               {

>                                if ((strncmp(&DMopts[DMi*2],"52",2) == 0)
&&

>                                    (strncmp(&DMopts[(DMi-1)*2],"00",2) ==
0)) DMj = DMi - 1;

>                               }

>                           }

>                           DMopts[DMi*2] = 0;

>                           if (DMj != -1) DMopts[DMj*2+32]=0; else DMj = 0;

>                           log_error ("%s: options: %s",
msgbuf,&DMopts[DMj*2]);

>                          }

>                       }

 

As you can see, for the past 15 years my annual job reviews have stated:
"Cannot code."  But this did give me the information that I was wanting when
the not so very helpful "peer holds all free leases" error is occurring.

 

David <http://mcgoy.plumbearcat.com/>  McGaughey

Lubbock, Texas

mcgoy at plumbearcat.com

 

 

-----Original Message-----
From: dhcp-users-bounces at lists.isc.org
[mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of David McGaughey
Sent: Monday, February 02, 2009 8:45 AM
To: dhcp-users at lists.isc.org
Subject: peer holds all free leases

 

Greetings list!

 

I'm way over my head here as I'm pretty new to dhcpd.  I've a network setup
with many classes and pools.  The pools are arbitrarily small, so it is no
surprise to me that I am getting peer holds all free leases, some of my
pools are simply out of addresses.  My question is this:  Is it possible to
have the servers log which class or which pool the request is coming from?
All I'm getting in the logs is the above message with the mac of the
requesting client and the forwarder for the vlan the request is coming from.
It would be nice to be able to have the class logged with this request or
something.  That information would point me to where I need to make a
change.

 

Any help greatly appreciated!

 

David <http://mcgoy.plumbearcat.com/>  McGaughey

Lubbock, Texas

mcgoy at plumbearcat.com

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090204/050d7443/attachment.html>


More information about the dhcp-users mailing list