[Dnsmasq-discuss] IP range with netmask?

Andrea Galvani and.galva at gmail.com
Thu Oct 31 19:46:36 GMT 2013

Hi Simon,

thanks for your answer.

You say that the IP address range should coincide with the netmask of 
the interface where I receive the DHCP Request (in my case, wlan0).
Actually, my wlan0 is /24, and I'm using dnsmasq to allocate 
users in /30 interfaces dynamically created for each one. These /30 are 
NOT part of the prefix.
Further more, my users have static IPs that belong to the range, so I've assigned that IP range to wlan0 on dnsmasq, and it 
For example:
* wlan0 is working on /24 (which can be seen as the "home" 
* a new user arrives, we know his MAC, which is assigned to a static IP 
* we allocate a /30 interface on that address ( /30)
* we use dnsmasq to send back to the user the static IP and all the 
parameters to work on the new interface (default gateway, netmask, etc)

This actually works, with every address inside the /8 range:


For every user, a static IP + dhcp options:


I'm using "special" software on the router, which allows to have ANY IP 
on the lan side (because these addresses are never directly exposed when 
routing through the Internet). Therefore, theoretically, I should tell 
the DHCP Server to be able to assign any address needed (even something 
If I understood correctly, the IP I'm providing statically MUST be 
contained inside the range I assign to the interface, that's why for now 
I use a /8. I would like to use a /0.

I wanted to understand if it's possible to do this with dnsmasq, or if 
it goes beyond the actual possibilities of a DHCP Server.

More information about the Dnsmasq-discuss mailing list