Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ad Hoc Networks Dirk Grunwald University of Colorado, Boulder.

Similar presentations


Presentation on theme: "Ad Hoc Networks Dirk Grunwald University of Colorado, Boulder."— Presentation transcript:

1 Ad Hoc Networks Dirk Grunwald University of Colorado, Boulder

2 Outline u Review of routing in wired networked l Routing domains & levels l RIP routing Distance Vector Routing Examples of RIP information & management l OSPF routing Link state routing u Routing in ad-hoc wireless networks

3 Gateway Hierarchy Internet Core Autonomous System (AS)

4 Two levels of Routing Protocols Routing Domain EGP IGP Intra- domain routing protocol Exterior routing protocol

5 Routing Protocols u Intra-domain Gateway Protocols l RIP l RIP V2 l OSPF - open shortest path first l IS-IS (similar to OSPF) u Exterior Gateway Protocols l EGP l BGP

6 RIP u Distance vector routing algorithm based on hops that communicates between routers using UDP u On initialization, router determines all available interfaces and sends a ROUTE REQUEST packet out each interface. Special request for “send everything” u On receipt of request, l Either return everything l Or, for each requested destination, return distance to that destination + 1 u On response l Update routing tables

7 RIP V1 Protocol CommandVersionMBZ 32-bit IP address Address FamilyMBZ Metric (value of 1..16) Up to 24 more routes in same format...

8 Metrics R1 R2 N1 N2 N3 N2 is 1 hop N3 is 1 hop N1 is 1 hop N2 is 1 hop Route to N3 via R2 with hop count of 2

9 Problems u Hop count limited to 15 l Can only be used within an AS where maximum network diameter of 15 u It’s based on HOPS, not e.g., latency or bandwidth u No notion of subnet addressing in RIP V1

10 RIP V2 Protocol CommandVersionRouting domain 32-bit IP address Address FamilyRoute tag 32-bit subnet mask 32-bit next-hop IP address Metric (value of 1..16) Up to 24 more routes in same format...

11 RIP V2 u Routing domain is an identifier of the routing daemon l Process ID in UNIX l …So you can run multiple instances of RIP u Route tag carries an autonomous system number for EGP and BGP u Next op address is where packets corresponding to that (sub)network should be sent. A value of zero means send to the system sending RIP info. u Simple authentication scheme with clear-text password

12 Distance Vector Routing u Also called Bellman-Ford or Ford-Fulkerson algorithms u Used by RIP u Each router is responsible for keeping track of and informing its neighbors of its distance to each destination u The router computes its distance to a destination based on its neighbors distance to the destination u Router must know it’s own ID and the cost of its links to each neighbor

13 Distance Vector Routing For Address “D” R 1 2 3 4 5 17 2 35 5 41 Link cost Link number

14 Distance Vector Routing For Address “D” R 1 2 3 4 5 97 62 118 29 81 17 2 35 5 41 Cost from neighbor to destination D

15 Distance Vector Routing For Address “D” R 1 2 3 4 5 97 62 118 29 81 17 2 35 5 41 98 99 97 123 70 Cost for R to get to D via this link Minimum cost route

16 Distance Vector Routing For Address “D” R 1 2 3 4 5 70 17 2 35 5 41 Cost from R to D

17 Problems With Distance Vector u Slow convergence to the lowest cost route u Slow recovery time if there are link failures u Slow recovery leads to routing problems during recovery l Router loops l Count to infinity

18 Count To Infinity (worse case loop) A B C A B 1 2 1 2 A B 2 3 A B 3 4

19 OSPF - Open Shortest Path First u OSPF uses IP directly ( I.e., like ICMP ) u Routes calculated based on Type of Service (TOS) u Each interface is assigned a dimensionless cost, for each TOS u If several equal-cost routes are available, traffic is load-balanced u Subnets are associated with each advertised route u Supports authentication u Uses multicast to distribute information

20 Link State Routing u Used by OSPF and IS-IS u Construct a Link State Packet (LSP) that lists neighbors and costs to get to those neighbors l LSP = (destination, path cost, forwarding direction) u Use Dijkstra’s algorithm to compute global routes as a tree from the current router

21 Dijkstra’s Algorithm u Two sets of paths: PATH and TENT(ative) u LSP = (destination, path cost, forwarding direction) (1) Place (self, 0,0) in path (2) For any (D,C,F) placed in PATH, examine D’s LSP. For each Neighbor of D listed in D’s LSP with a link cost to N of c, see if (N, c, …) is already in TENT or PATH. If not listed, or if c is less than existing cost, add (N, C+c,…) to TENT (3) Terminate if TENT is empty, otherwise find (D,C,F) with minimum C and add that to PATH. Goto (2)

22 Example of Dijkstra’s Algorithm C(0) B(2) G(5) F(2) Cost Destination

23 Example of Dijkstra’s Algorithm C(0) B(2) G(5) F(2) Since B and F have same cost, select one at random. Place “F” in PATH. G(3) E(6) Cost relative to node C

24 Example of Dijkstra’s Algorithm C(0) B(2) G(5) F(2) Better path to G exists G(3) E(6)

25 Example of Dijkstra’s Algorithm C(0) B(2) F(2) G(3) E(6) Add B to Path A(8) E(3)

26 Example of Dijkstra’s Algorithm C(0) B(2) F(2) G(3) E(6) A(8) E(3) Better path to E exists

27 Example of Dijkstra’s Algorithm C(0) B(2) F(2) G(3) A(8) E(3) D(5) Add E to path

28 Original Distribution of LSP’s u Neighbor-to-neighbor protocol for LSP distribution u Each LSP consists of l Identity of router generating the LSP l A sequence number l The time left until the LSP should be discarded l A list of neighbors, and the cost of links to each u LSP is broadcast to all neighbors u LSP’s have a 64 second lifetime - each router must resend each minute u Wrap-around comparison on sequence numbers used

29 Problem in 1991 u A router announced LSP’s with random TTL’s l a < b < c <a u Each router that processed one of these LSP’s over-wrote the one in memory and generated more copies of the bad LSP, since it thought that this LSP was newer & needed to be propagated to neighbors u The TTL field never changed because of the rapid rate of updates

30 Revised method using 32-bit sequences u LSP’s compared only by their sequence numbers - if you get LSP with sequence S & T, and S < T, then T is more recent (no matter what TTL says) u LSP’s are purged when old, based on TTL. Every router decrements TTL u When TTL reaches 0, router refloods the LSP. Given (sequence, TTL) (S,x) & (T,y) then S < T if x = 0, but not otherwise u LSP’s generated much less frequently (~1hr) u Router starts with the lowest sequence number. If the network retains old LSP, it will be flooded back to source, which then knows “current” sequence number to use

31 Now, Ad-Hoc Routing

32 A Simple Ad-Hoc Network A can not communicate directly with C D. Johnson and D. Maltz

33 Applications of Ad Hoc Networks u Useful for forming instant networks, without administration and reduced set-up cost. l Conferences / meetings / lectures – shared notes, whiteboard, file sharing, etc l Emergency Services / Search & Rescue – location, situation information, status & messaging u People may move between an infrastructure network and an adhoc network u May be important for vehicles – cars could form an “adhoc” network while on the move

34 Challenges & Future Research Areas u Multicast u QoS support l “plain” and “adaptive” QoS u Power-aware Routing u Location-Aided Routing u Media Access Control u Security u Service Discovery

35 Taxonomy of Adhoc Routing Algorithms

36 Table Driven Methods u Attempt to maintain consistent, up-to-date routing information from each node to every other node in the network l Perfect for “connectionless” traffic where you may send traffic to any node at any time u Respond to changes by propagating updates throughout the network to maintain a consistent network view.

37 Source Initiated Methods u Routes are only created when desired by the source node l When a node requires a route, it initiates a “route discovery process”. l The route discovery finishes either when a route is discovered or all possible communication paths have been examined. u Once a route is established, is it maintained by some sort of route maintenance protocol

38 Taxonomy of Table Driven Routing Algorithms

39 DSDV – Destination Sequenced Distance Vector Routing u Based on Bellman-Ford routing mechanism u Each node maintains routing table that records all possible destinations and the number of hops to those destinations l Each entry is marked with a sequence number assigned by the destination node. These sequence numbers are used to distinguish “old” vs “new” routes. u Routing tables are periodically transmitted to maintain table consistency l A “full dump” record reports on the entire routing table. Lots of traffic, since each table is probably larger than the network protocol data unit. l Incremental updates provide information since last “full dump”

40 DSDV u A new route broadcasts contain l The address of the destination l The number of hops to reach the destination l The sequence number of the information l Sequence number unique to this broadcast u Route labeled with most recent sequence number is always used u If two event have the same sequence number, the route with the smaller metric (== shorter route) is used u Hosts also keep track of the the settling time of routes, or the weighted average time that routes to a destination will fluctuate before the route with the best metric is received

41 Clusterhead Gateway Switch Routing (CGSR) u Clustered multi-hop routing protocol l Node routes to “cluster head” l Clusterhead routes to other “cluster-head” by gateways l Eventually, clusterhead routes to specific node 1 2 3 4 5 6 7 8 Gateway Cluster Head

42 CGSR u Clusters allow channel & bandwidth allocation l Nodes only speak to cluster heads l Gateways speak to one or more cluster heads u Cluster election algorithm picks cluster head l A “least cluster change” algorithm is used to reduce the election overhead l Re-election only occurs when two cluster heads move within communication range or a node is “lost” by moving out of communication range. u DSDV used as the underlying scheme

43 CGSR Example 1 2 34 5 7 8 9 6

44 CGSR u Each node must keep a “cluster member table” where it stores destination cluster head for each mobile node l Can that really be true? Shouldn’t the cluster head be the only one that needs to maintain this? u Cluster tables are broadcast using DSDV algorithm u Each node also maintains a routing table, which is used to specify the next hop towards the destination u To route, the node looks in the cluster table to determine the nearest cluster head and then uses routing table to determine how to reach that cluster head. l Makes no sense.

45 Wireless Routing Protocol u Each node maintains l Distance Table l Routing Table l Link-Cost Table l Message Retransmission List u Updates are exchanged with neighbor nodes l Destination, distance to destination, predecessor of the destination (next hop) l Messages are sent when a link status changes or after updates from their neighbors u Nodes learn of the existence of their neighbors from the receipt of ACKs

46 Taxonomy of Source Initiated Routing Algorithms

47 Ad-Hoc On Demand Distance Vector (AODV) u Based on DSDV, but builds routes on demand. u If node S has a message for D, but no route, it starts a path discovery process. l Broadcasts / floods a Route Request (RREQ) l Eventually, either the destination (D) or an intermediate node with a “fresh enough” route cache is reached. u Each node maintains a sequence number as well as a broadcast ID l Broadcast ID is incremented for each RREQ l Combination of node address & broadcast ID uniquely identifies a RREQ

48 AODV u The source RREQ also includes the most recent sequence number for the destination l Intermediate nodes can only respond if they have “fresher” information -- prevents replying with stale information u Once the message reaches the destination (or intermediary), a Route Reply (RREP) is sent back along the path by which each node first received a route request l Nodes in that route establish forward routes for the destination u Only supports symmetric links!

49 AODV u If a source node moves, it can re-initiate the route discovery protocol to find a new route u If a node along the route moves, upstream neighbors notice and propogate a “ link failure notification” message to each upstream neighbor. l This is propagated “ until the source node is reached ” l How is this known? Must be imprecise statement u “Hello” messages are used to maintain local connectivity

50 Dynamic Source Routing u The source specifies entire route l Assumes the network is fairly small l But, no periodic routing advertisements u Uses a source route cache u Route discovery protocol uses a route request message containing l Destination address l Source address l Unique ID u Each node receiving a RREQ checks to see if it knows of a route to the destination. If note, it adds its own address to the Route Record and then forwards the packet on out- going links.

51 Dynamic Source Routing u The request is forwarded iff the request has not been seen (hence ID) and if the node address is not in the list u Once the message gets to the destination or reaches a node with an unexpired cached entry, a Route Reply is sent. l If it is the destination, the final route record is placed into the route reply l If it is an intermediate node, it appends the cached route to the route record u The replying node must have a route back to the source l This may require another route discovery l The route reply is piggy-backed on the new route request

52 Route Discovery Protocol D. Johnson and D. Maltz

53 Dynamic Source Routing u Route maintenance accomplished through route error packets l Route error packets are generated at a node when the data link layer encounters a fatal transmission l Causes routes to be removed from route cache u Route maintenance: l active: utilize MAC level ACK l active: utilize transport or application ACKs l passive: free hop-by-hop surveillance using promiscuous receive (A hears B sending to C) l when a problem is detected, alternate route should be discovered u Optimizations: use promiscuous mode to listen to arbitrary routes in use. Replace with shorter routes l But, being in promiscuous mode takes energy

54 Temporally-Ordered Routing Algorithm (TORA) u Uses global synchronize clocks ( e.g. GPS) u Proposed for a highly-dynamic environment u Provides multiple routes for S->D u Nodes maintain routing information about adjacent nodes and the routing algorithm attempts to contain how far any route change actually flows

55 TORA Route Creation u A DAG is created from the nodes l Each node is assigned a “height” (distance from root) using some distributed algorithm not described l Links are assigned a “direction” based on height u The DAG is broken when nodes move 1 2 7 3 5 6 3 4 1 2 7 3 5 6 3 4

56 Associativity Based Routing (ABR) u The goal of ABR is to derive long-lived routes u Based on the degree of association stability l Nodes generate beacons l When beacons are received by neighbors, the beacon count is incremented l Routing decisions favor routes with a larger beacon count

57 ABR Route Discovery u Route discovery uses a broadcast query and reply l All nodes receiving the query append their addresses and their associatively ticks to the neighbors, along with QoS info l Successive nodes remove the information about neighbors of the previous node and replace it with their own neighbor information l When the destination is reached, the RREQ contains the associativity information of the discovered route l The destination may receive multiple RREQ’s and selects the path with the largest associativity l A REPLY is issued that follows that associativity chain. l Nodes along the REPLY path mark the route as valid

58 ABR Route Reconstruction u Route Reconstruction may consist of l Partial route discovery l Invalid route erasure l Valid route updates l New route discovery u Route reconstruction uses localized messages, although a full “Route Delete” message causes a broadcast route deletion

59 Signal Stability Routing (SSR) u Selects routes based on signal strength u Two protocols: dynamic routing protocol and static routing protocol l DRP maintains signal stability table (SST) and routing table (RT) l All transmissions are received by DRP, which updates tables and then hands packet to SRP u SRP processes packets by accepting it if it is the receiver or looking up the destination in the RT for the destination. l If there’s no known route, a route search is started. l During route search, route requests are only passed over a “strong channel” l If no route is found that way, weak channels are searched

60 Multicast u Not all protocols directly support multicast


Download ppt "Ad Hoc Networks Dirk Grunwald University of Colorado, Boulder."

Similar presentations


Ads by Google