cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
383
Views
25
Helpful
9
Replies

routing question

johnnorton
Level 1
Level 1

Can a route be created with the same next hop as a route in the routing table? I have the same IP'd network in two locations that are available all the time, but would like to only route to one based on a bgp route existing? The next hop would change based on the bgp's route next hop.

9 Replies 9

pkhatri
Level 11
Level 11

Hi John,

What you are suggested is the use of recursive routing and it very much possible. In fact, that is the way protocols like BGP install routes in the routing table.

You don't need to do anything special to enable this. Simply create the route and the router will recursively work out the "real" next-hop for it.

Hope that helps - pls rate the post if it does.

Paresh

Hi. Thanks for the reply. Not sure I understand. Here is what I have in my routing table:

Gateway of last resort is not set

64.0.0.0/30 is subnetted, 2 subnets

O E1 64.200.200.24 [110/7] via 10.191.2.2, 00:06:23, Vlan102

O E1 64.50.50.24 [110/7] via 10.191.2.2, 00:06:23, Vlan102

172.16.0.0/24 is subnetted, 1 subnets

O E1 172.16.1.0 [110/7] via 10.191.2.2, 00:06:23, Vlan102

10.0.0.0/24 is subnetted, 6 subnets

C 10.191.4.0 is directly connected, Vlan104

C 10.191.0.0 is directly connected, Vlan100

C 10.191.2.0 is directly connected, Vlan102

O IA 10.254.0.0 [110/3] via 10.191.0.2, 00:06:23, Vlan100

O IA 10.253.0.0 [110/7] via 10.191.2.2, 00:06:23, Vlan102

What I need to do is install a route to 10.191.10.0 via whatever next hop the external OSPF route for 64.50.50.24 shows up as.

It can change based on the bgp updates I receive and 10.191.10.0 is accessable via two different routes simultaneously that may or may not change with the 64.50.50.24/30 route.

That make sense? I'm tying into another private network and when they lose routes, I need to reroute based on a DR scenario.

Thanks in advance.

John

I am not sure that I fully understand what you need to do (especially I am not clear about the part where you say that 10.191.10.0 is accessible via two different routes - but 64.50.50.24 shows only a single path).

But part of what you are asking seems fairly clear. If you want to have a route for 10.191.10.0 and have the next hop be whatever the routing table currently has as the next hop for 64.50.50.24 then this should work (assuming that the route is a /24):

ip route 10.191.10.0 255.255.255.0 64.50.50.25

When the router goes to install this route into its table it will look at the specified next hop address (64.50.50.25) and figure how to get to it and will install into the table the next hop address based on the current next hop for 64.50.50.24. This is the idea of recursive routing (the specified next hop does not have to be directly in the routing table as long as there are entries in the routing table that will tell how to get to it).

Give this a try and let us know how it works.

HTH

Rick

HTH

Rick

Hi,

That's exactly what I was getting at... If you do something like the following, you should get what you are after:

ip route 10.191.10.0 255.255.255.0 64.50.50.24

The route to 10.191.10.0 will not follow the route to 64.50.50.24. That is what I meant by recursive routing.

If you want to see the actual next-hop that the route to 10.191.10.0 recurses to, issue the 'sh ip cef' command and you will see that it has the same next-hop as the route to 164.50.50.24.

Pls do remember to rate posts that help.

Paresh

Ok. Thanks. I am wondering if there is a way to dynamically do this as the route to 64.50.50.24 can change. It is an entry to another network that I do not control and I redistribute it into my ospf. There are two entry points to the 64 network and I have vpn tunnels built to each entry point. One router on my side controls which vpn to take and I need to adjust it for the route. I can easily get to the 64 network via the routing update, but I have a 10.191.10.0/24 network on both tunnels and I need to route to the 10.191.10.0/24 based on the route to the 64 network.

Hi John,

What I proposed *is* the dynamic way of doing it. The route to 64.50.50.24 can change and this will automatically change the route taken to 10.191.10.0/24....

Pls do remember to rate posts.

Paresh

You guys rock! I will give it a shot. I was missing the next hop piece... needing to be the route not the route's next hop.

No probs, John...

As I posted earlier, the way to verify this is to issue the 'sh ip cef' command and that's where you will see the next-hop change dynamically as the route to 64.50.50.24 changes...

Paresh

Works perfectly! Thank you very much.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: