Zeroconf

Zero-configuration networking (Zeroconf) is a set of technologies that automatically creates a usable computer network based on the Internet Protocol Suite (TCP/IP) when computers or network peripherals are interconnected. It does not require manual operator intervention or special configuration servers - wikipedia

Zeroconf is built on three core technologies:

  • assignment of numeric network addresses for networked devices
  • automatic distribution and resolution of computer hostnames
  • automatic location of network services, such as printing devices.

Without zeroconf, a network administrator must set up services, such as Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS), or configure each computer's network settings manually.

Registered Service Types

Here is a list of reserved Zeroconf Service Types - dns-sd.org

DNS-based service discovery

DNS-SD is described in RFC 6763. This standard allows clients to discover a named list of services by type in a specified domain using standard DNS queries.

The service instance can be described using a DNS SRV (RFC 2782) and DNS TXT (RFC 1035) record. This specification is compatible with both Multicast DNS and with existing unicast DNS server and client software. A client discovers the list of available instances of a given service type using a query for a DNS PTR [RFC1035] record with a name of the form "<Service>.<Domain>", which returns a set of zero or more names, which are the names of the aforementioned DNS SRV/TXT record pairs.

Apple's multicast DNS/DNS-SD

Multicast DNS (mDNS) is a protocol that uses APIs similar to unicast Domain Name System but implemented over a multicast protocol.

Each computer on the LAN stores its own list of DNS resource records (e.g., A, MX, SRV) and joins the mDNS multicast group. When an mDNS client wants to know the IP address of a computer given its name, mDNS client sends a request to a well-known multicast address; the computer with the corresponding A record replies with its IP address. The mDNS multicast address is 224.0.0.251 for IPv4 and ff02::fb for IPv6 link-local addressing.

DNS-based service discovery (DNS-SD) is the other half of Apple's solution, built on top of the Domain Name System; see RFC 6763.

It is used in Apple products, many network printers and a number of third party products and applications on various operating systems. The Apple solution uses DNS messages, in contrast to Microsoft's competing technology, SSDP, which uses HTTP messages. It uses DNS SRV, TXT, and PTR records to advertise Service Instance Names. The hosts offering services publish details of available services: instance, service type, domain name and optional configuration parameters. Service types are given informally on a first-come basis. A service type registry exists, maintained and published by DNS-SD.org. Many Apple Mac OS X networking clients, such as the Safari browser and the iChat instant messaging software, use DNS-SD to locate nearby servers. On MS Windows, some instant messaging and VoIP clients support DNS-SD. Some Unix, BSD, and Linux distributions also include DNS-SD functionality.

Implementations

Bonjour is Apple's name for Zero-configuration networking.

Avahi is a Zeroconf implementation for Linux and BSDs. It implements IPv4LL, mDNS and DNS-SD. It is part of most Linux distributions, and is installed by default on some. If run in conjunction with nss-mdns it also offers host name resolution.

Avahi also implements binary compatibility libraries that emulate Bonjour and the historical mDNS implementation Howl, so software made to use those implementations can also utilize Avahi through the emulation interfaces.

Avahi Example Script

This python script will register an alternate CNAME alias besides your hostname, which could be useful for ex. when serving several http virtual hosts to your ffriends on the local network and you don't want to make them configure their /etc/hosts. - github