I have OpenWRT on a router with two radios. I want the devices on one radio get one DNS server, and devices on the second radio to get a different DNS server.
I'm willing to work with the command line config files if you want me to edit /etc/config/dhcp instead. I show below what I tried.
I made two new interfaces, and assigned each one radio. I did not destroy the LAN interface since that seems a good way to lock myself out.
For each interface, I went to Edit > Advanced Settings > and unchecked "Use DNS servers advertised by peer" and put in a custom DNS server.
Now when I connect to an interface, I get the IP of the device itself, not the custom DNS servers I supplied above.
I went to the LAN, and Edit > Advanced Settings, and "Use DNS servers advertised by peer" is not an option. It has "Use Custom DNS servers." I put in a nonsense DNS server here, just to make sure it was not getting sent out. It is not.
Also on the LAN, Edit > DHCP Server > Advanced Settings has "DHCP-Options" and I put yet another DNS server here (as "6,1.1.1.1"). When I connect a device, I do get this DNS server, which is useful information for diagnostics, but it gives that server out on both radios.
It seems like the settings for "lan" are taking precedence. Maybe I defined my interfaces wrong.
... Just to experiment, I tried this in /etc/config/dhcp, to see if I could set dhcp on just the interfaces I want. After stopping and starting dnsmasq, I get the same resuts.
config dhcp 'lan'
option interface 'lan'
# option start '100'
# option limit '150'
# option leasetime '12h'
# option dhcpv4 'server'
# option dhcpv6 'server'
# option ra 'server'
# list ra_flags 'managed-config'
# list ra_flags 'other-config'
# list dhcp_option '6,1.1.1.1'
config dhcp 'netgyre5'
option interface 'netgyre5'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
list dhcp_option '6,1.0.0.1'
config dhcp 'netgyre2'
option interface 'netgyre2'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
list dhcp_option '6,9.9.9.9'
What are my next steps to debug?