OSPF is a network layer protocol that uses protocol number 89.
For better understanding, I will explain briefly about the parameters used in OSPF in divisions
OSPF uses its own communication packets to its neighbors for various transitions.
- Hello packet
- Database Description packet (DBD)
- Link State Request (LSR)
- Link State Update (LSU)
- Link State Acknowledgement
Hello packet - This packet is sent when the OSPF is configured on the router on the interfaces to form neighbors with its peers. The newly learn neighbor is stored in the neighbor database table and the peer will also update accordingly its neighbor table. And further these Hello packets are sent in regular intervals to let know the neighbor that the router is still present. If the router doesnt receive Hello packet for a particular time period (Hold-down time) from its neighbor, then that neighbor is removed from the neighbor table and sends LSA to all other neighbors.
Database Description packet (DBD) – Once the neighbor adjacency is formed, each router will send its complete topology table information as DBD to its neighbor.
Link State Request (LSR) – Once the DBD is received from the neighbor router, this router will verify the entries present in the DBD to its topology table. If any networks that are not found in the topology table, this routers sends LSR to that neighbor for that particular network. For each unknown network, individual LSRs will be sent. These requests are placed in LSR table, so that if the LSU is not received for the particular LSR, then this LSR is again retransmitted.
Link State Update (LSU) – LSU is the Link State Advertisements (LSA) that are sent to the OSPF domain. Single LSU packet may carry many number of Link State Advertisements in it. The neighbor router receiving LSR packet for the particular network will be replied with the LSU for that network.
Link State Acknowledgement – Link State Acknowledgment is sent to LSU, LSR and DBD packets. A single LSA packet can be combined to send the acknowledgement for multiple various other packets based on its configuration whether it is implicit or explicit.
LSAs are differentiated into 11 types.
Link State Advertisements abbreviated as LSA is used to send the topology information of the local area to the neighbor routers in the same area. When the LSA is sent to other area (i.e ABR) the topology information is summarized.
Types of LSA
There are 11 LSAs in OSPF, but practically we may come across 6 LSAs
Type-1 Router LSA – This LSA is sent across single area by each router to let know its presence to other routers in that area.
Type-2 Network LSA – This LSA is sent by DR to other routers in that broadcast domain.
Type-3 Summary LSA (Sent by ABR) – This LSA is sent by ABR, the networks of one area is summarized/ not summarized and advertised to other area by this LSA.
Type-4 ASBR Summary LSA (Sent by ASBR) – This LSA is sent by ASBR to let know its presence in an area.
Type-5 External LSA – Other routing protocols injected into OSPF domain are sent to other area by this LSA.
Type-7 External LSA for Not So Stubby Area – This LSA is sent by ASBR in Not So Stubby Area to advertise external routing protocols in this area as Type -5 LSA does not flow in Stub area.
LSAs which we dont use in day-to-day scenarios so just listing it below
Type-6 Group Membership LSA
Type-8 Link-local only LSA used for OSPFv3
Type-9 Link-local opaque LSA
Type-10 Area-local opaque LSA
Type-11 Autonomous system opaque LSA
All the above LSAs uses a 20-byte LSA header for their operation in OSPF networks.
Types of Networks/links configured on the OSPF interface
Based on the network configured on the OSPF interface, forwarding of broadcast/ multicast, election of DR/BDR, timers like Hello/Dead interval, auto-discovery of neighbors etc
Broadcast (Cisco) - This is similar to a LAN network. DR/BDR is elected on this network.
Point-to-point (Cisco) – It has only one neighbor connected on its interface. No DR/BDR is elected on this network.
Point-to-multipoint (non-broadcast) (Cisco) -This type of network comes under non-broadcast capability. No Broadcast and multicast packets are forwarded in this network, so neighbors should be configured manually for this network. Each link is a separate subnet. ‘non-broadcast’ command should be added while configuring the point-to-multipoint network.
Non-Broadcast – In this network, no DR/BDR election does not happen since no broadcast and multicast packets doesnt flow. We need to manually configure the DR router and neighbors for the each router. This is the default network for FR/ATM networks
Point-to-multipoint - This is similar to the cisco proprietary Point-to-multipoint (non-broadcast) but here broadcasts and multicasts are allowed, so the neighbors are automatically learnt. Each link is a separate subnet
Types of routers
Internal Routers – The router with all its OSPF configured interfaces are part of a single area. It can be of any single area (i.e need not to be only area 0)
Backbone area Routers - The router with all its OSPF configured interfaces are part of single area and its of area 0
Area Border Router (ABR) - The router with any of the OSPF configured interface is part of Backbone area (area 0) and another interface connected to other area.
Autonomous system Boundary Router (ASBR) - The router with atleast one OSPF configured interface is connected to OSPF area. This router is responsible for redistributing other protocol routes to OSPF domain.