On Tue, Sep 01, 2020 at 07:50:46AM +0800, Ed Greshko wrote:
> I don't think the DHCP server for the QEMU VMs is supplying a domain.  
> However, Network Manager
> will add a "search" option to resolv.conf when "hostname" returns a FQDN.

Ed opened https://bugzilla.redhat.com/show_bug.cgi?id=1874419. To follow
up on this from a slightly different perspective:

NM *does* support pushing "search domains" into systemd-resolved, and in
general this is expected to work. For example, I now have a company
VPN configured using NM, and the "redhat.com" search domain is active:

$ resolvectl status tun0
Link 35 (tun0)
      Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
                 ...
  Current DNS Server: 10.38.5.26               
         DNS Servers: 10.45.248.15             
                      10.38.5.26               
          DNS Domain: redhat.com               

$ resolvectl query www www.redhat.com
www: 23.211.151.51                             -- link: hub0
     2a02:26f0:1300:186::d44                   -- link: hub0
     2a02:26f0:1300:190::d44                   -- link: hub0
     (e3396.dscx.akamaiedge.net)

-- Information acquired via protocol DNS in 263.0ms.
-- Data is authenticated: no
www.redhat.com: 2a02:26f0:1300:190::d44        -- link: hub0
                2a02:26f0:1300:186::d44        -- link: hub0
                23.211.151.51                  -- link: hub0
                (e3396.dscx.akamaiedge.net)

-- Information acquired via protocol DNS in 2.4ms.
-- Data is authenticated: no

(It says "hub0" because the address is public, so it would not be
routed through tun0. The relevant part is that "www" gets treated as
"www.redhat.com" by resolved.)


What does *not* happen, is the domainname part of a hostname received
via DHCP being installed as a search domain. In the case of a lease
received via DHCP by NetworkManager, it's NetworkManager that decides
what config to push to resolved. As discussed in
https://bugzilla.redhat.com/show_bug.cgi?id=1874419, automatically
installing the domain name as search domain this is not expected and
probably not a good idea as a default.

Zbyszek
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to