2.0 Key features of the OSPF protocol
This section summarizes the key features of the OSPF protocol. OSPF is an Internal gateway protocol; it is designed to be used internal to a single Autonomous System. OSPF uses link-state or SPF-based technology (as compared to the distance-vector or Bellman-Ford technology found in routing protocols such as RIP). Individual link state advertisements (LSAs) describe pieces of the OSPF routing domain (Autonomous System). These LSAs are flooded throughout the routing domain, forming the link state database. Each router has an identical link state database; synchronization of link state databases is maintained via a reliable flooding algorithm. From this link state database, each router builds a routing table by calculating a shortest-path tree, with the root of the tree being the calculating router itself. This calculation is commonly referred to as the Dijkstra procedure.
Link state advertisements are small. Each advertisement describes a small pieces of the OSPF routing domain, namely either: the neighborhood of a single router, the neighborhood of a single transit network, a single inter-area route (see below) or a single external route.
The other key features of the OSPF protocol are:
- Adjacency bringup. Certain pairs of OSPF routers become "adjacent". As an adjacency is formed, the two routers synchronize their link state databases by exchanging database summaries in the form of OSPF Database Exchange packets. Adjacent routers then maintain synchronization of their link state databases through the reliable flooding algorithm. Routers connected by serial lines always become adjacent. On multi-access networks (e.g., ethernets or X.25 PDNs), all routers attached to the network become adjacent to both the Designated Router and the Backup Designated router.
- Designated router. A Designated Router is elected on all multi-access networks (e.g., ethernets or X.25 PDNs). The network's Designated Router originates the network LSA describing the network's local environment. It also plays a special role in the flooding algorithm, since all routers on the network are synchronizing their link state databases by sending and receiving LSAs to/from the Designated Router during the flooding process.
- Backup Designated Router. A Backup Designated Router is elected on multi-access networks to speed/ease the transition of Designated Routers when the current Designated Router disappears. In that event, the Backup DR takes over, and does not need to go through the adjacency bringup process on the LAN (since it already had done this in its Backup capacity). Also, even before the disappearance of the Designated Router is noticed, the Backup DR will enable the reliable flooding algorithm to proceed in the DR's absence.
- Non-broadcast multi-access network support. OSPF treats these networks (e.g., X.25 PDNs) pretty much as if they were LANs (i.e., a DR is elected, and a network LSA is generated). Additional configuration information is needed however for routers attached to these network to initially find each other.
- OSPF areas. OSPF allows the Autonomous Systems to be broken up into regions call areas. This is useful for several reasons. First, it provides an extra level of routing protection: routing within an area is protected from all information external to the area. Second, by splitting an Autonomous System into areas the cost of the Dijkstra procedure (in terms of CPU cycles) is reduced.
- Flexible import of external routing information. In OSPF, each external route is imported into the Autonomous System in a separate LSA. This reduces the amount of flooding traffic (since external routes change often, and you want to only flood the changes). It also enables partial routing table updates when only a single external route changes. OSPF external LSAs also provide the following features. A forwarding address can be included in the external LSA, eliminating extra-hops at the edge of the Autonomous System. There are two levels of external metrics that can be specified, type 1 and type 2. Also, external routes can be tagged with a 32-bit number (the external route tag; commonly used as an AS number of the route's origin), simplifying external route management in a transit Autonomous System.
- Four level routing hierarchy. OSPF has a four level routing hierarchy, or trust model: intra-area, inter-area, external type 1 and external type 2 routes. This enables multiple levels of routing protection, and simplifies routing management in an Autonomous System.
- Virtual links. By allowing the configuration of virtual links, OSPF removes topological restrictions on area layout in an Autonomous System.
- Authentication of routing protocol exchanges. Every time an OSPF router receives a routing protocol packet, it authenticates the packet before processing it further.
- Flexible routing metric. In OSPF, metric are assigned to outbound router interfaces. The cost of a path is then the sum of the path's component interfaces. The routing metric itself can be assigned by the system administrator to indicate any combination of network characteristics (e.g., delay, bandwidth, dollar cost, etc.).
- Equal-cost multipath. When multiple best cost routes to a destination exist, OSPF finds them and they can be then used to load share traffic to the destination.
- TOS-based routing. Separate sets of routes can be calculated for each IP type of service. For example, low delay traffic could be routed on one path, while high bandwidth traffic is routed on another. This is done by (optionally) assigning, to each outgoing router interface, one metric for each IP TOS.
- Variable-length subnet support. OSPF includes support for variable-length subnet masks by carrying a network mask with each advertised destination.
- Stub area support. To support routers having insufficient memory, areas can be configured as stubs. External LSAs (often making up the bulk of the Autonomous System) are not flooded into/throughout stub areas. Routing to external destinations in stub areas is based solely on default.