The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Cisco NX-OS Open Shortest Path First (OSPF) commands that begin with C.
To clear neighbor statistics and reset adjacencies for Open Shortest Path First (OSPF), use the clear ip ospf neighbor command.
clear ip ospf [instance-tag] neighbor {* | neighbor-id | interface-type number | loopback number | port-channel number} [vrf vrf-name]
None
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the clear ip ospf neighbor command to clear neighbor information from the show ip ospf neighbor command. Use the instance-tag argument to clear the neighbor details from one OSPF instance. If you do not use the instance-tag argument, Cisco NX-OS clears the neighbor details from all OSPF instances. Use the show ip ospf neighbor command to find the neighbor ID.
This command requires the LAN Base Services license.
This example shows how to clear all OSPF neighbor details for neighbor 192.0.2.1 for instance tag 201:
switch# clear ip ospf 201 neighbor 192.0.2.1
This example shows how to clear all OSPF neighbor details for all OSPF instances:
switch# clear ip ospf neighbor *
This example shows how to clear all OSPF neighbor details for all neighbors on Ethernet interface 1/2 for OSPF instance 202:
switch# clear ip ospf 202 neighbor ethernet 1/2
|
|
---|---|
show ip ospf neighbor |
Displays details for OSPF neighbors including the neighbor ID. |
To clear policy statistics for Open Shortest Path First (OSPF), use the clear ip ospf policy statistics command.
clear ip ospf [instance-tag] policy statistics {area area-id filter-list {in | out} | redistribute {bgp autonomous-system | direct | eigrp id | ospf id | rip id | static}} [vrf vrf-name]
None
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the clear ip ospf statistics command to learn the policy statistics shown in the show ip ospf policy statistics command. Use the instance-tag argument to clear the policy statistics from one OSPF instance. If you do not specify the instance tag, Cisco NX-OS clears the policy statistics from all OSPF instances. Use the show ip ospf policy statistics command to to view the statistics that you are clearing.
This command requires the LAN Base Services license.
This example shows how to clear all OSPF policy statistics for area 99 inbound filtered routes for OSPF 201:
switch# clear ip ospf 201 policy statistics area 99 filter-list in
This example shows how to clear all OSPF policy statistics for all BGP redistributed routes for OSPF 202:
switch# clear ip ospf 202 policy statistics redistribute bgp
|
|
---|---|
show ip ospf policy statistics |
Displays details for OSPF policies. |
To clear redistribution information for Open Shortest Path First (OSPF) , use the clear ip ospf redistribution command.
clear ip ospf redistribution [vrf {vrf-name | all | default | management}]
None
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Base Services license.
This example shows how to clear redistribution information:
switch# clear ip ospf redistribution
|
|
---|---|
feature ospf |
Enables the OSPF feature. |
To clear Open Shortest Path First (OSPF) event statistics, use the clear ip ospf statistics command.
clear ip ospf [instance-tag] statistics [vrf vrf-name]
None
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the clear ip ospf statistics command to clear the event statistics from one or more OSPF instances. If you do not specify the instance-tag argument, Cisco NX-OS clears statistics from all OSPF instances. Use the show ip ospf statistics command to to view the statistics that you are clearing.
This command requires the LAN Base Services license.
This example shows how to clear all OSPF event statistics:
switch# clear ip ospf statistics
|
|
---|---|
show ip ospf statistics |
Displays event statistics for OSPF. |
To clear Open Shortest Path First (OSPF) traffic statistics, use the clear ip ospf traffic command.
clear ip ospf [instance-tag] traffic [interface] [vrf vrf-name]
None
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
Use the clear ip ospf traffic command to clear the traffic statistics from one or more OSPF instances. If you do not specify the instance-tag argument, Cisco NX-OS clears traffic statistics from all OSPF instances. Use the show ip ospf traffic statistics command to view the statistics that you are clearing.
This command requires the LAN Base Services license.
This example shows how to clear OSPF traffic statistics for OSPF 100:
switch# clear ip ospf 100 traffic
|
|
---|---|
show ip ospf traffic statistics |
Displays OSPF traffic statistics. |
To clear IP traffic information, use the clear ip traffic command.
clear ip traffic
This command has no arguments or keywords.
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This example shows how to clear the IP traffic information:
switch(config)# clear ip traffic
|
|
---|---|
show ip traffic |
Displays IP traffic information. |