avahi-resolve
Resolve Avahi (mDNS) hostnames and addresses
TLDR
Resolve a local service to its IPv4
Resolve an IP to a hostname, verbosely
SYNOPSIS
avahi-resolve [options] <hostname or service name>
PARAMETERS
-4, --ipv4
Forces the resolution to only look up IPv4 addresses.
-6, --ipv6
Forces the resolution to only look up IPv6 addresses.
-n, --no-reverse
Prevents the command from performing reverse lookups (PTR queries).
-v, --verbose
Enables verbose output, providing more detailed information about the resolution process.
-h, --help
Displays a brief help message and exits.
-V, --version
Shows the version information of the avahi-resolve utility and exits.
DESCRIPTION
avahi-resolve is a command-line utility part of the Avahi project, which provides a free software implementation of Zeroconf, also known as Bonjour or Rendezvous. Its primary function is to resolve .local hostnames and DNS-SD service names into their corresponding IP addresses or service details on a local network segment.
It leverages Multicast DNS (mDNS) and DNS Service Discovery (DNS-SD) to query the local network for devices and services advertised without the need for a central DNS server. This tool is invaluable for troubleshooting Avahi installations, verifying service advertisements, or integrating mDNS/DNS-SD resolution into scripts. It relies on the avahi-daemon running in the background to perform the actual network queries.
CAVEATS
For avahi-resolve to function correctly, the Avahi daemon (avahi-daemon) must be running on the system. It only operates on the local link using mDNS/DNS-SD protocols, meaning it cannot resolve public internet hostnames. Network firewalls must allow UDP traffic on port 5353 for mDNS communication.
EXIT STATUS
The command typically returns 0 on successful resolution and non-zero (e.g., 1) if an error occurs or the specified host/service cannot be resolved.
HISTORY
The Avahi project was initiated as a free and open-source implementation of Apple's Bonjour (Zeroconf) network discovery technology. It was primarily developed by Lennart Poettering and Trent Lloyd, with its first stable release around 2005. avahi-resolve is one of the foundational command-line utilities provided by the Avahi suite, offering basic resolution capabilities to test and interact with the mDNS/DNS-SD system.
SEE ALSO
avahi-browse(1), avahi-daemon(8), avahi-discover(1), dns-sd(1)