I have read over the past week the problems people have been having configuring their Apple TV and Home Sharing. I was experiencing the same issues as others....until tonight. I finally got it to work with an Ethernet connection. Previously, I was only able to get it to work via wifi and home sharing would drop after awhile.
1) Xfinity router settings. Like others I was suspicious if the Xfinity router was causing the issues because of the separation between wifi network and Ethernet network. It's not the router problem. I disabled the firewall. Enabled port forwarding. Gave a static IP address to the Apple TV. Added forwarding of ports
3689 UDP (all other support says this should be TCP but searched through and found a thread that suggested changing to UDP...this was the key)
DMZ is off
Device discovery is disabled
Port triggering is disabled.
The wifi is setup and functional using DHCP. Lease time is 1 week.
RESET ROUTER AFTER ENTERING CONFIGURATION.
2) Mac computer. As of this posting the latest version of iTunes installed. Latest Safari version. All programs updated. Turned on Home Sharing. Turned off firewall. Gave Mac a static IP address. Set Mac for hard drive to never sleep. Set monitor to sleep after 15 minutes. Set date and time to automatically find based upon time zone. ( Apple TV needs to be set to the same time zone as computer and set to manual). Enabled file sharing amongst users on Mac.
3) Apple TV. Ethernet connection. Configured TCP/IP to static IP address I configured on router for the Apple TV. Turned on AirPlay. Set date and time to manual and set as the same time zone as the computer with iTunes. Turned on Home Sharing. Using latest version of Apple TV.
Once the router was reset ( not restored and not just resetting the wifi. A complete router reset), the Apple TV found my iTunes library. It's been running now for over an hour and no drop in the home sharing. Working beautifully. I will be testing in the next couple days allowing the Apple TV to sleep, turning the firewall on the router to a minimal setting to see if it changes anything.
Just tested the AirPlay from my iPad 2 to the Apple TV while the Apple TV is connected via ethernet connection and it works. At this point it appears that the setup is correct and complete with no errors.
As a side note, the Ethernet connection between my router and Mac is via commercial devices using the power outlets as the wiring.
Hope this helps many of you that were/ are struggling to get this to work like I was.