> So it seems to me that lookups by systemd-resolved
> are failing to lookup the hostname on the local DNS
> (even if this is by design)

yes, this is by design.  systemd-resolved never forwards "single label"
addresses to upstream nameservers.

> If the router has the hostname AND domainname defined:
> phspi05 192.168.2.35
> phspi05.phs 192.168.2.35

you don't need the router configured to resolve the "single label"
(without .phs) hostname (unless your router doesn't have 'phs' in its
resolv.conf search list, and you need to look up the hostname from the
router itself).

> on laptop
> dig phspi05 = fails

stop using dig to debug your system.  the behavior above is correct (dig
*should* fail when querying the local systemd-resolved resolver without
using .phs domain suffix).  Instead try using a program that uses
getaddrinfo(), like nslookup, ping, or even host.  e.g.:

$ host phspi05

> I guess I have a workaround to manually edit resolv.conf, and as I don't
> reboot that often it is not a big issue, but it doesn't feel right somehow.

it isn't right, and you don't need to.  Just make sure your router
delivers your domain as part of its dhcp reply, and you will be fine.
Your resolv.conf will contain your local domain in its 'search' and all
programs on your system using getaddrinfo() and friends will correctly
look up any address with your domain appended.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1821491

Title:
  DNS lookup fails for local hosts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1821491/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to