1.04k likes | 1.3k Views
Wireless Sensor Networks Routing. Professor Jack Stankovic University of Virginia 2006. Single Hop Networks. Diameter = 1. Destination. Any real applications?. Source. Fixed Deployment. Diameter = 4. Comm. Range. Ad Hoc Deployment Neighbor Discovery. Data Structure. Diameter = ?.
E N D
Wireless Sensor NetworksRouting Professor Jack Stankovic University of Virginia 2006
Single Hop Networks Diameter = 1 Destination Any real applications? Source
Fixed Deployment Diameter = 4 Comm. Range
Ad Hoc DeploymentNeighbor Discovery Data Structure Diameter = ? ID Location 1 x,y 2 a,b 3 c,d 1 3 2
Question • Suppose probability of a packet getting to next hop is 95% • What is the probability of a packet making it across 10 hops? (.95) ~= 60% 10
Most WSN • Multi-hop • Ad hoc deployment • Need “more interesting” routing protocols • Find routes on-demand • Energy issues • Irregular communication range • Interferences • Congestion • …
Outline – 9 Routing Algorithms • GF (SGF; GPSR) • DSR (supports mobility) (MANET) • AODV (supports mobility) (MANET) • Directed Diffusion • SPEED (RT) • RAP (RT) • Critique: SPEED vs. RAP • IGF (supports mobility, stateless)
Other Routing Algorithms(see text) • Perimeter face routing • Trajectory based routing • Cluster head routing • Minimum spanning trees • GEAR • GF plus consider energy • Rumor Routing (total of 15 routing algorithms)
Principles • Decentralized • Aggregate behavior • Minimize state information • Location based (not ID based - usually) • Mobility (possible) • Integration of routing function with “other” functions (e.g., data aggregation) • Specialized patterns (N->1 base station)
Sensor Net Routing • End-to-end • Real-time • Collisions • Congestion • Power • Security • Mobility Last Mile Destination Source Base Station Assumption: Nodes know location (localization)
Last Mile Semantics • At least 1 - Any • At most 1 • All • Unicast – exactly which node by ID
GF always chooses a node that is closest to the destination. Every node knows its location. Geographic Forwarding (GF) s d
GF – Information Required • Node i (maintains routing table) • My location • List of neighbors and their locations • Destination location • Find neighbor closest to destination • How? D S
GF • What if none in the correct direction • GF stops • Does not handle voids • GPSR (goes around voids; can even go in opposite direction for awhile)
Voids and GPSR Left Hand Rule Destination VOID Source
Summary - GF • Destination by geography/location not node ID • Implications • Individual nodes are not important • Location is important • Route to area (all/any nodes in that area) • Many protocols extend basic GF • Example: GPSR, SGF, IGF, SIGF
MANET Routing • Mobile - nodes move • Ad hoc – no established infrastructure or central administration • DSR – dynamicsource routing is a technique where the sender determines the complete sequence of nodes in the route • AODV
Dynamic Source Routing (DSR) • Route discovery (dynamic – on demand) • Route reply • Data delivery • Route maintenance (in case Source, Destination, or router node moves out of range)
MANET: Dynamic Source Routing (DSR) – Route Discovery Y Z S E F B C M L J A G H D K I N Represents a node that has received Route Request Packet (RREQ) for D from S
Route Discovery in DSR Broadcast transmission Y Z [S] S E [S] F B [S] C M L J A G H D K I N Represents transmission of RREQ [X,Y] Represents list of identifiers appended to RREQ
Route Discovery in DSR Y Z S [S,E] E F B [S,B] C M L J [S,B] A G [S,C] H D K I N
Route Discovery in DSR Y Z S E 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 has already forwarded RREQ once
Question • How can a node know not to forward request again? • Detect duplicate requests by keeping a list of • <initiator ID, request ID> for a time period
Route Discovery in DSR Y Z S 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 • Node D does not forward RREQ, because node D • is the intended target of the route discovery
Questions • Flooding • Cost (messages, energy, time) • MANET networks => 20-30 nodes • WSN => 1000s of nodes • WSN also have high density (lots of collisions; more wasted energy) • Optimal Route found • Needed? • Movement rates that can be supported?
Route Reply in DSR Y Z S RREP [S,E,F,J,D] E F B C M L J A G H D K I N Represents Route Reply (RREP) control message
Route Reply • Options for replying (routes need not be bi-directional) • Use reverse path (most common choice) • Assumes symmetry in node-node communication capability • Look in node D cache and see if a route to the sender exists and use that route • Find return route using route-discovery
Data Delivery in DSR Y Z DATA [S,E,F,J,D] S E F B C M L J A G H D K I N Note: Packet header size grows with route length
DSR • Once path set up use it for “awhile” • During this period – no routing overhead • On movement of nodes • Re-establish path • Note: nodes in MANET networks must be willing to act as routers as well as source/destination
DSR - Route Maintenance • No periodic updates from neighbors as found in many routing solutions • Consumes too much energy • Instead • Monitor route and inform sender of any routing problems • Hop-by-hop ack – if a message M is not ACKed after N attempts then the original sender is notified
Variations in Route Maintenance • Use end-to-end ACKS instead • Fix route from point of bad link instead of starting over
Summary - DSR • Designed for MANET networks • Sender determines the complete sequence of nodes (only (dynamically) when needed) • No periodic routing table update messages, but size of message increases as size of network grows (OK for small diameter networks) • Saves power • Adapts (quickly?) to routing changes when hosts move • Required little overhead when hosts do not move • Route lengths are close to optimal • Use same path over and over – nodes will die fast? • Various optimizations have been developed
Ad Hoc On Demand Distance Vector (AODV) • Loop free routes • Repairs broken links • Does not require global periodic routing advertisements • Nodes not in active paths neither maintain any routing information nor exchange periodic routing tables • Nodes discover routes when needed and then routing tables are used • Avoids path length problem of DSR (scales better) • Used for mobile networks
AODV – Route Discovery 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
Route Requests in AODV Y S ->D ? Z S E F B C M L J A G H D K I N Represents transmission of RREQ (hello messages) – only when necessary Keep local routing tables
Route Requests in AODV Y S ->D ? E, C, B Z S E F B C M L J A G H D K I N Represents links on Reverse Path Created as a packet moves toward destination
Reverse Path Setup in AODV Y Z S E F B C M L J A G H D K I N • Node C receives RREQ from G and H, but does not forward • it again, because node C has already forwarded RREQ once
Reverse Path Setup in AODV Y Z S E F B C M L J A G H D K I N
Reverse Path Setup in AODV Y Z S E F B C M L J A G H D K I N • Node D does not forward RREQ, because node D • is the intended target of the RREQ
Forward Path Setup in AODV Y S->D F S->D E C Z S E F B C M L J A G H D K I N Forward links are setup when RREP travels along the reverse path Represents a link on the forward path
AODV • Nodes not along the path determined by the RREP will timeout (after about 3 sec) and will delete reverse pointers • Is this a general principle for WSN? For mobile networks? • Expiration time for the route table entry (updated after every message)
Route Table Entry Data • Destination • Next hop • Number of hops • Sequence number for destination • To avoid loops • Active neighbors for this route • who will send me packets for this destination (notify them of problem if my link to next hop breaks) • Expiration time for the route table entry • to clean up the table
AODV Route Maintenance2 choices • Periodic hello messages can be used to ensure symmetric links and to detect link failures • Principle? • Upon detection of problem – restart discovery process with increased destination sequence number
DSR vs AODV • DSR – all route information is stored in packet itself, bad for long routes • Dynamic • Set up route and then use for a long time • AODV – route information is in temporary routing tables – only on routes currently in existence • Dynamic • Set up route and then use for a long time
Directed Diffusion • Well known • One of first targeted for WSN • Routing and queries intimately tied together • How many people do you observe in area X? • Give me the temperature reading for the next hour in area Y • Diffuse the query into the sensor network • Query is persistent (until time t) • Must amortize cost of finding route over data delivery (learn good routes)
Directed Diffusion • A Flexible Framework/Paradigm • Allows many choices for various aspects of the “solution” • Remind you of BMAC? (for MAC layer) • This is for routing
Directed Diffusion – Main Parts • Node (e.g., base station) requests data by sending an interest for named data • Data centric routing • Data generated by sensors in response to query is sent in attribute-value pairs • Data matching the interest is drawn towards the requester • Gradients
Directed DiffusionAttribute-Value Pairs 5 attribute value pairs – cache request Type = mammal Value = horse Duration = 3-4 PM Periodic Rate = Y Area = {a,b;c,d} Response might be from node A horse at 3:30 at location x1,y1
Directed Diffusion – Other Features • Intermediate nodes can cache or transform data, e.g., performing data aggregation (application dependent) • Now combine routing, queries, and data aggregation • Biological metaphor (ants and chemical trails) • Form of flooding