Question: in C or c++ Implement distributed Distance Vector and Link State routing algorithms. Randomly generate a connected weighted graph and then apply the distributed Distance

in C or c++ Implement distributed Distance Vector and Link State routing algorithms. Randomly generate a connected weighted graph and then apply the distributed Distance Vector and Link State algorithms to find the shortest path between any two nodes. If there is a tie, you can randomly choose one path. We assume there are at most 10 nodes and the weight on each edge is randomly chosen between 1 and 10. The inputs are the weighted graph and a source and a destination. And the outputs are the source, intermediate nodes, the destiantion, and the shorted path length. You will get extra 10 points if your weighted graph is automatically generated. Also, print out all the shortest paths when multiple shortest paths exist from a source to a destination. Distance Vector Algorithm Each node maintains a vector of distances and next hops to all destinations 1. Initialize vector with 0 cost to self, infinity to other destinations 2. Periodically send vector to neighbors 3. Update vector for each destination by selecting the shorted distance heard, after adding cost of neighbor link 4. Use the best neighbor for forwarding Link State Algorithm 1. Nodes flood topology with link state packets Each node learns full topology 2. Each node computes its own forwarding table By running Dijkstra algorithm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!