Tuesday, August 4, 2009

Multi Area OSPF - Loop avoidance

The favorite OSPF question that pops up in most of the network interview is “Why does Multi-Area OSPF scenario requires all Inter-Area traffic to traverse over backbone area?”

The simple answer is to avoid routing loop. The detailed answer is below,

In OSPF Multi Area scenario, all OSPF routers will have full view of topology only within the area and have to rely on Area Border Router for information outside the area. This makes OSPF to behave like Distance Vector protocol. As it relies on information from neighbor and doesn’t have entire view of the topology outside the area, Inter-Area routes are subject to routing loop.

The above vulnerability results in need of some mechanism to avoid any Inter-Area routing loop.

RFC 2328 defines the way how Inter-Area routes will be calculated to avoid any routing loops.

As per RFC 2328, ABR definition and Inter-Area routes calculation are defined as below,

Area Border Router - Any router running OSPF attached to multiple areas is known as Area Border Router (ABR). An ABR will have topological information of all attached areas and will run SPF for each area. (Section 3.3)

Inter-Area Route Calculation - Inter-Area routes will be calculated by examining Summary LSAs (Type-3). If the OSPF router is attached to single area, it will examine Summary LSA of that area and if the OSPF router is connected to multi area (ABR), it will examine the backbone Summary LSAs. (Section 16.2)

On OSPF Multi-Area scenario, an ABR will perform Inter-Area route calculation based only on backbone Summary LSAs (i.e) Type 3 LSA received from backbone Area. So all inter-area traffic will obviously traverse over backbone and thereby avoiding any routing loops.

In this topology, when the above mentioned two definitions about ABR and Inter-Area route calculation are imposed, we may end up with routing issue as below,

As per ABR definition, R3 being attached to multiple area will assume it as ABR and will send Router LSA with Border bit set and will have Type 3 LSA from Area 1 and Area 2 in its respective topology table. R4 will see both R2 and R3 as border router.

As per Inter-Area route calculation definition, R3 being an ABR needs to examine/run SPF for Summary LSA only from backbone area and not from other areas. This rule stops R3 from running SPF on Summary LSA present in Area 1 and Area 2 and so no Inter-Area routes will be installed in R3’s routing table. The situation gets worse when internal OSPF routers in Area 2 have R3 as best path to reach R2.

Cisco’s Implementation is a bit different that, an OSPF router will assume itself as ABR only when at least one attached area is backbone.

This above Cisco definition about ABR helps to avoid such routing issues. Now R3 will not consider it as ABR as it doesn’t have any of its attached area as backbone. So will run SPF on Summary-LSA from both areas and so will have inter-area routes installed in routing table.


  • R3 will not set Border bit in Router LSA,

R4#show ip ospf database router | inc Area Border

R4#show ip ospf database router | inc Area Border

Area Border Router


  • R3 will have SPF run on Summary LSAs from non-backbone and will be installed in routing table,

R3#sh ip route ospf is variably subnetted, 3 subnets, 2 masks

O [110/49] via, 00:02:34, Serial2/0.34

O IA [110/49] via, 00:02:34, Serial2/0.1

O [110/49] via, 00:02:34, Serial2/0.34 is variably subnetted, 9 subnets, 2 masks

O IA [110/49] via, 00:02:34, Serial2/0.1

O IA [110/49] via, 00:02:34, Serial2/0.13

O IA [110/49] via, 00:02:34, Serial2/0.13

O IA [110/49] via, 00:02:34, Serial2/0.1

[110/49] via, 00:02:34, Serial2/0.13

O [110/96] via, 00:02:34, Serial2/0.1


  • R4 can reach R1’s loopback interface in Area 11 via R3,


Type escape sequence to abort.

Tracing the route to

1 212 msec 76 msec 40 msec

2 84 msec * 76 msec


1 comment: