mDNSShark Download on the App Store

mDNSShark › Guides

How to list every Bonjour (mDNS) service on your network

Last updated October 9, 2026

Ask the network for the special name _services._dns-sd._udp.local.. Devices answer with the types of service they advertise. On a Mac that is one command: dns-sd -B _services._dns-sd._udp local.

What Bonjour and mDNS are

Multicast DNS (mDNS, RFC 6762) and DNS-based Service Discovery (DNS-SD, RFC 6763) let devices announce themselves on the local network without a central server. This is how a printer, an AirPlay receiver or a file share shows up on your devices without you typing an address. Apple's name for the combination is Bonjour.

Because these queries are link-local, they normally stay on one network segment. That matters when you are troubleshooting, and it is why a device on a different Wi-Fi network or VLAN often does not show up.

Only scan networks you own or have permission to examine.

On a Mac: list service types with dns-sd

Open Terminal and run:

dns-sd -B _services._dns-sd._udp local

You will see a table that fills in as devices answer. Here is a shortened example of the output format:

Timestamp     A/R    Flags  if Domain  Service Type   Instance Name
14:20:42.668  Add        3   5 .       _tcp.local.    _airplay
14:20:42.668  Add        3   5 .       _tcp.local.    _raop
14:20:42.668  Add        3   5 .       _tcp.local.    _companion-link

Notice that the service type is split across two columns. Combine the Instance Name column with the Service Type column to read it: _airplay plus _tcp.local. means _airplay._tcp. Press Control-C to stop.

Then browse each type

The meta-query tells you which types exist. To see the actual devices offering one, browse that type:

dns-sd -B _airplay._tcp local

And to resolve one instance to a host and port, use dns-sd -L "<Name>" <Type> local, taking the name from the browse output.

On Linux: avahi-browse

If the Avahi tools are installed, avahi-browse -a -t lists all services it can find and then exits (see the avahi-browse manual page for the options on your version).

A caveat: the list can be stale

Apple's technical note QA1337 explains that this meta-query behaves differently from a normal mDNS query: it is not told about REMOVE events when a service stops being advertised. So a service type can linger in your list after the device that offered it has gone. If something looks wrong, stop and run the query again. The note dates from 2004 and is no longer updated, but the behavior it describes follows from how the meta-query is defined.

On an iPhone

There is no terminal on an iPhone, so you need an app. mDNSShark uses Bonjour/mDNS (DNS-SD) and SSDP to find things like AirPlay receivers, printers, file shares, smart TVs and gateways, and each scan also sweeps your local /24 subnet over TCP port 80 to catch devices that stay quiet on Bonjour. It is open source under the MIT license and runs on your phone. It asks for local network access; the optional packet capture feature additionally asks you to allow a VPN configuration, and TLS Inspection is a paid subscription.

If nothing shows up