DHCP query

Patrick Winn ptwinn at cimtel.net
Wed Apr 25 15:23:51 UTC 2012


Gerald,
You could also use this PHP code I wrote a while back to send a 
DHCPLEASEQUERY packet
to a server and ask it about a lease like 1.1.1.1 or something you know 
is invalid.
This will cause the server to send back a packet stating it has no info 
on that lease..which in
turn shows you it is alive and responding. Then just run a cron job on a 
remote box or two
which lives in a loop that wakes up periodically, sends a DHCPLEASEQUERY 
packet, then
if it gets a response, goes back to sleep. Otherwise, it starts sending 
out emails to the
appropriate admins to say that it's unresponsive.

..or you could be a tad more elaborate and do like I did...write a PHP 
daemon that stays
resident on a remote box and makes use of the class above to talk to the 
DHCP servers you
want to monitor instead of running a cron job.

The PHP code for creating/sending DHCPLEASEQUERY packets lives here:
http://www.phpclasses.org/package/6621-PHP-Send-queries-to-a-DHCP-server.html

Coincidentally, I wrote that class in order to poll the DHCP daemon each 
time I receive a
DHCPREQUEST packet with option-82 info in it in order to get timers, 
etc. that I otherwise
can't get from tailing the leases file. This lends towards better (and 
database driven)
lease tracking..

Enjoy.

--------------------------------------
Patrick T. Winn
Senior Systems Engineer
Cimarron Telephone, Co.
Desk: 918-865-3311 x280
Cell: 918-606-6602





On 04/25/2012 06:30 AM, Gerald Vogt wrote:
> Send a DHCP request to the server and wait for the answer. That's the 
> best method to find out whether it's responding or not...
>
> Gerald
>
> On Wednesday, April 25, 2012, wrote:
>
>     Hi,
>
>     In ISC DHCP-4.2.3 , Is there are any ways to identify that the
>     DHCP process(dhcpd) is hanging on a deadlock or infinite loop ,
>     though the process state is running.
>
>     Is there any interface available or methods available?
>
>     Regards,
>
>     Ameen S
>
>     * Please do not print this email unless it is absolutely necessary. *
>
>     The information contained in this electronic message and any
>     attachments to this message are intended for the exclusive use of
>     the addressee(s) and may contain proprietary, confidential or
>     privileged information. If you are not the intended recipient, you
>     should not disseminate, distribute or copy this e-mail. Please
>     notify the sender immediately and destroy all copies of this
>     message and any attachments.
>
>     WARNING: Computer viruses can be transmitted via email. The
>     recipient should check this email and any attachments for the
>     presence of viruses. The company accepts no liability for any
>     damage caused by any virus transmitted by this email.
>
>     www.wipro.com <http://www.wipro.com>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users


-- 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120425/0b859bf3/attachment.html>


More information about the dhcp-users mailing list