Linux Avahi Daemon Tutorial With Examples

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-avahi-daemon-tutorial-examples/
PINTEREST
PINTEREST
INSTAGRAM

Avahi is and mDNS/DNS daemon, service which implements Apples’s Zeroconf mechanism. Zeroconf is als known Rendezvous or Bonjour. Zeroconf have there main task to process.

  1. Automatic assignment of numeric network addresses
  2. Automatic distribution and resolution of host names,
  3. Automatic location of network services such as printing devices.

Installing Avahi

Avahi-daemon can be install with yum and apt like below.

Installing Avahi

Installing Avahi

Starting Avahi

After installing avahi as we know avahi works as daemon generally. We will start the avahi daemon. Using init scripts following command can be issued. Keep in mind that avahi requires root privileges as we can see from following screenshot it asks for root password.

OR

Another way to start avahi daemon is using systemctl command like below. with the avahi service name avahi-daemon . The avahi service current status can be seen too

Stopping Avahi

Stopping avahi in init system can be done with the following command. Stopping avahi service requires root privileges too.

Stopping Avahi

Stopping Avahi

OR

Enable Avahi Daemon

Avahi daemon can be enabled to start automatically in the system start with the systemctl command like below.

$ sudo systemctl enable avahi-daemon

Enable Avahi Daemon

Enable Avahi Daemon

Disable Avahi Daemon

Avahi daemon can be disabled to start automatically in the system start with the following command.

LEARN MORE  What is Network Address Translation (NAT)

Disable Avahi Daemon

Disable Avahi Daemon

Configuration Files

Avahi configuration files resides in /etc/avahi . Avahi daemon configuration file is named avahi-daemon.conf . There are different type of configuration abilities with this file.
Avahi served host names and ip addresses are stored in hosts file. Services are stored in services directory as xml file.

Configuration Files

Configuration Files

Add Host

Adding host to the DNS service of avahi is like adding host Linux hosts file. Add following line into the host file like in the screenshot and than restart avahi daemon.

Add Service

Adding services is harder than adding hosts. There is an xml configuration file used to describe services and this file will be put into /etc/avahi/services/ directory. Following service configuration file defines ftp file which is  served from tcp 21 port.

Add Service

Add Service

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-avahi-daemon-tutorial-examples/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)