NAS via Ethernet on a Primarily Wireless Network
The goal here is to get a NAS talking to the Apple TV on its ethernet interface while also being accessible to the rest of your network via the ATV's wireless interface.
My existing setup is on 802.11g wireless which is a bit slow for my NAS so I tried hooking the NAS up to the ethernet port via an ethernet crossover cable.
Unfortunatly, when Finder detects an ethernet connection, it seems to disable wireless!
- ssh installed
- System Preferences on the ATV.
Setting up Ethernet and Internet Sharing
Go to Network and configure Built-in Ethernet. Set it with a static IP Address on a different network segment than what your wireless connection is set to. Eg, if your Wireless interface has an IP Address of 192.168.1.2, make the Ethernet IP Address 192.168.2.2. Hit Apply Now to apply the changes.
Go to Sharing and select Internet. Tick Built-in Ethernet. In the drop down, I expected to see Airport but it wasn't there so I left it set to blank (null) - choose this blank option. Click Start.
Network settings for the NAS
Make sure your NAS is set up with an IP address on the same segment as the ATV's Ethernet interface (eg, 192.168.2.3) and set the NAS's default gateway to the IP address you assigned to the ATV's Ethernet interface. Once you've made these changes, plug the NAS into the ethernet interface of the ATV with a crossover cable.
Accessing the NAS from the Wireless Network
Almost done! At this point, your ATV should be able to ping the NAS via ethernet and other devices via wireless. You should also be able to mount the NAS to a directory on the ATV. However, you probably wont be able to ping the NAS from your wirelessly connected Mac which sucks because this means that you wont be able to upload anything to the NAS or administrate it.
To do this, add a static route on your Mac to tell it how to get to the NAS with a command like the following:
sudo route add -net NAS_IP_NETWORK/24 APPLE_TV_WIRELESS_IP_ADDRESS
replace NAS_IP_NETWORK with the new network you created on the ethernet side of the Apple TV and APPLE_TV_WIRELESS_IP_ADDRESS with the IP address of the ATV on the wireless side.
My NAS has an address of 192.168.2.3 and the ATV has a wireless address of 192.168.1.2, so I'd run the following command on my Mac and any other machine that needs access to the NAS (other than the ATV of course!):
sudo route add -net 192.168.2.0/24 192.168.1.2
That tells the Mac to route anything destined for 192.168.2.x to go via the wireless interface of the ATV (192.168.1.2).
You should now be able to connect to the NAS via your Mac for administration and mount the NAS on the ATV! :)
The only minor problem I've found with this is that when the ATV is restarted with the Ethernet cable plugged in, Finder disables wireless when it starts up! To re-enable, just unplug and plug the ethernet cable back in to the ATV after boot and both will start working again.