I've done some reading on this very site and other places found on google and am trying to put together some simple documentation to remind myself how it works. I am not sure about some parts at all and most of the wording is from other sites. Could someone knowledgeable tell me which part of the text is incorrect and correct me? Thanks in advance.
This is how I read how some of it works Both Ubuntu Server and Ubuntu Desktop use resolvconf to manage the resolv.conf file. That means that you should no longer edit /etc/resolv.conf directly; instead you should configure your network interface configuration utility to provide the right information to resolvconf. For Ubuntu Server the network interface configuration utility is ifup and it is configured by the file /etc/network/interfaces. For Ubuntu Desktop the network interface configuration utility is NetworkManager. This is what you are using.
Based on the above this is how I think it works You see I don't use NM, I've disabled it and kept dnsmasq enabled because I like its features.
Desktop [NetworkManager + dnsmasq] On desktop the network interface configuration utility is NetworkManager. When dnsmasq is used in conjuction then the real dns can be seen using the following command. nmcli device show ens160 | grep IP4.DNS
Desktop [ifup + /etc/network/interfaces + dnsmasq] On desktop if we disable NetworkManager then network interface configuration utility is ifup and it is configured by file /etc/network/interfaces. When dnsmasq is used in conjuction then the real dns is stored at /run/dnsmasq/resolv.conf which is populated by /etc/network/interfaces which is configured statically or dynamically by dhcp. So to view your real dns servers "cat /run/dnsmasq/resolv.conf". The value here then makes its way to /run/resolv/resolv.conf
Server [ifup + /etc/network/interfaces] On server with only /etc/network/interfaces and ifup, then the real dns is put directly to /run/resolvconf/resolv.conf To view your real dns servers "cat /run/resolvconf/resolv.conf
The queston is:
How does dns resolution workflow work on ubuntu desktop with ifup + /etc/network/ interfaces +dnsmasq How does dns work on ubuntu server with ifup + /etc/network/ interfaces