Previous Table of Contents Next

Network Design with OSPF

The Open Shortest Path First (OSPF) protocol is perhaps one of the most difficult routing protocols to configure correctly. This is due to the protocol’s feature set, which includes route summarization and the ability to use areas to logically divide various elements in the network. OSPF is a nonproprietary, link-state routing protocol for IP. It was developed to resolve some of the problems found with the RIP, including slow convergence, susceptibility to routing loops, and limited scalability. Given its nonproprietary nature, OSPF may be better suited for network designs than IGRP and EIGRP when non-Cisco equipment is a design criterion. Many educational networks use OSPF.

OSPF supports various network types, including point-to-point and broadcast/nonbroadcast multiaccess networks. Hellos are used to establish neighbor relationships under most circumstances; however, manual configuration is needed for nonbroadcast multiaccess networks. The hello mechanism communicates with the designated router in each area and will be presented in greater detail later in this chapter. These occur at 10-second intervals and do not incorporate the entire routing table. Every 30 minutes, OSPF will send a summary link-state database, regardless of link failure; the rest of the time only hellos will traverse the link. Link failure will cause additional updates, and this process will be defined later as well.

OSPF uses the Dijkstra algorithm to calculate the shortest path for the network. In addition, OSPF supports VLSM and discontiguous subnets. Dis-contiguous subnets are subnets within a major network that are split by a different major network.

Apart from a VLSM-aware routing protocol, such as OSPF, discontiguous subnets are handled by the use of secondaries, or tunnels to link the two segments of the major network.

From a design perspective, OSPF relates well with the textbook three-tier model. Consider the following guidelines and limitations of the protocol as they relate to the three-tier model:

Keep workstations and other devices off the backbone. In both models, the core/backbone is a critical resource that should never contain non-network devices. In designing a small network, the designer may use OSPF with a single area—the special backbone area zero. Under these circumstances, workstations and other devices will have to be included in this area. Under all other circumstances, designers will wish to keep the core as a secure transit area. This will reduce eavesdropping efforts and maintain a stable network. Note that OSPF backbones are best served when hosts are not placed in this backbone, a design criterion shared with the hierarchical model.
Maintain a simple backbone topology. As with the previous guideline, both OSPF and the three-tier model benefit from stable, simple backbones.
Limit each area to less than 100 routers and incorporate no more than 28 areas in the network. These Cisco recommendations for OSPF design match well with the demands of most networks designed under the three-tier model.
Assign network addresses in contiguous blocks and summarize where possible. Note that OSPF, like EIGRP, supports variable-length subnet masks (VLSM). This design, along with logical summarization aggregation points, lends itself well to small routing tables within the core.
Use totally stubby areas. This chapter will address stubby and totally stubby areas in greater detail, but for now include this guideline as an objective for good OSPF network design.

Types of Routers in OSPF

Each router in an OSPF network is defined as a type based on its function. Table 4.3 outlines the four common router functions in an OSPF hierarchy.

TABLE 4 .3 OSPF Router Types

Type of Router Description

Internal router Internal routers have all interfaces in a single OSPF area. They are typically found in the access layer of the network.
Area border router Area border routers (ABRs) interconnect multiple areas in the OSPF model. They are almost always used between the core and distribution layers. The three-tier design lends itself well to OSPF network designs.
Backbone router A backbone router has at least one interface in area zero, which is also the backbone by design. This includes ABRs and internal routers in the core.
Autonomous system boundary router Also referred to as autonomous system border routers, autonomous system boundary routers (ASBRs) exchange routes with routers in other autonomous systems. OSPF is an interior gateway protocol that defines a single autonomous system.

Some sources state that internal routers may contain the routers within area zero. This is not accurate—area zero backbone routers are usually not considered internal routers. Due to their role, they are backbone routers.

Autonomous systems (AS) are logically groupings of networks, typically associated with a single administrative group. Exterior gateway protocols, like eBGP, are used to route between these systems. OSPF is an IGP, or Interior Gateway Protocol, that assumes a single AS.

Figure 4.7 illustrates each of the four router types in OSPF. Note that a router belongs to more than one category if it is an area border router (ABR) or an autonomous system boundary router (ASBR).

FIGURE 4.7  The placement of each type of router in the OSPF model

The OSPF Areas

Every OSPF network contains a single area zero, which is associated with the core layer of the network. All other areas must connect with area zero, which indicates the restrictive and logical nature of OSPF designs. However, these constraints are not necessarily bad—they simply require some discipline and collaborate well with a logical network design. In addition, each router in an area will have the same link-state database, which will incorporate information from all link-state advertisements (LSAs) for the area. Within the area, this information will incorporate specific links, and when learned from other areas and external (other AS) sources, this information will include specific links, summary links, and default links.

The concept of areas benefits the network greatly. For instance, convergence times can be greatly reduced by summarizing routes at the area border router. In addition, the requirement that all areas connect directly with area zero works to limit the depth of the entire network, which typically aids in the design and troubleshooting processes.

While it is preferable to keep all areas directly connected to area zero, it is possible to attach an area to area zero through another OSPF area. This is called a virtual link. Designers should avoid using virtual links whenever possible.

Route summarization is a manual process within OSPF, and it requires a bit of planning. For established networks, it may require a complete readdressing of the network. Summarization works best when a large allocation of contiguous subnets is availed to each area. The summary link advertisement represents the block to the adjacent areas. It is important to note that large allocations may lead to wasted addresses. Therefore, many designers opt to use the Internet-reserved private address space, RFC 1918, when readdressing for OSPF deployments. The technique used to divide the address space is called bit splitting. This is effectively the same process used in subnetting and supernetting—a number of bits are used to define the significant bits, the bits used in defining the summarization.

It can be preferable to make each summarization area equal; however, subnets within the area can take advantage of VLSM functionality. Remember that VLSM address allocations are best limited to two or three masks.

Previous Table of Contents Next