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, iPhone and iPad devices use Bonjour to discover AirPrint-compatible printers and iPhone and iPad 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 iPhone and iPad 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 AirPlay discovery.
macOS and Bonjour for Windows clients can also use the conventional unicast Domain Name System (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.