5.4. Essential LSAsThis 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:
5.4.1. Router LSAsEvery 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.
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.
5.4.2. Network LSAsThe 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.
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.
5.4.3. Network Summary LSAsNetwork 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.
Figure 5.20 shows a Network Summary LSA from an OSPF database for a destination prefix 192.168.5.0/24.
5.4.4. ASBR Summary LSAsThe 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.
Figure 5.22 shows an ASBR Summary LSA advertising a path to an ASBR 192.168.254.7.
5.4.5. AS-External LSAsAn 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.
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.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).
|