On 10/13/19 2:48 AM, Samuel Sieb wrote:
Just a couple of comments
Summary:
In a default setup, host name resolution is, in order of priority:
/etc/hosts/, mdns, and dns.
The order is controlled by the contents of /etc/nsswitch.conf. The defaults are as
discribed.
You probably don't want to maintain a hosts file for all the
computers on your network, especially if you are using DHCP.
DNS is generally way overkill and more work to manage.
The easiest method is to use mdns, otherwise known as Bonjour on Macs and probably some
other names. Use "hostnamectl set-hostname myname" to set a unique name on each
computer. Make sure "avahi-daemon" is running (should be). Make sure you have
"nss-mdns" installed (should be by default). Then you should be able to do
"ping myname" (using whatever name you set earlier).
I'm not well versed in the use of mdns since some devices on my networks don't
utilized it. So, I tend to
setup a DNS server in the routers I use. This leads me to wonder if it is possible to
actually "ping myname".
I thought one needed "ping myname.local".
[egreshko@meimei ~]$ ping f31bk
ping: f31bk: Name or service not known
[egreshko@meimei ~]$ ping f31bk.local
PING f31bk.local (192.168.1.55) 56(84) bytes of data.
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=1 ttl=64 time=0.316 ms
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=2 ttl=64 time=0.265 ms
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=3 ttl=64 time=0.234 ms
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=4 ttl=64 time=0.239 ms
--
If simple questions can be answered with a simple google query then why are there so many
of them?