Presentation is loading. Please wait.

Presentation is loading. Please wait.

Adhoc Networks Routing Tutorial - Part II -

Similar presentations


Presentation on theme: "Adhoc Networks Routing Tutorial - Part II -"— Presentation transcript:

1 Adhoc Networks Routing Tutorial - Part II -
Internet Computing KUT ( Youn-Hee Han It is licensed under a Creative Commons Attribution 2.5 License

2 Reactive Routing Protocols
Computer Network

3 Reactive Approach - Principle
On-Demand Re-active, become active only when needed The routes are created when required The source has to discover a route to the destination. The source and intermediate nodes have to maintain a route as long as it is used. Routes have to be repaired in case of topology changes. Normally 3 Phases Route Discovery Route Maintain Route Delete More Scalable than Table Drive (Proactive) Protocols Computer Network

4 Reactive Approach - Principle
Representative Protocols DSR – Dynamic Source Routing AODV – Ad Hoc On-demand Distance Vector Routing TORA – Temporally Ordered Routing Algorithm Computer Network

5 Dynamic Source Routing (DSR)
Full Routes are kept in each data packet Sender of a packet determines the complete sequence of nodes to forward the packet Reaction to topology changes more rapid node caches multiple routes to destination Avoids need to perform Route Discovery each time a route breaks Each host participating in the ad hoc network maintains a route cache in which it caches source routes for destination nodes Computer Network

6 Dynamic Source Routing (DSR)
Route Discovery: allows any host to dynamically discover a route to any other host in the ad hoc network. a host initiating a route discovery broadcasts a route request packet, Route Request (RREQ) each route request packet contains a route record, request ID If a host saw the packet (with the same request ID) before, discards it. Otherwise, the host looks up its route caches to look for a route to destination, If not find, appends its address into the packet, rebroadcast, If finds a route in its route cache, sends a route reply packet, which is sent to the source by route cache, RREQ’s info. or the route discovery. if successful, initiating host receives a route reply packet, Route Reply (RREP) Any node which has a route to the destination replies with a route reply the route is saved in the cache for future use Any route that is seen through a node is cached Computer Network

7 Dynamic Source Routing (DSR)
Route maintenance: A host monitors the correct operation of routes in use A host is able to detect that the network topology has changed such that it can no longer use its route to D because a link along the route no longer works A Route ERROR is sent to the Source All nodes along the path remove that route 예를 들어 S – E – F – J – D 임의의 노드 이동 (if F) E와 J는 Route cache에 저장된 경로중 F가 포함된 경로는 모두 삭제 E와 J는 각각 S와 D에게 Route ERROR를 보냄 S와 D도 Route cache에 저장된 경로중 F가 포함된 경로는 모두 삭제 If receives a Route ERROR, the source uses a cached alternate route to destination or sends out request packets for a new route Computer Network

8 DSR – Route Discovery Y Z S E F B C M L J A G H D K I N
When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery Source node S floods Route Request (RREQ) Each node appends its own address when forwarding RREQ Y Z S E F B C M L J A G H D K I N Represents a node that has received RREQ for D from S Computer Network

9 Broadcast transmission (ACKed)
DSR – Route Discovery Originating a RREQ RREQ Y Source Destination Route Record S D Broadcast transmission (ACKed) Z [S] S E F B C M L J A G H D K I N ACKs: Link-layer ACK or Passive ACKs or App-level software-initiated ACKs Represents transmission of RREQ Represents a node that has received RREQ for D from S Computer Network

10 DSR – Route Discovery Forwarding RREQ Y RREQ Z S [S,E] E F B C M L J A
Source Destination Route Record S D S, E RREQ Z Path Accumulation S [S,E] E F B C M L J A G [S,C] H D K I N Forwarding RREQ A request is forwarded by a node if the node is not destination the node has not seen RREQ with the same Request Id (from the same source) When forwarding RREQ, use a random delay to avoid collision Node H receives packet RREQ from two neighbors B and C Node C and E send RREQ to each other Duplicate RREQ are discarded [X,Y] Represents list of Node ID appended to RREQ Computer Network

11 DSR – Route Discovery Forwarding RREQ Y Z S E F B [S,E,F] C M L J A G
Route cache S – E – F Z S E F B [S,E,F] C M L J A G H D K [S,B,A] [S,C,G] I N [S,C,H] Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once Duplicate RREQ are discarded Computer Network

12 DSR – Route Discovery Forwarding RREQ Y Z S E F [S,E,F,J] B C M L J A
H D [S,C,H,I] K I N [S,C,G,K] Computer Network

13 DSR – Route Reply Destination D on receiving the first RREQ, sends a Route Reply (RREP) RREP includes the route from S to D on which RREQ was received by node D Route Reply is sent by reversing the route in Route Request (RREQ) this requires bi-directional link to ensure this, RREQ should be forwarded only if it received on a link that is known to be bi-directional If IEEE MAC is used to send data, then links have to be bi-directional (since ACK is used) If unidirectional (asymmetric) links are used, then RREP may need a route discovery for S from node D Piggyback RREP on RREQ to S Computer Network

14 DSR – Route Reply RREP delivery Y RREP [S,E,F,J,D] Z S E F B C M L J A
Route cache S – E – F – J – D RREP [S,E,F,J,D] Z S E F B C M L J A G H D K I N RREP control message Computer Network

15 DSR Optimization - Route Caching
Each node caches a new route it learns When node S finds route [S,E,F,J,D] to node D, node S also learns route [S,E,F] to node F When node K receives Route Request [S,C,G] destined for node, node K learns route [K,G,C,S] to node S When node F forwards Route Reply RREP [S,E,F,J,D], node F learns route [F,J,D] to node D When node E forwards Data [S,E,F,J,D] it learns route [E,F,J,D] to node D Other optimisations: Piggybacking on route discoveries data on route requests RREP on Route Discovery from D to S RREP Hop Limit Computer Network

16 DSR - Summary Advantages Disadvantages
Reactive: routes maintained only between nodes who need to communicate Route caching can further reduce route discovery overhead a single route discovery may yield many routes to the destination, due to intermediate nodes replying from local caches Disadvantages Packet header size grows with route length due to source routing Flood of route requests may potentially reach all nodes in the network Care must be taken to avoid collisions between route requests and route reply propagated by neighboring nodes Computer Network

17 DSR - Summary Increased contention if too many route replies come back due to nodes replying using their local cache Route Reply Storm problem Reply storm may be eased by preventing a node from sending RREP if it hears another RREP with a shorter route Route reply storms also prevented by randomising delay time before sending route replies Computer Network

18 DSR – one more example (1,4) (1,3) (1,4,7) (1,2) (1,3,5,6) (1,3,5)
source broadcasts a packet containing address of source and destination source (1,4) 1 4 The destination sends a reply packet to source. 8 (1,3) destination 3 7 (1,4,7) 2 The node discards the packets having been seen (1,2) 6 5 (1,3,5,6) (1,3,5) The route looks up its route caches to look for a route to destination If not find, appends its address into the packet Computer Network

19 AODV AODV: Ad hoc On-demand Distance Vector routing protocol
an IETF Experimental RFC References C. E. Perkins, E. M. Belding-Royer, and S. R. Das, “Ad hoc On-Demand Distance Vector (AODV) Routing,” IETF RFC 3561, July, 2003. C. E. Perkins and E. M. Royer, “Ad hoc On-Demand Distance Vector Routing,” Proceedings 2nd IEEE Workshop on Mobile Computing Systems and Applications, February 1999, pp Computer Network

20 Adhoc On-demand Distance Vector (AODV)
Pure on-demand routing protocol A node does not perform route discovery or maintenance until it needs a route to another node or it offers its services as an intermediate node Nodes that are not on active paths do not maintain routing information and do not participate in routing table exchanges Uses a broadcast route discovery mechanism Uses hop-by-hop routing Routes are based on dynamic table entries maintained at intermediate nodes Similar to Dynamic Source Routing (DSR), but DSR uses source routing Computer Network

21 Adhoc On-demand Distance Vector (AODV)
Designed for MANETs with 10,000 to 100,000 nodes Uses a broadcast route discovery mechanism as in DSR Each node only keeps next-hop information Improves scalability and performance Reduces dissemination of control traffic Eliminates overhead on data traffic From DSR Route discovery Route maintenance From DSDV Hop-by-hop routing Sequence numbers Computer Network

22 AODV – overview Route Table Entry Destination IP Address (KEY)
Destination Sequence Number it is used to determine the freshness of the information contained from the originating node. crucial to avoiding routing loops Valid Destination Sequence Number flag Other state and routing flags valid, invalid, repairable, being repaired Network Interface Hop Count number of hops needed to reach destination Next Hop List of Precursors Neighboring nodes to which a RREP was forwarded. Lifetime (expiration or deletion time of the route) Computer Network

23 AODV – overview Route Table Entry 4 2 5 3 1 6 Node 1 에서의 routing table
DstIP DstSeq State Hop Next Lifetime Precursor 2 3 Valid 1 10 5 7 4 valid 4 2 5 3 1 6 Computer Network

24 AODV – overview Route Table Entry 4 2 5 3 1 6 Node 1 에서의 routing table
DstIP DstSeq State Hop Next Lifetime Precursor 2 3 Valid 1 10 5 7 4 Unvalid 4 2 5 3 1 6 Computer Network

25 AODV – overview Basic Message Set RREQ – Route request
RREP – Route reply RERR – Route error HELLO – For link status monitoring Computer Network

26 AODV – overview RREQ Messages
While communication routes between nodes are valid, AODV does not play any role. A RREQ message is broadcasted when a node needs to discover a route to a destination. As a RREQ propagates through the network, intermediate nodes use it to update their routing tables (in the direction of the source node) Setup Reverse Path to Source Node DSN is set to the value in the originator sequence number field of the RREQ, if it is greater than the stored DSN. The RREQ also contains the most recent sequence number for the destination (DSN). If the source node don’t know it, DSN is zero A valid destination route must have a sequence number at least as great as that contained in the RREQ. Computer Network

27 AODV – overview RREQ Message Format 1 J: Join Flag, R: Repair Flag
G: Gratuitous RREP flag indicates whether a gratuitous RREP should be unicast to the node specified in the Destination IP Address field D: Destination only flag indicates only the destination may respond to this RREQ U: Unknown sequence number indicates the destination sequence number is unknown Hop Count The number of hops from the Originator IP Address to the node handling the request. RREQ ID A sequence number uniquely identifying the particular RREQ when taken in conjunction with the originating node's IP address. Destination Sequence Number The latest sequence number received in the past by the originator for any route towards the destination. Originator Sequence Number The current sequence number to be used in the route entry pointing towards the originator of the route request. 1 Computer Network

28 AODV Route Discovery (1/7)
B A S E F H J D C G I K Z Y M N L Computer Network

29 AODV Route Discovery (2/7)
B A S E F H J D C G I K Z Y M N L Source Destination Hop count S D 1 RREQ 전송 Computer Network

30 AODV Route Discovery (3/7)
B A S E F H J D C G I K Z Y M N L Source Destination Hop count S D 2 Reverse Path Computer Network

31 AODV Route Discovery (4/7)
B A S E F H J D C G I K Z Y M N L Source Destination Hop count S D 3 Computer Network

32 AODV Route Discovery (5/7)
B A S E F H J D C G I K Z Y M N L Source Destination Hop count S D 4 Computer Network

33 AODV Route Discovery (6/7)
Route Table B A S E F H J D C G I K Z Y M N L Destination Next hop Expire time S E 10 Computer Network

34 AODV – overview RREP Messages
When a RREQ reaches a destination node, the destination route is made available by unicasting a RREP back to the source route. A node generates a RREP if: It is itself the destination. It has an active route to the destination. Ex: an intermediate node may also respond with an RREP if it has a “fresh enough” route to the destination. As the RREP propagates back to the source node, intermediate nodes update their routing tables (in the direction of the destination node). Setup Forward Path to Source Node You should point out that the RREQ/RREP mechanism depends on the assumption that links are symmetrical, or bidirectional. Computer Network

35 AODV – overview RREP Message Format 2 R: Repair Flag
A: Acknowledgment required receiver of the RREP is expected to return a RREP-ACK message Prefix Size If nonzero, the 5-bit Prefix Size specifies that the indicated next hop may be used for any nodes with the same routing prefix (as defined by the Prefix Size) as the requested destination Hop Count The number of hops from the RREP generator to the Destination IP Address. Destination Sequence Number The destination sequence number associated to the route. Lifetime The time in milliseconds for which nodes receiving the RREP consider the route to be valid. Destination IP Address The IP address of the destination for which a route is supplied. Originator IP Address The IP address of the node which originated the RREQ for which the route is supplied. 2 Computer Network

36 AODV Route Discovery (7/7)
Route Table RREP 전송 Forward Path Y Destination Next hop Expire time S E 9 D J 10 Z S E F B C M L J A G H D K I N Computer Network

37 AODV – overview RERR Messages RERR Message is broadcasted when:
This message is broadcast for broken links Generated directly by a node or passed on when received from another node RERR Message is broadcasted when: A node detects that a link with adjacent neighbor is broken (destination no longer reachable). If it gets a data packet destined to a node for which it does not have an active route and is not repairing. If it receives a RERR from a neighbor for one or more active routes. Computer Network

38 AODV – overview RERR Message Format N: No delete flag 3 DestCount
set when a node has performed a local repair of a link, and upstream nodes should not delete the route. DestCount The number of unreachable destinations included in the message; MUST be at least 1. Unreachable Destination IP Address The IP address of the destination that has become unreachable due to a link break. Unreachable Destination Sequence Number The sequence number in the route table entry for the destination listed in the previous Unreachable Destination IP Address field. RREP-ACK Message Format 3 4 Computer Network

39 AODV – overview Hello Messages
HELLO messages are used to determine local connectivity HELLO Message = RREP with TTL = 1 If a node does not receive any packets (HELLO messages or otherwise) from a neighbor for more than ALLOWED_HELLO_LOSS * HELLO_INTERVAL, the node will assume that the link to this neighbor is currently lost. A node should use HELLO messages only if it is part of an active route. Computer Network

40 AODV – overview Basic Messaging Routing G A B D F C E Source RREQ RREQ
RREP RREQ B D RREQ RREP RREQ RREQ RREP F Destination C RREQ RREQ Charles, you may not want to include this slide, and leave coverage of the topic to whomever is covering either message types (Visal) or route discovery (Fahd?). My intention was just to introduce the basic message flow, and not get into details. In the example shown, the basic flow is clear, but some explanation is required to show how nodes B and F handle duplicates of the RREQ, i.e., how do they decide to throw away the RREQs from C, E and G? I think the Hop Count field in the message is the key, but describing this starts to encroach on later parts of the presentation. E Computer Network

41 AODV – overview Why Sequence Numbers in AODV A B C D E A B C D E
To avoid using old/broken routes To determine which route is newer To prevent formation of loops Assume that A does not know about failure of link C-D because RERR sent by C is lost Now C performs a route discovery for D. Node A receives the RREQ (say, via path C-E-A) Node A will reply since A knows a route to D via node B Results in a loop (for instance, C-E-A-B-C ) A B C D E A B C D E Computer Network

42 AODV – overview destination sequence number (DSN) used as timestamps.
DSN is updated whenever a node receives new (i.e., not stale) information about the sequence number from RREQ, RREP, or RERR messages Source sequence number in RREQ indicates “freshness” of reverse route to the source Destination sequence number in RREQ indicates the latest sequence number received in the past by the originator towards the destination. Destination sequence number in RREP or RERR indicates “freshness” of route to the destination Computer Network

43 AODV – overview Sequence Numbers Rule
A sender node MUST increment it before it sends a RREQ An intermediate node in RREQ path determines whether Received DSN < Stored DSN. If it is, the RREQ message MUST be discarded and the sender is notified of the new information. Ensures RREQs not forwarded unnecessarily Before a node sends a RREP in response to a RREQ, it MUST update its own sequence number to MAX {its current stored DSN : DSN in the RREQ packet}. Computer Network

44 AODV – overview When does an intermediate node sends RREP to the RREQ originator? “an intermediate node has a more fresh information” It means Seq(A) < Seq(B) Intermediate node (B) either has a newer route to endpoint than the start node (A) If a node receives a RREQ, when does a node updates its routing table entry? 1. Received Number > Stored Number 2. Received Number == Stored Number, and (The number in hop count field of the message + 1) < Stored hop count number Computer Network

45 AODV – Flowchart Generate RREQ packet
Control Messages sent of Port 654 UDP When need to send data. Have a route to destination? No Generate RREQ packet (Hop Count = 0) Yes Broadcast RREQ packet NET_TRAVERSAL_TIME Timer set Retry ++ Start to transmit data packet NET_TRAVERSAL_TIME= 2 * NET_TRAVERSAL_TIME Yes RREP received within NET_TRAVERSAL_TIME? Retry < RREQ_RETRIES? No Yes No Packet Sending is not allowed End

46 AODV – Flowchart Receive RREQ packet Receive RREQ packet
Already Process RREQ ID? Yes No Discard it Set the Reverse path Destination ? No Fresh Route Information to destination ? No Yes Yes Rebroadcast RREQ packet Reply RREP packet Computer Network

47 AODV – Flowchart Receive RREP packet Receive RREP packet
Set Forward path Source node? No Update next hop information Yes Start to transmit data packet Unicast RREP via Reverse path Computer Network

48 AODV – Flowchart Detecting broken link Detecting Broken Link
Generate RERR packet Precursor count = 1? No Yes Multiple unicast RERR Unicast RERR via Reverse path Computer Network

49 Timeouts A routing table entry maintaining a reverse path is purged after a timeout interval timeout should be long enough to allow RREP to come back A routing table entry maintaining a forward path is purged if not used for a active_route_timeout interval if no is data being sent using a particular routing table entry, that entry will be deleted from the routing table (even if the route may actually still be valid) Computer Network

50 Link Failure Detection
Hello messages Absence of hello message is used as an indication of link failure When it is sent? Every HELLO_INTERVAL, a node checks whether it has sent a broadcast (a RREQ or an layer 2 message) within the HELLO_INTERVAL If it has not, it broadcasts HELLO Alternatively, failure to receive several MAC-level acknowledgement may be used as an indication of link failure A neighbor of node X is still considered active for if the neighbor sent a packet within active_route_timeout interval which was forwarded using an entry in the routing table Computer Network

51 AODV Route Maintenance
Link failures are propagated by means of RERR messages When node X detects a link failure to its Neighbor Y, which is a node on the path node S to node D, it generates a RERR message Node X increments the destination sequence number for D cached at node X The incremented sequence number N is included in the RERR When node S receives the RERR, it initiates a new route discovery for D using destination sequence number at least as large as N When node D receives the route request with destination sequence number N, node D will set its sequence number to N, unless it is already larger than N Computer Network

52 AODV Route Maintenance
Route changes can be detected by… Failure of periodic HELLO packets Failure or disconnect indication from the link level Failure of transmission of a packet to the next hop (can detect by listening for the retransmission if it is not the final destination) The upstream (toward the source) node detecting a failure propagates an route error (RERR) packet with a new destination sequence number and a hop count of infinity (unreachable) The source (or another node on the path) can rebuild a path by sending a RREQ packet Computer Network

53 AODV Route Maintenance
Route reconstruction ( = route recovery) If a route is broken due to the movement of a node 3’ 3’ 3 1 2 1 2 R R s 4 s 4 Node 3 moves to mew location 3’ Node 2 notices loss of link, sends link failure (RERR) to node 1 Node 1 forward link failure (RERR) to source Source reinitiate rote discovery, finds new route through nodes Computer Network

54 Route Maintenance 경로 손실시 자신의 Precursor 노드에게 알린다 S – E – F – J – D S 이동
E부터 D까지 Forward path 유지 모든 Reverse path 손실 F 이동 S부터 E까지 Reverse path, J부터 D까지 Forward path 유지 S부터 F까지 Forward path, F부터 D까지 Reverse path 손실 D 이동 S부터 J까지 Reverse path 유지 모든 Forward path 손실 Computer Network

55 AODV - Route Discovery (1/10)
B D C A 1. Node S needs a route to D in order to send data packets to D Computer Network

56 AODV - Route Discovery (2/10)
B D C A 1. Node S needs a route to D in order to send data packet to D 2. Creates a Route Request (RREQ) Enters D’s IP addr, seq#, S’s IP addr, seq# hopcount (=1) - Destination Sequence Number . The latest sequence number received in the past by the originator for any route towards the destination. - Originator Sequence Number . The current sequence number to be used in the route entry pointing towards the originator of the route request. - Hop Count . The number of hops from the Originator IP Address to the node handling the request. - RREQ ID . A sequence number uniquely identifying the particular RREQ when taken in conjunction with the originating node’s IP address. Computer Network

57 AODV - Route Discovery (3/10)
B RREQ S A C D 2. Creates a Route Request (RREQ) Enters D’s IP addr, seq#, S’s IP addr, seq# hopcnt (=1) 3. Node S broadcasts RREQ to neighbors Computer Network

58 AODV - Route Discovery (4/10)
B RREQ S A C D 4. Node A receives RREQ Makes reverse route entry for S dest = S, nexthop = S, hopcnt = 1 Computer Network

59 AODV - Route Discovery (5/10)
B RREQ S A C D 4. Node A receives RREQ Makes reverse route entry for S dest = S, nexthop = S, hopcnt = 1 It has no route to D, so it rebroadcasts RREQ Computer Network

60 AODV - Route Discovery (6/10)
B RREQ S A C D 5. Node C receives RREQ Makes reverse route entry for S dest = S, nexthop = A, hopcnt = 2 It has a route to D, and the seq# for route for D is >=D’s seq# in RREQ Computer Network

61 AODV - Route Discovery (7/10)
B S A RREP C D 6. Node C sends RREP C creates a Route Reply (RREP) Enters D’s IP addr, seq # S’s IP addr, hopcnt to D (=1) Lifetime Unicasts RREP towards A - Destination Sequence Number . The destination sequence number associated to the route. - Hop Count . The number of hops from the Originator IP Address to the Destination IP Addresses For multicast route requests this indicates the number of hops to the multicast tree member sending the RREP. - Lifetime . The time in milliseconds for which nodes receiving the RREP consider the route to be valid. Computer Network

62 AODV - Route Discovery (8/10)
B RREP S A RREP C D 7. Node A receives RREP Makes forward route entry to D dest = D, nexthop = C, hopnt = 2, Lifetime Unicasts RREP to S Computer Network

63 AODV - Route Discovery (9/10)
B RREP S A C D 8. Node S receives RREP Makes forward route entry to D dest = D, nexthop = A, hopcnt = 3, Lifetime Computer Network

64 AODV - Route Discovery (10/10)
B S A C D 9. Node S sends data packets on route to D Computer Network

65 Route Maintenance (1/5) 1. Link between C and D breaks down
RERR C D 1. Link between C and D breaks down C can perform local repair for the route to D The RERR message is sent whenever a link break causes one or more destinations to become unreachable from some of the node’s neighbors. - N flag . No delete flag . set when a node has performed a local repair of a link, and upstream nodes should not delete the route. - Destcount . the number of unreachable destinations included in the RERR message. . Must be at least 1. - Unreachable Destination IP Address . The IP address of the destination that has became unreachable due to a link break. - Unreachable Destination Sequence Number . The sequence number in the route table entry for the destination listed in the previous Unreachable Destination IP Address field. Computer Network

66 Route Maintenance (2/5) 1. Link between C and D breaks down
RERR C D 1. Link between C and D breaks down C can perform local repair for the route to D 2. Node C invalidates route to D in route table The RERR message is sent whenever a link break causes one or more destinations to become unreachable from some of the node’s neighbors. - N flag . No delete flag . set when a node has performed a local repair of a link, and upstream nodes should not delete the route. - Destcount . the number of unreachable destinations included in the RERR message. . Must be at least 1. - Unreachable Destination IP Address . The IP address of the destination that has became unreachable due to a link break. - Unreachable Destination Sequence Number . The sequence number in the route table entry for the destination listed in the previous Unreachable Destination IP Address field. Computer Network

67 Route Maintenance (3/5) 3. Node C creates Route Error (RERR) message
B S A RERR C D 3. Node C creates Route Error (RERR) message C creates a Route Error (RERR) Enters DestCount (=1), D’s IP addr, seq # “DestCount” field indicates the number of unreachable destinations included in the RERR message. Sends to upstream neighbors in precursor list The RERR message is sent whenever a link break causes one or more destinations to become unreachable from some of the node’s neighbors. - N flag . No delete flag . set when a node has performed a local repair of a link, and upstream nodes should not delete the route. - Destcount . the number of unreachable destinations included in the RERR message. . Must be at least 1. - Unreachable Destination IP Address . The IP address of the destination that has became unreachable due to a link break. - Unreachable Destination Sequence Number . The sequence number in the route table entry for the destination listed in the previous Unreachable Destination IP Address field. Computer Network

68 Route Maintenance (4/5) 4. Node A receives RERR
B RERR S A RERR C D 4. Node A receives RERR Checks whether C is its next hop on route to D Deletes route to D or invalidates the route to D Forwards RERR to S If the hop count of the newly determined route to the destination is greater than the hop count of the previously known route should issue a RERR message for the destination, with the ‘N’ bit set. Computer Network

69 Route Maintenance (5/5) 5. Node S receives RERR
B D C A RERR 5. Node S receives RERR Checks whether A is its next hop on route to D Deletes route to D or invalidates the route to D Rediscovers route if still needed Computer Network

70 AODV Example (1/8) Node 1 needs to send a data packet to Node 7
4 6 1 7 5 3 2 Node 1 needs to send a data packet to Node 7 Assume Node 6 knows a current route to Node 7 Assume that no other route information exists in the network (related to Node 7) Computer Network

71 AODV Example (2/8) Node 1 sends a RREQ packet to its neighbors
4 6 1 7 5 3 2 Node 1 sends a RREQ packet to its neighbors source_addr = 1 dest_addr = 7 broadcast_id = broadcast_id + 1 source_sequence_# = source_sequence_# + 1 dest_sequence_# = last dest_sequence_# for Node 7 Computer Network

72 AODV Example (3/8) 4 6 1 7 5 3 2 Nodes 2 and 4 verify that this is a new RREQ and that the source_sequence_# is not stale with respect to the reverse route to Node 1 Nodes 2 and 4 forward the RREQ Update source_sequence_# for Node 1 in its routing table Increment hop_cnt in the RREQ packet Computer Network

73 AODV Example (4/8) RREQ reaches Node 6, which knows a route to 7
1 7 5 3 2 RREQ reaches Node 6, which knows a route to 7 Node 6 must verify that the destination sequence number is less than or equal to the destination sequence number it has recorded for Node 7 Nodes 3 and 5 will forward the RREQ packet, but the receivers recognize the packets as duplicates Computer Network

74 AODV Example (5/8) 4 6 1 7 5 3 2 Node 6 knows a route to Node 7 and sends an RREP to Node 4 source_addr = 1 dest_addr = 7 dest_sequence_# = maximum(own sequence number, dest_sequence_# in RREQ) hop_cnt = 1 Computer Network

75 AODV Example (6/8) 4 6 1 7 5 3 2 Node 4 verifies that this is a new route reply (the case here) or one that has a lower hop count and, if so, propagates the RREP packet to Node 1 Increments hop_cnt in the RREP packet Computer Network

76 AODV Example (7/8) 4 Dest Next Hops 7 4 3 6 1 7 5 3 2 Node 1 now has a route to Node 7 in three hops and can use it immediately to send data packets Note that the first data packet that prompted path discovery has been delayed until the first RREP was returned Computer Network

77 AODV Example (8/8) Assume that Node 7 moves and link 6-7 breaks
4 6 1 7 5 3 2 7 Assume that Node 7 moves and link 6-7 breaks Node 6 issues an RERR packet indicating the broken path The RERR propagates back to Node 1 Node 1 can discover a new route Computer Network

78 AODV vs. DSR Common Processes of AODV and DSR Maintain Sequence Number
Routing Table operations Create or update route table entry Route Discovery Route message creation (RREQ, RREP) Route message processing at each node Check route table for destination address route entry Reverse route entry for originator and precursors Route Management Active Link Monitoring link-layer feedback, Hello messages, neighbor discovery, route timeouts Updating route lifetimes Route Error Generation Route Error Processing Computer Network

79 AODV vs. DSR AODV is not source routed DSR is source routed
Nodes only choose the next hop May lead to lower memory requirements, faster more compressed routing tables. DSR is source routed Nodes choose full route through network when sending a packet Computer Network

80 AODV vs. DSR Different Processes of AODV and DSR
Path accumulation DSR=> Source route accumulated in Request packet AODV=> Route table entry does not contain list of precursors Routing tables for AODV, after a route discovery process Routing tables for DSR, after a route discovery process A B C D Destination Next A B C D Destination path B-A C-B-A B-C C-B B-C-D C-D Computer Network

81 AODV vs. DSR Congestion Handling
One method that AODV handle congestion is: If the source node receives no RREP from the destination, it may broadcast another RREQ, up to a maximum of RREQ_RETRIES. For each additional attempt that a source node tried to broadcast RREQ, the waiting time for the RREP is multiplied by 2. DSR is not capable of handling congestion. Explain why DSR can’t handle congestion Computer Network

82 AODV – one more example source destination
The source broadcasts a route packet The neighbors in turn broadcast the packet till it reaches the destination source RREQ destination RREP Reply packet follows the reverse path of route request packet recorded in broadcast packet The node discards the packets having been seen Computer Network

83 Various Ad Hoc Routing Projects
DSR (Dave Johnson, CMU) WINGs (JJ Garcia/UCSC) ROAM (JJ Garcia/UCSC) WAMIS (Gerla/UCLA) ODMRP (Gerla et.al/UCLA) TRAVLR (Kleinrock/UCLA) Tora/IMEP (Park, Corson/UMD) Link Quality (Rohit Dube/UMD) LAR (Texas A&M) TBRPF (SRI) OLSR (Inria: Clausen./Jacquet) DSDV (Dest. Sequence #'s) AODV (refinement of DSDV) AOMDV (Multipath – Das/Marina) Hierarchical (Akyildiz/Georgia Tech) GPSR (Karp/Harvard) CBRP (Singapore) Terminodes (EPFL) MMWN (Steenstrup/BBN) ABR (C.K. Toh) STAR (JJ Garcia/UCSC) ZRP (Zygmunt Haas/Cornell) Fisheye/Hierarchical (UCLA) CEDAR (Urbana-Champaign) Computer Network


Download ppt "Adhoc Networks Routing Tutorial - Part II -"

Similar presentations


Ads by Google