Skip to main content

OSPF - Part 1: Introduction, OSPF Packet Structure, OSPF Messages and Characteristics

Article Reads:66368

Open Shortest Path First (OSPF) is a popular routing protocol developed for Internet Protocol (IP) networks by the Interior Gateway Protocol (IGP) working group of the Internet Engineering Task Force (IETF). The working group was formed in 1988 to design an IGP based on the shortest path first (SPF) algorithm for use in the Internet. Similar to the Interior Gateway Routing Protocol (IGRP), OSPF was created because in the mid-1980s, the Routing Information Protocol (RIP) was increasingly unable to serve large, heterogeneous internetworks.

Article Key Topics:

Below is a complete list of articles covering our OSPF Series:

- Part 1 (This article): Introduction, OSPF Packet Structure, OSPF Messages and Characteristics.

OSPF Packet Structure & Analysis

OSPF is a classless routing protocol, which means that in its updates, it includes the subnet of each route it knows about, thus, enabling variable-length subnet masks. With variable-length subnet masks, an IP network can be broken into many subnets of various sizes. This provides network administrators with extra network-configuration flexibility.These updates are multicasts at specific addresses (224.0.0.5 and 224.0.0.6).

The diagram below shows us the information that each field of an OSPF packet contains:

ospf-1

The numbers shown inside the coloured blocks represent the field length in bytes.

ospf-2

All OSPF packets begin with a 24-byte header, which is shown right above. 

OSPF 'Type' Field

The 'Type' field (1-byte long) is a critical component of an OSPF (Open Shortest Path First) package. It indicates the type of OSPF message contained within the package, such as a Hello message, Link State Request message, Link State Update message, or Link State Acknowledgment message. The type field plays a crucial role in the OSPF protocol by helping to ensure that routers exchange the correct types of messages with each other, enabling them to learn about the network topology and establish the shortest path to the destination network.

Understanding the significance of the "Type" field is essential for network administrators to troubleshoot OSPF network issues and optimize the performance of their networks. Below are the Type field messages contained with a bit more information about their purpose and role:

  • Hello: Establishes and maintains neighbor relationships.
  • Database Description: Describes the contents of the topological database. These messages are exchanged when an adjacency is initialized.
  • Link-state Request: Requests pieces of the topological database from neighbor routers. These messages are exchanged after a router discovers (by examining database-description packets) that parts of its topological database are out of date.
  • Link-state Update: Responds to a link-state request packet. These messages also are used for the regular dispersal of Link-State Acknowledgments (LSA). Several LSAs can be included within a single link-state update packet.
  • Link-state Acknowledgment: Acknowledges link-state update packets.

OSPF's Primary Characteristics

OSPF - The Open Routing Protocol

The protocol is open (non proprietary), which means that its specification is in the public domain. The OSPF specification is published as Request For Comments (RFC) 1247. This has allowed vendors around the world to produce products and devices that fully support OSPF, without the need of paying any royalty licenses. This also played a major role in making OSPF as a widely acceptable routing protocol for small, medium and large networks.

OSPF - Dijkstra SPF Algorithm

The second principal characteristic is that OSPF is based on the SPF algorithm, which sometimes is referred to as the Dijkstra algorithm, named for the person credited with its creation.

The SPF algorithm calculates the shortest path by constructing a graph of the network, assigning costs to the links based on their bandwidth and determining the shortest path from each router to every other router in the network. The algorithm ensures that the path chosen has the lowest cost and that the route is loop-free, providing fast and efficient communication across the network.

The SPF algorithm also helps to ensure network stability and performance by quickly detecting changes in the network topology and recalculating the shortest path. When a change occurs, such as a link failure or a new link being added to the network, OSPF sends out Link State Advertisement (LSA) messages to inform all routers in the network of the change. The routers then use the SPF algorithm to recalculate the shortest path to the destination network based on the updated network topology. This ensures that the network continues to operate efficiently and that data is routed along the most optimal path.

OSPF - A Link State Routing Protocol

OSPF is a Link State routing protocol that calls for the sending of link-state advertisements (LSAs) to all other routers within the same hierarchical area. Information on attached interfaces, metrics used, and other variables is included in OSPF LSAs. As OSPF routers accumulate link-state information, they use the SPF algorithm to calculate the shortest path to each node.

As a Link State routing protocol, OSPF contrasts with RIP and IGRP, which are Distance Vector routing protocols. Routers running the Distance Vector algorithm send all or a portion of their routing tables in routing-update messages to their neighbors.

Additional OSPF features include equal-cost, multipath routing, and routing based on upper-layer type-of-service (TOS) requests. TOS-based routing supports those upper-layer protocols that can specify particular types of service. An application, for example, might specify that certain data is urgent. If OSPF has high-priority links at its disposal, these can be used to transport the urgent datagram.

OSPF supports one or more metrics. If only one metric is used, it is considered to be arbitrary, and TOS is not supported. If more than one metric is used, TOS is optionally supported through the use of a separate metric (and, therefore, a separate routing table) for each of the eight combinations created by the three IP TOS bits (the delay, throughput, and reliability bits). If, for example, the IP TOS bits specify low delay, low throughput, and high reliability, OSPF calculates routes to all destinations based on this TOS designation.

Summary

This article introduced the OSPF routing protocol. It provided an overview of the routing protocol, its purpose, capabilities, and analyzed its structure within an Ethernet II frame. The 'Type' field within the OSPF header was examined and we also saw the different type of messages supported (Hello, Database description, Link-state Request, Link-state Update and Acknowledgment).

Your IP address:

107.23.85.179

FREE Hyper-V & VMware Backup

FREE Hyper-V & VMware Backup

Wi-Fi Key Generator

Generate/Crack any
WEP, WPA, WPA2 Key!

Network and Server Monitoring

Network and Server Monitoring

Follow Firewall.cx

Cisco Password Crack

Decrypt Cisco Type-7 Passwords on the fly!

Decrypt Now!

Bandwidth Monitor

Bandwidth Monitor

Free PatchManager

Free PatchManager

EventLog Analyzer

ManageEngine Eventlog Analyzer

Firewall Analyzer

zoho firewall analyzer