OSPF is a commonly used IGP used in a wide range of enterprise environments. It uses its algorithm to determine the shortest path to the destination network address. This algorithm is based on the overall cost of a path to the destination. When determining what networks are advertised though and more importantly how they are advertised, the router uses different OSPF LSA types (link state advertisements). The type of address being advertised will fall into one of these LSA types based on its role \ place in the network.
In the CCIE Blueprint, this covers the section “2.6.a (i) LSA types (1, 2, 3, 4, 5, 7, 9).”
LSA Type 1
Type 1 is commonly referred to as a Router LSA. This type of LSA describes all of the directly connected prefixes and devices to a router. This includes things like virtual-links as well. The final thing to remember on this type is that it always stays within the area that the router belongs to.
LSA Type 2
Type 2 is the network LSA. This is advertised by the DR in an OSPF network and describes all of the neighbors in the area. This includes the common IP prefix that they work on as well. Also, like the type 1 LSA, these advertisements stay within the area.
LSA Type 3
Type 3 advertisements are generated by the ABR (area border router) and are shared into an area to describe neighbors OUTSIDE of that area. This will cover your inter-area routes. This is noted by the “O IA” next to these routes in the routing table. One last thing to note here is while they are called Summary LSAs, there is no actual summarization taking place.
LSA Type 4
Type4 LSAs are similar to type 3 LSAs but instead of being generated by the ABR, they are generated by the ASBR (autonomous system border router). The key difference from a type 3 LSA though is that the link-state id is the router-id of the ASBR in the case of the type 4 LSA.
LSA Type 5
Type 5 describe routes that are redistributed into the area. These are considered external routes and are designated in the routing table with “O E1” or “O E2”. The difference in these is how the cost is calculated for a route. For O E2 routes, which are the default type, only the cost that is reported during redistribution is used. O E1 is different because the cost of the total path is used. This includes the cost reported during redistribution in addition to the cost to get to the actual ASBR.
LSA Type 6
These are multicast LSAs are are not supported in a Cisco environment.
LSA Type 7
Type 7 LSAs are only found within a not so stubby area. They are generated by the ASBR within the NSSA to describe external routes that are redistributed into the area. The type 7 LSA stays within the NSSA as well. When it leaves the NSSA, it is translated to a type 5 LSA by the ABR. These routes show up in the routing table with the N1 and N2 designation. Much like type 5, the cost is determined the same between the 1 and 2 designations as a type 5 LSA.
LSA Type 9
This is commonly referred to as a link-state opaque LSA. It is used for intra-area routed within OSPFv3. As link-local advertisements, they are not flooded beyond a single link to another device.