I am using Ubuntu 20.04 and systemd-resolved to resolve dns queries. Machine is attached to 1 interface.
network: ethernets: eth0: dhcp4: true set-name: eth0 nameservers: addresses: [126.96.36.199, 188.8.131.52] search: [domain.first, domain.second] version: 2
Resolvectl picking one of DNS server as current dns server. My challenge here is that I have one 184.108.40.206 dns server which is only resolving queries of domain.first and another 220.127.116.11 is only resolving queries of domain.second.
Whenever Resolvectl picking 18.104.22.168 as current dns server, queries of search domain.first are successful but queries of search domain.second are failing (which is obvious as it should be resolved by 22.214.171.124).
Is there way to setup resolvectl so that it should resolve queries based on domain search and its respective dns server .i.e. resolve to different dns servers based on search domain
I am aware that bind9 are providing this functionality but I want to achieve similar with systemd-resolved resolver.