01-12-2014 07:07 AM - edited 03-07-2019 05:30 PM
Dear Friend,
Please find the below Loop avoidance mechanism.
Loop avoidance mechanism on EIGRP:
Secondary Ad< Primary FD
Loop avoidance mechanism on BGP:
EBGP:
Verify the AS number, If the AS no. is the part of it's own As no. then It will reject the packet.
IBGP:
Verify the router-Id. If the Router-Id is the part of it's own router-id then it will reject the packet.
Question:
How OSPF and RIP avoid Loop??? Please Explain in details.
Regards,
Sanjib
01-12-2014 09:36 AM
Sanjib
OSPF uses the information advertised in LSAs and the Dijkstra algorithm to calculate the topology of the network and then uses that topology information to prevent loops.
HTH
Rick
01-12-2014 09:43 AM
Hi Sanjib,
There is no form of 'loop avoidance' with OSPF like the distance/patch vector protocols (EIGRP/BGP).
OSPF's algorithm (and all link state routing protocols) calculates all the links of all the routers in the 'Area' similar to a 'tree' fashion with each router being the 'root' of it's calculated tree.
Doing this means that all routers in the same 'Area' have a complete topology of that 'Area' and then use this information when routing traffic, traffic will then traverse the 'Area'/network without creating loops and will garentee the best (loop-free) route.
Take a look at the following link for more detail how the SPF algorithm works and how it populates the routing table with the best 'loop-free' routes:
http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t5
Cheers,
Liam
01-12-2014 10:04 AM
Like Richard and Liam said OSPF is a link state protocol and exchanges LSAs within an area to build a SPF tree ensuring that there are no loops within the area.
Between areas Area Border Routers (ABRs) send summary LSAs hiding the internal topology of the area. This is actually distance vector behavior. Due to this there needs to be some loop prevention mechanism.
Read this excellent paper by Petr Lapukhov for the full explanation:
http://blog.ine.com/wp-content/uploads/2011/01/Loop-Prevention-in-OSPF.pdf
Daniel Dib
CCIE #37149
Please rate helpful posts.
07-03-2022 03:37 AM
07-04-2022 01:51 AM
I do not understand your question. Full adjacency is based on relationships within a particular network segment/subnet. Every OSPF device on a particular network segment/subnet has full adjacency with DR and with BDR and DR or BDR has full adjacency with all OSPF devices on that network segment/subnet. Area 0 is likely to have several network segments/subnets. Full adjacency is meaningful for the local subnet, but not for other subnets within area 0.
The ABR receives LSAs describing the subnets within area 0 and runs the Dijkstra algorithm to produce a loop free path to destinations within area 0. Whether adjacency is full or not is not part of that calculation.
If this does not resolve your question then please clarify what it is that you are asking.
10-30-2022 02:09 PM
I am not sure what does this mean:
ABR will accept and use summary LSA over non area 0 if if it does not have full adjacency in area 0. ?
08-25-2020 12:15 PM
07-04-2022 07:54 AM
Hello,
As I skimmed I didn't see anyone else mention it specifically, but among the many good suggestions OSPF also avoids loops by its Router ID (RID). If it sees its own RID sending a LSA/LSU then it will discard it similar to BGP same AS. (there are special cases where this is not true but for the most part is).
Hope that helps
-David
03-04-2025 11:15 PM
Hi David,
What are the special cases ??
07-04-2022 11:09 AM
"How OSPF and RIP avoid Loop??? Please Explain in details."
In details, eh?
If you want great authoritative details, you might start by examining the corresponding RFCs.
RIP: https://datatracker.ietf.org/doc/html/rfc1058
OSPFv2: https://datatracker.ietf.org/doc/html/rfc2328
Wiki articles are also often worth reviewing too.
RIP: https://en.wikipedia.org/wiki/Routing_Information_Protocol
OSPF: https://en.wikipedia.org/wiki/Open_Shortest_Path_First
Wiki also has articles that further describe the core algorithms used by IGPs like RIP and OSPF.
RIP: https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm
OSPF: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
Much more can be found, on the Internet, following references possibly provided by the above or by using a search engine, against terminology found in the above.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide