Link State Database Size Considerations

Issues relating to the size of the LSDB are important and deal directly with the LSDB operation in relation to the topology of the network. The LSDB is everywhere within an OSPF network, and the LSDB has the following functional characteristics, which do not change:

• A router has a separate LSDB for each area to which it belongs.

• All routers belonging to the same area have an identical LSDB.

• A router performs separate SPF calculations on associated LSDBs for each area.

• LSA flooding occurs only within the area that is sending the advertisement (that is, experiencing the topology change). Remember that Type 1-4 and Type 7 LSAs are flooded within an area, and Type 5 LSAs are flooded throughout the OSPF domain, except for stub and NSSA areas. This is covered in Chapter 3, "OSPF Communication."

When encountered in an area, the LSDB is identical in each router within the area. The LSDB also contains the following different LSAs:

• Router link advertisements

• Network link advertisements

• Summary link advertisements (IP network and ASBR)

• Autonomous system (AS) external advertisements (nonstub areas only)

• Opaque LSAs, if implemented

These factors show you how the LSDB uses the routers' memory when running OSPF. This makes determining the minimum memory requirement to run OSPF crucial in creating an effective OSPF design. The sections that follow examine this sizing process in more detail.

Determining Router Memory Requirements

An OSPF router stores all the link states for all the areas that it is in. As described in the case study in Chapter 3, this is a complex process, and if enough memory is not provided in the router, serious OSPF routing problems might result. Ensuring an effectively designed OSPF network can also conserve router memory.

In addition to storing the state of each link within an area, the LSDB stores summary and external routes. Careful use of route summarization techniques and the creation of stub areas can substantially reduce router memory use. Therefore, if memory issues become a concern, consider using stub areas because doing so reduces the amount of routes.

It is not easy to determine the amount of memory needed for a particular OSPF configuration. From a design perspective, the best you can do is to approximate the memory

198 Chapter 4: Design Fundamentals requirements. Memory issues usually arise when too many external routes are injected into the OSPF domain. Consider the following two scenarios:

• An OSPF backbone area with 40 routers and a default route to the Internet

• An OSPF backbone area with 4 routers and 33,000 external routes being injected into OSPF

The first network would be less likely to have memory issues on routers than the network described in the second example. Summarization at the ABRs and the use of stub areas might further minimize the number of routes exchanged.

The total memory used by OSPF is the sum of the memory used by the routing table (verified by the show ip route summary command) and the memory used by the LSDB. The following numbers provide a rule-of-thumb estimate:

• Each entry in the routing table consumes 200 to 280 bytes plus 44 bytes per link.

• Each LSA consumes 100 bytes worth of overhead plus the size of the actual LSA, possibly another 60 to 100 bytes. (For router links, this depends on the number of interfaces on the router.) These amounts should be added to memory already used by other processes and by the Cisco IOS Software.

A routing table using less than 500 KB might normally be accommodated with 2-16 MB of RAM; large networks that have routing tables greater than 500 KB might need 16-64 MB. Furthermore, large networks might require 512 MB or more if full routes are injected from the Internet.

NOTE As Cisco IOS Software continues to grows, the memory needed to hold and run that software will also increase.

To determine the exact amount of memory used by OSPF, you can execute the show memory command with and without OSPF being turned on. The difference in the processor memory used indicates how much memory OSPF is using.

CAUTION Do not do this show memory test in the middle of the business day. You might also want to make a backup copy of the router configuration before beginning this process.

Router CPU Requirements

An OSPF router uses CPU cycles whenever a link-state change occurs. This is because Cisco IOS Software is run in the router's flash memory, and every time a decision is required, the CPU must process it. Thus, keeping the OSPF areas small and using route summarization dramatically reduce usage of the router's CPU and create a more stable environment within which OSPF can operate.

Was this article helpful?

+2 0


  • marcel
    Where ospf store the lsdb?
    7 months ago

Post a comment