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]

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]

Follow Lynxbee

Leave a Reply / Ask Question