Check for running DHCP daemon?

Michael Ströder michael at stroeder.com
Sat Jan 24 05:43:28 EST 2015


Chris Angelico wrote:
> On Sat, Jan 24, 2015 at 9:38 AM,  <sohcahtoa82 at gmail.com> wrote:
>> Secondly, even if you find a module, keep in mind that the module probably won't stay in Python land.  It will probably call an external utility itself.
>>
>> If you REALLY wanted to check it without calling an external utility, you could connect to port 67 and see what happens, but that could cause problems.
> 
> We're talking UDP here, so there's no "connect to" concept. You have
> to send a packet and listen for a reply,

If I'd want to implement a serious DHCP monitoring I'd use a DHCP module and
try to renew a certain monitoring lease. With that approach you'd also see
whether the DHCP server does something meaningful.

Ciao, Michael.




More information about the Python-list mailing list