This protocol was published as RFC 6762, it utilizes IP multicast UDP (User Datagram
Protocol). Apple’s Bonjour and open source Avahi are known for implementing mDNS. The
Android operating system is also known for implementing mDNS. Plus, Microsoft’s latest oper-
ating system, Windows 10 has also implemented mDNS. However, Windows 10 has very lim-
ited use of mDNS for discovering network connected printers.
When an mDNS client requires to solve a hostname, it emits an IP multicast query that
questions the host on having the exact name to identify itself. Then the target machine multi-
casts a note that contains its IP address. All devices existing in that subnet can utilize that data
to update their mDNS caches.
Any host can eectively resign its claim to a domain name by just sending a response
packet consisting of TTL (time to live) equal to zero.
DNS-SD
DNS Service Discovery is a method of utilizing standard DNS servers, programming interfaces
and packet formats to explore the network for services. The DNS-SD library facilitates an easy
and unified programming system for compiling Zeroconf features (hostname resolution and
service discovery) to a C++ application. The DNS-SD library does not focus on its own mDNS
and DNS-SD protocol stacks. Instead, it uses an already existing Zero implementation for this
purpose. You can use Apple’s Bonjour or Avahi as a backend for the DNS-SD library.
The biggest benefit of the library is that it facilitates a unified programming interface. It
becomes completely transparent for the programmer whether he is using Bonjour or Avahi as
a backend.
In simple words, DNS-SD lets you search (and advertise) dierent services on your net-
work. For example printers, chromecasts, and airplay speakers.
Some Notable Features of DNSs-SD:
It is compliant with standards like RFC 6762 and RFC6763,
It won’t create interference between existing Bonjour/Avahi installs,
It can handle hibernate/sleep/wakes without even flooding your network, and
It is dependency-less.
Data Protocols
MQTT
The acronym ‘MQTT’ is used for “Message Queuing Telemetry Transport”. It works as a light-
weight messaging protocol that facilitates resource-constrained network clients with an easy
way to send telemetry data. Plus, it also uses a publish/subscribe communication pattern. It is
designed to be used with machine-to-machine (M2M) communication. Thus, it plays a crucial
role in the IoT (Internet of things).
MQTT makes it possible for the resource-constrained IoT devices to emit or publish data
about a specific topic to a server that operates as an MQTT message broker. The broker then sends
the data about those clients that had subscribed to the client’s topic earlier. This topic is just like
a hierarchical path. The clients are able to subscribe to a level of a topic’s hierarchy or may utilize
a wild-card charter in the subscription process to subscribe to multiple levels. This protocol is
an ideal choice for wireless networks with dierent levels of latency due to bandwidth limits or
problematic connections. This protocol was designed and developed by Andy Stanford Clark and
Chapter 5 IoT Core Modules 115
Internet_of_Things_CH05_pp105-140.indd 115 9/3/2019 10:13:55 AM

Get Internet of Things now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.