Solved

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

Posted on 2004-09-16
5
303 Views
Last Modified: 2010-08-05
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
Comment
Question by:swamprattakate
  • 2
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
scampgb earned 125 total points
ID: 12077985
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
 

Author Comment

by:swamprattakate
ID: 12078816
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
 
LVL 79

Assisted Solution

by:lrmoore
lrmoore earned 125 total points
ID: 12079539
>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
 

Author Comment

by:swamprattakate
ID: 12085053
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
 
LVL 15

Expert Comment

by:scampgb
ID: 12085354
swamprattakate:  Thanks for the "A".  Glad I could help and that you got it sorted in the end :-)



0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now