Can't get avahi to work

I'm trying to set up avahi so that I can access my machine under <hostname>.local. But it doesn't seem to be doing what I want it to do.
I started up avahi-daemon with
$ sudo systemctl start avahi-daemon.service
And it seems to be working, looking at its status:
sudo systemctl status avahi-daemon.service
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled)
Active: active (running) since Tue 2014-10-07 12:09:57 CDT; 7min ago
Main PID: 12443 (avahi-daemon)
Status: "avahi-daemon 0.6.31 starting up."
CGroup: /system.slice/avahi-daemon.service
├─12443 avahi-daemon: running [mymachine.local]
└─12444 avahi-daemon: chroot helper
Oct 07 12:09:57 mymachine avahi-daemon[12443]: Joining mDNS multicast group on interface enp3s0.IPv4 with ad...223.
Oct 07 12:09:57 mymachine avahi-daemon[12443]: New relevant interface enp3s0.IPv4 for mDNS.
Oct 07 12:09:57 mymachine avahi-daemon[12443]: Network interface enumeration completed.
Oct 07 12:09:57 mymachine avahi-daemon[12443]: Registering new address record for fe80::ff49:1575:7f8:e996 o...0.*.
Oct 07 12:09:57 mymachine avahi-daemon[12443]: Registering new address record for fe80::d227:88ff:fe84:7809 ...0.*.
Oct 07 12:09:57 mymachine avahi-daemon[12443]: Registering new address record for 10.0.13.223 on enp3s0.IPv4.
Oct 07 12:09:57 mymachine avahi-daemon[12443]: Registering HINFO record with values 'X86_64'/'LINUX'.
Oct 07 12:09:57 mymachine avahi-daemon[12443]: Server startup complete. Host name is mymachine.local. Loca...468.
Oct 07 12:09:58 mymachine avahi-daemon[12443]: Service "mymachine" (/services/ssh.service) successfully es...hed.
Oct 07 12:09:58 mymachine avahi-daemon[12443]: Service "mymachine" (/services/sftp-ssh.service) successful...hed.
Hint: Some lines were ellipsized, use -l to show in full.
However, I can't ping mymachine.local:
$ ping mymachine.local
ping: unknown host mymachine.local
And I can't access it through http or ssh either. Hmmm... ok, looking at the arch wiki article, it says that you should run
$ avahi-autoipd -D
But if I run this command as-is, I get an error:
$ avahi-autoipd -D
Missing interface name.
Which, after some head-scratching, seemed to be fixed when I appended the interface of my ethernet card:
$ avahi-autoipd -D enp3s0
$
OK, but it still doesn't work What do I need to do to make avahi publish my .local address?

Hi,
Check out this link: https://wiki.archlinux.org/index.php/av … resolution
you need to install the nss-mdns package (and lib32-nss-mdns in case of 32bit applications), and then modify your /etc/nsswitch.conf
Change this line:
hosts: files dns myhostname
to
hosts: files mdns_minimal [NOTFOUND=return] dns myhostname
Then simply restart the avahi-daemon and avahi-dnsconfd.service and it should work fine.

Similar Messages

Maybe you are looking for