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

Scott VivoSomnio at comcast.net
Mon Sep 27 04:06:29 BST 2010


Well, what I'm doing is simply trying to have DHCP IP's for 2 different
subnets (192.168.1.0/25 and 192.168.1.128/25) served out of a single
interface.  The machines are on 2 different physical network segments.  The
192.168.1.0/25 has a default gateway of 192.168.1.1, the 192.168.1.128/25
subnet has a default gateway of 192.168.1.129.  Routing is set so that the
DHCP request will route to the DHCP server.  I turn on server 1 & server 2,
and though both DHCP ranges are set, and the DHCP Request packets from both
servers are received by the DHCP server, it only serves out a DHCP address
for server 2, and for server 1 (the server which is on a different subnet &
network segment) gives the error I indicated below: "Sep 24 12:45:47 server1
dnsmasq[2640]: no address range available for DHCP request via eth0".

Regards,
Scott

-----Original Message-----
From: Simon Kelley [mailto:simon at thekelleys.org.uk] 
Sent: Sunday, September 26, 2010 10:32 AM
To: Scott
Cc: dnsmasq-discuss at lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] Single interface, multiple subnets...

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