UCI settings after reboot

Hi,

I’ve got a GL-AX1800.

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).

TIA,

I never cared for UCI; I guess I’m just too comfortable in vim:

vi /etc/config/dhcp

/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start

That should do it.

Nano is easier to use than VI, though. It should be in the opkg install feeds.

Hi,

Thank you for your help!

The problem is: if I modify the mentioned dhcp file by hand it will be rewrite at next reboot.
Something, somehow rewrite it. :slightly_frowning_face:

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.

TIA,

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.

I will do the workaround soon …

TIA,

I found this in /etc/config/glipv6 file:

config interface ‘lan’
option dnsmode ‘auto’
option lan_ip6addr ‘fd77:5451:2529::1/64’
option mode ‘relay’

What does it mean “option mode ‘relay’”?
And is there relation with dhcp file?

TIA,

Here’s the output fr a cat on my ATX1800, f/w 4.2.1:

config globals ‘globals’
option enabled ‘0’
option origin_ula_prefix ‘$mac-address::/48’

config interface ‘wan’
option interface ‘wan’
option addrmode ‘auto’
option dnsmode ‘auto’

config interface ‘lan’
option mode ‘nat6’
option dnsmode ‘auto’
option lan_ip6addr ‘$mac-address::1/64’

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.’