cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Join Customer Connection to register!
5977
Views
0
Helpful
4
Replies
Sanjib Pradhan
Beginner

How OSPF avoids Loop??

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

4 REPLIES 4
Richard Burts
Hall of Fame Guru

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

HTH

Rick
cowseatsoil
Beginner

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

daniel.dib
Rising star

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.

  • ABR must have interface in area 0 and it must not be in DOWN state. Only ABR may generate summary LSA.
  • ABRs expect summary LSAs over area 0 only. Summary LSAs may not be sent over other areas.
  • ABR will accept and use summary LSA over non area 0 if if it does not have full adjacency in area 0. Doing so is safe because it can't flood them back to area 0 to create a routing loop.

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.

Daniel Dib
CCIE #37149
CCDE #20160011

Please rate helpful posts.
Paul George
Beginner

OSPF uses the SPF algorithm , since inter-area OSPF is distance vector, it is vulnerable to routing loops. It avoids loops by manipulating a loop-free topology, in which traffic from one area can only reach another area through area 0.