Skip to content

Open Shortest Path First (OSPF)

OSPF is a widely utilized Interior Gateway Protocol (IGP) designed for routing IP packets solely within a single routing domain, such as an Autonomous System. It is characterized by its speed and efficiency in finding the shortest path between nodes in a network, leveraging Edsger Dijkstra's algorithm for this purpose. RFC 2328 details OSPF for use in IPv4 networks, while RFC 5340 details it for IPv6. OSPF offers robust features, including support for multi-area configurations and various network links, such as point-to-point links, which we'll discuss in detail.

1.0 Basics of OSPF

OSPF operates on the principle of dividing the entire autonomous system into various areas to optimize network traffic and scalability. It uses Link State Advertisements (LSAs) to construct a network topology map. Each router in the OSPF network calculates the shortest path tree for itself using this topology database. Dijkstra's algorithm performs the shortest path calculation, allowing OSPF to adjust to network changes and reroute traffic efficiently and dynamically.

2.0 Multi-Area OSPF

OSPF allows the segmenting of a large autonomous system into smaller areas to enhance scalability and manageability. This hierarchical routing approach reduces routing table entries on individual routers and decreases the protocol's overhead. The following will touch on the backbone area and non-backbone areas:

  • Area 0 (Backbone Area): In OSPF, Area 0 acts as the backbone to which all other areas must connect, directly or through virtual links. It facilitates the flow of routing information between non-backbone areas.

Note

We do not utilize virtual links in Alpaca

  • Non-Backbone Areas: These are areas that are not Area 0. They can only communicate with each other through Area 0, ensuring a loop-free topology.

RFC 2328 Section 12.4.1.1 discusses Point-to-point links. Point-to-point links refer to direct connections between two OSPF routers without any other devices in between. This link type is straightforward to configure and manage because it assumes only two routers are on either end of the link, eliminating the need for complex network design considerations such as DR (Designated Router) and BDR (Backup Designated Router) elections that occur in broadcast network types.

  • Efficient Use of Bandwidth: Point-to-point links do not require the OSPF hello protocol's overhead used for neighbor discovery in broadcast networks, making them more efficient in bandwidth usage.
  • Simplified Routing Information: OSPF simplifies the routing information exchange over point-to-point links, as each router directly communicates with its peer without needing intermediate steps.

4.0 The Hello Protocol (RFC 2328 7.1)

The Hello Protocol is responsible for establishing and maintaining neighbor relationships. It also ensures that communication between neighbors is bidirectional. Hello packets are sent periodically out all router interfaces. Bidirectional communication is indicated when the router sees itself listed in the neighbor's Hello Packet. On broadcast and NBMA networks, the Hello Protocol elects a Designated Router or the network.

The Hello Protocol works differently on broadcast networks, NBMA networks and Point-to-MultiPoint networks. On broadcast networks, each router advertises itself by periodically multicasting Hello Packets. This allows neighbors to be discovered dynamically. These Hello Packets contain the router's view of the Designated Router's identity, and the list of routers whose Hello Packets have been seen recently.

On NBMA networks some configuration information may be necessary for the operation of the Hello Protocol. Each router that may potentially become Designated Router has a list of all other routers attached to the network. A router, having Designated Router potential, sends Hello Packets to all other potential Designated Routers when its interface to the NBMA network first becomes operational. This is an attempt to find the Designated Router for the network. If the router itself is elected Designated Router, it begins sending Hello Packets to all other routers attached to the network.

After a neighbor has been discovered, bidirectional communication ensured, and (if on a broadcast or NBMA network) a Designated Router elected, a decision is made regarding whether or not an adjacency should be formed with the neighbor (see Section 10.4). If an adjacency is to be formed, the first step is to synchronize the neighbors' link-state databases. This is covered in the next section.