Dual Gateways

Furr

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,067
Need a little help

I have 2 ADSL lines connected to two seperate routers (atm).

What i want if Windows XP can't connect through one router to the internet it attempts to use the other router(gateway)

There are 15 computers, each with a specific IP address, along with 3 servers, One for Mail, One for a Database and One for Files.

Any ideas on how to do this

At the moment I;ve just got it set on the test pc that it has two default gateways and 2 sets of DNS's.... Which obvioulsy won't work because Each computer only has one NIC.
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
afaik you can only have one default gateway per IP stack. imo you could
a)wack a load-balancer between the routers and the rest of the network
b)run something that pings the routers and chooses which route to take based on response or something.

mind you, option B may get you into all kinds of strange problems on webbys that run cookies. I dunno. It's ages since I did anything networky :)
 

Furr

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,067
Yeh, Im thinking i'll have to look at load balancing or see if there is a router that does dual ADSL connections.

This is mainly because we want a backup connection incase the primary goes down.

But if its possible to tell windows to choose then that would be best till i work out a better solution

For instance it looks like this

PC
10.0.0.10 --------------Gateway1 10.0.0.1 ------------>ISP1
10.0.0.x | DNS 212.x.x.1
10.0.0.x | DNS 212.x.x.2
10.etc |
--------------Gateway2 10.0.0.50 -----------> ISP2
DNS 912.x.x.1
DNS 912.x.x.2


Spose i need something like this

PC
10.0.0.10 --LoadBalacing ----Gateway1 10.0.0.1 ------------>ISP1
10.0.0.x | DNS 212.x.x.1
10.0.0.x | DNS 212.x.x.2
10.etc |
--------------Gateway2 10.0.0.50 -----------> ISP2
DNS 912.x.x.1
DNS 912.x.x.2

OR


PC
10.0.0.10 ---------- Gateway1 10.0.0.1 ------------>ISP1
10.0.0.x WAN IP 123.x.x.x
10.0.0.x DNS 212.x.x.1
10.0.0.x DNS 212.x.x.2
10.etc WAN IP 321.x.x.x -----------> ISP2
DNS 912.x.x.1
DNS 912.x.x.2

With the mailserver and VPN always pointing at the primary ISP, if it goes down no mail incoming or vpn
 

Furr

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,067
Yeh, Im thinking i'll have to look at load balancing or see if there is a router that does dual ADSL connections.

This is mainly because we want a backup connection incase the primary goes down.

But if its possible to tell windows to choose then that would be best till i work out a better solution

For instance it looks like this
Code:
PC
10.0.0.10  --------------Gateway1 10.0.0.1 ------------>ISP1
10.0.0.x   |                   DNS 212.x.x.1
10.0.0.x   |                   DNS 212.x.x.2
10.etc     |
           --------------Gateway2 10.0.0.50 -----------> ISP2
                                  DNS 912.x.x.1
                                  DNS 912.x.x.2

Spose i need something like this
Code:
PC
10.0.0.10 --LoadBalacing ----Gateway1 10.0.0.1 ------------>ISP1
10.0.0.x         |                   DNS 212.x.x.1
10.0.0.x         |                   DNS 212.x.x.2
10.etc           |
                  --------------Gateway2 10.0.0.50 -----------> ISP2
                                        DNS 912.x.x.1
                                        DNS 912.x.x.2

OR

Code:
PC
10.0.0.10  ----------  Gateway1 10.0.0.1 ------------>ISP1
10.0.0.x                    WAN IP 123.x.x.x
10.0.0.x                        DNS 212.x.x.1
10.0.0.x                        DNS 212.x.x.2
10.etc                      WAN IP 321.x.x.x   -----------> ISP2
                               DNS 912.x.x.1
                               DNS 912.x.x.2

With the mailserver and VPN always pointing at the primary ISP, if it goes down no mail incoming or vpn
 

WPKenny

Resident Freddy
Joined
Dec 22, 2003
Messages
1,348
My TCP/IP set up in winxp under advanced options allows me to enter two gateways. Have you tried this?
 

anattic

Fledgling Freddie
Joined
Dec 22, 2003
Messages
182
There are a number of routers out there capable of supporting multiple ADSL connections but they aren't cheap. They tend to be the mid-range 'modular' kit (e.g. Cisco 1800/2800 with plug-in cards).

Another thought that occurs. I assume most of the traffic you're trying to manage is http? I believe (although I've never tried it) that the Squid proxy (http://www.squid-cache.org/) can be set up to handle load-balancing and redirection.

Doesn't help with other traffic of course, but you may be able to work out case-by-case hacks for email etc.

Edit: This thing (http://www.firebrick.co.uk/) claims to do it too...
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
WPKenny said:
My TCP/IP set up in winxp under advanced options allows me to enter two gateways. Have you tried this?

hmm. my old net tech brain bit say you can add as many routes as you like, but only one default gateway.

ofc MS being MS they may well have found a way to, by enhancing the RFC's :)
 

Furr

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,067
Will have to look into all the option. But thanks for the info guys, will work it out eventually!!!!
 

phlash

Fledgling Freddie
Joined
Dec 24, 2003
Messages
195
Can you use DHCP to assign the appropriate settings from each of the routers? That way if the primary route fails, just switch it off and switch secondary on, then either manually re-load DHCP or have it on short timeout (say 5 mins)... any use?
 

Noc0de

Can't get enough of FH
Joined
Feb 27, 2004
Messages
204
Yeah, I thought u could have an alternative IP setup on the same stack as well?

e.g. Just go to the properties on the NIC, and properties on the TCP/IP protocol (See the 2 screenies attached).
 

Attachments

  • screen1.JPG
    screen1.JPG
    33.9 KB · Views: 14
  • screen2.JPG
    screen2.JPG
    28.3 KB · Views: 12

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
aye, but will XP swap automaticly if one network goes down? That alternate config stuff reminds me of the work and home profiles on my old lappy... I had to switch between those too. I gather that Furr wants this to happen without user input?
 

Noc0de

Can't get enough of FH
Joined
Feb 27, 2004
Messages
204
Ah, true - not sure mate :)

Give it a whirl and see what happens I guess. I guess w/o user intervention it would have to be some form of load-balancer I guess.
 

yaruar

Can't get enough of FH
Joined
Dec 22, 2003
Messages
2,617
Furr said:
Need a little help

I have 2 ADSL lines connected to two seperate routers (atm).

What i want if Windows XP can't connect through one router to the internet it attempts to use the other router(gateway)

There are 15 computers, each with a specific IP address, along with 3 servers, One for Mail, One for a Database and One for Files.

Any ideas on how to do this

At the moment I;ve just got it set on the test pc that it has two default gateways and 2 sets of DNS's.... Which obvioulsy won't work because Each computer only has one NIC.

Dual nics on a pc will cause all sorts of problems. FOr what you want you really need a firewall/router with failover functionality. A bonded ADSL solution would work as well as these can be set up for failover as well.
SOmething akin to http://www.xrio.com/pdf/Reti/NexusWay_505_DataSheet.pdf probably isn't that expensive, the preceeding model used to be about 200 quid.
[edit] you could probably also build a linux box with dual nics to do the same, but that would make you king of the weenies
 

Clown

Part of the furniture
Joined
Dec 22, 2003
Messages
4,292
I'm in the same position. It was too hard to work out, and I wasn't going to pay some chimp for some systray tool to make changing gateway easier. I have to right click and edit every time I need to change :)
 

Noc0de

Can't get enough of FH
Joined
Feb 27, 2004
Messages
204
Clown said:
I'm in the same position. It was too hard to work out, and I wasn't going to pay some chimp for some systray tool to make changing gateway easier. I have to right click and edit every time I need to change :)

Yeah, if u want something doing well - do it yourself :)
 

SheepCow

Bringer of Code
Joined
Dec 22, 2003
Messages
1,365
What you really want is another PC on the network. Whack the new PC as your gateway and have that determine which route is viable (either gateway1 or gateway2) and route accordingly.
 

Clown

Part of the furniture
Joined
Dec 22, 2003
Messages
4,292
Please explain CowSheep. I have a Debian server on my network and I want to do what you are talking about.
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
he means running routing daemons that actively determin the best path
 

Clown

Part of the furniture
Joined
Dec 22, 2003
Messages
4,292
Keep talking. You just said a whole bunch of words I don't know :)
 

Furr

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,067
Well im going to go ahead on monday to see what i can make of this with the suggestions on here. Will report back if anything works

and yes i want it without user interaction, since im not always there!
 

yaruar

Can't get enough of FH
Joined
Dec 22, 2003
Messages
2,617
raid said:
That looks really messy and doesn't offer any real balancing or failover. I guess if one goes down you can flush the routing cache (or does linux do this automatically?) but tis' not going to be seamless.
Seriously, best fire and forget solution is a cheap load balancer.
 

Mellow

Loyal Freddie
Joined
Dec 23, 2003
Messages
193
Why dont you put a RRAS server infront of the 2 adsl modems and then use the load balancing option there to determine which connection your RRAS server dials. Then the only gateway you'll need is the RRAS box :D
 

atos

Fledgling Freddie
Joined
Jan 3, 2004
Messages
2,527
Otherwise you could wait for IPv6. It has support for multiple gateways/IP's on one nic IIRC. Made a project about IPv6 a few months back, I might remember wrong.
 

Users who are viewing this thread

Top Bottom