OSPF Basics

Understanding Open Shortest Path First Protocol

OSPF (Open Shortest Path First) is a link-state routing protocol used to find the best path between the source and the destination router using its own Shortest Path First (SPF) algorithm (Dijkstra's algorithm).

Open Standard

Unlike EIGRP, OSPF is an open standard protocol, meaning it is supported by almost all network vendors, including Cisco, Juniper, and HP.

Key Features

OSPF Tables

Table Name Description Command
Neighbor Table Lists directly connected OSPF neighbors (Adjacencies). show ip ospf neighbor
Database Table Contains the map of the network topology (LSDB). show ip ospf database
Routing Table Contains the best paths calculated by SPF. show ip route ospf

OSPF Packet Types

OSPF uses five distinct packet types to establish neighbors and exchange routing information:

OSPF Router Roles

DR & BDR Election

On multi-access networks (like Ethernet), OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR) to minimize traffic. Routers only exchange updates with the DR/BDR.

Basic Configuration

Router(config)# router ospf 1
Router(config-router)# network 192.168.10.0 0.0.0.255 area 0
Router(config-router)# router-id 1.1.1.1
Router(config-router)# passive-interface gigabitEthernet0/1
Go to OSPF Single Area Lab →