DHCP Listen is Broken. Can You Make it Go?

Hi All!

I’m trying to get DHCP Listen set up (Network binding 2.2 snapshot), but this isn’t exactly my area of expertise. I’ve got through all the other posts on the subject, and I’m still at a loss.

I’ve set up a DHCP server on my Raspberry Pi (I don’t know if that was necessary, or if you can use the one on the router, but I did it anyway), and it seems to be working. I’ve also gone through the port forwarding setup as per the readme, but it’s still a no-go.

I’m getting this in the logs:

2017-11-11 23:51:42.083 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online

And my setup looks like this…

.cfg:

allowDHCPlisten=true                             
allowSystemPings=true

Thing (I’ve also tried it with dhcplisten=“true”) :

network:pingdevice:stevePhone [ hostname="xxx.xxx.xxx.xxx" , refreshInterval=120000, timeout=5000, retry=3]

Items:

Switch stevePhone "Steve" (gPhones) {channel="network:pingdevice:stevePhone:online" }

Any thoughts on where I’m going wrong?

Thanks!

I’m pretty sure you don’t have to do this. The DHCP listener will detect DHCP requests, but it’s very likely that these packets will never raise the DHCP listener if there is another active DHCP listener (or server) on the same machine.

Hmmm, ok. I thought I had read somewhere that the DHCP server had to be on the same machine, but then I started to doubt that…

Anyway, I I’ve disabled the one on the raspberry, and re-enabled the one on the router. Still a no-go. Is there a way I can check to see if the port forwarding is actually enabled?

You can use netstat -a to get a list of all listening ports on the Raspberry. DHCP is UDP on port 67/68, at least DHCPDISCOVER and DHCPREQUEST are broacasts, so the Raspberry should see these packets.

Hold on that! Toyed around a bit more, and it seems to be working! I’ll test it a bit more to be sure. Thanks!

It seemed to start working when I set the static IP for the phone in the routers DHCP settings, rather than in the phones wife settings. Not sure why that would make a difference (or if it’s just coincidence), but it’s working now. Thanks!

If setting an IP address in the phone, DHCP is disabled… so the phone will never ask for an IP address.

1 Like