OSPF Multi-Area Configuration Explained

OSPF uses areas to limit the routing information routers share. By default, it keeps all routers in area 0. If required, you can create additional areas. If you use more than one area, you must connect at least one router from each area to area 0. That router is known as ABR (Area Border Router).

OSPF routers can share routing information in two formats: detailed and summarized. By default, they share routing information only in the detail format. Routing updates in detailed format consumes a lot of bandwidth and needs more RAM and CPU cycles to store and process. An OSPF router needs detailed routing information only about the routes available within the area. It does not need detailed information about the routes available within another area. You can configure the ABR router to summarize the routing information before forwarding it to another OSPF area. You can summarize only the contiguous subnets.

OSPF multi-area configuration example

Create a practice LAB, as shown in the following image.

ospf multi area configuration lab

Download the practice LAB with IP configuration

We will use this LAB to practice the following.

  • How to create, design, and implement multiple OSPF areas
  • How to run a router's interfaces in different OSPF areas
  • How to summarize OSPF routes
  • How to verify OSPF multi-area configuration

Enabling OSPF routing in multi-area

We will create three OSPF areas. Since area 0 is compulsory, we will implement it first. Later, we will expand the design and add two more OSPF areas.

OSPF areas are interface-specific. You can configure a router's interfaces in different OSPF areas. This network has eight routers. R1 and R5 have four serial interfaces. We will configure OSPF area 0 on R1's serial 0/0/0 and R5's serial 0/0/0 interfaces. We will configure R1's remaining interfaces in OSPF area 1 and R5's remaining interfaces in OSPF area 2. We will configure R2, R3, and R4 in OSPF area 1 and R6, R7, and R8 in OSPF area 2.

The following image shows the layout of OSPF areas we will implement on this network.

ospf area

We need the following two commands to enable OSPF routing on a router and add interfaces to it.

Router(config)# router ospf [process_ID]
Router(config-router)# network IP_network_# [wildcard_mask] area-id [area number]

The first command enables an OSPF process under the specified process ID. We can run multiple OSPF processes on a router. OSPF uses the process-id to identify each process. The process_ID is a numeric value. It can be any number from 1 to 65,535. It is locally significant.

The second command adds interfaces to the OSPF process. It matches the given IP address with the IP address of all interfaces. If an interface's IP address matches the given IP address, it enables the OSPF process on that interface and adds that interface to the specified OSPF area.

We use the wildcard mask to match multiple interfaces with a single configuration line. A wildcard mask tells the router the part of the address it should match. It contains wild card bits. In bits, 0 is a matching bit, and 1 is an ignoring bit. For example, the mask 0.255.255.255 indicates a match in the first byte of the network number.

The area-id is the area number we want the interface to be in. It can be an integer between 0 and 4294967295.

The following commands enable OSPF routing under process ID 1 on R1, add its serial 0/0/0 interface to OSPF area 0, and the remaining interfaces to area 1.

ospf multi area configuration on abr
Router>enable
Router#configure terminal
Router(config)#router ospf 1
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 172.168.0.0 0.0.255.255 area 1
Router(config-router)#exit
Router(config)#exit
Router#

Apart from the highlighted commands, the remaining commands are used only to enter and exit the relevant configuration mode.

Let us understand the highlighted commands.

Router(config)#router ospf 1 This command enables an OSPF process, sets its ID to 1, and enters ospf process configuration mode.
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0 This command checks the IP configuration of all interfaces to add the interface having the network number 192.168.1 in its IP address to OSPF area 0.
Router(config-router)#network 172.168.0.0 0.0.255.255 area 1 This command checks the IP configuration of all interfaces to add the interface having the network number 172.168 in its IP address to OSPF area 1.

Use the same commands to enable the OSPF process and add interfaces to their respective OSPF areas on the remaining routers.

R2 OSPF multi-area configuration

Router>enable
Router#configure terminal
Router(config)#router ospf 2
Router(config-router)#network 172.168.0.0 0.0.255.255 area 1
Router(config-router)#exit
Router(config)#exit
Router#
multi area configuration on R2

R3 OSPF multi-area configuration

Router>enable
Router#configure terminal
Router(config)#router ospf 3
Router(config-router)#network 172.168.0.0 0.0.255.255 area 1
Router(config-router)#exit
Router(config)#
ospf multi area configuration on R3

R4 OSPF multi-area configuration

Router>enable
Router#configure terminal
Router(config)#router ospf 4
Router(config-router)#network 172.168.0.0 0.0.255.255 area 1
Router(config-router)#exit
Router(config)#exit
Router#
ospf multi area configuration on R4

R5 OSPF multi-area configuration

Router>enable
Router#configure terminal
Router(config)#router ospf 5
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 10.0.0.0 0.255.255.255 area 2
Router(config-router)#exit
Router(config)#exit
Router#
ospf multi area configuration on R5

R6 OSPF multi-area configuration

Router>enable
Router#configure terminal
Router(config)#router ospf 6
Router(config-router)#network 10.0.0.0 0.255.255.255 area 2
Router(config-router)#exit
Router(config)#exit
Router#
ospf multi area configuration on R6

R7 OSPF multi-area configuration

Router>enable
Router#configure terminal
Router(config)#router ospf 7
Router(config-router)#network 10.0.0.0 0.255.255.255 area 2
Router(config-router)#exit
Router(config)#exit
Router#
ospf multi area configuration on R7

R8 OSPF multi-area configuration

Router>enable
Router#configure terminal
Router(config)#router ospf 8
Router(config-router)#network 10.0.0.0 0.255.255.255 area 2
Router(config-router)#exit
Router(config)#exit
Router#
ospf multi area configuration on R8

Testing and verifying OSPF multi-area configuration

We can use the show ip route ospf command to verify the OSPF multi-area configuration. If the output of this command shows routes for all subnets from all OSPF areas, it verifies the OSPF multi-area configuration.

The following image shows the output of this command on R2.

show ip route ospf

You can run this command on all routers to verify the OSPF multi-area configuration.

We can also use the ping command to test connectivity between end devices. To print the path data packets take to reach the destination, we can use the tracert command.

The following image shows the output of these commands on PC0.

ping and tracert command

You can run these commands on all end devices to test their connectivity with other devices.

Download the practice LAB with OSPF configuration

Route summarization on ABR

Without route summarization, a multi-area configuration has no benefits over a single-area configuration. To take full advantage of multi-area configuration, you should summarize routes on ABR routers in the direction of the backbone area. Since area 0 routers inject routing information in other OSPF areas, they will receive only summarized information. You can summarize only contiguous subnets.

In our example network, R1 and R5 are ABR routers. We will summarize routes on these routers. R1 connects area 1 with area 0. Area 1 contains the following contiguous subnets.

172.168.0.0/30
172.168.0.4/30
172.168.0.8/30
172.168.1.0/24
172.168.2.0/24
172.168.3.0/24

All these subnets start with the network number 172.168. We can summarize these subnets in the network 172.168.0.0/16.

The following OSPF configuration mode command summarizes routes.

area [area-id] range [address] [mask]

The 'area-id' is the area that contains networks to be summarized.

The 'address' is the network number of the summarized route.

The 'mask' is the subnet mask of the summarized route.

The following command summarizes routes on R1. R1 will forward the summarized route to area 0.

Router(config)#router ospf 1
Router(config-router)#area 1 range 172.168.0.0 255.255.0.0
Router(config-router)#exit
route summarization on r1

R5 connects area 2 with area 0. Area 2 has the following contiguous subnets.

10.0.0.0/30
10.0.0.4/30
10.0.0.8/30
10.1.1.0/24
10.1.2.0/24
10.1.3.0/24

We can summarize the above subnets in the subnet 10.0.0./8. The following command summarizes routes on R5. R5 will forward the summarized route to area 0.

Router(config)#router ospf 5
Router(config-router)#area 2 range 10.0.0.0 255.0.0.0
Router(config-router)#exit
route summarization on r5

After route summarization, routers in area 1 and area 2 will see only the summarized routes of each other. However, they will keep detailed information about the routes available within their respective OSPF areas.

summarized route

We can use the show ip route ospf command to verify the summarized routes. The following image shows the output of this command on R2.

show ip route command

Download the practice LAB with OSPF Route summarization

Conclusion

OSPF supports multi-area configuration. If we design a multi-area network, we can summarize the routing information on ABR routers. After summarization, ABR routers will forward only the summarized routes to other OSPF areas.

ComputerNetworkingNotes CCNA Study Guide OSPF Multi-Area Configuration Explained