Course contents

Module 6: Advanced OSPFLesson 6.2 (2 of 8 in this module)23 of 29 in the OSPF course

Beyond CCNA (optional). This topic is not on the CCNA 200-301 exam. It is useful at work and in later study; skip it if you are preparing for the exam. (The exam covers single-area OSPFv2 only (3.4).)

Multi-area OSPF design

Does every branch router need to know every cable in every other site? Let's keep the local detail where it helps and pass useful reachability information between areas.

Advanced · 13 min read

When a local change creates work for distant routers

A company's OSPF network has grown across several sites. In one area, routers share detailed connection records, so a branch link change can trigger topology processing elsewhere in that area. The useful question is not whether a particular router count is too large. It is whether flooding, database size or route calculation is becoming a problem, and whether the sites have clear boundaries for summarisation.

An area is a group of OSPF interfaces that shares detailed topology information. A link-state advertisement (LSA) is a stored record describing links or reachability. The link-state database (LSDB) holds those records. Shortest path first (SPF) is the calculation a router uses to find paths through its area.

Multi-area OSPF gives each area its own detailed topology. Area 0 is the backbone joining the other areas. An area border router (ABR) participates in the backbone and another area, calculates reachability and advertises eligible networks between them.

Areas, ABRs and the backbone

Our small example keeps five routers so you can follow the boundaries. R1's user LAN is 172.16.1.0/24; three additional test networks complete 172.16.0.0/24 through 172.16.3.0/24. Traffic to the partner network 10.50.0.0/16 crosses R2, R3, R4 and R5. R5 learns that external network through EIGRP (Enhanced Interior Gateway Routing Protocol), a different routing protocol, and imports it into OSPF.

Importing routes from another source is redistribution. A router performing it is an autonomous system boundary router (ASBR). ABR means a boundary between OSPF areas; ASBR means a boundary between OSPF and another route source. A router can perform both jobs.

area 1area 0area 0area 2LAN 1Subnet 172.16.1.0/24R1RID 1.1.1.1R2 (ABR)RID 2.2.2.2R3RID 3.3.3.3R4 (ABR)RID 4.4.4.4R5 (ASBR)RID 5.5.5.5Partner (EIGRP)Subnet 10.50.0.0/16

Device key: LAN 1 (network / site) · R1, R2 (ABR), R3, R4 (ABR), R5 (ASBR) (router) · Partner (EIGRP) (network / service)

Lines show the example’s network connections. Thick links: uplinks/WAN, as labelled. Read the numbered steps for traffic direction and changes.

Reading the addresses

IP labels identify interfaces or destinations. Subnet labels identify networks; /n is the prefix length. A router ID (RID) identifies a routing process and need not be a reachable interface.

An IP address alone is not a URL. A web URL includes a scheme such as https://; an address on a router or printer does not imply a website.

  • LAN 1: Subnet 172.16.1.0/24
  • R1: RID 1.1.1.1
  • R2 (ABR): RID 2.2.2.2
  • R3: RID 3.3.3.3
  • R4 (ABR): RID 4.4.4.4
  • R5 (ASBR): RID 5.5.5.5
  • Partner (EIGRP): Subnet 10.50.0.0/16
  1. 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. 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. 3. Area 2: R4–R5 (10.2.45.0/30). R5 also redistributes the partner's EIGRP routes, which makes it an ASBR.
R2 and R4 connect normal areas to area 0. R5 imports external partner reachability. Area labels describe OSPF membership; arrows show which part of the topology each step discusses.

The point-to-point router links are R1–R2 10.1.12.0/30, R2–R3 10.0.23.0/30, R3–R4 10.0.34.0/30 and R4–R5 10.2.45.0/30. On each link the left router uses .1 and the right router .2. Router IDs run from 1.1.1.1 to 5.5.5.5; these identify OSPF routers, not the address of every port.

Areas, ABRs and the backbone
Areas, ABRs and the backboneRole; Definition; In the diagram. Internal router: All OSPF interfaces 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 R5RoleDefinitionIn the diagramInternal routerAll OSPF interfaces in the same areaR1 (area 1), R3 (area 0), R5 (area 2)Backbone routerAt least one interface in area 0R2, R3, R4ABRInterfaces in area 0 and anotherarea; keeps one LSDB per areaR2, R4ASBRInjects external routes into OSPFR5

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Read each row across: the left box names the item, the others describe it.

A router can have several roles: R3 is internal and backbone; R5 is internal and an ASBR.

What splitting into areas buys you

  • Less remote topology detail. Type 1 router records and type 2 shared-network records stay in their area. R1 learns other areas' networks through type 3 summary LSAs. It can also hold external-route records in a normal area.
  • Smaller scope for topology calculation. Area 2's detailed link change is not flooded as a router LSA into area 1. A changed inter-area cost, lost prefix or external path can still require processing elsewhere. Areas reduce work; they do not guarantee that every remote change is invisible.
  • Summarisation. An ABR can replace several prefixes with one range. If at least one qualifying component remains and the advertised summary cost is unchanged, losing another component need not change that summary outside the area.

Three rules about area 0

  1. Every area must touch area 0 through an ABR.
  2. Area 0 must be contiguous: one connected piece.
  3. Use the backbone hierarchy for routes between non-backbone areas.

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.

Three benefits of areas
Three benefits of areasAreas limit the scope of detail.Why split into areasSmaller LSDBdetail stays insideeach areaLess SPF workchanges stay localSummariesone route for manyprefixes

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Benefits depend on a sensible address plan.

Building an ABR on Cisco IOS

These are Cisco IOS/IOS XE style examples, starting in global configuration mode. Addresses, interface state and basic connectivity must already work. R2 Gi0/1 faces R1 in area 1; R2 Gi0/0 faces R3 in area 0. Both neighbouring ends of a link must agree on its area. No separate abr command is needed.

Building the ABR
Building the ABRPut each link in its area, then add the range.Link to R1area 1Link to R3area 0Rangearea 1 range ...Verifyshow ip ospf

On small screens, swipe sideways or focus the diagram and use the arrow keys.

An ABR has interfaces in two areas, including area 0.
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 0

R2. 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

The four /24 networks form the contiguous range 172.16.0.0/22, mask 255.255.252.0. The 1 in area 1 range names their source area. It does not put the summary in area 1 or change the original interface masks.

router ospf 1 area 1 range 172.16.0.0 255.255.252.0

On 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.

Summarisation only pays off when addressing was planned per area. A site that borrowed a subnet from another site's block leaves a hole the summary can't cover cleanly, and that is usually what stops a tidy area range in an older network.

Virtual links: patching an area that misses area 0

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.4

Separate extension to this normal-area topology. Both ends name transit area 2 and the peer router ID. The transit area must have working intra-area reachability and cannot be stub or NSSA. Configure any required virtual-link authentication explicitly at both ends.

Checking the ABR and its summary

The following metrics assume outgoing cost 1 on every participating interface, including R1's LAN and test networks. R1's loopbacks use point-to-point OSPF type so their configured /24 masks are advertised. With default loopback behaviour you would instead need to account for /32 host routes.

What to check on the ABR
What to check on the ABRThe router, the route and the summary each have a command.show ip ospfSays it is an area border routershow ip route ospfSpecific routes plus the summary to Null0show ip ospf database summaryThe type 3 LSA for the range

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The discard route to Null0 is normal.
Example output · based on Cisco documentation; exact format varies by platform and software version
R2#show ip ospf | include border|normal
 It is an area border router
 Number of areas in this router is 2. 2 normal 0 stub 0 nssa
R2 knows it is an ABR and keeps two areas.
Example output · based on Cisco documentation; exact format varies by platform and software version
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
The ABR still has the four specific routes. It also installs the summary to Null0: a discard route, so packets for an unused part of 172.16.0.0/22 are dropped here instead of looping back towards a default route.
Example output · based on Cisco documentation; exact format varies by platform and software version
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
In area 0, one inter-area route replaces four.
show ip ospf border-routers

Lists the ABRs and ASBRs this router knows and how it reaches them.

show ip ospf virtual-links

State of each virtual link, for example: Virtual Link OSPF_VL0 to router 5.5.5.5 is up.

Short lab: compare the range with its components

Start with the five-router lab above and no area range. On R3, record the four /24 inter-area routes. Add the shown area 1 range on R2, then repeat the route check after convergence. R3 should learn the /22 at cost 3, while R2 retains the more specific /24 routes at cost 2.

show ip ospf database summary 172.16.0.0 show ip route 172.16.1.0

R3, privileged EXEC. Inspect the summary's /22 mask and advertising ABR, then confirm that a LAN 1 address matches the /22 through R2 at 10.0.23.1.

On R2, remove the range with no area 1 range 172.16.0.0 255.255.252.0 under process 1. Confirm R3 learns the component /24s again. Test an assigned host before and after each change; a route-table count alone does not verify delivery.

Symptoms of a broken area design

Symptoms of a broken area design
Symptoms of a broken area designThese symptoms point at the area structure.SymptomArea unreachabledoes not touch area 0Backbone splitarea 0 in two piecesMissing routesrange or area mismatch

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Compare each area with the backbone.
  • 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 range was 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.

Design mistakes with areas

Common design mistakes
Common design mistakesEach mistake has a visible symptom.Area not connected to area 0Routes missing; a virtual link is a patchNon-contiguous addressingSummaries cannot be built cleanlyMany tiny areasMore ABRs and more to manage

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Fix the design rather than layering workarounds.
  • 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 range on the ASBR for external routes (that is summary-address).
  • Building a virtual link through a stub area.

Multi-area rules to remember

Areas in five lines
  • 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).
  • Use a connected area 0 backbone with physical or valid logical connections from the other areas.
  • area X range on 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.

Test yourself on areas and ABRs

Sources: RFC 2328, areas and summary LSAs; Cisco areas and virtual links; Cisco area range command reference. Outputs are illustrative, not captures from a tested router image.

Predict · scenario 1

R4 has interfaces in area 0 and area 2. What is it?

Predict · scenario 2

Where do you configure area 1 range 172.16.0.0 255.255.252.0?

Predict · scenario 3

After area 1 range, R2 shows O 172.16.0.0/22 is a summary, Null0. Why?

FAQ

How many routers should an area have?
There is no universal safe number. Router capability, topology, link stability and convergence requirements all matter. Consider areas when topology processing or database size becomes a concern, or when addressing and operational boundaries make summarisation useful. Measure the design rather than applying a fixed router-count rule.
Can two non-backbone areas talk directly?
The normal OSPF inter-area hierarchy uses area 0 between non-backbone areas. Merely adding a router between areas 1 and 2 does not replace a working backbone connection. Logical backbone links and more advanced transit-area path handling add detail, so check the complete area design instead of treating any physical cable as an inter-area shortcut.
Is a virtual link good design?
It is a repair, not a design. Use it to connect an area during a merger or to heal a split backbone, then fix the physical design so every area touches area 0 directly.