Adhoc-routing

advertisement
Mobile Ad Hoc Networks:
Routing, MAC and Transport Issues
Material in this slide set are from a tutorial by Prof. Nitin Vaidya
1
Mobile-ad hoc network
2
Mobile Ad Hoc Networks
• Networks formed by wireless hosts which may be mobile
• Without (necessarily) using a pre-existing infrastructure
• Routes between nodes may potentially contain multiple hops
• Roles of node and endsystems are merged
end system
node
Communication
Network
3
Mobile Ad Hoc Networks
• May need to traverse multiple links to reach a destination
4
Mobile Ad Hoc Networks (MANET)
• Mobility causes route changes
5
Many Applications
• Personal area networking
– Connect cell phone, laptop, wrist watch
• Military environments
– soldiers, ships
• Civilian environments
– taxi cab network
• Emergency operations
– search-and-rescue
– policing and fire fighting
6
Why is Routing in MANET different ?
• Host mobility
– link failure/repair due to mobility may have different
characteristics than those due to other causes
• Rate of link failure/repair may be high when nodes move fast
• New performance criteria may be used
– route stability despite mobility
– energy consumption
7
Classification
• Many protocols have been proposed
Ad hoc routing
protocols
Reactive
protocols
• Determine route if and
when needed
• Source initiates route
discovery
• Example:
DSR (dynamic source
routing)
Proactive
protocols
Hybrid
• Traditional distributed
shortest-path protocols
• Maintain routes between
every host pair at all times
• Based on periodic updates;
• High routing overhead
• Example: DSDV
(destination sequenced
distance vector)
8
Trade-Off
• Latency of route discovery
– Proactive protocols may have lower latency since routes are
maintained at all times
– Reactive protocols may have higher latency because a route from X to
Y will be found only when X attempts to send to Y
• Overhead of route discovery/maintenance
– Reactive protocols may have lower overhead since routes are
determined only if needed
– Proactive protocols can (but not necessarily) result in higher overhead
due to continuous route updating
• Which approach achieves a better trade-off depends on the
traffic and mobility patterns
9
Flooding of Control Packets
• Many ad-hoc routing protocols perform (potentially limited)
flooding of control packets
– The control packets are used to discover routes
– Discovered routes are subsequently used to send data
packet(s)
– Overhead of control packet flooding is amortized over data
packets transmitted between consecutive control packet
floods
10
Dynamic Source Routing (DSR)
• 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 own identifier when forwarding RREQ
11
Route Discovery in DSR
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
Represents a node that has received RREQ for D from S
12
Route Discovery in DSR
Y
Broadcast transmission
[S]
S
B
A
Z
E
F
C
J
G
H
I
M
K
L
D
N
Represents transmission of RREQ
[X,Y]
Represents list of identifiers appended to RREQ
13
Route Discovery in DSR
Y
S
B
A
E
[S,E]
F
C
H
Z
[S,C]
I
M
J
G
K
L
D
N
14
Route Discovery in DSR
Y
Z
S
B
A
E
F
C
[S,E,F]
G
H
I
[S,C,G] K
M
J
L
D
N
Node C receives RREQ from G and H, but does not forward it
again, because node C has already forwarded RREQ once
15
Route Discovery in DSR
Y
Z
S
B
A
E
[S,E,F,J]
F
C
J
G
H
I
K
M
L
D
[S,C,G,K] N
• Nodes J and K both broadcast RREQ to node D
• Since nodes J and K are hidden from each other, their
transmissions may collide
16
Route Discovery in DSR
Y
Z
S
B
A
E
[S,E,F,J,M]
F
C
J
G
H
I
M
K
L
D
N
• Node D does not forward RREQ, because node D is
the intended target of the route discovery
17
Route Discovery in DSR
• Destination D on receiving the first RREQ, sends a Route
Reply (RREP)
• RREP is sent on a route obtained by reversing the route
appended to received RREQ
• RREP includes the route from S to D on which RREQ was
received by node D
18
Route Reply in DSR
Y
S
B
A
E
RREP [S,E,F,J,D]
F
C
H
I
M
J
G
K
Z
L
D
N
Represents RREP control message
19
Route Reply in DSR
• Route Reply can be sent by reversing the route in Route
Request (RREQ) only if links are guaranteed to be bidirectional
– To ensure this, RREQ should be forwarded only if it
received on a link that is known to be bi-directional
20
Dynamic Source Routing (DSR)
• Node S on receiving RREP, caches the route included in the
RREP
• When node S sends a data packet to D, the entire route is
included in the packet header
– hence the name source routing
• Intermediate nodes use the source route included in a packet
to determine to whom a packet should be forwarded
21
Data Delivery in DSR
Y
DATA [S,E,F,J,D]
S
E
F
C
B
A
G
H
I
Z
M
J
K
L
D
N
Packet header size grows with route length
22
DSR Optimization: Route Caching
• Each node caches a new route it learns by any means
• 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
• A node may also learn a route when it overhears Data
packets
23
Use of Route Caching
[S,E,F,J,D]
[E,F,J,D]
S
B
A
E
[F,J,D],[F,E,S]
F
C
[J,F,E,S]
J
G
[C,S]
H
[G,C,S]
I
M
L
D
K
N
Z
[P,Q,R] Represents cached route at a node
24
Use of Route Caching:
Can Speed up Route Discovery
[S,E,F,J,D]
[E,F,J,D]
S
B
A
E
[F,J,D],[F,E,S]
F
C
[J,F,E,S]
[G,C,S]
J
G
[C,S]
H
I
M
[K,G,C,S]
K
RREQ
L
D
RREP
N
Z
• When node Z sends a route request for node C, node K sends
back a route reply [Z,K,G,C] to node Z using a locally cached
route
25
Use of Route Caching:
Can Reduce Propagation of Route Requests
[S,E,F,J,D]
[E,F,J,D]
S
B
A
Y
E
[F,J,D],[F,E,S]
F
C
[J,F,E,S]
[G,C,S]
J
G
[C,S]
H
I
M
[K,G,C,S]
D
K
RREP
RREQ
L
N
Z
•Assume that there is no link between D and Z. Route Reply
(RREP) from node K limits flooding of RREQ.
26
Dynamic Source Routing
Advantages
• Routes maintained only
between nodes who need
to communicate
– reduces overhead of route
maintenance
• Route caching reduces
route discovery overhead
• A single route discovery
may yield many routes to
the destination
Disadvantages
• Packet header size grows
with route length due to
source routing
• Flood of route requests
• 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
27
Ad Hoc On-Demand Distance Vector Routing
(AODV)
• DSR includes source routes in packet headers
• Resulting large headers can sometimes degrade performance
– particularly when data contents of a packet are small
• AODV attempts to improve on DSR by maintaining routing
tables at the nodes, so that data packets do not have to
contain routes
• AODV retains the desirable feature of DSR that routes are
maintained only between nodes which need to communicate
28
AODV
• Route Requests (RREQ) are forwarded in a manner similar to
DSR
• When a node re-broadcasts a Route Request, it sets up a
reverse path pointing towards the source
– AODV assumes symmetric (bi-directional) links
• When the intended destination receives a Route Request, it
replies by sending a Route Reply
• Route Reply travels along the reverse path set-up when
Route Request is forwarded
29
Route Requests in AODV
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
•Represents a node that has received RREQ for D from S
30
Route Requests in AODV
Y
Broadcast transmission
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
•Represents transmission of RREQ
31
Route Requests in AODV
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
• Represents links on Reverse Path
32
Reverse Path Setup in AODV
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
• Node C receives RREQ from G and H, but does not
forward it again, because node C has already forwarded
RREQ once
33
Reverse Path Setup in AODV
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
34
Reverse Path Setup in AODV
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
• Node D does not forward RREQ, because node D is
the intended target of the RREQ
35
Route Reply in AODV
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
Represents links on path taken by RREP
36
Route Reply in AODV
• An intermediate node (not the destination) may also send a
Route Reply (RREP) provided that it knows a more recent
path than the one previously known to sender S
• To determine whether the path known to an intermediate
node is more recent, destination sequence numbers are used
• The likelihood that an intermediate node will send a Route
Reply when using AODV not as high as DSR
– A new Route Request by node S for a destination is
assigned a higher destination sequence number. An
intermediate node which knows a route, but with a smaller
sequence number, cannot send Route Reply
37
Forward Path Setup in AODV
Y
Z
S
B
A
E
F
C
J
G
H
I
M
K
L
D
N
•Forward links are setup when RREP travels
along the reverse path
Represents a link on the forward path
38
Data Delivery in AODV
Y
DATA
S
B
A
Z
E
F
C
J
G
H
I
M
K
L
D
N
• Routing table entries used to forward data packet.
• Route is not included in packet header.
39
Summary: AODV
• Routes need not be included in packet headers
• Nodes maintain routing tables containing entries only for
routes that are in active use
• At most one next-hop per destination maintained at each
node
– DSR may maintain several routes for a single destination
• Unused routes expire even if topology does not change
40
Link State Routing
• Each node periodically floods status of its links
• Each node re-broadcasts link state information received from
its neighbor
• Each node keeps track of link state information received from
other nodes
• Each node uses above information to determine next hop to
each destination
41
Optimized Link State Routing (OLSR)
• The overhead of flooding link state information is reduced by
requiring fewer nodes to forward the information
• A broadcast from node X is only forwarded by its multipoint
relays
• Multipoint relays of node X are its neighbors such that each
two-hop neighbor of X is a one-hop neighbor of at least one
multipoint relay of X
– Each node transmits its neighbor list in periodic beacons,
so that all nodes can know their 2-hop neighbors, in order
to choose the multipoint relays
42
Optimized Link State Routing (OLSR)
• Nodes C and E are multipoint relays of node A
F
B
G
C
A
J
E
H
K
D
Node that has broadcast state information from A
43
Optimized Link State Routing (OLSR)
• Nodes C and E forward information received from A
F
B
G
C
A
J
E
H
K
D
•Node that has broadcast state information from A
44
Optimized Link State Routing (OLSR)
• Nodes H and A are multipoint relays for node E
• Node H forwards information received from E
F
B
G
C
A
J
E
H
K
D
•Node that has broadcast state information from A
45
OLSR
Advantages
• Routing table always
available
• Suitable for dense
networks where
frequent communication
is required between a
(relative) large number
of nodes.
Disadvantages
• Flooding (even if
limited)
• Unsuitable for sensor
networks
• Routes used by OLSR
only include multipoint
relays as intermediate
nodes
Destination-Sequenced Distance-Vector
(DSDV)
• Each node maintains a routing table which stores
– next hop towards each destination
– a cost metric for the path to each destination
– a destination sequence number that is created by the
destination itself
– Sequence numbers used to avoid formation of loops
• Each node periodically forwards the routing table to its
neighbors
– Each node increments and appends its sequence number
when sending its local routing table
– This sequence number will be attached to route entries
created for this node
47
Destination-Sequenced Distance-Vector
(DSDV)
• Assume that node X receives routing information from Y
about a route to node Z
X
Y
Z
• Let S(X) and S(Y) denote the destination sequence number
for node Z as stored at node X, and as sent by node Y with its
routing table to node X, respectively
48
Destination-Sequenced Distance-Vector
(DSDV)
• Node X takes the following steps:
X
Y
Z
– If S(X) > S(Y), then X ignores the routing information
received from Y
– If S(X) = S(Y), and cost of going through Y is smaller than
the route known to X, then X sets Y as the next hop to Z
– If S(X) < S(Y), then X sets Y as the next hop to Z, and S(X)
is updated to equal S(Y)
49
Spanning Tree Protocol
A routing algorithm for mobile self-organizing
networks
Spanning Tree Protocol
• Adaptation of Perlman’s algorithm
for bridges
• Assumption
– Substrate has broadcast operation
(e.g., 802.11b)
• Components
– Builds a rooted tree topology
– All node agree on a common root
– Each node selects a parent
– Each node broadcasts beacon
messages periodically
– Unicast and multicast forwarding
7
3
4
9
6
8
2
5
1
51
Spanning Tree Protocol
• Assumption
– Wireless channel can be asymmetric
– Outgoing broadcast packet can be received by adjacent
nodes
– Each node has a unique Identifier (an integer number)
• Components
– A shared tree topology
– Periodic beacon messages
– Configurable topology policy (parent selection algorithm)
Tree-based topology
Advantages
– Topology is always maintained
– Easy to do broadcasting (loop-free)
– A shared tree is guaranteed given that
there’s no partition
4
9
6
7
8
Disadvantages
–
–
No redundancy
Message may not travel on most
efficient path
– Difficult to do unicast
Spanning Tree Protocol: Beacon Message
• Periodically each node
sends a beacon to its
adjacent nodes
– Used as in IEEE 802.1b:
Used to select parents in
spanning tree
– Probes link quality
4 bytes
Overlay Hash
4 bytes
SenderID
variable
Physical Address
4 bytes
Core ID
4 bytes
Ancestor ID
Size
4 bytes
2 bytes
Hop Count
ID 1
4 bytes
2 bytes
Metric
Link Quality
1 byte
8 bytes
Sequence Number
ID 2
4 bytes
Link Quality
1 byte
4 bytes +
5 bytes per
entry
Adjacency Table
...
Beacon Message
Adjacency Table
Entry
Spanning Tree Protocol
ID
Link Quality
LQ/RLQ
Time Stamp
476
9/10
1098900558838
167
2/10
1098900559750
250
8/10
1098900558724
•LQ = %beacon
received from this node
•RLQ= %beacon
delivered to this node
BiLQ= Min(LQ, RLQ)
•Adjacency Table
–Record the link state of
adjacent nodes
–Being updated by beacon
message received from others
•Link Quality
–Measured by counting the
number of beacons from the
sender during a specified period
•Functions
–Eliminate asymmetric links
–Eliminate bad quality links
–Used in topology algorithm
Root and parent selection
• Root selection
– The node with minimum ID is the root
• Parent selection
– Choose the node that broadcasts the smaller root ID
– When two nodes broadcast the same root ID
• Minimum Hop Algorithm: choose the node that has the
minimum hop count to root
• Path Quality Algorithm: choose the node that has the
best path to root
Path Quality = Product of the BiLQs of all links on the path
Minimum Hop vs. Path Quality
• Minimum Hop
– Widely used in current ad-hoc routing protocols
– Has good performance in simulator, e.g., GlomoSim
– Tends to select distant links that has worse link quality in
real 802.11 network
• Path Quality
–
–
–
–
Tends to have longer path
Favors the path with lower loss rate
Doesn’t show better performance in simulator
Does show large improvement in real 802.11 network
Routing in SPT
• Multicast
data
data
– Sends along the tree edges
• Unicast
– Maintains routing table
– Routing table can be updated passively or actively
Dest ID
NextHop
ID
Time Stamp
476
271
1098900558838
167
123
1098900559750
250
4
1098900558724
Updating Routing Table
Passive updating
(Learning)
data
data
2
4
2 2
3
5
2 4
2 3
1
2 4
Active updating
(Route Request)
data:5
2
5rreq
4
data:5
3
5 5
4
rreq
rreq
5 3
5
1
Create a path
rrep
3
data:5
2
4
5 4
5 3
rreq
1
Invalidate a
path
5
Simulation Result
• Platform: GlomoSim
• 10 unicast data streams
• Compared to AODV
Mobility Experiment
• 6 PDAs are fixed at location, and 1 moves around
• Using UDP adapter
• Sender sends out 10 packets per second by unicast
to the moving node, and no ACKs.
• Randomized logical address
90ft
A
M
Receiver
B
50ft
Sender
90ft
90ft
C
90ft
D
90ft
E
90ft
F
90ft
Mobility Experiment
Minimum Hop
Path Quality
Download