Constant DHCP requests from IMP

I have a couple of IMPS on my network. One of them is plugged into the Env Sensor Tail.

I was idly looking at my router log and can see a constant stream of DHCP requests from this IMP

`Feb 22 19:22:10 dnsmasq-dhcp[6042]: DHCPREQUEST(br0) 192.168.254.186 70:ee:50:13:78:3c 
Feb 22 19:22:10 dnsmasq-dhcp[6042]: DHCPACK(br0) 192.168.254.186 70:ee:50:13:78:3c 
Feb 22 19:22:15 dnsmasq-dhcp[6042]: DHCPDISCOVER(br0) 0c:2a:69:04:71:67 
Feb 22 19:22:15 dnsmasq-dhcp[6042]: DHCPOFFER(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:22:15 dnsmasq-dhcp[6042]: DHCPREQUEST(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:22:15 dnsmasq-dhcp[6042]: DHCPACK(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:22:17 dnsmasq-dhcp[6042]: DHCPRELEASE(br0) 192.168.254.186 70:ee:50:13:78:3c 
Feb 22 19:22:53 dnsmasq-dhcp[6042]: DHCPDISCOVER(br0) 0c:2a:69:04:71:67 
Feb 22 19:22:53 dnsmasq-dhcp[6042]: DHCPOFFER(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:22:53 dnsmasq-dhcp[6042]: DHCPREQUEST(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:22:53 dnsmasq-dhcp[6042]: DHCPACK(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:23:32 dnsmasq-dhcp[6042]: DHCPDISCOVER(br0) 0c:2a:69:04:71:67 
Feb 22 19:23:32 dnsmasq-dhcp[6042]: DHCPOFFER(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:23:32 dnsmasq-dhcp[6042]: DHCPREQUEST(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:23:32 dnsmasq-dhcp[6042]: DHCPACK(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:24:12 dnsmasq-dhcp[6042]: DHCPDISCOVER(br0) 0c:2a:69:04:71:67 
Feb 22 19:24:12 dnsmasq-dhcp[6042]: DHCPOFFER(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:24:12 dnsmasq-dhcp[6042]: DHCPREQUEST(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:24:12 dnsmasq-dhcp[6042]: DHCPACK(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:24:50 dnsmasq-dhcp[6042]: DHCPDISCOVER(br0) 0c:2a:69:04:71:67 
Feb 22 19:24:50 dnsmasq-dhcp[6042]: DHCPOFFER(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:24:50 dnsmasq-dhcp[6042]: DHCPREQUEST(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:24:50 dnsmasq-dhcp[6042]: DHCPACK(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:25:28 dnsmasq-dhcp[6042]: DHCPDISCOVER(br0) 0c:2a:69:04:71:67 
Feb 22 19:25:28 dnsmasq-dhcp[6042]: DHCPOFFER(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:25:28 dnsmasq-dhcp[6042]: DHCPREQUEST(br0) 192.168.254.141 0c:2a:69:04:71:67 
Feb 22 19:25:28 dnsmasq-dhcp[6042]: DHCPACK(br0) 192.168.254.141 0c:2a:69:04:71:67
`

And this is despite the DHCP table saying the lease is good for almost a day …

0d 23h 59m 54s 0C:2A:69:04:71:67 192.168.254.141

Any idea what might be going on ?

Pat

Each re-connection to the wifi will cause a DHCP request. Does that IMP sleep/wake/repeat at all?

Ah ! That must be what is going on … I did not realise it would create a new DHCP request every time … It’s running borrowed/modified code to generate a weather report, so must be polling every minute ! I’ll slow it down. Thanks ever so much for the quick reply.

Even when we persist lease times in nv storge (it’s on the list!), having been incommunicado whilst asleep, an imp would have to at least DHCPREQUEST on a wake just in case (for example) the DHCP server had been restarted and its pool cleared.

The traffic involved is miniscule and local network only so besides the log lines on your DHCP server there really aren’t any ill effects.

True :slight_smile: My router has been having some ‘episodes’ of late, and pretty much the only thing I saw in the log was these DHCP requests, which I wasn’t expecting … so I wondered if something was up. It seems not, I have gone back a couple of firmware versions and the router is much happier (and the DHCP stuff is still there :slight_smile: )

Any way to disable DHCP then? I’d much prefer giving it a static IP vs. DHCP spam.

edit: found it: it’s in imp (setstaticnetworkconfiguration). I just saw net.info() earlier and that’s read-only.

The setstaticnetworkconfiguration is only in release 33 or later. This is currently only available for imp005.

You’ll have access to this when release 34 ships for all imps.