05-02-2016 11:20 PM - edited 03-05-2019 03:56 AM
Hello Gurus....
The other day I ran into a redistribution scenario that I was surprised to find out didn't really work as expected.
I have one router R1 which runs 2 x OSPF processes as well as BGP (all BGP neighbours belong to other AS' so eBGP throughout).
The topology looks like this:
R4 ----(OSPF Process 2)----- R1 -------(eBGP)---------- R2
|
(OSPF Process 1)
|
R3
Again, R1 uses OSPF process 2 to talk to R4, BGP to talk to R2 and OSPF process 1 to talk to R3.
The way I wanted redistribution to work in R1 is as below:
I expected OSPF 1 to redistribute the routes learned from R3 into BGP, then for BGP in turn to redistribute those routes into OSPF 2 and onwards to R4 and R2.
What I found instead is that R4 only ever received the original BGP routes from R1 and R2. The OSPF routes that were learned from R3 and redistributed to BGP never made it to R4 (OSPF 1->BGP->OSPF 2 redistribution didn't work).
However, I could see the routes that originated from R3 in both R1 and R2's routing table.
In the end, the only way I could make R4 see R2's routes was to enable redistribution between OSPF processes in R1:
What is the mechanism that prevented BGP from redistributing to OSPF process 2 those routes that it learned from OSPF process 1?
regards,
Leo
Solved! Go to Solution.
05-03-2016 01:52 AM
Hi,
as you can read here:
http://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8606-redist.html
"The rules for redistribution on a Cisco router dictate that the redistributed route be present in the routing table. It is not sufficient that the route be present in the routing topology or database."
So when you are redistributing a prefix from OSPF1 to BGP, it's in the router RIB as an OSPF prefix, not a BGP one. That's why the BGP process can't redistribute the prefix to OSPF2.
I believe the reason for this rule is to avoid routing loops during mutual redistributions among mutliple routing protocols running on the same router.
Best regards,
Milan
05-03-2016 01:52 AM
Hi,
as you can read here:
http://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8606-redist.html
"The rules for redistribution on a Cisco router dictate that the redistributed route be present in the routing table. It is not sufficient that the route be present in the routing topology or database."
So when you are redistributing a prefix from OSPF1 to BGP, it's in the router RIB as an OSPF prefix, not a BGP one. That's why the BGP process can't redistribute the prefix to OSPF2.
I believe the reason for this rule is to avoid routing loops during mutual redistributions among mutliple routing protocols running on the same router.
Best regards,
Milan
05-03-2016 04:32 PM
I think you're right on the money.
From the point of view of the receiving OSPF process (OSPF 2), it needs to make a decision which BGP routes to import. It will receive a bunch of candidate routes from the BGP process but only the ones that are showing up in that router's routing table as *BGP* routes will be chosen.
While I understood previously that BGP routes would only be redistributed into another routing protocol if they were in the routing table, this scenario still puzzled me as the routes were INDEED in the routing table - just not as BGP routes.
Thanks Milan!
05-03-2016 10:33 PM
BGP Redistribute Internal
05-04-2016 12:09 AM
05-04-2016 12:15 AM
Actually no, because I tried that command as part of my troubleshooting and it didn't do the job.
The point is that the routes in question are not iBGP, so the "bgp redistribute-internal" command doesn't apply.
05-04-2016 12:23 AM
Yes, exactly.
05-04-2016 12:29 AM
Can you share the output of
Sh ip route
sh ip bgp summary
sh ip bgp
sh ip os ne
for R1 and R4 respectively
05-03-2016 07:00 AM
Hi ,
Can you please paste your configuration and outputs respectively.
Regards.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide