Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2021-11-18 09:10:05
Size: 1482
Comment:
Revision 6 as of 2021-11-18 09:17:42
Size: 1313
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Associated executables are tools including `avahi-browse` and `avahi-discover`. The primary functionality is a service, accessed in `systemd` as `avahi-daemon.service`. <<TableOfContents>>
Line 11: Line 11:
== Accessing Local Services ==

To make use of the "hostname.local" name resolution, an additional dependency (commonly named `nss-mdns`) is required.

Insert `mdns_minimal [NOTFOUND=return]` into `/etc/nsswitch.conf`, as below.

{{{
hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
}}}

More powerful configurations are of course possible, but this is the simplest and most minimal one.

You should be able to discover local services now. Try:

{{{
avahi-browse --all
}}}
== Installation ==
Line 33: Line 17:
== Hosting Services == == Advertising Services ==
Line 49: Line 33:
Also, Avahi broadcasts over port 5353. See details in [[UFWSetup|the article for UFW setup]].

=== Networking ===

Avahi broadcasts over port 5353. A common pitfall is failing to account for this in the firewall. See details in the articles for [[UFW|UFW]].

----



== Inspecting Services ==

=== Name Resolution ===

To make use of the `.local` domain, an additional dependency (commonly named `nss-mdns`) is required.

Insert `mdns_minimal [NOTFOUND=return]` into `/etc/nsswitch.conf`, as below.

{{{
hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
}}}



=== Terminal ===

{{{
avahi-browse --all
}}}

Avahi

Avahi is an implementation of Zeroconf, the zero-configuration method for network services. This would otherwise be accomplished through local DNS resolution.


Installation


Advertising Services

Avahi uses all /etc/avahi/services/*.service files that are readable by the avahi user and group. These take the form of structured XML. For example, an FTP service:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name>FTP</name>
  <service>
    <type>_ftp._tcp</type>
    <port>21</port>
  </service>
</service-group>

Networking

Avahi broadcasts over port 5353. A common pitfall is failing to account for this in the firewall. See details in the articles for UFW.


Inspecting Services

Name Resolution

To make use of the .local domain, an additional dependency (commonly named nss-mdns) is required.

Insert mdns_minimal [NOTFOUND=return] into /etc/nsswitch.conf, as below.

hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns

Terminal

avahi-browse --all


CategoryRicottone

Avahi (last edited 2023-04-03 12:50:42 by DominicRicottone)