Introduction to Open Shortest Path First (OSPF)
Open Shortest Path First (OSPF) is a link-state routing protocol replacing distance vector routing protocol, RIP. RIP was acceptable in the early days of networking. RIP uses hop count as the metric which is not working better in the larger network.
Open Shortest Path First (OSPF) has many advantages over RIP. It can scale a larger network and offer a faster convergence. It is a classless routing protocol using the concept of areas for scaling the network. Open Shortest Path First (OSPF) uses the Dijkstra algorithm created a famous programmer Edsger Wybe Dijkstra.
Development of Open Shortest Path First (OSPF)
The Internet Engineering Task Force (IETF) starts initial working on OSPF in 1987. Meanwhile, the internet was not public; it only used as an academic and research network funded by the government of the United States. In 1989 the OSPF version 1 specification was published in RFC 1131; only for running on routers and UNIX workstations. Later its implementation became a widespread UNIX process known as GATED.
Version 1 of the OSPF is an experimental routing protocol and was never deployed. In 1991, John Moy introduced OSPF version 2 in RFC 1247. Version 2 gives significant improvements over version 1. It is classless and supporting VLSM and CIDR. It the same time the IETF chose Open Shortest Path First (OSPF) as their recommended interior gateway protocol(IGP)
In 1998, version 2 was updated in RFC 2328; which remains the current RFC for OSPF. In 1999, OSPF version 3 was introduced in RFC 2740. It was created by John Moy, Rob Count; and Dennis for IPv6. In 2008, OSPFv3 has updated in RFC 5340 as OSPF for IPv6.
Features of Open Shortest Path First (OSPF)
The Open Shortest Path First (OSPF) has many features included:
- Classless– OSPF is classless by design, so, it supports VLSM and CIDR.
- Fast convergence– it is fast convergence and quickly propagates network changes.
- Efficient– OSPF has no periodic update, it only triggers routing updates on the event. It uses the SPF algorithm to choose the best path.
- Scalable– It works well both in small and large networks. We can group the routers into areas to support a hierarchical system.
- Secure– OSPF supports MD5 (Message Digest 5) authentication. When MD5 has enabled, routers only accept encrypted routing updates from peers with the same pre-shared password.
- Trustworthiness – Administrative distance is the trustworthiness of the route source. Open Shortest Path First (OSPF) has a default administrative distance of 110 and preferred over IS-IS and RIP.
Components of Open Shortest Path First (OSPF)
OSPF uses smaller routing tables due to the segmentation of the entire network into smaller areas. The network segmentation into area enables better administration.
OSPF consists of a backbone Area “0”. The Area “0” links all other smaller areas within the hierarchy. The important components of an OSPF network are hardware components, areas, databases, Messages and algorithm:
Hardware Components
Hardware components are included area border router (ABR) and AS boundary router.
Area Border Routers (ABR)
ABR is a router located near the border between one or more one OSPF areas. It establishes a link between backbone networks and the OSPF areas.
AS Boundary Routers
It is a router exchanging routing information with non-OSPF networks. AS boundary routers advertise externally learned routes throughout the OSPF AS.
The AS Boundary Routers can also work as an ABR, backbone router or an internal router depending on the location. A router within a stub area cannot be an AS boundary router because the stub area cannot contain any type 5 LSAs.
OSPF Areas
In OSPF a single autonomous system (AS) can be divided into smaller groups. These smaller groups called areas. Areas reduce the number of LSAs and also reduce other overhead traffic sent on the network. The areas also reduce the topology database size maintaining each router.
Backbone Areas
The backbone area consists of all networks in area ID 0.0.0.0, including attached routing devices, and all Area Border Routers. It distributes routing information between areas. The backbone is itself an area, so the rules and terminology of an area also apply.
Stub Areas
Areas where AS external advertisements are not flooded called stub areas. Stub areas are shielded from external routes but receive information about networks that belong to other areas of the same OSPF domain
Routing devices within a stub area rely on the default routes originated by the area’s ABR to reach external AS destinations. The default-metric must be configured on the ABR before it advertises a default route.
The ABR advertises a default route in place of the external routes that are not being advertised within the stub area so that routing devices in the stub area can reach destinations outside the area.
Not-So-Stubby Areas (NSSA)
It enables the network administrator to configure OSPFv2 areas that provide the benefits of stub areas capable of importing external route information. These routes are then leaked into other areas. But, external routes from other areas still do not enter the NSSA.
Totally Stubby Area
This area filters out information of OSPF database on the bases of LSA types. An Area Border Router (ABR) in a Totally Stubby Area prevents LSA type 3, 4 and 5 to be flooded into a Totally Stub Area. It replaces all these types of LSA with a default route.
Transit Areas
The area through which we can configure the virtual link called transit area. The transit area must be in a position of full routing information. The transit area cannot be a stub area.
OSPF Databases
The OSPF databases including adjacency database, link-state database (LSDB) and forwarding database. The introduction to the databases are the following:
Adjacency database
OSPF adjacency database maintains the neighbour database. This database allows routers to exchange routing information. The routers must be neighbours, then they can become adjacent. Two routers only become adjacent if at least one of them is DR or BDR.
The database contains the list of all neighbours routers establishes bidirectional communication. The adjacent database table is unique for each router. We can view this database using “show ip ospf neighbor” command.
Link-state database (LSDB)
The LSDB creates the topology table for every area to which the router belongs. The router links advertisements; network links advertisements, and summary link advertisements are the components of LSDB.
The link-state database also maintains the list of all routers in the network. We can view LSDB using the “show ip ospf database” command.
Forwarding database
This database creates and lists the routing table of the router. Each router routing table is unique and containing information on how and where to send a packet to other routers. We can view the forwarding database using the “show ip route” command.
Routing Protocol Messages
OSPF exchange information between routers using different messages. The messages packet populates the routing table with the routing protocol’s choice of best paths.
These packets discover neighbouring routers and also to exchange routing information to maintain accurate information about the network. There are five types of messages packet in OSPF also illustrates in the figure below:
- Hello packet
- Link-state request packet
- Database description packet
- Link-state update packet
- Link-state acknowledgement packet
Algorithm
The Open Shortest Path First (OSPF) is a link-state routing protocol and using the CPU processes the neighbour and topology tables using Dijkstra’s SPF algorithm. The SPF algorithm cumulative cost-based algorithm to reach a destination.
The SPF algorithm creates an SPF tree and calculates the shortest and the best path to each node. OSPF places the best routes into the forwarding database and makes routing table using the forwarding database.
Link-State Operation » Networkustad
August 31, 2019 @ 2:29 pm
[…] Adjacency database, Link State database and Forwarding database. To maintain routing information, OSPF routers done the following generic link-state operation to achieve a state of […]
OSPF Packets Types » Networkustad
August 31, 2019 @ 3:31 pm
[…] Open Shortest Path First (OSPF) uses link-state packets (LSPs) to establish and maintain neighbour adjacencies. It also uses LSPs to exchange routing updates. There are five different OSPF packets type. Beginning of all OSPF packets is specified by the standard header of 24 bytes. A list of link state advertisements is to deal with all OSPF packets type. The figure below illustrates the five different OSPF packets types. Each link-state packet (LSPs) serves a specific purpose in the OSPF routing process: […]
Encapsulating OSPF Messages » Networkustad
August 31, 2019 @ 3:44 pm
[…] Open Shortest Path First (OSPF) runs over the Internet Protocol’s network layer. So, Open Shortest Path First (OSPF) encapsulated only by IP and local data-link headers. Encapsulating OSPF messages transmitting over an Ethernet link contain the following information: […]
Hello Packets » Networkustad
August 31, 2019 @ 4:01 pm
[…] Packets Type 1 are OSPF packet which sent periodically on all interfaces including virtual links to establish and maintain […]
OSPF Process and Different States » Networkustad
August 31, 2019 @ 5:40 pm
[…] an OSPF router is initially connected to a network it completes the following generic link-state routing […]
OSPF Operation » Networkustad
August 31, 2019 @ 6:44 pm
[…] router interface is configured with OSPF, the router must determine if there is another OSPF neighbour on the link. To do this, the router […]
Single-Area OSPFv2 Configuration » Networkustad
September 1, 2019 @ 8:34 am
[…] router in the OSPF network requires a router ID to give in the domain. We can define the router ID manually or […]
OSPF Passive Interfaces » Networkustad
September 1, 2019 @ 9:45 am
[…] under Routing for Networks; which means that this network is still incorporated as a route entry in OSPF […]
OSPF Metric and Reference Bandwidth » Networkustad
September 1, 2019 @ 2:30 pm
[…] OSPF uses “Cost” as the value of the metric and uses a Reference Bandwidth of 100 Mbps for cost calculation. A lower-cost indicates a better path than a higher cost. A routing protocol uses a metric to determine the best path of a packet across a network. An OSPF metric provides a sign of the overhead across a certain interface for packet sending. […]
Verifying and Troubleshooting OSPF Configuration » Networkustad
September 1, 2019 @ 3:19 pm
[…] OSPF is one of more complicated routing protocols, and it can be pretty threatening. Therefore the troubleshooting OSPF and verification of configurations are very important. There are several ways of verification and troubleshooting OSPF:- […]
Link-Local IPv6 Address » Networkustad
September 1, 2019 @ 4:01 pm
[…] Routers configured with dynamic routing protocol such as OSPF or EIGRP, need to send and receive routing protocol messages with their directly connected […]
Introduction to Shortest Path First Protocol » Networkustad
August 23, 2020 @ 3:00 pm
[…] published in 1959 and the name of the creator was Edsger Dijkstra so it named after its creator. OSPF(Open Shortest Path First) and IS-IS (Intermediate System-to-Intermediate System )protocols use […]
Introduction to Single Area OSPF and Multi-Area OSPF » Networkustad
August 23, 2020 @ 3:29 pm
[…] a large OSPF area is separated into several smaller areas, this is called multiarea OSPF. It is useful in larger […]
Types of OSPF Network - Introduction » Networkustad
October 25, 2020 @ 11:17 pm
[…] OSPF is a dynamic link-state routing protocol replacing the distance vector routing protocol, RIP. Though, OSPF has important advantages over RIP. OSPF offers faster convergence and scales to much larger network implementations. The OSPF defines five types of OSPF network: […]
What is OSPF Designated Router » Networkustad
October 30, 2020 @ 10:54 pm
[…] the previous lesson, we have discussed the challenges of OSPF Multi-access network. The two challenges of the OSPF Multi-access network are unwanted adjacencies […]
OSPF Hello and Dead Intervals » Networkustad
October 30, 2020 @ 11:07 pm
[…] enable OSPF constantly track the status of their neighbours, sending and receiving hello packet. Hello, packets […]
Introduction to OSPF Authentication » Networkustad
October 30, 2020 @ 11:11 pm
[…] Null is the default way of OSPF routing update exchange. Using this method no authentication is […]
Interarea Route Summarization - Exclusive Explanation » Networkustad
October 30, 2020 @ 11:38 pm
[…] route summarization in the OSPF must be manually configured on ABRs because OSPF does not support auto-summarization. We can […]
How to OSPF MD5 Authentication – NetworkUstad
September 14, 2021 @ 10:43 pm
[…] text authentication. It uses the MD5 algorithm to calculate a hash value from the contents of the OSPF packet and a password and then the hash value is transmitted in the packet. The receiver side, […]
Types of Routers in OSPF – Exclusive – NetworkUstad
September 14, 2021 @ 10:43 pm
[…] OSPF uses four different types of routers with a unique role and set of defining characteristics within the hierarchy. The routers control the traffic that goes in and out of areas. The OSPF routers are categorized based on the function they perform in the routing domain. The four types of routers are following:- […]
How to Configure Multiarea OSPF – NetworkUstad
September 14, 2021 @ 10:44 pm
[…] are no unique commands for multiarea OSPF configuration. A router simply becomes an Area Border Router (ABR) when it has two […]