I know that iOS's Bonjour implementation (NSNetService, NSNetServiceBrowser) work out of the box on local networks.
The documentation says it is possible to set up a Bonjour DNS server to allow connecting users over the internet, so my questions are:
Thanks!
Overview. Bonjour provides a general method to discover services on a local area network. The software is widely used throughout macOS, and allows users to set up a network without any configuration. As of 2010 it is used to find printers and file-sharing servers.
For example, iPhone and iPad devices use Bonjour to discover AirPrint-compatible printers and other 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.
No, it's not mandatory to have Bonjour on every Windows device. But it's beneficial if you're using Apple products like AppleTV and iPhones while running Windows or Linux on your PC. It helps connect all your devices easily, irrespective of their operating systems.
Bonjour local service discoveryis based on "multicast DNS". whenever some client wants to find out anything about the network or services on the network it uses the multicast address 224.0.0.251
, meaning only clients within that multicast group can use bonjour together.
the 244.0.0/24 IP-Address space is defined as "Local Network Control Block" by RFC5771 and will not be forwarded out of your local network.
BUT really, Bonjour is just a DNS-based method - you can tell NSServiceBrowser to search in a non-local domain, which just requires the DNS server to respond to specific requests (as described in Manually Adding DNS-SD Service Discovery Records to an Existing Name Server)
This allows service discovery over the internet and even service registration if you get DNS Update working (Setting up a Bonjour Name Server), but nothing more - you have to care about hole-punching yourself.
So get yourself a BIND-server and start trying ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With