Distance-vector routing

Nov 7, 2010 at 3:14am
ATTN: I don't mean to be dramatic but whatever help any of you can take the time to give me on this could make the difference in my passing or failing this class, so if you can help, please do, and I will love you forever, for what that's worth.



Hokay. Basically I am trying to create a C++ simulation of distance vector routing.


What I want to know... is how the EFF... do I do this? After the past three days of coding all I've come up with is a routing table that contains (destination, nextnode, cost). I input this from a text file my professor gives me that looks something like this:
1
2
3
4
5
6
7
4	1	532	
4	2	669	
3	2	722	
3	4	196	
0	1	907	
0	2	291	
1	3	24	

with each row being source node, destination, cost.

Basically what I've done is compiled a routing table that contains all of this information and I feed it through a bellman-ford algorithm to find the shortest paths between each of the nodes and the node I specify.

I run into two problems though, one major and one minor.
The minor one is that it treats each route as one-way. That means a source node can get to a destination node but a destination node can't get to a source node.

The major problem is that I don't have anything doing updates, I don't have a routing table for each node and I don't have them exchanging details through DV updates and I don't know how to do that or where to start.

Here is the original problem if that helps.
http://www.cs.txstate.edu/~mg65/teaching/fall10/cs4310/proj1.html
Topic archived. No new replies allowed.