OSPF process flow
In order to understand how OSPF works, it is first important to have a firm grasp of the overall OSPF process flow, which is shown below.
- Discover OSPF Neighbor
- Synchronize LSDB
- Run the SPF algorithm to register the best route in the routing table
- Maintaining Neighbor
Discover OSPF Neighbor
In the case of RIP, the RIP route is suddenly sent by multicast. RIP routes are sent with a bit of laxity, thinking that if there is a RIP router on the same network, it will receive them. In comparison, OSPF discovers neighbors first. Neighbors are other OSPF routers on the same network; OSPF Hello packets are used to find other OSPF routers, recognize them as neighbors, and then exchange OSPF with them.
Then, LSAs are exchanged with the neighbor to synchronize the LSDB. At that time, DD packets, LSR packets, LSU packets, and LSAck packets are used to synchronize the LSDB between OSPF routers on the same network since they are basically neighbors. LSDB synchronization is done between OSPF routers on the same network, and eventually all OSPF routers in the same area will maintain the identical LSDB.
Run the SPF algorithm to register the best route in the routing table
Once the LSDB synchronization is complete, each OSPF router will run the SPF algorithm to determine the best route for each. In this case, OSPF cost is used as a metric. The optimal route is registered in the routing table so that IP packets can be routed.
After that, Hello packets are exchanged periodically to verify that the neighbor is working properly.
If there is a change in the network diagram, such as a failure or the addition of a new network, the Trigard update will notify the change. LSU packets are used for this purpose.
For more detailed OSPF processing, please see the following articles.
How the OSPF works
- OSPF Overview
- OSPF process flow
- OSPF Router ID : Identify OSPF routers
- What if the router ID of the OSPF router is duplicated?
- OSPF Neighbor and Adjacency
- OSPF DR/BDR
- How show ip ospf neighbor looks on Ethernet
- OSPF Network Type : Classification of OSPF-enabled interfaces
- Synchronization process of OSPF LSDB
- Problems with large-scale OSPF network
- OSPF Area – Inside the area, in detail; outside the area, just a summary
- OSPF Router Type
- OSPF LSA Type
- OSPF Area Type
- OSPF Basic Configuration and Verification Commands
- Details of enabling OSPF on the interface
- OSPF Advertising Loopback Interface
- Configuring and Verifying OSPF Hello/Dead interval
- OSPF Cost Configuration and Verification
- Configuring and Verifying OSPF Router Priority
- Configuring OSPF Neighbor Authentication
- Neighbor Authentication over Virtual-link
- OSPF Configuring and Verifying Stub area [Cisco]
- OSPF Stub Area Configuration Example [Cisco]
- OSPF default route generation : default-information originate command
- Configuration Example of OSPF default route generation : stub area
- OSPF Virtual-Link : Virtual area 0 point-to-point link
- Configuring and Verifying OSPF Virtual-link [Cisco]
- OSPF Virtual-link Configuration Example [Cisco]
- OSPF Virtual-link for discontinuous backbone configuration example
- OSPF Route Summary and Configuration
- Cisco OSPF Route Summary Configuration Example
- OSPF Route Type Preference
- Why the OSPF neighbor state gets stuck in Exstart?
- OSPF packet type and header format
- OSPF Hello Packet
- OSPF DD(Database Description) Packet
- OSPF LSR(Link State Request) Packet
- OSPF LSU(Link State Update) Packet
- OSPF LSAck(Link State Acknowledgement) Packet
- Limitation of OSPF redistribution routes – redistribute maximum-prefix command
- Overview of LSA Filters for OSPF – Filter LSA Type 3/Type 5
- Configuration example of LSA type 3 filter
- Configuration example of LSA type 5 filter
- OSPFv3 Configuration Example [Cisco]
- Configuration Example of OSPFv3 Route Summary [Cisco]