HI i want to find IP's of all dhcp servers available on the lan using c#. Any Idea?
A:
Use the DHCP Server Management API http://msdn.microsoft.com/en-us/library/aa363376%28VS.85%29.aspx
The bad thing is that it's native win32 so you have to pinkvoke it.
Bogdan
2010-10-21 10:30:19
Thanks for you reply but these apis works only if i am a member the domain otherwise it does not work i want to discover the DHCP servers weather i am on domain or on workgroup
Ehtsham
2010-10-21 10:58:03
Then you have to create a custom packet and UDP broadcast it, as per RFC http://tools.ietf.org/html/rfc2131 and http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#DHCP_discovery
Bogdan
2010-10-21 11:36:04
@Bogdan - yes what i am asking about how can i create a dhcp request/discovery packet and send it any sinnepet
Ehtsham
2010-10-21 12:53:00