skip to content

In OSPF, why is a large network split into areas, and what job do backbone area 0, ABRs and ASBRs each do?

level: juniorimportance: must knowfreq 55%

answer

  1. what one flapping link touches
  2. one database per attached area
  3. hub and spokes
  4. a router with a foot in two areas
  5. where outside routes come in

basics

~20 s

OSPF areas bound LSA flooding and SPF runs, so a change in one area does not ripple through every router. Area 0 is the hub every area attaches to; ABRs join areas to it, and ASBRs inject routes learned outside OSPF.

solid answer

~50 s

Each OSPF area keeps its own link-state database: router- and network-LSAs are flooded only inside the area, so a flapping link forces a full SPF run only on that area's routers, and other areas see at most a changed summary-LSA. Inter-area routing is a star. **Area 0** (`0.0.0.0`), the backbone, is the hub, and every other area must attach to it. An **area border router (ABR)** sits in area 0 and at least one other area, runs one copy of the algorithm per area, and condenses each area into summary-LSAs for the others. An **AS boundary router (ASBR)** imports routes from outside OSPF, such as static routes or another protocol's routes, as AS-external-LSAs; it may sit in the backbone, a normal area or an NSSA, but not inside a stub area. Internal routers know only their own area's topology and reach everything else through summaries and externals.

go deeper

for a junior

Recall the one-liner: areas limit how far topology changes spread, area 0 is the hub, ABRs connect areas to it, ASBRs bring in outside routes.

for a middle

Explain that each area has its own database and SPF run, that ABRs condense areas into summaries, and why inter-area traffic always transits area 0.

for a senior

Show what a flap in one area costs the others, why the backbone must stay contiguous, and how a router outside area 0 fails to join two areas.

for a principal

Argue when splitting a network into areas is worth the loss of path precision and the design constraint of a hub every area must touch.

## What an OSPF area is OSPF (RFC 2328, Internet Standard 54) is a **link-state** protocol: routers flood descriptions of their links, every router builds the same map, and each one computes shortest paths over it. An **area** is a group of networks plus the routers that have interfaces on them. RFC 2328 gives each area its **own link-state database (LSDB)** and its own run of the shortest-path calculation: - Two routers in the same area hold identical databases **for that area**. - A router with interfaces in three areas holds **three** databases, one per area. - The topology inside an area is invisible from outside it; other areas learn only *which destinations* it holds and *at what cost*. Each interface belongs to exactly one area, so an area boundary runs **through a router**, never through the middle of a link. ## Why split at all In one flat area of 300 routers, every link change is flooded to all 300 routers and every one of them reruns SPF. Splitting into areas changes three things: | Concern | One flat area | Area 0 plus three areas | |---|---|---| | Flooding of router- and network-LSAs | All 300 routers | Only the routers of the affected area | | Full SPF run after a link flap | All 300 routers | Only the affected area's routers | | Database size on an internal router | Every router and segment in the AS | Its own area, plus one summary per destination outside it | | Effect of a change on other areas | Full recalculation | At most a changed summary-LSA, often none when a range hides the prefix | The price is that routers outside an area no longer see its inside, so they choose exits on advertised summary costs rather than on the full topology. ## Area 0 and the hub-and-spoke rule The **backbone** is area `0.0.0.0`. RFC 2328 states that it always contains every area border router, that it is responsible for distributing routing information between non-backbone areas, and that it must be contiguous. Inter-area routing is therefore a **star**: area 0 is the hub and each other area is a spoke. A packet from area 1 to area 2 takes an intra-area path to an ABR, a backbone path, then an intra-area path in area 2. Two rules keep that star loop-free: 1. An ABR advertises only **intra-area** routes into the backbone, while it advertises both intra-area and inter-area routes into its other areas. 2. A router attached to several areas computes its inter-area routes from **backbone** summary-LSAs only. A router that sits in areas 1 and 3 but has no foot in area 0 has no backbone summaries to compute from, so it cannot give area 3 routes to the rest of the network; an area that cannot reach area 0 directly needs a physical link to it or, as a repair, a virtual link. ## The four router roles RFC 2328 defines four overlapping categories: | Role | Definition | What it does | |---|---|---| | Internal router | All interfaces in one area | Runs one copy of the algorithm | | Area border router (ABR) | Attaches to more than one area | Runs one copy per area; originates summary-LSAs into each | | Backbone router | Has an interface in area 0 | Every ABR is one; a router entirely inside area 0 is too | | AS boundary router (ASBR) | Exchanges routing information with other autonomous systems | Originates AS-external-LSAs flooded through the AS (type 7 LSAs inside an NSSA) | The ASBR role is **independent** of the others: an ASBR can be internal, an ABR, or a backbone router. A router announces its roles in its own router-LSA with the **B** bit (border) and the **E** bit (external). ## A 300-router example Take a network of 300 routers split into area 0 and areas 1, 2 and 3, using `10.1.0.0/16`, `10.2.0.0/16` and `10.3.0.0/16` inside the areas: 1. Two routers join area 1 to area 0; they are its ABRs and run two SPF instances each. 2. A router in area 2 learns a partner's routes from a static configuration and redistributes them; it is an **ASBR**, and its external routes are flooded to every area that accepts them. 3. A link flap inside area 3 floods new router-LSAs inside area 3 only; areas 1 and 2 see, at most, a changed summary from area 3's ABRs. ## What areas cost - **Less precise exit choice**: an internal router picks an ABR by the cost the ABR advertises, not by the full path beyond it. - **A design constraint**: every area must touch area 0, which shapes where links and ABRs go. - **More moving parts**: area types, ranges and border routers are all extra configuration that must agree on every router. Whether a network actually needs several areas depends on its size and churn; the mechanism above is what areas buy when it does.

  • Can one OSPF router be both an ABR and an ASBR?
    Yes. RFC 2328 makes the ASBR role independent of the area roles: an ASBR may be an internal router, an ABR or a backbone router. A router that joins area 1 to area 0 and also redistributes static routes sets both the B bit and the E bit in its router-LSAs, and other routers treat it in both capacities.
  • Why does an OSPF router attached to areas 1 and 3, but not to area 0, fail to connect area 3 to the rest of the network?
    Inter-area routing works like distance vector between ABRs: each ABR advertises only intra-area routes into the backbone and computes inter-area routes from backbone summaries alone, which stops summaries looping between areas. With no backbone attachment the router has no backbone summaries, so it can pass area 1's own networks into area 3 but nothing beyond them. RFC 3509 (Informational) notes that traffic to other areas then gets dropped.
  • Does an OSPF area boundary sit on a router or on a link?
    On a router. Every interface, and so every link, belongs to exactly one area; the ABR is the router whose interfaces sit in different areas. That is why an ABR keeps one link-state database per attached area.

A postal service with district sorting offices: each district office knows its own streets in detail, and mail between districts always goes through the central hub, which knows only which district holds which postcodes.

saying these in an interview costs you the question

  • OSPF areas exist mainly to separate customers or departments for security.
  • A router in two non-backbone areas, with no backbone link, connects them to the whole network.
  • An ABR is any router that redistributes routes from another protocol.
  • Every router in a multi-area OSPF network holds the same link-state database.
  • Area 0 is just a convention; any area number can serve as the backbone.