As you probably know there are five types of OSFP packets:
All these packets, except Hellos, are sent only between adjacent routers.
There are 5 common LSA types:
- Router-LSA and Network-LSA calculate intra-area routes describing detailed link state information.
- Network-Summary-LSA calculates inter-area routes describing brief routing information instead of link state information
- ASBR-Summary-LSA describes how to reach ASBR
- AS-External-LSA describes how to reach destinations outside AS.
What we have to remember is that LS Type, Link State ID and Advertising Router together uniquely identify LSA, what will be shown later in this post.
Below you can see LSA header in Router-LSA (as an example):
Key fields of OSPF Router-LSA:
Key fields of OSPF Network-LSA:
Notice that different OSPF packets contain different parts of LSA information:
- DD – LSA header information
- LSR – LS type, LS ID and advertising router
- LSU – Complete LSA information
- LSAck – LSA header information.
Having information described in this post you will be able to calculate OSPF intra-area routes. Each router calculates the SPT using itself as the root. In the first stage only links between routers and transit networks are considered. Then, in the second stage, stub networks are added to the tree as leaves.