RFC 1765
OSPF Database Overflow
OSPF Database Overflow ๐
Okay bestie, this is RFC 1765, written by J. Moy at Cascade ๐ It's in the Experimental category and dates from March 1995 ๐ Its title block doesn't list anything it obsoletes or updates, so it's a standalone doc ๐ฆ It belongs to the OSPF Working Group, and the team wants feedback at ospf@gated.cornell.edu ๐
Status of this Memo โจ
This memo defines an Experimental Protocol for the Internet community ๐งช It does not specify an Internet standard of any kind, so don't treat it like one ๐ The authors are asking for discussion and suggestions for improvement, and the memo can be distributed without any limits ๐ธ
Abstract ๐ฎ
Okay so OSPF only works if every OSPF router keeps an identical copy of the OSPF link-state database ๐ง But when that database gets really big, some routers might not have the resources to hold the whole thing ๐ฉ The memo calls this "database overflow" ๐ When overflow is expected, you can keep those resource-strapped routers happy by setting up OSPF stub areas and NSSAs ๐ซถ This memo is all about handling unexpected overflows gracefully ๐
This memo is a product of the OSPF Working Group. Comments go to ospf@gated.cornell.edu ๐
Table of Contents ๐
1. Overview ............................................... 2
2. Implementation details ................................. 3
2.1 Configuration .......................................... 3
2.2 Entering OverflowState ................................. 4
2.3 Operation while in OverflowState ....................... 5
2.3.1 Modifications to Flooding .............................. 5
2.3.2 Originating AS-external-LSAs ........................... 6
2.3.3 Receiving self-originated LSAs ......................... 6
2.4 Leaving OverflowState .................................. 6
3. An example ............................................. 6
4. Administrative response to database overflow ........... 7
5. Operational experience ................................. 8
6. Possible enhancements .................................. 8
A. Related MIB parameters ................................ 8
References ............................................ 9
Security Considerations ............................... 9
Author's Address ...................................... 9
1. Overview ๐ฆ
Okay so OSPF requires that every OSPF router inside a single area keeps an identical copy of the link-state database ๐ง The catch is that when the database becomes super large, some routers might run out of resources and not be able to store all of it, which is what we call "database overflow" ๐ญ For example, a regional network might have a massive OSPF database because it's importing a ton of external routes into OSPF ๐ If overflow isn't handled correctly, routers end up with inconsistent views of the network, and that can lead to incorrect routing ๐
One way to handle database overflow is to tuck resource-limited routers into OSPF stub areas (see Section 3.6 of [1]) or NSSAs ([2]) ๐ซถ AS-external-LSAs get left out of the link-state databases in those areas, so the database size stays under control โจ
The problem is that unexpected overflows can't be dealt with that way ๐ฉ So this memo describes how to dynamically limit database size when overflow happens. The basic mechanism works like this ๐
- A parameter,
ospfExtLsdbLimit, is configured on each router. It's the maximum number of AS-external-LSAs (not counting the ones describing the default route) that are allowed in the link-state database. This parameter must be the same on all routers in the routing domain (see Section 2.1), and network management is how the routers stay in sync on it ๐ง - In any router's database, the number of AS-external-LSAs (excluding default) is never allowed to go past
ospfExtLsdbLimit. If a router gets a non-default AS-external-LSA that would push the count pastospfExtLsdbLimit, it drops the LSA and does NOT acknowledge it ๐ โโ๏ธ - If the number of non-default AS-external-LSAs in a router's database hits
ospfExtLsdbLimit, the router a) flushes all the non-default AS-external-LSAs it has originated itself (see Section 2.2) and b) goes into "OverflowState" ๐จ - While in
OverflowState, the router refuses to originate any non-default AS-external-LSAs (see Section 2.3.2) ๐ - Optionally, the router can try to leave
OverflowStateonce the configurable parameterospfExitOverflowIntervalhas passed since it enteredOverflowState(see Section 2.4). Only then can the router start originating non-default AS-external-LSAs again ๐
Why only limit non-default AS-external-LSAs and not the other LSA types? There are two reasons ๐ First, non-default AS-external-LSAs are the most likely to take over the database in networks with huge databases (e.g., regional networks; see [5]) ๐ Second, they can be thought of as "optional" in this sense: the router can probably still be monitored and reconfigured without them ๐ซง (That said, other LSA types can be limited with similar strategies too; see Section 5.)
The method for dealing with database overflow described here has these awesome properties โจ
- After a short period of convergence, all routers have identical link-state databases. That database contains less than
ospfExtLsdbLimitnon-default AS-external-LSAs ๐ - At all times, routing WITHIN the OSPF Autonomous System stays intact. Among other things, that means the routers keep being manageable ๐
- Default routing to external destinations also stays intact. This hopefully means a lot of external connectivity is preserved, although the routes might be less efficient ๐ฆ
- If
ospfExitOverflowIntervalis configured, the OSPF system recovers fully and automatically (no network management intervention needed) from transient database overflow conditions (see Section 2.4) ๐๐ซถ
2. Implementation details โจ
okay so this section is where we get into the nitty gritty of how a router handles database overflow ๐ง. It's built around one big idea, OverflowState ๐ . We'll cover how a router gets into OverflowState, how it acts while it's in there, and how it finally gets out ๐ฆ.
2.1. Configuration
Network management sets these configuration parameters. They were added to support the database overflow functionality ๐.
ospfExtLsdbLimit
Once a router's link-state database has ospfExtLsdbLimit non-default AS-external-LSAs in it, the router flips into OverflowState ๐จ. A router never holds more than ospfExtLsdbLimit non-default AS-external-LSAs in its database, so it's like a hard cap ๐งข.
ospfExtLsdbLimit MUST be set identically in all routers attached to the OSPF backbone and/or any "regular" OSPF area. (Heads up: this memo doesn't apply to routers inside OSPF stub areas or NSSAs, since those routers never get AS-external-LSAs ๐.) If ospfExtLsdbLimit isn't set the same everywhere, then when the database overflows, things go sideways ๐. The routers will not converge on a common link-state database, incorrect routing (possibly including routing loops) shows up, and AS-external-LSAs keep getting retransmitted over and over ๐ญ. Making sure every router has the identical setting is network management's job ๐ซถ.
When ospfExtLsdbLimit is set in a router, that router must have some way to guarantee it can actually hold that many non-default AS-external-LSAs in its link-state database. One way to do this is to preallocate resources, like memory, for the configured number of LSAs ๐ง โจ.
ospfExitOverflowInterval
This is the number of seconds that a router waits, after entering OverflowState, before it tries to leave. Once it leaves, it's allowed to originate non-default AS-external-LSAs again ๐ธ. If it's set to 0, the router won't leave OverflowState until it gets restarted. The default setting is 0 ๐.
Here's the tea: ospfExitOverflowInterval doesn't have to match across routers โ. You can give a smaller value to the routers that originate the "more important" AS-external-LSAs ๐. Honestly, setting it the same everywhere can cause chaos, because a bunch of routers would try to leave OverflowState at the exact same moment ๐ตโ๐ซ. So the value must be "jittered" by randomly varying it within plus or minus 10 percent before it's used ๐ฒ.
2.2. Entering OverflowState
The router enters OverflowState as soon as the number of non-default AS-external-LSAs in its database hits ospfExtLsdbLimit ๐ช. There are two ways this can happen. The first is when the router receives an LSA during flooding. In that case, an LSA that doesn't already have a database instance gets added in Step 5 of Section 13 of [1]. The second is when the router originates a non-default AS-external-LSA itself ๐โโ๏ธ.
Whenever a router enters OverflowState, it flushes all the non-default AS-external-LSAs that it originated itself ๐งน. Flushing happens through the premature aging scheme in Section 14.1 of [1]. Only self-originated LSAs get flushed. LSAs from other routers stay right where they are in the link-state database ๐ .
2.3. Operation while in OverflowState
While a router is in OverflowState, flooding and origination of non-default AS-external-LSAs change up a bit ๐. Here's how.
2.3.1. Modifications to Flooding
Here's the flooding glow-up ๐. When Step 5 of Section 13 of [1] runs and a non-default AS-external-LSA shows up that a) has no current database instance and b) would push the count of non-default AS-external-LSAs past ospfExtLsdbLimit, that LSA gets tossed ๐๏ธ. It isn't installed in the link-state database, and it isn't acknowledged either ๐.
When every router has identical values for ospfExtLsdbLimit (like it's required to), this flooding change only kicks in during a short convergence period โณ. Yes, there will be retransmissions of LSAs during that window ๐ค. But once things converge, the retransmissions stop, because the routers settle on a database with fewer than ospfExtLsdbLimit non-default AS-external-LSAs ๐.
Even in OverflowState, non-default AS-external-LSAs ARE still accepted in these situations:
- If the LSA updates an LSA that already exists in the router's link-state database ๐.
- LSAs with an LS age of MaxAge are always accepted ๐ฏ. Handling these follows the procedures in Sections 13 and 14 of [1].
- If adding the LSA would keep the number of non-default AS-external-LSAs less than or equal to
ospfExtLsdbLimit, the LSA is accepted ๐ฅฐ.
2.3.2. Originating AS-external-LSAs
Originating AS-external-LSAs is covered in Section 12.4.5 of [1] ๐. A router in OverflowState doesn't originate non-default AS-external-LSAs at all ๐
โโ๏ธ. So the only AS-external-LSAs a router in OverflowState originates are the ones with Link State ID 0.0.0.0 ๐ง.
2.3.3. Receiving self-originated LSAs
Receiving self-originated LSAs is described in Section 13.4 of [1] ๐. If a router in OverflowState gets a self-originated non-default AS-external-LSA, it responds by flushing it from the routing domain with the premature aging scheme from Section 14.1 of [1] ๐งนโจ.
2.4. Leaving OverflowState
If ospfExitOverflowInterval is non-zero, then the moment a router enters OverflowState, it starts a timer set to ospfExitOverflowInterval (give or take a random 10 percent) โฐ. When that timer fires, the router leaves OverflowState and starts originating non-default AS-external-LSAs again ๐ฆ.
This is the self-healing part ๐ฉน. Picture an AS boundary router that imports a ton of AS-external-LSAs and then crashes ๐ฅ. Other routers start importing those routes instead, so until the crashed router gets restarted or its AS-external-LSAs age out, the database is way bigger than usual ๐ฌ. An overflow like this is guaranteed to clear within MaxAge seconds (1 hour). So automatic recovery can be a good (and fast enough) fix if the overflow happens off-hours ๐.
Once the router leaves OverflowState, it's eligible to enter OverflowState again, following the rules in Section 2.2 ๐๐.
3. An example
Let's walk through a demo ๐ฌ. Say a router runs the database overflow logic, with ospfExtLsdbLimit set to 10,000 and ospfExitOverflowInterval set to 600 seconds. Now say the router is originating 400 non-default AS-external-LSAs itself, and the current number of non-default AS-external-LSAs in its database is 9,997 ๐.
Then the router gets a Link State Update packet from a neighbor. It contains 6 non-default AS-external-LSAs, and none of them have a current database copy ๐ฆ. The first two LSAs get installed in the database just fine โ . The third one also gets installed, but it pushes the router into OverflowState ๐ฑ. Going into OverflowState makes the router flush its 400 self-originated non-default LSAs with premature aging ๐งน. Those 400 LSAs still count as part of the link-state database until their re-flooding (with age set to MaxAge) gets acknowledged (see Section 14 of [1]). That's why the last three LSAs in the update get discarded without being acknowledged ๐.
After a little while, all the routers converge on a common database with fewer than 10,000 non-default AS-external-LSAs ๐ค. During that convergence period, some link-state retransmissions might happen. For instance, the neighbor who sent that Link State Update packet might resend the three LSAs that got discarded ๐. If that resend shows up after the flushing of the 400 self-originated LSAs has been acknowledged, then those 3 LSAs get accepted ๐ฅณ.
Going into OverflowState also starts a timer that fires sometime between 540 and 660 seconds later โฒ๏ธ. When it fires, the router leaves OverflowState and re-originates its 400 non-default AS-external-LSAs, but only if the current database has less than 9600 (10,000 - 400) non-default AS-external-LSAs ๐งฎ. If there are more than 9600, the timer just restarts ๐.
4. Administrative response to database overflow
Once the link-state database has overflowed, network management might need to step in before all routing is back to normal ๐งโ๐ป. (If the overflow is transient, routing might come back on its own. See Section 2.4 for details ๐ซ.) An overflow condition shows up as SNMP traps (see Appendix B ๐จ). Here are some moves a network manager might make:
- Raise the value of
ospfExtLsdbLimit๐. Maybe it was set too conservatively, and the routers can actually handle bigger databases than they're configured for ๐ช. - Isolate routers that have limited resources by putting them in OSPF stub areas or NSSAs ๐๏ธ. That way,
ospfExtLsdbLimitcan go up on the remaining routers ๐. - Rethink whether certain external routes need to be imported at all ๐ค. If
ospfExtLsdbLimitcan't go up, the network manager will want to make sure the more important routes keep getting imported. The way to do that is to turn off importing the less important ones ๐๏ธ.
5. Operational experience
This database overflow scheme has been running in the Proteon router for years ๐, with a couple of differences ๐. First, that router didn't leave OverflowState until it got restarted (so ospfExitOverflowInterval was always 0). Second, default AS-external-LSAs weren't separated from non-default AS-external-LSAs. Still, it worked as expected ๐. During overflow, the routers converged on a common database with fewer than a configured number of AS-external-LSAs ๐.
6. Possible enhancements
There are some enhancements you could make to the overflow scheme ๐:
- Other LSA types could get a limit too, with one exception: the transit LSAs (router-LSAs and network-LSAs) are off the table ๐ . For example, you could cap the number of summary-LSAs or group-membership-LSAs (see [6]) ๐.
- Instead of flushing all of its non-default AS-external-LSAs when it enters OverflowState, a router could flush a fixed number every time the database size hits
ospfExtLsdbLimitโ๏ธ. That way it can prioritize, and flush the least important AS-external-LSAs first ๐ง โจ.
A. Related MIB parameters ๐ฆ
okay so this appendix is all about the OSPF MIB variables that got defined to support the database overflow procedure from this memo. if you want the full scoop, see [4] ๐
ospfExtLsdbLimit: the maximum number of non-default AS-external-LSAs that can be stored in the database (same as Section 2.1 of this memo ๐). if it's set to-1, there's no limit at all. no cap, no cry ๐ospfExitOverflowInterval: the number of seconds a router waits after entering OverflowState before it tries to leave. once it leaves, it can originate non-default AS-external-LSAs again ๐ง. if it's set to0, the router stays in OverflowState until it gets restarted ๐ospfLsdbOverflow: a trap that fires when the number of non-default AS-external-LSAs has exceeded or equaledospfExtLsdbLimit. translation: the router is entering OverflowState ๐จospfLsdbApproachingOverflow: a trap for when the number of non-default AS-external-LSAs has gone over ninety percent ofospfExtLsdbLimit๐ an early warning, bestie ๐ซถ
References ๐
- [1] Moy, J., "OSPF Version 2", RFC 1583, Proteon, Inc., March 1994.
- [2] Coltun, R., and V. Fuller, "The OSPF NSSA Option", RFC 1587, RainbowBridge Communications, Stanford University, March 1994.
- [3] Moy, J., Editor, "OSPF Protocol Analysis", RFC 1245, Proteon, Inc., July 1991.
- [4] Baker F., and R. Coltun, "OSPF Version 2 Management Information Base", Work in Progress.
- [5] Moy, J., Editor, "Experience with the OSPF Protocol", RFC 1246, Proteon, Inc., July 1991.
- [6] Moy, J., "Multicast Extensions to OSPF", RFC 1584, Proteon, Inc., March 1994.
Security Considerations ๐
ngl this is the shortest section ever ๐ Security issues are not discussed in this memo.
Author's Address ๐๏ธ
John Moy
Cascade Communications Corp.
5 Carlisle Road
Westford, MA 01886
Phone: 508-692-2600 Ext. 394
Fax: 508-692-9214
EMail: jmoy@casc.com
๐ฆ where this page comes from
- ietf: rfc1765 1995-03
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms