Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

hi i want to discover all the dhcp server currently available on LAN

share|improve this question

closed as not a real question by jscott, Ward, Lucas Kauffman, mailq, Tim Brigham Jul 29 '12 at 0:17

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

If you want to do it in C#, we;ll help you move this to StackOverflow, which is where programming questions go. – mfinni Oct 21 '10 at 11:13
i have posted it there too – user57800 Oct 21 '10 at 11:34
Why don't you grab the source for DHCPDUMP and figure out how to port it it C#? – Zoredache Oct 21 '10 at 16:36

Try DHCP Explorer, of course it'll only find servers on segments it's ran against, not 'all' as DHCP isn't routed by default.

share|improve this answer
i want to do it melodramatically using c# without being a part of the domain – user57800 Oct 21 '10 at 11:06
Well domain has nothing to do with it, DHCP is a L2 function, you'll just have to find your interfaces and issue multiple DHCP requests, noting responders, that's your only option really. – Chopper3 Oct 21 '10 at 11:11
If you want to do it without being in a domain, use Chopper's suggestion. It doesn't require it. If you want to do it in C#, we;ll help you move this to StackOverflow, which is where programming questions go. If you want to do it melodramatically, then, I dunno, make the output in all-caps with lots of !!!!! at the end. – mfinni Oct 21 '10 at 11:13
Chopper can to guid me how send DHCP Request using c#???? – user57800 Oct 21 '10 at 11:26
:-) mfinni sorry it was "programatically" not "melodramatically" – user57800 Oct 21 '10 at 11:31

If you want to find DHCP servers using a windows client your can check out the MS toll dhcploc utility which is part of the Supports tools package. XP SP2 Support Tools

share|improve this answer

DHCP requests are limited to a broadcast domain - i.e. subnets delimited by routers, unless you have something like IP helper setup on the router. So using some kind of network level discovery method, you will never know for sure if you got them all, unless you connect to every subnet.

You could use Wireshark or Network Monitor to view the network traffic in each of your broadcast domains - every DHCP server in a broadcast domain should respond to a DHCP request, even though the client will only handle the first response it recieves.

share|improve this answer