A real-life situation
A company's single-area OSPF network has grown to 300 routers across three sites. Every flap of a branch link makes all 300 routers rerun SPF, the link-state database is huge, and the routing tables list thousands of small subnets. The fix is not a different protocol but a different shape: one backbone area for the core and one area per site, with the routers at the edges passing only summaries between them.
What multi-area OSPF is
- 1. Area 1: R1 is an internal router. R1–R2 (10.1.12.0/30) is in area 1. R1 owns 172.16.0.0/24 to 172.16.3.0/24.
- 2. Area 0, the backbone: R2–R3 and R3–R4. R3 is a backbone (and internal) router; R2 and R4 are ABRs with one foot in area 0.
- 3. Area 2: R4–R5 (10.2.45.0/30). R5 also redistributes the partner's EIGRP routes, which makes it an ASBR.
| Role | Definition | In the diagram |
|---|---|---|
| Internal router | Every interface in the same area | R1 (area 1), R3 (area 0), R5 (area 2) |
| Backbone router | At least one interface in area 0 | R2, R3, R4 |
| ABR | Interfaces in area 0 and another area; keeps one LSDB per area | R2, R4 |
| ASBR | Injects external routes into OSPF | R5 |
A router can have several roles: R3 is internal and backbone; R5 is internal and an ASBR.
Why it works this way
- Smaller databases. Type 1 and 2 LSAs stay in their area. R1 never stores R3's or R5's router LSAs, only type 3 summaries.
- Contained SPF. A link flap in area 2 makes area 2's routers rerun SPF. Elsewhere, at most a summary changes, which is a quick update, not a full SPF.
- Summarisation. An ABR can replace many prefixes with one, so a flap inside the range causes no change outside the area at all.
The area 0 rules
- Every area must touch area 0 through an ABR.
- Area 0 must be contiguous: one connected piece.
- Routes between two non-backbone areas always go through area 0.
Inside an area OSPF is link-state; between areas the ABRs exchange "network X at cost Y", which is distance-vector behaviour. Forcing everything through one backbone is what keeps that loop-free.
How to configure it on Cisco IOS
An ABR is simply a router with interfaces in two areas:
router ospf 1
router-id 2.2.2.2
network 10.1.12.0 0.0.0.3 area 1
network 10.0.23.0 0.0.0.3 area 0R2. Gi0/1 towards R1 is in area 1, Gi0/0 towards R3 in area 0. Both ends of every link must agree on the area.
Inter-area summarisation
router ospf 1
area 1 range 172.16.0.0 255.255.252.0On R2, the ABR for area 1. Instead of four type 3 LSAs for 172.16.0.0/24 to 172.16.3.0/24, R2 advertises one for 172.16.0.0/22 into area 0. The range must be configured on the ABR of the area the networks are in.
External routes are summarised on the ASBR instead, with summary-address, covered in External routes.
Virtual links
Suppose a new area 3 is attached only to R5. It doesn't touch area 0, which breaks rule 1. A virtual link through area 2 makes R5 act as if it had an interface in area 0:
! R4
router ospf 1
area 2 virtual-link 5.5.5.5
! R5
router ospf 1
area 2 virtual-link 4.4.4.4Both ends name the transit area (2) and the other end's router ID. The transit area can't be a stub area. A virtual link is part of area 0, so it also needs area 0's authentication if area 0 uses any.
How to verify it
R2#show ip ospf | include area|areas It is an area border router Number of areas in this router is 2. 2 normal 0 stub 0 nssa
R2#show ip route ospf | include 172.16 172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks O 172.16.0.0/22 is a summary, 00:01:05, Null0 O 172.16.0.0/24 [110/2] via 10.1.12.1, 00:20:13, GigabitEthernet0/1 O 172.16.1.0/24 [110/2] via 10.1.12.1, 00:20:13, GigabitEthernet0/1 O 172.16.2.0/24 [110/2] via 10.1.12.1, 00:20:13, GigabitEthernet0/1 O 172.16.3.0/24 [110/2] via 10.1.12.1, 00:20:13, GigabitEthernet0/1
R3#show ip route ospf | include 172.16 O IA 172.16.0.0/22 [110/3] via 10.0.23.1, 00:01:05, GigabitEthernet0/0
show ip ospf border-routersLists the ABRs and ASBRs this router knows and how it reaches them.
show ip ospf virtual-linksState of each virtual link, for example: Virtual Link OSPF_VL0 to router 5.5.5.5 is up.
What goes wrong and how to troubleshoot it
- An area has no routes to the rest of the network. It doesn't touch area 0, or its ABR has no working adjacency in area 0.
- Two parts of area 0 can't reach each other although there is a path through another area: area 0 is split. Fix the topology, or bridge it with a virtual link.
- The summary is not advertised.
area rangewas configured on a router that isn't the ABR for that area, or none of the component networks exists. - An area mismatch log on a link: the two ends of a link put it in different areas.
Common mistakes
- Thinking areas are assigned per router. They are assigned per interface; the link is in one area.
- Connecting two non-backbone areas directly and expecting routes to flow between them.
- Using
area rangeon the ASBR for external routes (that issummary-address). - Building a virtual link through a stub area.
Key takeaways
- Areas keep LSDBs small and contain SPF; ABRs pass type 3 summaries between areas.
- Roles: internal, backbone, ABR (area 0 + another), ASBR (injects external routes).
- Every area touches area 0; area 0 is contiguous; inter-area traffic crosses area 0.
area X rangeon the ABR summarises an area; it adds a Null0 discard route.- Virtual links repair a missing or split backbone through a non-stub transit area.
Check yourself
R4 has interfaces in area 0 and area 2. What is it?
Where do you configure area 1 range 172.16.0.0 255.255.252.0?
After area 1 range, R2 shows O 172.16.0.0/22 is a summary, Null0. Why?