





































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






































UNIT III The Network Layer Routing Algorithms, Inter networking, The Network Layer in The Internet
The Optimality Principle
The Shortest Path Algorithm is used in computer networks and graph theory to find the minimum cost (or distance) path between two nodes in a network. The Shortest Path Algorithm is a method used in networking and graph theory to determine the path between two nodes such that the total cost (distance, time, or weight) is minimized. In a computer network, each link between two routers is assigned a cost. The purpose of the algorithm is to select routes that minimize this cost, thereby ensuring efficient data transmission.
Set initial distances for all vertices: 0 for the source vertex, and infinity for all the other.Choose the unvisited vertex with the shortest distance from the start to be the current vertex. So the algorithm will always start with the source as the current vertex.For each of the current vertex's unvisited neighbor vertices, calculate the distance from the source and update the distance if the new, calculated, distance is lower. We are now done with the current vertex, so we mark it as visited. A visited vertex is not checked again. Go back to step 2 to choose a new current vertex, and keep repeatingthese steps until all vertices are visited In the end we are left with the shortest path from the source vertex to every other vertex in the graph. E RAMACHANDRA
Relaxation : d[u]+c[u,v]<d[v]
the shortest paths from a single source vertex to all other vertices in a weighted graph. It is particularly useful for graphs with negative edge weights, as it can detect negative weight cycles. Relax every edge repeatedly. After at most |V|−1 full passes of relaxing all edges, all shortest-path distances are found.
EX - I (^) EX - II EX - III
Using flooding technique An incoming packet to A, will be sent to B, C and D. B will send the packet to C and E. C will send the packet to B, D and F. D will send the packet to C and F. E will send the packet to F. F will send the packet to C and E. EXAMPLE
Flooding may be of three types Uncontrolled flooding Here, each router unconditionally transmits the incoming data packets to all its neighbours. Controlled flooding They use some methods to control the transmission of packets to the neighbouring nodes. The two popular algorithms for controlled flooding are Sequence Number Controlled Flooding (SNCF) and Reverse Path Forwarding (RPF). Selective flooding Here, the routers don't transmit the incoming packets only along those paths which are heading towards approximately in the right direction, instead of every available paths.
Slow Convergence – Takes time for all routers to learn about network changes, which can cause loops. Limited Scalability – Not suitable for large networks because routing tables grow and updates become inefficient. Inefficient Updates – Routers send full tables instead of only the changed routes.