clear ip ospf

Clears OSPF process, counters, neighbors, or routes.
Syntax
clear ip ospf all
clear ip ospf neighbor { A.B.C.D | all } [ ethernet unit/slot/port | lag lag-id | tunnel number | ve vlan_id ]
clear ip ospf routes { A.B.C.D/L | all }
clear ip ospf traffic
Parameters
all

Globally resets (disables then re-enables) OSPF without deleting the OSPF configuration information.

neighbor
Clears the specified neighbor, or clears all neighbors.
A.B.C.D
Specifies the IP address of the neighbor to clear.
all
Clears all neighbors.
ethernet unit/slot/port
Specifies the Ethernet interface and the interface ID in the format unit/slot/port.
lag lag-id
Specifies the LAG virtual interface.
tunnel number
Specifies a tunnel.
ve vlan_id
Specifies a virtual Ethernet (VE) interface.
routes
Clears matching routes or clears all routes.
A.B.C.D
Clears all routes that match the prefix and mask that you specify.
all
Clears all routes.
traffic
Clears OSPF counters and errors.
Modes

User EXEC mode

Examples

The following example resets OSPF without deleting the OSPF configuration.

device# clear ip ospf all
 
History
Release version Command history
08.0.61 This command was modified to add lag lag-id options.