Common DNS static assignments but different DNS servers

Hello,

for local DNS defined as:

/ip dns set allow-remote-requests=yes use-doh-server=DOH ....

Is there a method, for certain MAC addresses, to change the target DNS server after checking the static assignments?

For example:

MAC A (default behaviour): query go to the local DNS - check if it exists in static assignments list - if not reroute DNS query to DOH server

but

MAC B: query go to the local DNS - check if it exists in static assignments list -* if not reroute DNS query to DNS server AA.BB.CC.DD*

The preferred form of certain adresses is one of the dhcp pool.

The goal is to use a common DNS static assignments list regardless of whether the DNS server address is a local server or another server outside the local network.

Thanks in advance.

Hi,

Check script funcionaliyres for DHCP server:

It is not possible to make the local DNS resolver of RouterOS do that, it does not support multiple instances so all config you do is the same for all the users of that router (no matter if they are in a different VLAN or have a different MAC).

It would be possible to give some clients the AA.BB.CC.DD address as a DNS resolver instead of the local resolver, but it would not be able to return the static leases.

A workaround is to register a domain and DNS service on the internet and put your static leases in that, instead of in your router.

Hello, as I resolved problem mentioned in another post I have two separate DNS servers/resolvers installed on two Mikrotiks in my network and I can configure list of statics in both of them by the same script with a little effort. It is fine for me. Thanks for support.