[Dnsmasq-discuss] Safe to use static DHCP allocations within dynamic range?

Ed W lists at wildgooses.com
Thu Oct 15 12:39:18 BST 2015


Hi, I'm not quite clear from the manual pages, so can I please get a 
definitive answer:

- Am I safe to use to assign a static IP allocation using --dhcp-host 
options, *within* an IP range allocated using --dhcp-range ?

Specifically, whilst I realise that dnsmasq will first ping to see if an 
IP is unused:
- Will there be a hard mask on the IP being handed out dynamically as a 
result of the --dhcp-host option?
- ie if the static allocated device is missing from the network for some 
long period of time, am I "safe" from having a dynamic device "pinch" my 
static IP?

Corner case:
- What happens if there is currently a lease allocated to IP w.x.y.z, 
and I setup a static --dhcp-host allocation for that IP and a 
*different* mac, ie this lease needs to be booted off.  Assuming the 
lease is technically not expired, and I disconnect the (now errant) 
device from the network and reconnect it, will it be able to regain it's 
(technically still not expired) lease, or will dnsmasq observe the 
static allocation, expire the lease and allocate a new dynamic allocation?


Background:
- I do realise it's best practice to have a separate static range 
outside of the dynamic allocation range
- For various technical reasons this environment would be massively 
simpler if it were possible to safely allocate static allocations 
*inside* the dynamic range and have them protected and always available 
(ie even if the machine is offline for a long period)


Thanks if anyone can confirm what happens here with certainty

Ed W



More information about the Dnsmasq-discuss mailing list