8751
|
1 |
.. include:: replace.txt
|
|
2 |
|
|
3 |
DSR Routing
|
|
4 |
-----------
|
|
5 |
|
|
6 |
Dynamic Source Routing (DSR) protocol is a reactive routing protocol designed specifically for use in multi-hop
|
|
7 |
wireless ad hoc networks of mobile nodes.
|
|
8 |
|
|
9 |
This model was developed by
|
|
10 |
`the ResiliNets research group <http://www.ittc.ku.edu/resilinets>`_
|
|
11 |
at the University of Kansas.
|
|
12 |
|
|
13 |
DSR Routing Overview
|
|
14 |
********************
|
|
15 |
|
|
16 |
This model implements the base specification of the Dynamic Source Routing (DSR)
|
|
17 |
protocol. Implementation is based on RFC4728.
|
|
18 |
|
|
19 |
Class dsr::DsrRouting implements all functionality of service packet exchange and inherits Ipv4L4Protocol.
|
|
20 |
|
|
21 |
Class dsr::DsrOptions implements functionality of packet processing and talk to DsrRouting to send/receive packets
|
|
22 |
|
|
23 |
Class dsr::DsrFsHeader defines the fixed-size header and identify the up-layer protocol
|
|
24 |
|
|
25 |
Class dsr::DsrOptionHeader takes care of different dsr options and process different header according to specification from rfc
|
|
26 |
|
|
27 |
Class dsr::DsrSendBuffer is a buffer to save data packet as well as route error packet when there is no route to forward the packet
|
|
28 |
|
|
29 |
Class dsr::DsrMaintainBuffer is a buffer to save data packet for next-hop notification when the data packet has already sent out of send buffer
|
|
30 |
|
|
31 |
Class dsr::RouteCache is the essential part to save routes found for data packet, dsr responds to several routes for a single destination
|
|
32 |
|
|
33 |
Class dsr::RreqTable implements the functionalities to avoid duplicate route requests and control route request rate for a single destination
|
|
34 |
|
|
35 |
Protocol operation depends on the many adjustable parameters. We support parameters, with their default values, from
|
|
36 |
RFC and parameters that enable/disable protocol features or tune for specific simulation scenarios, such as the max size
|
|
37 |
of send buffer and its timeout value. The full parameter list is in DsrRouting.cc file.
|
|
38 |
|
|
39 |
DSR discovers routes totally on demand. Therefore, our DSR model buffers all packets, while a route request packet (RREQ)
|
|
40 |
is disseminated. We implement a packet buffer in dsr-rsendbuff.cc. The packet queue implements garbage collection of old
|
|
41 |
packets and a queue size limit. When the packet is sent out from the send buffer, it will be queued in maintenance buffer for
|
|
42 |
next hop acknowledgment
|
|
43 |
|
|
44 |
Route Cache implementation support garbage collection of old entries and state machine, defined in standard.
|
|
45 |
It implements as a STL map container. The key is the destination IP address.
|
|
46 |
|
|
47 |
Protocol operation strongly depends on broken link detection mechanism. We implement all the three heuristics.
|
|
48 |
First, we use layer 2 feedback when possible. Link considered to be broken, if frame transmission results in a transmission
|
|
49 |
failure for all retries. This mechanism meant for active links and work much more faster, than first method.
|
|
50 |
Layer 2 feedback implementation relies on TxErrHeader trace source, currently it is supported in AdhocWifiMac only.
|
|
51 |
|
|
52 |
Second, passive acknowledgment should be used whenever possible. The node turns on "promiscuous" receive mode, in which it can receive
|
|
53 |
packet not destined for itself, and when the node assures the delivery of that data packet to its destination, it cancels the passive
|
|
54 |
acknowledgment timer.
|
|
55 |
|
|
56 |
Last, we use network layer acknowledge scheme to notify the receipt of a packet. Route request packet will not
|
|
57 |
be acknowledge or retransmitted.
|
|
58 |
|
|
59 |
Following optional protocol optimizations aren't implemented:
|
|
60 |
- Flow state
|
|
61 |
- First Hop External (F), Last Hop External (L) flags
|
|
62 |
- Handling unknown DSR options
|
|
63 |
- Two types of error headers:
|
|
64 |
1. flow state not supported option
|
|
65 |
2. unsupported option (not going to happen in simulation)
|
|
66 |
|
|
67 |
DSR operates with direct access to IP header, and operates between network and transport layer.
|
|
68 |
|
|
69 |
Implementation changes
|
|
70 |
- The DsrFsHeader has added 3 fields: message type, source id, destination id, and these changes only for post-processing
|
|
71 |
- message type is used to identify the data packet from control packet
|
|
72 |
- source id is used to identify the real source of the data packet since we have to deliver the packet hop-by-hop and the ipv4header
|
|
73 |
is not carrying the real source and destination ip address as needed
|
|
74 |
- destination id is for same reason of above
|
|
75 |
|
|
76 |
Changes:
|
|
77 |
- Route Reply header is not word-aligned in DSR rfc, change it to word-aligned in implementation
|
|
78 |
- DSR works as a shim header between transport and network protocol, it needs its own forwarding mechanism,
|
|
79 |
we are changing the packet transmission to hop-by-hop delivery, so we added two fields in dsr fixed header
|
|
80 |
to notify packet delivery
|
|
81 |
1. message type to notify the type of this packet: data packet or control one
|
|
82 |
2. source id to identify the real source address of this packet
|
|
83 |
3. destination id to identify the real destination
|
|
84 |
|
|
85 |
Current Route Cache implementation:
|
|
86 |
- This implementation used "path cache", which is simple to implement and ensures loop-free
|
|
87 |
- the path cache has automatic expire policy
|
|
88 |
- the cache saves multiple route entries for a certain destination and sort the entries based on hop counts
|
|
89 |
- the MaxEntriesEachDst can be tuned to change the maximum entries saved for a single destination
|
|
90 |
- when adding mulitiple routes for one destination, the route is compared based on hop-count and expire time, the one with less hop count
|
|
91 |
or relatively new route is favored
|
|
92 |
- Future implementation may include "link cache" as another possibility
|
|
93 |
|
|
94 |
DSR Instructions
|
|
95 |
****************
|
|
96 |
|
|
97 |
The following should be kept in mind when running DSR as routing protocol:
|
|
98 |
|
|
99 |
* NodeTraversalTime is the time it takes to traverse two neighboring nodes and should be chosen to fit the transmission range
|
|
100 |
* PassiveAckTimeout is the time a packet in maintenance buffer wait for passive acknowledgment, normally set as two times of NodeTraversalTime
|
|
101 |
* RouteCacheTimeout should be set smaller value when the nodes' velocity become higher. The default value is 300s.
|
|
102 |
|
|
103 |
Helper
|
|
104 |
******
|
|
105 |
|
|
106 |
To have a node run DSR, the easiest way would be to use the ClickInternetStackHelper
|
|
107 |
class in your simulation script. For instance::
|
|
108 |
|
|
109 |
DsrHelper dsr;
|
|
110 |
DsrMainHelper dsrMain;
|
|
111 |
dsrMain.Install (dsr, adhocNodes);
|
|
112 |
|
|
113 |
The example scripts inside ``src/dsr/examples/`` demonstrate the use of DSR based nodes
|
|
114 |
in different scenarios. The helper source can be found inside ``src/dsr/helper/dsr-main-helper.{h,cc}``
|
|
115 |
and ``src/dsr/helper/dsr-helper.{h,cc}``
|
|
116 |
|
|
117 |
Examples
|
|
118 |
********
|
|
119 |
|
|
120 |
The example can be found in ``src/dsr/examples/``:
|
|
121 |
|
|
122 |
* dsr.cc use DSR as routing protocol within a traditional MANETs environment[3].
|
|
123 |
|
|
124 |
DSR is also built in the routing comparison case in ``examples/routing/``:
|
|
125 |
|
|
126 |
* manet-routing-compare.cc is a comparison case with built in MANET routing protocols and can generate its own results.
|
|
127 |
|
|
128 |
Validation
|
|
129 |
**********
|
|
130 |
|
|
131 |
This model has been tested as follows:
|
|
132 |
|
|
133 |
* Unit tests have been written to verify the internals of DSR. This can be found in ``src/dsr/test/dsr-test-suite.cc``. These tests verify whether the methods inside DSR module which deal with packet buffer, headers work correctly.
|
|
134 |
* Simulation cases similar to [3] have been tested and have comparable results.
|
|
135 |
* manet-routing-compare.cc has been used to compare DSR with three of other routing protocols.
|
|
136 |
|
|
137 |
References
|
|
138 |
**********
|
|
139 |
|
|
140 |
[1] Link for the original paper: www.monarch.cs.rice.edu/monarch-papers/dsr-chapter00.pdf
|
|
141 |
[2] Link for RFC 4728: http://www6.ietf.org/rfc/rfc4728.txt
|
|
142 |
[3] Link for the broch's comparison paper: http://www.monarch.cs.rice.edu/monarch-papers/mobicom98.ps
|