The Fundamentals of OSPF Routing Design

Previous Table of Contents Next


OSPF Network Topology

OSPF works best in a hierarchical routing environment. The first and most important decision when designing an OSPF network is to determine which routers and links are to be included in the backbone (area 0) and which are to be included in each area. The following are three important characteristics to OSPF and its need for a hierarchical routing structure:

  The hierarchical routing structure must exist or be created.
  A contiguous backbone area must be present and all areas must have a connection to the backbone.
  Explicit topology has precedence whatever IP addressing schemes might have been applied.

Several important items to consider when designing the topology for an OSPF network (discussed at length in the sections that follow) are as follows:

  The number of routers in an area
  The number of areas connected to an area border router (ABR)
  The number of neighbors for any one router
  The number of areas supported by any one router
  Selecting the Designated Router (DR)
  The LSDB

The Number of Routers in an Area

OSPF uses the CPU-intensive SPF algorithm. Experience has shown that 40 to 50 routers per area is the optimal upper limit for OSPF. The number of calculations that must be performed by the router given n link-state packets (LSPs) is proportional to n log n. As a result, the larger and more unstable the area, the greater the likelihood for performance problems associated with OSPF routing recalculation.

Generally, an area should have no more than 50 routers. That does not mean that networks with 60 or 70 routers in an area won’t function, but why experiment with stability if you don’t need to? Areas with unstable links should be smaller.

One of the main problems with areas is that network administrators let their backbone area grow too large. Try to outline the logical view of the network from the start, and remember that it doesn’t hurt to start creating that other area before it is needed. A good rule of thumb is to plan for maximum growth coupled with long term planning. This has the added benefit of ensuring your network can handle rapid growth. In this case, planning for too much is never a bad thing to do.

However, those recommendations are made in accordance with “official” Cisco recommendations regarding OSPF networks. Studies and real world implementations have gone further. For example, the statistics in Table 5-1 came from the “IETF OSPF Standard Report.”

Table 5-1 OSPF network size recommendations
Parameter Minimum Mean Maximum

Routers in a domain 20 510 1000
Routers per single area 20 160 350
Areas per domain 1 23 60

It is good to know that OSPF has been thoroughly tested and can withstand scaling to a phenomenal size.

The Number of Areas Connected to an Area Border Router

ABRs will keep a copy of the database for all areas they service. If a router is connected to five areas, for example, it will have to keep a list of five different databases. It is better not to overload an ABR; you should try to spread the areas over other routers. The ideal design is to have each ABR connected to two areas only, the backbone, and another area, with three areas being the upper limit. Figure 5-2 shows the difference between one ABR holding five different databases, including area 0 (part a) and two ABRs holding three databases each (part b).


Figure 5-2  How many areas should be connected per ABR?

These are just guidelines; the more areas you attach per ABR, the lower the performance you get from that router. In some cases, the lower performance can be tolerated, but end users probably won’t see it that way.

The Number of Neighbors for Any One Router

OSPF floods all link-state changes to all routers in an area. Routers with many neighbors have the most work to do when link-state changes occur. In general, any one router should have no more than 60 neighbors.

The number of routers connected to the same LAN is also important. Each LAN has a DR and BDR that build adjacencies with all other routers. The fewer neighbors that exist on the LAN, the smaller the number of adjacencies a DR or BDR have to build. You can see in Figure 5-3 that the more neighbors the DR or BDR has, the more work they must do.


Figure 5-3  More neighbors equal more work for the DR and BDR.

This, of course, depends on how much processing power your router has. You could always change the OSPF priority to select your DR. Also, if possible, try to avoid having the same router be the DR on more than one segment. If DR selection is based on the highest RID, then one router could accidentally become a DR over all segments to which it is connected. This router would be doing extra effort while other routers are idle.

The Number of Areas Supported by Any One Router

A router must run the link-state algorithm for each link-state change that occurs for every area in which the router resides. Every area border router is in at least two areas (the backbone and one area). In general, to maximize stability, one router should not be in more than three areas.

Selecting the Designated Router

In general, the DR and BDR on a LAN have the most OSPF work to do. It is a good idea to select routers that are not already heavily loaded with CPU-intensive activities to be the DR and BDR. This can be accomplished using the ip ospf priority [priority] command, which will allow you to organize the DRs as needed.

In addition, it is generally not a good idea to select the same router to be the DR on more than one LAN simultaneously. These guidelines will help ensure that no single broadcast link will have too many neighbors with too much hello traffic.


Previous Table of Contents Next




OSPF Network Design Solutions
OSPF Network Design Solutions
ISBN: 1578700469
EAN: 2147483647
Year: 1998
Pages: 200
Authors: Tom Thomas

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net