OSPF ABR and Loop Prevention

OSPF, by design, prevents routing loops when exchanging summary (Type 3) LSAs. This is done using several principles when exchanging inter-area routes between the backbone area and other areas.

In OSPF, the backbone area is used for exchanging inter-area routes between all other areas. Since there is no common topology shared among different areas, loop prevention is based on distance-vector principles.

There are three main rules of generating and receiving inter-area routes (type-3 LSAs) in OSPF that prevent control-plane routing loops:

  1. Area Border Router (ABR) is a router that, by definition, has at least one interface in Area 0 and this interface is not in a down state. ABRs will set the B (border) bit in their router LSAs to signal other routers in the same area of their ABR status. Only ABRs are allowed to generate summary LSAs and inject them in the attached areas.
  2. ABRs expect summary LSAs from Area 0 only. This means there should be at least one adjacency in a FULL state built over an Area 0 interface. If an ABR has such an adjacency, it will ignore summary-LSAs received over non-backbone areas. These LSAs will be installed in the database, but will not be used for SPF calculations.
  3. ABRs will accept and use summary-LSAs learned over non-backbone area they do not have a FULL adjacency built over an Area 0 interface. It is safe to do so, since the ABR will not be able to flood the summary back into Area 0 creating routing loops.

https://cdn2.hubspot.net/hubfs/3985396/Blog/Loop-Prevention-in-OSPF.pdf