Intro to Bonjour in Apple devices
Bonjour is Apple’s standards-based network technology designed to help devices and services discover each other on the same network. For example, iOS devices use Bonjour to discover AirPrint-compatible printers and iOS devices and Mac computers use Bonjour to discover AirPlay-compatible devices such as Apple TV. Some apps also use Bonjour for peer-to-peer collaboration and sharing.
Bonjour works by using multicast traffic to advertise the availability of services. Because multicast traffic is usually not routed across subnets, it requires Apple TV devices and AirPrint printers to be on the same IP subnet as the iOS devices and Mac computers that use them. For small networks, this approach is the norm.
Although Bonjour is most commonly used to discover services and devices on smaller networks, it can also be configured for use on larger networks by using a Bonjour gateway or similar technology. Networks using such features for AirPlay should be configured to advertise both _airplay._tcp and _raop._tcp services. And even though it’s possible to use advanced DNS configurations for advertising some Bonjour services on enterprise networks, AirPlay requires live device discovery using the methods described in Intro to AirPlay.
macOS and Bonjour for Windows clients can also use conventional unicast DNS to discover services being advertised in any accessible domain anywhere in the world. Using DNS to discover services outside your local network is known as Wide-Area Bonjour.