![]() |
Table Of Contents
OSPF Limit on Number of Redistributed Routes
Prerequisites for OSPF Limit on Number of Redistributed Routes
Information About OSPF Limit on Number of Redistributed Routes
Benefits of OSPF Limit on Number of Redistributed Routes
Limiting the Number of OSPF Redistributed Routes
Requesting a Warning About the Number of Routes Redistributed into OSPF
Configuration Examples for OSPF Limit on Number of Redistributed Routes
OSPF Limit on Number of Redistributed Routes: Example
Requesting a Warning About the Number of Redistributed Routes: Example
OSPF Limit on Number of Redistributed Routes
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.
History for the OSPF Limit on Number of Redistributed Routes Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Prerequisites for OSPF Limit on Number of Redistributed Routes
•
Information About OSPF Limit on Number of Redistributed Routes
•
Configuration Examples for OSPF Limit on Number of Redistributed Routes
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.
Information About OSPF Limit on Number of Redistributed Routes
Before you limit the number of OSPF redistributed routes, you should understand the concept described in this section.
•
Benefits of OSPF Limit on Number of Redistributed Routes
Benefits of OSPF Limit on Number of Redistributed Routes
If someone mistakenly injects a large number of IP routes into OSPF, perhaps by redistributing Border Gateway Protocol (BGP) into OSPF, the network can be severely flooded. Limiting the number of redistributed routes prevents this potential problem.
How to Limit the Number of OSPF Redistributed Routes or Receive a Warning About the Number of OSPF Redistributed Routes
This section contains the following procedures, which are mutually exclusive. That is, you cannot both limit redistributed prefixes and also choose to be warned.
•
Limiting the Number of OSPF Redistributed Routes
•
Requesting a Warning About the Number of Routes Redistributed into OSPF
Limiting the Number of OSPF Redistributed Routes
This task describes how to limit the number of OSPF redistributed routes. If the number of redistributed routes reaches the maximum value configured, no more routes will be redistributed.
The redistribution limit applies to all IP redistributed prefixes, including summarized ones. The redistribution limit does not apply to default routes or prefixes that are generated as a result of Type-7 to Type-5 translation.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
router ospf process-id
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]
5.
redistribute maximum-prefix maximum [threshold]
6.
end
7.
show ip ospf [process-id]
DETAILED STEPS
Requesting a Warning About the Number of Routes Redistributed into OSPF
This task describes how to cause the system to generate a warning message when the number of redistributed prefixes reaches a maximum value. However, additional redistribution is not prevented.
The redistribution count applies to external IP prefixes, including summarized routes. Default routes and prefixes that are generated as a result of Type-7 to Type-5 translation are not considered.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
router ospf process-id
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]
5.
redistribute maximum-prefix maximum [threshold] warning-only
6.
end
DETAILED STEPS
Configuration Examples for OSPF Limit on Number of Redistributed Routes
This section contains the following examples:
•
OSPF Limit on Number of Redistributed Routes: Example
•
Requesting a Warning About the Number of Redistributed Routes: Example
OSPF Limit on Number of Redistributed Routes: Example
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 subnetsredistribute maximum-prefix 1200 80Requesting a Warning About the Number of Redistributed Routes: Example
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 1network 10.0.0.0 0.0.0.255 area 0 redistribute eigrp 10 subnetsredistribute maximum-prefix 600 85 warning-onlyAdditional References
The following sections provide references related to OSPF Limit on Number of Redistributed Routes.
Related Documents
Standards
Standards TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
MIBs MIBs LinkNone
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
RFCs
RFCs TitleNo new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
—
Technical Assistance
Command Reference
This section documents modified commands only.
redistribute maximum-prefix
To limit the number of prefixes redistributed into Open Shortest Path First (OSPF) or to generate a warning when the number of prefixes redistributed into OSPF reaches a maximum, use the redistribute maximum-prefix command in router configuration mode. To remove the values, use the no form of this command.
redistribute maximum-prefix maximum [seconds] [warning-only | withdraw]
no redistribute maximum-prefix
Syntax Description
Defaults
seconds: 75 percent
Command Modes
Router configuration
Command History
Usage Guidelines
If someone mistakenly injects a large number of IP routes into IS-IS, perhaps by redistributing Border Gateway Protocol (BGP) into IS-IS, the network can be severely flooded. Limiting the number of redistributed routes prevents this potential problem.
When the redistributed maximum-prefix command is configured, if the number of redistributed routes reaches the maximum value configured, no more routes will be redistributed (unless the warning-only keyword was configured).
The redistribution limit applies only to external IP prefixes. Default routes and summarized routes are not limited.
The limit is tracked separately for each not-so-stubby-area (NSSA) because redistribution to NSSAs is done independently for each NSSA and independently of all other regular areas.
Select a maximum value based on your knowledge of how many prefixes are redistributed on the router to the OSPF process.
Examples
Examples for IS-IS Protocol
This example sets a maximum of 600 prefixes that can be redistributed into IS-IS. If the number of prefixes redistributed reaches 75 percent of 600 (450 prefixes), a warning message is logged.
router isisredistribute maximum-prefix 600This example sets a maximum of 1200 prefixes that can be redistributed into IS-IS. If the number of prefixes redistributed reaches 80 percent of 1200 (960 prefixes), a warning message is logged.
router isisredistribute maximum-prefix 1200 80This 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 isisredistribute maximum-prefix 600 85 warning-onlyThis example sets a maximum of 2000 prefixes that can be redistributed into OSPF process 1. If the number of prefixes redistributed reaches 75 percent of 2000 (1500 prefixes), a warning message is logged. Another warning is logged if the limit is reached, and no more routes are redistributed.
Examples for OSPF Routing Protocol
router ospf 1network 10.0.0.0 0.0.0.255 area 0redistribute eigrp 10 subnetsredistribute maximum-prefix 2000This example sets a maximum of 1200 prefixes that can be redistributed into OSPF process 1. If the number of prefixes redistributed reaches 80 percent of 1200 (960 prefixes), a warning message is logged. Another warning is logged if the limit is reached, and no more routes are redistributed.
router ospf 1network 10.0.0.0 0.0.0.255 area 0redistribute eigrp 10 subnetsredistribute maximum-prefix 1200 80This 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 1network 10.0.0.0 0.0.0.255 area 0redistribute eigrp 10 subnetsredistribute maximum-prefix 600 85 warning-onlyshow ip ospf
To display general information about Open Shortest Path First (OSPF) routing processes, use the show ip ospf command in EXEC mode.
show ip ospf [process-id]
Syntax Description
process-id
(Optional) Process ID. If this argument is included, only information for the specified routing process is included.
Command Modes
EXEC
Command History
Examples
The following is sample output from the show ip ospf command when entered without a specific OSPF process ID:
Router# show ip ospf
Routing Process "ospf 201" with ID 10.0.0.1 and Domain ID 10.20.0.1Supports only single TOS(TOS0) routesSupports opaque LSASPF schedule delay 5 secs, Hold time between two SPFs 10 secsMinimum LSA interval 5 secs. Minimum LSA arrival 1 secsLSA group pacing timer 100 secsInterface flood pacing timer 55 msecsRetransmission pacing timer 100 msecsNumber of external LSA 0. Checksum Sum 0x0Number of opaque AS LSA 0. Checksum Sum 0x0Number of DCbitless external and opaque AS LSA 0Number of DoNotAge external and opaque AS LSA 0Number of areas in this router is 2. 2 normal 0 stub 0 nssaExternal flood list length 0Area BACKBONE(0)Number of interfaces in this area is 2Area has message digest authenticationSPF algorithm executed 4 timesArea ranges areNumber of LSA 4. Checksum Sum 0x29BEBNumber of opaque link LSA 0. Checksum Sum 0x0Number of DCbitless LSA 3Number of indication LSA 0Number of DoNotAge LSA 0Flood list length 0Area 172.16.26.0Number of interfaces in this area is 0Area has no authenticationSPF algorithm executed 1 timesArea ranges are192.168.0.0/16 Passive AdvertiseNumber of LSA 1. Checksum Sum 0x44FDNumber of opaque link LSA 0. Checksum Sum 0x0Number of DCbitless LSA 1Number of indication LSA 1Number of DoNotAge LSA 0Flood list length 0Table 1describes the significant fields shown in the display.
The following is an excerpt of output from the show ip ospf command when the OSPF Forwarding Address Suppression in Type-5 LSAs feature is configured:
Router# show ip ospf...Area 2Number of interfaces in this area is 4It is a NSSA areaPerform type-7/type-5 LSA translation, suppress forwarding address...Routing Process "ospf 1" with ID 192.168.0.1Supports only single TOS(TOS0) routesSupports opaque LSASupports Link-local Signaling (LLS)Initial SPF schedule delay 5000 msecsMinimum hold time between two consecutive SPFs 10000 msecsMaximum wait time between two consecutive SPFs 10000 msecsIncremental-SPF disabledMinimum LSA interval 5 secsMinimum LSA arrival 1000 msecsLSA group pacing timer 240 secsInterface flood pacing timer 33 msecsRetransmission pacing timer 66 msecsNumber of external LSA 0. Checksum Sum 0x0Number of opaque AS LSA 0. Checksum Sum 0x0Number of DCbitless external and opaque AS LSA 0Number of DoNotAge external and opaque AS LSA 0Number of areas in this router is 0. 0 normal 0 stub 0 nssaExternal flood list length 0Table 2 describes the significant fields shown in the display.
The following is sample output from the show ip ospf command. In this example, the user had configured the redistribution maximum-prefix command to set a limit of 2000 redistributed routes. Shortest Path First (SPF) throttling was configured with the timers throttle spf command.
Router# show ip ospf 1
Routing Process "ospf 1" with ID 10.0.0.1Supports only single TOS(TOS0) routesSupports opaque LSASupports Link-local Signaling (LLS)It is an autonomous system boundary routerRedistributing External Routes from,static, includes subnets in redistributionMaximum limit of redistributed prefixes 2000Threshold for warning message 75%Initial SPF schedule delay 5000 msecsMinimum hold time between two consecutive SPFs 10000 msecsMaximum wait time between two consecutive SPFs 10000 msecsTable 3 describes the significant fields shown in the display.
The following is sample output from the show ip ospf command. In this example, the user had configured LSA throttling, and those lines of output are displayed in bold.
Router# show ip ospf 1
Routing Process "ospf 4" with ID 10.10.24.4Supports only single TOS(TOS0) routesSupports opaque LSASupports Link-local Signaling (LLS)Initial SPF schedule delay 5000 msecsMinimum hold time between two consecutive SPFs 10000 msecsMaximum wait time between two consecutive SPFs 10000 msecsIncremental-SPF disabledInitial LSA throttle delay 100 msecs
Minimum hold time for LSA throttle 10000 msecs
Maximum wait time for LSA throttle 45000 msecs
Minimum LSA arrival 1000 msecsLSA group pacing timer 240 secsInterface flood pacing timer 33 msecsRetransmission pacing timer 66 msecsNumber of external LSA 0. Checksum Sum 0x0Number of opaque AS LSA 0. Checksum Sum 0x0Number of DCbitless external and opaque AS LSA 0Number of DoNotAge external and opaque AS LSA 0Number of areas in this router is 1. 1 normal 0 stub 0 nssaExternal flood list length 0Area 24Number of interfaces in this area is 2Area has no authenticationSPF algorithm last executed 04:28:18.396 agoSPF algorithm executed 8 timesArea ranges areNumber of LSA 4. Checksum Sum 0x23EB9Number of opaque link LSA 0. Checksum Sum 0x0Number of DCbitless LSA 0Number of indication LSA 0Number of DoNotAge LSA 0Flood list length 0The following is sample output from the show ip ospf command. In this example, the user had configured the redistribution maximum-prefix command to set a limit of 2000 redistributed routes. Shortest Path First (SPF) throttling was configured with the timers throttle spf command.
Router# show ip ospf 1
Routing Process "ospf 1" with ID 10.0.0.1Supports only single TOS(TOS0) routesSupports opaque LSASupports Link-local Signaling (LLS)It is an autonomous system boundary routerRedistributing External Routes from,static, includes subnets in redistributionMaximum limit of redistributed prefixes 2000Threshold for warning message 75%Initial SPF schedule delay 5000 msecsMinimum hold time between two consecutive SPFs 10000 msecsMaximum wait time between two consecutive SPFs 10000 msecsTable 4 describes significant fields shown in the display.
The following is sample output from the show ip ospf command. In this example, the user had configured LSA throttling, and those lines of output are displayed in bold.
Router# show ip ospf 1
Routing Process "ospf 4" with ID 10.10.24.4Supports only single TOS(TOS0) routesSupports opaque LSASupports Link-local Signaling (LLS)Initial SPF schedule delay 5000 msecsMinimum hold time between two consecutive SPFs 10000 msecsMaximum wait time between two consecutive SPFs 10000 msecsIncremental-SPF disabledInitial LSA throttle delay 100 msecs
Minimum hold time for LSA throttle 10000 msecs
Maximum wait time for LSA throttle 45000 msecs
Minimum LSA arrival 1000 msecsLSA group pacing timer 240 secsInterface flood pacing timer 33 msecsRetransmission pacing timer 66 msecsNumber of external LSA 0. Checksum Sum 0x0Number of opaque AS LSA 0. Checksum Sum 0x0Number of DCbitless external and opaque AS LSA 0Number of DoNotAge external and opaque AS LSA 0Number of areas in this router is 1. 1 normal 0 stub 0 nssaExternal flood list length 0Area 24Number of interfaces in this area is 2Area has no authenticationSPF algorithm last executed 04:28:18.396 agoSPF algorithm executed 8 timesArea ranges areNumber of LSA 4. Checksum Sum 0x23EB9Number of opaque link LSA 0. Checksum Sum 0x0Number of DCbitless LSA 0Number of indication LSA 0Number of DoNotAge LSA 0Flood list length 0show ip ospf database
To display lists of information related to the Open Shortest Path First (OSPF) database for a specific router, use the show ip ospf database command in EXEC mode.
show ip ospf [process-id area-id] database
show ip ospf [process-id area-id] database [adv-router [ip-address]]
show ip ospf [process-id area-id] database [asbr-summary] [link-state-id]
show ip ospf [process-id area-id] database [asbr-summary] [link-state-id] [adv-router
[ip-address]]show ip ospf [process-id area-id] database [asbr-summary] [link-state-id] [self-originate]
[link-state-id]show ip ospf [process-id area-id] database [database-summary]
show ip ospf [process-id] database [external] [link-state-id]
show ip ospf [process-id] database [external] [link-state-id] [adv-router [ip-address]]
show ip ospf [process-id area-id] database [external] [link-state-id] [self-originate]
[link-state-id]show ip ospf [process-id area-id] database [network] [link-state-id]
show ip ospf [process-id area-id] database [network] [link-state-id] [adv-router [ip-address]]
show ip ospf [process-id area-id] database [network] [link-state-id] [self-originate]
[link-state-id]show ip ospf [process-id area-id] database [nssa-external] [link-state-id]
show ip ospf [process-id area-id] database [nssa-external] [link-state-id] [adv-router
[ip-address]]show ip ospf [process-id area-id] database [nssa-external] [link-state-id] [self-originate]
[link-state-id]show ip ospf [process-id area-id] database [router] [link-state-id]
show ip ospf [process-id area-id] database [router] [adv-router [ip-address]]
show ip ospf [process-id area-id] database [router] [self-originate] [link-state-id]
show ip ospf [process-id area-id] database [self-originate] [link-state-id]
show ip ospf [process-id area-id] database [summary] [link-state-id]
show ip ospf [process-id area-id] database [summary] [link-state-id] [adv-router [ip-address]]
show ip ospf [process-id area-id] database [summary] [link-state-id] [self-originate]
[link-state-id]Syntax Description
Command Modes
EXEC
Command History
Usage Guidelines
The various forms of this command deliver information about different OSPF link state advertisements.
Examples
The following is sample output from the show ip ospf database command when no arguments or keywords are used:
Router# show ip ospf databaseOSPF Router with id(192.168.239.66) (Process ID 300)Displaying Router Link States(Area 0.0.0.0)Link ID ADV Router Age Seq# Checksum Link count172.16.21.6 172.16.21.6 1731 0x80002CFB 0x69BC 8172.16.21.5 172.16.21.5 1112 0x800009D2 0xA2B8 5172.16.1.2 172.16.1.2 1662 0x80000A98 0x4CB6 9172.16.1.1 172.16.1.1 1115 0x800009B6 0x5F2C 1172.16.1.5 172.16.1.5 1691 0x80002BC 0x2A1A 5172.16.65.6 172.16.65.6 1395 0x80001947 0xEEE1 4172.16.241.5 172.16.241.5 1161 0x8000007C 0x7C70 1172.16.27.6 172.16.27.6 1723 0x80000548 0x8641 4172.16.70.6 172.16.70.6 1485 0x80000B97 0xEB84 6Displaying Net Link States(Area 0.0.0.0)Link ID ADV Router Age Seq# Checksum172.16.1.3 192.168.239.66 1245 0x800000EC 0x82EDisplaying Summary Net Link States(Area 0.0.0.0)Link ID ADV Router Age Seq# Checksumould yopu172.16.240.0 172.16.241.5 1152 0x80000077 0x7A05172.16.241.0 172.16.241.5 1152 0x80000070 0xAEB7172.16.244.0 172.16.241.5 1152 0x80000071 0x95CBTable 5 describes the significant fields shown in the display.
The following is sample output from the show ip ospf database command with the asbr-summary keyword:
Router# show ip ospf database asbr-summaryOSPF Router with id(192.168.239.66) (Process ID 300)Displaying Summary ASB Link States(Area 0.0.0.0)LS age: 1463Options: (No TOS-capability)LS Type: Summary Links(AS Boundary Router)Link State ID: 172.16.245.1 (AS Boundary Router address)Advertising Router: 172.16.241.5LS Seq Number: 80000072Checksum: 0x3548Length: 28Network Mask: 0.0.0.0 TOS: 0 Metric: 1Table 6 describes the significant fields shown in the display.
The following is sample output from the show ip ospf database command with the external keyword:
Router# show ip ospf database externalOSPF Router with id(192.168.239.66) (Autonomous system 300)Displaying AS External Link StatesLS age: 280Options: (No TOS-capability)LS Type: AS External LinkLink State ID: 10.105.0.0 (External Network Number)Advertising Router: 172.16.70.6LS Seq Number: 80000AFDChecksum: 0xC3ALength: 36Network Mask: 255.255.0.0Metric Type: 2 (Larger than any link state path)TOS: 0Metric: 1Forward Address: 0.0.0.0External Route Tag: 0Table 7 describes the significant fields shown in the display.
The following is sample output from the show ip ospf database command with the network keyword:
Router# show ip ospf database networkOSPF Router with id(192.168.239.66) (Process ID 300)Displaying Net Link States(Area 0.0.0.0)LS age: 1367Options: (No TOS-capability)LS Type: Network LinksLink State ID: 172.16.1.3 (address of Designated Router)Advertising Router: 192.168.239.66LS Seq Number: 800000E7Checksum: 0x1229Length: 52Network Mask: 255.255.255.0Attached Router: 192.168.239.66Attached Router: 172.16.241.5Attached Router: 172.16.1.1Attached Router: 172.16.54.5Attached Router: 172.16.1.5Table 8 describes the significant fields shown in the display.
The following is sample output from the show ip ospf database command with the router keyword:
Router# show ip ospf database routerOSPF Router with id(192.168.239.66) (Process ID 300)Displaying Router Link States(Area 0.0.0.0)LS age: 1176Options: (No TOS-capability)LS Type: Router LinksLink State ID: 172.16.21.6Advertising Router: 172.16.21.6LS Seq Number: 80002CF6Checksum: 0x73B7Length: 120AS Boundary Router155 Number of Links: 8Link connected to: another Router (point-to-point)(link ID) Neighboring Router ID: 172.16.21.5(Link Data) Router Interface address: 172.16.21.6Number of TOS metrics: 0TOS 0 Metrics: 2Table 9 describes the significant fields shown in the display.
The following is sample output from show ip ospf database command with the summary keyword:
Router# show ip ospf database summaryOSPF Router with id(192.168.239.66) (Process ID 300)Displaying Summary Net Link States(Area 0.0.0.0)LS age: 1401Options: (No TOS-capability)LS Type: Summary Links(Network)Link State ID: 172.16.240.0 (summary Network Number)Advertising Router: 172.16.241.5LS Seq Number: 80000072Checksum: 0x84FFLength: 28Network Mask: 255.255.255.0 TOS: 0 Metric: 1Table 10 describes the significant fields shown in the display.
The following is sample output from show ip ospf database command with the database-summary keyword:
Router# show ip ospf database database-summaryOSPF Router with ID (10.0.0.1) (Process ID 1)Area 0 database summaryLSA Type Count Delete MaxageRouter 3 0 0Network 0 0 0Summary Net 0 0 0Summary ASBR 0 0 0Type-7 Ext 0 0 0Self-originated Type-7 0Opaque Link 0 0 0Opaque Area 0 0 0Subtotal 3 0 0Process 1 database summaryLSA Type Count Delete MaxageRouter 3 0 0Network 0 0 0Summary Net 0 0 0Summary ASBR 0 0 0Type-7 Ext 0 0 0Opaque Link 0 0 0Opaque Area 0 0 0Type-5 Ext 0 0 0Self-originated Type-5 200Opaque AS 0 0 0Total 203 0 0Table 11 describes the significant fields shown in the display.
© 2003, 2005 Cisco Systems, Inc. All rights reserved.