• Aucun résultat trouvé

Types of LSAs

Dans le document OSPF Network Design SolutionsSecond Edition (Page 123-133)

Unlike distance vector protocols (RIP or IGRP), OSPF does not send its routing table to other routers. Instead, routing tables are derived from the LSA database, as discussed in Chapter 2. OSPF has a variety of router designations and area types. This complexity requires that OSPF communicates information as accurately as possible to achieve optimal routing. OSPF accomplishes this communication through the use of different types of LSAs. Table 3-1 describes the ten different types of LSA packets that can be generated by the source router and entered into the destination router’s LSA database. However, note that Cisco has not implemented all the possible OSPF LSAs, specifically the Type 6 multicast LSA, as documented in RFC 1584.

The following section provides general descriptions, an operational overview, and the packet format of nine of the LSA packet types. (Type 6 is not discussed.)

Although several different types of LSAs exist and each has a unique structure to reflect the information it contains, they each share a common packet header, as shown in Figure 3-1.

After the common header, the specific LSA packet information is then provided for router processing. You learn about the packet structure for each LSA type as it is discussed.

Figure 3-1 Link-State Advertisement Common Header

Type 1: Router LSAs

Router LSAs describe the states of the router’s links within the area and are flooded only within an area for which that router is a member. The fact that Type 1 LSAs describe links in the area is a key differentiator between this LSA type and the others. For example, an OSPF ABR router is in two areas and sends router LSAs for the link that resides only in each area. (That is, cross-transmission is not allowed.)

Table 3-1 Types of LSAs

LSA Type Number LSA Description

1 Router link advertisements

2 Network link advertisements

3 ABR summary link advertisements

4 ASBR summary link advertisements

5 Autonomous system external route advertisements 6 Multicast group LSA (not implemented by Cisco)

7 Not-so-stubby area (NSSAs) external

9 Opaque LSA: Link-local scope

10 Opaque LSA: Area-local Scope

11 Opaque LSA: autonomous system scope

Options LS Type LS Age

Link State ID Advertising Router LS Sequence Number

Length LS Checksum

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

0 1 2 3

Link-State Advertisements 105

When discussing OSPF LSAs, you need to understand that OSPF has two native types of routes:

Intra-area route—A route found within an OSPF area

Inter-area route—A route found in a different OSPF area Figure 3-2 shows that Type 1 LSAs contain intra-area information.

Figure 3-2 Type 1 LSA Operation: Router LSAs Describe the Current State of the Router’s Links (Interfaces) to the OSPF Area (Intra-Area)

The link-state ID is the originating router’s ID. Figure 3-3 shows the structure of each router LSA packet.

Figure 3-3 Router LSA Packet Layout

Type 2: Network LSAs

Network LSAs are generated only by designated routers (DRs) and describe the set of routers attached to a particular nonbroadcast multiaccess (NBMA) or broadcast network.

S1 E0

Type1 LSA forS1 Type 1LSAforE0

Area 1 Area 0

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

0 1 2 3

0 V E B 0 Number of Links

Link ID Link Data Type

TOS=x TOS=y

#TOS 0 0

TOS=z 0

TOS x Metric TOS 0 Metric

TOS y Metric

TOS z Metric

--- ---

---The purpose of the network LSA is to ensure that only one LSA is generated for the NBMA or broadcast network (as opposed to one from each attached router). This is a form of internal OSPF summarization. Specifically, Type 2 LSAs describe all routers that are attached to a multiaccess network. This information is an indication of all routers that are connected to a particular multiaccess segment, such as Ethernet, Token Ring, FDDI, and Frame Relay (as well as NBMA). Figure 3-4 shows that Type 2 LSAs are flooded in the area that contains the network.

Figure 3-4 Type 2 Network LSA Operation: Describing the OSPF Routers in a Network

The link-state ID is the IP interface address of the DR. Figure 3-5 shows the structure of each network LSA packet.

Figure 3-5 Network LSA Packet Format

RtrA RtrB

RtrC RtrD

OSPF Designated Router (DR)

Type 2 LSA - I know about Routers A,B,C,D.

OSPF Area

Options 2

LS Age

Link State ID Advertising Router LS Sequence Number

Length LS Checksum

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

0 1 2 3

Network Mask Attached Router

...

Link-State Advertisements 107

NOTE Type of service (TOS) is no longer used in OSPF, so TOS fields remain for clarity in the packet structure.

Type 3: ABR Summary LSAs

Summary LSAs are generated only by area border routers (ABRs) and describe inter-area routes to various networks. Specifically, Type 3 LSAs describe networks that are within the OSPF autonomous system but outside of the particular OSPF area that is receiving the LSA.

A Type 3 LSA has a flooding scope of being transmitted only into the area where the network or subnet is not found. For example, if an ABR is connected to area 1 and area 0 with a network that has subnet 172.16.1.0/24 in area 1, a Type 3 LSA is not flooded into area 1 for that subnet. The ABR generates a Type 3 LSA and floods it into area 0 but not into area 1. Figure 3-6 demonstrates this concept. These LSAs can also be used for aggre-gating routes.

Figure 3-6 Type 3 LSA Operation: Type 3 LSAs Tell Other Areas About Other Inter-Area Routes

The link-state ID is the destination network number. Figure 3-7 shows the format of each summary LSA packet.

Autonomous System (AS)

ABR

Type 3 LSAÑI know about

networks a.b.c.d & e.f.g.k Type 3 LSAÑI know about networks L.M.N.O & P.Q.R.S OSPF Area Contains

Networks L.M.N.O P.Q.R.S

OSPF Area Contains Networks

a.b.c.d e.f.g.k

Figure 3-7 Summary LSA Packet (Type 3 and 4) Format

Type 4: ASBR Summary LSAs

Type 4 LSAs are very similar in function to Type 3 LSAs, but the two must not be confused.

Each summary LSA describes a route to a destination outside the OSPF area yet still inside the autonomous system (that is, an inter-area route). The Type 4 summary LSAs describe routes to autonomous system (AS) boundary routers (ASBRs) and are also generated by ABRs. Therefore, Type 4 LSAs enable other routers to find and reach the ASBR. Figure 3-8 shows the operation of Type 4 LSAs.

Figure 3-8 Type 4 Summary LSAs: Type 4 LSAs Tell the Network How to Reach the ASBR 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

0 1 2 3

Network Mask

TOS=x 0 TOS x Metric

TOS=0 0 TOS 0 Metric

- - - - - -

-TOS=z 0 TOS z Metric

OSPF Area 0

Type 4 LSA Ñ Here is the route to the ASBR.

OSPF Area 10

OSPF Area 20

ASBR

ABR ABR

Type1 LSA Here

I am.

OSPF AS

Type 4 LSAÑ

Here is theroute

tothe ASBR.

Link-State Advertisements 109

The link-state ID is the router ID of the described ASBR. Figure 3-7 (shown previously) illustrates the format of each packet.

Type 5: Autonomous System External LSAs

Type 5 LSAs are generated by the ASBRs. These LSAs describe routes to destinations that are external to the AS. Type 5 LSAs are flooded everywhere, with the exception of stub areas.

External links are an indication of networks outside of the OSPF routing process in the AS.

These outside networks can be injected into OSPF via different sources, such as static and redistribution. The ASBR has the task of injecting these routes into an AS. Figure 3-9 illus-trates the operation of Type 5 LSAs.

Figure 3-9 Type 5 LSA Operation

Consider a real-world example of how a Type 5 LSA might be used. In Figure 3-9, you see an AS that has a default route to the Internet. The ASBR knows about the default route, but in order for the rest of the network to know about it, the ASBR must inject the route into an advertisement. The advertisement that carries this default route information to the rest of the AS is the Type 5 LSA.

The link-state ID is the external network number. Type 5 LSAs also inform other routers about a default route if one is configured in your network. Figure 3-10 shows the format of Type 5 LSA packets.

External AS OSPF AS

Type 5 LSAÑI know about those external routes and this default.

ASBR

Figure 3-10 Type 5 LSA Packet Structure

Type 7: Not-So-Stubby Area LSAs

Type 7 LSAs are generated by ASBRs. These LSAs describe routes within a not-so-stubby-area (NSSA). Type 7 LSAs can be summarized and converted into Type 5 LSAs by the ABRs for transmission into other OSPF areas. After Type 7 LSAs are converted to Type 5 LSAs, they are distributed to areas that can support Type 5 LSAs. Figure 3-11 illustrates the operation of Type 7 LSAs, and Figure 3-12 illustrates the format of Type 7 LSA packets.

Figure 3-11 Type 7 LSA Operation

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

0 1 2 3

Network Mask

E 0 Metric

E TOS

Forwarding Address External Route Tag

TOS Metric

Forwarding Address External Route Tag

RIP ASBR Network

OSPF Stub Area 51

Type 7 LSA About RIP Network

This external network makes the stub area an NSSA.

ABR (has highest router ID) translates Type 7 to Type 5 LSAs for the NSSA.

ABR

Type 5 LSA About RIP Network

OSPF Area 0

Link-State Advertisements 111

Figure 3-12 Type 7 LSA Packet Format

NOTE When discussing NSSA operation and structure, be aware that NSSAs have their own RFC (1587). Refer to this RFC for more detailed information.

One of the most interesting features of NSSAs is how they convert Type 7 LSAs, which describe the external routes to all the routers in the NSSA, into the more commonly seen Type 5 LSAs so that all the rest of the OSPF autonomous systems know about the external routes. The RFC describes this process, but the flow chart in Figure 3-13 makes it easier to understand.

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

0 1 2 3

Network Mask

E 0 Metric

E TOS

Forwarding Address External Route Tag

TOS Metric

Forwarding Address External Route Tag

Options 5

LS Age

Link State ID Advertising Router LS Sequence Number

Length LS Checksum

Figure 3-13 NSSA Type 7-to-Type 5 LSA Translation Process

Type 9: Opaque LSA: Link-Local Scope

As the name of this LSA implies, its transmission scope is defined as being confined to a local network or subnet only.

NOTE Opaque LSAs are used for Multiprotocol Label Switching (MPLS) traffic engineering purposes. Specifically, opaque LSAs are used to distribute various MPLS traffic engineering attributes, such as capacity and topology of links, throughout a network. In addition to Cisco, other major vendors such as Juniper and Riverstone implement opaque LSAs; however, as indicated in RFC 2370, “The OSPF Opaque LSA Option,” determining their use is vendor-specific. Therefore, some testing might be required to find the optimal use of opaque LSAs across different platforms.

The router with the highest RID (i.e. ABR) within an NSSA will be responsible for translating Type 7 LSAs into Type 5 LSAs as part of the SPFcalculation; after the original Type 7 and 5 LSAs have been processed, the following can occur:

(1) The Type 7 LSA has been tagged for advertisement. The address/mask pair is found on this router and then translate if the following is true:

(1.1) The translation has not already occurred

AND

(1.2) Path or metric is different between the Type 7 and 5 OR

(1.3) Forwarding address is different between the Type 7 and Type 5.

If forwarded, all route characteristics will remain the same except the advertising router will be shown as the ABR.

(3) When the routeÕs status indicates DoNotAdvertise, then the router will suppress the Type 5 translation.

However, if the P-bit is set and the LSA has a nonzero forwarding address and if the route is not configured, then the translation will occur if one of the following is true:

(3.1) No Type 5 LSA has already been translated from the Type 7 LSA in question.

(3.2) The path type or the metric in the corresponding type 5 LSA is different from the Type 7 LSA.

(3.3) The forwarding address in the corresponding Type 5 LSA is different from the Type 7 LSA.

(2) The Type 7 LSA of a longer mask for example; then a Type 5 LSA is generated with link-state ID equal to the rangeÕs address.

The advertising router field will be the router ID of this Area Border Router.

Link-State Advertisements 113

Type 10: Opaque LSA: Area-Local Scope

As the name of this LSA implies, the transmission scope is defined as being confined to an OSPF area only.

Type 11: Opaque LSA: Autonomous System Scope

As the name of this LSA implies, the transmission scope is defined as being confined to an OSPF AS. Figure 3-14 illustrates the format of Type 9—11 LSA packets.

Figure 3-14 Type 9, 10, and 11 LSA Packet Structure

Dans le document OSPF Network Design SolutionsSecond Edition (Page 123-133)