As a general solution, I would like to share dns resolution between different servers using dnsmasq.
i.e. By default, dns server A is used if dns server B is not explicitly installed on the host (mac).
I would like to split my network into dnsmasq subnets, for this example say:
192.168.1.80-150 = green
192.168.1.40-50 = red
I would like the dhcp lease to be passed using -default-tagged green, with the exception of a few specific MAC addresses where I would like to pass the red tag. I am sure that this part works successfully (I suppose), where I explicitly install it using the MAC - but what I need is all that is not specified otherwise - the default is green.
Then I would like to say "for all green tags, give them DNS A server as your resolver", "for all red tags, give them DNS server B as your resolver."
Is it possible?
I have the following configuration, which does not seem to work:
dhcp-range=set:green,192.168.1.80,192.168.1.150,infinite
dhcp-range=tag:red,192.168.1.40,192.168.1.50,infinite
dhcp-option=net:green,option:dns-server,8.8.8.8,8.8.4.4
dhcp-option=net:red,option:dns-server,192.168.1.11
dhcp-host=AA:BB:CC:DD:CC:BB,redhost1,192.168.1.41,infinite,net:red
dhcp-host=BB:CC:DD:AA:BB:00,greenhost1,192.168.1.81,infinite,net:green
dhcp-option=option:router,192.168.1.1
This does not seem to work, I have different hosts that are assigned different IP addresses based on whether I match their MAC, and then it seems that the dns server is being distributed incorrectly.
I believe that the dns server is not being transmitted because "cat / etc / resolv.conf" on one of the hosts shows 127.0.0.1.
To summarize my queries:
- Can I make everything default “green” if I don't explicitly specify “red” by MAC (at the moment I have to explicitly put all the Macs in a conf file)?
- Can I specify different DNS servers for different labeled networks?
- , "" "", googling , .