Network Layer – Open Shortest Path First Protocol (OSPF Protocol)
In the previous post we have looked into the RIP protocol of the network layer. The next important intradomain protocol is the Open Shortest Path First Protocol (OSPF Protocol) .
This is another interior routing protocol. It is an intradomain protocol and it is based on the link-state routing. For handling the routing efficiently and in a timely manner, the OSPF divides an A.S (autonomous system) into areas.
OSPF divides an autonomous system into areas. An area is basically a collection of networks, hosts, and routers all contained within an autonomous system. An autonomous system can further be divided into many different areas. All networks inside an area must be connected. Let us first understand some related terms to be used in this protocol :
Area : Networks, hosts and routers are collectively called as an area. An autonomous system can be imagined to be made of various areas. All the networks inside an area should be connected.
Area border routers : These are a special type of routers which are used at the borders of an area.
Backbone : A special area inside an autonomous system is called a backbone. All the areas inside an A.S. should be connected to the backbone. So the backbone is the primary area and other areas are known as secondary areas.
Backbone routers : The routers inside the backbone are called as the backbone routers. But a backbone router can also work as an area border router.
Area Identification : Each area has an area identification. The area identification of the backbone is zero. An autonomous system is shown below :
Types of Links In OSPF terminology : A connection is called a link. Four types of links have been defined: point-to-point, transient, stub, and virtual .
Disadvantages of the RIP Protocol
The cost to a destination network is measured in terms of the number of hops. RIP determines a route based on a hop count that does not take into consideration. any other criteria other than the number of routers between the source and destination networks.
RIP sends its update with the help of a 576 byte datagram. If there are more entries than 512 bytes, then multiple datagrams must be sent.
The biggest drawback of RIP is its slow convergence. In the worse case, a RIP update can take over 15 minutes from end to end. This can lead to black holes, loops, etc.
RIP updates its entire table on a periodic basis using the broadcast address. (RIPvl , RlPv2 uses multicast or broadcast). But this would consume bandwidth.
Remedies with the implementation of OSPF protocol
OSPF provides solutions to most of the drawbacks of RIP. Using OSPF we can scale up the routing architecture well beyond the maximum 16 hops supported by RIP.
Through the link state information, each router maintains its own copy of the network topology. From this link-state database, it is possible to find the shortest routing path.
Features of OSPF Protocol:
Type of Service routing : It is possible to configure different routers to support different types of service requirements. For example, one router can be configured for high-throughput, while the other one is configured to support minimal delivery delay for some other application.
Load Balancing : When multiple routes are available, traffic can be evenly distributed over the routes. This would obviously result in a higher network efficiency.
Subdivision of Autonomous Systems : It is possible to further divide the system into logical areas. This would improve the management of large autonomous systems.
Security: The data exchanges in OSPF are authenticated. Inadvertent or malicious transmissions from foreign routing nodes are discarded.
Host : OSPF supports specific, network and subnetwork routing.
Special features are provided to support LAN environments : Although the relationships between routers are maintained on a logical link basis, link state transmissions are minimized by the architecture.
Concept of Area in OSPF
OSPF divides the network into groups, called an area. The topology of an area is not known to the rest of the autonomous System. This technique minimizes the routing traffic required for the protocol. When multiple areas are used, each area has its own copy of the topological database.
The RIP treated an autonomous system as a monolithic collection of routes and subnets, but OSPF introduces the concept of areas. The concept of hiding the routing information within a OSPF routing domain (Internet autonomous system) has also been introduced.
After dividing an autonomous system into a collection of logical areas, the OSPF can support different types of routing nodes (routers) such as internal routers, area border routers, backbone routers, and Autonomous System (AS) boundary routers.
Metric in OSPF
The cost assigned to each route by an OSPF administrator is called as metric of that route. In the OSPF protocol the metric can be based on a type of service. A router can have multiple routing tables which are based on different types of service.
OSPF Packet Types
The OSPF protocol runs directly over IP, and uses the assigned number 89. Each OSPF packet consists of an OSPF header followed by the body of a particular packet type. OSPF packets need to be sent to specific IP addresses in non broadcast multi-access networks. Different types of OSPF packets :
- Hello
- Database description
- Link state Request
- Link state Update
- Link state acknowledgement
OSPF Packet Format :
All OSPF packets have the same common header which is as shown in the below figure. This header is the same for all the five packet types of OSPF. Various fields in the OSPF packet header are as follows:
Version : The contents of this 8 bit field tells us about the version of the OSPF protocol. It is currently version 2.
Type : This 8-bit field defme. the type of the packet. There are five types of OSPF packets and they can defined by adjusting the contents of the type field from 1 to 5.
Message Length : This 16-bit field defines the length of the total message which includes the header as well as the body.
Source router IP address : This 32·bit field defines the IP address of the router that sends the packet.
Area Identification : This 32-bit field defines the area within which the routing takes place.
Checksum : This field is used for error detection on the entire packet excluding the authentication type and authentication data field.
Authentication type : This 16-bit field defines the authentication method used in this area. At this time, two types of authentication are defined : A ‘0’ in this field shows that no authentication is being used and a ‘1’ represents the use of a password for authentication.
Authentication : This 64-bit field is the actual value of the authentication data. In the future, when more authentication types would be defined, this field will contain the result of the authentication calculation.
Hope you really enjoyed this informative post regarding OSPF protocol. In the next post, we will look into the BGP protocol in detail. Stay tuned.
Aric is a tech enthusiast , who love to write about the tech related products and ‘How To’ blogs . IT Engineer by profession , right now working in the Automation field in a Software product company . The other hobbies includes singing , trekking and writing blogs .