The Wayback Machine - https://web.archive.org/web/20240927194606/https://www.geeksforgeeks.org/open-shortest-path-first-ospf-set-2/
Open In App

Open shortest path first (OSPF) – Set 2

Last Updated : 26 Oct, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

OSPF is abbreviated as Open Shortest Path First. OSPF is an intradomain routing protocol and it is the implementation of link state routing protocol. It falls into the group of interior gateway protocols (IGPs), operating within a single autonomous system (AS). OSPF was designed as an interior gateway protocol. It is used in an autonomous system such as a local area network (LAN). 

To handle routing efficiently and on time, this protocol divides an autonomous system into areas. Area is a collection of routers, hosts, networks all contained within an autonomous system. An autonomous system can be divided into many different areas, but at the same time, all networks inside an area must be connected. 

 

From the above given figure, we can see that the network is divided and it can be structured, or subdivided, into routing areas to simplify administration and optimize traffic and resource utilization. Routers within an area flood the area with routing information. At the border of areas there lies a special router “area border routers”. These routers summarize the information about the area in which it lies and sends the information to some other area. Among the areas, there is an area called “backbone” to which all the other areas are connected and serve as the primary area. Each area has an identification. Two different areas can’t be connected directly but they need to be connected through the backbone network and it is compulsory. The routers which are at the border of two areas for example area 1 and area 3 are connected through is area border router. 

The OSPF protocol supports authentication and its updates are sent through multicast address 224.0.0.5/6. If one of the links fails the protocol finds the other shortest path to reach the destination hence it possesses faster convergence. While communication hello packets are sent over each 10 sec, and when the reply is not received within 40 sec it is considered time out. Also when there is a slight change in the router configuration (routers added/removed ), the routing table is updated very fast. It is based on link state routing protocol. 

As the name suggested “shortest path first”, OSPF calculates the shortest route to a destination through the network based on an algorithm. It uses the Dijkstra algorithm for calculating the shortest path. 

A connection is also known as a link. A link can also be a connection between two routers/networks. In OSPF four different types of links are defined: 
 

  • Point to Point: These types of links are present in between two routers and as it is a point to point, there lies no hosts, routers in between the two connected routers. 

     

  • Transient link: If there lies a large number of routers attached to a network. There can be Lan, wifi, several different routers then this configuration is termed as transient link. It can be represented with two topology: Realistic and Unrealistic. 

     

  • Stub: It is a network that is connected with a single network. The data packets are sent and received are through the same router. 
     
  • Virtual link: There may be some situation that arises when the link is broken due to some reason. At that time the network administrator creates a virtual link between the two communicating routers. These types of links are called virtual link. 
     

There are five different types of packets in the OSPF protocol and they are: 
 

  1. Hello packet 
     
  2. Database description 
     
  3. Link state request 
     
  4. Link state update 
     
  5. Link state acknowledgement 
     

When there comes a situation of passing a packet, the question is to which network it should be passed and why? 
The decision is based on optimization. One of the ways is to assign a cost for passing through a network and this cost is termed as a metric. However, the metric assigned to each network depends on the type of protocol. Protocol such as OSPF allows the administrator to assign a cost for passing through a network based on the type of service. It can be based on maximum delays, maximum throughput, speed, and error-free, etc. There can be several routing tables based on different types of services. 

OSPF uses a reference bandwidth of 100 Mbps for cost calculation. The formula to calculate the cost is reference bandwidth divided by interface bandwidth. For example, in the case of Ethernet, it is 10 Mbps / 10 Mbps = 1.
 


Previous Article
Next Article

Similar Reads

Open Shortest Path First (OSPF) Protocol fundamentals
Open shortest path first (OSPF) is a link-state routing protocol that is used to find the best path between the source and the destination router using its own shortest path first (SPF) algorithm. A link-state routing protocol is a protocol that uses the concept of triggered updates, i.e., if there is a change observed in the learned routing table
5 min read
Open Shortest Path First (OSPF) protocol States
Prerequisite - OSPF fundamentals Open Shortest Path First (OSPF) is a link-state routing protocol that is used to find the best path between the source and the destination router using its own Shortest Path First). OSPF is developed by Internet Engineering Task Force (IETF) as one of the Interior Gateway Protocol (IGP), i.e, the protocol which aims
4 min read
Open shortest path first (OSPF) router roles and configuration
Prerequisite - Open shortest path first (OSPF) Open shortest path first (OSPF) is a link-state routing protocol which is used to find the best path between the source and the destination router using its own SPF algorithm. Open shortest path first (OSPF) router roles - An area is a group of contiguous networks and routers. Routers belonging to same
3 min read
Difference between EIGRP and OSPF
EIGRP (Enhanced Interior Gateway Routing Protocol) It is used to share the information from one router to the neighbor routers if they exist in the same region. It is also a complex protocol but can be configured and make it work easily in small and large networks. It is also a hybrid protocol because it uses the features of the both distance vecto
2 min read
Difference between OSPF and IGRP
1. Open Shortest Path First (OSPF): OSPF uses a link-state routing algorithm. Using the link state information which is available in routers, it constructs the topology in which topology determines the routing table for routing decisions. It supports both variable-length subnet masking and classless inter-domain routing addressing models. Since it
3 min read
Difference between OSPF and IS-IS
1. OSPF : It was developed because of in demand in the internet society to launch a high functionality non-proprietary IGP for the TCP/IP protocol community. The OSPF is an intradomain routing protocol and is based on link state routing technology. It has introduced some new concepts that are authentication of routing updates, variable length Subne
2 min read
What is Passive-Interface Command Behavior in RIP, EIGRP & OSPF?
Routing protocols specify how routers talk to each other to exchange information about routes within the same system. This communication happens by sending all or a portion of routing tables in routing-update messages to their neighbors. Passive-Interface Command Behavior in RIPWhile configuring a router, if we want to prevent an interface from par
2 min read
OSPF Area Types
Open Shortest Path First is a link-state protocol that is used to find the best path between the source and the destination router using its own shortest path first algorithm. It comes under Link State Routing Protocol. It automatically decides the path or table and is used to send router packets with auto path decision and send hello packets every
3 min read
How OSPF Calculate the Best Route?
Answer: OSPF calculates the best route using the Dijkstra algorithm based on the lowest cumulative cost path.OSPF (Open Shortest Path First), that routing protocol very good for choosing the bestest route for data packets to follow from one router to another. It calculates shortest path by considering many many parameters through its algorithm. Cos
2 min read
Difference between RIP and OSPF
Among the dynamic routing protocols, RIP and OSPF are the most commonly used routing protocols for networking. RIP is necessary for the exchange of routing information between routers while OSPF is used for the same purpose but it is different from RIPE in that its function depends on the size and complexity of the network. In this article, I will
6 min read
Difference Between OSPF and BGP
OSPF(Open Shortest Path First) and BGP(Border Gateway Protocol) are routing protocols and both of them have there different characteristics. OSPF finds the best path within a network, while BGP finds the best path between networks. Basically, OSPF is Intra-domain routing and BGP is Inter-domain routing. What is OSPF?OSPF stands for Open Shortest Pa
3 min read
Probabilistic shortest path routing algorithm for optical networks
Data transfer operations is a crucial aspect in case of networking and routing. So efficient data transfer operations is a must need, with minimum hardware cost (Optical Cables, WDM Network components, Decoders, Multiplexers) and also in the minimum time possible. Thus, the need is to propose an algorithm that finds the shortest path between two no
5 min read
Difference between Minimum Spanning Tree and Shortest Path
Spanning tree: A spanning tree (T) of an undirected graph(G) is a subgraph which is a tree that includes all the vertices of a graph (G) and the minimum number of edges required to connect the graph (G). And it is a known maximal set of edges with no cycles. Properties: If a graph(G) is not connected then it does not contain a spanning tree (i.e. i
4 min read
Shortest Path Algorithm in Computer Network
In between sending and receiving data packets from the sender to the receiver, it will go through many routers and subnets. So as a part of increasing the efficiency in routing the data packets and decreasing the traffic, we must find the shortest path. In this article, we are discussing the shortest path algorithms. What is Shortest Path Routing?
6 min read
How does the Packet Find the Shortest Path in a Computer Network?
Answer: Packets find the shortest path in a computer network using routing algorithms like OSPF or BGP, which calculate the most efficient route based on various metrics.Routing AlgorithmsVarious routing algorithms determine the shortest path for packets to travel from the source to the destination. Examples include Dijkstra's algorithm, Bellman-Fo
1 min read
Difference between First Come First Served (FCFS) and Longest Job First (LJF) CPU scheduling algorithms
1.First Come First Served (FCFS) : First Come First Served (FCFS) is the simplest type of algorithm. It is a non-preemptive algorithm i.e. the process cannot be interrupted once it starts executing. The FCFS is implemented with the help of a FIFO queue. The processes are put into the ready queue in the order of their arrival time. The process that
3 min read
Introduction of Shortest Remaining Time First (SRTF) algorithm
Shortest Remaining Time First (SRTF) is the preemptive version of Shortest Job Next (SJN) algorithm, where the processor is allocated to the job closest to completion. This algorithm requires advanced concept and knowledge of CPU time required to process the job in an interactive system, and hence can't be implemented there. But, in a batch system
2 min read
Difference between Shortest Job First (SJF) and Round-Robin (RR) scheduling algorithms
1.Shortest Job First (SJF) : Shortest Job First (SJF) Scheduling Algorithm is based upon the burst time of the process. The processes are put into the ready queue based on their burst times. In this algorithm, the process with the least burst time is processed first. The burst time of only those processes is compared that are present or have arrive
3 min read
Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
1. Priority Scheduling Algorithm : Priority scheduling algorithm executes the processes depending upon their priority. Each process is allocated a priority and the process with the highest priority is executed first. Priorities can be defined internally as well as externally. Internal priorities are decided by the system depending upon the number o
3 min read
Difference between Multi Level Queue Scheduling (MLQ) and Shortest Job First
1. Multi Level Queue Scheduling (MLQ) : It is quite difficult to have just one queue and schedule all the processes. This is where multi level queue scheduling is used. In this the processes are divided into various classes depending upon the property of the processes such as system process, I/O process etc. Thus we get 'n' number of queues for n c
3 min read
Shortest Job First CPU Scheduling with Predicted Burst Time
Shortest Job First (SJF) is an optimal scheduling algorithm as it gives maximum Throughput and minimum average waiting time(WT) and turnaround time (TAT) but it is not practically implementable because the burst time of a process can't be predicted in advance. We may not know the length of the next CPU burst, but we may be able to predict its value
5 min read
Difference between First Come First Served (FCFS) and Round Robin (RR) Scheduling Algorithm
First Come First Served Scheduling Algorithm: First Come First Served (FCFS) is the simplest and non-preemptive scheduling algorithm. In First Come First Served (FCFS), the process is allocated to the CPU in the order of their arrival. A queue data structure is used to implement the FCFS scheduling algorithm. The process which is at the head of the
2 min read
Difference between Multi Level Queue Scheduling (MLQ) and First Come First Served (FCFS)
1. Multi Level Queue Scheduling (MLQ) : It is quite difficult to have just one queue and schedule all the processes. This is where multi level queue scheduling is used. In this the processes are divided into various classes depending upon the property of the processes such as system process, I/O process etc. Thus we get 'n' number of queues for n c
3 min read
Longest Remaining Time First (LRTF) or Preemptive Longest Job First CPU Scheduling Algorithm
Longest Remaining Time First (LRTF) is a preemptive version of Longest Job First (LJF) scheduling algorithm. In this scheduling algorithm, we find the process with the maximum remaining time and then process it, i.e. check for the maximum remaining time after some interval of time(say 1 unit each) to check if another process having more Burst Time
7 min read
What is ODI(Open Data link Interface)?
Open Data-Link Interface (ODI) was introduced by Novell and Apple. It is used to define the communication mechanism between the network interface card (NIC) drivers and network protocols. It is a software interface that allows different Data-Link Layer protocols to share the same driver or adapter on a computer. It resides in Layer 2, the Data Link
1 min read
How to Hack a Open WiFi?
We know that nowadays if anyone of us finds free open WiFi our happiness is at the next level. Well doesn't it sound super cool to hack someone who is using the same open WiFi which we are using? If yes then let's check out a way to make this thing happen. We will require the following tools: Kali Linux or other Linux with required tools installed:
2 min read
How To Check Open TCP/IP Ports in Windows?
Certain apps and processes in Windows 10 can cause problems if you're not properly connected to the internet. Firewalls can cause these connection issues when they cannot determine whether incoming and outgoing connections pose a threat. Work around this issue and open ports for incoming and outgoing connections. We will know to check whether a TCP
5 min read
What is TCP Fast Open?
TCP handshake takes one full RTT(round trip time). RTT is the time taken by a packet to reach from sender to receiver and back. One RTT is a large amount of time for ‘short-lived’ and ‘time-sensitive’ traffic such as web traffic; web browsing on the browser like visiting a website. The performance degrades further if the propagation delay is very h
5 min read
How to Open a URL?
Answer: To open a URL, type it into your web browser's address bar and press Enter.Launch Web BrowserOpen your preferred web browser on your device such as Chrome, Firefox, Safari, or Edge. Access the Address BarLocate the address bar at the top of your browser window. This is where URLs are entered. Enter the URLType the complete URL of the websit
1 min read
TCP Fast Open and TCP/IP Acceleration
The TCP Fast Open (TFO) and TCP/IP Acceleration are techniques used to improve the performance and efficiency of TCP connections in computer networks. These techniques aim to reduce the latency and improve the throughput of the TCP connections, especially for short-lived connections and web browsing scenarios. TCP Fast Open (TFO): The TCP Fast Open
3 min read
Article Tags :