I've searched for clues to this problem for days, hope someone here can shed some light. I know I can use IP addresses only for this simple case and I know about other solutions like DNSmasq, but I'm interested in finding an answer to this puzzling problem.
Setup:
- Desktop with fresh install Ubuntu Gnome 15.10
- Server with fresh install Ubuntu Server 15.10
- avahi-daemon running on both
- one change to /etc/avahi/avahi-daemon.conf on both: use-ipv6=no
- ufw inactive on both
From the desktop:
user@desktop:~$ avahi-browse -art
+ wlp1s0 IPv4 server [94:db:c9:b5:39:26] Workstation local
+ wlp1s0 IPv4 desktop [4c:34:88:c1:b0:4c] Workstation local
= wlp1s0 IPv4 desktop [4c:34:88:c1:b0:4c] Workstation local
hostname = [desktop.local]
address = [192.168.1.104]
port = [9]
txt = []
= wlp1s0 IPv4 server [94:db:c9:b5:39:26] Workstation local
hostname = [server.local]
address = [192.168.1.120]
port = [9]
txt = []
From the server:
user@server:~$ avahi-browse -art
+ wlp3s0 IPv4 desktop [4c:34:88:c1:b0:4c] Workstation local
+ wlp3s0 IPv4 server [94:db:c9:b5:39:26] Workstation local
= wlp3s0 IPv4 server [94:db:c9:b5:39:26] Workstation local
hostname = [server.local]
address = [192.168.1.120]
port = [9]
txt = []
= wlp3s0 IPv4 desktop [4c:34:88:c1:b0:4c] Workstation local
hostname = [desktop.local]
address = [192.168.1.104]
port = [9]
txt = []
Avahi-browse finds the correct IP addresses for both machines, but here's the problem:
From the desktop: (ping, ssh, etc. all work as expected)
user@desktop:~$ ping server.local
PING server.local (192.168.1.120) 56(84) bytes of data.
64 bytes from 192.168.1.120: icmp_seq=1 ttl=64 time=3.45 ms
...
From the server: (unknown host??? WTF)
user@server:~$ ping desktop.local
ping: unknown host desktop.local
Anyone have any ideas?
/etc/nsswitch.conf
files on the two machines (in particular the order of entries in thehosts
line?hosts
line is:hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname