[Dnsmasq-discuss] IP range with 0.0.0.0 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 10.1.1.0 /24, and I'm using dnsmasq to allocate 
users in /30 interfaces dynamically created for each one. These /30 are 
NOT part of the 10.1.1.0/24 prefix.
Further more, my users have static IPs that belong to the range 
10.0.0.0/8, so I've assigned that IP range to wlan0 on dnsmasq, and it 
works.
For example:
* wlan0 is working on 10.1.1.0 /24 (which can be seen as the "home" 
network)
* a new user arrives, we know his MAC, which is assigned to a static IP 
(e.g. 10.1.2.121)
* we allocate a /30 interface on that address (10.1.2.120 /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 10.0.0.0 /8 range:

dhcp-range=wlan0,10.0.0.1,10.255.255.254,255.0.0.0,1h

For every user, a static IP + dhcp options:

dhcp-host=XX:XX:XX:XX:XX:XX,set:alice,10.1.2.121
dhcp-option=tag:alice,3,10.1.2.122
dhcp-option=tag:alice,54,10.1.2.122
dhcp-option=tag:alice,1,255.255.255.252
dhcp-option=tag:alice,28,10.1.2.123
dhcp-option=tag:alice,6,10.1.2.122
dhcp-option=tag:alice,15,alice

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 
like 1.2.3.4).
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 10.0.0.0 /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