Need help with LEASEQUERY..
Matt Pascoe
hornet136 at gmail.com
Thu May 20 15:22:34 UTC 2010
I too would love to do LEASEQUERY from PHP. I have tried and
been unsuccessful as well. I've worked a bit with the following code but
have not had time to do any testing with it since it was updated. You might
give it a test and see if you can get further with it? check out the
leasequery.php file in the repository.
http://github.com/adinardi/phpdhcp
I also have tried to use the PERL leasequery tool and had trouble getting it
to work.
My goal with leasequery is to simply create a function that I can give a
single IP or a range of IPs (masked or range) and get a list of lease
information from the DHCP server. I'd prefer not to have to look at
leasefiles but to use the LEASEQUERY method to ask the server directly.
Thanks
On Thu, May 20, 2010 at 8:53 AM, Pat Winn <ptwinn at cimtel.net> wrote:
>
> Greetings,
> I am trying to construct a LEASEQUERY packet in PHP that
> I can use to query our ISC DHCP daemon with.
>
> I have gotten as far as seeing the packet show up in a
> WireShark packet trace and it looks correct there (I think?).
> I never see anything show up in our syslog or on stderr if
> ran in debug however.
>
> If I attach to the running daemon with strace (Linux/Fedora),
> I can see about four lines come up when the packet arrives,
> acknowledging that it received a packet, but it doesn't do
> anything with it, just throws it out or so I'm assuming.
> I am using packet type 10, not 13 as stated in RFC 4338 and
> RFC 2131.
>
> I can try sending a lease query using a Perl script which is
> said to work w/ ISC's DHCPd but even with that I see the same
> things take place in my packet trace/syslog/strace/etc.
>
> No matter how I go about it, it's still no joy.
>
> I have tried version 3.x and am now on a freshly compiled
> version 4.1.1 with pretty much everything enabled.
>
> I do have allow leasequery in my dhcpd.conf.
>
> What else might I be missing or doing wrong?
> I know I am close.
>
> Also, is there anything like this already written that I'm not
> finding that might save me from re-inventing the wheel??
>
> Thanks in advance for any help offered!
>
> --
> Patrick T. Winn
> Systems Engineer
> Cimarron Telephone Co.
> (918) 865-3311 x280 - office
> (918) 606-6602 - cell
>
>
>
> _______________________________________________
> dhcp-hackers mailing list
> dhcp-hackers at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-hackers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-hackers/attachments/20100520/94d3b5d4/attachment.html>
More information about the dhcp-hackers
mailing list