Is firmware using DHCPRequest instead of PING by mistake?
-
@Emil Wow, you are fast at work!
My HUB LR is #[MASKED]. I want to test it by all means. regards! -
Hi. I have applied the patch you linked to and built a new firmware for Flic Hub LR.
@akiraK @yea @Djelibeybi please give me the serial numbers of your hubs so I can assign the new firmware if you want to test it, to see if the patch works.
-
@akiraK thanks, will take a look.
-
@Emil Maybe it is dhcp-8.1.9's bug, occurred on mine too.
Please check https://bugs.gentoo.org/766282 as similur situation, and publish FW with patched dhcpd if you could, as "easy way to solve it".
Thank you. -
@Emil I have combed through the source code of the dhcpd-8.1.9 and there is nothing that indicates that it makes more than ONE request to retrieve an IP address and network parameters, and then remains idle until approximately 1/2 of the lease time expires then it negotiates a lease renewal. YES, there are exceptions in the code to accommodate error handling, but even then the requests are restricted to a total of four(4). This means in order to make multiple requests the operating system(aka firmware) has to call the daemon to initiate each new request.
This brings me back to my original statement. The DHCP daemon is being repeatedly called to check for connection status. This only determines if there is a connection to a active network; however, it does not determine if there is a gateway to the internet, nor does it determine if there is any usable resource beyond that gateway.
Why not send a ping to connectivitycheck.gstatic.com to determine if there is internet access. Ping is short, distinct, and reliable way that requires very little processing time or resources. Now sending a ping can provide answers to multiple questions. First, if the ping times out it would mean there is not an active network connection of any type. Two, if the PING returns destination unreachable it means there is an active network connection, but lacks a path to the internet. Three, if you receive a response from the target it means you are both connected to an active network and there is a path the internet. Now I'll venture out onto a proverbial limb here and guess that the ping.c library was deliberately left out due to memory constraints.
-
@Djelibeybi My hub on WiFi makes so many requests it causes other WiFi devices to drop their association with the access point.
-
As mentioned before, we are using dhcpcd 8.1.9, which should be used in many different products on the market. We use that particular version since it was the only version we could find that passed Apple's Homekit certification tests. You are free to investigate the code to see if you can find any issues with it. Since we are not familiar with this code and currently have other more prioritised work to do, we will unfortunately not take a look at this in the nearest future as it looks right now, unless we find an easy way to solve it.
-
Mine isn't quite as bad as 100 packets per minute, but I am getting a
DHCPREQUEST
every 45-60 seconds. The lease is for 12 hours.Aug 9 07:35:33 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:35:33 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:36:36 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:36:36 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:37:40 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:37:40 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:38:44 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:38:44 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:39:47 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:39:47 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:40:52 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:40:52 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:41:56 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:41:56 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:43:01 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:43:01 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:44:04 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:44:04 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:45:09 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:45:09 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:46:12 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:46:12 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:47:16 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:47:16 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:48:19 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:48:19 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:49:23 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:49:23 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:50:26 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:50:26 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:51:30 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:51:30 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:52:34 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:52:34 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:53:38 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:53:38 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:54:43 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:54:43 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:55:47 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:55:47 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:56:51 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:56:51 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:57:56 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:57:56 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 07:58:59 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 07:58:59 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:00:03 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:00:03 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:01:08 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:01:08 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:02:13 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:02:13 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:03:16 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:03:16 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:04:19 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:04:19 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:05:24 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:05:24 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:06:28 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:06:28 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:07:33 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:07:33 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub Aug 9 08:08:37 dnsmasq-dhcp[15485]: DHCPREQUEST(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 Aug 9 08:08:37 dnsmasq-dhcp[15485]: DHCPACK(eth0) 192.168.9.22 c6:df:61:eb:7d:d2 flichub
This only happens with a wired connection, btw. If I disconnect the cable and configure wifi, the Flic Hub behaves itself.
-
YES - I am 100% correct. The firmware is using DHCPREQUEST to test network connectivity. This is why the flic hub is sending out almost a 100 DHCPREQUEST packets a minute.
Received a suggestion that I should try increasing the DHCP lease time. Well I first tried Zero(static), , then 1,440 (24 hrs), then I tried 99,999 minutes(That's 69.44375 days). This does not stop or change the rate of DHCPREQUEST traffic. (FYI - Depending on the DHCP or DNSMASQ version you are running the DHCP lease time is generally restricted to five digits.)
When you disable DHCP on the network the FLIC_HUB immediately goes into an offline state.
If you are using ethernet connection the flic hub now shows 'CONNECTED' with the IP address of 169.254.194.195. It knows the NIC is physically connected but refuses to communicate until there is DHCP service. Why do I say this? When you disconnect the ethernet cable the status changes to 'Connect cable.'If you are using a WiFi connection the flic hub reports 'WiFi disconnected,' but it shows an IP address of 169.254.194.195. Now if the hub has lost it's wlan connection why is it showing an automatic private address? That is because the access point it was communicating with still shows the flic hub as associated and responding to traffic control packets(RTS/CTS).
So that only leaves ONE possible explanation. When the flic hub does not receive a DHCPACK it goes offline under the assumption that there is no active internet connection. This is WRONG!
Maybe you need to implement a Network Connectivity Status Indicator(NCSI) similar to Microsoft has done with windows.This is not an isolated incident to just a SINGLE flic hub. I have FIVE(5) FLIC hubs sitting here in front of me that all exhibit the exact same behavior. It does not matter which type of connection you use, WiFi or ethernet, the FLIC hub uses DHCPREQUEST to test network connectivity.
Now I was helping a friend troubleshoot their VoIP connection for a remote work setup using WiFi. NO, they cannot use ethernet. This person's landlord does not permit cables or cords of any type to be on the floor, even temporarily. And no taping to the floor isn't acceptable either, we asked. If the landlord finds that condition it is grounds for immediate eviction.
What did I find? Two flic hubs broadcasting nearly 300 DHCPREQUEST a minute across a wireless connection causing congestion on the wireless network. So I unplug the flic hubs and the issue instantly resolves itself. So here is a prime example that this method is poor choice to check for internet connectivity. (Two flichubs? I don't wanna go it that story.)YES - This causes disastrous latency issues for gaming computers & consoles using WiFi.
I quit counting how many times unplugging a FLIC HUB solved latency issues for gaming.Here is a list of switch and router manufacturers I can duplicate this behavior with.
- Ubiquiti
- Cisco Systems & Meraki
- Juniper
- HP Pro Curve
- Huawei
- Avaya
- Mikrotik
- Dell
- Netgear
- D-Link
- TP-link
- Zyxel
- Buffalo Technology
- Auruba
- Samsung
- Ruckus Networks
- Linksys/Belkin
- TrendNet
- Motorola
- Arris
Does not matter which brand of router/switch/AP is used in conjunction with the flichub if DHCP is disabled the flichub will go offline without fail - guaranteed.
-
Hi. We use dhcpcd-8.1.9 (https://github.com/NetworkConfiguration/dhcpcd/tree/dhcpcd-8.1.9). You are free to investigate the code there to see if you can find any cause of this. Other than that, nothing on the Flic hub sends out dhcp requests.