What's new

change leasetime guest dhcp range

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Krism

Regular Contributor
Hi I'm trying to change the leasetime of the guest network.
The config I added to dnsmasq.conf.add is successfully appended to the dnsmasq.conf. When the dnsmasq service is restarted I can see in the log that the config is loaded but it appears that dhcp range and leasetime config is configured from bottom to top.
Is there any other way to do this.

excerpt of the dnsmasq.conf:
interface=br1
dhcp-range=br1,192.168.101.2,192.168.101.254,255.255.255.0,86400s
dhcp-option=br1,3,192.168.101.1
interface=br2
dhcp-range=br2,192.168.102.2,192.168.102.254,255.255.255.0,86400s
dhcp-option=br2,3,192.168.102.1
rebind-domain-ok=/.reolink.com/dns.msftncsi.com/
interface=br1
dhcp-range=br1,192.168.101.2,192.168.101.254,255.255.255.0,3600s
dhcp-option=br1,3,192.168.101.1


excerpt of the logging:
Jan 27 09:42:56 rtaxbeast custom_config: Appending content of /jffs/configs/dnsmasq.conf.add.
Jan 27 09:42:56 rtaxbeast stubby[31204]: Stubby version: Stubby 0.4.0
Jan 27 09:42:56 rtaxbeast stubby[31204]: Read config from file /etc/stubby/stubby.yml
Jan 27 09:42:56 rtaxbeast dnsmasq[31212]: started, version 2.86 cachesize 1500
Jan 27 09:42:56 rtaxbeast dnsmasq[31212]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset no-auth cryptohash DNSSEC no-ID loop-detect no-inotify no-dumpfile
Jan 27 09:42:56 rtaxbeast dnsmasq[31212]: DNSSEC validation enabled
Jan 27 09:42:56 rtaxbeast dnsmasq[31212]: configured with trust anchor for <root> keytag 20326
Jan 27 09:42:56 rtaxbeast dnsmasq[31212]: warning: interface br2 does not currently exist
Jan 27 09:42:56 rtaxbeast dnsmasq[31212]: warning: interface pptp* does not currently exist
Jan 27 09:42:56 rtaxbeast dnsmasq[31212]: asynchronous logging enabled, queue limit is 5 messages
Jan 27 09:42:56 rtaxbeast dnsmasq-dhcp[31212]: DHCP, IP range 192.168.101.2 -- 192.168.101.254, lease time 1h
Jan 27 09:42:56 rtaxbeast dnsmasq-dhcp[31212]: DHCP, IP range 192.168.102.2 -- 192.168.102.254, lease time 1d
Jan 27 09:42:56 rtaxbeast dnsmasq-dhcp[31212]: DHCP, IP range 192.168.101.2 -- 192.168.101.254, lease time 1d
 
Why have you got dhcp-range=br1 twice? Is that a typo?
No typo the first one is added by the firmware ,the second is added because of the dnsmasq.conf.add. I would think/hope that my config would override the default (firmware) one
 
Well, dnsmasq.conf.add appends to the firmware default - so once dnsmasq reads the first one it will not look for that any more (simply put).
 
Well, dnsmasq.conf.add appends to the firmware default - so once dnsmasq reads the first one it will not look for that any more (simply put).
But why is it in the logging in reverse order then? I seems that dnsmasq reads both
 
It the way it's read in - the last one takes the honours. Sat thinking here, one solution is to copy the whole firmware dsnamsq.conf to /jffs/config/ and then edit that - that will replace the whole default file (but get it right!).
 
It the way it's read in - the last one takes the honours. Sat thinking here, one solution is to copy the whole firmware dsnamsq.conf to /jffs/config/ and then edit that - that will replace the whole default file (but get it right!).
Copy the whole file is indeed a solution, but too tricky for me and not very future proof
 
Last edited:
I already provided the solution for you when you asked before. You need to use a dnsmasq.postconf script:

 
I already provided the solution for you when you asked before. You need to use a dnsmasq.postconf script:

Ow, sorry must have missed your post ... I'll try that
 
I already provided the solution for you when you asked before. You need to use a dnsmasq.postconf script:

Great, it works perfectly!!!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top