Computer Network | Open shortest path first (OSPF) – Set 2

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 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 summarizes the information about the area in which it lies and send the information to some other area. Among the areas there is an area called “backbone” to which all the other areas are connected and serves 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 area 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 link fails the protocol finds the other shortest path to reach the destination hence it posses 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 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 calculate the shortest route to a destination through the network based on an algorithm. It uses disjktra algorithm for calculating shortest path.

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

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

  2. Transient link: If there lies 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.

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

There are five different types of packet 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 optimisation. One of the way is to assign a cost for passing through a network and this cost is termed as 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.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.