Upload
vantu
View
236
Download
3
Embed Size (px)
Citation preview
Overview
Distributed Bellman Ford also known as Distance Vector Routing Algorithmis a well known shortest path routing algorithm with time complexity of O(|V||E|) where,V - verticesE - edges
We want to simulate Distance Vector over a graph and show that the running time increases with the percentage of increase in deletion of nodes.
Overview
● In this project we would vary the no of nodes in a graph from 100-10,000.
● At every n node graph we would delete x% of nodes in a graph where x would vary between 1% to 40%.
● We would study the effects of increasing the deletion of nodes in each graph.
● We feel that increasing the no of deletions would increase the response time of the algorithm making is slower
Hypothesis
Deletion of nodes in a graph simulating Bellman Ford Algorithm causes the response time to find the shortest path to increase.
Algorithm
n1 n2 n3
n4 n5
1 2
3 4 5
6
Node n1 sends the vector table to n2 and n4
from n2 Link Cost
n1 n1 1
n2 _ 0
from n4 Link Cost
n1 n1 3
n4 _ 0
A loop-free Extended Bellman-Ford Routing Protocol without Bouncing Effect,
SIGCOMM '89 Symposium proceedings on Communications architectures & protocols
Algorithm
n1 n2 n3
n4 n5
1 2
3 4 5
6
Node n2 sends the vector table to n1, n3 and n5
from node n1
Link Cost
n1 _ 0
n2 n2 1
from Link n3
Link Cost
n1 n2 3
n2 n2 2
n3 _ 0
Algorithm
n1 n2 n3
n4 n5
1 2
3 4 5
6
Node n4 sends the vector table to n1 and n5
from node n1
Link Cost
n1 _ 0
n2 n2 1
n4 n4 3
from Node n5 Link Cost
n1 n2 5
n2 n2 4
n4 n4 6
n5 _ 0
Algorithm
n1 n2 n3
n4 n5
1 2
3 4 5
6
Node n1 sends the vector table to n2 and n4
from n2 Link Cost
n1 n1 1
n2 _ 0
n4 n1 4
from n4 Link Cost
n1 n1 1
n2 n1 4
n4 _ 0
Algorithm
n1 n2 n3
n4 n5
1 2
3 4 5
6
Node n1 sends the vector table to n2 and n4
from node n2
Link Cost
n1 n1 1
n2 _ 0
n3 n3 2
n4 n1 4
from node n5 Link Cost
n1 n2 5
n2 n2 4
n3 n3 5
n4 n4 6
n5 _ 0
Algorithm
n1 n2 n3
n4 n5
1 2
3 4 5
6
Node n3 sends the vector table to n2 and n5
from node n2
Link Cost
n1 n1 1
n2 _ 0
n3 n3 2
n4 n1 4
n5 n5 4
from node n3
Link Cost
n1 n2 3
n2 n2 2
n3 _ 0
n4 n5 11
n5 n5 5
from n1
Link Cost
n1 _ 0
n2 n2 1
n3 n2 3
n4 n4 3
n5 n2 5
from n4
Link Cost
n1 n1 3
n2 n1 4
n3 n1 6
n4 _ 0
n5 n5 6
from n5
Link Cost
n1 n2 5
n2 n3 4
n3 n3 5
n4 n4 6
n5 _ 0
from n2
Link Cost
n1 n1 1
n2 _ 0
n3 n3 2
n4 n1 4
n5 n5 4
from n3
Link Cost
n1 n2 3
n2 n2 2
n3 _ 0
n4 n2 6
n5 n5 5
Bouncing Effect
100 1
1
n1
n3 n2
● edge n1-n2 fail● n1 is the destination node
from n3● n2 is the prefered
neighbour according to the routing table
● n3 is the prefered neighbour for n2 because n1-n2 link failed
● Nodes n2 and n3 have distance 2 and 3 respectively now. This is less than 100
● This stops when the value of link n3-n2 becomes greater than 100
Count to Infinity
100 1
1
n1
n3 n2
● link n1-n3 also fail along with link n1-n2
● The bouncing effect between link n2-n3 continues till infinity
● It does not stop at a value just greater than 100.
A loop-free Extended Bellman-Ford Routing Protocol without Bouncing Effect,
SIGCOMM '89 Symposium proceedings on Communications architectures & protocols
Looping
n1
n2n5 n4
n3
5 1
5
1
13
● If link n1-n5 and n3-n5 break.
● n1 and n3 will send their updated vectors to the neighbours
● for instance the message delay for clockwise is very small in comparison to the counter clockwise.
● the prefered neighbour for both n2 and n4 remain same.
● causing looping or delay for the packets which have arrived to be transferred.
A loop-free Extended Bellman-Ford Routing Protocol without Bouncing Effect,
SIGCOMM '89 Symposium proceedings on Communications architectures & protocols
Progress
● We understood the routing algorithm and its drawbacks.
● We studied some ways of improving the algorithm to avoid Count to Infinity.
● We implemented node sensitive graphs.● We simulated Bellman Ford Algorithm over
the built graph.
Software DesignDistanceVector Node
- Graph g- Node [] nodeArray- LinkedList <Integer> myqueue
-byte distanceVector-int nodeId-Set <Integer> notification-Set <Integer> neighbours-boolean changeInDv-static Node NodeArray[] +addToQueue()
+calculateQueueDV()+displayDV()+mian()
+static Node[] initializeNode(Graph g)+Set<Integer> recalculateDV()+Set<Integer>notifyNeighbours()
Graph
-static final byte INFINITY-long seed-int E-int N-byte maxDistanceBetweenTwoNodes-byte AdjacencyMatrix[][]
+int getNumberOfObjects()+byte[] getDistanceVector(int index)+Set<Integer>getNeighbours(int index)
1
*1
1
1 *
Usagejava DistanceVector <seed> <noOfNodes> <noOfEdges> <maxDistance>
seed: This is a no. which is used to create a random no.noOfNodes: This defines the no of nodes in a graphnoOfEdges: defines the no of edges in a graphmaxDistance: The max. distance between two connected nodes