OSPF LSA Details

‚  < ‚  Free Open Study ‚  > ‚  

Several types of LSAs exist. This section discusses the nine types of LSAs documented in Table 8-2.

Table 8-2. Types of LSA
Type LSA Functionality
1 Router Defines the state and cost of the link to the neighbor and IP prefix associated with the point-to-point link.
2 Network Defines the number of routers attached to the segment. It gives information about the subnet mask on that segment.
3 Summary network Describes the destination outside an area but within the OSPF domain. The summary for one area is flooded into other areas, and vice versa.
4 Summary ASBR Describes the information about the ASBR. In a single area, there will be no summary Type 4 LSA.
5 External Defines routes to destination external to OSPF domain. Every subnet is represented by a single external LSA.
6 [*] Group membership ‚  
7 NSSA Defines routes to an external destination, but in a separate LSA format known as Type 7.
8[*] Unused ‚  
9 ‚ 11[*] Opaque ‚  

[*] Type 6 is used for group membership in Multicast OSPF (MOSPF), which is not implemented by Cisco. Type 8 is unused, and Types 9 ‚ 11 are used for Opaque LSA, which is not used for route calculation but is used for MPLS traffic engineering, which is beyond of the scope of this chapter. More information about Opaque LSA can be found in RFC 2370.

Each LSA has a 20-byte common LSA header, the format for which is illustrated in Figure 8-7.

Figure 8-7. Common LSA Header Format

graphics/08fig07.gif

The list that follows describes the fields in the LSA header:

  • LS Age ‚ Gives the time, in seconds, since the LSA originated. The maximum age of the LSA is 3600 seconds; the refresh time is 1800 seconds. If the LS age reaches 3600 seconds, the LSA must be removed from the database.

  • Options ‚ Discussed earlier in the section "Hello Packets."

  • LS Type ‚ Represents the types of LSA, several of which are documented in Table 8-2.

  • Link-State ID ‚ Identifies the portion of the network that is being described by the LSA. This field changes according to the LS type.

  • Advertising Router ‚ Represents the router ID of the router originating the LSA.

  • LS Sequence Number ‚ Detects old or duplicate LSAs. Each successive instance is given a successive sequence number. The maximum sequence number is represented by 0x7FFFFFFF. The first sequence number is always 0x80000001. The sequence number 0x80000000 is reserved.

  • LS Checksum ‚ Performs checksum on the LSA, not including LS age. An LSA can be corrupted during flooding or while kept in the memory, so this checksum is necessary. This field cannot have a value of 0 because 0 means that the checksum has not been performed. The checksum is performed at the time of LSA generation or when the LSA is received. It is also performed every CheckAge interval, which, by default, is 10 minutes.

  • Length ‚ Includes the length of the LSA, including the 20-byte header.

Router LSA

Router LSAs are generated by each router for each area to which the router belongs. These packets describe the states of the router's link to the area and are flooded only within a particular area. All the router's links in an area must be described in a single LSA.

The router LSA floods throughout the particular area; however, the flooding of this LSA is limited within an area. The router LSA of a router cannot exist outside the area; otherwise , every single router in OSPF would have to carry huge amounts of detailed information. Those details remain within an area. The router indicates whether it's an ABR, ASBR, or an endpoint of a virtual link.

Figure 8-8 shows the packet format for the router LSA.

Figure 8-8. Router LSA Packet Format

graphics/08fig08.gif

The list that follows describes the fields within the router LSA packet:

  • Bit V ‚ This bit is used to determine whether it's an endpoint of a virtual link.

  • Bit E ‚ This bit is used to determine whether this router is an Autonomous System Boundary Router (ASBR).

  • Bit B ‚ This bit is used to determine whether this router is an Area Border Router (ABR).

  • Number of Links ‚ This includes the number of router links. Note that the router LSA includes all the router links in a single LSA for an area.

  • Link ID, Link Data, and Type ‚ The Type field represents the four types of router links. The other two fields, Link ID and Link Data, represent the 4-byte IP address value, depending on the network type. One thing to note here is that there can be two types of point-to-point links, numbered and unnumbered. In case of numbered point-to-point links, the Link Data field contains the interface address that connects to the neighbor. In the case of unnumbered links, the Link Data field contains the MIBII Ifindex value, a unique value that is associated with every interface. It normally has values starting from 0, as in 0.0.0.17. Table 8-3 lists all possible values for the Link ID and Link Data fields.

  • ToS and ToS Metric ‚ These fields represents the type of service and are normally set to 0.

  • Metric ‚ This field contains the OSPF cost of a specific link. The formula to calculate OSPF cost is 10 8 /Link bandwidth. For example, the metric of a Fast Ethernet interface would be 1. Metric is determined directly from the interface bandwidth, which is configurable. This formula for metric calculation can be overridden by two methods . The first method uses the ip ospf cost cost command under the interface. The second method uses the auto-cost reference-bandwidth reference-bandwidth command under router ospf configuration. The reference bandwidth actually changes the 10 8 value in metric calculation formula.

Table 8-4. Different Router Link Types
Type Description Link ID Link Data
1 Point-to-point numbered Neighbor's router ID Interface IP address
1 Point-to-point unnumbered Neighbor's router ID MIBII IfIndex value
2 Transit IP address of the DR Interface IP address
3 Stub IP network number Subnet mask
4 Virtual link Neighbor's router ID Interface IP address
Router LSA Example

Example 8-1 shows the output of a router LSA from a Cisco router.

Example 8-1 Router LSA Output
 RouterB#  show ip ospf database router 141.108.1.21   LS age: 1362  Options: (No TOS-capability, DC)   LS Type: Router Links  Link State ID: 141.108.1.21   Advertising Router: 141.108.1.21  LS Seq Number: 80000085   Checksum: 0xE914   Length: 60  Area Border Router   Number of Links: 3  Link connected to: another Router (point-to-point)      (Link ID) Neighboring Router ID: 141.108.1.3      (Link Data) Router Interface address: 141.108.1.2       Number of TOS metrics: 0        TOS 0 Metrics: 64     Link connected to: another Router (point-to-point)      (Link ID) Neighboring Router ID: 141.108.3.1      (Link Data) Router Interface address: 141.108.1.2       Number of TOS metrics: 0        TOS 0 Metrics: 64     Link connected to: a Stub Network      (Link ID) Network/subnet number: 141.108.1.2      (Link Data) Network Mask: 255.255.255.255       Number of TOS metrics: 0        TOS 0 Metrics: 0 

The output in Example 8-1 shows three links. A few important things to note in this output (as highlighted) are as follows:

  • In normal situations, the LS Age field should be less than 1800.

  • In the case of a router LSA, the Link-State ID field and advertising router should have the same value as they do in Example 8-1.

  • This router is an ABR and has three router links.

With every point-to-point link, there is a stub link to provide the subnet mask of the link. In this example, two point-to-point links and one stub link are associated with these two point-to-point links because the network type is point-to-multipoint. So, if there are 300 point-to-point links, the router will generate 300 point-to-point links as well as 300 stub links to address the subnet associated with each point-to-point link. The point-to-multipoint network type is a better choice in this case, for two reasons:

  • Only one subnet is required per point-to-multipoint network.

  • The size of the router LSA is cut in half because there will be only one stub link to address the subnet on a point-to-multipoint network. This link is usually a host address.

If you drew a network topology out of this information, you would actually see a small part of OSPF network, as shown in Figure 8-9.

Figure 8-9. Network Topology Drawn from the Information Contained in the Router LSA

graphics/08fig09.gif

Network LSA

The DR generates the network LSA. If no DR exist (for example, in point-to-point or point-to-multipoint networks), there will be no network LSA. The network LSA describes all the routers attached to the network. This LSA is flooded in the area that contains the network, just like the router LSA. Figure 8-10 shows the packet format for the network LSA.

Figure 8-10. Network LSA Packet Format

graphics/08fig10.gif

The network LSA has two important components :

  • Network Mask ‚ This field indicates the network mask associated with the transit link.

  • Attached Router ‚ This field includes the router ID of each router associated with this transit link. The designated router also lists itself in attached routers.

Network LSA Example

Example 8-2 shows the output of a network LSA from a Cisco router.

Example 8-2 Network LSA Output
 RouterA#  show ip ospf database network 141.108.1.1  Routing Bit Set on this LSA   LS age: 1169   Options: (No TOS-capability, DC)   LS Type: Network Links  Link State ID: 141.108.1.1 (address of Designated Router)   Advertising Router: 141.108.3.1  LS Seq Number: 80000002   Checksum: 0xC76E   Length: 36  Network Mask: /29  Attached Router: 141.108.3.1         Attached Router: 141.108.1.21         Attached Router: 141.108.1.3 

The last three lines of output in Example 8-2 show that three routers are attached to this transit link. Also, the network mask on this transit link is /29. There are two important things to remember here:

  • The Link-State ID field always contains the IP address of the DR.

  • The advertising router field always contains the router ID of the DR.

You can similarly draw a network topology from the information contained in the network LSA showing the number of attached routers and the network mask on the link.

Figure 8-11 shows the network topology drawn from the information in the network LSA.

Figure 8-11. Network Topology Drawn from the Information Contained in the Router LSA

graphics/08fig11.gif

Summary LSA

The summary LSA describes the destination outside the area, but still within the AS. Summary LSAs are generated when there is more than one area provided and Area 0 is configured. The purpose of the summary LSA is to send the reduced topological information outside the area. Without an area hierarchy, it will be difficult to scale the huge topological information in a single area. This LSA does not carry any topological information; it carries only an IP prefix. This LSA is originated by the ABR, as follows:

  • From a nonbackbone to a backbone area, summary LSAs are generated for:

    - Connected routes

    - Intra-area routes

NOTE

Only intra-area routes are advertised into the backbone to avoid loops . If there are any inter-area routes coming from nonbackbone area it means that the backbone is discontiguous. A discontiguous backbone is not allowed in OSPF networks.


  • From a backbone to a nonbackbone area, summary LSAs are generated for the following:

    - Connected routes

    - Intra-area routes

    - Interarea routes

Two types of summary LSAs exist:

  • Type 3 ‚ Used for the information about the network

  • Type 4 ‚ Used for the information about the ASBR

Figure 8-12 shows the packet format for the summary LSA.

Figure 8-12. Summary LSA Packet Format

graphics/08fig12.gif

The list that follows describes the fields within the summary LSA packet:

  • Network Mask ‚ For the Type 3 summary LSA, this field contains the network mask associated with the network. For the Type 4 summary LSA, this field must be 0.

  • Metric ‚ This field represents the cost of the network.

  • ToS and ToS Metric ‚ These fields are normally set to 0.

Both the Type 3 and Type 4 summary LSAs use the same packet format. The important things to remember about summary LSA Types 3 and 4 are as follows:

  • The network mask in Type 3 contains the subnet mask value of the network.

  • The network mask field must be 0.0.0.0 in Type 4 LSAs.

  • In Type 3 LSAs, the Link-State ID field should have the network number.

  • In Type 4 LSAs, the Link-State ID field should have the router ID of the ASBR.

  • The advertising router field must contain the router ID of the ABR generating the summary LSA. This is true for both Type 3 and 4 LSAs.

There is one special case of summary LSAs ‚ in cases when a stub-area ABR generates a summary default route. In this case, the Link-State ID field as well as the network mask must be 0.0.0.0.

Summary LSA Example

Example 8-3 shows the output of a summary LSA from a Cisco router.

Example 8-3 Summary Network LSA Output
 RouterB#  show ip ospf database summary 9.9.9.0  LS age: 1261   Options: (No TOS-capability, DC)   LS Type: Summary Links(Network)  Link State ID: 9.9.9.0 (summary Network Number)  Advertising Router: 141.108.1.21   LS Seq Number: 80000001   Checksum: 0xC542   Length: 28  Network Mask: /24  TOS: 0  Metric: 10 

The Link-State ID field here is the network 9.9.9.0, and the network mask is /24. The Link-State ID field in summary LSAs Type 3 will always contain the network number that the summary LSA is generated for, along with the network mask. The summary LSA here is generated for 9.9.9.0/24, as shown in Figure 8-13.

Figure 8-13. Network Diagram Where ABR Router Generates the Summary LSA

graphics/08fig13.gif

Example 8-4 shows summary ASBR LSA output.

Example 8-4 Summary ASBR LSA Output
 RouterB#  show ip ospf database asbr-summary 141.108.1.21  LS age: 1183   Options: (No TOS-capability, No DC)   LS Type: Summary Links(AS Boundary Router)  Link State ID: 141.108.1.21 (AS Boundary Router address)  Advertising Router: 141.108.1.1   LS Seq Number: 80000001   Checksum: 0x57E4   Length: 28  Network Mask: /0  TOS: 0  Metric: 14 

The output from Example 8-4 shows that this is summary LSA Type 4. The network mask is 0, and the Link-State ID is the router ID of the ASBR. In case of Type 4, the Link-State ID is always the router ID of the ASBR. The Network Mask field must always be 0 because this is the information about a router (ASBR), not a network. Figure 8-14 shows the net-work diagram based on the output shown in Example 8-4.

Figure 8-14. Network Diagram Where ABRs Generates the Type 4 Summary LSA

graphics/08fig14.gif

Example 8-5 shows the default summary ASBR LSA output.

Example 8-5 Default Summary LSA Output
 RouterB#  show ip ospf database summary 0.0.0.0  LS age: 6   Options: (No TOS-capability, DC)   LS Type: Summary Links(Network)   Link State ID: 0.0.0.0 (summary Network Number)   Advertising Router: 141.108.1.21   LS Seq Number: 80000001   Checksum: 0xCE5F   Length: 28   Network Mask: /0         TOS: 0  Metric: 1 

The output in Example 8-5 shows that the Link-State ID and network mask are 0.0.0.0. Because this is the information about a default route, it must have 0.0.0.0 in the Link-State ID, and the network mask must be 0.0.0.0. These two pieces of information then represent the default route as 0.0.0.0/0. This summary default will be present in a stubby area situation, as shown in Figure 8-15.

Figure 8-15. Network Diagram Where ABR Generates a Summary Default LSA

graphics/08fig15.gif

External LSA

The external LSA defines routes to destinations external to the autonomous system. Domain-wide, the default route can also be injected as an external route. External LSAs are flooded throughout the OSPF domain, except to stubby areas. To install an external LSA in the routing table, two essential things must take place:

  • The calculating router must see the ASBR through the intra-area or interarea route. This means that it should have either a router LSA for the ASBR or a Type 4 LSA for the ASBR, in case of multiple areas.

  • The forwarding address must be known through an intra- or interarea route.

Figure 8-16 shows the packet format for the external LSA.

Figure 8-16. External LSA Packet Format

graphics/08fig16.gif

The list that follows describes the fields within the external LSA packet:

  • Network Mask ‚ Specifies the network mask of the external network.

  • Bit E ‚ Specifies the external type. If set, it is an external Type 2; otherwise, it is Type 1. The difference between type and type external is that the Type 1 metric is similar to the OSPF metric and the cost gets changed every hop; in Type 2, however, the external metric doesn't change. The metric remains the same throughout the OSPF domain.

  • Forwarding Address ‚ Indicates the address to which data traffic to the advertised network should be forwarded. If the value is set to 0.0.0.0, this means that the traffic should be forwarded to the ASBR. In some situations, the forwarding address will be nonzero, to avoid suboptimal routing. The following list describes events that will produce a nonzero forwarding address:

    - OSPF is enabled on the ASBR's next -hop interface.

    - The ASBR's next-hop interface is nonpassive to OSPF.

    - The ASBR's next-hop interface network type is not point-to-point or point-to-multipoint.

    - The ASBR's next-hop interface address falls into the OSPF network range.

  • External Route Tag ‚ Not used by OSPF.

The ToS and ToS Metric fields normally are not used by any vendor.

External LSA Example

Example 8-6 shows the output of the external LSA from the Cisco router.

Example 8-6 External LSA Output
 RouterE#  show ip ospf database external 10.10.10.0  LS age: 954   Options: (No TOS-capability, DC)   LS Type: AS External Link  Link State ID: 10.10.10.0 (External Network Number)  Advertising Router: 141.108.1.21   LS Seq Number: 80000003   Checksum: 0x97D8   Length: 36   Network Mask: /24  Metric Type: 2 (Larger than any link state path)  TOS: 0         Metric: 20  Forward Address: 0.0.0.0  External Route Tag: 0 

The output in Example 8-6 shows an external LSA for network 10.10.10.0/24. This is a Type 2 external LSA. There are a few important things to remember here:

  • The Link-State ID field represents the external network number.

  • The advertising router field contains the router ID of the ASBR.

  • Metric Type: 2 means that the metric ‚ 20, in this case ‚ remains the same throughout the OSPF domain.

  • A forwarding address of 0.0.0.0 means that the traffic should be forwarded directly to the ASBR.

  • The route to the nonzero forwarding address must be known through an intra-area or interarea route; otherwise, the external route will not get installed in the routing table.

Figure 8-17 shows a network in which a Type 5 LSA is originated by Router E (ASBR). RIP is getting redistributed into Router E, so Router E originates a Type 5 LSA for every RIP subnet. Those Type 5 LSAs are propagated throughout the OSPF domain.

Figure 8-17. Network Diagram Where ASBR Originates Type 5 LSAs for a RIP Learned Route

graphics/08fig17.gif

‚  < ‚  Free Open Study ‚  > ‚  


Troubleshooting IP Routing Protocols
Troubleshooting IP Routing Protocols (CCIE Professional Development Series)
ISBN: 1587050196
EAN: 2147483647
Year: 2002
Pages: 260

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net