4 Replies Latest reply: Apr 27, 2012 4:56 PM by Fabrizio Chessa RSS

    Route Redistribution BGP & OSPF

    Fabrizio Chessa



      This is my lab for router redistribution between BGP and OSPF...


      In this lab I need to redistribute network, and between OSPF area 0 and OSPF area 100.


      Routers R5-R10-R7 are linked by DMVPN where:

      • R7 HUB
      • R5 Spoke
      • R10 Spoke


      In this LAB all traffic must pass between R6 an R11 to reach and from and viceversa.

      Router R7 and other network is only for backup.


      Can anyone help me for this lab?





        • 1. Re: Route Redistribution BGP & OSPF
          Scott Morris - CCDE/4xCCIE/2xJNCIE

          Ok, so you have a routing issue with multiple paths....



          Your main protocol is OSPF, right?  So by default (over DMVPN?) the routes are learned internally via OSPF.  Otherwise, they are learned externally via BGP --> OSPF?


          Well, you can't prefer an external LSA over an internal one...  So that's not going to happen.


          However, if you have more specific routing that'll work.  So given no other instructions or criteria, I'd say that a BGP inject-map may work nicely to make the, and networks into a pair of /25's each or something.  Then you'll have both sets of routes in the table, but your traceroute will always take the most specific path.



          • 2. Re: Route Redistribution BGP & OSPF
            Fabrizio Chessa



            My main protocol is OSPF, over DMVPN the routes are learned internally via OSPF.


            Router R6 inject BGP route ( and learned by iBGP) in OSPF area 0

            Router R11 inject BGP route ( learned by iBGP) in OSPF area 100


            I found 2 solutions:

            1. Tunnel GRE over IP between R6 and R11 with tunnel interface in OSPF area 100. I increased ospf cost in R7's ospf interfaces
            2. Two OSPF process in R7:
              1. Process 1 learns network and
              2. Process 2 learn network
              3. Process 1 redistribute ospf 2 and viceversa
              4. I changed distance for external route over 200 (default distance for ext route learned by BGP)


            Step 1 is simple but I don't want to create overhead.

            Step 2 is ok if I filter:

            • network and on R6 (learned by OSPF)
            • network on R11 (learned by OSPF)

            I need to filter because if uno priority link fail and goes up the BGP make that network in Rib-failure. It is correct because network learned by OSPF area 0 gets priority over external network.



            I tried to summarize and R8 trace in priority link but reverse path return over backup link.


            I think a lot to find another clear solution but I think that the clearest solution is first.


            This is only my lab (for my experience) and I make any solution to get my objective.





            P.S: I'm sorry for my english

            • 3. Re: Route Redistribution BGP & OSPF
              Scott Morris - CCDE/4xCCIE/2xJNCIE

              You're good.  But you're on the right path too.  Each router has to make its own decision, so you need to understand the logic, both in-protocol and between protocols for why your router picks one path over the other.


              Good stuff!



              • 4. Re: Route Redistribution BGP & OSPF
                Fabrizio Chessa

                Thanks Scott


                I think that youre solution is very good with classful redistribution or only default-route redistribution.

                Very Small and clear configuration.


                • Router R7 redistributes default-route to all routers



                • R10 reaches net by R7 and not from priority link of R12


                • On interface R5-->R4 I increased ospf cost
                • Now R10 reaches net from R12


                Case 1 - Link R11-R12 down:

                • R11 loses network
                • R12 and R10 know that their next-hop is R7
                • R8 loses network and now his next-hop is R7


                Case 2 - Link R11-R4 down:

                • Problem:
                  • R11 doesn't lose network because it is learned from R12 (>R5-->R7-->R10-->R11)
                • Solution:
                  • R11 must learns network only from R4
                  • I filter in OSPF process the network in ingress over interface R11-->R12
                • Now I return to case 1 where R11 loses the network


                It's very good and simple solution.