OSPF Routing Protocol: Part 1

From the last session, we successfully configured all the router interfaces and the switch with the IP addresses we generated while learning about subnetting. We must discuss how all these routers communicate, especially how they route traffic between each other.
Several routing protocols are utilized in networking, allowing routers to decide the best routes for packet delivery, including options for users to establish static routes.

OSPF (Open Shortest Path First) has been selected as the routing protocol of choice for our campus network. Its open protocol nature, coupled with widespread support from various OEMs, makes it a superior option compared to EIGRP’s Cisco-specific limitations and RIP’s simplistic hop count-based routing decisions. Understanding these routing protocols is essential, particularly for those new to the concept of routing.

In this post, I won’t delve into the details of different routing protocols. Instead, I’ll focus on unpacking the fundamental principles of OSPF, our chosen protocol. I’ll guide you through the configuration process of OSPF and highlight the critical factors to consider.

Router ID

There are certain concepts we would come across as we configure OSPF, and I believe it’s fair I explain them before we start configuration. The complexity of OSPF configuration can be quite straightforward, depending on the size of your network.
OSPF routers use a router ID as an IP address for identification. By default, the router will use a manually configured router ID if one is set; otherwise, it will select the highest loopback address configured on the router, or if none, the highest IP address of all active interfaces to serve as the router ID.
What are loopback addresses then? These virtual interfaces never go down or change hence they can serve as pathways to reach a router if an interface goes down. It is also possible to have multiple loopback interfaces on a router since they are virtual.

To configure your lookback interface, from global configuration mode follow the steps below

R1(config)# Interface Loopback 0
R1(config-if)# ip address 10.0.0.1 255.255.255.255
R1(config-if)# exit
R1(config)# exit

Therefore, in the above configuration, the IP address 10.0.0.1 would become the router ID in an OSPF configuration. When multiple loopback interfaces are present, the one with the highest designation will be used.

The best practice is to configure your router ID manually. However, some prefer using loopback interfaces, which are also valid approaches, especially considering that the loopback interface can serve other valuable purposes in network setup. Nonetheless, for this setup, we will configure our router IDs using loopback addresses. We have seven routers; the table below shows the loopback address I intend to use in our set-up. Utilizing a private IP address with a /32 subnet is advisable to avoid conflicts with your network’s existing IP address scheme.

Router NameRouter-ID
Lagos Router30.3.0.0 /32
Abuja Router30.6.0.0 /32
Lag-Gen30.4.0.0 /32
Gen-Link Router30.7.0.0 /32
Delta Router30.5.0.0 /32
Kano Router30.1.0.0 /32
Bornu Router30.2.0.0 /32
Table for Router-ID addresses.

OSPF Area

OSPF networks can be structured as either single-area or multi-area configurations. An OSPF area is essentially a collection of networks under a single area ID, where routers hold a detailed database of their area. However, they only keep a summarized list of routes from other areas, not the full details.

For routers in smaller networks, managing this comprehensive data is a breeze thanks to OSPF’s design. But in larger networks, the sheer volume of network tables can put a strain on the router’s processing power.

There are two levels in the OSPF Area hierarchy: the backbone area, also known as the transit area, and the non-backbone area, or regular area. The backbone area is user-free, serving as a bridge connecting end users through the transit area.

Designated Router & Backup Designated Router

In a single-area OSPF network, topology changes prompt updates to all neighbouring routers. As networks grow, this can lead to an unsustainable number of broadcasts. OSPF addresses this issue by implementing Designated Routers (DR) and Backup Designated Routers (BDR).

The DR and BDR streamline communication. Typically, routers would broadcast changes to all neighbours, causing excessive OSPF traffic. With a DR, it alone receives updates and relays them to others, curbing network congestion. Should the DR become unavailable, the BDR steps in. The BDR stays updated with the DR, keeping a duplicate routing table.

Initially, routers elect a DR based on the highest router ID. Yet, there are cases where selection criteria should include network position or performance. Here, a router’s priority value overrides its router ID in DR selection, with higher priority values taking precedence, ensuring a more suitable DR choice.

Routing Protocol Configuration

For our Network topology, we would employ the use of a single area set up with a DR and BDR elected. I intend to use the “Gen-Link Router” for the DR while “Abuja and Delta” would share the responsibility of BDRs. Looking at the table above, I have already configured “Gen-link” with the highest-rated loopback address and the other two BDRs.

  • Step 1: Configure Loopback for each router
  • Step 2: Configure OSPF
  • Step 3: Test and check OSPF config.

STEP 1 & 2 For Lagos Router

LR> enable
LR# configure terminal
LR(config)# interface loopback0
LR(config-if)# ip address 30.3.0.0 255.255.255.255
LR(config-if)# exit
LR(config)# router ospf 1
LR(config-router)# network 20.20.20.0 0.0.0.3 area 0
LR(config-router)# network 20.20.20.4 0.0.0.3 area 0
LR(config-router)# network 10.10.10.0 0.0.0.15 area 0
LR(config-router)# end
LR#wr

In the Lagos router configuration, the section that advertises the interface address connected to the router is crucial for understanding the role of each command.

[network] [20.20.20.0] [0.0.0.3] [area 0]

The “network” command designates the networks to be included in the OSPF. The network address 20.20.20.0 is the specific network you wish to incorporate into the OSPF process. Each network address intended for OSPF routing must be listed sequentially as demonstrated. The wildcard mask 0.0.0.3 represents the inverse of a subnet mask, which OSPF is configured to interpret correctly. The designation “Area 0” identifies the network’s area association. As this configuration pertains to a single-area network, Area 0 is uniformly applied across all configurations.

This concludes our current discussion, providing a foundational understanding of OSPF configuration. In our subsequent lesson, we will proceed to test this setup and delve into the router’s process for selecting OSPF-utilized routes.

Comments

One response to “OSPF Routing Protocol: Part 1”

  1. […] Now, combine these protocols with a dynamic routing protocol, and you extend that redundancy across multiple networks. While HSRP and STP handle local traffic within an area, a dynamic routing protocol ensures the wider network is always aware of the best routes, even when things go sideways. This article is not about OSPF here, but I have a whole article dedicated to it. […]

Leave a Reply

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