Prerequisites for OSPF Limit on Number of Redistributed Routes
It is presumed that you have OSPF configured in your network, along with another protocol or another OSPF process you are redistributing.
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.
Open Shortest Path First (OSPF) supports a user-defined maximum number of prefixes (routes) that are allowed to be redistributed into OSPF from other protocols or other OSPF processes. Such a limit could help prevent the router from being flooded by too many redistributed routes.
It is presumed that you have OSPF configured in your network, along with another protocol or another OSPF process you are redistributing.
If large number of IP routes are sent into OSPF by redistributing Border Gateway Protocol (BGP) into OSPF, the network can be severely flooded. Limiting the number of redistributed routes prevents this potential problem.
OSPF can receive and accept packets from non-routable addresses (for example, 0.0.0.0/7) also.
This section contains the following procedures, which are mutually exclusive. That is, you cannot both limit redistributed prefixes and also choose to be warned.
Note |
You cannot both limit redistributed prefixes and also choose to be warned. |
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
||
Step 2 |
configure terminal Example:
|
Enters global configuration mode. |
||
Step 3 |
router ospf process-id Example:
|
Configures an OSPF routing process. |
||
Step 4 |
redistribute protocol [process-id | as-number ] [metric metric-value ] [metric-type type-value ] [match {internal | external 1 | external 2 }] [tag tag-value ] [route-map map-tag ] [subnets ] Example:
|
Redistributes routes from one routing domain into another routing domain. |
||
Step 5 |
redistribute maximum-prefix maximum [threshold ] Example:
|
Sets a maximum number of IP prefixes that are allowed to be redistributed into OSPF.
|
||
Step 6 |
end Example:
|
Exits router configuration mode. |
||
Step 7 |
show ip ospf [process-id ] Example:
|
(Optional) Displays general information about OSPF routing processes.
|
Note |
You cannot both limit redistributed prefixes and also choose to be warned. |
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
|
Enters global configuration mode. |
Step 3 |
router ospf process-id Example:
|
Configures an OSPF routing process. |
Step 4 |
redistribute protocol [process-id | as-number ] [metric metric-value ] [metric-type type-value ] [match {internal | external 1 | external 2 }] [tag tag-value ] [route-map map-tag ] [subnets ] Example:
|
Redistributes routes from one routing domain into another routing domain. |
Step 5 |
redistribute maximum-prefix maximum [threshold ] warning-only Example:
|
Causes a warning message to be logged when the maximum number of IP prefixes has been redistributed into OSPF.
|
Step 6 |
end Example:
|
Exits router configuration mode. |
This example sets a maximum of 1200 prefixes that can be redistributed into OSPF process 1. Prior to reaching the limit, when the number of prefixes redistributed reaches 80 percent of 1200 (960 prefixes), a warning message is logged. Another warning is logged when the limit is reached and no more routes are redistributed.
router ospf 1
router-id 10.0.0.1
domain-id 5.6.7.8
log-adjacency-changes
timers lsa-interval 2
network 10.0.0.1 0.0.0.0 area 0
network 10.1.5.1 0.0.0.0 area 0
network 10.2.2.1 0.0.0.0 area 0
redistribute static subnets
redistribute maximum-prefix 1200 80
This example allows two warning messages to be logged, the first if the number of prefixes redistributed reaches 85 percent of 600 (510 prefixes), and the second if the number of redistributed routes reaches 600. However, the number of redistributed routes is not limited.
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
redistribute eigrp 10 subnets
redistribute maximum-prefix 600 85 warning-only
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
OSPF commands |
Cisco IOS IP Routing: OSPF Command Reference |
OSPFv3 Address Families |
OSPFv3 Address Families module |
Standards |
Title |
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
MIBs |
MIBs Link |
---|---|
No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature. |
To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFCs |
Title |
---|---|
RFC 5187. |
OSPFv3 Graceful Restart |
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
OSPF Limit on Number of Redistributed Routes |
Cisco IOS XE Release 2.1 Cisco IOS XE Release 2.6 |
OSPF supports a user-defined maximum number of prefixes (routes) that are allowed to be redistributed into OSPF from other protocols or other OSPF processes. Such a limit could help prevent the router from being flooded by too many redistributed routes. The following commands are introduced or modified in the feature documented in this module:
|
Feature Name |
Releases |
Feature Information |
---|---|---|
OSPF Limit on Number of Redistributed Routes |
Cisco IOS XE Release 17.4 |
This feature was introduced. |