Section 5.4. Essential LSAs


5.4. Essential LSAs

This section and Section 5.5, covering TLVs, examine the nuts and bolts of the essential data entities used by OSPF and IS-IS. This kind of information is admittedly dry as toast, so whether you read these two sections in depth or just skim them depends on your tolerance for such details. However, at least a passing familiarity with the LSAs and TLVs is necessary if you want to understand OSPF and IS-IS.

By "essential LSAs," I mean the five LSAs necessary for basic OSPF operation. If you are running traffic engineering, a not-so-stubby area, or a number of other extended features, other LSAs are essential to your network as well. They are introduced in the succeeding chapters covering the extensions they support.

The five essential LSAs are:

  • Router LSAs

  • Network LSAs

  • Network Summary LSAs

  • ASBR Summary LSAs

  • AS-External LSAs

5.4.1. Router LSAs

Every router originates a Router LSA (Figure 5.14). The purpose of the LSA is to advertise the originating router, the router's attached links, the cost of those links, and its adjacent neighbors. The Router LSA has an area flooding scope: It is flooded throughout the area in which it is originated, but never to other areas.

Figure 5.14. The Router LSA.


  • The Router LSA type is 1, and the Link State ID is the originating router's RID.

  • V (Virtual Link), when set, indicates that the originating router is a virtual link end-point. Virtual links are covered in Chapter 7.

  • E (External), when set, indicates that the router is an ASBR.

  • B (Border), when set, indicates that the router is an ABR.

  • Number of Links specifies how many router links are listed in this LSA. The remaining fields in the LSA repeat the number of times specified here.

  • Type indicates the type of link described by the fields to follow. Table 5.4 lists the possible values of this field and the link types the values represent.

    Table 5.4. Link Type Values and Their Meanings

    Type

    Description

    1

    Point-to-point connection to another router

    2

    Connection to a transit network

    3

    Connection to a stub network

    4

    Virtual link


  • Link ID varies according to the link type. Table 5.5 shows what the Link ID field contains for various link types. If the link connects to another router (type 1, 2, or 4), the value shown is also the value of the neighbor's LSA Link State ID. This is how the two routers' LSAs are related during the SPF calculation.

    Table 5.5. Information in the Link ID Field for the Four Link Types

    Type

    Link ID

    1

    Neighboring router's RID

    2

    IP address of DR

    3

    Network IP address

    4

    Neighboring router's RID


  • Link Data also varies according to the link type. This information is used to derive the next-hop address for routes passing over the link. Table 5.6 shows the contents of the Link Data field for each link type.

    Table 5.6. Information in the Link Data Field for the Four Link Types

    Type

    Link Data

    1

    For numbered point-to-point links: the IP address of the originating router's interface to the link

    For unnumbered links: the MIB-II ifIndex value of the router's interface to the link

    2

    IP address of the originating router's interface to the link

    3

    Stub network's IP address mask (Note that host routes are type 3 links, and this field contains a mask of 255.255.255.255.)

    4

    The MIB-II ifIndex value of the originating router's interface to the virtual link


  • Number of ToS Metrics is included for backward compatibility with earlier OSPFv2 specifications (RFC 1583 and before). If this field is non-zero, a matching number of 32-bit fields containing various ToS metrics and their type numbers follow the metric field for this link. However, modern OSPF implementations do not utilize these ToS metrics, and so this field is always 0. The format in Figure 5.14 reflects this absence of ToS metric fields.

Figure 5.15 shows a display of a Router LSA from an OSPF database. After the LSA header information, you can see that none of the three flags are set (bits 0x0) and that the number of links is 5. The Link ID, Link Data, Type, Number of ToS Metrics, and Metric field values for each link are then listed. TOS 0 refers to the metric in the context of the old ToS metrics; this metric is ToS metric type 0.

Figure 5.15. An OSPF database display of a Router LSA.

[View full width]

jeff@Juniper6> show ospf database router lsa-id 192.168.254.6 extensive OSPF link state database, area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len Router *192.168.254.6 192.168.254.6 0x800001c8 1458 0x2 0x10e 84 bits 0x0, link count 5 id 172.16.1.0, data 255.255.255.0, type Stub (3) TOS count 0, TOS 0 metric 10 id 192.168.3.1, data 192.168.3.1, type Transit (2) TOS count 0, TOS 0 metric 1 id 192.168.4.2, data 192.168.4.1, type Transit (2) TOS count 0, TOS 0 metric 1 id 192.168.5.0, data 255.255.255.0, type Stub (3) TOS count 0, TOS 0 metric 1 id 192.168.254.6, data 255.255.255.255, type Stub (3) TOS count 0, TOS 0 metric 0 Gen timer 00:25:42 Aging timer 00:35:42 Installed 00:24:18 ago, expires in 00:35:42, sent 00:24:18 ago Ours


5.4.2. Network LSAs

The Network LSA (Figure 5.16) is generated by the DR to represent a pseudonode. Like the Router LSA, it has an area flooding scope. The LSA type is 2, and the Link State ID is the IP address of the DR's interface attaching to the pseudonode (broadcast or NBMA network). Notice that there is no Metric field in the LSA. This is because, as you learned earlier, the cost from the pseudonode to all attached routers is 0.

Figure 5.16. The Network LSA.


  • Network Mask is the IP address mask for the network.

  • Attached Router is the RID of one of the routers attached to the pseudonode network. This field repeats to include all attached routers that are fully adjacent to the DR, and the DR itself. The number of Attached Router fields in the LSA can be deduced from the value of the LSA's Length field.

Figure 5.17 shows a display of a Network LSA from an OSPF database. You can see from this display that the network has a 24-bit mask (255.255.255.0) and that there are two attached routers. Of these two, you can tell that the DR is 192.168.254.7, because that is the advertising router.

Figure 5.17. An OSPF database display of a Network LSA.

[View full width]

jeff@Juniper6> show ospf database network lsa-id 192.168.4.2 extensive OSPF link state database, area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len Network 192.168.4.2 192.168.254.7 0x80000251 926 0x2 0xf852 32 mask 255.255.255.0 attached router 192.168.254.7 attached router 192.168.254.6 Aging timer 00:44:34 Installed 00:15:25 ago, expires in 00:44:34, sent 00:15:25 ago


5.4.3. Network Summary LSAs

Network Summary LSAs are originated by ABRs and are flooded into an area to advertise prefixes that are in other areas. This LSA is the key to understanding why OSPF is "distancevector-like" in its inter-area behavior. When an ABR learns a route to a prefix in another areaeither because the prefix is in an attached area or because another ABR has advertised the prefix in its own Network Summary LSAthe ABR uses the Network Summary LSA to tell routers in an area, "I am a next hop to this prefix, at a cost of X." The routers within the area know from their shortest-path trees how to reach the ABR, but the trees to not reach outside of the area to the actual prefix. This is distance vector behavior.

Figure 5.18 illustrates the use of Network Summary LSAs. ABR1 knows, as a member of area 0.0.0.1, that prefix 172.16.6/24 exists in that area. It therefore originates a Network Summary LSA into its other attached area, area 0.0.0.0, to advertise that it can reach the prefix. Likewise, ABR2 knows that prefix 172.16.113/24 resides in area 0.0.0.2 and advertises the prefix into area 0.0.0.0. Both ABRs are attached to area 0.0.0.0, and so know about 172.16.25/24 in that area. They also receive each other's Network Summary LSAs, so ABR1 knows it can reach 172.16.113/24 via ABR2, and ABR2 knows it can reach 172.16.6/24 via ABR1. ABR1 originates Network Summary LSAs into area 0.0.0.1 and ABR2 originates Network Summary LSAs into area 0.0.0.2, each advertising the prefixes outside those areas.

Figure 5.18. ABRs originate Network Summary LSAs to advertise destinations outside of the area in which the LSA is flooded.


Figure 5.19 shows the structure of the Network Summary LSA. Its type is 3, and it has area flooding scope. The inter-area prefix being advertised is carried in the Link State ID field. Because there is only one Link State ID field in an LSA, an ABR must originate a separate Network Summary LSA for each prefix it wants to advertise into an area. The ABR can also originate a Network Summary LSA to advertise a default route (0.0.0.0/0) into an area.

Figure 5.19. The Network Summary LSA.


  • Network Mask is the IP address mask of the prefix.

  • Metric is the cost from the ABR to the destination. Notice that unlike the 16-bit intra-area metric, this one is 24 bits to accommodate presumably longer paths to the destination.

  • ToS and ToS Metric are, as with the Router LSA, for backward compatibility with earlier OSPFv2 incarnations. ToS is not used in modern OSPFv2, and so the ToS type is always 0, and the ToS Metric is all 0s.

Figure 5.20 shows a Network Summary LSA from an OSPF database for a destination prefix 192.168.5.0/24.

Figure 5.20. An OSPF database display of a Network Summary LSA.

[View full width]

jeff@Juniper4> show ospf database netsummary lsa-id 192.168.5.0 extensive OSPF link state database, area 0.0.0.2 Type ID Adv Rtr Seq Age Opt Cksum Len Summary 192.168.5.0 192.168.254.5 0x800001dd 1389 0x2 0xb6ea 28 mask 255.255.255.0 TOS 0x0, metric 2 Aging timer 00:57:53 Installed 00:02:06 ago, expires in 00:36:51, sent 00:02:06 ago


5.4.4. ASBR Summary LSAs

The format of the ASBR Summary LSA (Figure 5.21) is identical to the Network Summary LSA, but it advertises an ASBR that is outside of the area rather than a prefix. When an ASBR floods an external prefix throughout an OSPF domain, the advertised prefix shows the ASBR as the next hop. This LSA is necessary for routers in different areas from the ASBR to learn how to reach the ASBR and hence the external destinations. Like the Network Summary LSA, the ASBR Summary LSA is originated by an ABR and flooded into an area, and has area flooding scope. The ABR learns about the advertised ASBR the same way it does inter-area prefixes: The ASBR is either in a connected area and thus learned from the ABR's shortest-path tree for the area, or it is learned from an ASBR Summary LSA originated by another ABR attached to another area.

Figure 5.21. The ASBR Summary LSA.


The LSA type of the ASBR Summary LSA is 4, and the Link State ID is the ASBR's RID. An ABR must originate a separate ASBR Summary LSA for each ASBR it wants to advertise into an area.

  • Network Mask has no meaning in ASBR Summary LSAs, and is set to all 0s.

  • Metric is the cost of the path from the ABR to the ASBR.

  • As with Network Summary LSAs, the ToS type and ToS Metric are for backward compatibility only and are set to 0.

Figure 5.22 shows an ASBR Summary LSA advertising a path to an ASBR 192.168.254.7.

Figure 5.22. An OSPF database display of an ASBR Summary LSA.

[View full width]

jeff@Juniper4> show ospf database asbrsummary lsa-id 192.168.254.7 extensive OSPF link state database, area 0.0.0.2 Type ID Adv Rtr Seq Age Opt Cksum Len ASBRSum 192.168.254.7 192.168.254.5 0x800001df 1234 0x2 0xa0fc 28 mask 0.0.0.0 TOS 0x0, metric 2 Aging timer 00:39:25 Installed 00:20:31 ago, expires in 00:39:26, sent 00:20:31 ago


5.4.5. AS-External LSAs

An ASBR originates a single AS-External LSA (Figure 5.23) for each external prefix it wants to advertise to the OSPF domain. Unlike the previous four LSAs examined, this LSA has autonomous system (domain) flooding scope. That is, it is flooded to all nonstub areas in the OSPF domain. (Stub areas, discussed Section 7.3.4, are defined by the fact that AS-External LSAs are not permitted into the area.) AS-External LSAs are also used to advertise a default route (0.0.0.0/0) out of the OSPF domain.

Figure 5.23. The AS-External LSA.


AS-External LSAs are type 5, and the Link State ID is the IP prefix of the external destination being advertised. An ASBR originates a separate AS-External LSA for every external prefix that it wants to advertise. In this lies a fundamental danger to OSPF. If a large number of prefixes is advertised into the domain, a corresponding large number of AS-External LSAs is flooded throughout the domain. The result can be undue stress on the OSPF routers trying to store and process all these LSAs. In some casessuch as the all-too-common mistake of redistributing all of the prefixes of the Internet routing table into OSPFthis stress can cause a domain-wide crash of routers. More is said about this vulnerability, and techniques for avoiding it, in Chapters 7 and 9.

  • Network Mask is the IP address mask of the advertised prefix.

  • E specifies whether the metric type of the advertised prefix is E1 (E = 0) or E2 (E = 1).

  • Metric is the cost to the prefix from the ASBR, and is assigned by the ASBR based on an arbitrary configuration or on the value (as specified by a configured routing policy) of the metric of the protocol from which the prefix was learned. Like the metric in the Network Summary LSAs, this metric is 24 bits.

  • Forwarding Address is the address that packets destined to the prefix should be forwarded to. Note that this field does not specify a next-hop address for the prefix, just an address that must be used to reach the prefix. When set to 0.0.0.0, packets to the prefix are forwarded to the originating ASBR. However, this field also gives the ASBR the capability of advertising a different forwarding address than itself. Notice that the format in Figure 5.23 shows two Forwarding Address fields. The format of this LSA has changed somewhat from earlier (RFC 1583) specifications of OSPF, and the second field exists only for backward compatibility.

  • External Route Tag allows information that has no relevance to OSPF to be carried across the OSPF domain. Typically, this information would be BGP route attributes but can be anything that an external routing protocol adds at one ASBR and extracts from another ASBR. The OSPF process itself ignores the contents of this field.

  • ToS Metric and the related E flag are, as with the other LSAs discussed, for backward compatibility and are normally set to 0.

Figure 5.24 shows an AS-External LSA for a prefix 192.168.200.0/24. You can see that the metric type is E2 (Type 2), and the cost from the ASBR is 250. The forwarding address is 0.0.0.0, indicating packets to this prefix should be forwarded to the originating ASBR, which happens to be the same ASBR advertised in the ASBR Summary LSA of Figure 5.22.

Figure 5.24. An OSPF database display of an AS-External LSA.

[View full width]

jeff@Juniper4> show ospf database extern lsa-id 192.168.200.0 extensive OSPF external link state database Type ID Adv Rtr Seq Age Opt Cksum Len Extern 192.168.200.0 192.168.254.7 0x8000160c 739 0x2 0xd43f 36 mask 255.255.255.0 Type 2, TOS 0x0, metric 250, fwd addr 0.0.0.0, tag 0.0.0.0 Aging timer 00:47:41 Installed 00:12:14 ago, expires in 00:47:41, sent 00:12:14 ago


Figure 5.25 shows another AS-External LSA, advertising a different prefix, but originated by the same ASBR. Notice that this prefix has a metric type of E1. Figure 5.26 shows the effect of the two metric types on the resulting routes. The route to the ASBR 192.168.254.7 is shown first, and you can see that the cost to the router is 3. The second display is the route to external prefix 192.168.200.0/24, which was advertised by the LSA in Figure 5.24. Because the metric type associated with that prefix is E2, the cost to the prefix is 250the same cost shown in Figure 5.24. The third displayed route is to external prefix 192.168.100.0/24, which as Figure 2.25 shows has an E1 metric. The cost of the route is 253, which is the cost of the prefix from the ASBR (250) plus the cost of the route to the ASBR (3).

Figure 5.25. An OSPF database display of an AS-External LSA. The prefix advertised by this LSA has an E1 metric type.

[View full width]

jeff@Juniper4> show ospf database extern lsa-id 192.168.100.0 extensive OSPF external link state database Type ID Adv Rtr Seq Age Opt Cksum Len Extern 192.168.100.0 192.168.254.7 0x8000160e 484 0x2 0x9f58 36 mask 255.255.255.0 Type 1, TOS 0x0, metric 250, fwd addr 0.0.0.0, tag 0.0.0.0 Aging timer 00:51:55 Installed 00:08:00 ago, expires in 00:51:56, sent 00:08:00 ago


Figure 5.26. The E2 and E1 metric types of the LSAs in the previous two figures cause different results in the routing table.

[View full width]

jeff@Juniper4> show route 192.168.254.7 inet.0: 19 destinations, 20 routes (18 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 192.168.254.7/32 *[OSPF/10] 02:34:38, metric 3 > to 192.168.2.2 via fxp1.0 jeff@Juniper4> show route 192.168.200.0 inet.0: 19 destinations, 20 routes (18 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 192.168.200.0/24 *[OSPF/150] 00:13:21, metric 250, tag 0 > to 192.168.2.2 via fxp1.0 jeff@Juniper4> show route 192.168.100.0 inet.0: 19 destinations, 20 routes (18 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.0/24 *[OSPF/150] 00:13:31, metric 253, tag 0 > to 192.168.2.2 via fxp1.0





OSPF and IS-IS(c) Choosing an IGP for Large-Scale Networks
OSPF and IS-IS: Choosing an IGP for Large-Scale Networks: Choosing an IGP for Large-Scale Networks
ISBN: 0321168798
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Jeff Doyle

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