title: Querying a DHCP server in C#
body: <p>I need to get the mapping of MAC to IP stored on DHCP server, either through a program running on the server itself or preferably through a program running on one of the DHCP clients.</p>
  
  <p>I understand <a href="http://bit.ly/w9NOe" rel="noreferrer">netsh utility</a> can be used to get the dump however i have not had much success with that.</p>
  
  <p>Any working examples or hint on that?</p>
  
  <p>I have admin rights on DHCP server</p>
  
  <p>Edit</p>
  
  <p>I dont want to use arp cache as that would require me to either broadcast ping (which is not allowed on windows) or ping the all possible ip address of subnet( which takes lot of time).</p>
  
  <p>I am sure that DHCP server stores the mapping of MAC to IP, how can i use that information, to map MAC to IP address?</p>