Solved

Configure a computer for 2 Default Gateways

Posted on 2014-12-10
18
158 Views
Last Modified: 2014-12-10
In the scenario where I need a computer to have 2 Default Gateways , how should I  configure the computer to achieve this goal.
I know that there is Route Add command in windows that can add a second DG to the computer. However in large environment, is Adding Route to computers is done manually or through a script or it is a configuration done through a router ?

in the topology below, assuming computer C1 is configure with DG of R1 interface but it  also needs to reach Network 192.168.10.0.

How is this done ?

Thank you
dg
0
Comment
Question by:jskfan
  • 6
  • 5
  • 3
  • +3
18 Comments
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 136 total points
ID: 40491174
You can add a static route yes but NEVER try adding a second default gateway into a computer. You would need a router to split the traffic and not a gateway.
Replace SW1 with a router
0
 
LVL 28

Assisted Solution

by:mikebernhardt
mikebernhardt earned 46 total points
ID: 40491198
If it's only one route then use route add to add it. Add the keyword Permanent or it won;'t survive a reboot.
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 227 total points
ID: 40491201
Assuming that R1 can get to 192.168.10.0 network, it would send an ICMP network redirect to C1. Effectively telling C1 that the best way to get to the 192.168.10.0 network is to send it to 192.168.20.1  (this also assuming that redirects aren't disabled on R1).

If redirects are disabled, then R1 will simply forward all the packets to R2.

A computer can only have one active default-gateway.  Some systems let you define more than one, but only the first entry would be used.

If R1 doesn't know about the 192.168.10.0 network, then you would have to create a static route on C1 for the 192.168.10.0 network with 192.168.20.1 as the next hop.
0
 
LVL 3

Assisted Solution

by:nucfission
nucfission earned 46 total points
ID: 40491206
Hi jskfan,

rule of thumb - a single host must have only 1 Default Gateway. The idiom is " if the destination is not known then forward to the default gateway " but if system has 2 Default gateways ....er.... which gateway is to be used.

You can introduce Static routs on hosts to forward request for 192.168.10.0 network to R2. and you are right that you can actually do this through scripts.

However I would strongly recommend against this. all routing should be done through routers/switches - this way you do not have to make multiple changes if things change and go Desk diving to make sure everyone is working and/or applications have correct access.

If your SW1 is layer 3 capable -- you can simply introduce the routing there .. and use SW1 as the gateway.

but again the Routers R1 & R2 are also cable of routing between themselves; and you only have to maintain 2 routing tables .... rather than multiple hosts with static (Route add commands) routing table.

Hope this helps
0
 

Author Comment

by:jskfan
ID: 40491266
Don Johnston

If I understand:
 ICMP redirect is enabled by default on Cisco routers, the issue should not have happened at first place.  Correct ?
0
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 136 total points
ID: 40491299
It all boils down to what SW2 is.  If it can not ROUTE then game over. You have two separate networks connecting to SW1, 10.10.20.0 and 192.168.20.0  can you log onto R1 and currently ping R2 ?
0
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 45 total points
ID: 40491309
Since there are transfer networks between SW1 and the routers, SW1 needs to be a L3 switch with routing capabilities.
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 227 total points
ID: 40491331
ICMP redirect is enabled by default on Cisco routers, the issue should not have happened at first place.  Correct ?

What "issue"?  Is something not working?

You are correct, ICMP redirects are enabled by default.  But even if they aren't, R1 should still forward traffic to R2 (once again, assuming that R1 has a route to the 192.168.10.0 network).  If it doesn't (and you can't add it), just add a route to C1 (route add 192.168.10.0 mask 255.255.255.0 192.168.20.1).
0
 

Author Comment

by:jskfan
ID: 40491403
SW1 is L2.
I believe if SW1 was L3  then routing should have occured just there...
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 227 total points
ID: 40491428
I believe if SW1 was L3  then routing should have occured just there...
That is correct. But the topology you have is not that unusual.
0
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 136 total points
ID: 40491435
Why not just have SW1 connect only to R1 and R1 <===> R2.  You dont need any new hardware then.
0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 227 total points
ID: 40491502
jskfan,

I just noticed you have an IP addressing problem.  C1 and interfaces of R1, R2 which connect to SW1 must be on a common subnet.  For example:

R1 192.168.20.1/24
R2 192.168.20.2/24
C1 192.168.20.3/24
0
 

Author Comment

by:jskfan
ID: 40491596
I agree , C1 exiting Default Gateway or added DG through Route command,  should always be on the same subnet as the computer subnet.
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 227 total points
ID: 40491606
Right. But your topology diagram show R1 with 10.10.20.1 and R2 with 192.168.20.1.

That won't work.
0
 

Author Comment

by:jskfan
ID: 40491618
It is made up scenario....just trying to understand the usage of Route Add command in windows.
I agree the subnets are wrong...
0
 

Author Closing Comment

by:jskfan
ID: 40491624
Thank you Guys!
0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 40491667
Okay, but if the underlying network is invalid then the concepts will be invalid as well.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 40491881
No doubt, Don.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

708 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