The Thinking Lemur

10 Sep, 2008

How to use 2 internet connections on 1 network/lan

Posted by: Donnie Bachan In: Apple| Networking| Uncategorized| Windows

At my day job I have assume the role of general IT lacky, which means that any thing that is IT related gets pushed in my direction. One of the things I realise really quickly after moving to the UK was that the internet access here sucks in comparison to what I got in the US. As a result of poor infrastructure and insane usage policies my company was quickly hit with bandwidth throttling by a major supplier of broadband in London, although we are an internet company, pay for the unlimited plan and only use it during working hours. So we decided to put in a second internet line and we would split it with one going to the development team and the other going to the rest of the users. Great! Excellent! Only problem is that we have shared resources on the internal network (printers, servers etc). We needed options, say hello to my little friend named Google!

A quick browse on Google present several possiblities:

  1. Dual Wan Router - this device takes two internet connections from two service providers and load balances them for use on a single network. This is a very elegant solution when fail over is required. It does not however split the connection within the network, it rotates the connections among the users depending on load on a single connection similar to what a web load balancer does. These devices are great but not what we wanted
  2. Multihoming multiple cards - This is where you have mulitple network cards installed in your machine and plug each device into an individual interface. This would allow us to have a connection to both the local network and to the internet on a single line. Not what we wanted because we didn’t want to install additional cards into a large number of machines and our current infrastructure just would not support it.
  3. Multihoming single card - This is where you assign multiple IP addresses to a single card and use the magic of TCP/IP to route the requests, this was not found on the net but suggested by the networking guru Trinidex!
So our solution was to multihome the cards on the devices that required the use of both the network and a special internet connection. Here are the steps and the list of hardware that was required to complete the project.
Devices Required:
1 ADSL Router from ISP A
1 ADSL Router from ISP B
1 switch (as many ports as required)
Internet devices equipped with configurable TCP/IP settings
Assumptions:
  1. Internet connections are set up on both routers A and B
  2. Router A will use the same subnet as that of the internal network
Solution Part A - Router Config:
  1. Plug Router A into switch (it is assumed that Router A has a live broadband connection)
  2. Configure Router A from a device (PC/Mac) attached to switch
  3. Disable DHCP on Router A
  4. Set the WAN IP of Router A to specified number, they typically are set to 192.168.1.1 or 192.168.0.1 or 10.0.0.1 etc, make a note of whatever you set it to.
  5. Set the WAN Subnet of Router A to a specified number and make a note of it. They typically are set to 255.255.255.0
  6. Save the settings
  7. Unplug Router A from the switch and plug Router B into the switch, this is because both routers may have the same WAN IP address which may conflict
  8. Configure Router B from a device
  9. Disable DHCP on Router B
  10. Set the WAN IP of Router B to something different to that of Router A, so if you choose 192.168.1.1 for Router A, then use 192.168.0.1 for Router B
  11. Set the subnet of Router B 
  12. Save settings
  13. Plug Router A into the switch
Solution Part A - Client Devices Config:
Note: This solution walks through multihoming on a PC equipped with Windows XP Professional. Mac configuration is similar and done through System Preferences > Network > Ethernet
  1. Open Network Connections (Start > Control Panel > Network Connections)
  2. Right Click on the Local Area Connection (or currently active ethernet connection) and click Properties
  3. On the General tab click Internet Protocol (TCP/IP) and click Properties
  4. Select “Use the following IP address” and enter an IP address that is unallocated on the network in the IP address box, so if you use 192.168.1.1 for Router A you can choose 192.168.1.2.
  5. Enter the Subnet mask that is used in Router A
  6. Set the Default gateway IP to that of the Router A if you would like the computer to use the connection provided by Router A or set it to the IP of Router B if you would like the computer to use the connection provided by Router B.
  7. Set up the DNS servers provided by either of the ISPs
  8. Click the Advanced button
  9. In the IP Settings tab, click the Add button under IP address. Add an unallocated IP address that is on the same subnet as that of Router B, enter the subnet of the router, click Add
  10. Click OK
  11. Click OK
  12. Click Close
Steps 8-10 are only required if you set Routers A and B to different subnets. If they are on the same subnet you will NOT need to multihome your network cards. You can just set the default gateway to the address of the router you would like to use for your internet connection and it automagically knows where to go!!!
When dealing with computers it is nice to know that there are some things that just work according to the specs! TCP/IP rocks!

No Responses to "How to use 2 internet connections on 1 network/lan"

Comment Form

You must be logged in to post a comment.