4

I have a Windows 2003 server and need to poll the DHCP lease information from it with a perl script that is running on a Ubuntu server. Then I need to analyze & store the information in a mysql database. Is there a way to query the leases from a perl script? I can figure out how to process the info after I get it. Thanks.

3
  • 4
    This question is probably better on ServerFault since the question is mostly about how to extract the lease information from Windows. It has much less to do with the fact that you want to do it in Perl on a Linux box. In fact, I'd bet you need at least some code on the Windows box to do the extracting. Commented Dec 10, 2010 at 14:44
  • So you think there is no program or script to do this from Linux? Adding software on the Windows box is possible, but I really don't want to. Commented Dec 10, 2010 at 21:01
  • He didn't mean there isn't. He actually doesn't know. His point is that your more likely to get a better answer on serverfault.com. Commented Feb 4, 2011 at 18:39

1 Answer 1

2

You can perhaps use SNMP, provided SNMP is enabled/allowed for DHCP service on Windows server. Using SNMP queries, one can build a statistics of the lease information from time to time remotely from the DHCP service.

$snmp_address = "1.3.6.1.4.1.311.1.3.2.1.1.1";
$getsubnet = "snmpgetnext -v2c -c public -Oqv win_dhcp_server_ip  $snmp_address |";

better description is at https://lists.isc.org/pipermail/bind-users/2004-November/054007.html

1
  • Awesome. I just saw your answer. Thanks for the help. Commented Feb 18, 2012 at 0:02

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.