[Dnsmasq-discuss] Single interface, multiple subnets...

Simon Kelley simon at thekelleys.org.uk
Sun Sep 26 18:31:55 BST 2010


Scott wrote:
> Hello,
> 
>  
> 
> I'm completely new to dnsmasq (and the Unix world in general [this is
> running on a FreeBSD box I've built]), and I'm looking to use dnsmasq to
> serve dhcp from a single interface to multiple network segments.  I have
> not, however, been successful so far.
> 
>  
> 
> Now this is just a single block split into two 25 bit ranges, the DHCP
> server is in the .128/25, and while it see's requests for both the .0/25 and
> .128/25, it will only serve requests from the .128/25, and posts the
> following for requests from the .0/25
> 
> "Sep 24 12:45:47 server1 dnsmasq[2640]: no address range available for DHCP
> request via eth0"
> 
>  
> 
> I had initially tried one single large range spanning both subnets, which
> didn't work.  I have now changed it to the below, which also hasn't worked.
> 
>  
> 
> My dnsmasq.conf:
> 
> dhcp-range=192.168.1.8,192.168.1.127,255.255.255.128
> 
> dhcp-range=192.168.1.130,192.168.1.240,255.255.255.128
> 
> dhcp-option=option:router,192.168.1.129
> 
> interface=eth0
> 
>  
> 
> The interface eth0 is configured as such:
> 
> Ip: 192.168.0.253
> 
> Mask: 255.255.255.128
> 
> Gateway 192.168.1.129
> 
>  
> 
> Any help would be.helpful.  ;-)
> 
>  
> 
> Warm regards,
> 
> Scott
> 


Could you give a bit more information about your configuration: at first
glance, what you're doing doesn't make any sense. You have two subnets
on one interface, which is fine, but the only thing that defines which
subnet a machine is on is its IP address, and DHCP allocates that
address. Before the address is allocated, all that's known about a
machine is that it's on a particular physical network, there's no way to
pin it down to a subnet.

Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list