Zero Configuration Networking / Avahi
This page shows how to setup avahi so that other computers can autodiscover services.
Applicable to Fedora Versions
Fedora 10+
Requirements Explanation of requirements.
Before you begin, please insure that you have current software: su -c "yum update" Requirement 2
Doing the Work
Basic description of what will be done and what is expected.
All users: (x86_64 users need to have both the 32-bit and 64-bit nss-mdns packages installed):
# yum install avahi avahi-autoipd avahi-compat-libdns_sd avahi-glib avahi-gobject avahi-tools nss-mdns nss-mdns.i?86
KDE Users:
# yum install kdelibs
Verify your nsswitch.conf file is ready for Avahi:
# grep '^hosts:' /etc/nsswitch.conf hosts: files mdns4_minimal [NOTFOUND=return] dns mdns
Verify you have Avahi running:
# chkconfig --list avahi-daemon avahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off
# service avahi-daemon status Avahi daemon is running
Enable "Multicast DNS (mDNS) 5353/udp" in your firewall configuration:
$ system-config-firewall
Troubleshooting How to test Explanation troubleshooting basics and expectations.
To view what is available on your network:
$ avahi-browse -at
To graphically view what is available on your network:
$ avahi-discover
Test to verify Avahi is working properly: (Use your own hostname instead of 'foo' below)
$ getent hosts foo.local 192.168.1.4 foo.local
Common problems and fixes
Example: Enable HTTP service advertisement (for personal user sharing):
# su -c "yum install gnome-user-share"; # cat /etc/httpd/conf.d/mod_dnssd.conf LoadModule dnssd_module modules/mod_dnssd.so
DNSSDEnable on #DNSSDAutoRegisterVHosts on #DNSSDAutoRegisterUserDir on
Example: Enable FTP service advertisement:
# cat - > /etc/avahi/services/ftp.service <<EOF <?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">FTP File Sharing on %h</name> ## Display Name <service> <type>_ftp._tcp</type> <port>21</port> </service> </service-group> EOF
Example: Enable NFS service advertisement: (Advertise an existing NFS share)
# cat - > /etc/avahi/services/nfs_home.service <<EOF <?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">NFS Shares on %h: /home</name> ## Display Name <service> <type>_nfs._tcp</type> <port>2049</port> <txt-record>path=/home</txt-record> ## path to NFS mountpoint </service> </service-group> EOF
Example: Enable SAMBA service advertisement:
# cat - > /etc/avahi/services/samba.service <<EOF <?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">Samba Shares on %h</name> ## Display Name <service> <type>_smb._tcp</type> <port>139</port> </service> </service-group> EOF
More Information
Applications that are ZeroConf aware can be found http://avahi.org/wiki/Avah4users Disclaimer
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net Added Reading
Ubuntu wiki page on Avahi configuration: https://help.ubuntu.com/community/HowToZeroconf
Gentoo wiki page on Avahi configuration: http://en.gentoo-wiki.com/wiki/Avahi
Arch wiki page on Avahi configuration: http://wiki.archlinux.org/index.php/Avahi