[Dnsmasq-discuss] greetings and a question about multiple subnets

Simon Kelley simon at thekelleys.org.uk
Fri May 1 18:15:20 BST 2009


Christ Schlacta wrote:
> I'm setting up a setup with multiple subnets routed by one machine.
> 10.0.1.0/24 and 10.0.2.0/24 will be the subnets, both routed by a
> single router which is also a nat router.  The two router is named
> router0 and has three IP addresses on three interfaces.  wan0 is
> assigned by dhcp.  lan0 is 10.0.1.55, and lan1 is 10.0.2.55.  the
> question I have is thus:
> 
> How can I configure dnsmasq such that clients on lan0 (10.0.1.0/24)
> get the ip address 10.0.1.55 when resolving router0 and hosts on lan1
> get the ip address 10.0.2.55 when resolving router0, 

/etc/hosts:

10.0.1.55 router0
10.0.2.55 router0

/etc/dnsmasq.conf:

localise-queries

> and that clients
> on lan0 and lan1 never get the wrong IP address (the address from the
> other subnet)
> 

Nothing needed, it will just work automagically.

HTH

Simon.





More information about the Dnsmasq-discuss mailing list