Yes, you can configure systemd-resolved to use the DNS servers in the order provided without dynamically switching based on speed. Here’s how you can do it:
Replace IP_of_pihole and IP_of_mikrotik with your actual DNS IP addresses. This tells systemd-resolved to only use the DNS servers in the order you’ve specified.
Prevent automatic DNS changes by network manager:
If you’re using NetworkManager, create a drop-in configuration to prevent it from overriding DNS settings: