Title: Dynamic%20Source%20Routing%20(DSR)
1Dynamic Source Routing(DSR)
- http//www.monarch.cs.rice.edu/
- Research by David B. Johnson, et al
2The problem
A
B
A wants to send a message to B. But they are not
within direct radio range of each other.
3The Solution
A
B
They use their neighbours to forward the message.
4How do neighbours know where to send?
- Or, more precisely, which of the neighbours
should forward the message? - DSR is a mechanism for dynamically discovering
the route that any message in the network should
take. - It is composed of two mechanism
- Route Discovery
- Route Maintenance
5Route Discovery
A sends a ROUTE REQUEST to all neighbours
Each neighbour forwards this while adding itself
to the path
Now E knows the path from A to E.
A,B,C,D,E
A,B,C,D
A
A,B
A,B,C
A
C
E
B
D
In a bidirectional network, E can send a ROUTE
REPLY in the reverse direction to let A know the
path
For unidirectional links, E will have to initiate
a similar Route Discovery process to return the
path information to A
6Optimizations
- The initiator caches the responses to ROUTE
REQUEST - Subsequent data packets are buffered till the
ROUTE REPLY arrives, or if it is taking too long,
the initiator starts another ROUTE REQUEST.
(exponential backoff)
7Route Maintenance
Saved msg
msg
X
Y
Source
Destination
ROUTE ERROR
- Each node transmitting the data packet is
responsible for confirming that the packet has
completed the next hop. - This may involve retransmissions.
- If multiple retransmissions fail, a ROUTE ERROR
message is sent to the initiator indicating that
the particular link has problems. The source can
now delete the path from its cache.
8Caching Overheard Routes
- The route in any packet that a node hears (or
overhears) can be added to the nodes cache of
routes. - This may not be very useful when the links are
uni-directional.
9Using Cached Routes
- When a node receives a ROUTE REQUEST for which it
is not the target, it searches its cache. - If found, the path can be returned to the
initiator without forwarding the ROUTE REQUEST.
10but...
A
B
D
E
C
At node F Route ABCF Cache CDE
F
If we simply concatenate the routes, we would
have a loop.
In such cases, F will could eliminate the loop
and send a REPLY. But this would mean that any
ERRORs in CD and DE would not propagated to F and
Fs cache will be stale. In such cases, F simply
disregards the REQUEST.
11ROUTE REPLY Storms
Cache BE
B
Cache CE
A
C
E
Cache DE
D
A sends REQUEST for E to its neighbours. B, C and
D receive it at almost the same time. All of them
have the path in cache. All of them reply at the
same time. Their REPLY packets will collide at
A. But we would still like to be aware of these
paths in case some of the others are not
available.
12Preventing REPLY Storms
- Each intermediate node should delay sending its
REPLY for a random period d - d H x ( h 1 r)
- h is the length in number of hops for the route
to be returned in this nodes REPLY - r is a random number between 0 and 1
- H is a small constant delay (at least twice the
max wireless link propagation delay) to be
introduced per hop.
13Preventing REPLY Storms
- During this delay period, the node listens for
other REPLYs. - If a data packet received by this node during the
delay period uses a source route of length less
than or equal to h, this node may infer that the
initiator has already received a REPLY with an
equally good or better route. - If so, the node does not send its REPLY.
14A
B
Consider a case where the initiator is sort-of in
the center of the network. A broadcasts ROUTE
REQUESTs to all neighbours. Each neighbour
propagates it further. And even further than
required.
15ROUTE REQUEST hop limits
- One way to avoid this is to use hop limits for
REQUESTS. - We can use an expanding ring search for the
target, with increasing hop limits till the
target is found. - Of course, this will increase the latency of
discovery.
16Packet Salvaging
- After sending a ROUTE ERROR message, a node may
attempt to salvage the data packet that caused
the ROUTE ERROR. - It can search its own cache for an alternate
route to the destination of the packet.
17Automatic Route Shortening
B
A
D
C
- Suppose the ROUTE to be used is ABCD.
- Here C hears As transmission to B.
- C now knows that ACD is a better path.
- C now sends a gratuitous ROUTE REPLY to A
specifying the better path.
18Increased Spread of ROUTE ERROR messages
- When a source receives an ERROR for a data packet
that is originated, it propagates it to its
neighbours by piggybacking it on to its next
ROUTE REQUEST. - Thus, stale cache entries in the neighbours can
also be avoided.
19Caching Negative Information
- DSR can also benefit from caching details of what
routes or links will not work. - These entries would also need some sort of
timeout so that the link is not avoided once it
comes up. - This sort of caching would also be helpful when
link quality is highly variable. The link would
not be considered immediately when it comes back
up. - One difficult implementation issue in this what
value of timeout do we use?
20Dynamic Source Routing
- Detects routes between source and destination
dynamically - Can be used in networks with bidirectional as
well as unidirectional links. - Can handle mobility of nodes.