VMware ESXi and vSphere Cluster Management

Configure Multiarea OSPF

Learn to configure and verify Cisco IOS multiarea OSPF with area 0, area 1, an ABR, router IDs, neighbor adjacencies, and interarea routes.

OSPF (Open Shortest Path First) is a link-state interior gateway protocol. In a small network, all routers can participate in one OSPF area. As a routing domain grows, OSPF can divide it into multiple areas to limit topology information, reduce link-state database size, and simplify administration.

This lesson configures a three-router Cisco IOS topology with a backbone area, a non-backbone area, and an Area Border Router (ABR). It then verifies neighbor adjacencies, router IDs, area membership, and interarea routes.

OSPF Areas and Scalability

An OSPF area is a logical subdivision containing a collection of contiguous OSPF routers and networks. Routers within an area maintain a common link-state database (LSDB), which is the topology database used by OSPF to calculate routes.

Areas improve scalability because link-state information does not need to describe every link in the entire OSPF domain. A router inside one area does not maintain full topology details for every other area. Instead, it can learn summarized reachability information about networks outside its own area.

  • Area 0: The OSPF backbone area.
  • Non-backbone area: Any OSPF area other than area 0, such as area 1.
  • Internal router: A router whose OSPF-enabled interfaces all belong to one area.
  • Area Border Router (ABR): A router with OSPF interfaces in area 0 and at least one additional area.

A router becomes an ABR because its interfaces are assigned to different OSPF areas. There is no separate Cisco IOS command that turns a router into an ABR.

Backbone Area Requirements

Area 0 is the OSPF backbone. In a standard design, normal interarea traffic passes through area 0. Each non-backbone area should connect to area 0 through an ABR.

The backbone requirement affects both design and troubleshooting. An area 1 router can learn about area 0 networks through an ABR, and an area 0 router can learn about area 1 networks through the same ABR. A non-backbone area that has no valid connection to area 0 may require special OSPF techniques, which are outside this basic configuration.

Sample Multiarea Topology

The example uses R2 as the ABR. R1 is an internal router in area 0, and R3 is an internal router in area 1. R1 and R3 are not directly connected; their route exchange occurs through R2.

DeviceInterface or NetworkOSPF AreaOSPF RoleExpected Neighbor
R1G0/0: 10.0.12.1/300Internal routerR2, router ID 2.2.2.2
R1LAN: 192.168.10.0/240Internal routerNone on the LAN in this example
R2G0/0: 10.0.12.2/300ABRR1, router ID 1.1.1.1
R2G0/1: 10.0.23.1/301ABRR3, router ID 3.3.3.3
R3G0/0: 10.0.23.2/301Internal routerR2, router ID 2.2.2.2
R3LAN: 192.168.30.0/241Internal routerNone on the LAN in this example

Use the following logical layout:

192.168.10.0/24                 192.168.30.0/24
      LAN                              LAN
       |                                |
 R1 -------- R2 ---------------------- R3
     area 0       area 1
                 R2 = ABR

R1 router ID: 1.1.1.1
R2 router ID: 2.2.2.2
R3 router ID: 3.3.3.3

Area Assignment Is Per Interface

Each OSPF-enabled interface belongs to exactly one OSPF area. On R2, the interface toward R1 is assigned to area 0, while the interface toward R3 is assigned to area 1. This combination makes R2 an ABR.

Two routers form an OSPF adjacency only when they share an enabled Layer 2 or Layer 3 segment and have compatible OSPF settings, including the same area number on that shared link. Therefore, both ends of the R1-R2 transit link must use area 0, and both ends of the R2-R3 transit link must use area 1.

R1 and R3 do not become neighbors in this design. They do not share a directly connected segment, and they are separated by R2. They can still exchange routes through R2. A neighbor relationship and route reachability are different concepts.

Router IDs

An OSPF router ID is a unique 32-bit identifier, commonly written in IPv4 dotted-decimal format. It identifies the OSPF router in neighbor and LSDB information; it does not have to be an address assigned to an interface.

Manually assigning router IDs makes lab output and troubleshooting predictable. Every router ID must be unique within the OSPF domain. The OSPF process usually selects a new router ID only when the process starts, so changing the command after OSPF is already running commonly requires restarting or clearing the process.

Addressing and Interface Prerequisites

Before configuring OSPF, assign IPv4 addresses to the interfaces, ensure the addresses are in the correct subnets, and activate the interfaces. The exact interface names can differ by router model, so substitute the names used by your device.

R1 Interface Configuration

R1(config)# interface gigabitEthernet0/0
R1(config-if)# ip address 10.0.12.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface gigabitEthernet0/1
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown

R2 Interface Configuration

R2(config)# interface gigabitEthernet0/0
R2(config-if)# ip address 10.0.12.2 255.255.255.252
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)# interface gigabitEthernet0/1
R2(config-if)# ip address 10.0.23.1 255.255.255.252
R2(config-if)# no shutdown

R3 Interface Configuration

R3(config)# interface gigabitEthernet0/0
R3(config-if)# ip address 10.0.23.2 255.255.255.252
R3(config-if)# no shutdown
R3(config-if)# exit
R3(config)# interface gigabitEthernet0/1
R3(config-if)# ip address 192.168.30.1 255.255.255.0
R3(config-if)# no shutdown

Configure OSPF on the Area 0 Router

The Cisco IOS router ospf command starts or enters an OSPF process. The process ID is locally significant; it does not need to match on neighboring routers. The network command uses a wildcard mask to select interfaces whose IP addresses match the specified network. It then enables OSPF on those interfaces and assigns them to an area.

On R1, both the transit link and the local LAN belong to area 0.

R1(config)# router ospf 10
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.0.12.0 0.0.0.3 area 0
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# end

Configure OSPF on the ABR

R2 uses different area assignments for its two transit interfaces. The R1-R2 subnet is in area 0, and the R2-R3 subnet is in area 1. R2 is therefore an ABR.

R2(config)# router ospf 10
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 10.0.12.0 0.0.0.3 area 0
R2(config-router)# network 10.0.23.0 0.0.0.3 area 1
R2(config-router)# end

Configure OSPF on the Area 1 Router

R3 assigns both its transit link and its local LAN to area 1.

R3(config)# router ospf 10
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 10.0.23.0 0.0.0.3 area 1
R3(config-router)# network 192.168.30.0 0.0.0.255 area 1
R3(config-router)# end

Notice that the same transit subnet is assigned consistently on both ends: the R1-R2 subnet is area 0 on R1 and R2, while the R2-R3 subnet is area 1 on R2 and R3.

Expected Neighbor Relationships

After the interfaces are up and OSPF has converged, R2 should have two separate adjacencies: one with R1 in area 0 and one with R3 in area 1.

RouterExpected Neighbor Router IDShared AreaExpected State
R12.2.2.20FULL
R21.1.1.10FULL
R23.3.3.31FULL
R32.2.2.21FULL

On point-to-point links, a fully established adjacency normally appears as FULL/-. On multiaccess networks, the state display can include a designated router or backup designated router identifier.

Verify OSPF Neighbors

Start with the neighbor table. It confirms whether expected adjacencies exist and identifies the neighbor router ID and state.

R2# show ip ospf neighbor
R2# show ip ospf neighbor detail

On R2, the output should show router ID 1.1.1.1 on the area 0 link and router ID 3.3.3.3 on the area 1 link. A missing neighbor means the problem is usually on the shared link or its OSPF configuration, not in interarea route calculation.

Verify OSPF Process, Areas, and Interfaces

Use process and interface commands to confirm the router ID, process information, area assignments, and participating interfaces.

R1# show ip ospf
R1# show ip ospf interface brief
R1# show ip protocols
  • show ip ospf displays the process router ID and area information.
  • show ip ospf interface brief summarizes interfaces participating in OSPF and their areas.
  • show ip protocols displays routing protocol configuration, including OSPF network statements.

Verify Interarea Routes

An ABR advertises reachability between its connected OSPF areas. Once the LSDBs synchronize and routes converge, R1 should learn the R3 LAN, and R3 should learn the R1 LAN.

R1# show ip route ospf
R1# show ip route 192.168.30.0
R3# show ip route ospf
R3# show ip route 192.168.10.0

On R1, the route to 192.168.30.0/24 should be marked O IA. On R3, the route to 192.168.10.0/24 should also be marked O IA.

Route CodeRoute TypeMeaning in the Lab
OIntra-area OSPF routeThe destination was learned within the same area as the router.
O IAInterarea OSPF routeThe destination was learned from another area through an ABR.
O E1External type 1An external route redistributed into OSPF, with internal cost included.
O E2External type 2An external route redistributed into OSPF, using the external metric as the primary value.

The route code describes how the route entered the local routing table. It does not mean that R1 and R3 are direct OSPF neighbors. In this topology, the ABR is the path between the areas.

End-to-End Reachability Test

After confirming neighbor adjacencies and routing-table entries, test connectivity between hosts or router LAN interfaces. For example, from R1, ping the R3 LAN interface:

R1# ping 192.168.30.1

From R3, test the R1 LAN interface:

R3# ping 192.168.10.1

If the OSPF routes are present but host traffic fails, check host default gateways, subnet masks, interface status, and any access-control policy. Routing convergence alone does not correct an incorrectly configured host.

Common Multiarea OSPF Failures

SymptomLikely CauseVerification CommandCorrective Action
The ABR has no neighbor on one link.The link ends use different areas, the interface is not matched by a network statement, the interface is down, or OSPF parameters are incompatible.show ip ospf neighbor
show ip ospf interface brief
show ip protocols
show ip interface brief
Enable OSPF on both ends, assign the same area to the shared link, and correct interface or OSPF settings.
R1 or R3 does not learn the remote LAN.The LAN was not included in OSPF, an ABR adjacency is missing, the transit interface has the wrong area, or the LAN interface is down.show ip route ospf
show ip ospf neighbor
show running-config | section router ospf
Restore the expected adjacency and advertise the LAN in its correct area. The remote route should appear as O IA.
A manually configured router ID does not appear.The router ID was changed after the OSPF process started.show ip ospfConfirm the value and restart the OSPF process in a lab or approved maintenance window.
R1 and R3 are expected to be neighbors.They are in different areas and do not share a directly connected OSPF segment.show ip ospf neighbor
show ip route ospf
Do not expect a direct adjacency. Verify R2's separate adjacencies and interarea routes instead.

Router ID Changes

If a router ID is configured after the OSPF process is already active, verify the active value:

R2# show ip ospf

If the old value is still active, restart the OSPF process:

R2# clear ip ospf process

Confirm the prompt and understand that this clears OSPF adjacencies and temporarily removes OSPF-learned routes while the process reconverges. Then verify the new ID and neighbor relationships again.

Verification Workflow

  1. Use show ip interface brief to verify that required interfaces are addressed and up.
  2. Use show ip ospf interface brief to confirm that each intended interface participates in the correct area.
  3. Use show ip ospf to confirm the process and router ID.
  4. Use show ip ospf neighbor to confirm R2's area 0 and area 1 adjacencies.
  5. Use show ip route ospf and show ip route to confirm local and remote prefixes.
  6. Look specifically for O IA routes on routers learning prefixes from the other area.
  7. Test end-to-end reachability with ping after the routing table has converged.

Exam-Relevant Summary

  • OSPF areas limit the scope of link-state information and improve scalability.
  • Area 0 is the backbone and provides standard interarea connectivity.
  • An internal router has all OSPF-enabled interfaces in one area.
  • An ABR has interfaces in area 0 and at least one other OSPF area.
  • ABR status results from interface-to-area assignments; there is no separate ABR role command.
  • Both ends of a shared OSPF link must use the same area number to form an adjacency.
  • R1 and R3 in this example are not neighbors; R2 is their ABR.
  • O identifies an intra-area route, while O IA identifies an interarea route.
  • OSPF process IDs are locally significant on Cisco IOS, but router IDs must be unique throughout the OSPF domain.
  • Changing a running router ID commonly requires clearing or restarting the OSPF process.

For a focused reference, return to Configure Multiarea OSPF and use the verification workflow whenever you modify an area assignment.