How To: Resolve Multicast DNS (mDNS) using Dig in Linux

Sometimes it can be nice to verify that the hostname on your box (printer, raspberry pi, whatever) is resolving to the correct IP-address on the LAN.

Whether it’s published via Avahi, Bonjour or something similar. An mDNS request resolves to.

  • IPv4 address 224.0.0.251 or IPv6 address ff02::fb
  • UDP port 5353

This can be achieved with dig, example:

~$ dig whatever.local @224.0.0.251 -p 5353

Example output

;; QUESTION SECTION:
;whatever.local. IN A

;; ANSWER SECTION:
whatever.local. 10 IN A 10.13.37.7

;; ADDITIONAL SECTION:
whatever.local. 10 IN AAAA fe80::;;
whatever.local. 10 IN AAAA fdaa:;;

Happy resolving!

Leave a Reply

Your email address will not be published. Required fields are marked *