This question is a literal repost of the same question asked on The Cisco Support Community. Answers are unique to Stack Exchange.

Why is area 0 the backbone area in OSPF? Why must all other areas connect to it?

I have been searching for the right reason why all the areas must be connected to area 0 in OSPF. I have a small idea, but I am not clear with the whole concept.

If 2 areas aren't connected through area 0 (discontiguous), how does OSPF behaving as a link state protocol increase the possibility of routing loops?

up vote 37 down vote accepted

OSPF Backbone

Why is area 0 the backbone area in OSPF? Why must all other areas connect to it?

This is explained very well in RFC 3509, Section 1.21:

1.2 Motivation

In OSPF domains the area topology is restricted so that there must be a backbone area (area 0) and all other areas must have either physical or virtual connections to the backbone. The reason for this star-like topology is that OSPF inter-area routing uses the distance-vector approach and a strict area hierarchy permits avoidance of the "counting to infinity" problem. OSPF prevents inter-area routing loops by implementing a split-horizon mechanism, allowing ABRs to inject into the backbone only Summary-LSAs derived from the intra-area routes, and limiting ABRs' SPF calculation to consider only Summary-LSAs in the backbone area's link-state database.

OSPF is usually considered a link-state protocol. What some people miss is that OSPF uses both link-state protocol and distance-vector protocol algorithms.

  • Routes within the backbone, or a non-backbone area are computed as a link-state protocol does (ref Dijkstra's algorithm).
  • When OSPF must carry non-backbone routes through the backbone, it uses some distance-vector behavior (i.e. parts of the Bellman Ford algorithm) to propagate Type3 LSA metrics into non-backbone areas.

Simple example of OSPF's distance-vector behavior:

<-- Area 5 --><-- Area 0 --><--           Area 4           -->

     Cost 3      Cost 5        Cost 7            Cost 12

               LSA-->          LSA-->
               Type3 LSA       Type3 LSA
               {From R1}       {From R2}
               R5 cost is 3    R5 cost is 8

Consider what happens to a /32 Loopback route for R5.

  1. R5 sends a Type1 LSA containing the /32 Loopback
  2. R1 (Area 5 ABR), is connected to Area 0; it translates the Type1 LSA into a Type3 LSA with a cost of 3.
  3. R2 (Area 4 ABR) receives R1's Type3 LSA (metric 3) and changes the metric to R5's Loopback, based on R2's cost to R1. Now R2's Type3 LSA for R5 has a cost of 8. This is the distance-vector behavior I mentioned above.

Requiring all non-backbone routes to go through the backbone is a loop-prevention mechanism.

Connecting non-backbone OSPF areas at an ABR

If 2 areas aren't connected through area 0 (discontiguous), how does OSPF behaving as a link state protocol increase the possibility of routing loops?

As we saw above, OSPF uses distance-vector behavior to send routes through the Area 0 backbone. Distance-vector protocols have well-known limits, such as the count-to-infinity problem. OSPF would be vulnerable to the same issues, if we didn't have boundaries on its behavior.

1RFC 3509 describes Cisco IOS's ABR behavior

Area 0 was chosen to be the backbone, the number 0 or is just a number.

Because OSPF is link state the LSDB must be identical within an area. This is to ensure that the SPF calculation is consistent and to prevent routing loops.

If running single area OSPF any area can be used, there is no requirement to have area 0.

When running multi area OSPF, an ABR must be used. An ABR is a router with adjacency in area 0 and at least one other area.

ABRs take type 1 and 2 LSAs and announce them as type 3 summary LSAs in other areas. This is not a summarization of the prefixes, it's a summary of topological information. This is in fact distance vector behaviour.

Because other areas don't have full information about each other all inter area traffic must pass through area 0. Otherwise there could be routing loops because not having the full topology.

Due to this design OSPF does not have to run full SPF when links go up/down in other areas. This increases scalability.

  • the purpose of ospf area 0 is preventing routing loops in his ospf domain,am i correct? – Trojan Feb 18 '14 at 14:27
  • 3
    The main goal of area 0 is to provide connectivity to other areas. By making OSPF design essentially look like hub and spoke where area 0 is the hub, routing loops can be prevented. – Daniel Dib Feb 18 '14 at 15:18

From "OSPF: Anatomy of a Routing Protocol" by John Moy, who wrote much of the OSPF specification.

The exchange of routing information between areas is essentially Distance Vector. With Distance Vector, the larger number of redundant paths you have the worse the worse your convergence properties get. OSPF requires all areas to attach directly to the backbone so it limits the topology to a simple hub and spoke topology. This eliminates redundant paths and prevents it from being subjected to 'count to infinity' problems.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.