Wednesday, December 23, 2009

Redundant home internet with a Surf Sticks and Internet Connection Sharing

If you have a not-so-reliable ISP and an UMTS surf stick you can configure your home internet to be more redundant by setting up the surf stick as secondary gateway and DNS server for all your machines on a local network.
Takes a while to set up, but its worth it :-)
Assumption: you already have a primary internet gateway (e.g. DSL/Cable) on 192.168.0.1.
Internet host setup (sometimes connected directly through a surf stick):
  1. Setup your dial-up connection to use 'Internet Connection Sharing' (ICS) as described, for example here: http://support.microsoft.com/kb/306126
  2. Make sure that for Internet Connection Sharing 'Settings' you have enabled DNS to be provided by this new Internet host. Possibly DHCP, but not for now.
  3. Also make sure that the LAN network interface (on a laptop, that's usually 'Local Area Connection') now uses a static IP. Set it the way you would like your new internet gateway to appear on your home network. For example in my case, I already have a default gateway on192.168.0.1, so the new Internet-Host, should still use this primary gateway while it is not connected through the surf stick. The new internet host's ip is 192.168.0.100
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) 82567LM Gigabit Network Connection
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.1
So the Internet Host (my laptop with a surf stick) will use IP and DNS from 192.168.0.1 if it currently isn't connected directly.
Client Machine Setup:
The client machines on the network 192.168.0.x must be configured to use both, the primary gateway at 192.168.0.1 and, if not available, the secondary gateway at 192.168.0.100.
On each client machine, go to 'Local Area Connection' -> Properties -> TCP/IP ->Properties and specify an "Alternate DNS Server" of 192.168.0.100 and click 'Advanced' to add a new Default Gateway. Click 'Add' and set the 'TCP/IP Gateway Address' to 192.168.0.100.
Now each client uses 192.168.0.1, while your DSL/Cable internet is available, and 192.168.0.100 otherwise.
The whole configuration with DHCP is similar, you just need to prepolute the DHCP answers with about the same settings (Default gateways and DNS: 192.168.0.1 and 192.168.0.100) .