My company distributes software to clients on Ubuntu VMs. Recently we've been updating all client VMs from Ubuntu 16/18 to Ubuntu 20.04.
We've been having an issue where DNS name resolution isn't working on the internal network. It's working outside of the network (we're able to ping external websites), but we're not able to connect to machines on the internal network by DNS name - only by IP address. In many cases we were able to resolve internal DNS names on the old VMs (Ubuntu 16/18), but it's not working when we install the new VM using the same network settings.
We usually set the VM up with a static IP. The client's IT gives us their network info and internal dns server(s), and we set up our 00-installer-config.yaml
file accordingly
/etc/netplan/00-installer-config.yaml
example setup:
network:
ethernets:
enp0s10f0:
addresses: [192.168.10.200/24]
gateway4: 192.168.10.1
nameservers:
addresses: [192.168.10.1, xxx.xxx.xxx.xxx, etc.]
version: 2
On the old VMs, often we couldn't ping internal machines by DNS name until we added the local domain name. Eg. ping fs01
wouldn't work but ping fs01.clientdomain.local
would work. However, on the Ubuntu VMs this doesn't seem to be helping at all. We always have to revert to the IP address of a file server rather than using the domain name. In most cases this is fine since the IP is static and not subject to change, but this isn't always the case and we'd prefer to be able to connect via DNS name.
Networking and domains really aren't my strong suit. If anyone could make suggestions of things to try or areas to research that would be much appreciated!
UPDATE
I tried the suggestion of adding the internal nameserver IP address to the nslookup
command and took some screenshots. It does look like the VM is able to find the host with nslookup
, but only when I include the nameserver IP explicitly.
192.168.1.4 is the nameserver and also the host that we're trying to connect to.
Note: This was working on the old Ubuntu 18.04 VM, using the same internal nameserver and the FQDN hostname.
Regular Ping
user@ubuntu:~$ ping <hostname.domain.local>
ping: <hostname.domain.local>: Temporary failure in name resolution
Simple nslookup
user@ubuntu:~$ nslookup <hostname.domain.local>
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find <hostname.domain.local>: SERVFAIL
nslookup with nameserver IP
user@ubuntu:~$ nslookup <hostname.domain.local> 192.168.1.4
Server: 192.168.1.4## Heading ##
Address: 192.168.1.4#53
Name: <hostname.domain.local>
Address: 192.168.1.85
Name: <hostname.domain.local>
Address: 192.168.1.4
In this case, the 192.168.1.4 nameserver was the only nameserver entry in our yaml file. So I don't see how this could be some sort of issue with the order of nameservers in the file:
network:
ethernets:
enp0s10f0:
addresses: [192.168.1.21/24]
gateway4: <gateway>
nameservers:
search: [<domain.local>]
addresses: [192.168.1.4]
version: 2