Why areas exist
A large link-state database makes changes and calculations more expensive. OSPF divides a domain into areas. Routers in an area maintain its topology; an area border router (ABR) connects areas and advertises reachability between them. Area 0 is the backbone for inter-area routing. An internal router’s OSPF interfaces belong to one area; a backbone router has at least one interface in area 0. An AS boundary router (ASBR) introduces external routes. A router can have more than one role.
In the source’s diagram (PDF page 3), R4 connects area 1 with area 0, while R8 connects area 3 with area 0. R5 is shown as an ASBR. These roles do not necessarily identify the ownership boundary of an Internet autonomous system.
An ABR maintains a separate area database for each connected area. Inter-area reachability is represented by summary LSAs, not a full copy of the other area’s topology. Aggregation can combine suitable prefixes when configured, but is not automatic and can obscure failures or attract traffic for unused space.
Costs: a small trace
The cost of an intra-area path is the sum of its outgoing interface costs. Suppose A→B costs 10, B→C costs 10, and A→C costs 30. A calculates 20 through B versus 30 directly, so it chooses B. Reverse-direction interface costs can differ. Equal-cost routes may be installed as ECMP if the platform supports and permits it.
Some platforms derive a default cost from reference bandwidth divided by interface bandwidth, subject to rounding and limits. This is an implementation convention, not a universal formula; a reference bandwidth that is too low can make different fast interfaces appear to have the same cost.
External routes
An ASBR can inject routes learned outside the OSPF domain. In the simplified case with no special forwarding-address complication, E1 compares external metric plus internal cost to the ASBR. E2 primarily compares the external metric and uses internal cost as a tie-breaker. An E1 route with external metric 20 and internal cost 5 totals 25; another with external metric 18 and internal cost 10 totals 28. With E2, external metrics 20 and 18 are compared first. When the advertised forwarding address is nonzero, internal reachability is evaluated toward that address. Path-type preferences also matter; see RFC 2328 section 16.4.
Stub and not-so-stubby areas restrict external advertisements in different ways. A default route can reduce detail but requires a working exit. A summary or default is a forwarding promise, not proof that every destination is reachable.
Broken areas and virtual links
Non-backbone areas normally connect to area 0. The slides illustrate a virtual link used to restore logical backbone connectivity through a suitable transit area. It is an explicitly configured adjacency between ABRs across a non-stub transit area, dependent on that area’s reachability; it is not an automatically configured generic tunnel or a substitute for resilient physical topology.
Reading configuration safely
The source’s Cisco examples use a local OSPF process ID, select interfaces for areas with network statements and wildcard masks, and show inspection commands. A process ID is locally significant; it need not match neighbors. A passive interface usually advertises its connected network while suppressing OSPF neighbor formation, subject to platform behavior. Syntax and defaults vary by release.
Follow one packet across two areas
In the source’s two-area example (PDF page 76), R1 has LAN 192.168.14.0/24 and serial address 192.168.15.10/30 in area 1. R2’s serial address is 192.168.15.9/30 in area 1; its LAN 192.168.10.0/24 is in area 0. R2 is the ABR. The serial network is 192.168.15.8/30: .8 is its network address, .9 and .10 are the router addresses, and .11 is broadcast under ordinary /30 rules.
R1 and R2 first form an area 1 adjacency and synchronize the area database. R2 advertises the area 0 LAN into area 1 in a type 3 summary LSA. R1 combines that information with its area 1 path to R2. Assuming the route is installed, a packet for 192.168.10.50 travels R1 → R2 → destination. The IP destination remains .10.50; .15.9 is R1’s next-hop IP. The reply requires a working return route to 192.168.14.0/24. The source database is a snapshot, not proof that every future deployment has this exact state.
Partition, aggregation and the backbone
Consider area 1 with ABR-A and ABR-B connected to area 0. If a single internal link fails but another path remains inside area 1, updated LSAs can lead the routers to the alternative after convergence. If area 1 is split into isolated pieces, ABR-A may reach a prefix that ABR-B no longer reaches within the area. A physical path through another area does not alone prove that OSPF’s inter-area rules will install a usable route through it.
Aggregation hides detail. Suppose a summary 10.10.0.0/16 covers 10.10.1.0/24 and 10.10.2.0/24. If the summary remains advertised while 10.10.1.0/24 becomes unreachable, it may attract packets for that subnet and cause loss. Whether a summary remains advertised depends on the platform and remaining component routes; do not assume every single component failure withdraws it. Accurate reachability, filters and a deliberate discard route for unused space help avoid loops, but a discard route does not restore the failed subnet.
For a backbone partition, picture ABR-A and ABR-B on disconnected pieces of area 0, while a route between them remains through area 1. A configured virtual link creates a logical area 0 adjacency between the ABRs using area 1 as its transit area. Its OSPF packets travel by unicast over the actual area 1 path. R1/R2 forwarding those packets do not thereby become area 0 routers; no cable is created. If transit reachability fails, the virtual link also fails. Both ends must be configured and the transit area must be suitable; a stub area cannot be used as transit.
Calculate external route alternatives
Assume R reaches ASBR-A at internal cost 5 and ASBR-B at cost 10. A advertises external metric 20; B advertises 18. Each alternative is eligible and has no nonzero forwarding address.
| Comparison | A | B | Choice |
|---|---|---|---|
| Both E1 | 5 + 20 = 25 | 10 + 18 = 28 | A |
| Both E2 | external 20 | external 18 | B |
| Both E2, external metrics tied at 20 | internal 5 | internal 10 | A |
In E1 the internal and external metrics add; E2 primarily compares the external metric and uses internal distance to break a tie. If the forwarding address is nonzero, calculate internal reachability to that address, not automatically to the ASBR. In OSPFv2 route preference, intra-area and inter-area routes are preferred to external routes, and E1 to E2 for otherwise relevant paths to the same destination. Do not compare an E1’s arithmetic total with an E2’s metric as if they were one common cost. The E1/E2 choice does not indicate that one route is intrinsically safe or that its external metric has the same real-world units as internal cost.
Review with answers
A link in area 1 fails, but an alternate area 1 path remains. Is a virtual link required? No. After receiving updated LSAs, OSPF can use the alternate internal path if it is valid. A virtual link addresses a particular backbone connectivity problem, not every broken link.
Why can a /16 summary still cause a black hole after one /24 fails? The summary may remain available because other covered routes exist; packets for the failed /24 can still be attracted to it. The aggregate describes a range, not proof that each address is reachable.
Two E2 routes have equal external metric; which internal cost matters? OSPF compares internal distance to the applicable forwarding address, normally the ASBR when the advertised forwarding address is zero. The lower eligible cost breaks the tie under the relevant selection rules.
Related
Lecture 05 - OSPF · OSPF Neighbors Flooding and LSAs · Hierarchical Routing and Route Redistribution