Sub topic 10
Areas and the Backbone (Area 0)
This chapter assumes you know how OSPF routers build a link-state database (LSDB) and run SPF, and that you can read an IPv4 routing table. It covers why OSPF splits a network into areas and what rules the backbone imposes.
Why areas exist
In a single area, every router holds the same LSDB and reruns SPF whenever any link anywhere changes. On a large network this costs memory and CPU, and a flapping link far away disturbs every router.
An area is a group of routers and links that share one LSDB. Detailed topology stays inside the area. Routers outside see only summarized reachability. A topology change in one area triggers SPF only for routers in that area.
The backbone rule
Area 0 is the backbone. OSPF requires every other area to attach to it, directly or through a virtual link. Area 0 is the transit point. Inter-area routing information passes through it, and non-backbone areas do not exchange routes with each other directly.
This hub-and-spoke shape keeps inter-area routing loop-free. A router learns about another area's prefixes only from the backbone, as a prefix and a cost, so it can't form a loop based on topology it can't see.
Area IDs and interfaces
An area ID is a 32-bit number. You can write it as a decimal (0, 1) or in dotted form (0.0.0.0, 0.0.0.1). Both notations mean the same thing. Area 0 and 0.0.0.0 are the same area.
An interface belongs to exactly one area. A router with interfaces in two or more areas keeps a separate LSDB for each one. Neighbors must agree on the area ID, or the Hello packets are rejected and no adjacency forms.
interface GigabitEthernet0/0
ip ospf 1 area 0
!
interface GigabitEthernet0/1
ip ospf 1 area 1In this IOS-style fragment, the router connects Area 0 and Area 1. That makes it an area border router, covered in the next chapter.
How routes cross areas
Inside an area, routers exchange full topology. At the area boundary, the border router stops passing that detail. It advertises each prefix it knows into the neighboring area as a summary with a cost. A router in Area 1 knows a prefix in Area 2 is reachable at some total cost through the border router. It does not know which links lie beyond that.
Common problems
| Symptom | Likely cause |
|---|---|
| Neighbors stay down between two routers | The interfaces are configured in different areas |
| An area has no routes from other areas | The area has no connection to Area 0 |
| A discontiguous backbone | Area 0 is split into pieces, so inter-area routes don't cross the gap |
A split backbone is a design fault. A virtual link can repair it temporarily, but it's better to add a real link to Area 0.
Exercise
Router A has an interface in Area 1. Router B is on the same segment, and its interface is in Area 2. Will they become neighbors, and why?
Show answer
No. Hello packets carry the area ID, and a router discards a Hello whose area ID doesn't match the receiving interface's area. No adjacency forms until both interfaces are in the same area.
Exercise
Area 1 connects to Area 2 through a direct link between two routers, and neither area has a link to Area 0. Will hosts in Area 1 reach hosts in Area 2 using OSPF?
Show answer
No. Inter-area routes pass only through the backbone. Each area must attach to Area 0, so these routers need a connection to Area 0 (or a virtual link through a transit area).