Open Shortest Path First(OSPF) is a classless routing protocol. It uses a link-state routing protocol, which means that the routers exchange topology information with their nearest neighbors.
The OSPF maintains three separate tables that are:
Neighbor table – A neighbor table contains a list of all neighboring routers.
Topology table – A topology table contains a list of all possible routes to all known networks within an area.
Routing table – A routing table contains the best route for each known network.
A list of OSPF features are given below:
- It consists of areas and autonomous systems
- It allows the scalability
- It minimizes the routing update traffic
- It supports the VLSM/CIDR
- It has an unlimited hop count
- It allows multi-vendor deployment
- It supports only IP routing.
- By default, OSPF routers have an administrative distance 110.
- It uses the Dijkstra Shortest Path First algorithm to find the shortest path.
- OSPF includes additional features such as equal-cost, multipath routing, and routing based on upper-layer type-of-service (TOS) requests
Advantage of OSPF
There are following advantages of OSPF:
- OSPF is a combination of both RIP and IGRP routing protocols.
- As we know, it is a link-state protocol, so it provides fast convergence and excellent scalability.
- OSPF does not send the entire routing table. It only sends those updates in the routing table which have changed.
Disadvantage of OSPF
There are the following disadvantages of OSPF:
- OSPF requires more RAM to store the topology.
- OSPF requires extra CPU process to run the Shortest Path First (SPF) algorithm.
- It is a more complex protocol to implement as compared to RIP.
- It is very difficult to troubleshoot OSPF network.
Building Blocks of OSPF
Link – It is an interface of a router which is assigned to any given network.
Router ID (RID) –The Router ID is an IP address which is used to identify the router.
Neighbor – Neighbor routers are those that have an interface on a common network, such as two routers are connected on a point-to-point serial link.
Adjacency –It is a relationship between two OSPF routers that permits the direct exchange of the router updates (tables).
Hello protocol –The Hello protocol provides dynamic neighbor discovery and maintains neighbor relationships. Hello packets are mainly addressed to the multicast address 126.96.36.199.
Neighborship database –It contains a list of all OSPF routers from which Hello packets are seen. It includes a variety of details, like the Router ID and state.
Topological database –It contains information from the Link State Advertisement (LSA) packets that have been received for an area.
Link State Advertisement –It is used to update and maintain the topology database.
Designated Router (DR) –A Designated Router is elected whenever OSPF routers are connected to the same multi-access network.
Backup Designated Router (BDR) –A Backup Designated Router is a hot standby router for the DR on multi-access links. It receives all routing updates from the OSPF adjacent routers.
OSPF areas –The OSPF areas are a group of connected networks and routers.
Broadcast (multi-access) –Broadcast networks allow multiple devices to connect with the same network as well as provide an ability to deliver a single packet to all nodes present in the network.
Non-Broadcast Multi-Access (NBMA) – Non-broadcast-multi-access networks allow multi-access. It does not have the broadcast ability like Ethernet.
Example: ATM (Asynchronous Transfer Mode)
- Down –It indicates that no Hellos have been received from the neighboring router.
- INIT –It indicates that a Hello packet has been received from the neighbor, but two-way communication has not been established.
- 2WAY –It indicates that bidirectional communication has been established.
- Exstart –It indicates that the routers are preparing to share link-state information.
- Exchange –It indicates that the routers are exchanging Database Descriptors (DBDs). A router will use a neighbor’s DBD to determine if it has information to share or not.
- Loading –It indicates that routers are exchanging Link State.
- Full –It indicates that the routers are fully synchronized.
Difference between OSPF and RIP Routing Protocols:
|Protocol||Link state||Distance vector||Distance vector|
|Route Propagation||Multicast on change||Periodic multicast||Periodic broadcast|
|Hop count limit||None||15||15|
|Hierarchical network requirement||Yes (Using areas concepts)||No||No|
|Update||Event triggered||Route table updates||Route table updates|
|Route computation algorithm||Dijkstra||Bellman-Ford||Bellman-Ford|