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

    Route Redistribution BGP & OSPF

    Fabrizio Chessa

      Hi,

       

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

       

      In this lab I need to redistribute network 10.7.0.0/24, 10.7.1.0/24 and 10.32.0.0/24 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 10.7.0.0/24 and 10.7.1.0/24 from 10.32.0.0/24 and viceversa.

      Router R7 and other network is only for backup.

       

      Can anyone help me for this lab?

       

      Thanks.

       

      Fabrizio

        • 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 10.7.0.0/24, 10.7.1.0/24 and 10.32.0.0/24 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.

           

          Scott

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

            Yes,

             

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

             

            Router R6 inject BGP route (10.7.0.0/24 and 17.7.1.0/24 learned by iBGP) in OSPF area 0

            Router R11 inject BGP route (10.30.0.0/24 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 10.7.0.0/24 and 10.7.1.0/24
              2. Process 2 learn network 10.30.0.0/24
              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 10.7.1.0/24 and 10.7.0.0/24 on R6 (learned by OSPF)
            • network 10.32.0.0/24 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 10.7.0.0/24 and 10.7.1.0/24... R8 trace 10.7.0.0/16 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.

             

            Thanks

            Fabrizio

             

            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!

               

              Scott

              • 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

                 

                Problem:

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

                Solution:

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

                 

                Case 1 - Link R11-R12 down:

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

                 

                Case 2 - Link R11-R4 down:

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

                 

                It's very good and simple solution.

                 

                Thanks!!

                Fabrizio