OSPF Tutorial (Part-1)

Sowmiya K
3 min readJun 27, 2023

--

Synopsis:

Introduction
Types of Tables
Router ID
7 States
Area’s and Routers
LSA and Types

Introduction

  • OSPF stands for Open Shortest Path First
  • It is an Interior Gateway Protocol (IGP) designed to help routers exchange routing information within an autonomous system (AS)
  • It is a link-state routing protocol, it exchanges information about the state and availability of network links with other routers in the network.
  • Administrative distance is 110
  • cost calculation: 10⁸/bandwidth
  • classless routing protocol, it support VLSM, CIDR
  • Equal cost load balancing
  • Send hello packets in regular interval
  • Dead timer = 4*hello timer
  • uses the concept of Area

Types of Tables

  • Neighbor table: shows all neighbor routes-> show ip ospf neighbor
  • database table: shows all possible routes -> show ip ospf database
  • route table: shows best path-> show ip route

Router ID:

  • Its a name of the router
  • highest IP of logical interface or else highest IP of physical interface is router ID
  • It is also possible to manually configure the Router ID using a specific IP address-> show ip ospf | include Router ID

7 states of OSPF:

  • Down: Initial state when no OSPF Hello packets have been received from a neighbor.
  • Init: Once a router receives a Hello packet from a potential neighbor, it enters the Init state.
  • Two way: When the router receiving the Hello packet replies back to the sender, both routers transition to the 2-Way state and and the routers become neighbors.
  • ExStart: The router with the higher Router ID becomes the Master, and the other becomes the slave, so master has to send the info first.
  • Exchange: Exchange Database Description (DBD) packets. These packets contain summarized information about the link-state database.
  • Loading: The routers compare the information to identify any missing link-state advertisements (LSAs).
  • Full: Once all the DBD packets have been exchanged, and both routers have the complete link-state database, they transition to the Full state. In this state, the OSPF adjacency is fully established.

Area’s and Routers

OSPF Area,

  • Backbone Area or Transit Area: backbone area (Area 0) acts as the central hub connecting all OSPF areas within a network, while transit areas are the non-backbone areas that rely on the backbone area for inter-area routing.
  • Normal Area: Normal areas in OSPF are used to divide a network into smaller logical sections, providing scalability and efficient routing within each area. These areas can be assigned numbers other than 0, such as Area 1, Area 2, and so on. Each normal area has its own routing table and runs the SPF (Shortest Path First) algorithm independently to calculate the best paths within the area.

OSPF Router types:

  • Internal Router: which where router inside the normal area
  • Backbone area: which where router inside backbone area
  • Area Border Router: use to connect normal area router and backbone area router.

LSA and Types

LSA stands for “Link State Advertisement”. LSAs carry information such as network links, router connectivity, and available routes within an OSPF area. Each OSPF router creates and maintains its own LSAs based on the network information it has. These LSAs are then distributed to other routers within the same area.

Types of LSAs,

  • Router LSA (Type 1): Generated by each router to describe the links and interfaces connected to that router. Router LSAs are flooded within the same OSPF area and help construct a router’s local topology database.
  • Network LSA (Type 2): Created by a designated router (DR) on a multi-access network (such as Ethernet) to advertise information about the connected network segment. Network LSAs are used to inform routers about the presence of other routers on the network segment.
  • Summary LSA (Type 3 and Type 4): Generated by area border routers (ABRs) to advertise summarized information about networks in one area to other areas. Type 3 LSAs are used to advertise inter-area routes, while Type 4 LSAs are used to advertise routes to ASBRs (Autonomous System Boundary Routers).
  • ASBR Summary LSA (Type 5): Created by an ASBR to advertise routes from external autonomous systems into the OSPF domain. Type 5 LSAs are flooded within an OSPF area and provide information on external routes.
  • Link LSA (Type 8): Introduced in OSPFv3, Link LSAs carry information about individual links and interfaces on a router. They are used for IPv6 network addressing and topology information.

--

--

Sowmiya K
Sowmiya K

Written by Sowmiya K

Working for HCL as a Senior Software Engineer | Interested in Networking | cybersecurity | Python

No responses yet