#readwise # Multicast DNS - Wikipedia ![rw-book-cover](https://readwise-assets.s3.amazonaws.com/static/images/article2.74d541386bbf.png) ## Metadata - Author: [[wikipedia.org]] - Full Title: Multicast DNS - Wikipedia - URL: https://en.wikipedia.org/wiki/Multicast_DNS ## Highlights **In [computer networking](https://en.wikipedia.org/wiki/Computer_network), the multicast DNS (mDNS) protocol resolves [hostnames](https://en.wikipedia.org/wiki/Hostname) to IP addresses within small networks that do not include a local [name server](https://en.wikipedia.org/wiki/Name_server).** It is a [[Zero-Configuration Networking - Wikipedia|zero-configuration]] service, using essentially the same programming interfaces, packet formats, and operating semantics as unicast [Domain Name System](https://en.wikipedia.org/wiki/Domain_Name_System) (DNS). It was designed to work as either a stand-alone protocol or compatible with standard DNS servers. It uses IP multicast [User Datagram Protocol](https://en.wikipedia.org/wiki/User_Datagram_Protocol) (UDP) packets and is implemented by the Apple [Bonjour](https://en.wikipedia.org/wiki/Bonjour_(software)) and open-source [Avahi](https://en.wikipedia.org/wiki/Avahi_(software)) software packages, included in most Linux distributions. Although the [Windows 10](https://en.wikipedia.org/wiki/Windows_10) implementation was limited to discovering networked printers, subsequent releases resolved hostnames as well. mDNS can work in conjunction with [DNS Service Discovery](https://en.wikipedia.org/wiki/DNS_Service_Discovery) (DNS-SD), a companion [[Zero-Configuration Networking - Wikipedia|zero-configuration networking]]) technique specified separately in [RFC 6763](https://datatracker.ietf.org/doc/html/rfc6763). ([View Highlight](https://read.readwise.io/read/01hydhgbqhcx1ka3aev9g3s0rp)) --- **When an mDNS client needs to resolve a hostname, it sends an [IP multicast](https://en.wikipedia.org/wiki/IP_multicast) query message that asks the host having that name to identify itself. That target machine then multicasts a message that includes its IP address.** All machines in that subnet can then use that information to update their mDNS caches. Any host can relinquish its claim to a name by sending a response packet with a [time to live](https://en.wikipedia.org/wiki/Time_to_live) (TTL) equal to zero. By default, mDNS exclusively resolves hostnames ending with the `[.local](https://en.wikipedia.org/wiki/.local)` top-level domain. This can cause problems if `.local` includes hosts that do not implement mDNS but that can be found via a conventional unicast DNS server. Resolving such conflicts requires network-configuration changes that mDNS was designed to avoid. ([View Highlight](https://read.readwise.io/read/01hydhhzhavk9pakrxv3wx3794)) --- An mDNS message is a multicast UDP packet sent using the following addressing: - [[IPv4 - Wikipedia|IPv4 address]] *224.0.0.251* or [IPv6 address](https://en.wikipedia.org/wiki/IPv6_address) *ff02::fb* - [UDP port](https://en.wikipedia.org/wiki/UDP_port) 5353 - When using [Ethernet frames](https://en.wikipedia.org/wiki/Ethernet_frame), the [standard IP multicast MAC address](https://en.wikipedia.org/wiki/Multicast_address#Ethernet) *01:00:5E:00:00:FB* (for [[IPv4 - Wikipedia|IPv4]]) or *33:33:00:00:00:FB* (for [[IPv6 - Wikipedia|IPv6]]) The payload structure is based on the [unicast DNS packet format](https://en.wikipedia.org/wiki/Domain_Name_System#DNS_message_format), consisting of two parts—the header and the data. The header is identical to that found in unicast DNS, as are the sub-sections in the data part: queries, answers, authoritative-nameservers, and additional records. The number of records in each sub-section matches the value of the corresponding *COUNT* field in the header. ([View Highlight](https://read.readwise.io/read/01j5wgt33wmns6k87c5r4nn9tt)) ---