In: Computer Science
2) Distance vector Routing
Lets understand the algorthm using an example
(due to the need of more drawings in have done it in a paper)
Initialization
At the start, each node can know only the distance between itself and its immediate neighbors,those directly connected to it.
The distance for any entry that is not a neighbor is marked as infinity(unreachable)
Sharing
The whole idea of distance vector routing is the sharing of information between neighbors.
Node A does not know about node E, node C does. Hence if node C shares its routing table with A,node A can also know how to reach node E.
Nodes A and C, can improve their routing tables if they help each other
Updating
The receiving node needs to add the cost between itself and the sending node to each value in the second column.
Receiving node needs to add the name of the sending node to each row as the third column if the receiving node uses information from that row
Receiving node needs to compare each row of its old table with
the corresponding row of the modified version
of the received table
1) Shortest path algorithm
The shortest path algorithm is also known as Dijkstra's algorithm,thsi algorithm works by finding shortest path between the node
Please see the flow chart to understand the algorithm
Analyse the below diagram to understand the process