Re: dnsmasq dhcp failure

Andrew <[email protected]> Fri, 14 Oct 2022 15:15:10 +0300
Newsgroups gmane.linux.leaf.user
Message-ID <[email protected]>
14.10.2022 14:07, Erich Titl пишет:
> Hi
>
> Am 14.10.2022 um 10:41 schrieb Andrew:
>> 14.10.2022 01:24, Erich Titl пишет:
> ....
>
>>> It would be different if this was the DNS caching part of dnsmasq. 
>>> But then, to be honest, I hasve not even looked at this as a client 
>>> becomes nonfunctional if it cannot get an IP address.
>>>
>>> cheers
>>>
>>> ET 
>> monit can run external command or script. for ex., something like 'ip 
>> n|grep 192\.168\.0 | wc -l' (but it needs to have at least 1 client 
>> active), or compare iptables packes counter for 2 rules 
>> (input/output) for DHCP.
>
> Yes, an external check is what it takes but it cannot be as simple as 
> just checking the ip stack. There may be valid dhcp leases and still 
> issuing new leases may fail.
>
> It would require a process which fakes a client, e.g. injects a dhcp 
> request into the IP stack. I have not looked into this but it appears 
> not to be that simple.
>
> Maybe a virtual machine which just tries to get a dhcp lease and in 
> case of a failure sends a wakeup call to the dhcp daemon. But then who 
> watches the virtual client and its communication. This may just as 
> well fail like the dhcp daemon itself. This said it is not as easy as 
> just install monit.
>
> Maybe we can switch on dhcp logging on dnsmasq and find patterns that 
> allow us to detect the failure in the logs.
>
> ET 


we may just count dhcp requests and responses (maybe just broadcast 
ones) if there's a lot of broadcast (or any) requests and no responses 
since last check - we have a trouble.



------------------------------------------------------------------------
leaf-user mailing list: [email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/