System
This chapter focuses on a number of objectives falling under the CCNP routing principles. Understanding advanced OSPF routing principles not only applies to the CCNP Routing certification but to all Cisco-based certifications, and it lays the foundations for future certifications in any field of networking.
Chapter 3, “Basic Open Shortest Path First,” started by covering some of the basic Open Shortest Path First (OSPF) concepts. This chapter covers some of the ways OSPF deals with large Internet Protocol (IP) routing environments and how you can configure OSPF to reduce IP routing tables and the CPU and memory requirements of access or edge routers. OSPF is a popular IP routing protocol; therefore, most Cisco certification exams test heavily on OSPF.
This chapter contains five practical scenarios to complete your understanding and ensure you have all the OSPF routing skills to complement your understanding of how to configure and maintain OSPF in large IP networks. Integrated Intermediate System-to-Intermediate System (IS-IS) is another link-state protocol common in today's networks used to route IP. Integrated IS-IS is covered in detail in Scenarios 4-3 and 4-4.
Advanced OSPF
OSPF is an industry-standard routing protocol developed by the Internet Engineering Taskforce (IETF) as a replacement for legacy routing protocols that did not scale well in large environments. OSPF supports the following features:
• Variable-length subnet masks (VLSM).
• The use of areas to minimize Central Processing Unit (CPU) and memory requirements.
• A simple cost metric that you can manipulate to support up to six equal cost paths. The number of paths is limited only by the Internet Operating System (IOS).
• The use of authentication to ensure OSPF updates are secure and the use of multicast updates to conserve bandwidth.
• Faster convergence times ensuring updates and changes are propagated across the network.
• No limitation of network diameter or hop count. Limiting factors include only CPU and memory resources.
• The ability to tag OSPF information injected from any autonomous systems.
The following topics are covered in this section:
• Connecting multiple OSPF areas
• VLSM and summarization with OSPF
• OSPF over multiarea NBMA
Connecting Multiple OSPF Areas
An OSPF area is defined as a logical grouping of routers by a network administrator.
OSPF routers in any area share the same topological view (also known as the OSPF database) of the network. The core reason that OSPF is configured in multiple areas is to reduce routing table sizes, which in turn reduces the topological database and CPU/memory requirements on a router.
OSPF is not just configured in one large area, so all routers share the same topological database. The use of multiple areas ensures that the flooding and
database management required in large OSPF networks is reduced within each area so that the process of flooding the full database and maintaining full network
connectivity does not consume a large portion of the CPU processing power. Every time a network change occurs, the CPU on a router is interrupted and a new OSPF tree is calculated. Running the shortest path first (SPF) algorithm itself is not CPU intensive, but sending and flooding the network with new topological information is extremely CPU intensive.
Routing tables become very large even with only 50 routers. The OSPF database is exchanged every 30 minutes in full, and if this database is too large, every time the exchange occurs, the amount of bandwidth used over the network increases, which can cause severe delays in sending user-based traffic because convergence times increase.
Considering the demands on CPU and memory along with reduced IP routing tables, you should now have a good understanding of why OSPF requires more than one area. In Scenario 3-2 in Chapter 3, you saw how to configure an OSPF network that is partitioned from the backbone. All OSPF areas must be connected to the backbone in case of network failure. When an area cannot reside physically or logically on the backbone, a virtual link is required. For partitioned areas, OSPF treats the area as a separate area, and no routing information flows to the backbone; therefore, you do not have IP connectivity.
Virtual links add a layer of complexity and might cause additional problems when applied to large IP networks. It is best to avoid virtual links in the real world.
When configuring a virtual link, you must be aware of the following design restrictions:
• Virtual links must be configured between two area border routers (ABRs).
• The transit area cannot be a stub area.
• The transit area must have full routing knowledge of both partitioned areas.
NOTE
Stub areas are covered later in this chapter. Remember that all routers must be connected to the backbone logically or you must use a virtual link. To understand why logical links are required in today's networks, consider the case were Company XYZ buys Company ACME. Both companies use OSPF and have their own individual backbones. Rather than re-address the networks, a virtual link can provide
immediate IP connectivity.
Table 4-1 summarizes the four OSPF area types and their functions.
Table 4-1. OSPF Router Types
Router Type Description
Internal router This router is within a specific area only. Internal router functions include maintaining the OSPF database and forwarding data to other networks. All interfaces on internal routers are in the same area.
Area border router
(ABR) ABRs are responsible for connecting two or more areas. An ABR contains the full topological database for each area it is connected to and sends this information to other areas.
Autonomous system boundary router (ASBR)
ASBRs connect to the outside world or perform some form of redistribution into OSPF.
Backbone router Backbone routers are connected to area 0, which is also represented as area 0.0.0.0. Backbone routers can be internal routers or ASBRs.
Figure 4-1 displays a typical OSPF area assignment and the function of these routers.
Figure 4-1. Typical OSPF Area Assignment and OSPF Routers
In Figure 4-1, the routers residing in the backbone (area 0) are called backbone routers. A backbone router connecting to another area can also be an ABR. Routers that connect to, for example, the Internet and redistribute external IP routing tables from such protocols as Border Gateway Protocol (BGP) are termed autonomous
system boundary routers (ASBRs). So, you can have a backbone router perform ASBR functions as well as ABR functions.
Each router, depending on its function, sends out a link-state advertisement (LSA).
An LSA is a packet used by such routing protocols as OSPF (that is, link-state routing protocols) to send information to neighboring routers describing networks and path costs.
TIP
Before flooding any neighboring routers with LSAs, Cisco IOS routers must first undergo the following:
Step 1. Ensure the neighboring router is in a state of adjacency.
Step 2. The interface cannot be a stub area (LSA type 5. Stub areas are discussed later in this chapter.)
Step 3. The interface cannot be connected to a totally stubby area. (LSA type 3, 4, or 5 will not be sent. Totally stubby areas are discussed later in this chapter.)
For a detailed summary of OSPF and the packet types, the Cisco Press titles Routing TCP/IP, Volumes I and II, by Jeff Doyle and Jennifer DeHaven Carroll (Volume II only) explain all the advanced concepts you could ever need.
OSPF supports a number of LSA types as well as three other area types: a stub area, a totally stubby area, and a not-so-stubby area (NSSA). These additional areas provide even more functionality in OSPF. Before covering these new areas in detail, this section first goes over the link-state advertisement types and when to use them in an OSPF environment.
The OSPF standard defines a number of LSAs types. Unlike distance vector protocols (for example, RIP), OSPF does not actually send its routing table to other routers.
Instead, OSPF sends the LSA database and derives the IP routing table from LSAs.
Table 4-2 describes the six most common LSAs and their functions.
Table 4-2. Six Common Supported LSA Types on Cisco IOS Routers
LSA Packet
Type Name Function
1 Router link
advertisements Describes the state and cost of the router's own interfaces.
2 Network link
advertisements Used on multiaccess networks. These are originated by the designated router (DR).
3 Summary link
advertisements (ABRs)
Originated by ABRs only. This LSA type sends out information into the autonomous system
(AS) but outside of the area (interarea routes).
4 Summary link
advertisements (ASBRs) Originated by ASBRs describing IP networks external to the AS.
5 Autonomous system (AS) external link
advertisements
An LSA sent to a router that connects to the Internet, for example. An advertisement sent from ABR to the ASBR.
6 Not-so-stubby areas
(NSSA) An advertisement bound to an NSSA area.
A stub area is defined as an area that contains a single exit point from the area. A stub in the English dic tionary means a dead end, and that is exactly what it means in OSPF. Areas that reside on the edge of the network with no exit point except one path can be termed a stub area. Stubs come in three types.
Table 4-3 summarizes the functions of these new areas, called stubby areas, total stubby areas, and not-so-stubby areas. Take important note of the LSA type allowed or not allowed to fully appreciate the value of a stub area.
Table 4-3. Additional Area Types
Area Type Function
Stub area
This area does not accept LSA types 4 and 5, which are summary links and external link advertisements, respectively. The only way to achieve a route to unknown destinations is, thereby, a default route injected by the ABR.
Totally stubby area
This area blocks LSA types 3, 4, and 5. Although similar to a stub area, a totally stubby area blocks LSAs of type 3 as well. This solution is Cisco- proprietary and is used to further reduce a topological database.
Not-so- stubby area
This area is used primarily for connections to an ISP. This area is designed to allow LSAs of type 7 only. All advertised routes can be flooded through the NSSA but are blocked by the ABR. Basically, a type 7 LSA (if the P bit is set to one) will be convert to a type 5 LSA and flooded throughout the rest of the network. If the P bit is set to zero, no translation takes place.
Type 4 or 5 LSAs are not permitted. This advertisement will not be propagated to the rest of the network. Typically used to provide a default route.
The only way to appreciate these new areas is to configure them and view the OSPF database. The scenarios that follow cover stub, totally stubby, and not-so-stubby areas in more detail.
NOTE
A stub area cannot be a transit for a virtual link. This is a design limitation by the protocol itself. When a router is defined as a stub area, a bit, called the E bit, in the Hello packet is set to 0. All routers that form any OSPF neighbor relationship must have the E bit set to 0 as well; otherwise, no adjacency is formed.
Also a stub (does not permit LSA types 4 and 5) area or totally stubby (does not permit LSA types 3, 4, and 5) area does not allow external routes. Nor is
redistribution allowed. Those functions must be performed by ABRs or ASBRs.
Table 4-4 summarizes the LSA types by area and indicates which LSAs are permitted or disallowed in certain areas.
Table 4-4. LSA Types and Area Restrictions
LSA Type Permitted?
Area 1/2 3/4 6 7
NSSA Yes Yes No Yes
Totally stubby Yes No No No
Stub Yes Yes No No
TIP
All OSPF packets are sent using IP protocol port number 89. OSPF runs over the IP layer (also called the Network layer) of the Open System Interconnection (OSI) model.
VLSM and Summarization with OSPF
OSPF supports a number of features. The two main features that interest most network designers are that it supports VLSM and provides the ability to summarize networks.
When an LSA packet or routing update is received or sent, the packet includes the following information:
• LSA type
• Router ID (unique IP address, no other router can share the same router ID)
• Subnet mask
• Attached router
• Metric
Because the subnet mask is carried along with the update, OSPF can support VLSM.
Without a mechanism that sends the subnet mask, there can be no support for VLSM. Routing Information Protocol (RIPv1) and Interior Gateway Routing Protocol (IGRP), for example, do not carry the subnet mask when they send out updates.
Summarization occurs using the LSA type 4 packet or by the ASBR.
You configure OSPF in two ways to summarize networks using Cisco IOS routers:
• Interarea summarization creating type 3 or 4 LSAs
• External summarization with type 5 LSAs
Consider an OSPF network containing two routers across an Ethernet segment.
Figure 4-2 displays this two-router topology with the routers named R1 and R2.
Figure 4-2. Sample Network for OSPF Summarization Example
R2 is sending R1 15 OSPF routes ranging from 131.109.1.0 to 131.109.15.0. Instead of populating R1's routing table with 15 IP route entries, you can use summarization.
Example 4-1 displays R1's routing table.
Example 4-1 R1's OSPF Routing Table
R1>show ip route ospf
131.109.0.0/24 is subnetted, 14 subnets
O IA 131.109.14.0 [110/11] via 131.108.2.2, 00:00:48, Ethernet0/0 O IA 131.109.15.0 [110/11] via 131.108.2.2, 00:00:48, Ethernet0/0 O IA 131.109.12.0 [110/11] via 131.108.2.2, 00:00:48, Ethernet0/0 O IA 131.109.13.0 [110/11] via 131.108.2.2, 00:00:48, Ethernet0/0 O IA 131.109.10.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.11.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.8.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.9.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.6.0 [110/11] via 131.108.2.2, 00:00:00, Ethernet0/0 O IA 131.109.7.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.4.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.5.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.2.0 [110/11] via 131.108.2.2, 00:01:08, Ethernet0/0 O IA 131.109.3.0 [110/11] via 131.108.2.2, 00:00:58, Ethernet0/0 O IA 131.109.1.0 [110/11] via 131.108.2.2, 00:02:54, Ethernet0/0 The remote networks are indicated by O IA, which indicates interarea routes. Intra- area routes are indicated by O.
NOTE
Two more types of OSPF routes exist: external type 1 routes, indicated by Cisco IOS as O E1, and external type 2 routes, indicated by Cisco IOS as O E2. External OSPF routes are routing entries in OSPF route tables injected by an external routing protocol, such as BGP or IGRP.
When calculating the cost to a remote network, E1 routes add the total cost to destination; whereas E2 routes include only the cost to the external network.
Example 4-1 displays an IP routing table telling you that R2 is in area 0 and another area (ABR); hence, R2 can perform interarea summarization. Because the networks 1 to 15 are contiguous, you can configure R2 to mask the networks by masking the first 15 networks with the IOS area area ID range address mask command.
Example 4-2 displays the summary applied to R2 under the OSPF router process ID of 1.
Example 4-2 Summary of R2
R2(config)#router ospf 1
R2(config-router)#area 1 range 131.109.0.0 255.255.240.0
Example 4-3 displays R1's routing table now. Remember that previously there were 15 IP routing entries.
Example 4-3 OSPF Route Table on R1 After Summarization
R1#sh ip route ospf
131.109.0.0/20 is subnetted, 1 subnets
O IA 131.109.0.0 [110/11] via 131.108.2.2, 00:02:33, Ethernet0/0 R1#
By using OSPF summarization techniques, you can summarize a simple network with 15 IP networks by using 1 IP routing entry.
In OSPF, you can also externally summarize IP routes by using the summary ip- address mask command.
OSPF summarization examples are included among the five scenarios in this chapter.
OSPF over Multiarea NBMA
OSPF over a multiple-area NBMA network presents some challenges to a network designer as you discovered in Chapter 3.
Typically, in a large NBMA environment, the backbone (area 0) assignment
encompasses the NBMA connections themselves, because all remote or edge sites need to transit the NBMA network. The same commands that applied in Chapter 3 are used in large NBMA environments.
To summarize the command set used in large NBMA environments, the following commands and steps are required to configure OSPF in a multiarea OSPF Network:
1. The network command enables OSPF across interfaces.
2. Summarization enables networks to reduce IP routing table sizes by using area range on ABRs and the summary address subnet mask command for an ASBR.
3. Any stubby configurations to reduce memory and CPU requirements.
4. Any virtual links that may be required.
5. Any command that manipulates the OSPF c ost metrics for equal costs path load balancing.
Next, this chapter describes another common link-state routing protocol used in large IP routing environments, namely Intermediate System-to-Intermediate System (IS-IS).
Integrated Intermediate System-to-Intermediate System
Integrated IS-IS is a link-state routing protocol, but few people consider it an alternative to OSPF. Even so, IS-IS is a common routing protocol typically used in large ISP environments. IS-IS was developed at the same time OSPF was being developed. In brief, IS-IS was designed to provide two routing mechanisms (in competition with OSPF forum, which could only route IP) at the same time: one for IP and another for Decnet Phase V. This chapter covers integrated IS-IS IP routing capabilities only.
As with any new protocol, you need to be familiar with some new terms and
definitions to fully understand IS-IS. Instead of using areas as OSPF does, IS-IS has routers perform Level 1 (L1) and Level 2 (L2) functions.
Routers that have no direct connectivity to any other area are called L1 routers.
Routers that connect areas are called L2 routers.
In Figure 4-3, Routers R1 and R2 are Level 1/Level 2 (L1/L2) routers, and the edge routers R3 and R4, which are each in only one area, are L2 routers. An L1 router performs the functions similar to those an OSPF internal router performs. A L1/L2 router performs similar functions to an ABR in OSPF. Both L1 and L2 routers maintain link-state databases.
Figure 4-3. IS-IS Terminology Diagram
NOTE
IS-IS is the protocol between two IS-IS-enabled routers.
IS-ES is the protocol—Connectionless Network Protocol (CLNP)—between an end system, such as a PC, and an IS-IS enabled router.
IS-IS has many similarities to OSPF, including the following characteristics:
• IS-IS maintains a link-state database.
• IS-IS uses hello packets to form neighbor relations with other IS-IS enabled routers.
• IS-IS uses areas to form a hierarchy.
• IS-IS supports VLSM.
• IS-IS support routing authentication mechanisms.
• IS-IS on broadcast networks elects a designated router (DR).
To configure IS-IS on a Cisco IOS router, you must perform the following configurations and tasks:
• Enable IS-IS with the command router isis.
• Configure any IS-IS interface parameters, such as hello interfaces, and enable IS-IS to send out updates from an interface.
• Configure area parameters.
Scenarios
The following scenarios are designed to draw together some of the content described in this chapter and some of the content you have seen in your own networks or
practice labs. There is no one right way to accomplish many of the tasks presented, and using good practice and defining your end goal are important in any real-life design or solution. You start by building an OSPF network and then use the methods described in this chapter to help reduce the size of IP routing tables.