[Dnsmasq-discuss] Assigning DHCP ranges based on incoming network interface

Simon Kelley simon at thekelleys.org.uk
Tue Jan 1 20:44:05 GMT 2008


Lars Noodén wrote:
> What is the established method for assigning DHCP ranges based on
> incoming network interfaces?
> 
> I have 5 network interfaces (sis0 - sis4), where each should be serving
> a different subnet. e.g.
> 
> 	sis0	10.122.222.0/24
> 	sis1	10.122.224.0/24
> 	sis2	10.122.226.0/24
> 	sis3	10.122.228.0/24
> 
> Can that be done with a single instance of DNSmasq?
> 

Just give dnsmasq five dhcp-ranges[1], one for each interface. It knows 
the address and netmask of the interface, so it can decide which range
is needed for any incoming request.

eg:

dhcp-range=10.122.222.1,10.122.222.100
dhcp-range=10.122.224.1,10.122.224.100
etc...



[1] actually, you can have more, with multiple ranges for single 
interface, but you need at least one for each interface.

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list