[Dnsmasq-discuss] IP range with netmask?

Simon Kelley simon at thekelleys.org.uk
Wed Oct 30 12:44:41 GMT 2013

On 28/10/13 10:57, Andrea Galvani wrote:
> Hello everyone.
> I'm working on a particular network architecture which allows a host to
> have any address inside of a network (that is, not only private
> addresses!). The host is not directly reachable, and every connection
> with the host is managed by the router above the network with an ad-hoc
> protocol, which is not the matter here.
> Since every host has a fixed IP, I'm using dnsmasq for storing static
> leases for every host in the network.
> For now I've been using only addresses, but my idea is to
> start using really "any" address possible (for example:
> So, apart from the static leases, I configured dnsmasq like this:
> dhcp-range=wlan0,,,,1h
> Every host should obtain his static IP, without any restriction (even
> outside of the range).
> The range seems to be ok as dnsmasq boots:
> dnsmasq-dhcp[6180]: DHCP, IP range --, lease
> time 1h
> But as soon as I connect a host (which should obtain I get
> this error as a result:
> dnsmasq-dhcp[6180]: no address range available for DHCP request via wlan0
> Is the range not accepted by dnsmasq?
> Is it really possible to configure dnsmasq in order to provide "any"
> address?
> Are there some constraints (for example, on the netmask) which I'm missing?
> If so, which is the biggest address pool that is possible to configure?

The reason it's behaving like that is that for a dhcp-range to be valid, 
the netmask has to equal the netmask of the interface where the  DHCP 
request arrived. I think it's unlikely that you have as the 
netmask, and if you did, it would break routing anyway. That explains 
the problem: I don't think that there is a solution.


More information about the Dnsmasq-discuss mailing list