Week 11 - Multiarea OSPF, OSPF Tuning and Troubleshooting Part 1 PDF
Week 11 - Multiarea OSPF, OSPF Tuning and Troubleshooting Part 1 PDF
1
Week 11: Multiarea OSPF, OSPF Tuning and Troubleshooting Part 1
Introduction
Multiarea OSPF is used to divide a large OSPF network. Too many routers in one area
increase the load on the CPU and create a large link-state database. In this chapter, directions
are provided to effectively partition a large single area into multiple areas. Area 0, used in a
single-area OSPF, is known as the backbone area.
Discussion is focused on the LSAs exchanged between areas. In addition, activities for
configuring OSPFv2 are provided. The chapter concludes with the show commands used to
verify OSPF configurations.
Single-Area OSPF
Single-area OSPF is useful in smaller networks where the web of router links is not complex,
and paths to individual destinations are easily deduced.
However, if an area becomes too big, the following issues must be addressed (see the figure
11.1 for illustration):
Large routing table - OSPF does not perform route summarization by default. If the routes
are not summarized, the routing table can become very large, depending on the size of the
network.
Large link-state database (LSDB) - In single-area OSPF, the LSDB covers the topology of the
entire routing domain. Each router must maintain detailed information about every network
in the routing domain.
Frequent SPF algorithm calculations - In a large network, changes are inevitable, so the
routers spend many CPU cycles recalculating the SPF algorithm and updating the routing
table.
To make OSPF more efficient and scalable, OSPF supports hierarchical routing using areas.
An OSPF area is a group of routers that share the same link-state information in their link-
state databases.
Multiarea OSPF
When a large OSPF area is divided into smaller areas, this is called multiarea OSPF. Multiarea
OSPF is useful in larger network deployments to reduce processing and memory overhead.
For instance, any time a router receives new information about the topology, as with
additions, deletions, or modifications of a link, the router must rerun the SPF algorithm,
create a new SPF tree, and update the routing table. The SPF algorithm is CPU-intensive and
the time it takes for calculation depends on the size of the area. Too many routers in one area
make the LSDB larger and increase the load on the CPU. Therefore, arranging routers into
areas effectively partitions one potentially large database into smaller and more manageable
databases.
Multiarea OSPF requires a hierarchical network design. The main area is called the backbone
area (area 0) and all other areas must connect to the backbone area. With hierarchical
routing, routing still occurs between the areas (interarea routing). However, the CPU
intensive routing operation of recalculating the SPF algorithm is done only for routes within
an area. A change in one area does not cause an SPF algorithm recalculation in other areas.
Smaller routing tables - There are fewer routing table entries as network addresses
can be summarized between areas. Also, routers in an area may only receive a default
route for destination outside their area. For example, R1 summarizes the routes from
area 1 to area 0 and R2 summarizes the routes from area 51 to area 0. R1 and R2 also
propagate a default static route to area 1 and area 51.
In Figure 9.3, assume a link fails between two internal routers in area 51. Only the routers in
area 51 exchange LSAs that require them to rerun the SPF algorithm for this event. R1
receives a different type of LSA from area 51 and does not recalculate the SPF algorithm. The different types of
LSAs are discussed later in this chapter.
Backbone (Transit) area - An OSPF area whose primary function is the fast and
efficient movement of IP packets. Backbone areas interconnect with other OSPF area
types. Generally, end users are not found within a backbone area. The backbone area is
also called OSPF area 0. Hierarchical networking defines area 0 as the core to which all
other areas directly connect (Figure 9.4).
Regular (Non-backbone) area - Connects users and resources. Regular areas are
usually set up along functional or geographical groupings. By default, a regular area does
not allow traffic from another area to use its links to reach other areas. All traffic from
other areas must cross a transit area (Figure 9.5).
Note: A regular area can have a number of subtypes, including a standard area, stub area,
totally stubby area, and not-so-stubby area (NSSA). Stub, totally stubby, and NSSAs are
beyond the scope of this chapter.
OSPF enforces this rigid two-layer area hierarchy. The underlying physical connectivity of
the network must map to the two-layer area structure, with all non-backbone areas attaching
directly to area 0. All traffic moving from one area to another area must traverse the
backbone area. This traffic is referred to as interarea traffic.
The optimal number of routers per area varies based on factors such as network stability,
but Cisco recommends the following guidelines:
An area should have no more than 50 routers.
A router should not be in more than three areas.
Any single router should not have more than 60 neighbors.
OSPF routers of different types control the traffic that goes in and out of areas. The OSPF
routers are categorized based on the function they perform in the routing domain.
Internal router – This is a router that has all of its interfaces in the same area. All internal
routers in an area have identical LSDBs (Figure 9.5).
Backbone router – This is a router in the backbone area. The backbone area is set to area 0
(Figure 9.6).
Area Border Router (ABR) – This is a router that has interfaces attached to multiple areas. It
must maintain separate LSDBs for each area it is connected to, and can route between areas.
ABRs are exit points for the area, which means that routing information destined for another
area can get there only via the ABR of the local area. ABRs can be configured to summarize
the routing information from the LSDBs of their attached areas. ABRs distribute the routing
information into the backbone. The backbone routers then forward the information to the
other ABRs. In a multiarea network, an area can have one or more ABRs (Figure 9.7).
Autonomous System Boundary Router (ASBR) – This is a router that has at least one
interface attached to an external internetwork. An external network is a network that is not
part of this OSPF routing domain. For example, a network connection to an ISP. An ASBR can
import external network information to the OSPF network, and vice versa, using a process
called route redistribution (Figure 9.8).
Redistribution in multiarea OSPF occurs when an ASBR connects different routing domains
(e.g., EIGRP and OSPF) and configures them to exchange and advertise routing information
between those routing domains. A static route, including a default route, can also be
redistributed as an external route into the OSPF routing domain.
A router can be classified as more than one router type. For example, if a router connects to
area 0 and area 1, and in addition maintains routing information for external networks, it
falls under three different classifications: a backbone router, an ABR, and an ASBR.
LSAs are the building blocks of the OSPF LSDB. Individually, they act as database records and
provide specific OSPF network details. In combination, they describe the entire topology of
an OSPF network or area.
The RFCs for OSPF currently specify up to 11 different LSA types (Figure 9.9). However, any
implementation of multiarea OSPF must support the first five LSAs: LSA 1 to LSA 5 (Figure
9.10). The focus of this topic is on these first five LSAs.
Each router link is defined as an LSA type. The LSA includes a link ID field that identifies, by
network number and mask, the object to which the link connects. Depending on the type, the
link ID has different meanings. LSAs differ on how they are generated and propagated within
the routing domain.
As shown in the figure9.11, all routers advertise their directly connected OSPF-enabled links
in a type 1 LSA and forward their network information to OSPF neighbors. The LSA contains
a list of the directly connected interfaces, link types, neighbors, and link states.
Type 1 LSAs are flooded only within the area in which they originated. ABRs subsequently
advertise the networks learned from the type 1 LSAs to other areas as type 3 LSAs.
The type 1 LSA link ID is identified by the router ID of the originating router.
A type 2 LSA only exists for multiaccess and non-broadcast multiaccess (NBMA) networks
where there is a DR elected and at least two routers on the multiaccess segment. The type 2
LSA contains the router ID and IP address of the DR, along with the router ID of all other
routers on the multiaccess segment. A type 2 LSA is created for every multiaccess network
in the area.
The purpose of a type 2 LSA is to give other routers information about multiaccess networks
within the same area.
The DR floods type 2 LSAs only within the area in which they originated. Type 2 LSAs are not
forwarded outside of an area.
As shown in the figure, ABR1 is the DR for the Ethernet network in area 1. It generates the
type 2 LSA and forwards it into area 1. ABR2 is the DR for the multiaccess network in area 0.
There are no multiaccess networks in area 2 and therefore, no type 2 LSAs are ever
propagated in that area.
The link-state ID for a network LSA is the IP interface address of the DR that advertises it.
Type 3 LSAs are used by ABRs to advertise networks from other areas. ABRs collect type 1
LSAs in the LSDB. After an OSPF area has converged, the ABR creates a type 3 LSA for each
of its learned OSPF networks. Therefore, an ABR with many OSPF routes must create type 3
LSAs for each network.
As shown in the figure 9.13, ABR1 and ABR2 floods type 3 LSAs from one area to other areas.
ABR1 propagates the Area 1 information into Area 0 using Type 3 LSAs. ABR1 also
propagates the Area 0 information into Area 1 using Type 3 LSAs. ABR2 does the same thing
for Area 2 and Area 0. In a large OSPF deployment with many networks, propagating type 3
LSAs can cause significant flooding problems. For this reason, it is strongly recommended
that manual route summarization be configured on the ABR.
The link-state ID is set to the network number and the mask is also advertised.
Receiving a type 3 LSA into an area does not cause a router to run the SPF algorithm. The
routes being advertised in the type 3 LSAs are appropriately added to or deleted from the
router’s routing table, but a full SPF calculation is not necessary.
Type 4 and type 5 LSAs are used collectively to identify an ASBR and advertise external
networks into an OSPF routing domain.
A type 4 summary LSA is generated by an ABR only when an ASBR exists within an area. A
type 4 LSA identifies the ASBR and provides a route to it. All traffic destined to an external
network requires routing table knowledge of the ASBR that originated the external routes.
As shown in the figure 9.14, the ASBR sends a type 1 LSA, identifying itself as an ASBR. The
LSA includes a special bit known as the external bit (e bit) that is used to identify the router
as an ASBR. When ABR1 receives the type 1 LSA, it notices the e bit, it builds a type 4 LSA,
and then floods the type 4 LSA to the backbone (area 0). Subsequent ABRs flood the type 4
LSA into other areas.
Type 5 external LSAs describe routes to networks outside the OSPF routing domain. Type 5
LSAs are originated by the ASBR and are flooded to the entire routing domain.
In the figure 9.15, the ASBR generates type 5 LSAs for each external route and floods it into
the area. Subsequent ABRs also flood the type 5 LSA into other areas. Routers in other areas
use the information from the type 5 LSA to reach the external routes.
In a large OSPF deployment with many networks, propagating multiple type 5 LSAs can cause
significant flooding problems. For this reason, it is strongly recommended that manual route
summarization be configured on the ASBR.
Figure 9.16 provides a sample IPv4 routing table for a multiarea OSPF topology with a link
to an external non-OSPF network, a default route provided by the type 5 LSA from the
ASBR. OSPF routes in an IPv4 routing table are identified using the following descriptors:
O - Router (type 1) and network (type 2) LSAs describe the details within an area. The
routing table reflects this link-state information with a designation of O, meaning that
the route is intra-area.
O IA – When an ABR receives a router LSA (type 1) in one area; it sends a summary
LSA (type 3) into the adjacent area. Summary LSAs appear in the routing table as IA
(interarea routes). Summary LSAs received in one area are also forwarded to other
areas.
Each router uses the SPF algorithm against the LSDB to build the SPF tree. The SPF tree is
used to determine the best path(s).
As shown in the figure 9.17, the order in which the best paths are calculated is as follows:
1. All routers calculate the best path(s) to destinations within their area (intra-area) and add
these entries to the routing table. These are the type 1 and type 2 LSAs, which are noted in
the routing table with a routing designator of O. (1)
2. All routers calculate the best path(s) to the other areas within the internetwork. These
best paths are the interarea route entries, or type 3 LSAs, and are noted with a routing
designator of O IA. (2)
3. All routers (except those that are in a form of stub area) calculate the best path(s) to the
external autonomous system (type 5) destinations. These are noted with either an O E1 or
an O E2 route designator, depending on the configuration. (3)
When converged, a router can communicate with any network within or outside the OSPF
routing domain.