OSPFPrivileged EXEC

clear ip ospf process

Resets the OSPF process on the router, forcing it to re-establish all neighbor adjacencies and re-learn routes.

Syntax·Privileged EXEC
clear ip ospf process

When to Use This Command

  • After modifying OSPF configuration parameters like router-id, network statements, or timers, to apply changes without reloading the router.
  • When troubleshooting OSPF neighbor issues, to clear stuck adjacencies and force a fresh database exchange.
  • After changing the OSPF router-id, to ensure the new ID is used in all OSPF packets.
  • When OSPF routes are not being learned correctly, to reset the process and re-advertise routes.

Command Examples

Basic OSPF process reset

clear ip ospf process
Reset ALL OSPF processes? [no]: y
*Mar  1 00:05:23.123: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 00:05:23.124: %OSPF-5-ADJCHG: Process 1, Nbr 10.0.0.2 on Serial0/0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 00:05:25.456: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
*Mar  1 00:05:27.789: %OSPF-5-ADJCHG: Process 1, Nbr 10.0.0.2 on Serial0/0/0 from LOADING to FULL, Loading Done

The command prompts for confirmation. After confirming, OSPF neighbors go DOWN and then re-establish. The output shows neighbor IPs, interfaces, and state transitions (FULL to DOWN, then LOADING to FULL).

Clearing OSPF process with specific process ID

clear ip ospf 1 process
Reset OSPF process 1? [no]: y
*Mar  1 00:10:15.321: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 00:10:17.654: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on GigabitEthernet0/0 from LOADING to FULL, Loading Done

Specifying the process ID (1) resets only that OSPF process. The output shows only neighbors for process 1, with state transitions similar to the basic command.

Understanding the Output

The output consists of syslog messages indicating OSPF adjacency changes. Each line shows the process ID, neighbor router ID, interface, old state, new state, and reason. When the process resets, neighbors transition from FULL to DOWN, then after the exchange, from LOADING to FULL. A successful reset shows all neighbors returning to FULL. If a neighbor fails to come up, it may remain in INIT or EXSTART state, indicating a configuration or connectivity issue. Watch for consistent DOWN messages without subsequent FULL messages, which suggest persistent problems.

CCNA Exam Tips

1.

CCNA exam tip: The command requires confirmation; you must answer 'yes' to proceed. The exam may test that you know the confirmation prompt.

2.

CCNA exam tip: Resetting OSPF process is disruptive; it tears down all adjacencies temporarily. Use only when necessary.

3.

CCNA exam tip: After changing the router-id, you must clear the OSPF process or reload the router for the new ID to take effect.

4.

CCNA exam tip: The command does not affect OSPF configuration; it only resets the dynamic process.

Common Mistakes

Mistake 1: Forgetting to confirm with 'y' — the command will not execute and no reset occurs.

Mistake 2: Using this command in user EXEC mode instead of privileged EXEC mode; it will be rejected.

Mistake 3: Assuming the reset is instantaneous; it takes a few seconds for neighbors to re-establish, causing temporary route loss.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions