Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default route to router not directly connected

Status
Not open for further replies.

hmmfe

IS-IT--Management
Joined
Mar 30, 2006
Messages
3
Location
US
Scenario: Router A is connected to Router B and Router B is connected to Router C. Both Router B and Router C have default routes out local interfaces to the internet. Router A does not have a local route to the internet.

I want to configure Router A to use Router C to access the internet rather than Router B. I figured I could use a default route on Router A that points directly to Router C and then have a "recursive route" on Router A that tells Router A that it can get to Router C via Router B.

Let's say I am using 10.0.0.1/30 on Router A connected to 10.0.0.2/30 on Router B. Router B has 10.0.0.5/30 that is connected to 10.0.0.6/30 on Router C. Again both Routers B and C have default routes out a local interface to an internet connected router.

Is it possible to use 10.0.0.6/30 as the default route for Router A provided I also have a static route like (ip route 10.0.0.4 255.255.255.252 10.0.0.2)? Would default route traffic from Router A exit through Router C's default route?

If not, is there a way to make this work?
 
Hi,

Routers make routing decisions from their local routing tables.. so when the traffic hits B, because its route 0.0.0.0 points out its local interface to the internet its going to use that route, regards less of what you configure on A.

You could use policy routing, I.E If you can Id traffic in an accesslist with specific source addresses that you want to route to the internet via C, you could specify the next hop as router C for any traffic that matches your policy. Router C will then route to the internet as normal.



LEEroy
MCNE6,CCNA2,CWNA, Project+
 
Yes, it is perfectly possible to the 'recursive' routing lookup you describe. It is a similar concept to the 'default-network' you can configure. You would not normally have everythint statically configured though - i.e. your internal routers would run a routing protocol and the 'default-network' would be statically defined. This way you can have redundancy to reach the default route.

HTH

Andy
 
Hi,

Ok, recursive lookups are new to me.... but understand the logic, but I dont see how Router B will then pass the traffic to router C to the internet when all router B has is a 0.0.0.0 route via its local Serial interface to the internet.

LEEroy
MCNE6,CCNA2,CWNA, Project+
 
Recursive lookups aren't going to help out in this situation. Router A will see that it wants to send traffic to Router C but it will quickly discover that it needs to go to Router B to get there. Once Router B sees the packets, it will make its own routing decisions irrespective of what you've configured on Router A.

My first suggestion would be to connect Router A to Router C. If that's not possible then policy-based routing is probably the next best choice.
 
Thanks everyone for your replies...

jneiberger - That is the same conclusion I came to after thinking about the problem a while. Problem I had was I remembered doing a similar thing years ago...the difference being the middle router did not have a default route to another destination.

I would have just used PBR to begin with but Router B in this case is a L3 switch that does not support PRB so I was trying to do a "poorman's" version of it.

 
Credit to leedsit as well as you were the first post with the right answer.
 
Cool,

glad you found a solution.

Lee

LEEroy
MCNE6,CCNA2,CWNA, Project+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top