router ospf [process-id]
Initializes an Open Shortest Path First (OSPF) routing process on the router and transitions the CLI into Router Configuration Mode. This enables the device to begin building neighbor adjacencies, exchanging Link-State Advertisements (LSAs), and calculating the best paths using Dijkstra's algorithm.
Quick Reference
Router(config)#Router(config-router)#(AD: 110)no router ospf [process-id]Syntax & Parameters
The [process-id] is a numerical value between 1 and 65535.
This number is used purely by the router's internal CPU to distinguish between multiple database instances if you were running several different OSPF domains on the exact same hardware. In 99% of enterprise scenarios, you will only run a single process (usually router ospf 1).
CLI Deployment Scenarios
Scenario 1: Initializing and Setting the Router ID
You initialize the OSPF process. The very first best-practice step you should take is manually defining the Router ID so it doesn't arbitrarily pick an IP address from your active interfaces.
Scenario 2: The Soft Reset
If you change the Router ID after OSPF has already formed neighbor relationships, the change will not take effect until you clear the process and force OSPF to renegotiate.
CCNA Exam Gotchas
Process ID is Locally Significant Only
Cisco loves testing this: If Router A runs router ospf 1 and Router B runs router ospf 99, will they form an adjacency?
Yes! The OSPF Process ID is strictly local to the router's internal CPU. It does not need to match the neighbor. (This is a direct contrast to EIGRP, where the Autonomous System number must match).
The Automatic Router ID Election
If you forget to manually type router-id, OSPF will automatically pick one based on this strict hierarchy:
1. The highest IP address of any active Loopback interface.
2. If no loopbacks exist, the highest IP address of any active Physical interface.