mDNS - Multicast Domain Name System ==================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is mDNS?** mDNS stands for Multicast Domain Name System. It’s a protocol that allows devices on the same local network to discover each other and resolve hostnames (like printer.local) to IP addresses without needing a central DNS server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is mDNS useful?** Without mDNS, devices would need to be manually configured with IP addresses or rely on a DNS server to resolve names. mDNS makes it easy for devices to automatically find and connect to each other on local networks—especially useful in home or small office environments. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works (in simple steps):** * Device wants to find another device – For example, your laptop wants to find a printer named printer.local. * Sends a multicast query – It sends a request to all devices on the local network asking, “Who is printer.local?” * Device responds – The printer replies with its IP address. * Connection is made – Your laptop now knows how to reach the printer and can start printing. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is mDNS used?** * Home networks – For discovering smart devices like printers, speakers, or smart TVs. * Small offices – Where devices need to find each other without a dedicated DNS server. * IoT environments – Where many small devices need to communicate easily. * Apple’s Bonjour – A well-known implementation of mDNS used in macOS and iOS for device discovery. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * It provides services directly to applications and users. * It uses standard DNS message formats over multicast UDP. * It enables name resolution and service discovery, which are high-level functions typical of Layer 7. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`mDNS Version&RFC Details ` * :ref:`mDNS Basic Setup on Ubuntu using IPv4 ` * :ref:`mDNS Basic Setup on Ubuntu using IPv6 ` * :ref:`mDNS Protocol Packet Details ` * :ref:`mDNS Usecases ` * :ref:`mDNS Basic Features ` * :ref:`mDNS Feature : Local Name Resolution ` * :ref:`mDNS Feature : Zero Configuration ` * :ref:`mDNS Feature : Multicast Communication ` * :ref:`mDNS Feature : .local Domain Usage ` * :ref:`mDNS Feature : Service Discovery (via DNS-SD) ` * :ref:`mDNS Feature : Cross-Platform Support ` * :ref:`mDNS Feature : No Central Server Needed ` * :ref:`mDNS Feature : Automatic Conflict Resolution ` * :ref:`mDNS Feature : Lightweight Protocol ` * :ref:`Reference links ` .. _mDNS_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _mDNS_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _mDNS_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _mDNS_step5: .. tab-set:: .. tab-item:: mDNS Version&RFC Details .. csv-table:: :file: ./mDNS/mDNS_Version_and_RFC_Details.csv :widths: 10,10,10,30 :header-rows: 1 .. _mDNS_step19: .. tab-set:: .. tab-item:: mDNS Basic Setup on Ubuntu using IPv4 **Setup** .. _mDNS_step20: .. tab-set:: .. tab-item:: mDNS Basic Setup on Ubuntu using IPv6 **Setup** .. _mDNS_step6: .. tab-set:: .. tab-item:: mDNS Protocol Packet Details **Query Packet** .. csv-table:: :file: ./mDNS/mDNS_packetdetails1.csv :widths: 10,20,30,10 :header-rows: 1 **Response Packet** .. csv-table:: :file: ./mDNS/mDNS_packetdetails2.csv :widths: 10,20,30,10 :header-rows: 1 **Service Announcement** .. csv-table:: :file: ./mDNS/mDNS_packetdetails3.csv :widths: 10,20,30,10 :header-rows: 1 **Goodbye Packet** .. csv-table:: :file: ./mDNS/mDNS_packetdetails4.csv :widths: 10,20,30,10 :header-rows: 1 **Probe Packet** .. csv-table:: :file: ./mDNS/mDNS_packetdetails5.csv :widths: 10,20,30,10 :header-rows: 1 .. _mDNS_step7: .. tab-set:: .. tab-item:: mDNS Usecases .. csv-table:: :file: ./mDNS/mDNS_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _mDNS_step8: .. tab-set:: .. tab-item:: mDNS Basic Features .. csv-table:: :file: ./mDNS/mDNS_Basic_Features.csv :widths: 10,10,30 :header-rows: 1 .. _mDNS_step9: .. tab-set:: .. tab-item:: mDNS Feature : Local Name Resolution **Local Name Resolution - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature1_Local_Name_Resolution_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step10: .. tab-set:: .. tab-item:: mDNS Feature : Zero Configuration **Zero Configuration - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature2_Zero_Configuration_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step11: .. tab-set:: .. tab-item:: mDNS Feature : Multicast Communication **Multicast Communication - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature3_Multicast_Communication_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step12: .. tab-set:: .. tab-item:: mDNS Feature : .local Domain Usage **.local Domain Usage - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature4_.local_Domain_Usage_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step13: .. tab-set:: .. tab-item:: mDNS Feature : Service Discovery (via DNS-SD) **Service Discovery (via DNS-SD) - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature5_Service_Discovery_via_DNS_SD_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step14: .. tab-set:: .. tab-item:: mDNS Feature : Cross-Platform Support **Cross-Platform Support - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature6_Cross_Platform_Support_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step15: .. tab-set:: .. tab-item:: mDNS Feature : No Central Server Needed **No Central Server Needed - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature7_No_Central_Server_Needed_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step16: .. tab-set:: .. tab-item:: mDNS Feature : Automatic Conflict Resolution **Automatic Conflict Resolution - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature8_Automatic_Conflict_Resolution_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step17: .. tab-set:: .. tab-item:: mDNS Feature : Lightweight Protocol **Lightweight Protocol - Testcases** .. csv-table:: :file: ./mDNS/mDNS_Feature9_Lightweight_Protocol_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _mDNS_step18: .. tab-set:: .. tab-item:: Reference links * Reference links