460 likes | 590 Views
Network Layer Routing Issues. Routing Protocols. Link-state Routing Protocols Routes are constructed based on the selection of the communication links Routes are optimized based on the link characteristics Shortest Path Problem Spanning Tree (Steiner Tree) Node-state Routing Protocols
E N D
Routing Protocols • Link-state Routing Protocols • Routes are constructed based on the selection of the communication links • Routes are optimized based on the link characteristics • Shortest Path Problem • Spanning Tree (Steiner Tree) • Node-state Routing Protocols • Routes are constructed based on the selection of the nodes • Routes are optimized based on the node characteristics • Connected dominating set (CDS)
Routing Protocols • Link-state Routing Protocols • Relative mobility • Link duration • Link Bandwidth, … • Node-state Routing Protocols • Node Failure Rate • Node Mobility • Node Energy • Nodal capacity
Dynamic Source Routing (DSR) • Source node initiates a Route Discovery Process, when no routeis found to destination • Floodingthe Route Request (RREQ) message • Each receiving node appends its ID when forwarding RREQ
Route Discovery in DSR Y S E Z F B C M L J A G H D K I N Represents a node that has received RREQ for D from S
Route Discovery in DSR Broadcast transmission Y [S] S E Z F B C M L J A G H D K I N Represents transmission of RREQ [X,Y]Representslist of IDs appended to RREQ
Route Discovery in DSR Y S [S,E] Z E F B C M L J A G [S,C] H D K I N
Route Discovery in DSR Y S E Z F [S,E,F] B C M L J A G H D K [S,C,G] I N • Node C receives RREQ from G and H, but does not forward • it again, because node C hasalreadyforwardedRREQonce
Route Discovery in DSR Y S Z E F [S,E,F,J] B C M L J A G H D K I N [S,C,G,K]
Route Discovery in DSR Y Z S E [S,E,F,J,M] F B C M L J A G H D K I N
Route Discovery in DSR • Destination sends aRoute Reply (RREP) message upon receiving the firstRREQ • Received RREQincludes the routefrom Source to Destination
Route Reply in DSR RREP is sent back through the Reversed Routeenclosed in RREQ S RREP [S,E,F,J,D] E F B C M L J A G H D K I N Represents RREP control message
Route Reply in DSR • RREPcan be sent by Reversed Route only if links areBi-Directional • For Unidirectional links, RREP may need a separate route discovery from Destination to Source • Unless Destination knows a route to source • RREPis piggybacked on the RREQ from Destination to Source.
Route Reply in DSR In MAC Layer IEEE 802.11 • Ackis used to acknowledge the receipt • Communication Links are Bi-Directional
Dynamic Source Routing (DSR) • Source caches the route included in RREP • Each forwarding packet has the route in its packet header • Intermediate nodes use therouteto determine to whomthe packet should be sent S E DATA [S,E,F,J,D] F B C M L J A G H D K I N
Data Delivery in DSR Y DATA [S,E,F,J,D] S Z E F B C M L J A G H D K I N Packet header size grows with route length
Route Caching • Each node cachesall the new sub-routes along the discovered route • When node Sdiscovers route [S,E,F,J,D] to node D, it also can use route • [S,E,F] to node F • [S,E,F, J] to node J • etc. S E DATA [S,E,F,J,D] F C M L J G D K
Route Caching Route Caching by RREQ Message • Each node receiving RREQ discovers a route to all Upstreamnodes • Node K receives RREQ [S,C,G], it discovers • Route [K,G,C] to node C • Route [K,G,C,S] to node S S E F C G K [S,C,G]
Route Caching Route Caching by RREP Message • RREP includes the whole route • Each node receiving RREP, can discover a route to all Downstream & Upstream nodes • Node Fforwards RREP [S,E,F,J,D], it discovers route • [F, E, S] to node S (Up) • [F,J,D] to node D (Down) S RREP [S,E,F,J,D] E F C J G D K
Route Caching • A node may also learn a route when it OverhearsData packets (DSR packet includes the route) Link Breakage • If source node finds a link breakage • It uses another route from its local cache, if any. • Otherwise • It must initiate a newroute discovery process
Route Caching • Each node receiving a RREQ for some destination can send a RREP if it knows a route to it • Route caching • Speeds up route discovery process • Reduces the rate of RREQ message
Use of Route CachingSpeeding up Route Discovery Process • Example: • Node Z sends a RREQ for finding a route to C • Node K has a route (e.g., [K,G,C]) to C in its local cache • K sends back a RREP [Z,K,G,C] to Z S E F C [G,C,S] J G [C,S] D K [K,G,C,S] RREP RREQ Z
Route Error (RERR) • Link Failure Detection • Link Failure Indications • Absence of Hello message • Failure to receive MAC-level Acknowledgement • Hellomessage • Neighbors periodically exchange Hello message to find active neighbors
Route Error (RERR) • Each intermediate node sends a RERRalong the pathupon detection of a link breakage • Nodes hearing RERRupdate their route cacheby removing disconnected link • Example: • J finds breakage of link [J,D] • It sends a RERR to S along route [J-F-E-S] • [J,D] is removed from all caches S E F RERR [J-D] C J G D K
Route Caching • Stale routes significantly reduce the routing performance • Route Stale (invalidity) origins: • Node mobility • Node failure • Low battery power
Advantages • Route maintenance only between Communicating Nodes • Reduces routing overhead • Reducing route discovery Time & Overheadbyroute Caching • Replying a singleRREQ by many nodes (local caches)yields many routes • Best route selection
Disadvantages • Large Packet Header Size for lengthy routes • Floodingof RREQ imposes heavy burden to the network • Collision Avoidance mechanism is required for propagation of RREQ • RREPStorm problem • Replying the RREQ from local cache of many neighbors (stale routes)
Ad Hoc On-Demand Distance Vector Routing (AODV) • RREQmessage is flooded similar to DSR • Each node makes a Reverse Path toward the source by the first received RREQ (shortest path) • Destination replies the firstRREQ message • RREPtravels along the Reverse Path from destination to source
Ad Hoc On-Demand Distance Vector Routing (AODV) • AODVborrows the Sequence Number (SN) from DSDV • A SN is assigned to each Route (Destination) at each node • Each node increases its SN upon a local change • Larger SN means a Fresherroute
RREQ inAODV Y S Z E F B C M L J A G H D K I N
RREQ in AODV Broadcast transmission Y S Z E F B C M L J A G H D K I N Represents transmission of RREQ
RREQ in AODV Y S Z E F B C M L J A G H D K I N Represents links on Reverse Path
Reverse Path Setup in AODV Y S Z E F B C M L J A G H D K I N
Reverse Path Setup in AODV Y S Z E F B C M L J A G H D K I N
Reverse Path Setup in AODV Y S Z E F B C M L J A G H D K I N
RREP in AODV Y S Z E F B C M L J A G H D K I N Represents links on path taken by RREP
Forward Path Setup in AODV Forward links are setup when RREP travels along the Reverse Path Represents a link on the forward path S E F C J G D K
RREP in AODV • An intermediate nodesends aRREP, if it knows amore recent path having higher destination SN • SN orders routes in time • Among the received RREP, source selects the route having higher SN
RREP in AODV • Lower rate of RREPin AODV than DSR • New RREQfor a destination is assigned a Higher destination SN • One node is allowed to send RREP, if it has a route with Higher SN
Sequence Number in AODV • Avoid using Old/Brokenroutes • Using Newest Routes • Avoiding loop formation • C detects a link failure [C-D] • If RERR is not received at A • C sends a RREQ for destination D • Areceives the RREQ (say, via path [C-E-A]) • Aknows a path to D via B • RREP of A causes a loop [C-E-A-B-C] A B C D E
Sequence Number in AODV • C sends a RREQ to destination Dwith a newer SN • A has a stale route to D with lower SN • A is not allowed to send RREP • No loop occurs A B C E
Ad Hoc On-Demand Distance Vector Routing (AODV) • DSRincludes routes in Packet Header • AODV includes only destination in Packet Header • AODV has smaller packet size • AODV maintains routing tables at nodes • AODV maintains one next-hop per destination at each node • AODV uses SN to select the freshest routes
Timeouts • Each Route is removed from the routing table, if it is not used for atimeoutinterval • A Reverse Pathis removed after a timeout interval • Timeout should be longer enough to allow RREP to come back