Querying DHCP information from Windows DHCP Database

Hi all,

Is it possible using WMI, to query the DHCP info wherein I can get my DHCP Server's Address Leases,Reservations,Hostnames,Mac Address ?. The DHCP GUI is able to display it, so, is there any way I can get this information in C# using System.Management namespace ?.

Thanks.

[300 byte] By [Chakkaradeep] at [2007-12-24]
# 1

This question is better suited for the networking forum where questions related to the networking APIs are discussed. Please reserve the C# forum for questions specifically related to C#. I'm moving your question to the networking forum where someone may better be able to assist you.

Michael Taylor - 9/21/06

TaylorMichaelL at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 3

Hi Durgaprasad,

Thanks for the link. I have already seen those examples and they dont query the DHCP Database. If you do a search in your dhcp enabled server machine for dhcp.mdb, you would see it.However, that file wouldnt be able to open with Access, checked that too. Now, this file should contain the necessary details what I want, like, what are the current leases,what are the reserved ips etc.,Windows is able to retrieve the information when the DHCP GUI from Administrative Tools is opened.So, I think there should be a way for programmers too.

Chakkaradeep at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 4
Thanks for putting it in a proper place
Chakkaradeep at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 5

Anybody here to answer :(

I have to query the DHCP through a program and get the details. Can it be done?

Thanks.

Chakkaradeep at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 6
I had a question regarding querying DHCP Database using Microsoft API's in c++. I am not able to use MAC Address to query information about a client using DHCP Server. Has anyone tried this yet.
JemAlappatt at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...

.NET Development

Site Classified