Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power cut on GL-AR150 breaks DHCP on restart #1010

Open
bbecker-inlogik opened this issue Jul 29, 2024 · 2 comments
Open

Power cut on GL-AR150 breaks DHCP on restart #1010

bbecker-inlogik opened this issue Jul 29, 2024 · 2 comments

Comments

@bbecker-inlogik
Copy link

Hardware: GL.iNet GL-AR150
Gargoyle: 1.12.0 (recently upgraded to 1.14)
Any power cut results in DHCP no longer working after restart.
I suspect stale/corrupt DHCP leases. Depending on the device router connectivity is lost, windows clients handling it very poorly and always losing connection.
Gargolyle router persists DHCP leases in the file /tmp/dhcp.leases

Steps to fix DHCP after power cut:
Configure the connecting computer to use a static IP address.
Login to Gargoyle router
Connection > DHCP
Untick "LAN DHCP Server Enabled", Save
Tick "LAN DHCP Server Enabled", Save
Reconfigure the connecting computer to use DHCP.

My permanent solution to prevent stale/corrupt DHCP leases following a power cut is to edit the options in /etc/config/dhcp :
$ ssh [email protected]
vim /etc/config/dhcp
find line as below
option leasefile '/tmp/dhcp.leases'
change to
option leasefile ''

Note: I am not sure if editing /etc/config/dhcp as a solution has any negative side-effects, but I haven't encountered any on 1.12 or 1.14
Please consider fixing this as the steps to fix DHCP after power cut are frustrating and error prone and therefore power cuts can cause long downtime. Also not everyone will know how to fix this after a power cut and even fewer will know how to permanently fix the issue via ssh.

@lantis1008
Copy link
Contributor

Can you test this only on a fresh 1.14 install please? And even better, a 1.15 beta if possible.
If there is an issue, I will not be debugging or fixing it back to 1.12 and for all we know it is already resolved.

We will not be removing the dhcpleases file from the setting, it is relied upon elsewhere.
After power cut this file should be empty as /tmp is not persistent.

I have never encountered such a bug. A lot more detail and troubleshooting is required before any action is taken.

I suspect if you have “Enforce DHCP Assignments” active that this is your real issue.

@bbecker-inlogik
Copy link
Author

I do have "Enforce DHCP Assignments" active. It might be a while before I can run a test as router is in daily use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants