Understanding OSPF LSAs
This section describes each of the common LSA types and how they form the layout of the OSPF LSDB.
LSAs are the building blocks of the OSPF LSDB. Table 3-12 summarizes the types of LSAs.
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Individually, LSAs act as database records. In combination, they describe the entire topology of an OSPF network or area. The following are descriptions of each type of LSA:
-
Type 1 (Router LSA)— Every router generates router-link advertisements for each area to which it belongs. Router-link advertisements describe the states of the router’s links to the area and are flooded only within a particular area.
All types of LSAs have 20-byte LSA headers. One of the fields of the LSA header is the link-state ID.
The link-state ID of the type 1 LSA is the originating router’s ID.
-
Type 2 (Network LSA)— DRs generate network link advertisements for multiaccess networks, which describe the set of routers attached to a particular multiaccess network. Network link advertisements are flooded in the area that contains the network. The link-state ID of the type 2 LSA is the DR’s IP interface address.
-
Types 3 and 4 (Summary LSA)— ABRs generate summary link advertisements. Summary link advertisements describe the following interarea routes:
-
Type 3 describes routes to the area’s networks (and may include aggregate routes).
-
Type 4 describes routes to ASBRs.
-
The link-state ID is the destination network number for type 3 LSAs and the router ID of the described ASBR for type 4 LSAs.
These LSAs are flooded throughout the backbone area to the other ABRs. Type 3 LSAs are not flooded into totally stubby areas or totally stubby NSSAs. Type 4 LSAs are not flooded into any type of stub area. (Stub areas and NSSAs are discussed later in this chapter in the “Configuring OSPF Special Area Types” section.)
-
Type 5 (autonomous system external LSA)— ASBRs generate autonomous system external link advertisements. External link advertisements describe routes to destinations external to the autonomous system and are flooded everywhere except to any type of stub areas. The link-state ID of the type 5 LSA is the external network number.
-
Type 6 (Multicast OSPF LSA)— These LSAs are used in multicast OSPF applications.
-
Type 7 (LSAs for NSSAs)— These LSAs are used in NSSAs, as described in the “Configuring NSSAs” section, later in this chapter.
-
Type 8 (External attributes LSA for BGP)— These LSAs are used to internetwork OSPF and BGP.
-
Types 9, 10, or 11 (Opaque LSAs)— These LSA types are designated for future upgrades to OSPF for distributing application-specific information through an OSPF domain. For example, Cisco Systems uses Type 10 opaque LSAs for MPLS Traffic Engineering functionality with OSPF. Standard LSDB flooding mechanisms are used to distribute opaque LSAs. Each of the three types has a different flooding scope. Type 9 LSAs are not flooded beyond the local network or subnetwork. Type 10 LSAs are not flooded beyond the borders of their associated area. Type 11 LSAs are flooded throughout the autonomous system (the same as for Type 5 LSAs). (Opaque LSAs are defined in RFC 5250, The OSPF Opaque LSA Option.)
Note |
|
The following sections describe the LSA types 1 to 5. (As previously mentioned, type 7 LSAs are described later in the chapter. The other types are not discussed further in this book.)
LSA Type 1: Router LSA
A router advertises a type 1 LSA that floods to all other routers in the area where it originated, as shown in Figure 3-25. A type 1 LSA describes the collective states of the router’s directly connected links (interfaces).
Each type 1 LSA is identified by the originating router’s ID in the link-state ID field.
Each of the router’s links (interfaces) is defined as one of four types: type 1, 2, 3, or 4. The LSA includes a link ID field to identify what is on the other end of the link. Depending on the link type, the link ID field has different meanings. Type 1 LSA link types and their link ID meanings are described in Table 3-13.
|
|
|
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Note |
|
A link data field is also specified for each link, providing 32 bits of extra information. For most link types this is the IP interface address of the associated router interface. For links to stub networks, this field provides the stub network’s subnet mask.
In addition, the type 1 LSA indicates the OSPF cost for each link, and whether the router is an ABR or ASBR.
LSA Type 2: Network LSA
A type 2 LSA is generated for every transit broadcast or NBMA network within an area. A transit network has at least two directly attached OSPF routers, as shown in Figure 3-26. A multiaccess network such as Ethernet is an example of a transit network. A type 2 network LSA lists each of the attached routers that make up the transit network, including the DR itself, and the subnet mask of the link.
The transit link’s DR is responsible for advertising the network LSA. The type 2 LSA then floods to all routers within the transit network area. Type 2 LSAs never cross an area boundary. The link-state ID for a network LSA is the IP interface address of the DR that advertises it.
LSA Type 3: Summary LSA
An ABR sends type 3 summary LSAs. A type 3 LSA advertises networks owned by an area to the rest of the areas in the OSPF autonomous system, as shown in Figure 3-27. As the figure illustrates, type 1 LSAs stay within an area. When an ABR receives type 1 LSAs from other routers within an area, it sends out type 3 summary LSAs to advertise the networks learned via these type 1 LSAs to other areas. The type 3 LSAs are flooded throughout a single area only but are regenerated by ABRs to flood into other areas.
By default, OSPF does not automatically summarize groups of contiguous subnets, or even summarize a network to its classful boundary. ABRs flood summary LSAs to other areas regardless of whether the routes listed in the LSAs are summarized. The network administrator, through configuration commands, must specify if and how the summarization will occur. By default, a type 3 summary LSA is advertised into the backbone area for every subnet defined in the originating area. Because Type 3 LSAs do not, by default, contain summarized routes, by default, all subnets in an area will be advertised. This can cause significant flooding problems. Consequently, manual route summarization (also called aggregation) at the ABR should always be considered. (OSPF route summarization is discussed later in this chapter, in the “Configuring OSPF Route Summarization” section.)
Note |
|
LSA Type 4: Summary LSA
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 for an external autonomous system requires routing table knowledge of the ASBR that originated the external routes. The link-state ID is set to the ASBR’s router ID.
In Figure 3-28, the ASBR sends a type 1 router LSA with a bit (known as the external bit [e bit]) that is set to identify itself as an ASBR. Type 1 LSAs stay within an area. However, when the ABR (identified with the border bit [b bit] in the router LSA) receives this type 1 LSA, it builds a type 4 LSA and floods it to the backbone, area 0. Subsequent ABRs regenerate a type 4 LSA to flood into their areas.
LSA Type 5: External LSA
Type 5 external LSAs describe routes to networks outside the OSPF autonomous system. Type 5 LSAs are originated by the ASBR and are flooded to the entire autonomous system, as shown in Figure 3-29. The link-state ID is the external network number. Because of the flooding scope and depending on the number of external networks, the default lack of route summarization can also be a major issue with external LSAs. The network administrator should always attempt to summarize blocks of external network numbers at the ASBR to reduce flooding problems.
Example OSPF LSAs in a Network
Figure 3-30 illustrates the different types of LSAs found in an OSPF network. Note that only one example of each LSA type exchange is shown in this figure.
0 comments
Post a Comment