Bug #15850
openDHCP not always giving gateway
0%
Description
I've noticed that if when using VLANs on the LAN interface, a DHCP server is configured with the default gateway (i.e., not specified, so will use the VLAN's IP address), there are times that DHCP leases are given with no gateway. A reboot of the router will fix this, but I believe hard-coding the IP address of the VLAN also fixes it.
I'm able to replicate this sometimes by booting the router with nothing connected to the WAN interface. This was done on various version of software, including 23.09.1-RELEASE on Netgate SG-2440, SG-3100 and 2100, but I suspect it's universal on many versions of software.
I can't imagine a scenario where this would be deemed acceptable and should be fixed.
I have attached a screenshot of an AppleTV that had this problem and another after forcing DHCP renew. I also included a screenshot of the router DHCP log for that AppleTV MAC address.
Files
Updated by Audio Images IT 3 days ago
I have access to Netgate 4100 and 4200 routers, so I can try on those routers, but since it has been observed on three different Netgate routers, one of which is Intel and the other two are different gen ARM, I suspect this is more universal.
Updated by Jim Pingle 2 days ago
I haven't seen this happen before and I'm not quite sure what would make it happen either. Unless the client itself is not requesting a gateway in the later updates, but if that were the case restarting the server wouldn't alter the behavior.
Grab a copy of /usr/local/etc/kea/kea-dhcp4.conf
when it's working and again when it isn't working -- are there any differences?
Can you get a packet capture of the DHCP requests/responses when it works vs when it doesn't?
Updated by Audio Images IT 2 days ago
Marcos M wrote in #note-2:
Would you be able to test this on 24.11-RC using Kea (enabled on the page System > Advanced > Networking)?
I'll give it a try and see if it has the same problem.
Updated by Audio Images IT 2 days ago
Audio Images IT wrote in #note-4:
Marcos M wrote in #note-2:
Would you be able to test this on 24.11-RC using Kea (enabled on the page System > Advanced > Networking)?
I'll give it a try and see if it has the same problem.
If you have a test environment, try the scenario I think causes the issue: Bring up the router with no WAN connection (i.e., like if the ISP or modem is down). Try it a few times and see if you are able to replicate the problem. It won't happen every time, but I'm surprised if no one else has this problem.