OSPF Features and Characteristics
OSPF Features and Characteristics

OSPF Features and Characteristics

OSPF Features and Characteristics
5

Summary

This topic describe basic OSPF features and characteristics.. Start learning CCNA 200-301 for free right now!!

Note: Welcome: This topic is part of Module 1 of the Cisco CCNA 3 course, for a better follow up of the course you can go to the CCNA 3 section to guide you through an order.

Introduction to OSPF

This topic is a brief overview of Open Shortest Path First (OSPF), which includes single-area and multiarea. OSPFv2 is used for IPv4 networks. OSPFv3 is used for IPv6 networks. The primary focus of this entire module is single-area OSPFv2.

OSPF is a link-state routing protocol that was developed as an alternative for the distance vector Routing Information Protocol (RIP). RIP was an acceptable routing protocol in the early days of networking and the internet. However, the RIP reliance on hop count as the only metric for determining best route quickly became problematic. Using hop count does not scale well in larger networks with multiple paths of varying speeds. OSPF has significant advantages over RIP in that it offers faster convergence and scales to much larger network implementations.

OSPF is a link-state routing protocol that uses the concept of areas. A network administrator can divide the routing domain into distinct areas that help control routing update traffic. A link is an interface on a router. A link is also a network segment that connects two routers, or a stub network such as an Ethernet LAN that is connected to a single router. Information about the state of a link is known as a link-state. All link-state information includes the network prefix, prefix length, and cost.

This module covers basic, single-area OSPF implementations and configurations.

Components of OSPF

All routing protocols share similar components. They all use routing protocol messages to exchange route information. The messages help build data structures, which are then processed using a routing algorithm.

Click each OSPF component below for more information.

Routers running OSPF exchange messages to convey routing information using five types of packets. These packets, as shown in the figure, are as follows:

  • Hello packet
  • Database description packet
  • Link-state request packet
  • Link-state update packet
  • Link-state acknowledgment packet

These packets are used to discover neighboring routers and also to exchange routing information to maintain accurate information about the network.

Routing Protocol Messages
Routing Protocol Messages

OSPF messages are used to create and maintain three OSPF databases, as follows:

  • Adjacency database - This creates the neighbor table.
  • Link-state database (LSDB) - This creates the topology table.
  • Forwarding database - This creates the routing table.

These tables contain a list of neighboring routers to exchange routing information. The tables are kept and maintained in RAM. In the following table, take a particular note of the command used to display each table.

Database Table Description
Adjacency Database Neighbor Table
  • List of all neighbor routers to which a router has established bidirectional communication.
  • This table is unique for each router.
  • Can be viewed using the show ip ospf neighbor command.
Link-state Database Topology Table
  • Lists information about all other routers in the network.
  • This database represents the network topology.
  • All routers within an area have identical LSDB.
  • Can be viewed using the show ip ospf database command.
Forwarding Database Routing Table
  • List of routes generated when an algorithm is run on the link-state database.
  • The routing table of each router is unique and contains information on how and where to send packets to other routers.
  • Can be viewed using the show ip route command.

The router builds the topology table using results of calculations based on the Dijkstra shortest-path first (SPF) algorithm. The SPF algorithm is based on the cumulative cost to reach a destination.

The SPF algorithm creates an SPF tree by placing each router at the root of the tree and calculating the shortest path to each node. The SPF tree is then used to calculate the best routes. OSPF places the best routes into the forwarding database, which is used to make the routing table.

SPF algorithm
SPF algorithm

Link-State Operation

To maintain routing information, OSPF routers complete a generic link-state routing process to reach a state of convergence. The figure shows a five router topology. Each link between routers is labeled with a cost value. In OSPF, cost is used to determine the best path to the destination. The following are the link-state routing steps that are completed by a router:

  1. Establish Neighbor Adjacencies
  2. Exchange Link-State Advertisements
  3. Build the Link State Database
  4. Execute the SPF Algorithm
  5. Choose the Best Route

Click each button for an illustration of the steps in the link-state routing process that R1 uses to reach convergence.

OSPF-enabled routers must recognize each other on the network before they can share information. An OSPF-enabled router sends Hello packets out all OSPF-enabled interfaces to determine if neighbors are present on those links. If a neighbor is present, the OSPF-enabled router attempts to establish a neighbor adjacency with that neighbor.

Establish Neighbor Adjacencies
Establish Neighbor Adjacencies

Routers then execute the SPF algorithm. The gears in the figure for this step are used to indicate the execution of the SPF algorithm. The SPF algorithm creates the SPF tree.

Execute the SPF Algorithm
Execute the SPF Algorithm

After the SPF tree is built, the best paths to each network are offered to the IP routing table. The route will be inserted into the routing table unless there is a route source to the same network with a lower administrative distance, such as a static route. Routing decisions are made based on the entries in the routing table.

Choose the Best Route
Choose the Best Route

Single-Area and Multiarea OSPF

To make OSPF more efficient and scalable, OSPF supports hierarchical routing using areas. An OSPF area is a group of routers that share the same link-state information in their LSDBs. OSPF can be implemented in one of two ways, as follows:

  • Single-Area OSPF – All routers are in one area. Best practice is to use area 0.
  • Multiarea OSPF – OSPF is implemented using multiple areas, in a hierarchical fashion. All areas must connect to the backbone area (area 0). Routers interconnecting the areas are referred to as Area Border Routers (ABRs).

The focus of this module is on single-area OSPFv2.

Click each button to compare single-area and multiarea OSPF.

Single-Area OSPF
Single-Area OSPF

Multiarea OSPF
Multiarea OSPF

Multiarea OSPF

With multiarea OSPF, one large routing domain can be divided into smaller areas, to support hierarchical routing. Routing still occurs between the areas (interarea routing), while many of the processor intensive routing operations, such as recalculating the database, are kept within an area.

For instance, any time a router receives new information about a topology change within the area (including the addition, deletion, or modification of a link) the router must rerun the SPF algorithm, create a new SPF tree, and update the routing table. The SPF algorithm is CPU-intensive and the time it takes for calculation depends on the size of the area.

Note: Routers in other areas receive updates regarding topology changes, but these routers only update the routing table, not rerun the SPF algorithm.

Too many routers in one area would make the LSDBs very large and increase the load on the CPU. Therefore, arranging routers into areas effectively partitions a potentially large database into smaller and more manageable databases.

The hierarchical-topology design options with multiarea OSPF can offer the following advantages.

  • Smaller routing tables – Tables are smaller because there are fewer routing table entries. This is because network addresses can be summarized between areas. Route summarization is not enabled by default.
  • Reduced link-state update overhead – Designing multiarea OSPF with smaller areas minimizes processing and memory requirements.
  • Reduced frequency of SPF calculations – Multiarea OSPF localize the impact of a topology change within an area. For instance, it minimizes routing update impact because LSA flooding stops at the area boundary.

For example, in the figure R2 is an ABR for area 51. A topology change in area 51 would cause all area 51 routers to rerun the SPF algorithm, create a new SPF tree and update their IP routing tables. The ABR, R2, would send an LSA to routers in the area 0, which would eventually be flooded to all routers in the OSPF routing domain. This type of LSA does not cause routers in other areas to rerun the SPF algorithm. They only have to update their LSDB and routing table.

Link Change Impacts Local Area Only

Link Change Impacts Local Area Only
Link Change Impacts Local Area Only
  • Link failure affects the local area only (area 51).
  • The ABR (R2) isolates the flooding of a specific LSA to area 51.
  • Routers in areas 0 and 1 do not need to run the SPF algorithm.

OSPFv3

OSPFv3 is the OSPFv2 equivalent for exchanging IPv6 prefixes. Recall that in IPv6, the network address is referred to as the prefix and the subnet mask is called the prefix-length.

Similar to its IPv4 counterpart, OSPFv3 exchanges routing information to populate the IPv6 routing table with remote prefixes.

Note: With the OSPFv3 Address Families feature, OSPFv3 includes support for both IPv4 and IPv6. OSPF Address Families is beyond the scope of this curriculum.

OSPFv2 runs over the IPv4 network layer, communicating with other OSPF IPv4 peers, and advertising only IPv4 routes.

OSPFv3 has the same functionality as OSPFv2, but uses IPv6 as the network layer transport, communicating with OSPFv3 peers and advertising IPv6 routes. OSPFv3 also uses the SPF algorithm as the computation engine to determine the best paths throughout the routing domain.

OSPFv3 has separate processes from its IPv4 counterpart. The processes and operations are basically the same as in the IPv4 routing protocol, but run independently. OSPFv2 and OSPFv3 each have separate adjacency tables, OSPF topology tables, and IP routing tables, as shown in the figure.

The OSPFv3 configuration and verification commands are similar to those used in OSPFv2.

shows two routers simultaneously running multiple OSPF processes. One for OSPFv2 and another for OSPFv3 and IPv6. Each OSPF process will have its own Neighbor Table, Topology table, and Routing Table

OSPFv2 and OSPFv3 Data Structures

OSPFv2 vs OSPFv3 Data Structures
OSPFv2 vs OSPFv3 Data Structures

Glossary: If you have doubts about any special term, you can consult this computer network dictionary.

Ready to go! Keep visiting our networking course blog, give Like to our fanpage; and you will find more tools and concepts that will make you a networking professional.

OSPF Packets CCNA
Previous
OSPF Packets
More Goodies
Configure Initial Router Settings CCNA
Configure Initial Router Settings