Welcome back to part three of my series on OSPF. Here we dig deeper into OSPF and find out what makes this fantastic protocol tick. Today we are going to talk about Link State Advertisements (LSA) and their role in a OSPF network.
Don’t worry if not all of these make sense at the start as I get around to explaining them all throughout the series.
Link-state advertisements are crucial to OSPF and building the topology. It is how routers know about each other’s links and who connects to who across an area. OSPF uses area’s to define sets of routers. They can be as small or as large as you want within reason. All areas MUST connect back to Area 0 – virtual links are an exception – so it is paramount that Area 0 is stable.
LSA’s and their types are the fundamentals of OSPF. It is what builds the topology and makes it stable, what allows routers to be sent and for an area and inter area’s to know where a router has come from, what interface and it’s cost to get there.
Type 1 LSA – ROUTER
Router LSA identifies a OSPF router by RID. Each router creates a Type 1 LSA for itself and floods the LSA throughout the same area. The routers flood Type 1 LSAs to all neighbours and in turn they do the same until all neighbours in an area have a copy of the LSA.
Type 1 LSAs also list the following information
- When there is no DR elected, it lists routers interface subnet number and mask and the interface OSPF cost. (stub networks)
- When a DR has been elected it lists the IP address of the DR and notes it links to a transit network ( type 2 LSA exists for that network)
- No DR but neighbour is reachable it lists the neighbours RID.
Type 1 LSA use a 32-bit link state identifier (LSID). Uses our OSPF RID as value. Even if router is in multiple areas, RID is the same.
Type 2 LSA – Network
Used to help model the network topology. Represents the nodes and the links between the pairs of nodes. Choose to use Network LSA based on if DR is being used.
OSPF uses a DR in a subnet for two reasons
- – To create and flood Type 2 network LSA for that subnet
- – To aid in the detailed process of database exchange over that subnet
DR election takes place based on information in OSPF Hello messages. Hello lists RID and priority. The election rules are as follows
- Choose the router with highest priority.
- If tied, highest RID
- Choose BDR with next highest.
When DR and BDR exist no elections are made until one fails. If a DR fails the BDR is elected DR (even if better possible DR joins the network) and a new BDR is elected. If a BDR fails, DR remains as is and a new BDR is elected.
Type 3 LSA – Net Summary
ABR do NOT forward Type 1 or Type 2 LSAs. Type 3 allows areas to learn about other areas. ABRs generate Type 3 LSAs for each subnet in one area and advertises each Type 3 LSA into other areas.
Type 3 LSAs do not contain detailed topology information. It appears to be another subnet connected to the ABR that created and advertised the Type 3 LSA. Routers inside the given area calculate their best router to reach the ABR. This gives the router a good loop-free route to reach the subnet in the Type 3 LSA
Remember that the Type 3 summary is not used for route summarization
Type 4 LSA – ASBR Summary
Like a Type 3 LSA, except it advertises a host route used to reach an ASBR
Type 5 LSA – AS External
Created by ASBRs for external routes injected into OSPF
Type 6 LSA – Group Membership
For MOSPF – not supported by IOS
Type 7 LSA – NSSA External
Created by ASBR’s inside an NSSA area instead of a type 5 LSA
Type 8 LSA – External Attributes
Not used by IOS
Type 9-11 LSA – Opaque
Used for later use. Type 10 used in MPLS
EXCHANGING THE LSAs
When two neighbours share a view of the list of LSIDs they transition to loading and start exchanging. This time, full LSAs.
- 1. Transition to loading
- 2. Any missing LSAs, send LSR, listing LSID of requested LSA
- 3. Respond to LSR with a LSU. Lists one or more LSAs in each.
- 4. ACK receipt by either sending LSACK or sending same LSA in a LSU
- 5. When all LSA sent, received and acknowledged, neighbour-ship moves to the FULL state.
Because there is no DR, multicasts move to 184.108.40.206.
Alright. That is enough about LSA’s. If you aren’t quite gelling just yet then don’t stress. Next up we have some practical demonstrations outlining the theory we have gone though thus far. I may dabble with a screen cast. We shall find out. Until next time, take care and study hard!