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.
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.
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
126.96.36.199/30 is subnetted, 2 subnets
O E1 188.8.131.52 [110/7] via 10.191.2.2, 00:06:23, Vlan102
O E1 184.108.40.206 [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 220.127.116.11 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 18.104.22.168/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.
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 22.214.171.124 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 126.96.36.199 then this should work (assuming that the route is a /24):
ip route 10.191.10.0 255.255.255.0 188.8.131.52
When the router goes to install this route into its table it will look at the specified next hop address (184.108.40.206) and figure how to get to it and will install into the table the next hop address based on the current next hop for 220.127.116.11. 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.
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 18.104.22.168
The route to 10.191.10.0 will not follow the route to 22.214.171.124. 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 126.96.36.199.
Pls do remember to rate posts that help.
Ok. Thanks. I am wondering if there is a way to dynamically do this as the route to 188.8.131.52 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.
What I proposed *is* the dynamic way of doing it. The route to 184.108.40.206 can change and this will automatically change the route taken to 10.191.10.0/24....
Pls do remember to rate posts.
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 220.127.116.11 changes...