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.

AREA 1 · NORMAL(no stub command)AREA 0 · BACKBONEalways normalAREA 2 · NORMAL(no stub command)cost 1cost 1cost 1cost 11 Gbcost 64Serial T1cost 11 Gbcost 1100 Mbcost 1cost 1cost 1A11.1.1.1A21.1.1.2ABR11.1.1.9ABRBB110.0.0.20ASBRBB210.0.0.21ABR22.2.2.9ABRC12.2.2.1C22.2.2.2ASBR
Highlighted cables are A1's shortest-path tree. Click any router to move the viewpoint.
  • 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.

PrefixCodeCostNext hopHow it got here
10.1.1.0/24O1connecteddirectly attached
10.1.2.0/24O2A2A1 → A2
10.0.9.0/24O IA5ABR1A1 → ABR1 → BB1 → ABR2 → BB2
10.2.1.0/24O IA5ABR1A1 → ABR1 → BB1 → ABR2 → C1
10.2.2.0/24O IA5ABR1A1 → ABR1 → BB1 → ABR2 → C2
192.0.2.0/24O E220 (E2, internal cost 4 ignored)ABR1type 5 from C2 · needs the type 4
203.0.113.0/24O E220 (E2, internal cost 2 ignored)ABR1type 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.

AreaTypeT1T2T3T4T5T7
Area 1Normalyesnone (all p2p)yesyesyesno
Area 0Normalyesyesyesyesyesno
Area 2Normalyesnone (all p2p)yesyesyesno

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.