OSPF LSA Types Explained.
OSPF uses an LSDB (link state database) and fills this with LSAs (link state advertisement). Instead of using 1 LSA packet, OSPF has many different types of LSAs, and in this lesson, I will show you all of them. Let’s start with an overview:
For many people, it helps to visualize things in order to understand and remember. I like to visualize OSPF LSAs as jigsaw puzzle pieces. One jigsaw is nothing, but all of them together give us the total picture…for OSPF this is the LSDB.
?
Here’s the first LSA Type:
Each router within the area will flood a type 1 router LSA within the area. In this LSA, you will find a list with all the directly connected links of this router. How do we identify a link?
The second LSA type (network LSA) is created for multi-access networks:
The network LSA or type 2 is created for each multi-access network. Remember the OSPF network types? The broadcast and non-broadcast network types require a DR/BDR. If this is the case, you will see these network LSAs being generated by the DR. In this LSA, we will find all the routers that are connected to the multi-access network, the DR, and of course, the prefix and subnet mask.
In my example above, we will find R1, R2, and the DR in the network LSA. We will also see the prefix 192.168.123.0 /24 in this LSA. Last thing to mention: the network LSA always stays within the area.
Let’s look at the third LSA type:
领英推荐
Type 1 router LSAs always stay within the area. OSPF, however works with multiple areas, and you probably want full connectivity within all of the areas. R1 is flooding a router LSA within the area, so R2 will store this in its LSDB. R3 and R4 also need to know about the networks in Area 2.
R2 is going to create a Type 3 summary LSA and flood it into area 0. This LSA will flood into all the other areas of our OSPF network. This way, all the routers in other areas will know about the prefixes from other areas.
The name “summary” LSA is very misleading. By default, OSPF is not going to summarize anything for you. There is, however, a command that lets you summarize inter-area routes. Take a look at my OSPF Summarization lesson if you are interested. If you are looking at the routing table of an OSPF router and see some O IA entries, you are looking at LSA type 3 summary LSAs. Those are your inter-area prefixes!
Time for the fourth LSA type:
In this example, we have R1 that is redistributing information from the RIP router into OSPF. This makes R1 an ASBR (Autonomous System Border Router). What happens is that R1 will flip a bit in the router LSA to identify itself as an ASBR. When R2, who is an ABR, receives this router LSA, it will create a type 4 summary ASBR LSA and flood it into area 0. This LSA will also be flooded in all other areas and is required so all OSPF routers know where to find the ASBR.
What about LSA type 5? Let’s check it out:
Same topology, but I’ve added a prefix (5.5.5.0 /24) at our RIP router. This prefix will be redistributed into OSPF. R1 (our ASBR) will take care of this and create a type 5 external LSA for this. Don’t forget we still need type 4 summary ASBR LSA to locate R1. If you ever tried redistribution with OSPF, you might have seen O E1 or E2 entries. Those are the external prefixes and our type 5 LSAs.
What about OSPF LSA type 6? Type 6 multicast ospf LSA I can skip because it’s not being used. It’s not even supported by Cisco. We use PIM (Protocol Independent Multicast) for multicast configurations.
If you are studying the LSA types for CCNA R&S, then you don’t have to worry about LSA type 7. These are used for a special area type called NSSA.
Let’s look at the last LSA type, number 7:
Last LSA type…promised! NSSA areas do not allow type 5 external LSAs. In my picture, R1 is still our ASBR redistributing information from RIP into OSPF.
Since type 5 is not allowed we have to think of something else. That’s why we have a type 7 external LSA that carries the exact same information but is not blocked within the NSSA area. R2 will translate this type 7 into a type 5 and flood it into the other areas.
Let me summarize the LSA types for you: