istance-vector Routing: istributed - (cont.) xample [ istributed ellman-ord lgorithm ] ssume each node i maintains an entry (R(i,x), L(i,x)), where R(i,x) is the next node along the current shortest path and L(i,x) is the current minimum cost from node i to the destination x. If the next node is not defined, we set R(i,x) to. iteration iteration xecution of the ellman-ord algorithm for destination node Initially all nodes, other than the destination node, are at infinite cost (distance) to node. Iteration : Node informs its neighbours it is distance 0 from itself, with a timestamp. Iteration : Node finds that it is connected to node with cost. Node finds that it is connected to node at a cost of. Nodes and update their entries and inform their neighbours.
istance-vector Routing: istributed - (cont.) Iteration : Node finds that it can reach node via node with cost. Node finds that it can reach node via node with cost 6. Node finds it has paths via nodes and with costs and respectively, and it selects the path via node. Nodes,, and update their entries and inform their neighbours. Iteration : Node finds that it can reach node via node,, and with distance 6,, and 6 respectively, and it selects the path via node. Node changes its entry to (,) and informs its neighbours. Iteration : Nodes,, and process the new entry from node but do not find any new shortest paths. The algorithm has converged. routing-table entries for only Iteration Node (,, -) (,, -) (,, ) (,, ) (,, ) Node (,, -) (,, -) (, 6, ) (,, ) (,, ) Node (,, -) (,, ) (,, ) (,, ) (,, ) Node (,, -) (,, -) (,, ) (,, ) (,, ) Node (,, -) (,, ) (,, ) (,, ) (,, ) When a node running the V algorithm detects a change in its distance table, it updates its neighbours.
istance-vector Routing: istributed - (cont.) xample [ lgorithm reaction to link failure ] algorithm may react very slowly to a link failure! or example, consider the following topology, with node as the destination. Update routing-table entries for only, at,, before break Node Node Node (,,) (,,) (,,) Suppose after the algorithm stabilizes, link (,) breaks. Recompute the minimum cost from each node to the destination node (node ). Update packets bounce back and fourth between and / until the minimum cost is (or very large, in practice). t that point the algorithm realizes that node is unreachable. updates for only Update Node Node Node count to infinity problem!!! solution: stop when cost = 6 (, ) (, ) (, ) (, ) (, ) (, 7) (, ) (, ) (, ) (, ) (, 6) (, 6) (, ) (, ) (, ) (, ) (, 7)
istance-vector Routing: istributed - (cont.) xample [ lgorithm reaction to link failure ] Suppose that after the algorithm stabilizes for the network from the previous example, the link connecting node and node breaks. ompute the minimum cost from each node to destination node (), assuming that each node immediately recomputes its cost after detecting changes and broadcasts its routing updates to its neighbours. Update : s soon as node detects that link (,) breaks, recomputes the minimum cost to through one of its neighbours. The calculation indicates that the new shortest path is through node at cost. Node sends the new routing update to its neighbours, and. (NOT: at this point does not realize that the shortest path that node advertised happens to go through, so a loop has been created.)
istance-vector Routing: istributed - (cont.) Update : Node finds its shortest path is still through, but the cost has increased to 7. Node finds its shortest path is through with a cost of. Node transmits its routing update to nodes,, and, and node transmits its routing update to nodes,,, and. Update : Node finds its shortest path is still through. Node finds its shortest path is still through but the cost has increased to 6. Node finds its shortest path is still through but the cost has increased to 7. Nodes and find their shortest paths have not changed. Node transmits its update to,, and, while transmits its update to and. Update : Node finds its shortest path is through either or with a cost of 9. Suppose that chooses node. Nodes and do not change their shortest paths. Update : None of the nodes finds a new shorter path. The algorithm has converged. entries for only Update break Node (, ) (, ) (7, ) (7, ) (9, ) (9, ) Node (, ) (, ) (, ) (6, ) (6, ) (6, ) Node (, ) (, ) (7, ) (7, ) (7, ) Node (, ) (, ) (, ) (, ) (, ) (, ) Node (, ) (, ) (, ) (, ) (, ) (, )
istance-vector Routing: istributed - (cont.) 6 ount to Infinity Problem slow convergence to a change in topology could be partially avoided using split horizon and split horizon with poisoned reverse Split Horizon minimum cost to a given destination should NOT be sent to a neighbour if neighbour is next node along the shortest path xample [ split horizon ] should not advertise any route to for which is the next hop. Split Horizon works by suppressing information!!!
istance-vector Routing: istributed - (cont.) 7 Split Horizon with a node sends the minimum cost to all its neighbours; Poison Reverse but, the minimum cost to a given destination is set to infinity (=6, in practice) if the neighbours is the next node along the shortest path if two routers have routes pointing at each other, advertising reverse routes with a metric of =6 breaks the loop immediately xample [ poisoned reverse ]
Routing lgorithms omparison (cont.) 8 Link State vs. istance Vector size of (update) routing info communication overhead convergence speed space requirements computational complexity per one destination computational robustness security / fault tolerance Link State small, contains only neighbours link costs flood to all nodes overhead O(N*), where N = # of nodes, = # of edges do NOT need to recalculate LSP s before forwarding faster maintains entire topology in a link database O(N*K) if each of N routers has K neighbours O(N*(N-)/)=O(N ) each router computes paths on its own no error propagation false/corrupt LSPs can be flooded to all routers istance Vector potentially long distance vectors send distance vectors only to neighbours O(N*K) if each of N routers has K neighbours takes a while to propagate changes to rest of network maintains only neighbours states O(K) distance vectors O(N*K*iameter) routers compute paths collectively errors propagate false/corrupt LSPs can be flooded to all routers