Imagine you have several smart devices at home. How does mDNS help these devices discover each other without a central server?
Think about how devices can find each other without asking a central place.
mDNS works by devices announcing their names and services on the local network. This way, other devices can listen and find them without needing a central server.
Run the command avahi-browse -a on a Linux device. What kind of output should you expect?
avahi-browse -a
This command shows all services announced via mDNS on your local network.
The avahi-browse -a command lists all devices and services announced via mDNS on the local network, helping you see what devices are discoverable.
You want your device to announce a custom service called _mydevice._tcp on the local network using mDNS. Which configuration snippet correctly sets this up using Avahi on Linux?
Check the correct format for service type and port number.
The service type must start with an underscore and end with ._tcp without the .local. suffix. The port must be a number.
Your devices are not discovering each other using mDNS. Which of these is the most likely cause?
mDNS relies on a special kind of network message that might be blocked.
mDNS uses multicast messages to announce and discover devices. If the network blocks multicast, devices cannot find each other.
Put these steps in the correct order to enable mDNS discovery on a new IoT device.
Think about what must be ready before announcing services.
First, install the mDNS library, then connect the device to the network, configure the service announcement, and finally test discovery.
