OSPF is a link state routing protocol that consists of all intra-area routers having the full topology for that area. In other words, every router in any given area will be aware of every other router in its area. The router is used by routers as an alternate to maintaining the routing tables manually.

Routers share information with each other via link state advertisements (LSA).  We refer to the collective information contained within an LSA the link state update (LSU). There are several types of LSAs that we need to be aware of in order to understand how OSPF works, as follows:

  • Type 1 LSA (Router) – represents a single router. Every router in the area shares a type-1 LSA that represents itself. Specifically, every router shares its router ID (RID), information about its neighborships, and information about the network that the routers advertise for — technically known as stub networks.
  • Type 2 LSA (Network) – represents all routers connected to a multi-access link. What do I mean by “multi-access link?” A multi-access link simply refers to an Ethernet segment — or a LAN — on which multiple OSPF routers are communicating. It’s just a single broadcast domain where all OSPF routers can communicate with each other via multicast.  The biggest confusion I had with Type-2 LSAs when I first got started was understanding why Type-2 LSAs were necessary if all routers generate their own Type-1 LSA. To quickly clarify that confusion, it helps to understand that we treat OSPF routers differently based on how they are connected in the network. For instance, OSPF neighbors connected on P2P links are treated differently than OSPF routers connected to multi-access links. The people who invented OSPF came up with the concept of designated routers (DR) and backup designated routers (BDR) to help control the flow of OSPF information on shared Ethernet segments. On broadcast networks where multiple OSPF routers exist, all routers will send their Type 1 LSAs to the DR router. The DR router is responsible for advertising all of the OSPF routers connected in that broadcast domain.  It does so through type-2 LSAs. If you can visualize the type-1 LSAs as generic nodes – one for each router – think of type-2 LSAs as pseudonodes that bind those type-1 LSAs together, but only for the type-1 LSAs that are connected to each other on a shared medium. It can be a weird concept to wrap your head around, so try to focus on the fundamental difference between type-1 and type-2 LSAs; type-1 represents specific routers, and type-2 represents two or more routers connected on the same LAN.  Oh, and remember that BDRs are just hot-standby DRs that will resume the role of DR in the event that the primary DR becomes unavailable.