How can I make permanent this UCI variables:
dhcp.lan.dhcpv6=‘relay’
dhcp.lan.ra=‘relay’
dhcp.lan.ndp=‘relay’
I want:
dhcp.lan.dhcpv6=‘server’
dhcp.lan.ra=‘server’
dhcp.lan.ndp=‘hybrid’
(from OpenWRT LuCi’s WEBpage.
Of course I used uci commit or Save&Apply but the settings remain always ‘relay’ which is doesn’t good for me (no IPv6 adresses on LAN interface by DHCP).
The problem is: if I modify the mentioned dhcp file by hand it will be rewrite at next reboot.
Something, somehow rewrite it.
The dnsmasq stop and start is not needed because I test with reboot and WEB GUI Save&Apply do the problem solving.
So I have to change the DHCP IPv6 settings after every reboot or power failure! It is very-very inconvenient.
How strange. Editing /etc/config/dhcp on my GL-ATX1800 doesn’t have this issue. I’m sure hitting ‘Save&Apply’ is near the same thing as /etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start. I tend to work moreso fr the CLI so its just a different way of doing the same thing (another way of doing it would be within LuCI’s System > Startup > Initscripts > $service > Stop/Start).
Back on topic: IDK what/which of GL’s custom scripts may be intercepting the dhcp conf but I can perhaps suggest a ‘dirty workaround’ (I hesitate to use the term ‘dirty hack’): add those UCI commands to /etc/rc.local:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
. /lib/functions/gl_util.sh
remount_ubifs
# my custom commands
uci $something that needs to be done
uci commit
exit 0
This can also be accessed within LuCI as System > Startup > Local Startup. Don’t forget exit 0 should be the last line of the file.
Beyond that, I do believe I’m rather at a loss unless we get into some sed & grepping should UCI commands within rc.local not properly execute.
So strange, yes!
I’d like to know why is recreating my dhcp file some options to a 'default" state what means ‘relay’. But this isn’t a real OpenWRT software because of the GL.iNET frontend.
I tried to search for ‘relay’ by grep on the root fs without success.
In my case it look like settings related to WAN-side IPv6 connectivity. I don’t personally use IPv6 so IDK. I have it explicitly turned off.
On another thought re: overwriting on reboots. What happens if you assign a reserved DHCP address for one of your connect computers/devices in LuCI & reboot? Does that get wiped/‘reset’ too? That functionality is also held in /etc/config/dhcp as an entry under config host. Try adding one & reboot. See if that setting ‘survives’.
(See LuCI, Network, DHCP and DNS, Static Leases.)
Worst case scenario is just applying some sed within rc.local to handle it all ‘post-boot.’