How to Configure OSPF Multi-Area - Netizzan

How to Configure OSPF Multi-Area

OSPF is a widely used and widely advertised routing protocol. It is an open standard, meaning that any router will support it. It is an interior gateway protocol, meaning it is designed to work within a single autonomous system. It is also a link-state dynamic routing protocol.

As with other routing protocols, the goal of OSPF is to learn the route to any subnet within the entire network of an autonomous system. This results in every router having the same information about the network as each other.

Routers learn this information by sending link state advertisements (LSA). This LSA contains information about the subnet, router, and some of the network information. Once all LSA is flooded, OSPF keeps all of this information in a Link State Database (LSDB). The goal is to have every router have the same information in their LSDB. The exchange of LSDB occurs within a single area OSPF.

In case where we have a large network that comprise of hundreds or thousands of routers in the same OSPF area, we will run into the following problems;

  1. The LSDB will be excessively huge: Every router will have a copy of the same LSDB filled with information not necessary to the router. All of this information will start to fill up the disk space.
  2. The Routing Table will be excessively Huge: Every time a packet comes in, the router will need to search through a hundreds or thousand of routes before finding the best route. This will impact the processing power of the router.
  3. Update Everywhere: Anytime a link or router is changed, update is flooded throughout the network.

OSPF Multi-Area help to solve all of the above listed problems associated with large network having a single OSPF area.

OSPF multi Area divides the routers existing in a large network and put them in different areas.

OSPF Area 0

To divide a large network into multiple areas, Firstly, it starts with Area 0. Area 0 is the backbone area. Every other area must be joined to the backbone area using the Area border routers.

Area Border Routers (ABRs)

These are special routers that have interfaces in one or more areas. ABRs appear between OSPF area 0 and other OSPF areas in the network.

ABRs summarize all the routes in a particular area and provide them for the backbone area. Also, it summarizes all the routes in the backbone area and provides them to other OSPF areas it is connecting to. This route summarization helps solve all of the problems we listed above.

Backbone Routers

These are routers that are in or partially in the backbone area.

Area Border Routers

These are routers that connect to more than one router.

Internal Routers

These are all routers that are within an OSPF area but not the backbone area.

Autonomous System Boundary Routers (ASBR)

These are routers that connect to other non-ospf routing protocols, such as BGP or EIGRP. An example is an edge router connecting to the internet.

Now that we have a clear understanding of OSFP multi-area, Let’s proceed to configure a sample OSPF multi-area network.

Network Topology

The network topology we are going to make use of in this post is shown in the image below. As you can see, it consists of 3 OSPF areas: Area 0 (back bone area), Area 1, and Area 2.
In this demonstration, I will show you how to configure the OSPF multi-area to enable route summarization.

ospf multi area network

How to Configure OSPF Multi-Area

Here are steps to configure OSPF Multi-Area, taking the above network as an example:

Step 1: Configure the interfaces of the routers

Enter the following commands on each of the routers to configure the interfaces of the routers:.

Router 1

R1(config)#interface ethernet0/1
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown 
R1(config-if)#exit

R1(config)#interface ethernet0/2
R1(config-if)#ip address 192.168.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit

Router 2

R2(config)#interface ethernet0/1
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shutdown 
R2(config-if)#exit

R2(config)#interface ethernet0/2
R2(config-if)#ip address 192.168.24.2 255.255.255.0
R2(config-if)#no shutdown 
R2(config-if)#exit

Router 3

R3(config)#interface ethernet0/1
R3(config-if)#ip address 192.168.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit

R3(config)#interface loopback 0
R3(config-if)#ip address 3.3.3.3 255.255.255.0
R3(config-if)#no shutdown 
R3(config-if)#exit

Router 4

R4(config)#interface ethernet0/1
R4(config-if)#ip address 192.168.24.4 255.255.255.0 
R4(config-if)#no shutdown 
R4(config-if)#exit

R4(config)#interface loopback 0
R4(config-if)#ip address 4.4.4.4 255.255.255.0
R4(config-if)#no shutdown 
R4(config-if)#exit

Step 2: Configure OSPF on the routers.

Enter the following commands each on the router to enable OSPF routing protocol on the network.

Router 1

R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config-router)#network 192.168.13.0 0.0.0.255 area 1
R1(config-router)#exit

Here is a brief explanation of each of the above commands;

  • R1(config)#router ospf 1: This command enters OSPF configuration mode on router R1 and specifies the OSPF process ID as 1.
  • R1(config-router)#router-id 1.1.1.1: This command sets the OSPF router ID on router R1 to 1.1.1.1. The router ID uniquely identifies the router within the OSPF domain.
  • R1(config-router)#network 192.168.12.0 0.0.0.255 area 0: This command specifies that the network 192.168.12.0/24 is to be included in OSPF area 0. The 0.0.0.255 is the wildcard mask, indicating that only interfaces with IP addresses in the 192.168.12.0/24 range are to be included.
  • R1(config-router)#network 192.168.13.0 0.0.0.255 area 1: This command specifies that the network 192.168.13.0/24 is to be included in OSPF area 1. Similar to the previous command, 0.0.0.255 is the wildcard mask, and only interfaces within the specified range are included in OSPF area 1.

Router 2

R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2(config-router)#network 192.168.24.0 0.0.0.255 area 2
R2(config-router)#exit

Router 3

R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 192.168.13.0 0.0.0.255 area 1
R3(config-router)#network 3.3.3.0 0.0.0.255 area 1
R3(config-router)#exit

Router 4

R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 192.168.24.0 0.0.0.255 area 2
R4(config-router)#network 4.4.4.0 0.0.0.255 area 2     
R4(config-router)#exi

Step 3: Test the OSPF Configuration

To confirm that the configuration is working perfect, ping from one router to another.

R3#ping 4.4.4.4 source 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

R4#ping 3.3.3.3 source 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/3 ms

OSPF Show Commands

The following commands are used to display information about OSPF configuration.

>show ip ospf neighbor

This show command Displays detailed neighbor information. Run it on each of the routers.

R1#show ip ospf neighbor
R2#show ip ospf neighbor
R3#show ip ospf neighbor
R4#show ip ospf neighbor

>show ip protocols

This show command is used to display information about OSPF, including the router ID. Run this command on each of the routers.

R1#show ip protocols		
R2#show ip protocols
R3#show ip protocols
R4#show ip protocols

>show ip route ospf

This command is used to display OSPF routing information. Enter it on each of the routers to see the route it has learned.

R1#show ip route ospf
R2#show ip route ospf
R3#show ip route ospf
R4#show ip route ospf

>show ip ospf database

This show command is used to Display detailed OSPF database information. Enter it on each of the routers to display the databese information learnt by the router.

R1#show ip ospf database
R2#show ip ospf database
R3#show ip ospf database
R4#show ip ospf database

Related Content;

  1. How to Configure OSPF Default Route on a Cisco Router
  2. How to Configure OSPF DR and BDR
  3. How to Configure OSPF Passive Interface on Cisco Router
  4. How to Configure OSPF Backbone Area | How to Configure OSPF Area 0
  5. Configuring OSPF Hello Timer
  6. How To Configure OSPF on Layer 3 Switch In Packet Tracer
  7. Redistributing Static Routes into OSPF: Explained With Example

Reference: https://github.com/misterkrittin/CCNA-Labs

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top