OSPF Basics

Open Shortest Path First, is an IGP used to distribute routing information within a single autonomous system (AS). OSPF is based on link state technology, used shortest path first algorithm developed by Dijkstra.

Few ‘+’ about OSPF: 

  • No limitation on hop count
  • Intelligent use of VLSM similar to EIGRP
  • Uses link state updates through an multicast address
  • Allows logical division of networks into areas and overall it’s OPEN SOURCE!!!

Whats a link state ?
OSPF is based on advertising link states. Link is like an router interface, the state of the link is a description of that interface and its relationship to its neighbouring routers.
Description of interference include, IP address, subnet mask of the interface, the type of interface it is connected to etc. The collection of these link states is called an Link-state data base.

SPF Algorithm for OSPF

The OSPF enabled routers on initialization or due to change any routing information, it generates link-state advertisements (LSA). This advertisement represents the collection of all link-states on that router.
All routers exchange link-states by means of flooding. Each router that receives a link state update should store a copy in its link-state database and then propagate the update to other routers.
After the database of each router is completed, the router calculates a shortest path tree to all destinations. The router uses the Dijkstra algorithm in order to calculate the shortest path tree. The destinations, the associated cost and the next hop to reach those destinations form the IP routing table
In case no changes in the OSPF network occur, such as cost of a link or a network being added or deleted. Any changes that occur are communicated through link-state packets and the SPF algorithm is recalculated in order to find the shortest path.

OSPF is hierarchical design, uses areas. Why areas ?

  • To decrease routing overhead
  • To speed up convergence
  • To confine the (in)stability to single areas of the network

OSPF allows us to subdivide the larger internetwork into smaller internetworks called areas.
Area 0 is called backbone area, all areas MUST connect to area 0

The router that connects other areas to the backbone area within an AS is called ABR (Area border Router).
The router that connects multiple autonomous systems (AS) together is called ASBR (Autonomous system Boundary router )

Router ID: It is an IP address used to identify a router or simply its a name of the router.
> highest IP address of all configured loopback interfaces or
> highest IP address out of all active physical interfaces or
> you can assign your own IP address

Neighbor(s): are 2 or more routers that have an interface on a common network, such as two routers connected on a serial link.

To successfully establish a neighbour relationship, these MUST match
> area id
> area type (stub, NSSA) or network type
> Hello or dead interval
> subnet mask
> authentication

Adjacency: is a relationship between two OSPF routers that permits direct exchange of route updates. Not all neighbours become adjacent depedends on type of network and configuration on routers
Examples: In multi-access networks, routers form adjacencies with designated and backup designated routers
In PPP, Point to multipoint, routes form with opposite side routers.