Download Routing - University of Virginia

Document related concepts

Backpressure routing wikipedia , lookup

IEEE 1355 wikipedia , lookup

CAN bus wikipedia , lookup

Airborne Networking wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Kademlia wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Wireless Sensor Networks
Routing
Professor Jack Stankovic
University of Virginia
2006
Single Hop Networks
Destination
Diameter = 1
Any real applications?
Source
Fixed Deployment
Diameter = 4
Comm.
Range
Ad Hoc Deployment
Diameter = ?
Neighbor Discovery
Data Structure
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?
10
(.95)
~= 60%
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
Last Mile
Destination
• End-to-end
• Real-time
• Collisions
• Congestion
• Power
• Security
• Mobility
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
Geographic Forwarding (GF)
• GF always chooses a node that is closest to the
destination.
• Every node knows its location.
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?
S
D
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 – dynamic source 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
J
A
L
G
H
K
I
D
N
Represents a node that has received Route Request
Packet (RREQ) for D from S
Route Discovery in DSR
Broadcast transmission
Y
[S]
S
[S]
E
F
[S]
B
C
M
J
A
L
G
H
K
I
[X,Y]
Z
D
N
Represents transmission of RREQ
Represents list of identifiers appended to RREQ
Route Discovery in DSR
Y
Z
S
[S,B]
E
[S,E]
F
B
C
J
[S,B]
A
M
[S,C]
H
G
K
I
L
D
N
Route Discovery in DSR
Y
Z
S
E
F
B
[S,E,F]
C
M
J
A
L
G
H
I
[S,C,G] K
D
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
[S,E,F,J]
F
B
C
M
J
A
L
G
H
K
I
D
[S,C,G,K]
N
Route Discovery in DSR
Y
Z
S
E
[S,E,F,J,M]
F
B
C
M
J
A
L
G
H
K
D
I
• Node D does not forward RREQ, because node D
is the intended target of the route discovery
N
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
E
RREP [S,E,F,J,D]
F
B
C
M
J
A
L
G
H
K
I
Represents Route Reply (RREP)
control message
D
N
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
DATA [S,E,F,J,D]
S
Z
E
F
B
C
M
J
A
L
G
H
K
D
I
Note: Packet header size grows with route length
N
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
J
A
L
G
H
K
I
D
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
J
A
L
G
H
K
I
D
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
J
A
L
G
H
K
I
D
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
J
A
L
G
H
K
I
D
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
J
A
L
G
H
K
I
D
N
Reverse Path Setup in AODV
Y
Z
S
E
F
B
C
M
J
A
L
G
H
K
D
I
• Node D does not forward RREQ, because node D
is the intended target of the RREQ
N
Forward Path Setup in AODV
S->D E
C
Y
S->D F
Z
S
E
F
B
C
M
J
A
L
G
H
K
I
D
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 Maintenance
2 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 Diffusion
Attribute-Value Pairs
5 attribute value pairs – cache request
Type =
mammal
Value =
horse
Duration =
3-4 PM
Periodic
Rate = Y
Response might be from node A
horse at 3:30 at location x1,y1
Area =
{a,b;c,d}
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
Flooding
• General Principle
– When you don’t know where things are
– When you need to inform entire network
of something
• Disseminate code
• Disseminate system parameters
– Optimize
Flooding
• Restricted Flood
– Inform all nodes within “n” hops of a node i
– How?
• TTL (time to live field in packet header)
– Principle
• In n=3 the neighbors forward packet after
decrementing counter to 2, same at the next
hop; when counter = 0 stop
Flooding
• A wave propagates/diffuses through
the network
• What can happen due to MAC layer
collisions?
– A node may miss the information
Flood
Flood
Collision
Back to Directed Diffusion
Yellow nodes have no
interest in data
(iii) B, C and S
activate sensors
for event of
interest
S
E
F
B
C
M
J
A
L
G
H
K
I
D
N
(i) D sends interest for named data – attribute-value pairs
includes area of interest
(ii) Nodes record interest (S, B, C) (may perform data aggregation
on return path)
Directed Diffusion
1
S
1
E
1
F
B
C
J
1
A
H
1
I
L
G
1
1
M
K
D
1
(i) Gradients set up for return path – to draw data to D
(ii) Multiple paths are supported
N
Directed Diffusion
S might send 2 of
3 messages to E and
1 of 3 to C
S
2
E
2
F
B
0
2
C
J
1
A
H
0
I
L
G
1
0
M
K
D
1
After D received data
(i) Reinforce certain paths, e.g., those with lowest delay
(ii) Negative reinforcement for unappealing routes
N
Directed Diffusion – Routing
Information per Node
S
E
F
B
C
M
J
A
L
G
H
K
I
D
N
Each node maintains an interest cache
Each entry in cache has a gradient field for each neighbor
Includes a duration field – after which this query terminates
Directed Diffusion (4 aspects)
– Flexible Framework
• Interest Propagation
– Flooding, constrained flooding, use previously
cached data
• Data Propagation
– Reinforce single path, multiple paths with
different quality, with probabilistic forwarding
• Data Caching and Aggregation
– Application semantics embedded
• Reinforcement
– When, how many neighbors, negative
reinforcement
Directed Diffusion (DD)
• Loops prevented “outside” the basic localized
DD algorithm (uses a message cache)
• Any node can apply reinforcement rules –
enables local repair of failed or degraded
paths
• Many local rules can be applied in context of
DD paradigm
• Works for multiple sinks and multiple sources
Sensor Network Routing
• Current routing solutions
– Many classical solutions need routing tables the
size of the network
– Most use single path to destination (DSR,
AODV,…)
– Many use path finding beacons (DD) - bad for
real-time
• SPEED
–
–
–
–
local (neighbor) tables only
utilize multiple paths
no path set-up beacons needed
Real-time addressed
SPEED Protocol (7 Aspects)
•
•
•
•
•
API (and last mile processing)
Neighbor Beacon Exchange
Delay Estimation Scheme
Neighborhood Feedback Loop (NFL)
Semi-Stateless Non-deterministic
Geographic Forwarding (SNGF)
• Back-pressure Rerouting
• Void Avoidance
SPEED Architecture
API
UniCast
MultiCast
AnyCast
Last Mile Process
Backpressure
Rerouting
Beacon
Exchange
SNGF
Neighbor
Table
MAC
NFL
Delay
Estimation
Question
• Can we convert SPEED to a B-MAC
philosophy?
– Flexible, highly parameterized, …
API (Last Mile Processing)
Destination
• AreaMulticast
• AreaAnyCast
• Unicast
Possible
INTERFERENCE
Source
SPEED
USE VELOCITY
D
E2E Distance
j
Actual Speed
i
Speed to
destination
(Set Point )
F
S
E2E Delay is bound by E2E Distance/Speed SetPoint
Nondeterministic Forwarding
Example 1:
ID
9
7
3
2
Position Delay
( 1,6)
5
(3,4)
3
(4,7)
3
(7,8)
1
RP: Relay probability
Compute
Speed
ID
2
Destination
7
9
2
s
3
Position RP
(7,8) 100%
Nondeterministic Forwarding
Example 2:
ID
9
7
3
2
Position Delay
( 1,6)
2
(3,4)
6
(4,7)
1
(7,8)
3
RP: Relay probability
Compute
Speed
7
Destination
9
s
2
3
ID
9
2
Position RP
( 1,6) 50%
(7,8) 50%
Nondeterministic Forwarding
Example 3:
ID
9
7
3
2
Position Delay
( 1,6)
1
(3,4)
4
(4,7)
5
(7,8)
2
Example: Overload situation
Compute
Speed
ID
Position RP
7
(3,4)
45%
3
(4,7) 40%
Drop
15%
Drop ratio is computed according to the
Neighborhood feedback control loop
Back-pressure re-routing
• When all available forwarding nodes are congested, the sending
node will drop packets, which will be perceived by previous nodes.
Route changes.
ID
9
7
3
2
3
Position Delay
( 1,6)
1
(3,4)
2
(4,7)
2
(7,8)
2
Congestion
Area
M
7
DROP
9
2
Void Avoidance
• Only guarantees a greedy path (will not go
backwards)
Void
Evaluation
8-9 hops
• 6 CBR flows on one side of terrain send to
one base station on the other side of terrain
• Average number of hops (8-9)
• 90% CI (within 2-10% of mean)
• Miss ratio results – not shown here but much
better for SPEED
• Under heavy congestion
– added flows in center of terrain
• Transient performance
Evaluation
40
290
DSR
240
Delay (MS)
Energy consumption (mWhr)
AODV
SPEED
190
140
90
35
30
25
20
AODV
15
DSR
SPEED
10
GF
SPEED-S
5
Rate (P/S)
40
0
10
20
30
40
50
60
70
80
90
100
SPEED-T
Rate (P/S)
0
0
10
20
30
40
50
60
70
80
90
100
(Added Congestion)
E2E Delay
Energy Consumption
Performance
300
250
250
E2E Delay (MS)
300
200
150
100
200
150
100
50
0
20
40
60
80
100 120 140 160 180 200
time(S)
Figure A. E2E delay profile of DSR
50
0
20
40
60
80
100 120 140 160 180 200
time(S)
Figure B. E2E delay profile of AODV
Performance
300
250
250
E2E Delay (MS)
300
200
150
200
150
100
100
50
50
0
20
40
60
80
100 120 140 160 180 200
time(S)
Figure C. E2E delay profile of GF
0
20
40
60
80
100 120 140 160 180 200
time(S)
Figure. D E2E delay profile of SPEED
Extensions?
• Add power decision, i.e., choose next
hop based on “most power” remaining
• Add reliable link decision, i.e., compute
link quality and use it for choosing next
hop
ID
9
7
3
2
Position Delay
( 1,6)
2
(3,4)
6
(4,7)
1
(7,8)
3
P
LQ
1.7
3.0
2.5
3.1
RAP
• Goals
– Minimize e2e deadline miss ratio
– Provide high-level services APIs for
distributed micro-sensing applications
(similar to DD and SPEED)
– Minimize communication and processing
overhead
RAP Architecture
Sensing/Control
Application
Query/Event Service APIs
Query/Event Service
Coordination Service
Location-Addressed Protocol
Geographic Routing
Velocity Monotonic Scheduling
Prioritized MAC
BIG ISSUE
• What are the right interfaces for the
protocol stack
– MAC
– Routing
• Internet has TCP/IP
• WSN needs Sensor Net Protocol (SP)
equivalent!
Questions
• MAC – should MAC contain
–
–
–
–
Priorities?
Congestion information?
Acks/No Acks decisions?
Multi-frequencies information?
–
–
–
–
–
Power issues
Data aggregation
Gradients
Link quality
Real-time
• Routing – should routing contain
Query/Event Service
Query/Event API
Coordination
Service
Location-Addressed Protocol
Geographic Forwarding
Velocity Monotonic Scheduling
Prioritized MAC
• High-level abstraction for programming
distributed micro-sensing applications
register_event {
virusFound(0,0,100,100),
query {
virus.count,
period=1.5, deadline=5,
base=(100,100)
}
}
//
//
//
//
//
area to post event
query to be triggered
attribute
timing info
base station location
Velocity
Query/Event Service
Coordination Service
Location-Addressed Protocol
Geographic Forwarding
Velocity Monotonic Scheduling
Prioritized MAC
• Timing constraint: deadline
• Location constraint: distance to
destination
• Requested Velocity
– Embody both constraints
– Reflect local urgency
– Velocity = Distance/Deadline
• Velocity Monotonic Scheduling (VMS)
– Priority = Requested Velocity
Example
D
dis = 90 m; D = 2 s
V = 45 m/s
HIGH Priority
A
C
B
dis = 60 m; D = 2 s
V = 30 m/s
LOW Priority
Velocity Monotonic Scheduling
• Static VMS
– Fixed velocity on each hop
– V=dis(x0,y0,xd,yd)/D
• Dynamic VMS
– Adapt velocity at intermediate node
F(remaining distance)
– Vi = dis(xi,yi,xd,yd)/Si
– Slack: Si = D - elapsedTime
Deadline Miss Ratio
Deadline Miss Ratio: FCFS>DS>DVM,SVM
Why SVM better than DVM ??
Overall Deadline Miss Ratios with deadlines (5,10)
Critique - SPEED
• No prioritization: uniform speed may not
be what applications want
• The uniform speed is not guaranteed (soft
real-time)
• Need periodic beacon to maintain neighbor
table (costs energy)
• Needs symmetric communication
• Extensions
– Multiple speeds
– Different importance for streams
– Consider energy explicitly
Critique - RAP
• An early paper to provide soft real-time in
sensor network
– Provides Real-Time communication architecture
– Provides VMS
• As in SPEED, only soft real-time, no
admission control, no guarantee
– Difficult to consider congestion, noise, retries,
lost packets, etc.
Real-time routing is very difficult because of
congestion, failures, retries, etc.
Implicit Geographic Forwarding
• Tackle the rapid dynamics found in
WSNs
• To deal with
–
–
–
–
Power Down Nodes (Sleep mode)
Node Mobility
Node Failure
Scale
• Lazy Binding (to the nth degree)
• State Free – no routing tables
Lazy Binding Concept
Routing Category:
FIX
Protocols:
FIX
On-Demand
Proactive
DSDV, GPSR,SPEED
DSR, AODV,DD
Lazy-Binding
IGF
Binding Time: Network Creation Network Maintenance End-to-End Request Forwarding operation
Lazier
Defer mapping network topologies into volatile states
(e.g. route state) as late as this operation allows (last 50
microsec in IGF).
IGF
Asleep
R
Moving Away
S
30
D
30
A
N
IGF is a combined Routing/MAC protocol
Eligible nodes - 60 degree cone (shift cone if necessary)
RTS - set timer based on distance and energy remaining
Summary of Evaluation
• Ten times improvement in delivery ratio under high
dynamics compared to best solutions
• Reduces end-to-end delay significantly
• Reduces control overhead significantly
• Tested for
– Static, mobile and power saving networks
– Test in presence of voids, localization errors,
different densities, toggle and sleep percentages
Simulation Evaluation
Packet Delivery Ratio
Under High mobility
Packet Delivery Ratio
Under Node State Transition
Summary
Reverse Path
AODV
DSR
DD
GPSR
SPEED
LAR
Neighbor Table
GF
IGF
(none)
Summary
• Routing with global tables not
appropriate
• ID-based not as appropriate (more
for MANET networks)
Summary
• Geographic/Location based
– Asymmetries – Symmetric Geographic
Forwarding (radio realities)
– Voids
– Fast dynamics
– Real-time
– Low cost
– Integrate with power management, data
aggregation and security (secure IGF)
Summary/Ideas
•
•
•
•
•
•
•
•
Neighbor discovery
Geographic location
Flooding (truncated)
Duration field (drop after delta t)
Eliminate duplicates
Biological metaphor – gradients
Velocity
Aggregate Behavior
Summary/Ideas
• Specialized traffic patterns
• Optimize for power, congestion,
robustness
• Integration of functionality
• Tailorable via API
• Unicast
• Broadcast, Area Multicast, Anycast
• Use link quality
Final Questions
• Congestion control
– Is it needed?
• Interaction with a MAC protocol
– Reliable message transmission needed?
– How/where to support reliability