Akkadius / glass-isc-dhcp

Glass - ISC DHCP Server Interface
MIT License
707 stars 144 forks source link

dhcp server is often stopped #70

Open flashbackpa opened 4 years ago

flashbackpa commented 4 years ago

It happens often that the dhcp server is off, as I can see from the tab: Start / Stop / Restart where it's written: DHCP Server is offline! (just happened whilst checking for the tab), but I can't find any clue in the logs, so I had to write a bash script to check via nmap if a dhcp server is present in the network otherwise restart via docker command... How can I help troubleshooting this issue ? Thank you.

flashbackpa commented 4 years ago

While waiting for a solution, this is how I workarounded it, maybe somebody is interested.. (please note that 192.168.1.166 is my dhcp server, and vmbr0 is the network card configured with that ip, so please change it according to your lan)

!/bin/bash

while [ 1 ]; do if ! [[ nmap --script broadcast-dhcp-discover -e vmbr0 | grep "192.168.1.166" | wc -l -eq 1 ]]; then docker restart glass-isc-dhcp; fi; sleep 15; done