Fix Airplay streaming from iTunes


Issue: I had previously set up iTunes to stream music from my desktop computer via AirPlay to a set of speakers connected to a remote Airport Express. Now, iTunes will no longer connect to my remote speakers – when I click on the checkbox in the Multiple Speakers window (or just select the remote speakers only), it just blinks briefly and goes back to unchecked. For reasons that will become obvious later, let me be specific that this is on a Mac that had been recently upgraded from OS X 10.6 Snow Leopard to OS X 10.7.3 Lion, and following the update of iTunes to 10.6.1 (end of March 2012).


Solution: After fruitlessly trying various combinations of restarting iTunes, restarting assorted Airport stations in my network, turning Airplay off and on, configuring it to use or not use a password, etc, I finally zeroed in on the streaming process itself, and started looking at the network configuration between iTunes (on my main computer) and the remote Airport station that hosts the speakers. Here's the solution, which essentially boils down to turning off the network IPv6 configuration:
  1. Quit iTunes if it is currently running.
  2. Issue the following commands in a terminal window:

    networksetup -setv6off Ethernet

    networksetup -setv6off Wi-Fi

  3. Start AirPort Utility.
  4. Restart the Airport station that is the AirPlay target (i.e., the Airport station that has your speakers plugged into it).
  5. Quit Airport Utility.
  6. Start iTunes. AirPlay should now be able to connect to the remote Airport station.
You can undo this procedure as follows:
  1. Open System Preferences→Network and select the Ethernet service in the sidebar.
  2. Click on the Advanced button, then select the TCP/IP tab.
  3. The Configure IPv6 field should be set to Off. Use the pull-down menu to select a different option for Configure IPv6 (e.g., "Automatically").
  4. Click OK, then Apply.
  5. Repeat this process for the Wi-Fi service.
  6. Open Airport Utility and restart the Airport station that is running AirPlay.
Peculiarities:
  • What are the consequences of turning off the IPv6 Configuration? Beats me. Probably nothing at the present time, at least until IPv6 configuration becomes an essential part of network configuration (and hopefully this issue is fixed properly by then).
  • Not clear to me why I have to turn off IPv6 for both Wi-Fi and Ethernet, since only Wi-Fi is used in the AirPlay streaming process. (Yes, I tried it with only one or the other turned off – no dice.)
  • If you undo this configuration (as described above) the Off option disappears from the Configure IPv6 pull-down menu.
  • I haven't personally tested this process under versions of OS X other than 10.7 Lion. The default Configure IPv6 pull-down menu under OS X 10.7 Lion contains 3 options (Automatically, Manually, Link-local only), none of which is Off (same for OS X 10.8 Mountain Lion). In contrast, under OS X 10.6 Snow Leopard, the Configure IPv6 pull-down menu contains three options (Automatically, Manually, Off), one of which is Off. So, this process presumably works under OS X 10.8 Mountain Lion the same as for OS X 10.7 Lion, and is likely easier under OS X 10.6 Snow Leopard – just select the pre-existing Off option.
This solution is also described here.

OS X banner
Update Status: 13 Nov 2012 (updated); 9 Apr 2012 (added)