How to check if DHCP Server is running in a network

Luka dhcp at ml.evriala.net
Tue May 27 08:29:25 UTC 2008


You could use a simple perl script with help from Net::DHCP::Packet.

http://search.cpan.org/~shadinger/Net-DHCP-0.66/lib/Net/DHCP/Packet.pm

Well, at least it works for me.

Regards, Luka

Raghavendra wrote:
> Hi,
>  
>   My requirement is to check whether dhcp server is running in a 
> network, where my device is connected? its not on the same device but on 
> a different device in some network.
>  
> -Raghu
> 
>     ----- Original Message -----
>     *From:* y vasavi <mailto:y_vasavi at yahoo.com>
>     *To:* dhcp-users at isc.org <mailto:dhcp-users at isc.org>
>     *Sent:* Tuesday, May 27, 2008 12:57 PM
>     *Subject:* Re: How to check if DHCP Server is running in a network
> 
>     one solution for this would be
> 
>     to check the existence of dhcpd.pid,  this would be a file in my
>     case it is located in /var/run. you can always do find/locate to
>     find the path.
> 
>     if you can find the file dhcpd.pid, then dhcpd would be running
>     otherwise not.
> 
>     Thanks,
>     Vasavi.
> 
>     --- On *Tue, 5/27/08, Raghavendra /<s.raghu at samsung.com
>     <mailto:s.raghu at samsung.com>>/* wrote:
> 
>         From: Raghavendra <s.raghu at samsung.com>
>         Subject: How to check if DHCP Server is running in a network
>         To: dhcp-users at isc.org
>         Date: Tuesday, May 27, 2008, 12:26 PM
> 
>         Hi,
>          
>          I have a requirement where in I have to check after every 3
>         minutes whether some dhcp server is enabled/running in the
>         network. Enabling dhcp client after every 3 minutes is a big
>         over head, so I would like to first search/look if any dhcp
>         server running in a network, if so i will enable dhcp client to
>         get IP, else I will once again look for dhcp server after 3 minutes.
>          
>         Thanx in Advance.
>         -Raghu.
> 
> 


More information about the dhcp-users mailing list