I have a small local Ethernet network which I am using as a prototype for an industrial automation network. The network currently has 2 machines, both running Debian 10. There is no DNS server configured on the local network. Instead, the host name and IP address of each machine is included in the hosts
file the other machine.
I can ping each machine from the other (e.g. ping machine01
works from machine02, and vice versa).
I now have the need to resolve the machine names in the format machine01.local.
I understand that the .local.
suffix conforms to some general mDNS standard, but I am struggling to figure out how to resolve host names in this format - when I try ping machine01.local.
from machine02, I get the response "Name or service not known".
I have installed avahi-daemon
, avahi-discover
and libnss-mdns
on both machines. avahi-daemon
is running, but I have not changed the default configuration of this daemon.
The contents of the file /etc/nsswitch.conf
is as follows:
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
I am obviously missing some basic configuration setting that would allow host names with the .local.
suffix to be resolved.
What am I missing?