Configure multiarea OSPF

OSPF uses areas to simplify administration and optimize traffic and resource utilization. An area is simply a logical grouping of contiguous networks and routers. All routers in the same area have the same topology table and don’t know about routers in the other areas. In this lesson we will describe how you can configure a multiarea OSPF.

Consider the following multiarea OSPF network:

multiarea ospf explained

In the network we have three routers and two hosts. We need to configure OSPF with routers in two areas – area 0 and 1. R2 should connect two areas, which will make him an ABR (Area Border Router).

Here is the OSPF configuration on R1:

ospf configuration areas 1

We have used the router-id 1.1.1.1 command to manually specify the router ID that R1 will use.

 

Configuration of R3 looks similar, but with the difference in area number, since R3 is in area 1:

ospf configuration areas 2

What about R2? Because R2 is an ABR, we need to establish neighbor relationship with both R1 and R3. To do that, we need to specify different area ID for each neighbor relationship, 0 for R1 and 1 for R2. We can do that using the following commands:

ospf configuration areas 3

R2 should establish a neighbor relationship with both R1 and R3. We can verify that by using the show ip ospf neighbor command on R2:

show ip ospf neighbor command

To verify if directly connected subnets are really advertised into the different area, we can use the show ip route ospf command on both R1 and R3:

show ip route ospf 1

show ip route ospf 2

The characters IA in front of the routes indicate that these routes reside in a different area.

 

Since they reside in different areas, R1 and R3 will never establish a neighbor relationship.
Geek University 2022