[Dnsmasq-discuss] dhcp-range - must ip address of server be outside that?

dnsmasq.to.peejay at spamgourmet.com dnsmasq.to.peejay at spamgourmet.com
Mon Dec 28 00:47:09 GMT 2009

Rance wrote:
> Its usually helpful if your static ip addresses are all in a space
> that is NOT allocated to your dhcp pool.

[Rance's typo is corrected in the above]

I guess I'd better elaborate.

You can set a static ip by not defining it as part of the dhcp server
configuration (dhcpd.conf/dnsmasq.conf), and defining it independently of
the dhcpserver configuraton settings. We can define this as being "not
allocated to your dhcp pool".

The machines that are defined by the dhcpserver configuration are
"allocated to your dhcp pool".

Note that "allocated to your dhcp pool" is inapplicable for the machine
running the dnsmasq server, since it cannot be assigned an ip from the
dhcp service.

My question was about a dnsmasq server that had a static ip possibly in
the lease pool range, If it was in the range, then I expected a conflict
problem. However, dnsmasq is so well-designed that I considered it
possible (though unlikely) that dnsmasq checked if the address was already
in use by the dnsmasq server itself when handing out ips. Simon's answer,
that dnsmasq has no problem with this and knows the ip is used, surprised

The reason I asked the question was because I am scripting network
configurations and I had to cover this case (ie: someone deciding to
define the range of dhcp addresses in such a way that the dnsmasq server
ip address ends up being inside the range). I built a check to prohibit
that, but I wasn't actually sure it was necessary. So I asked the list,
and got that surprising answer from Simon. So I don't need to bother with
the check when using dnsmasq.

On to another issue now: static ips outside the allocated pool.

You seem to be implying that it is better not to define static ips in
dhcpserver config files (that is, it is better to have them outside the
dhcp range pool). Why?

(To be clear, I am thinking here of a lan with a mix of static and dynamic
ips, using a dhcpserver on the lan)

Please explain it, or point me to material that explains why this should
be a best practice.

> The fact that you don't already know this concerns me greatly.

That you are concerned about me not knowing this worries me too.


More information about the Dnsmasq-discuss mailing list