[Dnsmasq-discuss] DNSMasq / Multiple DHCP

/dev/rob0 rob0 at gmx.co.uk
Fri Jan 8 14:35:02 GMT 2010


On Thu, Jan 07, 2010 at 11:23:22AM -0800, Andy Leak wrote:
> I want to install DNSMASQ on the same physical LAN with an
> existing DHCP server.
> 
> This is for a new app that will dynamically create & destroy 
> virtual servers.

Can the virtual segment somehow be isolated from the Ethernet? If so
your problem is a bit simpler, as Richard suggested.

> The setup would have:
> - DNSMASQ on a machine with a fixed IP address
> - DNSMASQ and the existing DHCP server using separate address 
> ranges
> - only Linux clients (dhclient - /etc/dhclient3/dhclient.conf) -
> no windows or mac
> 
> My question: how do I ensure that the servers for my app use 
> DNSMASQ only, and that other machines on the lan only use the 
> existing DHCP server ??

Segregation is the best way. If DHCP packets from your Linux clients
can only get to your dnsmasq, and from the other hosts can only get
to the other DHCP server, you're done.

You could consider --dhcp-alternate-port, which might require the
least manual configuration, simply configuring the clients to all use
the alternate client port. I would guess this is simple enough in
dhclient(8), but I don't know it very well. Being Linux, it might be
done using an iptables DNAT rule in nat/OUTPUT, and a REDIRECT rule
in nat/PREROUTING, on each client.

You could list all your hosts and ignore unknown, as Richard said.
-- 
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header



More information about the Dnsmasq-discuss mailing list