Clears OSPF data processes, graceful
restart, counters, neighbors, or routes.
Syntax
clear ip ospfall[vrfvrf-name]clear ip ospfgraceful-restart{vrfvrf-name|all-vrf}clear ip ospfcounters{all|ethernetslot/port|loopbacknumber|port-channelnumber|vevlan-id}[vrfvrf-name]clear ip ospfneighbor{ip-addr|all}[vrfvrf-name]clear ip ospfroutes{ip-addr/mask|all}[vrfvrf-name]
Parameters
all
Clears all OSPF data processes.
vrfname
Specifies a VRF.
grvrf-name
Gracefully restarts the OSPF session for the specified VRF. If no VRF is
specified, the default-vrf session is restarted.
counters
Clears OSPF counters.
all
Clears all counters.
ethernetslot/port
Specifies an Ethernet slot and port.
loopbacknumber
Specifies a loopback interface. Valid values range from 1 through 255.
port-channelnumber
Specifies a
port-channel.
vevlan-id
Specifies a virtual Ethernet (VE) interface. Valid values range from 1 through 4096.
neighbor
Clears neighbors.
ip-addr
Specifies the IP address of the neighbor.
all
Clears all neighbors.
routes
Clears matching routes or clears all routes.
ip-addr/mask
Clears all routes that match the prefix and mask that you specify.
all
Clears all routes.
Modes
Privileged EXEC mode
Examples
The following example restarts all OSPF
processes.
device# clear ip ospf all
This example gracefully restarts the OSPF session for the VRF named "red."