Hi,
I have the same query as this question 205671
If I change the values of option 6 in UCI, is there a way to immediately update this information to all LAN & WLAN DHCP clients, without waiting for the complete (or 50%) lease time to expire?
Eg: dhcp.lan.dhcp_option='6,10.10.10.1,192.168.240.20'
Following is the data in /etc/config/dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='0'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
dhcp.@dnsmasq[0].ednspacket_max='1232'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcp_option='6,192.168.100.20,172.22.3.3'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
I have tried the following commands to no avail
ifdown lan
ifup lan
#This causes some WLAN clients to disconnect, & will have to manually connect them back
rm /tmp/dhcp.leases
/etc/init.d/dnsmasq reload
/etc/init.d/dnsmasq restart
killall -SIGUSR1 dnsmasq
NOTE: On disconnecting & reconnecting LAN & WLAN clients, they are receiving the updated option 6. But, I want this to be handled at the Router-end, so that I can automate this.
Reducing lease time is also a solution that I would not prefer.
Is DHCP force renew from the server/router a possibility that can aid with this ?
I could not find a way to achieve DHCP renew from the OpenWRT router.
Thanks in advance