Need help with LEASEQUERY..solved?
Pat Winn
ptwinn at cimtel.net
Thu May 27 19:19:30 UTC 2010
Ok everyone,
I have at last managed to get a valid DHCPLEASEQUERY
packet via my PHP code.
The remaining problem(s)..
1). Cannot send the packet from the server that dhcpd
is running on. In my case, the server has multiple
nics and no matter which IP I send from, it of course
bounces the packet off of the local loopback to get
to the other IP/nic. dhcpd is listening on *all*
interfaces but will not pick up the packet off the
local loopback. Thus, it seems you have to send the
packet from a remote system (not quite the desired way).
2). Have to fake in the giaddr field to one that falls
within a given subnet declaration in the dhcpd.conf.
It seems that the request has to at least *appear*
as though it came from a relay within the same subnet
as the IP address/lease being queried. Once you put in
the "real" giaddr IP (obviously NOT from where we are
sending from), dhcpd WILL respond to the lease query
packet, then sends the DHCPLEASEACTIVE packet to the
giaddr IP in the DHCPLEASEQUERY packet. Not back to where
I'm sending from.
So therein lies the dillema(s);
*) How to make dhcpd listen also on the local loopback
(adding a stanza in dhcpd.conf for that "subnet" does not
seem to work for this)
*) How to make it send the query info back to where I'm
sending my packet from?
Am I going to have to hack further in the ISC C code to
accomplish this? I've had to debug dhcpd via gdb to get this
far. (Many thanks to Shane Kerr @ ISC for the suggestions and
help on this).
Thoughts anyone?
--
Patrick T. Winn
Senior Systems Engineer
Cimarron Telephone Co.
(918) 865-3311 x280 - office
(918) 606-6602 - cell
More information about the dhcp-hackers
mailing list