Fresh Ubuntu Server install can reach the internet but not resolve local hostnames

0
2
Asked By MellowKite47 On

I installed a brand-new Ubuntu Server 26.04.1 machine using a simple DHCP setup. The local DHCP and DNS services run on the same older server, and internet DNS lookups work normally. The new machine receives the expected IP address, gateway, DNS servers, and search domain according to its network status, but it cannot resolve local hostnames. Other computers also cannot resolve the new machine by hostname.

The network is managed by systemd-networkd, with a basic Netplan configuration using DHCP. There is no desktop environment or NetworkManager installed. Running `dhcpcd -n eth0` manually makes local DNS resolution work temporarily, but the problem returns after reboot.

Further testing showed that the DHCP/DNS server itself could resolve internet domains and domains served by other DNS servers, but local hostnames also failed there with "Temporary failure in name resolution." This makes the DNS server or its local zone configuration seem more likely than a problem with the new Ubuntu client. What should I check to determine whether this is a client-side systemd-resolved issue or a problem with the local DNS server?

4 Answers

Answered By PixelCedar19 On

A manually run `dhcpcd` process changing the behavior suggests that more than one component may be managing the interface, but it does not prove that DHCP failed to provide DNS. Check the active link with `networkctl status eth0`, confirm that systemd-resolved is running, and inspect `/etc/resolv.conf` to see whether it points to the local resolved stub. Make sure there is only one network manager controlling the interface and that any `.network` configuration has DNS use enabled.

Answered By AmberSparrow5 On

The absence of a desktop environment makes the GNOME/NetworkManager explanation unlikely. A fresh client can still expose an existing DNS problem simply because it is the first machine being tested closely. Since the DNS server itself reports temporary failures for internal names, I would inspect the local BIND zone, zone-file syntax, reload logs, permissions, and whether the server is authoritative for the expected internal domain before changing the new client's configuration.

Answered By QuietHarbor62 On

Separate the failure into three cases: no name resolution, a name resolving to the wrong address, or a correct address that cannot be reached. `resolvectl query hostname.example` and `resolvectl status` can show which DNS server is being contacted and whether the search domain is installed. From another host, query the DNS server directly with something like `dig @DNS_SERVER hostname`. If that direct query fails, changing Netplan or systemd-networkd on the client will not fix it.

Answered By NorthStarVex8 On

The later testing points strongly toward the local DNS server rather than the new Ubuntu installation. If the DNS/DHCP server itself cannot resolve local names, while internet names still work, the local zone or forwarding configuration may be broken. Check that the zone containing your internal hostnames is loaded, that its records are present, and that the server is listening and answering on the LAN interface. Also verify that the DHCP server is advertising the intended DNS address and search domain.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.