7 Replies Latest reply: Nov 29, 2012 5:39 AM by Jeff RSS

    How to prevent Loop in OSPF?

    Ankit

      Even though Linkstate Routing protocol has self mechanism to protect loop. Can you explain further how we can prevent loop in OSPF  ?

        • 1. Re: How to prevent Loop in OSPF?
          Martin

          what are self mechanisms ?

          • 2. Re: How to prevent Loop in OSPF?
            Paul Stewart  -  CCIE Security

            Do you have an example where an OSPF loop is created in a single routing process? I can see that loops might occur anytime redistribution is happening or when external LSAs are being used. I guess my question is if you are asking in general or in a specific scenario.

            • 3. Re: How to prevent Loop in OSPF?
              learning cookie monster

              In OSPF the RID is sent with every LSA. This is enough for any router in the AS to know when it is seeing a route it origionally  generated. If there is one point of redistrubtion there is still no risk of looping.

               

              When there are 2 points of mutual redistribtuion, there can be an issue where the OSPF native rotues will be seen as preferred by the other IGP becuase during redistribution back into the OSPF, the cost is lower than native. This can cuase some flapping but still no loops. It can be corrected a few ways, one being adjusting cost when redistributing external routes back into OSPF. Another would be simply filtering the native OSPF routes during redistribution (or w/distribute list in under ospf process).

               

              Now, when we have multiple IGP's with multiple routers performing redistribution, things can get more interesting. AD can case next hop preference to set up loops. This is very brief summary to what I consider a complex topic.

               

              A quick query found this document by a 4x CCIE.

               

              http://blog.ine.com/wp-content/uploads/2011/01/Loop-Prevention-in-OSPF.pdf

               

              Perhaps this is what you are looking for....

               

              regards,

               

              Marc

              • 4. Re: How to prevent Loop in OSPF?
                Jose Pablo Monge

                Guys I have a question...how do routing protocols prevent loops when mutual redistribution is enabled with a single point of redistribution. Check out this example

                 

                1.png

                In my topology I have R3 doing the mutual redistribution between both routing domains but why if I enabled redistribution from OSPF into EIGRP (which caused R4 to get the routes from OSPF and marked them as D EX, these are shown in the above screenshot) routes displayed as external EIGRP do not get  send back to OSPF when I enable distribution the other way around (EIGRP into OSPF). I know it wont do it and I know that if you have two points of redistribution loops can indeed occur, but what mechanism stops D EX routes from being sent to OSPF when I redistribute EIGRP into OSPF. I started to give some serious thoughts because when I enable one and  then the other

                2.png

                I would appreciate clarification.

                 

                Kind regards,

                 

                Jose  Monge

                • 5. Re: How to prevent Loop in OSPF?
                  Jeff

                  Those routes have  Originating router in the updates to identify the redistributing router,so even if they somehow leak back to R3,R3 will not accept these routes.

                  But in your case R3 will not receive these routing updates from R4,because split horizon feature forbids R4 to send the updates out of its receiving interface.

                  • 6. Re: How to prevent Loop in OSPF?
                    Jose Pablo Monge

                    I see, thanks for the explanation

                    • 7. Re: How to prevent Loop in OSPF?
                      Jeff

                      You're welcome.