Routing Types Within an OSPF Network

OSPF can use three types of routes:

The following sections provide general descriptions of these route types. As you move further into designing and implementing OSPF networks, you will be exposed to these different types of routes.

Intra-Area Routing

Intra-area routing describes routes to destinations within a logical OSPF area. Intra-area routes in OSPF are described by router (Type 1) and network (Type 2) LSAs. When displayed in the OSPF routing table, these types of intra-area routes are designated with an "O."

Inter-Area Routing

Inter-area routing describes destinations that require travel between two or more OSPF areas and still fall within the same AS. These types of routes are described by network (Type 3) summary LSAs. When routing packets between two nonbackbone areas, the backbone is used. This means that inter-area routing has pieces of intra-area routing along its path, for example:

1 An intra-area path is used from the source router to the area border router.

2 The backbone is then used from the source area to the destination area.

3 An intra-area path is used from the destination area's area border router to the destination.

When you put these three routes together, you have an inter-area route. Of course, the SPF algorithm calculates the lowest cost between these two points. When displayed in the OSPF routing table, these types of routes are indicated with an "O IA," as demonstrated in Example 2-2.

Example 2-2 Discerning OSPF Route Types in an OSPF Routing Table

Sydney#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 OSPF external type 1, E2 - OSPF external type 2, E - EGP IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area candidate default, U - per-user static route, o - ODR P - periodic downloaded static route

Example 2-2 Discerning OSPF Route Types in an OSPF Routing Table (Continued)

Gateway of last resort is not set

20.0.0.0/24 is subnetted, 1 subnets O IA 20.20.20.0 [110/2] via 192.168.254.100, 00:01:48, FastEthernet0/0

10.0.0.0/24 is subnetted, 1 subnets C 10.10.10.0 is directly connected, FastEthernet0/1

C 192.168.254.0/24 is directly connected, FastEthernet0/0

30.0.0.0/24 is subnetted, 1 subnets O IA 30.30.30.0 [110/2] via 192.168.254.101, 00:01:48, FastEthernet0/0 Sydney#

External Routes

External routing information can be gained by OSPF through a number of means. The most common means is through redistribution from another routing protocol. This is discussed in detail in Chapter 6, "Redistribution." This external route information must then be made available throughout the OSPF AS in order for it to be of use. The AS boundary routers (ASBRs) do not summarize the external routing information, but ASBRs flood the external route information throughout the AS. Every router receives this information, with the exception of stub areas.

NOTE Summarization at ASBR happens only when configured with an outbound distribute list or an OSPF Summary statement, but this not the default. By default, Cisco routers let all external routes in without summarization.

The types of external routes used in OSPF are as follows:

• E1 routes—E1 routes' costs are the sum of internal and external (remote AS) OSPF metrics. For example, if a packet is destined for another AS, an E1 route takes the remote AS metric and adds all internal OSPF costs. They are identified by the E1 designation within the OSPF routing table.

• E2 routes—E2 routes are the default external routes for OSPF. They do not add the internal OSPF metrics; they use the remote AS only, regardless of where they are in the AS. For example, if a packet is destined for another AS, E2 routes add only the metrics from the destination AS associated with reaching the destination.

TIP Multiple routes to the same destination use the following order of preference: intra-area, inter-area, E1, and E2.

74 Chapter 2: Introduction to OSPF

OSPF Areas

Areas are similar to subnets in that the routes and networks contained within can be easily summarized. In other words, areas are contiguous logical segments of the network that have been grouped together. Through the use of areas within OSPF, the network is easier to manage and provides a marked reduction in routing traffic. These benefits are gained because the topology of an area is invisible to other routers outside of the area.

Areas also allow the routers contained within them to run their own link-state database and SPF algorithm. A router runs one copy of the link-state database for each area to which it is connected.

A typical scenario for many networks as they grow and more sites are added is that the benefits of OSPF begin to degrade. For example, the link-state database continues to grow in size as the size of the network and the number of routers grow. At some point, this becomes inefficient.

The flooding of LSAs from a large number of routers can also cause congestion problems. To solve these problems, begin by segmenting your AS into multiple areas. As you group routers into areas, consider limiting the number of routers per area. Each router then has a link-state database, with entries for each router in its area. This substantially increases the efficiency of your OSPF network.

Characteristics of a Standard OSPF Area

The following list provides general characteristics of an OSPF area:

• Areas contain a group of contiguous hosts and networks.

• Routers have a per-area topological database and run the same SPF algorithm.

• Each area must be connected to the backbone area known as area 0.

• Virtual links can be used to connect to area 0 in emergencies.

• Intra-area routes are used for routes within to destinations within the area.

Standard Area Design Rules

Consider the following requirements when designing an OSPF area:

• A backbone area, known as area 0, must be present.

• All areas must have a connection to the backbone area, even stub areas.

• The backbone area must be contiguous.

• Only use virtual links as an emergency temporary measure.

Area 0: The OSPF Backbone Area

A backbone area is the logical and physical structure for the AS and is attached to multiple areas. The backbone area is responsible for distributing routing information between nonbackbone areas. The backbone must be contiguous, but it need not be physically contiguous; backbone connectivity can be established and maintained through the configuration of virtual links. This is discussed in further detail in Chapter 4, "Design Fundamentals."

Stub Areas

An area is referred to as a stub area when there is commonly a single exit point from that area, or if external routing to outside of the area does not have to take an optimal path. A stub is just what it sounds like: a dead end within the network. Packets can enter and leave only through the ABR. Why would you ever need such an area? The reason is network size. By building stub areas, you can reduce the overall size of the routing tables within the routers that are inside an OSPF stub area. Stub areas have the following functional and design characteristics:

• External networks, such as those redistributed from other protocols into OSPF, are not allowed to be flooded into a stub area. Specifically, the ABR stops LSA Types 4 and 5. Therefore, no router inside a stub area has any external routes.

• Configuring a stub area reduces the link-state database size inside an area and reduces the memory requirements of routers inside that area.

• Routing from these areas to the outside world is based on a default route. Stub areas do contain inter-area and intra-area routes because the ABR injects a default route (0.0.0.0) into the stub area.

• Stub areas typically have one ABR; this is the best design. However, you can have additional ABRs, but this might cause suboptimal routing.

All OSPF routers inside a stub area must be configured as stub routers because whenever an area is configured as stub, all interfaces that belong to that area start exchanging OSPF Hello packets with a flag that indicates that the interface is part of an OSPF stub area. This is actually just a bit in the Hello packet (E bit) that gets set to 0. All routers that have a common area must to agree on that flag. For example, all the routers in a stub area must be configured to recognize that the area is a stub. If the routers don't agree, they cannot become neighbors and routing does not take effect.

Stub areas have certain restrictions applied to their operation. This is because they have been designed not to carry external routes, and any of the situations in the following list can cause external links to be injected into the stub area. These restrictions are as follows:

• Stub areas cannot be used as a transit area for virtual links.

• An ASBR cannot be internal to a stub area.

76 Chapter 2: Introduction to OSPF

• OSPF allows certain areas to be configured as stub areas, but the backbone area cannot be a stub area.

• LSA Types 4 and 5 are not allowed in a stub area.

TIP An extension to a stub area is called a totally stubby area. Cisco Systems indicates this type of stub area by adding a no-summary keyword to the stub area configuration within the router. A totally stubby area is one that blocks external routes and summary routes (inter-area routes) from going into the area. This way, only intra-area routes exist, and a default route of 0.0.0.0 is injected into the area.

Not-So-Stubby Areas

Not-so-stubby areas (NSSAs) are defined in RFC 1587, "The OSPF NSSA Option." NSSAs can be useful for ISPs and large institutions that need to connect to a remote site that runs a different routing protocol. NSSAs allow OSPF to import external routes into a stub area. This is a direct design violation of a regular stub area, and that is why a new RFC was introduced. By defining this new type of area, a new LSA type (Type 7) was also introduced. Using the new LSA, OSPF can now handle this apparent contradiction of importing external routes into a stub area.

NSSAs are useful for instances where you have no Internet transit link and you have to redistribute a legacy RIP network into a stub area, but you still have only a single exit point to other OSPF areas. There are many applications for this because many devices do not speak OSPF (or do not speak it well); these devices can speak RIP.

Figure 2-8 illustrates a typical NSSA network topology.

Figure 2-8 NSSA Topological Example

ABR ^—^

ABR

Router —

Router ,

/ Area 1 I

OSPF Area 0

U_J

Area 51 I.

(.OSPF Stub Area

I ' I Backbone

r

OSPFNSSA J

Allowing a stub-

>. ~~~~à ASBR

network to connect

to an external

network makes that

RIP Network j

stub area an NSSA.

Was this article helpful?

0 0

Post a comment