How to Scan for mDNS/DNS-SD services published on the local network using mdns-scan command ?

mdns-scan is a tool for scanning for mDNS (Multicast DNS) OR DNS-SD ( DNS Service Discovery) published services on the local network. It issues a mDNS PTR query to the special RR _services._dns-sd._udp.local for retrieving a list of all currently registered services on the local link.

Install mdns-scan for Ubuntu

$ sudo apt-get install mdns-scan

Once we have installed mdns-scan tool, we can now run the command to identify which all mDNS/DNS-SD services are published by other devices present on our local network / LAN.

$ sudo mdns-scan
+ somename._rsp._tcp.local
+ somename._afpovertcp._tcp.local

What is mDNS ? ( As per WikiPedia )

In computer networking, the multicast DNS (mDNS) protocol resolves hostnames to IP addresses within small networks that do not include a local name server. It is a zero-configuration service, using essentially the same programming interfaces, packet formats and operating semantics as the unicast Domain Name System (DNS). Although Stuart Cheshire designed mDNS as a stand-alone protocol, it can work in concert with standard DNS servers.[1]

Related :   How to execute a command in Linux using C program ?

The mDNS protocol is published as RFC 6762, uses IP multicast User Datagram Protocol (UDP) packets, and is implemented by the Apple Bonjour and open source Avahi software packages. Android contains an mDNS implementation.[2] mDNS has also been implemented in Windows 10, initially limited to discovering networked printers[3], later becoming capable of resolving hostnames as well.

mDNS can work in conjunction with DNS Service Discovery (DNS-SD), a companion zero-configuration technique specified separately in RFC 6763.[4]


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded