[Dnsmasq-discuss] [FEAT.REQ] Further localisation of --localise-queries

Luca Landi me@lucalandi.com
Mon, 2 May 2005 23:36:06 +0200

Alex Hermann ha scritto:
> On Sunday 01 May 2005 14:19, Luca Landi wrote:
> > Alex Hermann ha scritto:
> > > >> server: eth0 <---> client1 :
> > > >>         eth1 <---> client2 :
> > > >>         eth2 <---> client3 :
> > > >>         eth3 public ip   <---> inet
> >
> > [...]
> > if you want your server to play the role of the switch then all you have 
> > to do is to bring up a bridge interface, [...]
> Sadly enough, some things aren't possible with the (linux) bridging code. 
> My connections are a horrible mix of Gbit, 100Mbit, 10Mbit and wifi. To 
> get the max out of the Gbit connection I need a high MTU on that iface. 
> The bridging code doesn't support a MTU other than 1500 at all (or just 
> not across different bandwidth devices). Also, there seem to be some more  
> problems with my nics and bridging that need some further investigation. 

Ok, I see.

So, to go back to your original question, did you try to run three different 
instances of dnsmasq, each serving only one IP address, where two of them 
serve only DNS requests and the third one serves both DNS and DHCP? this 
way you can configure each dnsmasq instance to read a different "hosts" 
file while at the same time keep DHCP centralised. Having different "hosts" 
files let you fine tune which static IP addresses get sent to your clients. 
Basically the whole thing shoud look like this:

dnsmasq -a -H /etc/hosts1 -h -F <your-DHCP-range-of-addresses>
dnsmasq -a -H /etc/hosts2 -h
dnsmasq -a -H /etc/hosts3 -h

/etc/hosts1 contains:	your-server-hostname

/etc/hosts2 contains:	your-server-hostname

/etc/hosts3 contains:	your-server-hostname

I only thought it and didn't try it but to me looks like it may work fine. 
The only remaining issue might be the '-h' option, which is needed to 
prevent dnsmasq from reading the main /etc/hosts file. If you have no 
common static hostnames to serve then I think you should be fine, else I'm 
afraid you'd have to duplicate the common static hostnames into the other 
three "hosts" files. Also remember to add a '-a' to one of the 
three instances if you need to query dnsmasq from the server machine