/
Routing Distance Vector (DV) Routing Routing Distance Vector (DV) Routing

Routing Distance Vector (DV) Routing - PowerPoint Presentation

tatyana-admore
tatyana-admore . @tatyana-admore
Follow
352 views
Uploaded On 2019-11-22

Routing Distance Vector (DV) Routing - PPT Presentation

Routing Distance Vector DV Routing Sets up minimum distance routes to all nodes in a network Routing tables created at each node with following fields The core algorithm is based on Bellman Ford shortest path algorithm ID: 766920

cost destination routing hop destination cost hop routing route etx nodes updates table update packets count advertisement source sequence

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Routing Distance Vector (DV) Routing" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Routing

Distance Vector (DV) Routing Sets up minimum distance routes to all nodes in a network Routing tables created at each node with following fields: The core algorithm is based on ‘Bellman Ford shortest path algorithm’ Destination Next hop Cost X V 14 Q B 11 .. .. ..

DV example: Initial State A B C D E 1 2 9 3 5 4 Destination Next hop Cost B B 1 C C 5 Destination Next hop Cost A A 1 C C 3 EE9 Destination Next hop Cost C C 4 E E 2

DV example: Final State A B C D E 1 2 9 3 5 4 Destination Next hop Cost B B 1 C C 5 D ? ? E ? ? Destination Next hop Cost AA1CC3 EE9D ? ?

DV steps Each node advertises its routing table to neighbors(only destination & cost) Each neighbor updates its table based on following equation In the above equation,  

DV example for node C A B C D E 1 2 9 3 5 4 Destination Next hop Cost B B 1 C C 5 Destination Next hop Cost A A 1 C C 3 EE9 Destination Next hop Cost C C 1 E E 1

DV example for node C A B C D E 1 2 9 3 5 4 Destination Next hop Cost B B 1 C C 5 Destination Next hop Cost A A 1 C C 3 EE9 Destination Next hop Cost C C 4 E E 2 Destination Cost A 1 C 3 E 9

Destination Cost A 1 C 3 E 9 C’s routing table Advertisement from B to C Destination Next hop Cost A A 5B B3D D4 A B C D E 1 2 9 3 5 4

Destination Cost A 1 C 3 E 9 C’s routing table Advertisement from B to C Destination Next hop Cost A A 5 BB3 DD4 E- Destination Next hop CostAA 5BB3 DD4 E-     New route identified A B C D E 1 2 9 3 5 4

Destination Next hop Cost A B 4 B B 3 D D4 EB12 C’s routing table New route added

Destination Cost A 1 C 3 E 9 C’s routing table Advertisement from B to C     Route updated A B C D E 1 2 9 3 5 4 Destination Next hop Cost A A 5 B B 3 D D 4 E B 12

Destination Next hop Cost A B 4 B B 3 D D4 EB12 C’s routing table Route updated

DV example for node C A B C D E 1 2 9 3 5 4 Destination Next hop Cost B B 1 C C 5 Destination Next hop Cost A A 1 C C 3 EE9 Destination Next hop Cost C C 4 E E 2 Destination Cost B 1 C 5

Destination Cost B 1 C 5 C’s routing table Advertisement from A to C Destination Next hop Cost A A 5 B B 3DD 4EB 12     Not updated C’s routing table unchanged A B C D E 1 2 9 3 5 4

DV example for node C A B C D E 1 2 9 3 5 4 Destination Next hop Cost B B 1 C C 5 Destination Next hop Cost A A 1 C C 3 EE9 Destination Next hop Cost C C 4 E E 2 Destination Cost C 4 E 2

Destination Cost C 4 E 2 Destination Next hop Cost A A 5 B B3 DD4 EB12     C’s routing table Advertisement from D to C   Route Updated A B C D E 1 2 9 3 5 4

Destination Next hop Cost A A 5 B B 3 D D4 ED6 C’s routing table Updated Next-hop and Cost

DV properties After one round of message exchange with neighbors, new routes to 2 hop nodes discovered After two rounds, routes to 3 hop neighbors discovered Converges after a few rounds if topology does not change

DV properties Completely distributed algorithm – No node has global picture, yet learns shortest paths to all nodes in the network

Changes in Topology Nodes send updates. Two types Triggered update: Topology change, link failure triggers an update to be sent to neighbors Periodic update: sent even when no change happens in routing table

Periodic updates better than triggered updates A B C Destination Next hop Cost B B 1 C C 1 Destination Next hop Cost A A 1 C C 1 Destination Next hop Cost A A 1 BB1

Periodic updates better than triggered updates A B C Destination Next hop Cost B B 1 C C 1 Destination Next hop Cost A A 1 C C 1 Destination Next hop Cost A A 1BB 1

Periodic updates better than triggered updates A B C Destination Next hop Cost B B 1 Destination Next hop Cost A A 1 C C 1 Destination Next hop Cost A A 1

Periodic updates better than triggered updates A B C Destination Next hop Cost B B 1 Destination Next hop Cost A A 1 C C 1 Destination Next hop Cost A A 1 Destination Cost B 1 triggered update (A to B) B ignores

If B does not send a periodic update, such as below, nodes A and C cannot learn about new paths to each other. B send this update eve though it does not see any change in its table A B C Destination Next hop Cost B B 1 Destination Next hop Cost A A 1 C C 1 Destination Next hop Cost A A 1 Destination Cost A 1 C1triggered update (A to B)B ignores Destination Cost A 1 C 1

A B C Destination Next hop Cost B B 1 C B 2 Destination Next hop Cost A A 1 C C 1 Destination Next hop Cost A A 1 A B 2periodic update (B to A) B ignoresNew paths learntperiodic update (B to C)

DV  Count to Infinity problem A B C E D N C A A 1 C C 1 E .. .. D N C A B 2 B B 1 E.. .. D - DestinationN - Next HopC - Cost

DV  Count to Infinity problem A B C D N C C C 1 E .. .. D N C A B 2 B B 1 E .. .. E B removes A C does not remove A, it doesn’t know A is down C can corrupt other nodes with stale updates about A

DV  Count to Infinity problem A B C D N C C C 1 E .. .. D N C A B 2 B B 1 E .. .. D C A 2B1E..C sends an advertisement to B E

DV  Count to Infinity problem A B C D N C C C 1 E .. .. A C 3 D N C A B 2 B B 1 E .... False route to A learnt with C as next hop DCA2 B1E..E

DV  Count to Infinity problem A B C D N C C C 1 E .. .. A C 3 D N C A B 2 B B 1 E .... D CC1E..A3 B sends an advertisement to C E

DV  Count to Infinity problem A B C D N C C C 1 E .. .. A C 3 D N C A B 4 B B 1 E .... D CC1E..A3 C updates route to A with a higher costThis process continues until cost to non-existent destination reaches infinityMessages sent during this time to A will be wasteful E

Avoiding Count to Infinity Problem Use sequence numbers, update routes only if the message has a new sequence number

DSDV (Destination sequenced DV) Adds sequence numbers to routing table entries Initial sequence number created at the destination

A B C D E D N C S A A 1 2 C C 1 4 E .. .. .. D N C S A B 2 2 BB16E......DSDV (Destination sequenced DV) D - DestinationN - Next HopC – CostS – Sequence number

A B C D E D N C S A A 3 C C 1 4 E .. .. .. D N C S A A 3 C C 14E.... ..DNCSAB22BB1 6E.... .. DSDV (Destination sequenced DV) B updates A’s cost to infinity and increases sequence number

A B C D E D C S A 2 2 B 1 6 E .. D N C S A A 3 C C 1 4 E .. .. ..DNCSA A3 C C 1 4 E .. .. .. C’s update on A ignored by B because B’s data has a higher sequence number D N C S A B 2 2 B B 1 6 E .. .. .. DSDV (Destination sequenced DV) C sends an advertisement to B

A B C D E D C S A 3 C 1 4 E .. D C S A 3 C 1 4 E .. D N C S A - 3CC 1 4 E .. .. .. D N C S A - 3 C C 1 4 E .. .. .. DSDV (Destination sequenced DV) B sends an advertisement to C D N C S A B 2 2 B B 1 6 E .. .. ..

A B C D E D N C S A - 3 C C 1 4 E .. .. .. D N C S A - 3 C C 1 4E......B’s update on route to A overrides C’s table since it has a higher sequence numberDSDV (Destination sequenced DV) D N C S A - 3 B B 1 6 E .. .. .. D N C S A - 3 B B 1 6 E .. .. .. D C S A 3 C 1 4 E .. D C S A 3 C 1 4 E .. B sends an advertisement to C The entire network learns about latest node failures/updates

Limitations of DV/DSDV Too much message flooding might be a bandwidth overhead Convergence can be slow for mobile networks

Dynamic Source Routing (DSR) On demand routing  No periodic updates When a source wants to route packets, routes generatedConsists of two partsRoute discoveryRoute maintenance

A S C B J G F E I H D

Source sends a route request RREQ (Resource request packet is generated) includes source, destination, intermediate nodes (initially empty) Seq. num Source Intermediate Nodes Destination

A S C B J G F E I H D 2 S D Seq.no, source, int nodes, dest

A S C B J G F E I H D 2 S D 2 S D 2 S D

A S C B J G F E I H D 2 S D B received 2 S B D B re-broadcasts after adding itself 2 S D Intermediate nodes add themselves to the intermediate nodes, and rebroadcast the RREQ

A S C B J G F E I H D 2 S B D 2 S B D 2 S B D If sequence number was seen before, message is dropped

A S C B J G F E I H D 2 S B D 2 S B D 2 S B D

A S C B J G F E I H D 2 S B D 2 S B D 2 S B D 2 S B,F D

A S C B J G F E I H D 2 S B,F D When the destination receives the RREQ, it generates a Route Reply (RREP) The packet is routed back by following the list of intermediate nodes in the RREQ

A S C B J G F E I H D S->B->F->D RREP

A S C B J G F E I H D S->B->F->D

A S C B J G F E I H D S->B->F->D

A S C B J G F E I H D S->B->F->D Now source knows the route It appends route with the data

A S C B J G F E I H D Data S->B->F->D

A S C B J G F E I H D Data S->B->F->D

A S C B J G F E I H D Data S->B->F->D

A S C B J G F E I H D Data S->B->F->D

DSR optimizations A S C B J G F E I H D F->D 2 S B,F D Intermediate nodes can generate RREP if they have the route in their cache

A S C B J G F E I H D S->B->F->D

DSR optimizations RREP packets are cached New route generation is not needed if cache has an unexpired entry Intermediate nodes cache overhead routes for their own use

Route maintenance RERR (route error) packets broadcasted to indicate broken links

A S C B J G F E I H D F->D S->B>F->D S->C>G-I

A S C B J G F E I H D F->D S->B>F->D S->C>G-I x F->D

A S C B J G F E I H D F->D x F->D S->B>F->D S->C>G-I

A S C B J G F E I H D F->D S->C>G-I x F->D

DSR limitations High overhead for large networks Need to carry route information in each packet

AODV ( Adhoc On-demand distance vector) Best of both worlds of DSR and DSDVLike DSDV it is next hop based routing, full route path not included in packetLike DSR, does not need periodic route maintenance messages

Source sends Route Request (RREQ) RREQ packet format Seq. num Source Destination

A S C B J G F E I H D 2 S D Seq.no, source, dest

A S C B J G F E I H D 2 S D 2 S D 2 S D Backward pointers created towards nodes sending/forwarding RREQ

A S C B J G F E I H D 2 S D

A S C B J G F E I H D 2 S D

A S C B J G F E I H D 2 S D 2 S D 2 S D 0 Generates RREP (route reply) with hop count 0 Sent back along backward pointer Hop Count

A S C B J G F E I H D 2 S D 1 Intermediate nodes receive and update hop-count by 1 (duplicate messages ignored as in DSR) Forward pointers (green arrows) generated pointing to next hop for destination

A S C B J G F E I H D 2 S D 2

A S C B J G F E I H D 2 S D 3 Just follow next hop links (green lines – forward pointers) during actual routing

AODV properties RERR (like DSR) messages keep the network updated in case of failures Sequence numbers prevent count to infinity problem Widely used in WiFi-adhoc networks, ZigBee etc.

How to select link weights Hop-count does not characterize a wireless link accurately Wireless links are lossy. How can we take this into account while assigning link weights A B C D E ? ? ? ? ? ?

Delivery ratio (DR) A B Characterizes fraction of packets delivered through a link DR = 0.5 Half of packets fail If DR = 0.5, on average, we need to transmit two packets to get one successful reception

Delivery ratio (DR) A B Characterizes fraction of packets delivered through a link DR = 0.33 66% of packets fail If DR = 0.33, on average, we need to transmit three packets to get one successful reception

Delivery ratio (DR) A B Characterizes fraction of packets delivered through a link DR = p 100*(1-p)% of packets fail If DR = p, on average, we need to transmit packets to get one successful reception  

Define a new metric called ETX A B D C DR=1 DR =0.5 DR = 0.51 DR = 0.51 ETX = expected number of transmissions on a link for successful reception A B D C ETX=1 ETX = 2 ETX 2   ETX 2  

Minimum ETX routing Cost A-> B->D = (ETX of all links along the path) = 1 + 2 = 3   Cost A-> C->D = (ETX of all links along the path) = 2 + 2 = 4   Minimum ETX route is better. Hence ABD better than ACD A B D C DR=1 DR =0.5 DR = 0.51 DR = 0.51 A B D C ETX=1 ETX = 2 ETX 2   ETX 2   ETX = expected number of transmissions on a link for successful reception

Minimum ETX routing Any classical routing algorithm such as DSDV, DSR, AODV can use ETX as the edge weights for routing.