Apr 26 2009
Internet Connection Sharing on Vista 64 and OS X
This has been a problem for quite a while now, but only yesterday I have taken the time to fix it. Before yesterday, only OS X properly shared its Internet connection and on Vista it was a no go. Of course I knew about Internet Connection Sharing, but it didn’t work in my network setup at home.
I have Vista 64 on a separate hard disk on my Mac Pro and OS X Leopard on another. As I’ve posted before, I’m forced to surf via UMTS/3G, provided by a Huawei USB stick, and I need to share this connection with the rest our machines at home. The built-in wireless LAN of the Mac Pro emits only a rather weak signal which is not sufficient to cover the whole place, so I have ‘recycled’ my old D-Link 624 wireless LAN router that was once connected to a DSL modem on its WAN port. This additional wireless LAN router, which, naturally, hosts yet another network, is a bit too much for Vista’s rather limited Internet Connection Sharing capabilities and requires some special treatment.
What I am now doing is this: I have en0 (my Mac’s first Ethernet port) connected to the WAN port of the router and en1 is connected to one of the router’s regular LAN ports for client machines. I do not use the Mac’s wireless LAN card at all, but use the WLAN router instead.
I now share my UMTS connection through en0 in both Vista and OS X. While this was a trivial thing to setup in OS X, it was a whole lot more cumbersome in Vista and required some changes in the router setup as well. The good news is that the required router setup for Vista also works well with OS X.
What you need to know are some important information that Microsoft has not documented properly, if they have documented it at all: Microsoft’s ICS (Internet Connection Sharing) uses a dedicated class C network 192.168.0.0 with the Internet Connection Sharing host/gateway located on 192.168.0.1 – and this cannot be configured or changed. If this network is already in use by another network interface in your ICS machine — as, of course, it was the case in my original setup — you will get some ugly and undocumented error messages and Vista refuses to enable ICS. It took me a while to figure this out.
Again: Microsoft’s ICS ONLY works with the network 192.168.0.0/24. You are not allowed to manually assign this network to an interface on your Vista ICS host!
The next thing that Microsoft does not tell you is that Vista’s ICS does not support DNS forwarding, which was another problem in my setup. My client machines are not directly a part of the ICS network, but they are located on a second network which is routed to the ICS gateway through the D-Link router. This is something that Microsoft does not directly support.
To make this work, I had to configure the router’s WAN port to use an IP address of the 192.168.0.0/24 ICS network and I had to configure the DNS servers manually using the IP addresses of my provider’s DNS servers. (ipconfig /all or ifconfig are your friends here – the commands will tell you which DNS servers your UMTS interface uses.)
That basically did the trick. If Microsoft had documented this properly, it wouldn’t have taken me a couple of hours and tons of googling to find a working solution.
There’s still one thing left that doesn’t work, though: Incoming network traffic through en0 does not automatically fire up the UMTS connection, although this is enabled in the connection settings. I always have to connect manually to the Internet, but then everyone else coming from the WLAN router can surf the web.
In OS X, I only had to make sure that the Internet connection is shared through en0 and that this interface always uses the 192.168.0.0/24 network to be able to communicate with the D-Link router. I did so by changing the network card’s settings to “Use DHCP with a manual address” and assigning 192.168.0.1 to it. Now both operating systems share their UMTS Internet connection with the remaining machines connected to my WLAN router.