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 22.214.171.124/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:
- Hello packet
- Database description
- Link state request
- Link state update
- 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.
Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI
as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.