Back to Command Reference
Global ConfigDomain 6.0

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

Execution ModeRouter(config)#
Submode PromptRouter(config-router)#
Underlying ProtocolLink-State (AD: 110)
Negation Commandno router ospf [process-id]

Syntax & Parameters

router ospf [process-id]

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.

Router(config)# router ospf 10
Router(config-router)# router-id 1.1.1.1
! The process is now active and this router will identify itself as 1.1.1.1 to all neighbors.

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.

Router(config-router)# router-id 2.2.2.2
% OSPF: Reload or use "clear ip ospf process" command, for this to take effect
Router# clear ip ospf process
Reset ALL OSPF processes? [no]: yes

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.