Sub topic 10
Areas and the Backbone (Area 0)
Prerequisites
This chapter assumes you know the Hello protocol, neighbor states, and how LSAs are flooded into the link-state database (LSDB). It also assumes you know that each router runs SPF over its LSDB. Router roles (ABR, ASBR) and LSA types 3, 4, and 5 get full treatment in the next chapters. Here they appear only where needed to explain why areas exist.
Why Areas Exist
In a single OSPF area, every router holds an identical LSDB. That is simple, but it scales poorly for three reasons:
- SPF runs more often. Any link flap anywhere in the network floods an LSA to every router, and every router reruns SPF.
- The LSDB grows. Every router stores every link and every router in the network.
- The routing table cannot be summarized. Every router sees every prefix at full detail.
An area is a set of routers and links that share one LSDB. Detailed topology information stays inside the area. Routers outside the area see only summarized reachability. A link flap in one area triggers SPF only for routers in that area.
Areas are identified by a 32-bit number. You can write it as a decimal (1) or in dotted form (0.0.0.1). Both forms mean the same area.
The Backbone: Area 0
Area 0 (also 0.0.0.0) is the backbone. OSPF requires it for any multi-area design. The rule is:
- Every non-backbone area must connect to area 0, usually through a router that has interfaces in both areas.
- Traffic between two non-backbone areas must pass through area 0.
This gives OSPF a two-level hierarchy, shown below.
The hub-and-spoke shape is deliberate. Between areas, OSPF behaves like a distance-vector protocol. An ABR does not pass topology across the boundary. It advertises "I can reach prefix P at cost C." If areas could connect in a ring, those advertisements could loop. Forcing all inter-area paths through area 0 removes that risk.
What Crosses an Area Boundary
Inside an area, routers exchange Type 1 (router) and Type 2 (network) LSAs, which describe topology. A router that sits in two areas keeps a separate LSDB for each area. It runs a separate SPF per area. Then it advertises the results into the other area as Type 3 (summary) LSAs, which carry a prefix and a cost but no topology.
| Property | Inside an area | Between areas |
|---|---|---|
| What is shared | Full topology (Type 1, 2 LSAs) | Prefix and cost (Type 3 LSAs) |
| Routing logic | Link-state (SPF) | Distance-vector style |
| Effect of a link flap | SPF on every router in the area | Usually only a Type 3 update, with no full SPF outside |
| Route type in table | Intra-area (`O`) | Inter-area (`O IA`) |
A topology change inside area 1 triggers SPF in area 1. Routers in area 2 see only that a prefix is gone or its cost changed. If the prefix is simply reachable at the same cost, they see nothing at all.
A Worked Example
Consider three routers in a line. R1 is in area 1. R2 touches areas 1 and 0. R3 is in area 0.
R2 configuration (IOS-style):
router ospf 1
router-id 2.2.2.2
!
interface GigabitEthernet0/0
ip address 10.0.12.2 255.255.255.252
ip ospf 1 area 1
!
interface GigabitEthernet0/1
ip address 10.0.23.2 255.255.255.252
ip ospf 1 area 0R2 now has one interface in each area. That makes it an Area Border Router (ABR), the router role covered in the next chapter. It holds two LSDBs. On R3, show ip route ospf lists the R1-R2 link as an inter-area route:
O IA 10.0.12.0/30 [110/2] via 10.0.23.2, GigabitEthernet0/1R3 never sees R1's router LSA. It knows only that R2 advertised 10.0.12.0/30 with a cost. Its metric is that advertised cost plus the cost of reaching R2.
Area Design Rules
- Area membership is per interface, not per router. The interface decides which area a link belongs to. Both ends of a link must agree on the area ID, or the Hello is rejected and no adjacency forms.
- Area 0 must be contiguous. If area 0 is split into two pieces, routers in one piece cannot learn inter-area routes originated in the other. The routing table may be incomplete with no error message.
- Do not make areas too small or too large. Common guidance is a few dozen to a few hundred routers per area. Real limits depend on router CPU, link stability, and LSDB size, so treat these figures as rough.
- A single area is fine for small networks. Many networks need only area 0. Add areas when SPF load or LSDB size becomes a measurable problem, not before.
When the Backbone Is Broken
Sometimes a new area cannot be physically connected to area 0. A virtual link is a tunnel through a transit area that logically extends area 0. You configure it on both ABRs, naming the other side's router ID:
router ospf 1
area 1 virtual-link 3.3.3.3The same command, pointing at the other router ID, goes on the far ABR. The transit area (here, area 1) cannot be a stub area. Virtual links are a workaround for temporary migrations or accidental splits. They add fragility, so avoid them in permanent designs.
Common Mistakes
- Mismatched area IDs on a link. Adjacency never leaves Down or Init.
show ip ospf interfaceon both ends shows the area. - Putting two non-backbone areas on one ABR with no area 0 interface. The router is not an ABR for the backbone. Inter-area routes between the two areas are not exchanged.
- Using area 0 as an afterthought. Renumbering later is painful. Plan which links belong to the backbone before deploying.
Exercise
Router RX has interface Gi0/0 in area 1 and interface Gi0/1 in area 2. No interface is in area 0. Will hosts in area 1 reach hosts in area 2 through RX using OSPF-learned routes? Explain.
Show answer
No. OSPF requires inter-area traffic to pass through area 0, and RX has no area 0 interface, so it does not act as a backbone ABR and does not exchange Type 3 summaries between the two areas. The areas need a path via area 0 (or a virtual link) before inter-area routes appear.
Exercise
R1 (area 1) and R2 (area 0) share a link, and both interfaces are configured with ip ospf 1 area 1 on R1 and ip ospf 1 area 0 on R2. What happens to the adjacency, and why?
Show answer
It does not form. The Hello packet carries the area ID, and a router discards a Hello whose area ID does not match the receiving interface's area. Both ends of the link must be in the same area.