iMac Max OS 10.8.2 with iTunes 10.7 (21) with an Apple TV, 2nd Gen and could not get iTunes to play through the Apple TV over Airplay. Apple TV could see my Home Sharing iMac just fine and play music, movies, photos, etc.
First off, to get iTunes on the iMac to even see the Apple TV, I had to assign static IP addresses to each device through my Router's admin settings. After giving my iMac and Apple TV static addresses, iTunes could now see the Apple TV but would hang up on 'trying to connect'.
After some digging and discovering this discussion, I found out that IPv6 was the culprit. With Mac OS 10.8.2 in System Preferences > Network settings, there is no longer an option to TURN OFF the IPv6 settings completely. The only options available are Automatic, Manual and Link-local only.
Here is the process I had to complete to 're-add' the OFF setting in the pull-down menu:
First, open a Terminal (Applications > Utilities > Terminal.app) and run the following command:
This will display all network services configured / accessible on your Mac.
Select from the above list the interface / network on which you want to disable IPv6 and the issue the following command (still in Terminal): NOTE: Change 'Ethernet' to WiFi if that's the IPv6 settings you're trying to reconfigure.)
networksetup -setv6off Ethernet
Now, if you open System Preferences > Network you can see that IPv6 is turned off for the Ethernet interface. You can do the same for Wifi and even VPN.
Should you need to switch on IPv6 on the same interface, then issue the opposite command:
networksetup -setv6on Ethernet
Re: Itunes 10 won't connect to Apple TV with Airplay
OK, here is what you do on Lion, since the option to turn off IPv6 is unavailable in the normal interface.
- Start Terminal (this is a program found in the Utilities folder in your Applications folder, you can also get there by clicking on the desktop, select "Utilities" in the "Go" menu, then double click on "Terminal".)
Type exactly these commands into terminal:
networksetup -setv6off ethernet
(then hit enter)
networksetup -setv6off wi-fi
(then hit enter)
Then close Terminal, and restart your mac.
There should now be an option for "off" for IPv6. You can check this by opening the "system preferences" in the apple menu, then click the "network" icon, then select "wi-fi" on the left, then click on the "advanced" button, then select the "TCP/IP" tab. Then "configure IPv6" should be set to "off".
Try playing itunes through your airport express (or I assume apple TV) and see if it works.
Wow! After almost a year of battling this issue, digging through countless boards I finally stumble across this!!
I've tried almost every combo: Connect the turn HomeShare on/off (iTunes 11.0.2), AppleTv (second gen) wireless and wired, connect my MacBook Pro (10.7.5 Lion) wireless and wired, turn off all bluetooth devices/microwaves/defribulators/etc, stare at the IPV6 settings and try all three like I know what I'm even doing, all to no avail.
I'm not comfortable digging around in terminal but lo-and-behold this did the trick!
Seriously, just rebooted and it's working like a champ!!