2.
Dnsmasq man page:
--dhcp-sequential-ip
Dnsmasq is designed to choose IP addresses for DHCP clients using a hash of the client's MAC address. This normally allows a client's address to remain stable long-term, even if the client sometimes allows its DHCP lease to expire. In this default mode IP addresses are distributed pseudo-randomly over the entire available address range. There are sometimes circumstances (typically server deployment) where it is more convenient to have IP addresses allocated sequentially, starting from the lowest available address, and setting this flag enables this mode. Note that in the sequential mode, clients which allow a lease to expire are much more likely to move IP address; for this reason it should not be generally used.
UCI doesn't implement the dhcp-sequential-ip as far as I can tell, so you will have to find a way to pass the parameter directly to dnsmasq. You can probably do it by editing /etc/init.d/dnsmasq. Not pretty, but it'll work. This is probably the simplest approach:
Change:
procd_set_param command $PROG -C $CONFIGFILE -k
To:
procd_set_param command $PROG -C $CONFIGFILE -k --dhcp-sequential-ip
3.
Do you lose configured static leases? Or is it just that the router status page no longer shows the current leases? You could log the leases to external syslog for historical purposes. You can set shorter leasetimes, which will cause clients to renew (and thus make the router aware of the lease) quicker after a reboot. If you really want to, you can change "option leasefile '/tmp/dhcp.leases'" in /etc/config/dhcp to a path in flash memory, but as flash memory has limited write cycles I wouldn't do this.
(Last edited by makro on 19 May 2014, 09:35)