Article 56S6B dns server priority in systemd resolve

dns server priority in systemd resolve

by
vincix
from LinuxQuestions.org on (#56S6B)
I'd like to understand how the priority of the dns servers works in the systemd resolve service.
For instance, when I connect to the VPN, I get the DNS servers associated with the tun0 interface (systemd-resolve --status):
Code:Link 6 (tun0)
Current Scopes: DNS
DefaultRoute setting: yes
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
Current DNS Server: 192.168.50.21
DNS Servers: 192.168.50.21
192.168.50.22
DNS Domain: company.localAnd for my main wlan interface (facing the internet):
Code:Link 2 (wlp0s20f3)
Current Scopes: DNS
DefaultRoute setting: yes
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
Current DNS Server: 192.168.0.1
DNS Servers: 192.168.0.1
2a02:8109:a0c0:46c:10:18ff:febf:48dc
DNS Domain: ~.In this scenario, 192.168.0.1 (from my own router) is being used.
This is what I get when I tell the vpn client to "use this connection only for resources on its network".

But when I uncheck this, so that all the traffic goes through the vpn, there's no DNS anymore for Link 2 (the internet facing interface):
Code:Link 2 (wlp0s20f3)
Current Scopes: none
DefaultRoute setting: no
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: noThe one from tun0 remains the same.
So how can I actually tell what dns server is currently (default) being used without turning to tcpdump, for instance?latest?d=yIl2AUoC8zA latest?i=rpxe4DeOHkM:PQh3fptgXDY:F7zBnMy latest?i=rpxe4DeOHkM:PQh3fptgXDY:V_sGLiP latest?d=qj6IDK7rITs latest?i=rpxe4DeOHkM:PQh3fptgXDY:gIN9vFwrpxe4DeOHkM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments