cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1780
Views
5
Helpful
22
Replies

BGP/OSPF Reditribution

inderjeet452
Level 1
Level 1

Hi Folks,

Hope all are doing good.

I need your support on one case where we are having eBGP between upstream ISP to my core router and inside my networks multiple routers are connected with my Core Routers and Running OSPF internally.

Done redistribution of OSPF to BGP and BGP to OSPF on both core routers(R2 and R5) in attached topology. As per my understanding loop will be created, but I am able to reach towards PC from R8 or any other Router. 

 

Can someone help to understand, why loop is not creating even after redistribution of protocols with each other.

4 Accepted Solutions

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @inderjeet452 ,

issues can arise when a topology change happens. If for example you shut down one interface in one OSPF router.

For real world scenarios involving OSPF and BGP you can avoid mutual redistribution in multiple points by using network commands in BGP to advertise OSPF learned prefixes in BGP. Eventually combined with aggregate commands in BGP.

If mutual redistribution is needed appropriate route tagging or BGP community settings can be used to avoid re-injection of OSPF route from BGP in OSPF and vice versa

Route-maps need to be used with a first block with deny action like

route-map BGP-into-OSPF deny 10

match route-tag 179

route-map BGP-into-OSPF permit 10

set route tag 179

Hope to help

Giuseppe

 

View solution in original post

Forget incomplete, origin selection come after as-path length. 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

As I mentioned ibgp must win because it have shortest as-path

Do show ip bgp and check this point 

MHM

View solution in original post

Hello
When performing mutual redistribution at dual redistribution points, you could indeed incur loops in the network.

As stated by others using route tags to permit and deny is a good way of negating such issues specifically between two differing IGPs, but when you have and BGP/IGP redistribution I would say a good way would to incorporate BOTH route tags and BGP attributes.

This would mean setting route-tags to BGP redistributed routes into OSPF and  Community attributes to redistributed OSPF routes into BGP.

Example:

bgp - 179
ospf- 89

ip bgp-community new-format
ip community-list standard OSPF-TAG permit 100:89

route-map bgp-ospf deny 10
match community OSPF-TAG

route-map bgp-ospf permit 100
set tag 179

route-map ospf-bgp deny 10
match tag 179

route-map ospf-bgp permit 100
set community 100:89

router bgp xx
redsitribtue ospf route-map ospf-bgp 

router ospf
redsitribtue bgp route-map bgp-ospf subnets


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

inderjeet452
Level 1
Level 1

At last as I understood, as per @MHM Cisco World , iBGP path will win as it is having shortest AS Path and Downward on R8, it will be having multiple Paths to reach 192.168.0.0 subnet, where OSPF will win.

Thanks @paul driver @srimal99 @Giuseppe Larosa @David Ruess Everyone for your valuable comments and guidance....!!!

That was a great discussion....!!!

View solution in original post

22 Replies 22

M02@rt37
VIP
VIP

Hello @inderjeet452 

Redistribution alone does not always create forwarding loop because protocol protection (AD, AS-PATh), attributes, and likely taging/selection rules are preventing re-install of the same route in a way that would loop traffic — but, advice, you should still harden redistribution with tags and filters to be safe. Control the redistribution, think route-map in ingress and egress.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Agree with taging option there, but when we doing redistribution, ORIGIN is getting removed and will get "?" there. If Origin is not known, on which parameters it prevent loop.

Hello,

 

In agreement with M02@rt37 that mutual redistribution by itself likely wont cause a loop. Routing protocols are pretty robust in being able to prevent looks (unless you manually intervene with other metrics or static routes). Also as M02@rt37 said you can tag routes as they are being redistributed into your network and not be allowed back out another direction.

You should be ok with your current setup.

-David

Redistrubte two points sure make loop 

Ospf 90/110 ebgp is 20 

But that other issue 

For ping do you use source IP of ping ?

MHM

Source loopback IP have taken...Without source also tried

inderjeet452
Level 1
Level 1

I have seen in R2 and R5, getting PC prefix learned with tag 9829(Origin ASN), same is getting on other Routers as well via Redistribute into OSPF. 

Can anyone please confirm in deep, why loop is not creating while it is in Area 1 and redistribution done on BGP and OSPF on R2 and R5. I haven't given any tag there till now and redistributed E1,E2 and Internal ospf routes into BGP. It should create loop but still didn't get why loop is not forming here.

Can I see R1 and R9 and R8 config 

MHM

Attaching all router's config here

I need config as text

MHM

Attached

And R2 and R5

MHM

Let me make double check 

MHM

Config attached

OSPF topo.jpeg.jpg

the R9 must have two path 
can I see 
show ip bgp 192.168.0.0 in R9 

MHM