Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cisco Mutual Redistribution BGP OSPF Loop Prevention

Posted on 2016-08-26
5
Medium Priority
?
1,036 Views
Last Modified: 2016-09-28
Hello Experts,

Please see diagram attached, I have a scenario where i have dual CE-PE configuration and need to enable mutual redistribution between BGP and OSPF. My concern is with routes being redistributed into OSPF from BGP and being re-advertised/redistributed back into BGP at the other CE.

I'm guessing I will have to configure some kind of filtering to prevent routes learnt via BGP being redistributed back in. I also understand this can be achieved with route tagging.

Can someone point me to some documentation/ links on the configuring route tagging to prevent loops in this scenario?

Cheers
routetagging.jpg
0
Comment
Question by:Member_2_7966113
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 31

Expert Comment

by:Predrag
ID: 41772107
Scenario is pretty simple. Mutual redistribution of routes between two protocols.
When you are redistributing your routes into another protocol you tag routes.
Why you are tagging routes?
Because when you are receive routes from other protocol you can check tag to see if that was previously redistributed route or not. If route tag is the one that matches your tag that you configured during redistribution - that route should be dropped since if you add that route to routing table that would mean in the best case scenario suboptimal routing, worst case scenario routing loop. Actual problem with redistribution is that previously redistributed route can have better AD than the one that should be placed in routing table.

Route redistribution example
0
 
LVL 1

Author Comment

by:Member_2_7966113
ID: 41772130
Predrag

That's a good example. However, I was hoping to find a scenario similar to example I posted, which would include the configurations.

Cheers.
0
 
LVL 31

Accepted Solution

by:
Predrag earned 2000 total points
ID: 41773452
Simple example:
(also the same should be done in other direction)

Importing routes from BGP:

"Left router" in your area

interface FastEthernet0/0                               <--- WAN interface
 ip address X.X.X.1 255.255.255.0
!
interface FastEthernet0/1                                   <---- LAN interface for ospf
 ip address 192.168.0.2 255.255.255.0
!
router ospf 1
 redistribute bgp 1 metric 10 metric-type 1 subnets <---- routes redistributed from BGP will keep tag 2
 network 192.168.0.0 0.0.255.255 area 0
!  if you want to use some arbitrary number
!  redistribute bgp 1 metric 10 metric-type 1 subnets tag 1000
!
router bgp 1                                               <----- ASN 1
 redistribute ospf 1
 neighbor X.X.X.2 remote-as 2          <----- neighbor ASN 2


Redistribution of routes to BGP

"Right router"                                  <------- the other router to internet
!
router bgp 1                                    <---- still the same ASN number - your area
 redistribute ospf 1 route-map TO-BGP    <----------- route map to filter routes
 neighbor Y.Y.Y.2 remote-as 3
!
route-map TO-BGP deny 10      <---- this will not permit routes with tag 2 to be redistributed
 match tag 2
!match tag x                                     <---- if you want to use some arbitrary number
!
route-map TO-BGP permit 20       <---- permit the rest of the routes
!

So this will prevent routes received from your "left router" to be advertised back to BGP on your "right router".
But I am not sure what is actual scenario here. If you are planing to redistribute all network routes to OSPF (full BGP route table) it is not going to work. If you are receiving some part of routing table (or filter routes that you will redistribute to OSPF) it's OK.
0
 
LVL 1

Author Closing Comment

by:Member_2_7966113
ID: 41820053
This worked for me. Thanks again
0
 
LVL 31

Expert Comment

by:Predrag
ID: 41820056
You are welcome.
0

Featured Post

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question