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!

Setup OpenDNS In Mac OS X

There are several reasons you might want to use OpenDNS, the biggest two I use it is for speed and security, here I will show you how you can set it up on your Mac:

  1. Open system┬ápreferences and click “Network”
  2. Select your network interface and then click on “Advanced”. If you don’t know what network interface you are using, then it’s the one with a green circle next to it, in my case “AirPort”
  3. Once in advanced click the “DNS” tab
  4. Finally, add the following IP,s: 208.67.222.222, 208.67.220.220