Chapter 9: Multiarea OSPF - cisco academy

Breaking

Monday, April 1, 2019

Chapter 9: Multiarea OSPF

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 and OSPFv3 are provided. The chapter concludes with the show commands used to verify OSPF configurations.

1.1 Class Activity - Leaving on a Jet Plane

Leaving on a Jet Plane
You and a classmate are starting a new airline to serve your continent.
In addition to your core area or headquarters airport, you will locate and map four intra-continental airport service areas and one transcontinental airport service area that can be used for additional source and destination travel.
Use the blank world map provided to design your airport locations. Additional instructions for completing this activity can be found in the accompanying PDF.
Class Activity - Leaving on a Jet Plane

1.2 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 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.
Note: OSPF route summarization is beyond the scope of this course.

1.3 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.
As illustrated in Figure 1, the hierarchical-topology possibilities of multiarea OSPF have these advantages:
  • 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.
  • Reduced link-state update overhead - Minimizes processing and memory requirements, because there are fewer routers exchanging LSAs with detailed topology information.
  • Reduced frequency of SPF calculations - Localizes impact of a topology change within an area. For instance, it minimizes routing update impact, because LSA flooding stops at the area boundary.
In Figure 2, 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.

1.4 OSPF Two-Layer Area Hierarchy

Multiarea OSPF is implemented in a two-layer area hierarchy:
  • 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 1).
  • 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 2).
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.

1.5 Types of OSPF Routers

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.
There are four different types of OSPF routers:
  • 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 1).
  • Backbone router – This is a router in the backbone area. The backbone area is set to area 0 (Figure 2).
  • 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 3).
  • 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 4).
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.

1.6 OSPF LSA Types

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 1). However, any implementation of multiarea OSPF must support the first five LSAs: LSA 1 to LSA 5 (Figure 2). 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.
Note: OSPFv3 includes additional LSA types.

1.7 OSPF LSA Type 1

As shown in the figure, 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 also referred to as router link entries.
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.

1.8 OSPF LSA Type 2

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.
Type 2 LSAs are also referred to as network link entries.
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.

1.9 OSPF LSA Type 3

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, 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.

2.1 OSPF LSA Type 4

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, 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.
The link-state ID is set to the ASBR router ID.

2.2 OSPF LSA Type 5

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.
Type 5 LSAs are also referred to as external LSA entries.
In the figure, 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.
The link-state ID is the external network number.

2.3 OSPF Routing Table Entries

Figure 1 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:
  • - 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.
  • O E1 or O E2 - External LSAs appear in the routing table marked as external type 1 (E1) or external type 2 (E2) routes. Type 2 (E2) is the default. The difference between type 1 (E1) and type 2 (E2) are beyond the scope of this course.
Figure 2 displays an IPv6 routing table with OSPF intra-area, interarea, and external routing table entries.

2.4 OSPF Route Calculation

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, 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.

2.5 Implementing Multiarea OSPF

OSPF can be implemented as single-area or multiarea. The type of OSPF implementation chosen depends on the specific network design requirements and existing topology.
There are 4 steps to implementing multiarea OSPF, as displayed in the figure.
Steps 1 and 2 are part of the planning process.
Step 1. Gather the network requirements and parameters - Gather the network requirements and parameters - This includes determining the number of host and network devices, the IP addressing scheme (if already implemented), the size of the routing domain, the size of the routing tables, the risk of topology changes, whether existing routers can support OSPF, and other network characteristics.
Step 2. Define the OSPF parameters - Based on information gathered during Step 1, the network administrator must determine if single-area or multiarea OSPF is the preferred implementation. If multiarea OSPF is selected, there are several considerations the network administrator must take into account while determining the OSPF parameters, to include:
  • IP addressing plan - This governs how OSPF can be deployed and how well the OSPF deployment might scale. A detailed IP addressing plan, along with the IP subnetting information, must be created. A good IP addressing plan should enable the usage of OSPF multiarea design and summarization. This plan more easily scales the network, as well as optimizes OSPF behavior and the propagation of LSA.
  • OSPF areas - Dividing an OSPF network into areas decreases the LSDB size and limits the propagation of link-state updates when the topology changes. The routers that are to be ABRs and ASBRs must be identified, as are those ABRs or ASBRs that are to perform any summarization or redistribution.
  • Network topology - This consists of links that connect the network equipment and belong to different OSPF areas in a multiarea OSPF design. Network topology is important to determine primary and backup links. Primary and backup links are defined by the changing OSPF cost on interfaces. A detailed network topology plan should also be used to determine the different OSPF areas, ABR, and ASBR as well as summarization and redistribution points, if multiarea OSPF is used.
Step 3. Configure the multiarea OSPF implementation based on the parameters.
Step 4. Verify the multiarea OSPF implementation based on the parameters.

2.6 Configuring Multiarea OSPFv2

Figure 1 displays the reference multiarea OSPF topology. In this example:
  • R1 is an ABR because it has interfaces in area 1 and an interface in area 0.
  • R2 is an internal backbone router because all of its interfaces are in area 0.
  • R3 is an ABR because it has interfaces in area 2 and an interface in area 0.
Note: This topology is not a typical multiarea OSPF routing domain but is used to show an example configuration.
There are no special commands required to implement this multiarea OSPF network. A router simply becomes an ABR when it has two network statements in different areas.
As shown in Figure 2, R1 is assigned the router ID 1.1.1.1. This example enables OSPF on the two LAN interfaces in area 1. The serial interface is configured as part of OSPF area 0. Because R1 has interfaces connected to two different areas, it is an ABR.
Use the Syntax Checker in Figure 3 to configure multiarea OSPF on R2 and R3. In this Syntax Checker, on R2, use the wildcard mask of the interface network address. On R3, use the 0.0.0.0 wildcard mask for all networks.
Upon completion of the R2 configuration, notice the informational messages informing of the adjacency with R1 (1.1.1.1).
Upon completion of the R3 configuration, notice the informational messages informing of an adjacency with R2 (2.2.2.2). Also notice how the IPv4 addressing scheme used for the router ID makes it easy to identify the neighbor.
Note: The inverse wildcard masks used to configure R2 and R3 purposely differ to demonstrate the two alternatives to enteringnetwork statements. The interface method used for R3 is simpler because the wildcard mask is always 0.0.0.0 and does not need to be calculated.

2.7 Configuring Multiarea OSPFv3

Like OSPFv2, implementing the multiarea OSPFv3 topology in Figure 1 is simple. There are no special commands required. A router simply becomes an ABR when it has two interfaces in different areas.
For example in Figure 2, R1 is assigned the router ID 1.1.1.1. The example also enables OSPF on the LAN interface in area 1 and the serial interface in area 0. Because R1 has interfaces connected to two different areas, it becomes an ABR.
Use the Syntax Checker in Figure 3 to configure multiarea OSPFv3 on R2 and on R3.
Upon completion of the R2 configuration, notice the message that there is an adjacency with R1 (1.1.1.1).
Upon completion of the R3 configuration, notice the message that there is an adjacency with R2 (2.2.2.2).

2.8 Verifying Multiarea OSPFv2

The same verification commands used to verify single-area OSPFv2 also can be used to verify the multiarea OSPF topology in the figure:
  • show ip ospf neighbor
  • show ip ospf
  • show ip ospf interface
Commands that verify specific multiarea OSPFv2 information include:
  • show ip protocols
  • show ip ospf interface brief
  • show ip route ospf
  • show ip ospf database
Note: For the equivalent OSPFv3 command, simply substitute ip with ipv6.

2.9 Verify General Multiarea OSPFv2 Settings

Use the show ip protocols command to verify the OSPFv2 status. The output of the command reveals which routing protocols are configured on a router. It also includes routing protocol specifics such as the router ID, number of areas in the router, and networks included within the routing protocol configuration.
Figure 1 displays the OSPFv2 settings of R1. Notice that the command shows there are two areas. The Routing for Networks section identifies the networks and their respective areas.
Use the show ip ospf interface brief command to display concise OSPFv2-related information of OSPFv2-enabled interfaces. This command reveals useful information, such as the OSPFv2 process ID that the interface is assigned to, the area that the interfaces are in, and the cost of the interface.
Figure 2 verifies the OSPFv2-enabled interfaces and the areas to which they belong.
Use the Syntax Checker in Figure 3 to verify general settings on R2 and R3.

3.1 Verify the OSPFv2 Routes

The most common command used to verify a multiarea OSPFv2 configuration is the show ip route command. Add the ospf parameter to display only OSPFv2-related information.
Figure 1 displays the routing table of R1. Notice how the O IA entries in the routing table identify networks learned from other areas. Specifically, O represents OSPFv2 routes, and IA represents interarea, which means that the route originated from another area. Recall that R1 is in area 0, and the 192.168.1.0 and 192.168.2.0 subnets are connected to R3 in area 2. The [110/1295] entry in the routing table represents the administrative distance that is assigned to OSPF (110) and the total cost of the routes (cost of 1295).
Use the Syntax Checker in Figure 2 to verify the IPv4 routing table of R2 and R3 using the show ip route ospf command.

3.2 Verify the Multiarea OSPFv2 LSDB

Use the show ip ospf database command to verify the contents of the OSPFv2 LSDB.
There are many command options available with theshow ip ospf database command.
For example, Figure 1 displays the content of the LSDB of R1. Notice R1 has entries for area 0 and area 1, because ABRs must maintain a separate LSDB for each area to which they belong. In the output, Router Link States in area 0 identifies three routers. The Summary Net Link States section identifies networks learned from other areas and which neighbor advertised the network.
Use the Syntax Checker in Figure 2 to verify the LSDB of R2 and R3 using the show ip ospf database command. R2 only has interfaces in area 0; therefore, only one LSDB is required. Like R1, R3 contains two LSDBs because it is an ABR.

3.3 Verify Multiarea OSPFv3

Like OSPFv2, OSPFv3 provides similar OSPFv3 verification commands. Refer to the reference OSPFv3 topology in Figure 1.
Figure 2 displays the OSPFv3 settings of R1. Notice that the command confirms that there are now two areas. It also identifies each interface enabled for the respective area.
Figure 3 verifies the OSPFv3-enabled interfaces and the area to which they belong.
Figure 4 displays the routing table of R1. Notice how the IPv6 routing table displays OI entries in the routing table to identify networks learned from other areas. Specifically, O represents OSPF routes, and I represents interarea, which means that the route originated from another area. Recall that R1 is in area 0, and the 2001:DB8:CAFE:3::/64 subnet is connected to R3 in area 2. The [110/1295] entry in the routing table represents the administrative distance that is assigned to OSPF (110) and the total cost of the routes (cost of 1295).
Figure 5 displays the content of the LSDB of R1. The command offers similar information to its OSPFv2 counterpart. However, the OSPFv3 LSDB contains additional LSA types not available in OSPFv2.

3.4 Packet Tracer - Configuring Multiarea OSPFv2

Background/Scenario
In this activity, you will configure multiarea OSPFv2. The network is already connected and interfaces are configured with IPv4 addressing. Your job is to enable multiarea OSPFv2, verify connectivity, and examine the operation of multiarea OSPFv2.
Packet Tracer - Configuring Multiarea OSPFv2 Instructions
Packet Tracer - Configuring Multiarea OSPFv2 - PKA


6 comments:

  1. Replies
    1. Thank you for your commented, if the article useful for you pls check out more contain

      Delete
  2. Replies
    1. Thank you for your commented, if the article useful for you pls check out more contain

      Delete
  3. Replies
    1. Thank you for your commented, if the article useful for you pls check out more contain

      Delete