iTunes Home Sharing
A decent into the hell of Bonjour and black turtle-necks
This is just another short example in what I’m expecting will be a recurring theme here on Packet Queue: attention to detail. As a network engineer, as in so many professions, paying attention to the little things can mean the difference between 10 minutes of troubleshooting and 3 days of unmitigated, sleep-deprived hell. Luckily enough for me, the example I’m about to give wasn’t 3 days by any means, and since it was personal and not business the urgency wasn’t the same as if a WAN link had failed. That said, I wanted it fixed.
My wife just bought a new computer—her first Mac since the original—and during the initial moving of files and such, I discovered a nifty feature of iTunes: Home Sharing. Now, I have a large iTunes library at home already—something on the order of almost 180 Gigabytes—and wanted her to be able to share that library on her new Mac. After all, we’re not pirates; we just want to have access to our shared music library on any computer or device in the house relatively seamlessly. So I read a quick little blurb on the how-tos and why-fores of home sharing (real men sometimes read directions) and turned it on. Aside from the crickets, nothing happened. Sacrebleu!
Bonjour! ¡No Hablo!
No, not a greeting but a name given by Apple to their zeroconf implementation that allows devices (printers, storage, shares, etc.) to auto-magically find one another. This is the service that was supposed to make my iTunes library shareable between computers. This is the service that was supposed to make everything in my dull world shiny again. Not being overly steeped in the Apple world, however, has made me naturally suspicious of anything that “just works” as more often than not, said thing only “just works” if you “just use it in this one way”. That natural suspicion of mine was proven to be well-founded.
Upon reading up on Bonjour, I discovered that it uses mDNS (multicast DNS) to find services. Well, I thought, that would mean that multicast routing should work to fix my woes and I set off to work my magic. Of course, I had missed a critical detail that would have saved me some time: the multicast DNS implementation that forms a part of Bonjour uses the multicast group address of 126.96.36.199. If you haven’t noticed the problem yet, neither did I right away. Had I noticed said problem, I wouldn’t have completely reconfigured my ASA and 2811 for multicast routing, and I wouldn’t have started tracing packets with WireShark:
The Multicast range runs from 188.8.131.52 through 184.108.40.206 as every first-year networking student probably knows. But that range is like all other ranges and has certain reserved addresses within it. In our case, the most interesting range is 220.127.116.11/24 which is known as the Local Network Control Block, or sometimes just Link-local. Addresses in this range include the OSPF addresses of 18.104.22.168 and .6, and RIPv2 address of 22.214.171.124, among others. The salient detail being that these multicast addresses are typically sourced with a TTL of 1 and are not to be sent off of the broadcast domain in which they originate.
My wireless network, which my wife’s new Mac is on, is a different VLAN (and hence, different broadcast domain) from my wired network. In fact, between my three wireless networks and multiple lab networks, my home environment probably has something on the order of 25 different broadcast domains. Definitely not the norm for the average user, but also not uncommon if you start looking at more technical people or production environments. So, the bottom line is that Bonjour and iTunes won’t work in my environment without an mDNS proxy or some other trickery.
What bothers me most about this revelation is that a lot of Apple’s software and peripherals work on this same system. Airport (Apple’s wireless) as well as their printer setup, shares, etc. all work using Bonjour so are, from at least a simple viewpoint, broken across broadcast domains. I’m guessing from Google searches and such that it’s a minority of users of iTunes who are concerned about this, and so it may not even make sense for Apple to address the problem. But if you extrapolate that out to everything else using Bonjour, and consider a corporate network environment, I have to wonder how much of this contributes to Apple’s lack of penetration into enterprise networks.
As always, if I’ve gotten details wrong or you’d just like to offer your own opinion back and further the discussion, I can be reached here on this blog or via @someclown on Twitter.