Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

Addition default Gateways... What's the point?

Like the tile says "What's the point?"  In Windows XP you can configure a NIC to have multiple default gateways.  And it so happens that my network has 2.  But it doesn't seem to matter how many gateways you add, because it will always use the first one.  Here is an example:

"Computer A" is using default gateway "192.168.123.1"
"Computer B" is using default gateway "192.168.123.2"
"Webserver" is using default gateway "192.168.123.1" and hosts www.fakewebsite.com (this is obviously fake)
"Ftpserver" is using default gateway "192.168.123.2" and hosts ftp.fakeftpsite.com

Computer B goes to http://www.fakewebsite.com it works fine.
Computer A goes to http://www.fakewebsite.com it doesnt't work (and I don't expect it to)
Computer A goes to ftp://ftp.fakeftpsite.com it works fine.
Computer B goes to ftp://ftp.fakeftpsite.com it doesnt't work (again, I don't expect it to)

I thought if I added the other gateways to each Computer's NIC it would work around this problem of client and server being on the same default gateway.

WRONG!!!!

So... what is it used for?
0
swamprattakate
Asked:
swamprattakate
  • 2
  • 2
2 Solutions
 
scampgbCommented:
Hi swamprattakate,

I'm a bit confused about the testing you're doing.
In the example above, it looks like all of the machines are on the same subnet (assuming netmask 255.255.255.0).
In this case, the default gateway wouldn't get used at all.

It would help if you posted the IP addresses of the actual machines, then we can look at what's really happening.

Anyway, in answer to your question "what's the point".
The PC will try and use the default gateway to get to any address that isn't on it's own subnet.
If for some reason it can't contact the first default gateway (the router died for example), then it'll try the second one instead.

Does that help?
0
 
swamprattakateAuthor Commented:
OK I should add more info.
There are 2 DSL routers on the network, and they both are using NAT.

The LAN address of "Router 1"  is 192.168.123.1 and the WAN address is 64.41.229.110
The LAN address of "Router 2"  is 192.168.123.1 and the WAN address is 64.41.223.242

So when Computer B requests http://www.fakewebsite.com it works fine.  Because it connects to the internet thru Router 2, the url resolves to 64.41.229.110, Router 1 using NAT routes the request to Webserver.
But when Computer A requests http://www.fakewebsite.com it works fine.  Because it connects to the internet thru Router 1,  "the page cannot be displayed"

So to solve my problem, maybe Multiple Gateways is not the solution, because, as you said, it is for when it cannot connect to the first Router.  Is there a way to make the url resolve to the local IP address of the server without changing all of the HOST files on each computer?
0
 
lrmooreCommented:
>But it doesn't seem to matter how many gateways you add, because it will always use the first one
That is expected behavior. Only the one with the lowest metric will be used. If that one happens to go unreachable, then the next lower metric will take over. This is called "Dead Gateway Detection"
That's the point of having multiple default gateways, as explained by scampgo

You can, however, add static routes to the hosts. For example:

The LAN address of "Router 1"  is 192.168.123.1
The LAN address of "Router 2"  is 192.168.123.1 <== assume this is a typo?
Can we assume that www.fakewebsite.com = 64.41.229.110 ?

CompA:  c:\> route add 64.41.229.110 mask 255.255.255.255 192.168.123.2  <--Router 2

>Is there a way to make the url resolve to the local IP address of the server without changing all of the HOST files on each computer?
Yes, setup your own DNS server on each LAN.

You might try adding a route on Router1:
LAN IP: 64.41.223.242
MASK: 255.255.255.255
Gateway: 192.168.123.2  <-- router 2
Metric: 1

AND on Router2:
  LAN IP: 64.41.229.110
  MASK: 255.255.255.255
  Gatway: 192.168.123.1 <-- router 1
  Metric: 1

Or, maybe I'm just totally confused in that you have two separate and distinct networks, both of which are 192.168.123, and 192.168.123.1 is their respective gateway to their respective DSL connection?

Maybe if I understood how you are setup better...
www.fakewebsite.com 
  Webserver real IP address = 192.168.123.??
  Webserver Default gateway = 192.168.123.1 <-- router 1
  Webserver DNS entry = 64.41.229.110

ftp.fakewebsite.com
  FTP server real IP addres = 192.168.123.??
  FTP server default gateway = 192.168.123.2 <-- router 2?
  FTP Server DNS entry = 64.41.223.242 ??
 
And, your goal is for users on LAN A to get to both WWW and FTP.fakesite.com
AND for users on LANB to get to both WWW and FTP.fakesite.com 
?
0
 
swamprattakateAuthor Commented:
Since my question "What's the point of multiple gateways?" has morphed into a much larger problem involving DNS and Subnetting, I am going to split the points because technically "Dead Gateway Detection" was the answer to the original question.  But, I got a lot more information about my real problem, and the solution came with changinge the settings on our DNS server.  So thanks.
0
 
scampgbCommented:
swamprattakate:  Thanks for the "A".  Glad I could help and that you got it sorted in the end :-)



0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now