Hi,
I have a DNS server (dnsmasq v2.55) at the center of three subnets: x.y.1.0/24, x.y.2.0/24 & x.y.3.0/24.
dnsmasq does a grand job of issuing a suitable DNS server address with the DHCP option 6.
So, machines on subnet x.y.3.0/24 are told that the DNS server is x.y.3.2,
machines on subnet x.y.2.0/24 are told that the DNS server is x.y.2.2 and
machines on subnet x.y.1.0/24 are told that the DNS server is at x.y.1.2.
Even though the DNS server is the same box (although with three nics).
Now the question is:
How do I make dnsmasq respond similarly to name resolution requests? So that when:
Machines from x.y.3.0/24, ping <name of DNS server> dnsmasq returns x.y.3.2,
Machines from x.y.2.0/24, ping <name of DNS server> dnsmasq returns x.y.2.2, and
Machines from x.y.1.0/24, ping <name of DNS server> dnsmasq returns x.y.1.2.
Currently, the DNS server returns the IP address that is assigned in /etc/host.
Which, of course can be changed, but via that mechanism, will always be wrong two out of three cases.
Regards, Martin