03 · multi-area
Multi-Area OSPF Visualization
Three areas with three routers each, joined by two area border routers that hold a separate database per area. Set each non-backbone area to normal, stub, totally stub or NSSA to see which LSAs the border router filters and where a default route appears instead. Change the backbone speeds to alter inter-area cost, and pick a viewpoint router to read its routing table.
- in the viewpoint's SPF tree
- known, not chosen
- ABR
Viewpoint
A1 · area 1
Area type
Normal
Routes installed
7
Externals visible
2
Routing table · A1
Codes: O intra-area, O IA inter-area, O E2 external type 2, O N2 NSSA external.
| Prefix | Code | Cost | Next hop | How it got here |
|---|---|---|---|---|
| 10.1.1.0/24 | O | 1 | connected | directly attached |
| 10.1.2.0/24 | O | 2 | A2 | A1 → A2 |
| 10.0.9.0/24 | O IA | 5 | ABR1 | A1 → ABR1 → BB1 → ABR2 → BB2 |
| 10.2.1.0/24 | O IA | 5 | ABR1 | A1 → ABR1 → BB1 → ABR2 → C1 |
| 10.2.2.0/24 | O IA | 5 | ABR1 | A1 → ABR1 → BB1 → ABR2 → C2 |
| 192.0.2.0/24 | O E2 | 20 (E2, internal cost 4 ignored) | ABR1 | type 5 from C2 · needs the type 4 |
| 203.0.113.0/24 | O E2 | 20 (E2, internal cost 2 ignored) | ABR1 | type 5 from BB1 · needs the type 4 |
Slide sideways to see the whole table.
Which LSAs survive in each area
This is the entire point of area types.
| Area | Type | T1 | T2 | T3 | T4 | T5 | T7 |
|---|---|---|---|---|---|---|---|
| Area 1 | Normal | yes | none (all p2p) | yes | yes | yes | no |
| Area 0 | Normal | yes | yes | yes | yes | yes | no |
| Area 2 | Normal | yes | none (all p2p) | yes | yes | yes | no |
Slide sideways to see the whole table.
Key point
Watch the table above shrink as you walk area 1 from normal → stub → totally stub. Then look at A1's routing table: fewer entries, but a 0.0.0.0/0 appears. Reachability is unchanged; precision is not.
Set area 2 to NSSA and 192.0.2.0/24 comes back as an N2 inside area 2 and as an E2 everywhere else — the same prefix, two LSA types, two codes.
Configuration
Every router in the area needs the stub or NSSA command.
ABR1(config)# router ospf 1 ABR1(config-ospf-1)# area 1 ABR1(config-ospf-1)# area 0 ABR1(config)# interface 1/1/1 ABR1(config-if)# ip ospf 1 area 1 ABR1(config)# interface 1/1/2 ABR1(config-if)# ip ospf 1 area 0 ABR1(config-ospf-1)# ! area 1 left as a normal area ! ABR2(config-ospf-1)# ! area 2 left as a normal area C2(config-ospf-1)# redistribute static ! rejected in a stub area
The rules to remember
Key point
Area 0 must be contiguous and every area must touch it. Traffic between area 1 and area 2 always transits the backbone; if a non-backbone area is the only path between two halves of area 0, you need a virtual link.
Inter-area cost accumulates. A1's cost to 10.2.1.0/24 is A1→ABR1, plus ABR1's advertised cost, plus the stub link — change a backbone speed and only the middle term moves.
Stub is a per-area agreement. One router that forgets the stub command never forms an adjacency: the E bit in the hello does not match.