32.1. OSPF overview

The Open Shortest Path First (OSPF) is classified as an Interior Gateway Protocol (IGP).

This means that it distributes routing information between routers belonging to a single Autonomous System.

The Open Shortest Path First (OSPF) protocol is based on link-state or SPF technology.

The Open Shortest Path First (OSPF) protocol routes IP datagrams based solely on the destination IP address found in the IP datagram header. IP datagrams are routed "as they are", i.e. they are not encapsulated in any further protocol headers as they transit the Autonomous System (AS).

OSPF is a dynamic routing protocol. It quickly detects topological changes in the Autonomous System (such as router interface failures) and calculates new loop-free routes after a period of convergence.

This period of convergence is short and involves a minimum of routing traffic.

In a link-state routing protocol, each router maintains a database describing the Autonomous System's topology.

This database is referred to as the link-state database. Each participating router has an identical database. Each individual piece of this database is a particular router's local state, e.g. the router's usable interfaces and reachable neighbors. The router distributes its local state throughout the Autonomous System by flooding.

All routers run exactly the same algorithm, in parallel. From the link-state database, each router constructs a tree of shortest paths with itself as root. This shortest-path tree gives the route to each destination in the Autonomous System. Externally derived routing information appears on the tree as leaves.

The Open Shortest Path First (OSPF) protocol allows sets of networks to be grouped together.

Such a grouping is called an area.

The topology of an area is hidden from the rest of the Autonomous System. This information hiding enables a significant reduction in routing traffic. Also, routing within the area is determined only by the area's own topology, lending the area protection from bad routing data.

An area is a generalization of an IP subnetted network.

The Open Shortest Path First (OSPF) protocol enables the flexible configuration of IP subnets. Each route distributed by OSPF has a destination and mask. Two different subnets of the same IP network number may have different sizes (i.e. different masks). This is commonly referred to as variable length subnetting.

A datagram is routed to the best (i.e., longest or most specific) match. Host routes are considered to be subnets whose masks are "all ones".

All OSPF protocol exchanges are authenticated. This means that only trusted routers can participate in the Autonomous System's routing. A variety of authentication schemes can be used: in fact, separate authentication schemes can be configured for each IP subnet.

Externally derived routing data (e.g. routes learned from an Exterior Gateway Protocol such as BGP) is advertised throughout the Autonomous System. This externally derived data is kept separate from the OSPF protocol's link state data. Each external route can also be tagged by the advertising router, enabling the passing of additional information between routers on the boundary of the Autonomous System.