Configure Multiarea OSPF on Cisco Routers
Learn to design, configure, verify, summarize, and troubleshoot multiarea OSPF on Cisco IOS routers with practical examples and commands.
Multiarea OSPF divides a large OSPF network into smaller logical areas. This limits how much topology information each router must process while preserving dynamic routing between all areas. This lesson covers area design, router roles, Cisco IOS configuration, verification, ABR summarization, and troubleshooting.
Why Use Multiarea OSPF?
OSPF is a link-state interior gateway protocol. Routers exchange link-state advertisements, or LSAs, to build a link-state database, or LSDB. Each router then runs the shortest path first, or SPF, algorithm against that database to calculate routes.
In a small network, one OSPF area may be sufficient. As the network grows, a single area can contain many routers, links, and LSAs. Every topology change may cause more flooding, more database processing, and more SPF calculations.
Multiarea OSPF divides the routing domain into logical areas. Each area maintains its own LSDB and runs SPF independently. Routers do not need the complete detailed topology of every other area; they receive summarized reachability information through Area Border Routers.
- Smaller LSDB scope: A router maintains detailed topology information for its own area.
- Smaller SPF scope: A change inside one area normally causes SPF work primarily within that area.
- Less LSA flooding: Many topology changes remain within the originating area instead of being flooded throughout the entire OSPF domain.
- More scalable design: Address planning and summarization can reduce the amount of interarea information.
Areas do not eliminate routing information between parts of the network. Instead, they control the level of detail exchanged between areas.
Area 0 and OSPF Backbone Requirements
Area 0, also called the backbone area, is the central area of a multiarea OSPF design. All nonbackbone areas should connect logically to area 0. Interarea traffic normally travels through the backbone.
For example, traffic from area 10 to area 20 normally follows this logical path:
Area 10 <-> Area 0 <-> Area 20
A physical connection is not always required between every nonbackbone area and every area 0 router, but the OSPF topology must provide logical backbone connectivity. An isolated area that has no valid path to area 0 cannot exchange normal interarea routes correctly.
A standard area carries normal intra-area, interarea, and permitted external routing information. OSPF also supports specialized area types such as stub, totally stubby, and NSSA areas. Those types restrict or change certain LSAs and are useful in specific designs, but standard areas are the correct starting point for learning multiarea OSPF.
OSPF Router Roles
| Role | Interface/Area Membership | Primary Function |
|---|---|---|
| Internal router | All OSPF-enabled interfaces are in one area | Maintains the LSDB and calculates routes for that area |
| Backbone router | At least one OSPF-enabled interface is in area 0 | Participates in the backbone |
| Area Border Router (ABR) | Interfaces in area 0 and at least one additional area | Maintains separate LSDBs and advertises reachability between areas |
| Autonomous System Boundary Router (ASBR) | Connects OSPF to another routing domain or route source | Injects external routes into OSPF |
A router can have more than one role. For example, an ABR is also a backbone router because it has an interface in area 0. An ABR can also be an ASBR if it redistributes routes from another routing domain.
An ABR must have OSPF-enabled interfaces in area 0 and in at least one other area. It keeps a separate LSDB for each attached area and originates interarea summary information so routers can reach networks outside their local area.
OSPF Routes and LSA Concepts
An LSA is an advertisement used by OSPF to distribute topology or reachability information. The collection of LSAs for an area forms that area's LSDB.
- Router LSAs: Describe a router's OSPF links and are generated by routers within an area.
- Network LSAs: Describe multiaccess network segments and are associated with the designated router.
- Summary LSAs: Are originated by ABRs to describe networks in one area to routers in another area.
- External LSAs: Describe routes redistributed into OSPF by an ASBR.
| Route Type | Route Code | Source | Typical Meaning |
|---|---|---|---|
| Intra-area | O | Topology within the local area | The destination is in the same OSPF area |
| Interarea | O IA | ABR summary information | The destination is in another OSPF area |
| External type 1 | O E1 | ASBR and external metric | Uses both the external metric and internal OSPF cost to the ASBR |
| External type 2 | O E2 | ASBR and external metric | Normally compares the external metric first; this is the default external route type |
In a routing table, an O route is usually learned within the same area, while an O IA route was learned from another area through an ABR. O E1 and O E2 routes came from outside OSPF through redistribution or another external route source.
Plan a Multiarea OSPF Topology
Begin with area 0 at the center of the design. Place one or more nonbackbone areas at the edge. Select an ABR wherever a router connects area 0 to another area.
R1 backbone router R2 ABR R3 area router
Area 0 LAN --- R1 --- area 0 link --- R2 --- area 10 link --- R3
|
Area 10 LAN
A three-area hub-and-spoke design can use one ABR with interfaces in area 0, area 10, and area 20. In that design, traffic between area 10 and area 20 is exchanged through area 0.
| Router | Interface | IPv4 Address/Prefix | Connected Network | OSPF Area |
|---|---|---|---|---|
| R1 | G0/0 | 10.0.0.1/30 | 10.0.0.0/30 | 0 |
| R1 | G0/1 | 192.168.1.1/24 | 192.168.1.0/24 | 0 |
| R2 (ABR) | G0/0 | 10.0.0.2/30 | 10.0.0.0/30 | 0 |
| R2 (ABR) | G0/1 | 10.0.10.1/30 | 10.0.10.0/30 | 10 |
| R2 (ABR) | G0/2 | 192.168.20.1/24 | 192.168.20.0/24 | 10 |
| R3 | G0/0 | 10.0.10.2/30 | 10.0.10.0/30 | 10 |
| R3 | G0/1 | 192.168.30.1/24 | 192.168.30.0/24 | 10 |
Use a consistent OSPF process ID and area-numbering scheme throughout the design. The process ID is locally significant on Cisco IOS; it does not have to match on neighboring routers, but using the same value makes operations easier.
Choose between two interface-selection methods:
- Network statements: Match interface addresses with a network address and wildcard mask, then assign the matching interfaces to an area.
- Interface-based configuration: Enter each interface and apply
ip ospf process-id area area-id. This is more explicit and reduces accidental interface inclusion.
Configure Multiarea OSPF with Network Statements
The Cisco IOS router ospf command starts or enters an OSPF process. A manually configured router ID provides a stable identifier for the router.
Example configuration for R1, which belongs only to area 0:
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.0.0.0 0.0.0.3 area 0
R1(config-router)# network 192.168.1.0 0.0.0.255 area 0
Example configuration for R2, the ABR between area 0 and area 10:
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 10.0.0.0 0.0.0.3 area 0
R2(config-router)# network 10.0.10.0 0.0.0.3 area 10
R2(config-router)# network 192.168.20.0 0.0.0.255 area 10
Example configuration for R3, an internal router in area 10:
R3(config)# router ospf 1
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 10.0.10.0 0.0.0.3 area 10
R3(config-router)# network 192.168.30.0 0.0.0.255 area 10
A wildcard mask is the inverse of a subnet mask. For example, a /24 mask of 255.255.255.0 becomes 0.0.0.255. A /30 mask of 255.255.255.252 becomes 0.0.0.3.
If the router ID is changed after OSPF has started, restart the OSPF process or reload the router during an approved maintenance window so the new ID is used:
R2# clear ip ospf process
Configure OSPF Directly on Interfaces
Interface-based configuration avoids broad network statements. It is useful when only selected interfaces should participate in OSPF.
R2(config)# interface gigabitEthernet0/0
R2(config-if)# ip ospf 1 area 0
R2(config)# interface gigabitEthernet0/1
R2(config-if)# ip ospf 1 area 10
R2(config)# interface gigabitEthernet0/2
R2(config-if)# ip ospf 1 area 10
Do not configure the same interface with conflicting OSPF area assignments. Verify the resulting area membership rather than assuming that a network statement matched as intended.
Use Passive Interfaces
A passive interface advertises its connected network into OSPF but does not send OSPF hello packets or form neighbor adjacencies. This is appropriate for a user-facing LAN where no OSPF neighbor should exist.
R2(config)# router ospf 1
R2(config-router)# passive-interface gigabitEthernet0/2
Use passive interfaces on LANs that connect only to hosts. Do not make a router-to-router link passive, because the routers need hello packets to establish an adjacency.
Verify Multiarea OSPF
| Command | What It Verifies | Expected Result |
|---|---|---|
show ip ospf neighbor | Neighbor relationships | Expected neighbors appear in a stable state such as FULL |
show ip ospf interface brief | Participating interfaces and areas | Each intended interface appears in the correct area |
show ip ospf | Process settings and router ID | Correct process, router ID, area count, and SPF information |
show ip ospf database | LSDB contents | Expected router, network, summary, and external LSAs are present |
show ip route ospf | OSPF-learned routes | O and O IA routes appear with valid next hops |
show ip protocols | Active routing protocols and network statements | Correct OSPF process, router ID, passive interfaces, and matched networks |
ping <remote-ip-address> | End-to-end reachability | Replies return from a network in another area |
traceroute <remote-ip-address> | Forwarding path | The path crosses the expected ABR and backbone links |
On R2, verify that the ABR has an active OSPF interface in area 0 and an active interface in area 10. On R1, the area 10 LAN should normally appear as an O IA route. On R3, the area 0 LAN should also appear as O IA.
For the three-area design, inspect routers in area 10 and area 20. Routes between those areas should be learned through the ABR and area 0, not through a direct nonbackbone shortcut.
Interarea Route Summarization at an ABR
Interarea summarization aggregates multiple contiguous prefixes from one area into a single summary route before the ABR advertises them to another area. This reduces the number of interarea routing-table entries and limits the amount of reachability information advertised across the area boundary.
Suppose area 10 contains these contiguous networks:
192.168.16.0/24
192.168.17.0/24
192.168.18.0/24
192.168.19.0/24
These four /24 networks can be summarized as 192.168.16.0/22 because the /22 covers addresses from 192.168.16.0 through 192.168.19.255. On the ABR, configure:
R2(config)# router ospf 1
R2(config-router)# area 10 range 192.168.16.0 255.255.252.0
The summary is configured under the source area, area 10. The ABR then advertises the aggregate toward other areas, including area 0, instead of advertising every component prefix individually.
Useful summaries require contiguous, correctly aligned addressing. A summary mask must cover the intended networks without accidentally including unrelated networks. Confirm that the ABR actually learns the component routes before applying the range statement.
After summarization, check the routing table on a router outside area 10. It should receive the summary route rather than separate entries for every component network. Also inspect the OSPF database to confirm the expected summary information.
Practical Example: Two-Area Validation
- Configure the interfaces and verify that every link has the correct IPv4 address, prefix length, and operational state.
- Configure R1's backbone interfaces in area 0.
- Configure R2's backbone-facing interface in area 0 and its remote-facing interfaces in area 10.
- Configure R3's transit and LAN interfaces in area 10.
- Check
show ip ospf neighboron both sides of each router-to-router link. - Check
show ip route ospffor O routes inside each area and O IA routes for the other area. - Ping a host or loopback in the remote area and use traceroute to confirm the path.
If R2 and R3 use different areas on their shared 10.0.10.0/30 link, the adjacency will not form. Correct the area assignment on one side, then wait for the neighbors to reach FULL or reset the process if necessary.
Troubleshoot Neighbor Formation
| Symptom | Likely Cause | Verification Step | Correction |
|---|---|---|---|
| No neighbor appears | Interface is down, addressing is wrong, or OSPF does not match the interface | show ip interface brief, show ip ospf interface brief | Bring the interface up, correct addressing, or fix the network statement |
| Routers share a link but do not become neighbors | Area mismatch | Compare show ip ospf interface on both ends | Assign the shared link to the same area |
| Adjacency fails or remains incomplete | Hello/dead interval, authentication, network type, or MTU mismatch | Compare interface-level OSPF output and configuration on both routers | Make the required adjacency parameters consistent |
| No hello exchange | Interface is passive or a filter blocks protocol traffic | Check passive-interface settings and interface state | Remove passive mode from router links and check connectivity |
| Unexpected interfaces participate | Overly broad network statement or wildcard mask | show ip ospf interface brief | Narrow the match or use interface-based OSPF configuration |
When an adjacency fails, compare both ends rather than checking only the local router. The area ID, IP subnet, hello interval, dead interval, authentication settings, network type, and MTU must be compatible. Also confirm that the interfaces are enabled and connected to the expected VLAN or link.
Troubleshoot Missing Interarea Routes
If a router in area 10 cannot reach a network in area 20, follow the path in stages:
- Confirm that the destination network is advertised by its originating router.
- Confirm that the ABR has an active interface in the originating area.
- Confirm that the ABR has valid area 0 connectivity.
- Confirm that the ABR is also active in the destination area or that another valid ABR advertises the route there.
- Check for the expected O IA route in the routing table.
- Inspect the ABR's LSDB and routing table for missing LSAs, incorrect summaries, or filtering.
- Test hop by hop through area 0 using ping and traceroute.
Common causes include a missing network statement, a wrong wildcard mask, an incorrectly assigned area, an ABR that is not actually connected to area 0, and a summary route that does not cover the intended prefix. Route filtering or redistribution policies can also hide reachability.
Common Multiarea OSPF Problems
| Symptom | Likely Cause | Verification Step | Correction |
|---|---|---|---|
| Nonbackbone area has no interarea routes | No logical connection to area 0 | Check ABR interfaces, neighbors, and area membership | Provide valid backbone connectivity through area 0 |
| Only some connected networks appear | Network statement does not match an interface | Compare interface addresses with wildcard matching | Correct the statement or apply OSPF directly to the interface |
| Summary hides expected networks | Wrong prefix, mask, source area, or noncontiguous addressing | Check component routes and the configured area range | Recalculate the aggregate and place it under the correct area |
| LAN network is advertised but no neighbor forms | LAN interface is passive | Review passive-interface configuration | Keep passive mode for host-only LANs; remove it from router links |
Key Exam and Operations Notes
- Area 0 is the OSPF backbone.
- An ABR has interfaces in area 0 and at least one other area.
- Each area has its own LSDB and SPF calculation scope.
- O identifies an intra-area route; O IA identifies an interarea route.
- O E1 and O E2 identify external routes; E2 is the usual default external type.
- The OSPF process ID is locally significant, but the area ID must agree across a shared link.
- A passive interface advertises its connected network but does not form OSPF adjacencies.
- ABR summarization is useful only when the summary is correctly aligned and covers contiguous address space.
- Always verify both neighbor state and route installation. A formed adjacency does not by itself prove that the desired network is reachable.
Summary
Multiarea OSPF improves scalability by limiting LSDB detail, SPF calculations, and LSA flooding to logical areas. Area 0 provides the backbone, while ABRs connect area 0 to nonbackbone areas and advertise interarea reachability. Careful addressing, precise interface matching, stable router IDs, and passive-interface controls make the configuration predictable.
Use neighbor, interface, process, database, and routing-table commands together to validate the design. When a route is missing, check the originating advertisement, ABR operation, area 0 connectivity, LSDB contents, summarization, and any filtering policies.
Related study: OSI Reference Model and Computer Network Explained.