Routing is the process of choosing the path in the network. Distance vector routing is the routing protocol that selects the path based on parameter distance. Link State routing protocol is the protocol that chooses the best path based on the cost of the path.
Introduction to Routing
Routing decides the best path for the transmission of packets between different networks. Routing is defined as the process of data transmission from the source to the destination on the internet. Based on how there is an updation in the routing table, there are two routing protocols namely distance vector routing and link state routing.
Distance Vector Routing
Distance vector routing protocol is a protocol that chooses the best path for the destination based on the parameter distance. Generally, the number of hops is the criteria for measuring distance metric. Some other factors like packet loss, delay, etc. are also considered for measuring distance metrics. If the hop is used for the metric distance when the packet passes through the router then the hop is travelled every time The route in the network having the least number of hops is considered as the best route for that network.
RIP (Routing Information Protocol) and IGRP (Internal Gateway Routing Protocol) are some examples of distance vector routing algorithms.
It is one of the dynamic algorithms and in this algorithm, every router calculates the difference between itself and every potential destination router or we can say its immediate neighbors of the router.
The routing table is updated when the entire network knowledge is shared by the router with its neighbors.
Information is shared between the routers on a regular basis.
In this routing tables are created by using the bellman ford algorithm.
Operation
At the same time, all the routers are turned on and all the routers run the same distance vector routing algorithm. Routers communicate with their neighbor routers by transmitting a distance vector between them. Every router sends and receives distance vectors from every neighbor of its. By the combination of its information and information received from its neighbors, routers update the routing table by inserting the best-estimated route for the given destination in the routing table.
- Router A and Router G informed Router H that Router D is only 1 hop away.
- Router H itself recognized that Router A and Router G are the neighbors’ routers, so the hop metric is multiplied by 1 by it.
- Thus Router D concluded from the information received from its neighbors and it recognizes on this own that Routers A and G can be reached in 2 hops from Router D.
Characteristics of Distance Vector Protocol
- RIP broadcasts take place after every thirty seconds for the maintenance of network integrity.
- Routing tables are stored by RIP. These routing tables represent how many hops are available between routers and only
15 Hops
are allowed. - Router sends its entire routing table to all the neighbor routers whenever the router is going to use its RIP.
Properties of Distance Vector Routing
Whole network knowledge: All routers in the network share all their information with the rest of the network. All information about the network collected by routers is shared between the neighbors of the routers.
Network information is transmitted to neighbors only: Network information is transmitted by the router to its directly linked routers only. The router transmits whatever information it has related to the network through the ports. The router updates its routing table based on the data received from its neighbors.
Sharing information regularly: Information is transmitted by the routers to the neighboring routers in 30 seconds
.
Routing Table
Refer to the below image for the routing table format
NET ID: Packet’s final destination is identified by the Network ID.
Cost: Cost represents the number of hops packets required to travel to reach its final destination.
Next Hop: It is the router to which the packet is required to be transmitted.
Link State Routing
Link State protocols are also known as the Shortest-path-first protocols. The protocols that use link state routing have a better understanding of the network in comparison to any of the protocols using distance vector algorithms as the protocols that use the link state routing router have the complete picture of the topology of the network.
Three separate tables are created by every router in link state routing. Among three created tables, one table is used for storing the information related to the directly connected neighbors of the router. The second table stores the information about the topology of the entire network. The actual routing table of the router is stored in the routing table.
All the routers receive the information related to their directly connected links by the link state protocols. Examples of Link State Routing Protocols are IS-IS (Intermediate System to Intermediate System) and OSPF (Open Shortest Path First).
It is also one of the dynamic routing algorithms in which information about neighboring routers is shared by the router with all other routers of the network. The router transmits the information of its neighbor routers to all the routers with the help of flooding. Information is shared at the time of update only.
In this, Dijkstra’s algorithm is used for creating the routing tables.
Operation
The following steps are executed in the operation of link State routing:
Discovery: A HELLO message is sent to every link of the router on a regular interval by link state for enabling the router.
Link Cost: To find the cost of every neighbor of the router, each router needs to be subjected to a series of tests. For determining the cost of its neighbors, end-to-end delay, throughput, or a combination of both can be used. It is necessary for all the routers that are enabled by link state to have a cost estimate for all its links.
Link State Packets: Packet is created by every router and this packet contains its neighbors and also contains the information on the link cost of these neighbors. Identity, age parameter, and the sequence number are added by every router at the start of the packet. There is a flooding of the packet in the network after the completion of its construction process.
Shortest Path: After this, a Dijkstra algorithm can be used by the router to find the shortest path for reaching the given destination with the help of all the information stored in its link state table.
Characteristics of Link State protocol
- In OSPF, there is less network traffic as compared to RIP. So, it is cost-effective.
- OSPF does not send all tables to the router but it only gives updates to a particular table.
- Routing information is received by the IP section of the TCP/IP suite, and it is an alternative to RIP.
Properties of Link State Routing
Neighbor knowledge: In OSPF, the router does not send whole routing tables, it sends information about its immediate neighbor. The identity of the router and the cost of directly connected links are broadcast to other routers.
Flooding: Flooding is the process in which information is transferred to all routers except the neighbor router in the internetwork by every router.
Whenever the packet is received by the router, the router copies it and shares it with all its neighbors. So, there is a transmission of copied information to all routers in the network.
Information Sharing: Whenever there is a change in information only it is transferred by the router to other routers.
Distance Vector Routing Vs Link State Routing
Below is the table to explain the difference between distance vector routing and link state routing.
Refer to the below image for difference distance vector routing and link state routing.
Distance Vector Routing | Link State Routing |
---|---|
Bellman ford algorithm is used in distance vector routing | Dijkstra’s algorithm is used in link-state routing |
It is simple to use | It needs trained network administrators |
Chances of traffic are less | There is more chance of traffic |
Convergence time is moderate i.e good news forward fastly as compared to bad news | Convergence time is fast |
There is less utilisation of CPU and memory | There is more utilisation of CPU and memory |
There is a problem of persistent looping | Only transient looping occurs |
Best path is determined by the least number of hops | Best path is determined by the least cost |
There is no hierarchical structure | There is a hierarchical structure |
Require smaller bandwidth as there is no flooding, small packet, and local sharing | Require larger bandwidth for flooding problems and for transmitting large link state packets |
It updates tables with information about its neighbors. So, it works based on local information | It has the information of the whole network. So, it works based on global information |
It updates on a broadcast basis | It updates on a multicast basis |
Conclusion
- Routing decides the best path for transmission of packets between different networks.
- Distance vector routing protocol is a protocol that chooses the best path for the destination based on the parameter distance.
- NET ID, Cost, and Next hop are the components of the routing table in distance vector routing.
- Link State protocols are also known as the Shortest-path-first protocols and they choose the path based on the cost of the path.