How to configure Avahi & nss-mdns to resolve names in my small home network in the same manner as Windows does with NetBIOS or more recently LLMNR.
For Linux, there are two options:
- Winbind aka NetBIOS for linux, marked as DEPRECATED by many specialists
- Avahi & nss-mdns - aka Zeroconf, MODERN, sounds good, I crave for similarities with LLMNR.
I gave try to Avahi.
It is already preconfigured in /etc/nsswitch.conf Instalation OK. Daemon runs, discovery runs, lookup - sort of.
But there is a problem.
does not work - unknown host
I personally would not mind using "suffixed" names, but some systems do.
Notably Samba. Mounting cifs network shares is not possible.
Smb4k sees other computers nicely, but when attempted to mount a share (smb/cifs) it fails:
could not resolve address for foopc1
It seems that for samba client (mount.cifs) there must be match between network name accepted by hostname resolver (?) and name obtained by nmblookup (??) Please correct me if I'm wrong!
How to make a ping recognize my computers as foopc1 and foopc2 and NOT as foopc1.local and foopc2.local?
According to nss-mdns project homepage
http://0pointer.de/lennart/projects/nss-mdns/ I created
/etc/mdns.allow and put there just asterix:
..but to no avail.
I also tried to make network name aliases, to map:
foopc1.local -> foopc1
but /etc/hosts does not support this and there is no simple way to get around.
- editing /etc/hosts - keeping static mapping list is impractical in today's dynamic networks
- local DNS - all computers are powered down frequently, no server like HW here
- fiddling with wifi router setup, assigning fixed IP to MAC addresses etc. - let's imagine I don't have access to it
- note: our wifi router does not have DNS server (common practice)
- PLUS: a challenge to prove that Linux can do same things as Windows with the same user friendly way