On a Ubuntu 16.04 computer on the local network I can ping any other computer on the network by using "ping hostname" or by using "ping hostname.local". However, on another computer I just installed Ubuntu 18.04 on, "ping hostname" yields "Name or service not known" yet "ping hostname.local" still works.
Both computers need to be configured with static IPs.
In this specific circumstance I need "ping hostname" to work. I do not know what is so special about the 16.04 machine that makes it able to resolve local hostnames without the .local.
Does anyone have any ideas?
Here is my netplan file on the device. It may shed some light on the situation.
# Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager ethernets: enp3s0: dhcp4: no addresses: [192.168.1.19/24] gateway4: 192.168.1.1 nameservers: addresses: [192.168.1.1, 184.108.40.206]
Below are results of
systemd-resolve --status on the 18.04 machine
Global DNSSEC NTA: 10.in-addr.arpa 16.172.in-addr.arpa 168.192.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa corp d.f.ip6.arpa home internal intranet lan local private test Link 3 (enp4s0) Current Scopes: none LLMNR setting: yes MulticastDNS setting: no DNSSEC setting: no DNSSEC supported: no Link 2 (enp3s0) Current Scopes: DNS LLMNR setting: yes MulticastDNS setting: no DNSSEC setting: no DNSSEC supported: no DNS Servers: 192.168.1.1 220.127.116.11 DNS Domain: ~.
I tried adding a local search domain but it did not help
Hostnames are not defined in the 16.04 /etc/hosts. It is resolving the hostnames through my router somehow. If I connect a brand new device to my network the 16.04 machine can access it immediately via its hostname and the 18.04 machine can access it through hostname.local