idnits 2.17.1 draft-ietf-manet-dsr-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. == There are 4 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: '10' is defined on line 3374, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. '1' -- Possible downref: Non-RFC (?) normative reference: ref. '2' -- Possible downref: Non-RFC (?) normative reference: ref. '5' ** Obsolete normative reference: RFC 2460 (ref. '6') (Obsoleted by RFC 8200) -- Possible downref: Non-RFC (?) normative reference: ref. '8' -- Possible downref: Non-RFC (?) normative reference: ref. '9' -- Possible downref: Normative reference to a draft: ref. '10' -- Possible downref: Non-RFC (?) normative reference: ref. '11' -- Possible downref: Non-RFC (?) normative reference: ref. '12' -- Possible downref: Non-RFC (?) normative reference: ref. '13' -- Possible downref: Non-RFC (?) normative reference: ref. '14' -- Possible downref: Non-RFC (?) normative reference: ref. '15' -- Possible downref: Non-RFC (?) normative reference: ref. '16' -- Possible downref: Non-RFC (?) normative reference: ref. '17' -- Possible downref: Non-RFC (?) normative reference: ref. '18' -- Possible downref: Non-RFC (?) normative reference: ref. '19' -- Possible downref: Non-RFC (?) normative reference: ref. '20' -- Possible downref: Non-RFC (?) normative reference: ref. '21' -- Possible downref: Non-RFC (?) normative reference: ref. '22' -- Possible downref: Non-RFC (?) normative reference: ref. '23' -- Possible downref: Non-RFC (?) normative reference: ref. '24' ** Obsolete normative reference: RFC 793 (ref. '28') (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 1700 (ref. '29') (Obsoleted by RFC 3232) -- Possible downref: Non-RFC (?) normative reference: ref. '30' -- Possible downref: Non-RFC (?) normative reference: ref. '31' -- Possible downref: Non-RFC (?) normative reference: ref. '32' -- Possible downref: Non-RFC (?) normative reference: ref. '33' Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 26 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 IETF MANET Working Group David B. Johnson, Rice University 2 INTERNET-DRAFT David A. Maltz, AON Networks 3 21 February 2002 Yih-Chun Hu, Rice University 4 Jorjeta G. Jetcheva, Carnegie Mellon University 6 The Dynamic Source Routing Protocol 7 for Mobile Ad Hoc Networks (DSR) 9 11 Status of This Memo 13 This document is an Internet-Draft and is subject to all provisions 14 of Section 10 of RFC 2026. 16 Internet-Drafts are working documents of the Internet Engineering 17 Task Force (IETF), its areas, and its working groups. Note 18 that other groups may also distribute working documents as 19 Internet-Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six months 22 and may be updated, replaced, or obsoleted by other documents at 23 any time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress". 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 This Internet-Draft is a submission to the IETF Mobile Ad Hoc 33 Networks (MANET) Working Group. Comments on this draft may be sent 34 to the Working Group at manet@itd.nrl.navy.mil, or may be sent 35 directly to the authors. 37 Abstract 39 The Dynamic Source Routing protocol (DSR) is a simple and efficient 40 routing protocol designed specifically for use in multi-hop wireless 41 ad hoc networks of mobile nodes. DSR allows the network to be 42 completely self-organizing and self-configuring, without the need 43 for any existing network infrastructure or administration. The 44 protocol is composed of the two main mechanisms of "Route Discovery" 45 and "Route Maintenance", which work together to allow nodes to 46 discover and maintain source routes to arbitrary destinations in the 47 ad hoc network. The use of source routing allows packet routing 48 to be trivially loop-free, avoids the need for up-to-date routing 49 information in the intermediate nodes through which packets are 50 forwarded, and allows nodes forwarding or overhearing packets to 51 cache the routing information in them for their own future use. All 52 aspects of the protocol operate entirely on-demand, allowing the 53 routing packet overhead of DSR to scale automatically to only that 54 needed to react to changes in the routes currently in use. This 55 document specifies the operation of the DSR protocol for routing 56 unicast IPv4 packets in multi-hop wireless ad hoc networks. 58 The DSR protocol is designed for mobile ad hoc networks with up to 59 around two hundred nodes, and is designed to cope with relatively 60 high rates of mobility. 62 Contents 64 Status of This Memo i 66 Abstract ii 68 1. Introduction 1 70 2. Assumptions 3 72 3. DSR Protocol Overview 5 74 3.1. Basic DSR Route Discovery . . . . . . . . . . . . . . . . 5 75 3.2. Basic DSR Route Maintenance . . . . . . . . . . . . . . . 7 76 3.3. Additional Route Discovery Features . . . . . . . . . . . 9 77 3.3.1. Caching Overheard Routing Information . . . . . . 9 78 3.3.2. Replying to Route Requests using Cached Routes . 10 79 3.3.3. Preventing Route Reply Storms . . . . . . . . . . 11 80 3.3.4. Route Request Hop Limits . . . . . . . . . . . . 13 81 3.4. Additional Route Maintenance Features . . . . . . . . . . 14 82 3.4.1. Packet Salvaging . . . . . . . . . . . . . . . . 14 83 3.4.2. Queued Packets Destined over a Broken Link . . . 14 84 3.4.3. Automatic Route Shortening . . . . . . . . . . . 15 85 3.4.4. Increased Spreading of Route Error Messages . . . 16 87 4. Conceptual Data Structures 17 89 4.1. Route Cache . . . . . . . . . . . . . . . . . . . . . . . 17 90 4.2. Send Buffer . . . . . . . . . . . . . . . . . . . . . . . 20 91 4.3. Route Request Table . . . . . . . . . . . . . . . . . . . 21 92 4.4. Gratuitous Route Reply Table . . . . . . . . . . . . . . 22 93 4.5. Network Interface Queue and Maintenance Buffer . . . . . 23 94 4.6. Blacklist . . . . . . . . . . . . . . . . . . . . . . . . 24 96 5. DSR Header Format 25 98 5.1. Fixed Portion of DSR Header . . . . . . . . . . . . . . . 26 99 5.2. Route Request Option . . . . . . . . . . . . . . . . . . 28 100 5.3. Route Reply Option . . . . . . . . . . . . . . . . . . . 30 101 5.4. Route Error Option . . . . . . . . . . . . . . . . . . . 32 102 5.5. Acknowledgment Request Option . . . . . . . . . . . . . . 35 103 5.6. Acknowledgment Option . . . . . . . . . . . . . . . . . . 36 104 5.7. DSR Source Route Option . . . . . . . . . . . . . . . . . 37 105 5.8. Pad1 Option . . . . . . . . . . . . . . . . . . . . . . . 39 106 5.9. PadN Option . . . . . . . . . . . . . . . . . . . . . . . 40 108 6. Detailed Operation 41 110 6.1. General Packet Processing . . . . . . . . . . . . . . . . 41 111 6.1.1. Originating a Packet . . . . . . . . . . . . . . 41 112 6.1.2. Adding a DSR Header to a Packet . . . . . . . . . 41 113 6.1.3. Adding a DSR Source Route Option to a Packet . . 42 114 6.1.4. Processing a Received Packet . . . . . . . . . . 43 115 6.1.5. Processing a Received DSR Source Route Option . . 45 116 6.2. Route Discovery Processing . . . . . . . . . . . . . . . 48 117 6.2.1. Originating a Route Request . . . . . . . . . . . 48 118 6.2.2. Processing a Received Route Request Option . . . 50 119 6.2.3. Generating a Route Reply using the Route Cache . 52 120 6.2.4. Originating a Route Reply . . . . . . . . . . . . 54 121 6.2.5. Processing a Received Route Reply Option . . . . 56 122 6.3. Route Maintenance Processing . . . . . . . . . . . . . . 57 123 6.3.1. Using Link-Layer Acknowledgments . . . . . . . . 57 124 6.3.2. Using Passive Acknowledgments . . . . . . . . . . 58 125 6.3.3. Using Network-Layer Acknowledgments . . . . . . . 59 126 6.3.4. Originating a Route Error . . . . . . . . . . . . 62 127 6.3.5. Processing a Received Route Error Option . . . . 63 128 6.3.6. Salvaging a Packet . . . . . . . . . . . . . . . 64 130 7. Multiple Interface Support 66 132 8. Fragmentation and Reassembly 67 134 9. Protocol Constants and Configuration Variables 68 136 10. IANA Considerations 69 138 11. Security Considerations 70 140 Appendix A. Link-MaxLife Cache Description 71 142 Appendix B. Location of DSR in the ISO Network Reference Model 73 144 Appendix C. Implementation and Evaluation Status 74 146 Changes from Previous Version of the Draft 75 148 Acknowledgements 76 150 References 77 152 Chair's Address 80 154 Authors' Addresses 81 155 1. Introduction 157 The Dynamic Source Routing protocol (DSR) [13, 14] is a simple and 158 efficient routing protocol designed specifically for use in multi-hop 159 wireless ad hoc networks of mobile nodes. Using DSR, the network 160 is completely self-organizing and self-configuring, requiring no 161 existing network infrastructure or administration. Network nodes 162 cooperate to forward packets for each other to allow communication 163 over multiple "hops" between nodes not directly within wireless 164 transmission range of one another. As nodes in the network move 165 about or join or leave the network, and as wireless transmission 166 conditions such as sources of interference change, all routing is 167 automatically determined and maintained by the DSR routing protocol. 168 Since the number or sequence of intermediate hops needed to reach any 169 destination may change at any time, the resulting network topology 170 may be quite rich and rapidly changing. 172 The DSR protocol allows nodes to dynamically discover a source 173 route across multiple network hops to any destination in the ad hoc 174 network. Each data packet sent then carries in its header the 175 complete, ordered list of nodes through which the packet will pass, 176 allowing packet routing to be trivially loop-free and avoiding the 177 need for up-to-date routing information in the intermediate nodes 178 through which the packet is forwarded. By including this source 179 route in the header of each data packet, other nodes forwarding or 180 overhearing any of these packets can also easily cache this routing 181 information for future use. 183 In designing DSR, we sought to create a routing protocol that had 184 very low overhead yet was able to react very quickly to changes in 185 the network. The DSR protocol provides highly reactive service in 186 order to help ensure successful delivery of data packets in spite of 187 node movement or other changes in network conditions. 189 The DSR protocol is composed of two main mechanisms that work 190 together to allow the discovery and maintenance of source routes in 191 the ad hoc network: 193 - Route Discovery is the mechanism by which a node S wishing to 194 send a packet to a destination node D obtains a source route 195 to D. Route Discovery is used only when S attempts to send a 196 packet to D and does not already know a route to D. 198 - Route Maintenance is the mechanism by which node S is able 199 to detect, while using a source route to D, if the network 200 topology has changed such that it can no longer use its route 201 to D because a link along the route no longer works. When Route 202 Maintenance indicates a source route is broken, S can attempt to 203 use any other route it happens to know to D, or can invoke Route 204 Discovery again to find a new route for subsequent packets to D. 206 Route Maintenance for this route is used only when S is actually 207 sending packets to D. 209 In DSR, Route Discovery and Route Maintenance each operate entirely 210 "on demand". In particular, unlike other protocols, DSR requires no 211 periodic packets of any kind at any layer within the network. For 212 example, DSR does not use any periodic routing advertisement, link 213 status sensing, or neighbor detection packets, and does not rely on 214 these functions from any underlying protocols in the network. This 215 entirely on-demand behavior and lack of periodic activity allows 216 the number of overhead packets caused by DSR to scale all the way 217 down to zero, when all nodes are approximately stationary with 218 respect to each other and all routes needed for current communication 219 have already been discovered. As nodes begin to move more or 220 as communication patterns change, the routing packet overhead of 221 DSR automatically scales to only that needed to track the routes 222 currently in use. Network topology changes not affecting routes 223 currently in use are ignored and do not cause reaction from the 224 protocol. 226 In response to a single Route Discovery (as well as through routing 227 information from other packets overheard), a node may learn and cache 228 multiple routes to any destination. This allows the reaction to 229 routing changes to be much more rapid, since a node with multiple 230 routes to a destination can try another cached route if the one it 231 has been using should fail. This caching of multiple routes also 232 avoids the overhead of needing to perform a new Route Discovery each 233 time a route in use breaks. 235 The operation of both Route Discovery and Route Maintenance in DSR 236 are designed to allow unidirectional links and asymmetric routes 237 to be easily supported. In particular, as noted in Section 2, in 238 wireless networks, it is possible that a link between two nodes may 239 not work equally well in both directions, due to differing antenna 240 or propagation patterns or sources of interference. DSR allows such 241 unidirectional links to be used when necessary, improving overall 242 performance and network connectivity in the system. 244 This document specifies the operation of the DSR protocol for 245 routing unicast IPv4 packets in multi-hop wireless ad hoc networks. 246 Advanced, optional features, such as Quality of Service (QoS) support 247 and efficient multicast routing, and operation of DSR with IPv6 [6], 248 are covered in other documents. The specification of DSR in this 249 document provides a compatible base on which such features can be 250 added, either independently or by integration with the DSR operation 251 specified here. 253 The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 254 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 255 document are to be interpreted as described in RFC 2119 [4]. 257 2. Assumptions 259 We assume in this document that all nodes wishing to communicate with 260 other nodes within the ad hoc network are willing to participate 261 fully in the protocols of the network. In particular, each node 262 participating in the ad hoc network SHOULD also be willing to forward 263 packets for other nodes in the network. 265 The diameter of an ad hoc network is the minimum number of hops 266 necessary for a packet to reach from any node located at one extreme 267 edge of the ad hoc network to another node located at the opposite 268 extreme. We assume that this diameter will often be small (e.g., 269 perhaps 5 or 10 hops), but may often be greater than 1. 271 Packets may be lost or corrupted in transmission on the wireless 272 network. We assume that a node receiving a corrupted packet can 273 detect the error and discard the packet. 275 Nodes within the ad hoc network MAY move at any time without notice, 276 and MAY even move continuously, but we assume that the speed with 277 which nodes move is moderate with respect to the packet transmission 278 latency and wireless transmission range of the particular underlying 279 network hardware in use. In particular, DSR can support very 280 rapid rates of arbitrary node mobility, but we assume that nodes do 281 not continuously move so rapidly as to make the flooding of every 282 individual data packet the only possible routing protocol. 284 A common feature of many network interfaces, including most current 285 LAN hardware for broadcast media such as wireless, is the ability 286 to operate the network interface in "promiscuous" receive mode. 287 This mode causes the hardware to deliver every received packet to 288 the network driver software without filtering based on link-layer 289 destination address. Although we do not require this facility, some 290 of our optimizations can take advantage of its availability. Use 291 of promiscuous mode does increase the software overhead on the CPU, 292 but we believe that wireless network speeds are more the inherent 293 limiting factor to performance in current and future systems; we also 294 believe that portions of the protocol are suitable for implementation 295 directly within a programmable network interface unit to avoid this 296 overhead on the CPU [14]. Use of promiscuous mode may also increase 297 the power consumption of the network interface hardware, depending 298 on the design of the receiver hardware, and in such cases, DSR can 299 easily be used without the optimizations that depend on promiscuous 300 receive mode, or can be programmed to only periodically switch the 301 interface into promiscuous mode. Use of promiscuous receive mode is 302 entirely optional. 304 Wireless communication ability between any pair of nodes may at 305 times not work equally well in both directions, due for example to 306 differing antenna or propagation patterns or sources of interference 307 around the two nodes [1, 18]. That is, wireless communications 308 between each pair of nodes will in many cases be able to operate 309 bidirectionally, but at times the wireless link between two nodes 310 may be only unidirectional, allowing one node to successfully send 311 packets to the other while no communication is possible in the 312 reverse direction. Although many routing protocols operate correctly 313 only over bidirectional links, DSR can successfully discover and 314 forward packets over paths that contain unidirectional links. Some 315 MAC protocols, however, such as MACA [17], MACAW [2], or IEEE 316 802.11 [11], limit unicast data packet transmission to bidirectional 317 links, due to the required bidirectional exchange of RTS and CTS 318 packets in these protocols and due to the link-layer acknowledgment 319 feature in IEEE 802.11; when used on top of MAC protocols such as 320 these, DSR can take advantage of additional optimizations, such as 321 the ability to reverse a source route to obtain a route back to the 322 origin of the original route. 324 The IP address used by a node using the DSR protocol MAY be assigned 325 by any mechanism (e.g., static assignment or use of DHCP for dynamic 326 assignment [7]), although the method of such assignment is outside 327 the scope of this specification. 329 3. DSR Protocol Overview 331 3.1. Basic DSR Route Discovery 333 When some source node originates a new packet addressed to some 334 destination node, the source node places in the header of the packet 335 a source route giving the sequence of hops that the packet is to 336 follow on its way to the destination. Normally, the sender will 337 obtain a suitable source route by searching its "Route Cache" of 338 routes previously learned; if no route is found in its cache, it will 339 initiate the Route Discovery protocol to dynamically find a new route 340 to this destination node. In this case, we call the source node 341 the "initiator" and the destination node the "target" of the Route 342 Discovery. 344 For example, suppose a node A is attempting to discover a route to 345 node E. The Route Discovery initiated by node A in this example 346 would proceed as follows: 348 ^ "A" ^ "A,B" ^ "A,B,C" ^ "A,B,C,D" 349 | id=2 | id=2 | id=2 | id=2 350 +-----+ +-----+ +-----+ +-----+ +-----+ 351 | A |---->| B |---->| C |---->| D |---->| E | 352 +-----+ +-----+ +-----+ +-----+ +-----+ 353 | | | | 354 v v v v 356 To initiate the Route Discovery, node A transmits a "Route 357 Request" as a single local broadcast packet, which is received by 358 (approximately) all nodes currently within wireless transmission 359 range of A, including node B in this example. Each Route Request 360 identifies the initiator and target of the Route Discovery, and 361 also contains a unique request identification (2, in this example), 362 determined by the initiator of the Request. Each Route Request also 363 contains a record listing the address of each intermediate node 364 through which this particular copy of the Route Request has been 365 forwarded. This route record is initialized to an empty list by the 366 initiator of the Route Discovery. In this example, the route record 367 initially lists only node A. 369 When another node receives this Route Request (such as node B in this 370 example), if it is the target of the Route Discovery, it returns 371 a "Route Reply" to the initiator of the Route Discovery, giving 372 a copy of the accumulated route record from the Route Request; 373 when the initiator receives this Route Reply, it caches this route 374 in its Route Cache for use in sending subsequent packets to this 375 destination. 377 Otherwise, if this node receiving the Route Request has recently seen 378 another Route Request message from this initiator bearing this same 379 request identification and target address, or if this node's own 380 address is already listed in the route record in the Route Request, 381 this node discards the Request. Otherwise, this node appends its 382 own address to the route record in the Route Request and propagates 383 it by transmitting it as a local broadcast packet (with the same 384 request identification). In this example, node B broadcast the Route 385 Request, which is received by node C; nodes C and D each also, in 386 turn, broadcast the Request, resulting in a copy of the Request being 387 received by node E. 389 In returning the Route Reply to the initiator of the Route Discovery, 390 such as in this example, node E replying back to node A, node E will 391 typically examine its own Route Cache for a route back to A, and if 392 found, will use it for the source route for delivery of the packet 393 containing the Route Reply. Otherwise, E SHOULD perform its own 394 Route Discovery for target node A, but to avoid possible infinite 395 recursion of Route Discoveries, it MUST piggyback this Route Reply 396 on the packet containing its own Route Request for A. It is also 397 possible to piggyback other small data packets, such as a TCP SYN 398 packet [28], on a Route Request using this same mechanism. 400 Node E could instead simply reverse the sequence of hops in the route 401 record that it is trying to send in the Route Reply, and use this as 402 the source route on the packet carrying the Route Reply itself. For 403 MAC protocols such as IEEE 802.11 that require a bidirectional frame 404 exchange as part of the MAC protocol [11], the discovered source 405 route MUST be reversed in this way to return the Route Reply since it 406 tests the discovered route to ensure it is bidirectional before the 407 Route Discovery initiator begins using the route; this route reversal 408 also avoids the overhead of a possible second Route Discovery. 409 However, this route reversal technique will prevent the discovery of 410 routes using unidirectional links, and in wireless environments where 411 the use of unidirectional links is permitted, such routes may in some 412 cases be more efficient than those with only bidirectional links, or 413 they may be the only way to achieve connectivity to the target node. 415 When initiating a Route Discovery, the sending node saves a copy of 416 the original packet (that triggered the Discovery) in a local buffer 417 called the "Send Buffer". The Send Buffer contains a copy of each 418 packet that cannot be transmitted by this node because it does not 419 yet have a source route to the packet's destination. Each packet in 420 the Send Buffer is logically associated with the time that it was 421 placed into the Send Buffer and is discarded after residing in the 422 Send Buffer for some timeout period; if necessary for preventing the 423 Send Buffer from overflowing, a FIFO or other replacement strategy 424 MAY also be used to evict packets even before they expire. 426 While a packet remains in the Send Buffer, the node SHOULD 427 occasionally initiate a new Route Discovery for the packet's 428 destination address. However, the node MUST limit the rate at which 429 such new Route Discoveries for the same address are initiated, since 430 it is possible that the destination node is not currently reachable. 431 In particular, due to the limited wireless transmission range and the 432 movement of the nodes in the network, the network may at times become 433 partitioned, meaning that there is currently no sequence of nodes 434 through which a packet could be forwarded to reach the destination. 435 Depending on the movement pattern and the density of nodes in the 436 network, such network partitions may be rare or may be common. 438 If a new Route Discovery was initiated for each packet sent by a 439 node in such a partitioned network, a large number of unproductive 440 Route Request packets would be propagated throughout the subset 441 of the ad hoc network reachable from this node. In order to 442 reduce the overhead from such Route Discoveries, a node SHOULD use 443 an exponential back-off algorithm to limit the rate at which it 444 initiates new Route Discoveries for the same target, doubling the 445 timeout between each successive Discovery initiated for the same 446 target. If the node attempts to send additional data packets to this 447 same destination node more frequently than this limit, the subsequent 448 packets SHOULD be buffered in the Send Buffer until a Route Reply is 449 received giving a route to this destination, but the node MUST NOT 450 initiate a new Route Discovery until the minimum allowable interval 451 between new Route Discoveries for this target has been reached. This 452 limitation on the maximum rate of Route Discoveries for the same 453 target is similar to the mechanism required by Internet nodes to 454 limit the rate at which ARP Requests are sent for any single target 455 IP address [3]. 457 3.2. Basic DSR Route Maintenance 459 When originating or forwarding a packet using a source route, each 460 node transmitting the packet is responsible for confirming that data 461 can flow over the link from that node to the next hop. For example, 462 in the situation shown below, node A has originated a packet for 463 node E using a source route through intermediate nodes B, C, and D: 465 +-----+ +-----+ +-----+ +-----+ +-----+ 466 | A |---->| B |---->| C |-->? | D | | E | 467 +-----+ +-----+ +-----+ +-----+ +-----+ 469 In this case, node A is responsible for the link from A to B, node B 470 is responsible for the link from B to C, node C is responsible for 471 the link from C to D, node D is responsible for the link from D to E. 473 An acknowledgment can provide confirmation that a link is capable of 474 carrying data, and in wireless networks, acknowledgments are often 475 provided at no cost, either as an existing standard part of the MAC 476 protocol in use (such as the link-layer acknowledgment frame defined 477 by IEEE 802.11 [11]), or by a "passive acknowledgment" [16] (in 478 which, for example, B confirms receipt at C by overhearing C transmit 479 the packet when forwarding it on to D). 481 If a built-in acknowledgment mechanism is not available, the node 482 transmitting the packet can explicitly request a DSR-specific 483 software acknowledgment be returned by the next node along the route; 484 this software acknowledgment will normally be transmitted directly 485 to the sending node, but if the link between these two nodes is 486 unidirectional, this software acknowledgment could travel over a 487 different, multi-hop path. 489 After an acknowledgment has been received from some neighbor, a node 490 MAY choose to not require acknowledgments from that neighbor for a 491 brief period of time, unless the network interface connecting a node 492 to that neighbor always receives an acknowledgment in response to 493 unicast traffic. 495 When a software acknowledgment is used, the acknowledgment request 496 SHOULD be retransmitted up to a maximum number of times. A 497 retransmission of the acknowledgment request can be sent as a 498 separate packet, piggybacked on a retransmission of the original 499 data packet, or piggybacked on any packet with the same next-hop 500 destination that does not also contain a software acknowledgment. 502 After the acknowledgment request has been retransmitted the maximum 503 number of times, if no acknowledgment has been received, then the 504 sender treats the link to this next-hop destination as currently 505 "broken". It SHOULD remove this link from its Route Cache and 506 SHOULD return a "Route Error" to each node that has sent a packet 507 routed over that link since an acknowledgment was last received. 508 For example, in the situation shown above, if C does not receive 509 an acknowledgment from D after some number of requests, it would 510 return a Route Error to A, as well as any other node that may have 511 used the link from C to D since C last received an acknowledgment 512 from D. Node A then removes this broken link from its cache; any 513 retransmission of the original packet can be performed by upper 514 layer protocols such as TCP, if necessary. For sending such a 515 retransmission or other packets to this same destination E, if A has 516 in its Route Cache another route to E (for example, from additional 517 Route Replies from its earlier Route Discovery, or from having 518 overheard sufficient routing information from other packets), it 519 can send the packet using the new route immediately. Otherwise, it 520 SHOULD perform a new Route Discovery for this target (subject to the 521 back-off described in Section 3.1). 523 3.3. Additional Route Discovery Features 525 3.3.1. Caching Overheard Routing Information 527 A node forwarding or otherwise overhearing any packet SHOULD add all 528 usable routing information from that packet to its own Route Cache. 529 The usefulness of routing information in a packet depends on the 530 directionality characteristics of the physical medium (Section 2), as 531 well as the MAC protocol being used. Specifically, three distinct 532 cases are possible: 534 - Links in the network frequently are capable of operating only 535 unidirectionally (not bidirectionally), and the MAC protocol in 536 use in the network is capable of transmitting unicast packets 537 over unidirectional links. 539 - Links in the network occasionally are capable of operating only 540 unidirectionally (not bidirectionally), but this unidirectional 541 restriction on any link is not persistent, almost all links 542 are physically bidirectional, and the MAC protocol in use in 543 the network is capable of transmitting unicast packets over 544 unidirectional links. 546 - The MAC protocol in use in the network is not capable of 547 transmitting unicast packets over unidirectional links; 548 only bidirectional links can be used by the MAC protocol for 549 transmitting unicast packets. For example, the IEEE 802.11 550 Distributed Coordination Function (DCF) MAC protocol [11] 551 is capable of transmitting a unicast packet only over a 552 bidirectional link, since the MAC protocol requires the return 553 of a link-level acknowledgment packet from the receiver and also 554 optionally requires the bidirectional exchange of an RTS and CTS 555 packet between the transmitter and receiver nodes. 557 In the first case above, for example, the source route used in a data 558 packet, the accumulated route record in a Route Request, or the route 559 being returned in a Route Reply SHOULD all be cached by any node in 560 the "forward" direction; any node SHOULD cache this information from 561 any such packet received, whether the packet was addressed to this 562 node, sent to a broadcast (or multicast) MAC address, or overheard 563 while the node's network interface is in promiscuous mode. However, 564 the "reverse" direction of the links identified in such packet 565 headers SHOULD NOT be cached. 567 For example, in the situation shown below, node A is using a source 568 route to communicate with node E: 570 +-----+ +-----+ +-----+ +-----+ +-----+ 571 | A |---->| B |---->| C |---->| D |---->| E | 572 +-----+ +-----+ +-----+ +-----+ +-----+ 574 As node C forwards a data packet along the route from A to E, it 575 SHOULD add to its cache the presence of the "forward" direction 576 links that it learns from the headers of these packets, from itself 577 to D and from D to E. Node C SHOULD NOT, in this case, cache the 578 "reverse" direction of the links identified in these packet headers, 579 from itself back to B and from B to A, since these links might be 580 unidirectional. 582 In the second case above, in which links may occasionally operate 583 unidirectionally, the links described above SHOULD be cached in both 584 directions. Furthermore, in this case, if node X overhears (e.g., 585 through promiscuous mode) a packet transmitted by node C that is 586 using a source route from node A to E, node X SHOULD cache all of 587 these links as well, also including the link from C to X over which 588 it overheard the packet. 590 In the final case, in which the MAC protocol requires physical 591 bidirectionality for unicast operation, links from a source route 592 SHOULD be cached in both directions, except when the packet also 593 contains a Route Reply, in which case only the links already 594 traversed in this source route SHOULD be cached, but the links not 595 yet traversed in this route SHOULD NOT be cached. 597 3.3.2. Replying to Route Requests using Cached Routes 599 A node receiving a Route Request for which it is not the target, 600 searches its own Route Cache for a route to the target of the 601 Request. If found, the node generally returns a Route Reply to the 602 initiator itself rather than forwarding the Route Request. In the 603 Route Reply, this node sets the route record to list the sequence of 604 hops over which this copy of the Route Request was forwarded to it, 605 concatenated with the source route to this target obtained from its 606 own Route Cache. 608 However, before transmitting a Route Reply packet that was generated 609 using information from its Route Cache in this way, a node MUST 610 verify that the resulting route being returned in the Route Reply, 611 after this concatenation, contains no duplicate nodes listed in the 612 route record. For example, the figure below illustrates a case in 613 which a Route Request for target E has been received by node F, and 614 node F already has in its Route Cache a route from itself to E: 616 +-----+ +-----+ +-----+ +-----+ 617 | A |---->| B |- >| D |---->| E | 618 +-----+ +-----+ \ / +-----+ +-----+ 619 \ / 620 \ +-----+ / 621 >| C |- 622 +-----+ 623 | ^ 624 v | 625 Route Request +-----+ 626 Route: A - B - C - F | F | Cache: C - D - E 627 +-----+ 629 The concatenation of the accumulated route record from the Route 630 Request and the cached route from F's Route Cache would include a 631 duplicate node in passing from C to F and back to C. 633 Node F in this case could attempt to edit the route to eliminate the 634 duplication, resulting in a route from A to B to C to D and on to E, 635 but in this case, node F would not be on the route that it returned 636 in its own Route Reply. DSR Route Discovery prohibits node F 637 from returning such a Route Reply from its cache; this prohibition 638 increases the probability that the resulting route is valid, since 639 node F in this case should have received a Route Error if the route 640 had previously stopped working. Furthermore, this prohibition 641 means that a future Route Error traversing the route is very likely 642 to pass through any node that sent the Route Reply for the route 643 (including node F), which helps to ensure that stale data is removed 644 from caches (such as at F) in a timely manner; otherwise, the next 645 Route Discovery initiated by A might also be contaminated by a Route 646 Reply from F containing the same stale route. If node F, due to this 647 restriction on returning a Route Reply based on information from its 648 Route Cache, does not return such a Route Reply, node F propagates 649 the Route Request normally. 651 3.3.3. Preventing Route Reply Storms 653 The ability for nodes to reply to a Route Request based on 654 information in their Route Caches, as described in Section 3.3.2, 655 could result in a possible Route Reply "storm" in some cases. In 656 particular, if a node broadcasts a Route Request for a target node 657 for which the node's neighbors have a route in their Route Caches, 658 each neighbor may attempt to send a Route Reply, thereby wasting 659 bandwidth and possibly increasing the number of network collisions in 660 the area. 662 For example, the figure below shows a situation in which nodes B, C, 663 D, E, and F all receive A's Route Request for target G, and each has 664 the indicated route cached for this target: 666 +-----+ +-----+ 667 | D |< >| C | 668 +-----+ \ / +-----+ 669 Cache: C - B - G \ / Cache: B - G 670 \ +-----+ / 671 -| A |- 672 +-----+\ +-----+ +-----+ 673 | | \--->| B | | G | 674 / \ +-----+ +-----+ 675 / \ Cache: G 676 v v 677 +-----+ +-----+ 678 | E | | F | 679 +-----+ +-----+ 680 Cache: F - B - G Cache: B - G 682 Normally, each of these nodes would attempt to reply from its own 683 Route Cache, and they would thus all send their Route Replies at 684 about the same time, since they all received the broadcast Route 685 Request at about the same time. Such simultaneous Route Replies 686 from different nodes all receiving the Route Request may cause local 687 congestion in the wireless network and may create packet collisions 688 among some or all of these Replies if the MAC protocol in use does 689 not provide sufficient collision avoidance for these packets. In 690 addition, it will often be the case that the different replies will 691 indicate routes of different lengths, as shown in this example. 693 In order to reduce these effects, if a node can put its network 694 interface into promiscuous receive mode, it MAY delay sending its 695 own Route Reply for a short period, while listening to see if the 696 initiating node begins using a shorter route first. Specifically, 697 this node MAY delay sending its own Route Reply for a random period 699 d = H * (h - 1 + r) 701 where h is the length in number of network hops for the route to be 702 returned in this node's Route Reply, r is a random floating point 703 number between 0 and 1, and H is a small constant delay (at least 704 twice the maximum wireless link propagation delay) to be introduced 705 per hop. This delay effectively randomizes the time at which each 706 node sends its Route Reply, with all nodes sending Route Replies 707 giving routes of length less than h sending their Replies before this 708 node, and all nodes sending Route Replies giving routes of length 709 greater than h sending their Replies after this node. 711 Within the delay period, this node promiscuously receives all 712 packets, looking for data packets from the initiator of this Route 713 Discovery destined for the target of the Discovery. If such a data 714 packet received by this node during the delay period uses a source 715 route of length less than or equal to h, this node may infer that the 716 initiator of the Route Discovery has already received a Route Reply 717 giving an equally good or better route. In this case, this node 718 SHOULD cancel its delay timer and SHOULD NOT send its Route Reply for 719 this Route Discovery. 721 3.3.4. Route Request Hop Limits 723 Each Route Request message contains a "hop limit" that may be used 724 to limit the number of intermediate nodes allowed to forward that 725 copy of the Route Request. This hop limit is implemented using the 726 Time-to-Live (TTL) field in the IP header of the packet carrying 727 the Route Request. As the Request is forwarded, this limit is 728 decremented, and the Request packet is discarded if the limit reaches 729 zero before finding the target. This Route Request hop limit can be 730 used to implement a variety of algorithms for controlling the spread 731 of a Route Request during a Route Discovery attempt. 733 For example, a node MAY use this hop limit to implement a 734 "non-propagating" Route Request as an initial phase of a Route 735 Discovery. A node using this technique sends its first Route Request 736 attempt for some target node using a hop limit of 1, such that any 737 node receiving the initial transmission of the Route Request will 738 not forward the Request to other nodes by re-broadcasting it. This 739 form of Route Request is called a "non-propagating" Route Request; 740 it provides an inexpensive method for determining if the target is 741 currently a neighbor of the initiator or if a neighbor node has a 742 route to the target cached (effectively using the neighbors' Route 743 Caches as an extension of the initiator's own Route Cache). If no 744 Route Reply is received after a short timeout, then the node sends a 745 "propagating" Route Request (i.e., with no hop limit) for the target 746 node. 748 As another example, a node MAY use this hop limit to implement an 749 "expanding ring" search for the target [14]. A node using this 750 technique sends an initial non-propagating Route Request as described 751 above; if no Route Reply is received for it, the node originates 752 another Route Request with a hop limit of 2. For each Route Request 753 originated, if no Route Reply is received for it, the node doubles 754 the hop limit used on the previous attempt, to progressively explore 755 for the target node without allowing the Route Request to propagate 756 over the entire network. However, this expanding ring search 757 approach could have the effect of increasing the average latency of 758 Route Discovery, since multiple Discovery attempts and timeouts may 759 be needed before discovering a route to the target node. 761 3.4. Additional Route Maintenance Features 763 3.4.1. Packet Salvaging 765 When an intermediate node forwarding a packet detects through Route 766 Maintenance that the next hop along the route for that packet is 767 broken, if the node has another route to the packet's destination in 768 its Route Cache, the node SHOULD "salvage" the packet rather than 769 discarding it. To salvage a packet, the node replaces the original 770 source route on the packet with the route from its Route Cache. The 771 node then forwards the packet to the next node indicated along this 772 source route. For example, in the situation shown in the example of 773 Section 3.2, if node C has another route cached to node E, it can 774 salvage the packet by replacing the original route in the packet with 775 this new route from its own Route Cache, rather than discarding the 776 packet. 778 When salvaging a packet, a count is maintained in the packet of the 779 number of times that it has been salvaged, to prevent a single packet 780 from being salvaged endlessly. Otherwise, it could be possible for 781 the packet to enter a routing loop, as different nodes repeatedly 782 salvage the packet and replace the source route on the packet with 783 routes to each other. 785 As described in Section 3.2, an intermediate node, such as in this 786 case, that detects through Route Maintenance that the next hop along 787 the route for a packet that it is forwarding is broken, the node also 788 SHOULD return a Route Error to the original sender of the packet, 789 identifying the link over which the packet could not be forwarded. 790 If the node sends this Route Error, it SHOULD originate the Route 791 Error before salvaging the packet. 793 3.4.2. Queued Packets Destined over a Broken Link 795 When an intermediate node forwarding a packet detects through Route 796 Maintenance that the next-hop link along the route for that packet 797 is broken, in addition to handling that packet as defined for Route 798 Maintenance, the node SHOULD also handle in a similar way any pending 799 packets that it has queued that are destined over this new broken 800 link. Specifically, the node SHOULD search its Network Interface 801 Queue and Maintenance Buffer (Section 4.5) for packets for which 802 the next-hop link is this new broken link. For each such packet 803 currently queued at this node, the node SHOULD process that packet as 804 follows: 806 - Remove the packet from the node's Network Interface Queue and 807 Maintenance Buffer. 809 - Originate a Route Error for this packet to the original sender of 810 the packet, using the procedure described in Section 6.3.4, as if 811 the node had already reached the maximum number of retransmission 812 attempts for that packet for Route Maintenance. However, in 813 sending such Route Errors for queued packets in response to a 814 single new broken link detected, the node SHOULD send no more 815 than one Route Error to each original sender of any of these 816 packets. 818 - If the node has another route to the packet's IP 819 Destination Address in its Route Cache, the node SHOULD 820 salvage the packet as described in Section 6.3.6. Otherwise, the 821 node SHOULD discard the packet. 823 3.4.3. Automatic Route Shortening 825 Source routes in use MAY be automatically shortened if one or more 826 intermediate nodes in the route become no longer necessary. This 827 mechanism of automatically shortening routes in use is somewhat 828 similar to the use of passive acknowledgments [16]. In particular, 829 if a node is able to overhear a packet carrying a source route (e.g., 830 by operating its network interface in promiscuous receive mode), then 831 this node examines the unexpended portion of that source route. If 832 this node is not the intended next-hop destination for the packet 833 but is named in the later unexpended portion of the packet's source 834 route, then it can infer that the intermediate nodes before itself in 835 the source route are no longer needed in the route. For example, the 836 figure below illustrates an example in which node D has overheard a 837 data packet being transmitted from B to C, for later forwarding to D 838 and to E: 840 +-----+ +-----+ +-----+ +-----+ +-----+ 841 | A |---->| B |---->| C | | D | | E | 842 +-----+ +-----+ +-----+ +-----+ +-----+ 843 \ ^ 844 \ / 845 --------------------- 847 In this case, this node (node D) SHOULD return a "gratuitous" Route 848 Reply to the original sender of the packet (node A). The Route 849 Reply gives the shorter route as the concatenation of the portion of 850 the original source route up through the node that transmitted the 851 overheard packet (node B), plus the suffix of the original source 852 route beginning with the node returning the gratuitous Route Reply 853 (node D). In this example, the route returned in the gratuitous Route 854 Reply message sent from D to A gives the new route as the sequence of 855 hops from A to B to D to E. 857 When deciding whether to return a gratuitous Route Reply in this way, 858 a node MAY factor in additional information beyond the fact that it 859 was able to overhear the packet. For example, the node MAY decide to 860 return the gratuitous Route Reply only when the overheard packet is 861 received with a signal strenth or signal-to-noise ratio above some 862 specific threshold. In addition, each node maintains a Gratuitous 863 Route Reply Table, as described in Section 4.4, to limit the rate at 864 which it originates gratuitous Route Replies for the same returned 865 route. 867 3.4.4. Increased Spreading of Route Error Messages 869 When a source node receives a Route Error for a data packet that 870 it originated, this source node propagates this Route Error to its 871 neighbors by piggybacking it on its next Route Request. In this way, 872 stale information in the caches of nodes around this source node will 873 not generate Route Replies that contain the same invalid link for 874 which this source node received the Route Error. 876 For example, in the situation shown in the example of Section 3.2, 877 node A learns from the Route Error message from C, that the link 878 from C to D is currently broken. It thus removes this link from 879 its own Route Cache and initiates a new Route Discovery (if it has 880 no other route to E in its Route Cache). On the Route Request 881 packet initiating this Route Discovery, node A piggybacks a copy 882 of this Route Error, ensuring that the Route Error spreads well to 883 other nodes, and guaranteeing that any Route Reply that it receives 884 (including those from other node's Route Caches) in response to this 885 Route Request does not contain a route that assumes the existence of 886 this broken link. 888 4. Conceptual Data Structures 890 This document describes the operation of the DSR protocol in terms 891 of a number of conceptual data structures. This section describes 892 each of these data structures and provides an overview of its use 893 in the protocol. In an implementation of the protocol, these data 894 structures MAY be implemented in any manner consistent with the 895 external behavior described in this document. 897 4.1. Route Cache 899 All ad hoc network routing information needed by a node implementing 900 DSR is stored in that node's Route Cache. Each node in the network 901 maintains its own Route Cache. A node adds information to its 902 Route Cache as it learns of new links between nodes in the ad hoc 903 network; for example, a node may learn of new links when it receives 904 a packet carrying a Route Request, Route Reply, or DSR source route. 905 Likewise, a node removes information from its Route Cache as it 906 learns that existing links in the ad hoc network have broken; for 907 example, a node may learn of a broken link when it receives a packet 908 carrying a Route Error or through the link-layer retransmission 909 mechanism reporting a failure in forwarding a packet to its next-hop 910 destination. 912 Anytime a node adds new information to its Route Cache, the node 913 SHOULD check each packet in its own Send Buffer (Section 4.2) to 914 determine whether a route to that packet's IP Destination Address 915 now exists in the node's Route Cache (including the information just 916 added to the Cache). If so, the packet SHOULD then be sent using 917 that route and removed from the Send Buffer. 919 It is possible to interface a DSR network with other networks, 920 external to this DSR network. Such external networks may, for 921 example, be the Internet, or may be other ad hoc networks routed 922 with a routing protocol other than DSR. Such external networks may 923 also be other DSR networks that are treated as external networks 924 in order to improve scalability. The complete handling of such 925 external networks is beyond the scope of this document. However, 926 this document specifies a minimal set of requirements and features 927 necessary to allow nodes only implementing this specification to 928 interoperate correctly with nodes implementing interfaces to such 929 external networks. This minimal set of requirements and features 930 involve the First Hop External (F) and Last Hop External (L) 931 bits in a DSR Source Route option (Section 5.7) and a Route Reply 932 option (Section 5.3) in a packet's DSR header (Section 5). These 933 requirements also include the addition of an External flag bit 934 tagging each link in the Route Cache, copied from the First Hop 935 External (F) and Last Hop External (L) bits in the DSR Source Route 936 option or Route Reply option from which this link was learned. 938 The Route Cache SHOULD support storing more than one route to each 939 destination. In searching the Route Cache for a route to some 940 destination node, the Route Cache is indexed by destination node 941 address. The following properties describe this searching function 942 on a Route Cache: 944 - Each implementation of DSR at any node MAY choose any appropriate 945 strategy and algorithm for searching its Route Cache and 946 selecting a "best" route to the destination from among those 947 found. For example, a node MAY choose to select the shortest 948 route to the destination (the shortest sequence of hops), or it 949 MAY use an alternate metric to select the route from the Cache. 951 - However, if there are multiple cached routes to a destination, 952 the selection of routes when searching the Route Cache MUST 953 prefer routes that do not have the External flag set on any link. 954 This preference will select routes that lead directly to the 955 target node over routes that attempt to reach the target via any 956 external networks connected to the DSR ad hoc network. 958 - In addition, any route selected when searching the Route Cache 959 MUST NOT have the External bit set for any links other than 960 possibly the first link, the last link, or both; the External bit 961 MUST NOT be set for any intermediate hops in the route selected. 963 An implementation of a Route Cache MAY provide a fixed capacity 964 for the cache, or the cache size MAY be variable. The following 965 properties describe the management of available space within a node's 966 Route Cache: 968 - Each implementation of DSR at each node MAY choose any 969 appropriate policy for managing the entries in its Route Cache, 970 such as when limited cache capacity requires a choice of which 971 entries to retain in the Cache. For example, a node MAY chose a 972 "least recently used" (LRU) cache replacement policy, in which 973 the entry last used longest ago is discarded from the cache if a 974 decision needs to be made to allow space in the cache for some 975 new entry being added. 977 - However, the Route Cache replacement policy SHOULD allow routes 978 to be categorized based upon "preference", where routes with a 979 higher preferences are less likely to be removed from the cache. 980 For example, a node could prefer routes for which it initiated 981 a Route Discovery over routes that it learned as the result of 982 promiscuous snooping on other packets. In particular, a node 983 SHOULD prefer routes that it is presently using over those that 984 it is not. 986 Any suitable data structure organization, consistent with this 987 specification, MAY be used to implement the Route Cache in any node. 988 For example, the following two types of organization are possible: 990 - In DSR, the route returned in each Route Reply that is received 991 by the initiator of a Route Discovery (or that is learned from 992 the header of overhead packets, as described in Section 6.1.4) 993 represents a complete path (a sequence of links) leading to the 994 destination node. By caching each of these paths separately, 995 a "path cache" organization for the Route Cache can be formed. 996 A path cache is very simple to implement and easily guarantees 997 that all routes are loop-free, since each individual route from 998 a Route Reply or Route Request or used in a packet is loop-free. 999 To search for a route in a path cache data structure, the sending 1000 node can simply search its Route Cache for any path (or prefix of 1001 a path) that leads to the intended destination node. 1003 This type of organization for the Route Cache in DSR has been 1004 extensively studied through simulation [5, 9, 12, 19] and 1005 through implementation of DSR in a mobile outdoor testbed under 1006 significant workload [20, 21, 22]. 1008 - Alternatively, a "link cache" organization could be used for the 1009 Route Cache, in which each individual link (hop) in the routes 1010 returned in Route Reply packets (or otherwise learned from the 1011 header of overhead packets) is added to a unified graph data 1012 structure of this node's current view of the network topology. 1013 To search for a route in link cache, the sending node must use 1014 a more complex graph search algorithm, such as the well-known 1015 Dijkstra's shortest-path algorithm, to find the current best path 1016 through the graph to the destination node. Such an algorithm is 1017 more difficult to implement and may require significantly more 1018 CPU time to execute. 1020 However, a link cache organization is more powerful than a path 1021 cache organization, in its ability to effectively utilize all of 1022 the potential information that a node might learn about the state 1023 of the network. In particular, links learned from different 1024 Route Discoveries or from the header of any overheard packets can 1025 be merged together to form new routes in the network, but this 1026 is not possible in a path cache due to the separation of each 1027 individual path in the cache. 1029 This type of organization for the Route Cache in DSR, including 1030 the effect of a range of implementation choices, has been studied 1031 through detailed simulation [9]. 1033 The choice of data structure organization to use for the Route Cache 1034 in any DSR implementation is a local matter for each node and affects 1035 only performance; any reasonable choice of organization for the Route 1036 Cache does not affect either correctness or interoperability. 1038 Each entry in the Route Cache SHOULD have a timeout associated 1039 with it, to allow that entry to be deleted if not used within some 1040 time. The particular choice of algorithm and data structure used 1041 to implement the Route Cache SHOULD be considered in choosing the 1042 timeout for entries in the Route Cache. The configuration variable 1043 RouteCacheTimeout defined in Section 9 specifies the timeout to be 1044 applied to entries in the Route Cache, although it is also possible 1045 to instead use an adaptive policy in choosing timeout values rather 1046 than using a single timeout setting for all entries; for example, the 1047 Link-MaxLife cache design (below) uses an adaptive timeout algorithm 1048 and does not use the RouteCacheTimeout configuration variable. 1050 As guidance to implementors, Appendix A describes a type of link 1051 cache known as "Link-MaxLife" that has been shown to outperform 1052 other types of link caches and path caches studied in detailed 1053 simulation [9]. Link-MaxLife is an adaptive link cache in which each 1054 link in the cache has a timeout that is determined dynamically by the 1055 caching node according to its observed past behavior of the two nodes 1056 at the ends of the link; in addition, when selecting a route for a 1057 packet being sent to some destination, among cached routes of equal 1058 length (number of hops) to that destination, Link-MaxLife selects the 1059 route with the longest expected lifetime (highest minimum timeout of 1060 any link in the route). Use of the Link-MaxLife design for the Route 1061 Cache is recommended in implementations of DSR. 1063 4.2. Send Buffer 1065 The Send Buffer of a node implementing DSR is a queue of packets that 1066 cannot be sent by that node because it does not yet have a source 1067 route to each such packet's destination. Each packet in the Send 1068 Buffer is logically associated with the time that it was placed into 1069 the Buffer, and SHOULD be removed from the Send Buffer and silently 1070 discarded after a period of SendBufferTimeout after initially being 1071 placed in the Buffer. If necessary, a FIFO strategy SHOULD be used 1072 to evict packets before they timeout to prevent the buffer from 1073 overflowing. 1075 Subject to the rate limiting defined in Section 6.2, a Route 1076 Discovery SHOULD be initiated as often as possible for the 1077 destination address of any packets residing in the Send Buffer. 1079 4.3. Route Request Table 1081 The Route Request Table of a node implementing DSR records 1082 information about Route Requests that have been recently originated 1083 or forwarded by this node. The table is indexed by IP address. 1085 The Route Request Table on a node records the following information 1086 about nodes to which this node has initiated a Route Request: 1088 - The Time-to-Live (TTL) field used in the IP header of the Route 1089 Request for the last Route Discovery initiated by this node for 1090 that target node. This value allows the node to implement a 1091 variety of algorithms for controlling the spread of its Route 1092 Request on each Route Discovery initiated for a target. As 1093 examples, two possible algorithms for this use of the TTL field 1094 are described in Section 3.3.4. 1096 - The time that this node last originated a Route Request for that 1097 target node. 1099 - The number of consecutive Route Discoveries initiated for this 1100 target since receiving a valid Route Reply giving a route to that 1101 target node. 1103 - The remaining amount of time before which this node MAY next 1104 attempt at a Route Discovery for that target node. When the 1105 node initiates a new Route Discovery for this target node, this 1106 field in the Route Request Table entry for that target node is 1107 initialized to the timeout for that Route Discovery, after which 1108 the node MAY initiate a new Discovery for that target. Until 1109 a valid Route Reply is received for this target node address, 1110 a node MUST implement a back-off algorithm in determining this 1111 timeout value for each successive Route Discovery initiated 1112 for this target using the same Time-to-Live (TTL) value in the 1113 IP header of the Route Request packet. The timeout between 1114 such consecutive Route Discovery initiations SHOULD increase by 1115 doubling the timeout value on each new initiation. 1117 In addition, the Route Request Table on a node also records the 1118 following information about initiator nodes from which this node has 1119 received a Route Request: 1121 - A FIFO cache of size RequestTableIds entries containing the 1122 Identification value and target address from the most recent 1123 Route Requests received by this node from that initiator node. 1125 Nodes SHOULD use an LRU policy to manage the entries in their Route 1126 Request Table. 1128 The number of Identification values to retain in each Route 1129 Request Table entry, RequestTableIds, MUST NOT be unlimited, since, 1130 in the worst case, when a node crashes and reboots, the first 1131 RequestTableIds Route Discoveries it initiates after rebooting 1132 could appear to be duplicates to the other nodes in the network. 1133 In addition, a node SHOULD base its initial Identification value, 1134 used for Route Discoveries after rebooting, on a battery backed-up 1135 clock or other persistent memory device, in order to help avoid 1136 any possible such delay in successfully discovering new routes 1137 after rebooting; if no such source of initial Identification 1138 value is available, a node after rebooting SHOULD base its initial 1139 Identification value on a random number. 1141 4.4. Gratuitous Route Reply Table 1143 The Gratuitous Route Reply Table of a node implementing DSR records 1144 information about "gratuitous" Route Replies sent by this node as 1145 part of automatic route shortening. As described in Section 3.4.3, 1146 a node returns a gratuitous Route Reply when it overhears a packet 1147 transmitted by some node, for which the node overhearing the 1148 packet was not the intended next-hop node but was named later in 1149 the unexpended hops of the source route in that packet; the node 1150 overhearing the packet returns a gratuitous Route Reply to the 1151 original sender of the packet, listing the shorter route (not 1152 including the hops of the source route "skipped over" by this 1153 packet). A node uses its Gratuitous Route Reply Table to limit the 1154 rate at which it originates gratuitous Route Replies to the same 1155 original sender for the same node from which it overheard a packet to 1156 trigger the gratuitous Route Reply. 1158 Each entry in the Gratuitous Route Reply Table of a node contains the 1159 following fields: 1161 - The address of the node to which this node originated a 1162 gratuitous Route Reply. 1164 - The address of the node from which this node overheard the packet 1165 triggering that gratuitous Route Reply. 1167 - The remaining time before which this entry in the Gratuitous 1168 Route Reply Table expires and SHOULD be deleted by the node. 1169 When a node creates a new entry in its Gratuitous Route Reply 1170 Table, the timeout value for that entry should be initialized to 1171 the value GratReplyHoldoff. 1173 When a node overhears a packet that would trigger a gratuitous 1174 Route Reply, if a corresponding entry already exists in the node's 1175 Gratuitous Route Reply Table, then the node SHOULD NOT send a 1176 gratuitous Route Reply for that packet. Otherwise (no corresponding 1177 entry already exists), the node SHOULD create a new entry in its 1178 Gratuitous Route Reply Table to record that gratuitous Route Reply, 1179 with a timeout value of GratReplyHoldoff. 1181 4.5. Network Interface Queue and Maintenance Buffer 1183 Depending on factors such as the structure and organization of 1184 the operating system, protocol stack implementation, network 1185 interface device driver, and network interface hardware, a packet 1186 being transmitted could be queued in a variety of ways. For 1187 example, outgoing packets from the network protocol stack might be 1188 queued at the operating system or link layer, before transmission 1189 by the network interface. The network interface might also 1190 provide a retransmission mechanism for packets, such as occurs in 1191 IEEE 802.11 [11]; the DSR protocol, as part of Route Maintenance, 1192 requires limited buffering of packets already transmitted for 1193 which the reachability of the next-hop destination has not yet been 1194 determined. The operation of DSR is defined here in terms of two 1195 conceptual data structures that together incorporate this queueing 1196 behavior. 1198 The Network Interface Queue of a node implementing DSR is an output 1199 queue of packets from the network protocol stack waiting to be 1200 transmitted by the network interface; for example, in the 4.4BSD 1201 Unix network protocol stack implementation, this queue for a network 1202 interface is represented as a "struct ifqueue" [33]. This queue is 1203 used to hold packets while the network interface is in the process of 1204 transmitting another packet. 1206 The Maintenance Buffer of a node implementing DSR is a queue of 1207 packets sent by this node that are awaiting next-hop reachability 1208 confirmation as part of Route Maintenance. For each packet in 1209 the Maintenance Buffer, a node maintains a count of the number 1210 of retransmissions and the time of the last retransmission. The 1211 Maintenance Buffer MAY be of limited size; when adding a new packet 1212 to the Maintenance Buffer, if the buffer size is insufficient to hold 1213 the new packet, the new packet SHOULD be silently discarded. If, 1214 after MaxMaintRexmt attempts to confirm next-hop reachability of 1215 some node, no confirmation is received, all packets in this node's 1216 Maintenance Buffer with this next-hop destination SHOULD be removed 1217 from the Maintenance Buffer; in this case, the node also SHOULD 1218 originate a Route Error for this packet to each original source of 1219 a packet removed in this way (Section 6.3) and SHOULD salvage each 1220 packet removed in this way (Section 6.3.6) if it has another route 1221 to that packet's IP Destination Address in its Route Cache. The 1222 definition of MaxMaintRexmt conceptually includes any retransmissions 1223 that might be attempted for a packet at the link layer or within 1224 the network interface hardware. The timeout value to use for each 1225 transmission attempt for an acknowledgment request depends on the 1226 type of acknowledgment mechanism used for Route Maintenance for that 1227 attempt, as described in Section 6.3. 1229 4.6. Blacklist 1231 When a node using the DSR protocol is connected through an 1232 interface that requires physically bidirectional links for unicast 1233 transmission, it MUST keep a blacklist. A Blacklist is a table, 1234 indexed by neighbor address, that indicates that the link between 1235 this node and the specified neighbor may not be bidirectional. A 1236 node places another node's address in this list when it believes that 1237 broadcast packets from that other node reach this node, but that 1238 unicast transmission between the two nodes is not possible. For 1239 example, if a node forwarding a Route Reply discovers that the next 1240 hop is unreachable, it places that next hop in the node's blacklist. 1242 Once a node discovers that it can communicate bidirectionally with 1243 one of the nodes listed in the blacklist, it SHOULD remove that node 1244 from the blacklist. For example, if A has B in its blacklist, but 1245 A hears B forward a Route Request with a hop list indicating that 1246 the broadcast from A to B was successful, A SHOULD remove B from its 1247 blacklist. 1249 A node MUST associate a state with each node in the blacklist, 1250 specifying whether the unidirectionality is "questionable" or 1251 "probable." Each time the unreachability is positively determined, 1252 the node SHOULD set the state to "probable." After the unreachability 1253 has not been positively determined for some amount of time, the state 1254 should revert to "questionable." A node MAY expire nodes from its 1255 blacklist after a reasonable amount of time. 1257 5. DSR Header Format 1259 The Dynamic Source Routing protocol makes use of a special header 1260 carrying control information that can be included in any existing IP 1261 packet. This DSR header in a packet contains a small fixed-sized, 1262 4-octet portion, followed by a sequence of zero or more DSR options 1263 carrying optional information. The end of the sequence of DSR 1264 options in the DSR header is implied by total length of the DSR 1265 header. 1267 For IPv4, the DSR header MUST immediately follow the IP header in the 1268 packet. (If a Hop-by-Hop Options extension header, as defined in 1269 IPv6 [6], becomes defined for IPv4, the DSR header MUST immediately 1270 follow the Hop-by-Hop Options extension header, if one is present in 1271 the packet, and MUST otherwise immediately follow the IP header.) 1273 To add a DSR header to a packet, the DSR header is inserted following 1274 the packet's IP header, before any following header such as a 1275 traditional (e.g., TCP or UDP) transport layer header. Specifically, 1276 the Protocol field in the IP header is used to indicate that a DSR 1277 header follows the IP header, and the Next Header field in the DSR 1278 header is used to indicate the type of protocol header (such as a 1279 transport layer header) following the DSR header. 1281 If any headers follow the DSR header in a packet, the total length 1282 of the DSR header (and thus the total, combined length of all DSR 1283 options present) MUST be a multiple of 4 octets. This requirement 1284 preserves the alignment of these following headers in the packet. 1286 5.1. Fixed Portion of DSR Header 1288 The fixed portion of the DSR header is used to carry information that 1289 must be present in any DSR header. This fixed portion of the DSR 1290 header has the following format: 1292 0 1 2 3 1293 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1294 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1295 | Next Header | Reserved | Payload Length | 1296 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1297 . . 1298 . Options . 1299 . . 1300 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1302 Next Header 1304 8-bit selector. Identifies the type of header immediately 1305 following the DSR header. Uses the same values as the IPv4 1306 Protocol field [29]. 1308 Reserved 1310 MUST be sent as 0 and ignored on reception. 1312 Payload Length 1314 The length of the DSR header, excluding the 4-octet fixed 1315 portion. The value of the Payload Length field defines the 1316 total length of all options carried in the DSR header. 1318 Options 1320 Variable-length field; the length of the Options field is 1321 specified by the Payload Length field in this DSR header. 1322 Contains one or more pieces of optional information (DSR 1323 options), encoded in type-length-value (TLV) format (with the 1324 exception of the Pad1 option, described in Section 5.8). 1326 The placement of DSR options following the fixed portion of the DSR 1327 header MAY be padded for alignment. However, due to the typically 1328 limited available wireless bandwidth in ad hoc networks, this padding 1329 is not required, and receiving nodes MUST NOT expect options within a 1330 DSR header to be aligned. 1332 The following types of DSR options are defined in this document for 1333 use within a DSR header: 1335 - Route Request option (Section 5.2) 1337 - Route Reply option (Section 5.3) 1339 - Route Error option (Section 5.4) 1341 - Acknowledgment Request option (Section 5.5) 1343 - Acknowledgment option (Section 5.6) 1345 - DSR Source Route option (Section 5.7) 1347 - Pad1 option (Section 5.8) 1349 - PadN option (Section 5.9) 1351 5.2. Route Request Option 1353 The Route Request option in a DSR header is encoded as follows: 1355 0 1 2 3 1356 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1357 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1358 | Option Type | Opt Data Len | Identification | 1359 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1360 | Target Address | 1361 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1362 | Address[1] | 1363 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1364 | Address[2] | 1365 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1366 | ... | 1367 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1368 | Address[n] | 1369 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1371 IP fields: 1373 Source Address 1375 MUST be set to the address of the node originating this packet. 1376 Intermediate nodes that retransmit the packet to propagate the 1377 Route Request MUST NOT change this field. 1379 Destination Address 1381 MUST be set to the IP limited broadcast address 1382 (255.255.255.255). 1384 Hop Limit (TTL) 1386 MAY be varied from 1 to 255, for example to implement 1387 non-propagating Route Requests and Route Request expanding-ring 1388 searches (Section 3.3.4). 1390 Route Request fields: 1392 Option Type 1394 2 1396 Opt Data Len 1398 8-bit unsigned integer. Length of the option, in octets, 1399 excluding the Option Type and Opt Data Len fields. 1401 Identification 1403 A unique value generated by the initiator (original sender) of 1404 the Route Request. Nodes initiating a Route Request generate 1405 a new Identification value for each Route Request, for example 1406 based on a sequence number counter of all Route Requests 1407 initiated by the node. 1409 This value allows a receiving node to determine whether it 1410 has recently seen a copy of this Route Request: if this 1411 Identification value is found by this receiving node in its 1412 Route Request Table (in the cache of Identification values 1413 in the entry there for this initiating node), this receiving 1414 node MUST discard the Route Request. When propagating a Route 1415 Request, this field MUST be copied from the received copy of 1416 the Route Request being propagated. 1418 Target Address 1420 The address of the node that is the target of the Route 1421 Request. 1423 Address[1..n] 1425 Address[i] is the address of the i-th node recorded in the 1426 Route Request option. The address given in the Source Address 1427 field in the IP header is the address of the initiator of 1428 the Route Discovery and MUST NOT be listed in the Address[i] 1429 fields; the address given in Address[1] is thus the address 1430 of the first node on the path after the initiator. The 1431 number of addresses present in this field is indicated by the 1432 Opt Data Len field in the option (n = (Opt Data Len - 6) / 4). 1433 Each node propagating the Route Request adds its own address to 1434 this list, increasing the Opt Data Len value by 4 octets. 1436 The Route Request option MUST NOT appear more than once within a DSR 1437 header. 1439 5.3. Route Reply Option 1441 The Route Reply option in a DSR header is encoded as follows: 1443 0 1 2 3 1444 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1445 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1446 | Option Type | Opt Data Len |L| Reserved | 1447 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1448 | Address[1] | 1449 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1450 | Address[2] | 1451 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1452 | ... | 1453 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1454 | Address[n] | 1455 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1457 IP fields: 1459 Source Address 1461 Set to the address of the node sending the Route Reply. 1462 In the case of a node sending a reply from its Route 1463 Cache (Section 3.3.2) or sending a gratuitous Route Reply 1464 (Section 3.4.3), this address can differ from the address that 1465 was the target of the Route Discovery. 1467 Destination Address 1469 MUST be set to the address of the source node of the route 1470 being returned. Copied from the Source Address field of the 1471 Route Request generating the Route Reply, or in the case of a 1472 gratuitous Route Reply, copied from the Source Address field of 1473 the data packet triggering the gratuitous Reply. 1475 Route Reply fields: 1477 Option Type 1479 3 1481 Opt Data Len 1483 8-bit unsigned integer. Length of the option, in octets, 1484 excluding the Option Type and Opt Data Len fields. 1486 Last Hop External (L) 1488 Set to indicate that the last hop given by the Route Reply 1489 (the link from Address[n-1] to Address[n]) is actually an 1490 arbitrary path in a network external to the DSR network; the 1491 exact route outside the DSR network is not represented in the 1492 Route Reply. Nodes caching this hop in their Route Cache MUST 1493 flag the cached hop with the External flag. Such hops MUST NOT 1494 be returned in a cached Route Reply generated from this Route 1495 Cache entry, and selection of routes from the Route Cache to 1496 route a packet being sent MUST prefer routes that contain no 1497 hops flagged as External. 1499 Reserved 1501 MUST be sent as 0 and ignored on reception. 1503 Address[1..n] 1505 The source route being returned by the Route Reply. The route 1506 indicates a sequence of hops, originating at the source node 1507 specified in the Destination Address field of the IP header 1508 of the packet carrying the Route Reply, through each of the 1509 Address[i] nodes in the order listed in the Route Reply, 1510 ending with the destination node indicated by Address[n]. 1511 The number of addresses present in the Address[1..n] 1512 field is indicated by the Opt Data Len field in the option 1513 (n = (Opt Data Len - 1) / 4). 1515 A Route Reply option MAY appear one or more times within a DSR 1516 header. 1518 5.4. Route Error Option 1520 The Route Error option in a DSR header is encoded as follows: 1522 0 1 2 3 1523 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1524 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1525 | Option Type | Opt Data Len | Error Type |Reservd|Salvage| 1526 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1527 | Error Source Address | 1528 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1529 | Error Destination Address | 1530 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1531 . . 1532 . Type-Specific Information . 1533 . . 1534 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1536 Option Type 1538 4 1540 Opt Data Len 1542 8-bit unsigned integer. Length of the option, in octets, 1543 excluding the Option Type and Opt Data Len fields. 1545 For the current definition of the Route Error option, 1546 this field MUST be set to 10, plus the size of any 1547 Type-Specific Information present in the Route Error. Further 1548 extensions to the Route Error option format may also be 1549 included after the Type-Specific Information portion of the 1550 Route Error option specified above. The presence of such 1551 extensions will be indicated by the Opt Data Len field. 1552 When the Opt Data Len is greater than that required for 1553 the fixed portion of the Route Error plus the necessary 1554 Type-Specific Information as indicated by the Option Type 1555 value in the option, the remaining octets are interpreted as 1556 extensions. Currently, no such further extensions have been 1557 defined. 1559 Error Type 1561 The type of error encountered. Currently, the following type 1562 value is defined: 1564 1 = NODE_UNREACHABLE 1566 Other values of the Error Type field are reserved for future 1567 use. 1569 Reservd 1571 Reserved. MUST be sent as 0 and ignored on reception. 1573 Salvage 1575 A 4-bit unsigned integer. Copied from the Salvage field in 1576 the DSR Source Route option of the packet triggering the Route 1577 Error. 1579 The "total salvage count" of the Route Error option is derived 1580 from the value in the Salvage field of this Route Error option 1581 and all preceding Route Error options in the packet as follows: 1582 the total salvage count is the sum of, for each such Route 1583 Error option, one plus the value in the Salvage field of that 1584 Route Error option. 1586 Error Source Address 1588 The address of the node originating the Route Error (e.g., the 1589 node that attempted to forward a packet and discovered the link 1590 failure). 1592 Error Destination Address 1594 The address of the node to which the Route Error must be 1595 delivered For example, when the Error Type field is set to 1596 NODE_UNREACHABLE, this field will be set to the address of the 1597 node that generated the routing information claiming that the 1598 hop from the Error Source Address to Unreachable Node Address 1599 (specified in the Type-Specific Information) was a valid hop. 1601 Type-Specific Information 1603 Information specific to the Error Type of this Route Error 1604 message. 1606 Currently, the Type-Specific Information field is defined only for 1607 Route Error messages of type NODE_UNREACHABLE. In this case, the 1608 Type-Specific Information field is defined as follows: 1610 0 1 2 3 1611 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1612 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1613 | Unreachable Node Address | 1614 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1615 Unreachable Node Address 1617 The address of the node that was found to be unreachable 1618 (the next-hop neighbor to which the node with address 1619 Error Source Address was attempting to transmit the packet). 1621 A Route Error option MAY appear one or more times within a DSR 1622 header. 1624 5.5. Acknowledgment Request Option 1626 The Acknowledgment Request option in a DSR header is encoded as 1627 follows: 1629 0 1 2 3 1630 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1631 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1632 | Option Type | Opt Data Len | Identification | 1633 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1635 Option Type 1637 5 1639 Opt Data Len 1641 8-bit unsigned integer. Length of the option, in octets, 1642 excluding the Option Type and Opt Data Len fields. 1644 Identification 1646 The Identification field is set to a unique value and is copied 1647 into the Identification field of the Acknowledgment option when 1648 returned by the node receiving the packet over this hop. 1650 An Acknowledgment Request option MUST NOT appear more than once 1651 within a DSR header. 1653 5.6. Acknowledgment Option 1655 The Acknowledgment option in a DSR header is encoded as follows: 1657 0 1 2 3 1658 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1659 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1660 | Option Type | Opt Data Len | Identification | 1661 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1662 | ACK Source Address | 1663 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1664 | ACK Destination Address | 1665 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1667 Option Type 1669 6 1671 Opt Data Len 1673 8-bit unsigned integer. Length of the option, in octets, 1674 excluding the Option Type and Opt Data Len fields. 1676 Identification 1678 Copied from the Identification field of the Acknowledgment 1679 Request option of the packet being acknowledged. 1681 ACK Source Address 1683 The address of the node originating the acknowledgment. 1685 ACK Destination Address 1687 The address of the node to which the acknowledgment is to be 1688 delivered. 1690 An Acknowledgment option MAY appear one or more times within a DSR 1691 header. 1693 5.7. DSR Source Route Option 1695 The DSR Source Route option in a DSR header is encoded as follows: 1697 0 1 2 3 1698 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1699 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1700 | Option Type | Opt Data Len |F|L|Reservd|Salvage| Segs Left | 1701 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1702 | Address[1] | 1703 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1704 | Address[2] | 1705 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1706 | ... | 1707 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1708 | Address[n] | 1709 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1711 Option Type 1713 7 1715 Opt Data Len 1717 8-bit unsigned integer. Length of the option, in octets, 1718 excluding the Option Type and Opt Data Len fields. For the 1719 format of the DSR Source Route option defined here, this field 1720 MUST be set to the value (n * 4) + 2, where n is the number of 1721 addresses present in the Address[i] fields. 1723 First Hop External (F) 1725 Set to indicate that the first hop indicated by the DSR 1726 Source Route option is actually an arbitrary path in a network 1727 external to the DSR network; the exact route outside the DSR 1728 network is not represented in the DSR Source Route option. 1729 Nodes caching this hop in their Route Cache MUST flag the 1730 cached hop with the External flag. Such hops MUST NOT be 1731 returned in a Route Reply generated from this Route Cache 1732 entry, and selection of routes from the Route Cache to route 1733 a packet being sent MUST prefer routes that contain no hops 1734 flagged as External. 1736 Last Hop External (L) 1738 Set to indicate that the last hop indicated by the DSR Source 1739 Route option is actually an arbitrary path in a network 1740 external to the DSR network; the exact route outside the DSR 1741 network is not represented in the DSR Source Route option. 1742 Nodes caching this hop in their Route Cache MUST flag the 1743 cached hop with the External flag. Such hops MUST NOT be 1744 returned in a Route Reply generated from this Route Cache 1745 entry, and selection of routes from the Route Cache to route 1746 a packet being sent MUST prefer routes that contain no hops 1747 flagged as External. 1749 Reserved 1751 MUST be sent as 0 and ignored on reception. 1753 Salvage 1755 A 4-bit unsigned integer. Count of number of times that 1756 this packet has been salvaged as a part of DSR routing 1757 (Section 3.4.1). 1759 Segments Left (Segs Left) 1761 Number of route segments remaining, i.e., number of explicitly 1762 listed intermediate nodes still to be visited before reaching 1763 the final destination. 1765 Address[1..n] 1767 The sequence of addresses of the source route. In routing 1768 and forwarding the packet, the source route is processed as 1769 described in Sections 6.1.3 and 6.1.5. The number of addresses 1770 present in the Address[1..n] field is indicated by the 1771 Opt Data Len field in the option (n = (Opt Data Len - 2) / 4). 1773 When forwarding a packet along a DSR source route using a DSR Source 1774 Route option in the packet's DSR header, the Destination Address 1775 field in the packet's IP header is always set to the address of the 1776 packet's ultimate destination. A node receiving a packet containing 1777 a DSR header with a DSR Source Route option MUST examine the 1778 indicated source route to determine if it is the intended next-hop 1779 node for the packet and determine how to forward the packet, as 1780 defined in Sections 6.1.4 and 6.1.5. 1782 5.8. Pad1 Option 1784 The Pad1 option in a DSR header is encoded as follows: 1786 +-+-+-+-+-+-+-+-+ 1787 | Option Type | 1788 +-+-+-+-+-+-+-+-+ 1790 Option Type 1792 0 1794 A Pad1 option MAY be included in the Options field of a DSR header 1795 in order to align subsequent DSR options, but such alignment is 1796 not required and MUST NOT be expected by a node receiving a packet 1797 containing a DSR header. 1799 If any headers follow the DSR header in a packet, the total length of 1800 a DSR header, indicated by the Payload Length field in the DSR header 1801 MUST be a multiple of 4 octets. In this case, when building a DSR 1802 header in a packet, sufficient Pad1 or PadN options MUST be included 1803 in the Options field of the DSR header to make the total length a 1804 multiple of 4 octets. 1806 If more than one consecutive octet of padding is being inserted in 1807 the Options field of a DSR header, the PadN option, described next, 1808 SHOULD be used, rather than multiple Pad1 options. 1810 Note that the format of the Pad1 option is a special case; it does 1811 not have an Opt Data Len or Option Data field. 1813 5.9. PadN Option 1815 The PadN option in a DSR header is encoded as follows: 1817 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - 1818 | Option Type | Opt Data Len | Option Data 1819 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - 1821 Option Type 1823 1 1825 Opt Data Len 1827 8-bit unsigned integer. Length of the option, in octets, 1828 excluding the Option Type and Opt Data Len fields. 1830 Option Data 1832 A number of zero-valued octets equal to the Opt Data Len. 1834 A PadN option MAY be included in the Options field of a DSR header 1835 in order to align subsequent DSR options, but such alignment is 1836 not required and MUST NOT be expected by a node receiving a packet 1837 containing a DSR header. 1839 If any headers follow the DSR header in a packet, the total length of 1840 a DSR header, indicated by the Payload Length field in the DSR header 1841 MUST be a multiple of 4 octets. In this case, when building a DSR 1842 header in a packet, sufficient Pad1 or PadN options MUST be included 1843 in the Options field of the DSR header to make the total length a 1844 multiple of 4 octets. 1846 6. Detailed Operation 1848 6.1. General Packet Processing 1850 6.1.1. Originating a Packet 1852 When originating any packet, a node using DSR routing MUST perform 1853 the following sequence of steps: 1855 - Search the node's Route Cache for a route to the address given in 1856 the IP Destination Address field in the packet's header. 1858 - If no such route is found in the Route Cache, then perform 1859 Route Discovery for the Destination Address, as described in 1860 Section 6.2. Initiating a Route Discovery for this target node 1861 address results in the node adding a Route Request option in 1862 a DSR header in this existing packet, or saving this existing 1863 packet to its Send Buffer and initiating the Route Discovery 1864 by sending a separate packet containing such a Route Request 1865 option. If the node chooses to initiate the Route Discovery 1866 by adding the Route Request option to this existing packet, 1867 it will replace the IP Destination Address field with the IP 1868 "limited broadcast" address (255.255.255.255) [3], copying the 1869 original IP Destination Address to the Target Address field of 1870 the new Route Request option added to the packet, as described in 1871 Section 6.2.1. 1873 - If the packet now does not contain a Route Request option, 1874 then this node must have a route to the Destination Address 1875 of the packet; if the node has more than one route to this 1876 Destination Address, the node selects one to use for this packet. 1877 If the length of this route is greater than 1 hop, or if the 1878 node determines to request a DSR network-layer acknowledgment 1879 from the first-hop node in that route, then insert a DSR header 1880 into the packet, as described in Section 6.1.2, and insert a DSR 1881 Source Route option, as described in Section 6.1.3. The source 1882 route in the packet is initialized from the selected route to the 1883 Destination Address of the packet. 1885 - Transmit the packet to the first-hop node address given in 1886 selected source route, using Route Maintenance to determine the 1887 reachability of the next hop, as described in Section 6.3. 1889 6.1.2. Adding a DSR Header to a Packet 1891 A node originating a packet adds a DSR header to the packet, if 1892 necessary, to carry information needed by the routing protocol. A 1893 packet MUST NOT contain more than one DSR header. A DSR header is 1894 added to a packet by performing the following sequence of steps 1895 (these steps assume that the packet contains no other headers that 1896 MUST be located in the packet before the DSR header): 1898 - Insert a DSR header after the IP header but before any other 1899 header that may be present. 1901 - Set the Next Header field of the DSR header to the Protocol 1902 number field of the packet's IP header. 1904 - Set the Protocol field of the packet's IP header to the Protocol 1905 number assigned for a DSR header (TBA???). 1907 6.1.3. Adding a DSR Source Route Option to a Packet 1909 A node originating a packet adds a DSR Source Route option to the 1910 packet, if necessary, in order to carry the source route from this 1911 originating node to the final destination address of the packet. 1912 Specifically, the node adding the DSR Source Route option constructs 1913 the DSR Source Route option and modifies the IP packet according to 1914 the following sequence of steps: 1916 - The node creates a DSR Source Route option, as described in 1917 Section 5.7, and appends it to the DSR header in the packet. 1918 (A DSR header is added, as described in Section 6.1.2, if not 1919 already present.) 1921 - The number of Address[i] fields to include in the DSR Source 1922 Route option (n) is the number of intermediate nodes in the 1923 source route for the packet (i.e., excluding address of the 1924 originating node and the final destination address of the 1925 packet). The Segments Left field in the DSR Source Route option 1926 is initialized equal to n. 1928 - The addresses within the source route for the packet are copied 1929 into sequential Address[i] fields in the DSR Source Route option, 1930 for i = 1, 2, ..., n. 1932 - The First Hop External (F) bit in the DSR Source Route option is 1933 copied from the External bit flagging the first hop in the source 1934 route for the packet, as indicated in the Route Cache. 1936 - The Last Hop External (L) bit in the DSR Source Route option is 1937 copied from the External bit flagging the last hop in the source 1938 route for the packet, as indicated in the Route Cache. 1940 - The Salvage field in the DSR Source Route option is 1941 initialized to 0. 1943 6.1.4. Processing a Received Packet 1945 When a node receives any packet (whether for forwarding, overheard, 1946 or as the final destination of the packet), if that packet contains a 1947 DSR header, then that node MUST process any options contained in that 1948 DSR header, in the order contained there. Specifically: 1950 - If the DSR header contains a Route Request option, the node 1951 SHOULD extract the source route from the Route Request and add 1952 this routing information to its Route Cache, subject to the 1953 conditions identified in Section 3.3.1. The routing information 1954 from the Route Request is the sequence of hop addresses 1956 initiator, Address[1], Address[2], ..., Address[n] 1958 where initiator is the value of the Source Address field in 1959 the IP header of the packet carrying the Route Request (the 1960 address of the initiator of the Route Discovery), and each 1961 Address[i] is a node through which this Route Request has passed, 1962 in turn, during this Route Discovery. The value n here is the 1963 number of addresses recorded in the Route Request option, or 1964 (Opt Data Len - 6) / 4. 1966 After possibly updating the node's Route Cache in response to 1967 the routing information in the Route Request option, the node 1968 MUST then process the Route Request option as described in 1969 Section 6.2.2. 1971 - If the DSR header contains a Route Reply option, the node SHOULD 1972 extract the source route from the Route Reply and add this 1973 routing information to its Route Cache, subject to the conditions 1974 identified in Section 3.3.1. The source route from the Route 1975 Reply is the sequence of hop addresses 1977 initiator, Address[1], Address[2], ..., Address[n] 1979 where initiator is the value of the Destination Address field in 1980 the IP header of the packet carrying the Route Reply (the address 1981 of the initiator of the Route Discovery), and each Address[i] 1982 is a node through which the source route passes, in turn, on 1983 the route to the target of the Route Discovery. Address[n] is 1984 the address of the target. If the Last Hop External (L) bit is 1985 set in the Route Reply, the node MUST flag the last hop from 1986 the Route Reply (the link from Address[n-1] to Address[n]) in 1987 its Route Cache as External. The value n here is the number of 1988 addresses in the source route being returned in the Route Reply 1989 option, or (Opt Data Len - 1) / 4. 1991 After possibly updating the node's Route Cache in response to 1992 the routing information in the Route Reply option, then if the 1993 packet's IP Destination Address matches one of this node's IP 1994 addresses, the node MUST then process the Route Reply option as 1995 described in Section 6.2.5. 1997 - If the DSR header contains a Route Error option, the node MUST 1998 process the Route Error option as described in Section 6.3.5. 2000 - If the DSR header contains an Acknowledgment Request option, the 2001 node MUST process the Acknowledgment Request option as described 2002 in Section 6.3.3. 2004 - If the DSR header contains an Acknowledgment option, then subject 2005 to the conditions identified in Section 3.3.1, the node SHOULD 2006 add to its Route Cache the single link from the node identified 2007 by the ACK Source Address field to the node identified by the 2008 ACK Destination Address field. 2010 After possibly updating the node's Route Cache in response to 2011 the routing information in the Acknowledgment option, the node 2012 MUST then process the Acknowledgment option as described in 2013 Section 6.3.3. 2015 - If the DSR header contains a DSR Source Route option, the node 2016 SHOULD extract the source route from the DSR Source Route and 2017 add this routing information to its Route Cache, subject to the 2018 conditions identified in Section 3.3.1. If the value of the 2019 Salvage field in the DSR Source Route option is zero, then the 2020 routing information from the DSR Source Route is the sequence of 2021 hop addresses 2023 source, Address[1], Address[2], ..., Address[n], destination 2025 and otherwise (Salvage is nonzero), the routing information from 2026 the DSR Source Route is the sequence of hop addresses 2028 Address[1], Address[2], ..., Address[n], destination 2030 where source is the value of the Source Address field in the IP 2031 header of the packet carrying the DSR Source Route option (the 2032 original sender of the packet), each Address[i] is the value in 2033 the Address[i] field in the DSR Source Route, and destination is 2034 the value of the Destination Address field in the packet's IP 2035 header (the last-hop address of the source route). The value n 2036 here is the number of addresses in source route in the DSR Source 2037 Route option, or (Opt Data Len - 2) / 4. 2039 After possibly updating the node's Route Cache in response to 2040 the routing information in the DSR Source Route option, the node 2041 MUST then process the DSR Source Route option as described in 2042 Section 6.1.5. 2044 - Any Pad1 or PadN options in the DSR header are ignored. 2046 Finally, if the Destination Address in the packet's IP header matches 2047 one of this receiving node's own IP address(es), remove the DSR 2048 header and all the included DSR options in the header, and pass the 2049 rest of the packet to the network layer. 2051 6.1.5. Processing a Received DSR Source Route Option 2053 When a node receives a packet containing a DSR Source Route option 2054 (whether for forwarding, overheard, or as the final destination of 2055 the packet), that node SHOULD examine the packet to determine if 2056 the receipt of that packet indicates an opportunity for automatic 2057 route shortening, as described in Section 3.4.3. Specifically, if 2058 this node is not the intended next-hop destination for the packet 2059 but is named in the later unexpended portion of the source route in 2060 the packet's DSR Source Route option, then this packet indicates an 2061 opportunity for automatic route shortening: the intermediate nodes 2062 after the node from which this node overheard the packet and before 2063 this node itself, are no longer necessary in the source route. In 2064 this case, this node SHOULD perform the following sequence of steps 2065 as part of automatic route shortening: 2067 - The node searches its Gratuitous Route Reply Table for an entry 2068 describing a gratuitous Route Reply earlier sent by this node, 2069 for which the original sender of the packet triggering the 2070 gratuitous Route Reply and the transmitting node from which this 2071 node overheard that packet in order to trigger the gratuitous 2072 Route Reply, both match the respective node addresses for this 2073 new received packet. If such an entry is found in the node's 2074 Gratuitous Route Reply Table, the node SHOULD NOT perform 2075 automatic route shortening in response to this receipt of this 2076 packet. 2078 - Otherwise, the node creates an entry for this overheard packet in 2079 its Gratuitous Route Reply Table. The timeout value for this new 2080 entry SHOULD be initialized to the value GratReplyHoldoff. After 2081 this timeout has expired, the node SHOULD delete this entry from 2082 its Gratuitous Route Reply Table. 2084 - After creating the new Gratuitous Route Reply Table entry 2085 above, the node originates a gratuitous Route Reply to the 2086 IP Source Address of this overheard packet, as described in 2087 Section 3.4.3. 2089 If the MAC protocol in use in the network is not capable of 2090 transmitting unicast packets over unidirectional links, as 2091 discussed in Section 3.3.1, then in originating this Route Reply, 2092 the node MUST use a source route for routing the Route Reply 2093 packet that is obtained by reversing the sequence of hops over 2094 which the packet triggering the gratuitous Route Reply was routed 2095 in reaching and being overheard by this node; this reversing of 2096 the route uses the gratuitous Route Reply to test this sequence 2097 of hops for bidirectionality, preventing the gratuitous Route 2098 Reply from being received by the initiator of the Route Discovery 2099 unless each of the hops over which the gratuitous Route Reply is 2100 returned is bidirectional. 2102 - Discard the overheard packet, since the packet has been received 2103 before its normal traversal of the packet's source route would 2104 have caused it to reach this receiving node. Another copy of 2105 the packet will normally arrive at this node as indicated in 2106 the packet's source route; discarding this initial copy of the 2107 packet, which triggered the gratuitous Route Reply, will prevent 2108 the duplication of this packet that would otherwise occur. 2110 If the packet is not discarded as part of automatic route shortening 2111 above, then the node MUST process the option according to the 2112 following sequence of steps: 2114 - If the value of the Segments Left field in the DSR Source Route 2115 option equals 0, then remove the DSR Source Route option from the 2116 DSR header. 2118 - Else, let n equal (Opt Data Len - 2) / 4. This is the number of 2119 addresses in the DSR Source Route option. 2121 - If the value of the Segments Left field is greater than n, then 2122 send an ICMP Parameter Problem, Code 0, message [26] to the IP 2123 Source Address, pointing to the Segments Left field, and discard 2124 the packet. Do not process the DSR Source Route option further. 2126 - Else, decrement the value of the Segments Left field by 1. Let i 2127 equal n minus Segments Left. This is the index of the next 2128 address to be visited in the Address vector. 2130 - If Address[i] or the IP Destination Address is a multicast 2131 address, then discard the packet. Do not process the DSR Source 2132 Route option further. 2134 - If the MTU of the link over which this node would transmit 2135 the packet to forward it to the node Address[i] is less than 2136 the size of the packet, the node MUST either discard the 2137 packet and send an ICMP Packet Too Big message to the packet's 2138 Source Address [26] or fragment it as specified in Section 8. 2140 - Forward the packet to the IP address specified in the Address[i] 2141 field of the IP header, following normal IP forwarding 2142 procedures, including checking and decrementing the Time-to-Live 2143 (TTL) field in the packet's IP header [27, 3]. In this 2144 forwarding of the packet, the next-hop node (identified by 2145 Address[i]) MUST be treated as a direct neighbor node: the 2146 transmission to that next node MUST be done in a single IP 2147 forwarding hop, without Route Discovery and without searching the 2148 Route Cache. 2150 - In forwarding the packet, perform Route Maintenance for the 2151 next hop of the packet, by verifying that the next-hop node is 2152 reachable, as described in Section 6.3. 2154 Multicast addresses MUST NOT appear in a DSR Source Route option or 2155 in the IP Destination Address field of a packet carrying a DSR Source 2156 Route option in a DSR header. 2158 6.2. Route Discovery Processing 2160 Route Discovery is the mechanism by which a node S wishing to send a 2161 packet to a destination node D obtains a source route to D. Route 2162 Discovery is used only when S attempts to send a packet to D and 2163 does not already know a route to D. The node initiating a Route 2164 Discovery is known as the "initiator" of the Route Discovery, and the 2165 destination node for which the Route Discovery is initiated is known 2166 as the "target" of the Route Discovery. 2168 Route Discovery operates entirely on demand, with a node initiating 2169 Route Discovery based on its own origination of new packets for 2170 some destination address to which it does not currently know a 2171 route. Route Discovery does not depend on any periodic or background 2172 exchange of routing information or neighbor node detection at any 2173 layer in the network protocol stack at any node. 2175 The Route Discovery procedure utilizes two types of messages, a Route 2176 Request (Section 5.2) and a Route Reply (Section 5.3), to actively 2177 search the ad hoc network for a route to the desired destination. 2178 These DSR messages MAY be carried in any type of IP packet, through 2179 use of the DSR header as described in Section 5. 2181 Except as discussed in Section 6.3.5, a Route Discovery for a 2182 destination address SHOULD NOT be initiated unless the initiating 2183 node has a packet in its Send Buffer requiring delivery to that 2184 destination. A Route Discovery for a given target node MUST NOT be 2185 initiated unless permitted by the rate-limiting information contained 2186 in the Route Request Table. After each Route Discovery attempt, the 2187 interval between successive Route Discoveries for this target SHOULD 2188 be doubled, up to a maximum of MaxRequestPeriod, until a valid Route 2189 Reply is received for this target. 2191 6.2.1. Originating a Route Request 2193 A node initiating a Route Discovery for some target creates and 2194 initializes a Route Request option in a DSR header in some IP packet. 2195 This MAY be a separate IP packet, used only to carry this Route 2196 Request option, or the node MAY include the Route Request option 2197 in some existing packet that it needs to send to the target node 2198 (e.g., the IP packet originated by this node, that caused the node to 2199 attempt Route Discovery for the destination address of the packet). 2200 The Route Request option MUST be included in a DSR header in the 2201 packet. To initialize the Route Request option, the node performs 2202 the following sequence of steps: 2204 - The Option Type in the option MUST be set to the value 2. 2206 - The Opt Data Len field in the option MUST be set to the value 6. 2207 The total size of the Route Request option when initiated 2208 is 8 octets; the Opt Data Len field excludes the size of the 2209 Option Type and Opt Data Len fields themselves. 2211 - The Identification field in the option MUST be set to a new 2212 value, different from that used for other Route Requests recently 2213 initiated by this node for this same target address. For 2214 example, each node MAY maintain a single counter value for 2215 generating a new Identification value for each Route Request it 2216 initiates. 2218 - The Target Address field in the option MUST be set to the IP 2219 address that is the target of this Route Discovery. 2221 The Source Address in the IP header of this packet MUST be the node's 2222 own IP address. The Destination Address in the IP header of this 2223 packet MUST be the IP "limited broadcast" address (255.255.255.255). 2225 A node MUST maintain in its Route Request Table, information about 2226 Route Requests that it initiates. When initiating a new Route 2227 Request, the node MUST use the information recorded in the Route 2228 Request Table entry for the target of that Route Request, and it MUST 2229 update that information in the table entry for use in the next Route 2230 Request initiated for this target. In particular: 2232 - The Route Request Table entry for a target node records the 2233 Time-to-Live (TTL) field used in the IP header of the Route 2234 Request for the last Route Discovery initiated by this node for 2235 that target node. This value allows the node to implement a 2236 variety of algorithms for controlling the spread of its Route 2237 Request on each Route Discovery initiated for a target. As 2238 examples, two possible algorithms for this use of the TTL field 2239 are described in Section 3.3.4. 2241 - The Route Request Table entry for a target node records the 2242 number of consecutive Route Requests initiated for this target 2243 since receiving a valid Route Reply giving a route to that target 2244 node, and the remaining amount of time before which this node MAY 2245 next attempt at a Route Discovery for that target node. 2247 A node MUST use these values to implement a back-off algorithm to 2248 limit the rate at which this node initiates new Route Discoveries 2249 for the same target address. In particular, until a valid Route 2250 Reply is received for this target node address, the timeout 2251 between consecutive Route Discovery initiations for this target 2252 node with the same hop limit SHOULD increase by doubling the 2253 timeout value on each new initiation. 2255 The behavior of a node processing a packet containing DSR header 2256 with both a DSR Source Route option and a Route Request option is 2257 unspecified. Packets SHOULD NOT contain both a DSR Source Route 2258 option and a Route Request option. 2260 Packets containing a Route Request option SHOULD NOT include 2261 an Acknowledgment Request option, SHOULD NOT expect link-layer 2262 acknowledgment or passive acknowledgment, and SHOULD NOT be 2263 retransmitted. The retransmission of packets containing a Route 2264 Request option is controlled solely by the logic described in this 2265 section. 2267 6.2.2. Processing a Received Route Request Option 2269 When a node receives a packet containing a Route Request option, that 2270 node MUST process the option according to the following sequence of 2271 steps: 2273 - If the Target Address field in the Route Request matches this 2274 node's own IP address, then the node SHOULD return a Route Reply 2275 to the initiator of this Route Request (the Source Address in the 2276 IP header of the packet), as described in Section 6.2.4. The 2277 source route for this Reply is the sequence of hop addresses 2279 initiator, Address[1], Address[2], ..., Address[n], target 2281 where initiator is the address of the initiator of this 2282 Route Request, each Address[i] is an address from the Route 2283 Request, and target is the target of the Route Request (the 2284 Target Address field in the Route Request). The value n here 2285 is the number of addresses recorded in the Route Request, or 2286 (Opt Data Len - 6) / 4. 2288 The node then MUST replace the Destination Address field in 2289 the Route Request packet's IP header with the value in the 2290 Target Address field in the Route Request option, and continue 2291 processing the rest of the Route Request packet normally. The 2292 node MUST NOT process the Route Request option further and MUST 2293 NOT retransmit the Route Request to propagate it to other nodes 2294 as part of the Route Discovery. 2296 - Else, the node MUST examine the route recorded in the Route 2297 Request option (the IP Source Address field and the sequence of 2298 Address[i] fields) to determine if this node's own IP address 2299 already appears in this list of addresses. If so, the node MUST 2300 discard the entire packet carrying the Route Request option. 2302 - Else, if the Route Request through a network interface that 2303 requires physically bidirectional links for unicast transmission, 2304 the node MUST check if the Request was last forwarded by a node 2305 on its blacklist. If such an entry is found, and the state of 2306 the unidirectional link is "probable," then the Request MUST be 2307 silently discarded. 2309 - Else, if the Route Request through a network interface that 2310 requires physically bidirectional links for unicast transmission, 2311 the node MUST check if the Request was last forwarded by a node 2312 on its blacklist. If such an entry is found, and the state of 2313 the unidirectional link is "questionable," then the node MUST 2314 create and unicast a Route Request packet to that previous node, 2315 setting the IP Time-To-Live (TTL) to 1 to prevent the Request 2316 from being propagated. If the node receives a Route Reply in 2317 response to the new Request, it MUST remove the blacklist entry 2318 for that node, and SHOULD continue processing. If the node does 2319 not receive a Reply within some reasonable amount of time, MUST 2320 silently discard the Route Request packet. 2322 - Else, the node MUST search its Route Request Table for an entry 2323 for the initiator of this Route Request (the IP Source Address 2324 field). If such an entry is found in the table, the node MUST 2325 search the cache of Identification values of recently received 2326 Route Requests in that table entry, to determine if an entry 2327 is present in the cache matching the Identification value 2328 and target node address in this Route Request. If such an 2329 (Identification, target address) entry is found in this cache in 2330 this entry in the Route Request Table, then the node MUST discard 2331 the entire packet carrying the Route Request option. 2333 - Else, this node SHOULD further process the Route Request 2334 according to the following sequence of steps: 2336 o Add an entry for this Route Request in its cache of 2337 (Identification, target address) values of recently received 2338 Route Requests. 2340 o Conceptually create a copy of this entire packet and perform 2341 the following steps on the copy of the packet. 2343 o Append this node's own IP address to the list of Address[i] 2344 values in the Route Request, and increase the value of the 2345 Opt Data Len field in the Route Request by 4 (the size of an 2346 IP address). 2348 o This node SHOULD search its own Route Cache for a route 2349 (from itself, as if it were the source of a packet) to the 2350 target of this Route Request. If such a route is found in 2351 its Route Cache, then this node SHOULD follow the procedure 2352 outlined in Section 6.2.3 to return a "cached Route Reply" 2353 to the initiator of this Route Request, if permitted by the 2354 restrictions specified there. 2356 o If the node does not return a cached Route Reply, then this 2357 node SHOULD link-layer re-broadcast this copy of the packet, 2358 with a short jitter delay before the broadcast is sent. The 2359 jitter period SHOULD be chosen as a random period, uniformly 2360 distributed between 0 and BroadcastJitter. 2362 6.2.3. Generating a Route Reply using the Route Cache 2364 As described in Section 3.3.2, it is possible for a node processing a 2365 received Route Request to avoid propagating the Route Request further 2366 toward the target of the Request, if this node has in its Route Cache 2367 a route from itself to this target. Such a Route Reply generated by 2368 a node from its own cached route to the target of a Route Request is 2369 called a "cached Route Reply", and this mechanism can greatly reduce 2370 the overall overhead of Route Discovery on the network by reducing 2371 the flood of Route Requests. The general processing of a received 2372 Route Request is described in Section 6.2.2; this section specifies 2373 the additional requirements that MUST be met before a cached Route 2374 Reply may be generated and returned and specifies the procedure for 2375 returning such a cached Route Reply. 2377 While processing a received Route Request, for a node to possibly 2378 return a cached Route Reply, it MUST have in its Route Cache a route 2379 from itself to the target of this Route Request. However, before 2380 generating a cached Route Reply for this Route Request, the node MUST 2381 verify that there are no duplicate addresses listed in the route 2382 accumulated in the Route Request together with the route from this 2383 node's Route Cache. Specifically, there MUST be no duplicates among 2384 the following addresses: 2386 - The IP Source Address of the packet containing the Route Request, 2388 - The Address[i] fields in the Route Request, and 2390 - The nodes listed in the route obtained from this node's Route 2391 Cache, excluding the address of this node itself (this node 2392 itself is the common point between the route accumulated in the 2393 Route Request and the route obtained from the Route Cache). 2395 If any duplicates exist among these addresses, then the node MUST NOT 2396 send a cached Route Reply. The node SHOULD continue to process the 2397 Route Request as described in Section 6.2.2. 2399 If the Route Request and the route from the Route Cache meet the 2400 restriction above, then the node SHOULD construct and return a cached 2401 Route Reply as follows: 2403 - The source route for this reply is the sequence of hop addresses 2405 initiator, Address[1], Address[2], ..., Address[n], c-route 2407 where initiator is the address of the initiator of this Route 2408 Request, each Address[i] is an address from the Route Request, 2409 and c-route is the sequence of hop addresses in the source route 2410 to this target node, obtained from the node's Route Cache. In 2411 appending this cached route to the source route for the reply, 2412 the address of this node itself MUST be excluded, since it is 2413 already listed as Address[n]. 2415 - Send a Route Reply to the initiator of the Route Request, using 2416 the procedure defined in Section 6.2.4. The initiator of the 2417 Route Request is indicated in the Source Address field in the 2418 packet's IP header. 2420 If the node returns a cached Route Reply as described above, then 2421 the node MUST NOT propagate the Route Request further (i.e., the 2422 node MUST NOT rebroadcast the Route Request). In this case, instead, 2423 if the packet contains no other DSR options and contains no payload 2424 after the DSR header (e.g., the Route Request is not piggybacked 2425 on a TCP or UDP packet), then the node SHOULD simply discard the 2426 packet. Otherwise (if the packet contains other DSR options or 2427 contains any payload after the DSR header), the node SHOULD forward 2428 the packet along the cached route to the target of the Route Request. 2429 Specifically, if the node does so, it MUST use the following 2430 steps: 2432 - Copy the Target Address from the Route Request option in the 2433 DSR header to the Destination Address field in the packet's IP 2434 header. 2436 - Remove the Route Request option from the DSR header in the 2437 packet, and add a DSR Source Route option to the packet's DSR 2438 header. 2440 - In the DSR Source Route option, set the Address[i] fields 2441 to represent the source route found in this node's Route 2442 Cache to the original target of the Route Discovery (the 2443 new IP Destination Address of the packet). Specifically, 2444 the node copies the hop addresses of the source route into 2445 sequential Address[i] fields in the DSR Source Route option, 2446 for i = 1, 2, ..., n. Address[1] here is the address of this 2447 node itself (the first address in the source route found from 2448 this node to the original target of the Route Discovery). The 2449 value n here is the number of hop addresses in this source route, 2450 excluding the destination of the packet (which is instead already 2451 represented in the Destination Address field in the packet's IP 2452 header). 2454 - Initialize the Segments Left field in the DSR Source Route option 2455 to n as defined above. 2457 - The First Hop External (F) bit in the DSR Source Route option is 2458 copied from the External bit flagging the first hop in the source 2459 route for the packet, as indicated in the Route Cache. 2461 - The Last Hop External (L) bit in the DSR Source Route option is 2462 copied from the External bit flagging the last hop in the source 2463 route for the packet, as indicated in the Route Cache. 2465 - The Salvage field in the DSR Source Route option MUST be 2466 initialized to some nonzero value; the particular nonzero value 2467 used SHOULD be MAX_SALVAGE_COUNT. By initializing this field to 2468 a nonzero value, nodes forwarding or overhearing this packet will 2469 not consider a link to exist between the IP Source Address of the 2470 packet and the Address[1] address in the DSR Source Route option 2471 (e.g., they will not attempt to add this to their Route Cache as 2472 a link). By choosing MAX_SALVAGE_COUNT as the nonzero value to 2473 which the node initializes this field, nodes furthermore will not 2474 attempt to salvage this packet. 2476 - Transmit the packet to the next-hop node on the new source route 2477 in the packet, using the forwarding procedure described in 2478 Section 6.1.5. 2480 6.2.4. Originating a Route Reply 2482 A node originates a Route Reply in order to reply to a received and 2483 processed Route Request, according to the procedures described in 2484 Sections 6.2.2 and 6.2.3. The Route Reply is returned in a Route 2485 Reply option (Section 5.3). The Route Reply option MAY be returned 2486 to the initiator of the Route Request in a separate IP packet, used 2487 only to carry this Route Reply option, or it MAY be included in any 2488 other IP packet being sent to this address. 2490 The Route Reply option MUST be included in a DSR header in the packet 2491 returned to the initiator. To initialize the Route Reply option, the 2492 node performs the following sequence of steps: 2494 - The Option Type in the option MUST be set to the value 3. 2496 - The Opt Data Len field in the option MUST be set to the value 2497 (n * 4) + 3, where n is the number of addresses in the source 2498 route being returned (excluding the Route Discovery initiator 2499 node's address). 2501 - The Last Hop External (L) bit in the option MUST be 2502 initialized to 0. 2504 - The Reserved field in the option MUST be initialized to 0. 2506 - The Route Request Identifier MUST be initialized to the 2507 Identifier field of the Route Request that this reply is sent in 2508 response to. 2510 - The sequence of hop addresses in the source route are copied into 2511 the Address[i] fields of the option. Address[1] MUST be set to 2512 the first-hop address of the route after the initiator of the 2513 Route Discovery, Address[n] MUST be set to the last-hop address 2514 of the source route (the address of the target node), and each 2515 other Address[i] MUST be set to the next address in sequence in 2516 the source route being returned. 2518 The Destination Address field in the IP header of the packet carrying 2519 the Route Reply option MUST be set to the address of the initiator 2520 of the Route Discovery (i.e., for a Route Reply being returned in 2521 response to some Route Request, the IP Source Address of the Route 2522 Request). 2524 After creating and initializing the Route Reply option and the IP 2525 packet containing it, send the Route Reply. In sending the Route 2526 Reply from this node (but not from nodes forwarding the Route Reply), 2527 this node SHOULD delay the Reply by a small jitter period chosen 2528 randomly between 0 and BroadcastJitter. 2530 When returning any Route Reply in the case in which the MAC protocol 2531 in use in the network is not capable of transmitting unicast packets 2532 over unidirectional links, the source route used for routing the 2533 Route Reply packet MUST be obtained by reversing the sequence 2534 of hops in the Route Request packet (the source route that is 2535 then returned in the Route Reply). This restriction on returning 2536 a Route Reply enables the Route Reply to test this sequence of 2537 hops for bidirectionality, preventing the Route Reply from being 2538 received by the initiator of the Route Discovery unless each of 2539 the hops over which the Route Reply is returned (and thus each 2540 of the hops in the source route being returned in the Reply) is 2541 bidirectional. 2543 If sending a Route Reply to the initiator of the Route Request 2544 requires performing a Route Discovery, the Route Reply Option MUST 2545 be piggybacked on the packet that contains the Route Request. This 2546 piggybacking prevents a loop wherein the target of the new Route 2547 Request (which was itself the initiator of the original Route 2548 Request) must do another Route Request in order to return its 2549 Route Reply. 2551 If sending the Route Reply to the initiator of the Route Request 2552 does not require performing a Route Discovery, a node SHOULD send a 2553 unicast Route Reply in response to every Route Request it receives 2554 for which it is the target node. 2556 6.2.5. Processing a Received Route Reply Option 2558 Section 6.1.4 describes the general processing for a received packet, 2559 including the addition of routing information from options in the 2560 packet's DSR header to the receiving node's Route Cache. 2562 If the received packet contains a Route Reply, no additional special 2563 processing of the Route Reply option is required beyond what is 2564 described there. As described in Section 4.1 anytime a node adds 2565 new information to its Route Cache (including the information added 2566 from this Route Reply option), the node SHOULD check each packet in 2567 its own Send Buffer (Section 4.2) to determine whether a route to 2568 that packet's IP Destination Address now exists in the node's Route 2569 Cache (including the information just added to the Cache). If so, 2570 the packet SHOULD then be sent using that route and removed from the 2571 Send Buffer. This general procedure handles all processing required 2572 for a received Route Reply option. 2574 When a MAC protocol requires bidirectional links for unicast 2575 transmission, a unidirectional link may be discovered by the 2576 propagation of the Route Request. When the Route Reply is sent over 2577 the reverse path, a forwarding node may discover that the next-hop is 2578 unreachable. In this case, it MUST add the next-hop address to its 2579 blacklist. 2581 6.3. Route Maintenance Processing 2583 Route Maintenance is the mechanism by which a source node S is able 2584 to detect, while using a source route to some destination node D, 2585 if the network topology has changed such that it can no longer use 2586 its route to D because a link along the route no longer works. When 2587 Route Maintenance indicates that a source route is broken, S can 2588 attempt to use any other route it happens to know to D, or can invoke 2589 Route Discovery again to find a new route for subsequent packets 2590 to D. Route Maintenance for this route is used only when S is 2591 actually sending packets to D. 2593 Specifically, when forwarding a packet, a node MUST attempt 2594 to confirm the reachability of the next-hop node, unless such 2595 confirmation had been received in the last MaintHoldoffTime. 2596 Individual implementations MAY choose to bypass such confirmation 2597 for some limited number of packets, as long as those packets 2598 all fall within MaintHoldoffTime within the last confirmation. 2599 If no confirmation is received after the retransmission of 2600 MaxMaintRexmt acknowledgment requests, after the initial transmission 2601 of the packet, and conceptually including all retransmissions 2602 provided by the MAC layer, the node determines that the link 2603 for this next-hop node of the source route is "broken". This 2604 confirmation from the next-hop node for Route Maintenance can be 2605 implemented using a link-layer acknowledgment (Section 6.3.1), 2606 using a "passive acknowledgment" (Section 6.3.2), or using a 2607 network-layer acknowledgment (Section 6.3.3); the particular strategy 2608 for retransmission timing depends on the type of acknowledgment 2609 mechanism used. When passive acknowledgments are being used, each 2610 retransmitted acknowledgment request SHOULD be explicit software 2611 acknowledgment requests. If no acknowledgment is received after 2612 MaxMaintRexmt retransmissions (if necessary), the node SHOULD 2613 originate a Route Error to the original sender of the packet, as 2614 described in Section 6.3.4. 2616 In deciding whether or not to send a Route Error in response to 2617 attempting to forward a packet from some sender over a broken link, 2618 a node MUST limit the number of consecutive packets from a single 2619 sender that the node attempts to forward over this same broken 2620 link for which the node chooses not to return a Route Error; this 2621 requirement MAY be satisfied by returning a Route Error for each 2622 packet that the node attempts to forward over a broken link. 2624 6.3.1. Using Link-Layer Acknowledgments 2626 If the MAC protocol in use provides feedback as to the successful 2627 delivery of a data packet (such as is provided by the link-layer 2628 acknowledgment frame defined by IEEE 802.11 [11]), then the use 2629 of the DSR Acknowledgment Request and Acknowledgment options 2630 is not necessary. If such link-layer feedback is available, it 2631 SHOULD be used instead of any other acknowledgment mechanism for 2632 Route Maintenance, and the node SHOULD NOT use either passive 2633 acknowledgments or network-layer acknowledgments for Route 2634 Maintenance. 2636 When using link-layer acknowledgments for Route Maintenance, the 2637 retransmission timing and the timing at which retransmission attempts 2638 are scheduled are generally controlled by the particular link layer 2639 implementation in use in the network. For example, in IEEE 802.11, 2640 the link-layer acknowledgment is returned after the data packet as 2641 a part of the basic access method of of the IEEE 802.11 Distributed 2642 Coordination Function (DCF) MAC protocol; the time at which the 2643 acknowledgment is expected to arrive and the time at which the next 2644 retransmission attempt (if necessary) will occur are controlled by 2645 the MAC protocol implementation. 2647 When a node receives a link-layer acknowledgment for any packet in 2648 its Maintenance Buffer, that node SHOULD remove that packet, as well 2649 as any other packets in its Maintenance Buffer with the same next-hop 2650 destination, from its Maintenance Buffer. 2652 6.3.2. Using Passive Acknowledgments 2654 When link-layer acknowledgments are not available, but passive 2655 acknowledgments [16] are available, passive acknowledgments SHOULD be 2656 used for Route Maintenance when originating or forwarding a packet 2657 along any hop other than the last hop (the hop leading to the IP 2658 Destination Address node of the packet). In particular, passive 2659 acknowledgments SHOULD be used for Route Maintenance in such cases if 2660 the node can place its network interface into "promiscuous" receive 2661 mode, and network links used for data packets generally operate 2662 bidirectionally. 2664 A node MUST NOT attempt to use passive acknowledgments for Route 2665 Maintenance for a packet originated or forwarded over its last hop 2666 (the hop leading to the IP Destination Address node of the packet), 2667 since the receiving node will not be forwarding the packet and thus 2668 no passive acknowledgment will be available to be heard by this node. 2669 Beyond this restriction, a node MAY utilize a variety of strategies 2670 in using passive acknowledgments for Route Maintenance of a packet 2671 that it originates or forwards. For example, the following two 2672 strategies are possible: 2674 - Each time a node receives a packet to be forwarded to a node 2675 other than the final destination (the IP Destination Address of 2676 the packet), that node sends the original transmission of that 2677 packet without requesting a network-layer acknowledgment for it. 2678 If no passive acknowledgment is received within PassiveAckTimeout 2679 after this transmission, the node retransmits the packet, again 2680 without requesting a network-layer acknowledgment for it; the 2681 same PassiveAckTimeout timeout value is used for each such 2682 attempt. If no acknowledgment has been received after a total 2683 of TryPassiveAcks retransmissions of the packet, network-layer 2684 acknowledgments (as described in Section 6.3.3) are used for all 2685 remaining attempts for that packet. 2687 - Each node keeps a table of possible next-hop destination nodes, 2688 noting whether or not passive acknowledgments can typically 2689 be expected from transmission to that node, and the expected 2690 latency and jitter of a passive acknowledgment from that node. 2691 Each time a node receives a packet to be forwarded to a node 2692 other than the IP Destination Address, the node checks its table 2693 of next-hop destination nodes to determine whether to use a 2694 passive acknowledgment or a network-layer acknowledgment for 2695 that transmission to that node. The timeout for this packet 2696 can also be derived from this table. A node using this method 2697 SHOULD prefer using passive acknowledgments to network-layer 2698 acknowledgments. 2700 In using passive acknowledgments for a packet that it originates or 2701 forwards, a node considers the later receipt of a new packet (e.g., 2702 with promiscuous receive mode enabled on its network interface) to be 2703 an acknowledgment of this first packet if both of the following two 2704 tests succeed: 2706 - The Source Address, Destination Address, Protocol, 2707 Identification, and Fragment Offset fields in the IP header 2708 of the two packets MUST match [27], and 2710 - If either packet contains a DSR Source Route header, both packets 2711 MUST contain one, and the value in the Segments Left field in the 2712 DSR Source Route header of the new packet MUST be less than that 2713 in the first packet. 2715 When a node hears such a passive acknowledgment for any packet in its 2716 Maintenance Buffer, that node SHOULD remove that packet, as well as 2717 any other packets in its Maintenance Buffer with the same next-hop 2718 destination, from its Maintenance Buffer. 2720 6.3.3. Using Network-Layer Acknowledgments 2722 When a node originates or forwards a packet and has no other 2723 mechanism of acknowledgment available to determine reachability of 2724 the next-hop node in the source route for Route Maintenance, that 2725 node SHOULD request a network-layer acknowledgment from that next-hop 2726 node. To do so, the node inserts an Acknowledgment Request option 2727 in the DSR header in the packet. The Identification field in that 2728 Acknowledgment Request option MUST be set to a value unique over all 2729 packets transmitted by this node to the same next-hop node that are 2730 either unacknowledged or recently acknowledged. 2732 When a node receives a packet containing an Acknowledgment Request 2733 option, then that node performs the following tests on the packet: 2735 - If the indicated next-hop node address for this packet does not 2736 match any of this node's own IP addresses, then this node MUST 2737 NOT process the Acknowledgment Request option. The indicated 2738 next-hop node address is the next Address[i] field in the DSR 2739 Source Route option in the DSR header in the packet, or is the IP 2740 Destination Address in the packet if the packet does not contain 2741 a DSR Source Route option or the Segments Left there is zero. 2743 - If the packet contains an Acknowledgment option, then this node 2744 MUST NOT process the Acknowledgment Request option. 2746 If neither of the tests above fails, then this node MUST process the 2747 Acknowledgment Request option by sending an Acknowledgment option 2748 to the previous-hop node; to do so, the node performs the following 2749 sequence of steps: 2751 - Create a packet and set the IP Protocol field to the protocol 2752 number assigned for a DSR header (TBA???). 2754 - Set the IP Source Address field in this packet to the IP address 2755 of this node, copied from the source route in the DSR Source 2756 Route option in that packet (or from the IP Destination Address 2757 field of the packet, if the packet does not contain a DSR Source 2758 Route option). 2760 - Set the IP Destination Address field in this packet to the IP 2761 address of the previous-hop node, copied from the source route 2762 in the DSR Source Route option in that packet (or from the IP 2763 Source Address field of the packet, if the packet does not 2764 contain a DSR Source Route option). 2766 - Add a DSR header to the packet, and set the DSR header's 2767 Next Header field to the "No Next Header" value. 2769 - Add an Acknowledgment option to the DSR header in the packet; 2770 set the Acknowledgment option's Option Type field to 6 and the 2771 Opt Data Len field to 10. 2773 - Copy the Identification field from the received Acknowledgment 2774 Request option into the Identification field in the 2775 Acknowledgment option. 2777 - Set the ACK Source Address field in the Acknowledgment option to 2778 be the IP Source Address of this new packet (set above to be the 2779 IP address of this node). 2781 - Set the ACK Destination Address field in the Acknowledgment 2782 option to be the IP Destination Address of this new packet (set 2783 above to be the IP address of the previous-hop node). 2785 - Send the packet as described in Section 6.1.1. 2787 Packets containing an Acknowledgment option SHOULD NOT be placed in 2788 the Maintenance Buffer. 2790 When a node receives a packet with both an Acknowledgment option and 2791 an Acknowledgment Request option, if that node is not the destination 2792 of the Acknowledgment option (the IP Destination Address of the 2793 packet), then the Acknowledgment Request option MUST be ignored. 2794 Otherwise (that node is the destination of the Acknowledgment 2795 option), that node MUST process the Acknowledgment Request option 2796 by returning an Acknowledgment option according to the following 2797 sequence of steps: 2799 - Create a packet and set the IP Protocol field to the protocol 2800 number assigned for a DSR header (TBA???). 2802 - Set the IP Source Address field in this packet to the IP address 2803 of this node, copied from the source route in the DSR Source 2804 Route option in that packet (or from the IP Destination Address 2805 field of the packet, if the packet does not contain a DSR Source 2806 Route option). 2808 - Set the IP Destination Address field in this packet to the IP 2809 address of the node originating the Acknowledgment option. 2811 - Add a DSR header to the packet, and set the DSR header's 2812 Next Header field to the "No Next Header" value. 2814 - Add an Acknowledgment option to the DSR header in this packet; 2815 set the Acknowledgment option's Option Type field to 6 and the 2816 Opt Data Len field to 10. 2818 - Copy the Identification field from the received Acknowledgment 2819 Request option into the Identification field in the 2820 Acknowledgment option. 2822 - Set the ACK Source Address field in the option to be the IP 2823 Source Address of this new packet (set above to be the IP address 2824 of this node). 2826 - Set the ACK Destination Address field in the option to be the IP 2827 Destination Address of this new packet (set above to be the IP 2828 address of the node originating the Acknowledgment option.) 2830 - Send the packet directly to the destination. The IP 2831 Destination Address MUST be treated as a direct neighbor node: 2832 the transmission to that node MUST be done in a single IP 2833 forwarding hop, without Route Discovery and without searching 2834 the Route Cache. In addition, this packet MUST NOT contain a 2835 DSR Acknowledgment Request, MUST NOT be retransmitted for Route 2836 Maintenance, and MUST NOT expect a link-layer acknowledgment or 2837 passive acknowledgment. 2839 When using network-layer acknowledgments for Route Maintenance, 2840 a node SHOULD use an adaptive algorithm in determining the 2841 retransmission timeout for each transmission attempt of an 2842 acknowledgment request. For example, a node SHOULD maintain a 2843 separate round-trip time (RTT) estimate for each to which it has 2844 recently attempted to transmit packets, and it SHOULD use this RTT 2845 estimate in setting the timeout for each retransmission attempt 2846 for Route Maintenance. The TCP RTT estimation algorithm has been 2847 shown to work well for this purpose in implementation and testbed 2848 experiments with DSR [20, 22]. 2850 6.3.4. Originating a Route Error 2852 When a node is unable to verify reachability of a next-hop node after 2853 reaching a maximum number of retransmission attempts, a node SHOULD 2854 send a Route Error to the IP Source Address of the packet. When 2855 sending a Route Error for a packet containing either a Route Error 2856 option or an Acknowledgment option, a node SHOULD add these existing 2857 options to its Route Error, subject to the limit described below. 2859 A node transmitting a Route Error MUST perform the following steps: 2861 - Create an IP packet and set the Source Address field in this 2862 packet's IP header to the address of this node. 2864 - If the Salvage field in the DSR Source Route option in the 2865 packet triggering the Route Error is zero, then copy the 2866 Source Address field of the packet triggering the Route Error 2867 into the Destination Address field in the new packet's IP 2868 header; otherwise, copy the Address[1] field from the DSR Source 2869 Route option of the packet triggering the Route Error into the 2870 Destination Address field in the new packet's IP header 2872 - Insert a DSR header into the new packet. 2874 - Add a Route Error Option to the new packet, setting the Error 2875 Type to NODE_UNREACHABLE, the Salvage value to the Salvage 2876 value from the DSR Source Route option of the packet triggering 2877 the Route Error, and the Unreachable Node Address field to 2878 the address of the next-hop node from the original source 2879 route. Set the Error Source Address field to this node's IP 2880 address, and the Error Destination field to the new packet's IP 2881 Destination Address. 2883 - If the packet triggering the Route Error contains any Route Error 2884 or Acknowledgment options, the node MAY append to its Route Error 2885 each of these options, with the following constraints: 2887 o The node MUST NOT include any Route Error option from the 2888 packet triggering the new Route Error, for which the total 2889 salvage count (Section 5.4) of that included Route Error 2890 would be greater than MAX_SALVAGE_COUNT in the new packet. 2892 o If any Route Error option from the packet triggering the new 2893 Route Error is not included in the packet, the node MUST NOT 2894 include any following Route Error or Acknowledgment options 2895 from the packet triggering the new Route Error. 2897 o Any appended options from the packet triggering the Route 2898 Error MUST follow the new Route Error in the packet. 2900 o In appending these options to the new Route Error, the order 2901 of these options from the packet triggering the Route Error 2902 MUST be preserved. 2904 - Send the packet as described in Section 6.1.1. 2906 6.3.5. Processing a Received Route Error Option 2908 When a node receives a packet containing a Route Error option, that 2909 node MUST process the Route Error option according to the following 2910 sequence of steps: 2912 - The node MUST remove from its Route Cache the link from the 2913 node identified by the Error Source Address field to the node 2914 identified by the Unreachable Node Address field (if this link is 2915 present in its Route Cache). If the node implements its Route 2916 Cache as a link cache, as described in Section 4.1, only this 2917 single link is removed; if the node implements its Route Cache as 2918 a path cache, however, all routes (paths) that use this link are 2919 removed. 2921 - If the option following the Route Error is an Acknowledgment 2922 or Route Error option sent by this node (that is, with 2923 Acknowledgment or Error Source Address equal to this node's 2924 address), copy the DSR options following the current Route Error 2925 into a new packet with IP Source Address equal to this node's own 2926 IP address and IP Destination Address equal to the Acknowledgment 2927 or Error Destination Address. Transmit this packet as described 2928 in Section 6.1.1, with the salvage count in the DSR Source Route 2929 option set to the Salvage value of the Route Error. 2931 In addition, after processing the Route Error as described above, 2932 the node MAY initiate a new Route Discovery for any destination node 2933 for which it then has no route in its Route Cache as a result of 2934 processing this Route Error, if the node has indication that a route 2935 to that destination is needed. For example, if the node has an open 2936 TCP connection to some destination node, then if the processing of 2937 this Route Error removed the only route to that destination from this 2938 node's Route Cache, then this node MAY initiate a new Route Discovery 2939 for that destination node. Any node, however, MUST limit the rate at 2940 which it initiates new Route Discoveries for any single destination 2941 address, and any new Route Discovery initiated in this way as part of 2942 processing this Route Error MUST conform to this limit. 2944 6.3.6. Salvaging a Packet 2946 When an intermediate node forwarding a packet detects through Route 2947 Maintenance that the next-hop link along the route for that packet is 2948 broken (Section 6.3), if the node has another route to the packet's 2949 IP Destination Address in its Route Cache, the node SHOULD "salvage" 2950 the packet rather than discarding it. To do so using the route found 2951 in its Route Cache, this node processes the packet as follows: 2953 - If the MAC protocol in use in the network is not capable of 2954 transmitting unicast packets over unidirectional links, as 2955 discussed in Section 3.3.1, then if this packet contains a Route 2956 Reply option, remove and discard the Route Reply option in the 2957 packet; if the DSR header in the packet then contains no DSR 2958 options, remove the DSR header from the packet. If the resulting 2959 packet then contains only an IP header, the node SHOULD NOT 2960 salvage the packet and instead SHOULD discard the entire packet. 2962 When returning any Route Reply in the case in which the MAC 2963 protocol in use in the network is not capable of transmitting 2964 unicast packets over unidirectional links, the source route 2965 used for routing the Route Reply packet MUST be obtained by 2966 reversing the sequence of hops in the Route Request packet (the 2967 source route that is then returned in the Route Reply). This 2968 restriction on returning a Route Reply and on salvaging a packet 2969 that contains a Route Reply option enables the Route Reply to 2970 test this sequence of hops for bidirectionality, preventing the 2971 Route Reply from being received by the initiator of the Route 2972 Discovery unless each of the hops over which the Route Reply is 2973 returned (and thus each of the hops in the source route being 2974 returned in the Reply) is bidirectional. 2976 - Modify the existing DSR Source Route option in the packet so 2977 that the Address[i] fields represent the source route found in 2978 this node's Route Cache to this packet's IP Destination Address. 2979 Specifically, the node copies the hop addresses of the source 2980 route into sequential Address[i] fields in the DSR Source Route 2981 option, for i = 1, 2, ..., n. Address[1] here is the address 2982 of the salvaging node itself (the first address in the source 2983 route found from this node to the IP Destination Address of the 2984 packet). The value n here is the number of hop addresses in this 2985 source route, excluding the destination of the packet (which is 2986 instead already represented in the Destination Address field in 2987 the packet's IP header). 2989 - Initialize the Segments Left field in the DSR Source Route option 2990 to n as defined above. 2992 - The First Hop External (F) bit in the DSR Source Route option is 2993 copied from the External bit flagging the first hop in the source 2994 route for the packet, as indicated in the Route Cache. 2996 - The Last Hop External (L) bit in the DSR Source Route option is 2997 copied from the External bit flagging the last hop in the source 2998 route for the packet, as indicated in the Route Cache. 3000 - The Salvage field in the DSR Source Route option is set to 1 plus 3001 the value of the Salvage field in the DSR Source Route option of 3002 the packet that caused the error. 3004 - Transmit the packet to the next-hop node on the new source route 3005 in the packet, using the forwarding procedure described in 3006 Section 6.1.5. 3008 As described in Section 6.3.4, the node in this case also SHOULD 3009 return a Route Error to the original sender of the packet. If the 3010 node chooses to salvage the packet, it SHOULD do so after originating 3011 the Route Error. 3013 7. Multiple Interface Support 3015 A node in DSR MAY have multiple network interfaces that support 3016 ad hoc network routing. This section describes special packet 3017 processing at such nodes. 3019 A node with multiple network interfaces MUST have some policy for 3020 determining which Request packets are forwarded out which network 3021 interfaces. For example, a node MAY choose to forward all Requests 3022 out all network interfaces. 3024 When a node with multiple network interfaces propagates a Route 3025 Request on an network interface other than the one it received the 3026 Request on, it MUST modify the address list between receipt and 3027 re-propagation as follows: 3029 - Append the address of the incoming interface 3031 - If the incoming interface and outgoing interface differ in 3032 whether or not they require bidirectionality for unicast 3033 transmission, append the address 127.0.0.1 3035 - If the incoming interface and outgoing interface differ in 3036 whether or not unidirectional links are common, append the 3037 address 127.0.0.2 3039 - Append the address of the outgoing interface 3041 When a node forwards a packet containing a source route, it MUST 3042 assume that the next hop is reachable on the incoming interface, 3043 unless the next hop is the address of one of this node's interfaces, 3044 in which case this node MUST process the packet in the same way as if 3045 the node had just received it from that interface. 3047 If a node which previously had multiple network interfaces receives a 3048 packet sent with a source route specifying an interface change to an 3049 interface that is no longer available, it MAY send a Route Error to 3050 the source of the packet without attempting to forward the packet on 3051 the incoming interface, unless the network uses an autoconfiguration 3052 mechanism that may have allowed another node to acquire the now 3053 unused address of the unavailable interface. 3055 Source routes MUST never contain the special addresses 127.0.0.1 and 3056 127.0.0.2. 3058 8. Fragmentation and Reassembly 3060 When a node using DSR wishes to fragment a packet that contains a DSR 3061 header not containing a Route Request option, it MUST perform the 3062 following sequence of steps: 3064 - Remove the DSR header from the packet. 3066 - Fragment the packet. 3068 - IP-in-IP encapsulate each fragment. 3070 - Add the DSR header to each fragment. If a Source Route header is 3071 present in the DSR header, increment the Salvage field. 3073 When a node using the DSR protocol receives an IP-in-IP encapsulated 3074 packet destined to itself, it SHOULD decapsulate the packet and 3075 reassemble any fragments contained inside, in accordance with 3076 RFC 791 [27]. 3078 9. Protocol Constants and Configuration Variables 3080 Any DSR implementation MUST support the following configuration 3081 variables and MUST support a mechanism enabling the value of these 3082 variables to be modified by system management. The specific variable 3083 names are used for demonstration purposes only, and an implementation 3084 is not required to use these names for the configuration variables, 3085 so long as the external behavior of the implementation is consistent 3086 with that described in this document. 3088 For each configuration variable below, the default value is specified 3089 to simplify configuration. In particular, the default values given 3090 below are chosen for a DSR network running over 2 Mbps IEEE 802.11 3091 network interfaces using the Distributed Coordination Function (DCF) 3092 MAC with RTS and CTS [11, 5]. 3094 BroadcastJitter 10 milliseconds 3096 RouteCacheTimeout 300 seconds 3098 SendBufferTimeout 30 seconds 3100 RequestTableSize 64 nodes 3101 RequestTableIds 16 identifiers 3102 MaxRequestRexmt 16 retransmissions 3103 MaxRequestPeriod 10 seconds 3104 RequestPeriod 500 milliseconds 3105 NonpropRequestTimeout 30 milliseconds 3107 RexmtBufferSize 50 packets 3109 MaintHoldoffTime 250 milliseconds 3110 MaxMaintRexmt 2 retransmissions 3112 TryPassiveAcks 1 attempt 3113 PassiveAckTimeout 100 milliseconds 3115 GratReplyHoldoff 1 second 3117 In addition, the following protocol constant MUST be supported by any 3118 implementation of the DSR protocol: 3120 MAX_SALVAGE_COUNT 15 salvages 3122 10. IANA Considerations 3124 This document proposes the use of a DSR header, which requires an IP 3125 Protocol number. 3127 In addition, this document proposes use of the value "No Next Header" 3128 (originally defined for use in IPv6) within an IPv4 packet, to 3129 indicate that no further header follows a DSR header. 3131 11. Security Considerations 3133 This document does not specifically address security concerns. This 3134 document does assume that all nodes participating in the DSR protocol 3135 do so in good faith and without malicious intent to corrupt the 3136 routing ability of the network. In mission-oriented environments 3137 where all the nodes participating in the DSR protocol share a 3138 common goal that motivates their participation in the protocol, the 3139 communications between the nodes can be encrypted at the physical 3140 channel or link layer to prevent attack by outsiders. 3142 Appendix A. Link-MaxLife Cache Description 3144 As guidance to implementors of DSR, the description below outlines 3145 the operation of a possible implementation of a Route Cache for DSR 3146 that has been shown to outperform other other caches studied in 3147 detailed simulations. Use of this design for the Route Cache is 3148 recommended in implementations of DSR. 3150 This cache, called "Link-MaxLife" [9], is a link cache, in that each 3151 individual link (hop) in the routes returned in Route Reply packets 3152 (or otherwise learned from the header of overhead packets) is added 3153 to a unified graph data structure of this node's current view of the 3154 network topology, as described in Section 4.1. To search for a route 3155 in this cache to some destination node, the sending node uses a graph 3156 search algorithm, such as the well-known Dijkstra's shortest-path 3157 algorithm, to find the current best path through the graph to the 3158 destination node. 3160 The Link-MaxLife form of link cache is adaptive in that each link in 3161 the cache has a timeout that is determined dynamically by the caching 3162 node according to its observed past behavior of the two nodes at the 3163 ends of the link; in addition, when selecting a route for a packet 3164 being sent to some destination, among cached routes of equal length 3165 (number of hops) to that destination, Link-MaxLife selects the route 3166 with the longest expected lifetime (highest minimum timeout of any 3167 link in the route). 3169 Specifically, in Link-MaxLife, a link's timeout in the Route Cache 3170 is chosen according to a "Stability Table" maintained by the caching 3171 node. Each entry in a node's Stability Table records the address of 3172 another node and a factor representing the perceived "stability" of 3173 this node. The stability of each other node in a node's Stability 3174 Table is initialized to InitStability. When a link from the Route 3175 Cache is used in routing a packet originated or salvaged by that 3176 node, the stability metric for each of the two endpoint nodes of that 3177 link is incremented by the amount of time since that link was last 3178 used, multiplied by StabilityIncrFactor (StabilityIncrFactor >= 1); 3179 when a link is observed to break and the link is thus removed 3180 from the Route Cache, the stability metric for each of the two 3181 endpoint nodes of that link is multiplied by StabilityDecrFactor 3182 (StabilityDecrFactor < 1). 3184 When a node adds a new link to its Route Cache, the node assigns a 3185 lifetime for that link in the Cache equal to the stability of the 3186 less "stable" of the two endpoint nodes for the link, except that a 3187 link is not allowed to be given a lifetime less than MinLifetime. 3188 When a link is used in a route chosen for a packet originated or 3189 salvaged by this node, the link's lifetime is set to be at least 3190 UseExtends into the future; if the lifetime of that link in the 3191 Route Cache is already further into the future, the lifetime remains 3192 unchanged. 3194 When a node using Link-MaxLife selects a route from its Route Cache 3195 for a packet being originated or salvaged by this node, it selects 3196 the shortest-length route that has the longest expected lifetime 3197 (highest minimum timeout of any link in the route), as opposed to 3198 simply selecting an arbitrary route of shortest length. 3200 The following configuration variables are used in the description 3201 of Link-MaxLife above. The specific variable names are used for 3202 demonstration purposes only, and an implementation is not required 3203 to use these names for these configuration variables. For each 3204 configuration variable below, the default value is specified to 3205 simplify configuration. In particular, the default values given 3206 below are chosen for a DSR network where nodes move at relative 3207 velocities between 12 and 25 seconds per transmission radius. 3209 InitStability 25 seconds 3210 StabilityIncrFactor 4 3211 StabilityDecrFactor 2 3213 MinLifetime 1 second 3214 UseExtends 120 seconds 3216 Appendix B. Location of DSR in the ISO Network Reference Model 3218 When designing DSR, we had to determine at what layer within 3219 the protocol hierarchy to implement ad hoc network routing. We 3220 considered two different options: routing at the link layer (ISO 3221 layer 2) and routing at the network layer (ISO layer 3). Originally, 3222 we opted to route at the link layer for several reasons: 3224 - Pragmatically, running the DSR protocol at the link layer 3225 maximizes the number of mobile nodes that can participate in 3226 ad hoc networks. For example, the protocol can route equally 3227 well between IPv4 [27], IPv6 [6], and IPX [32] nodes. 3229 - Historically [13, 14], DSR grew from our contemplation of 3230 a multi-hop propagating version of the Internet's Address 3231 Resolution Protocol (ARP) [25], as well as from the routing 3232 mechanism used in IEEE 802 source routing bridges [24]. These 3233 are layer 2 protocols. 3235 - Technically, we designed DSR to be simple enough that it could 3236 be implemented directly in the firmware inside wireless network 3237 interface cards [13, 14], well below the layer 3 software within 3238 a mobile node. We see great potential in this for DSR running 3239 inside a cloud of mobile nodes around a fixed base station, 3240 where DSR would act to transparently extend the coverage range 3241 to these nodes. Mobile nodes that would otherwise be unable 3242 to communicate with the base station due to factors such as 3243 distance, fading, or local interference sources could then reach 3244 the base station through their peers. 3246 Ultimately, however, we decided to specify and to implement [20] 3247 DSR as a layer 3 protocol, since this is the only layer at which we 3248 could realistically support nodes with multiple network interfaces of 3249 different types forming an ad hoc network. 3251 Appendix C. Implementation and Evaluation Status 3253 The initial design of the DSR protocol, including DSR's basic Route 3254 Discovery and Route Maintenance mechanisms, was first published in 3255 December 1994 [13], with significant additional design details and 3256 initial simulation results published in early 1996 [14]. 3258 The DSR protocol has been extensively studied since then through 3259 additional detailed simulations. In particular, we have implemented 3260 DSR in the ns-2 network simulator [23, 5] and performed extensive 3261 simulations of DSR using ns-2 (e.g., [5, 19]). We have also 3262 conducted evaluations of different caching strategies documented in 3263 this draft [9]. 3265 We have also implemented the DSR protocol under the FreeBSD 2.2.7 3266 operating system running on Intel x86 platforms. FreeBSD [8] is 3267 based on a variety of free software, including 4.4 BSD Lite from the 3268 University of California, Berkeley. For the environments in which 3269 we used it, this implementation is functionally equivalent to the 3270 version of the DSR protocol specified in this draft. 3272 During the 7 months from August 1998 to February 1999, we designed 3273 and implemented a full-scale physical testbed to enable the 3274 evaluation of ad hoc network performance in the field, in an actively 3275 mobile ad hoc network under realistic communication workloads. The 3276 last week of February and the first week of March of 1999 included 3277 demonstrations of this testbed to a number of our sponsors and 3278 partners, including Lucent Technologies, Bell Atlantic, and DARPA. 3279 A complete description of the testbed is available as a Technical 3280 Report [20]. 3282 We have since ported this implementation of DSR to FreeBSD 3.3, and 3283 we have also added a preliminary version of Quality of Service (QoS) 3284 support for DSR. A demonstration of this modified version of DSR was 3285 presented in July 2000. These QoS features are not included in this 3286 draft, and will be added later in a separate draft on top of the base 3287 protocol specified here. 3289 DSR has also been implemented under Linux by Alex Song at the 3290 University of Queensland, Australia [31]. This implementation 3291 supports the Intel x86 PC platform and the Compaq iPAQ. 3293 The Network and Telecommunications Research Group at Trinity College 3294 Dublin have implemented a version of DSR on Windows CE. 3296 Several other independent groups have also used DSR as a platform for 3297 their own research, or and as a basis of comparison between ad hoc 3298 network routing protocols. 3300 Changes from Previous Version of the Draft 3302 This appendix briefly lists some of the major changes in this 3303 draft relative to the previous version of this same draft, 3304 draft-ietf-manet-dsr-06.txt: 3306 - Added a blacklist mechanism for handling unidirectional links 3307 when the network interface requires bidirectionality. 3309 - Added language describing multiple interface support. 3311 - Described fragmentation and reassembly processing. 3313 - Updated the implementation and evaluation list. 3315 Acknowledgements 3317 The protocol described in this draft has been designed and developed 3318 within the Monarch Project, a research project at Rice University 3319 (previously at Carnegie Mellon University) that is developing 3320 adaptive networking protocols and protocol interfaces to allow truly 3321 seamless wireless and mobile node networking [15, 30]. 3323 The authors would like to acknowledge the substantial contributions 3324 of Josh Broch in helping to design, simulate, and implement the DSR 3325 protocol. Josh is currently on leave of absence from Carnegie Mellon 3326 University at AON Networks. We thank him for his contributions to 3327 earlier versions of this draft. 3329 We would also like to acknowledge the assistance of Robert V. Barron 3330 at Carnegie Mellon University. Bob ported our DSR implementation 3331 from FreeBSD 2.2.7 into FreeBSD 3.3. 3333 Many valuable suggestions came from participants in the IETF process. 3334 We would like to acknowledge Fred Baker, who provided extensive 3335 feedback on our previous draft, as well as the working group chairs, 3336 for their suggestions of previous versions of the draft. 3338 References 3340 [1] David F. Bantz and Frederic J. Bauchot. Wireless LAN Design 3341 Alternatives. IEEE Network, 8(2):43--53, March/April 1994. 3343 [2] Vaduvur Bharghavan, Alan Demers, Scott Shenker, and Lixia 3344 Zhang. MACAW: A Media Access Protocol for Wireless LAN's. In 3345 Proceedings of the ACM SIGCOMM '94 Conference, pages 212--225, 3346 August 1994. 3348 [3] Robert T. Braden, editor. Requirements for Internet 3349 Hosts---Communication Layers. RFC 1122, October 1989. 3351 [4] Scott Bradner. Key words for use in RFCs to Indicate 3352 Requirement Levels. RFC 2119, March 1997. 3354 [5] Josh Broch, David A. Maltz, David B. Johnson, Yih-Chun Hu, 3355 and Jorjeta Jetcheva. A Performance Comparison of Multi-Hop 3356 Wireless Ad Hoc Network Routing Protocols. In Proceedings of 3357 the Fourth Annual ACM/IEEE International Conference on Mobile 3358 Computing and Networking, pages 85--97, October 1998. 3360 [6] Stephen E. Deering and Robert M. Hinden. Internet Protocol 3361 Version 6 (IPv6) Specification. RFC 2460, December 1998. 3363 [7] Ralph Droms. Dynamic Host Configuration Protocol. RFC 2131, 3364 March 1997. 3366 [8] The FreeBSD Project. Project web page available at 3367 http://www.freebsd.org/. 3369 [9] Yih-Chun Hu and David B. Johnson. Caching Strategies in 3370 On-Demand Routing Protocols for Wireless Ad Hoc Networks. In 3371 Proceedings of the Sixth Annual ACM International Conference on 3372 Mobile Computing and Networking, August 2000. 3374 [10] Yih-Chun Hu, David B. Johnson, and David A. Maltz. Flow 3375 State in the Dynamic Source Routing Protocol for Mobile Ad Hoc 3376 Networks. Internet-Draft, draft-ietf-manet-dsrflow-00.txt, 3377 February 2001. Work in progress. 3379 [11] IEEE Computer Society LAN MAN Standards Committee. Wireless 3380 LAN Medium Access Control (MAC) and Physical Layer (PHY) 3381 Specifications, IEEE Std 802.11-1997. The Institute of 3382 Electrical and Electronics Engineers, New York, New York, 1997. 3384 [12] Per Johansson, Tony Larsson, Nicklas Hedman, Bartosz Mielczarek, 3385 and Mikael Degermark. Scenario-based Performance Analysis of 3386 Routing Protocols for Mobile Ad-hoc Networks. In Proceedings 3387 of the Fifth Annual ACM/IEEE International Conference on Mobile 3388 Computing and Networking, pages 195--206, August 1999. 3390 [13] David B. Johnson. Routing in Ad Hoc Networks of Mobile Hosts. 3391 In Proceedings of the IEEE Workshop on Mobile Computing Systems 3392 and Applications, pages 158--163, December 1994. 3394 [14] David B. Johnson and David A. Maltz. Dynamic Source Routing in 3395 Ad Hoc Wireless Networks. In Mobile Computing, edited by Tomasz 3396 Imielinski and Hank Korth, chapter 5, pages 153--181. Kluwer 3397 Academic Publishers, 1996. 3399 [15] David B. Johnson and David A. Maltz. Protocols for Adaptive 3400 Wireless and Mobile Networking. IEEE Personal Communications, 3401 3(1):34--42, February 1996. 3403 [16] John Jubin and Janet D. Tornow. The DARPA Packet Radio Network 3404 Protocols. Proceedings of the IEEE, 75(1):21--32, January 1987. 3406 [17] Phil Karn. MACA---A New Channel Access Method for Packet Radio. 3407 In ARRL/CRRL Amateur Radio 9th Computer Networking Conference, 3408 pages 134--140, September 1990. 3410 [18] Gregory S. Lauer. Packet-Radio Routing. In Routing in 3411 Communications Networks, edited by Martha E. Steenstrup, 3412 chapter 11, pages 351--396. Prentice-Hall, Englewood Cliffs, 3413 New Jersey, 1995. 3415 [19] David A. Maltz, Josh Broch, Jorjeta Jetcheva, and David B. 3416 Johnson. The Effects of On-Demand Behavior in Routing Protocols 3417 for Multi-Hop Wireless Ad Hoc Networks. IEEE Journal on 3418 Selected Areas of Communications, 17(8):1439--1453, August 1999. 3420 [20] David A. Maltz, Josh Broch, and David B. Johnson. Experiences 3421 Designing and Building a Multi-Hop Wireless Ad Hoc Network 3422 Testbed. Technical Report CMU-CS-99-116, School of Computer 3423 Science, Carnegie Mellon University, Pittsburgh, Pennsylvania, 3424 March 1999. 3426 [21] David A. Maltz, Josh Broch, and David B. Johnson. Quantitative 3427 Lessons From a Full-Scale Multi-Hop Wireless Ad Hoc Network 3428 Testbed. In Proceedings of the IEEE Wireless Communications and 3429 Networking Conference, September 2000. 3431 [22] David A. Maltz, Josh Broch, and David B. Johnson. Lessons From 3432 a Full-Scale MultiHop Wireless Ad Hoc Network Testbed. IEEE 3433 Personal Communications, 8(1):8--15, February 2001. 3435 [23] The Network Simulator -- ns-2. Project web page available at 3436 http://www.isi.edu/nsnam/ns/. 3438 [24] Radia Perlman. Interconnections: Bridges and Routers. 3439 Addison-Wesley, Reading, Massachusetts, 1992. 3441 [25] David C. Plummer. An Ethernet Address Resolution Protocol: 3442 Or Converting Network Protocol Addresses to 48.bit Ethernet 3443 Addresses for Transmission on Ethernet Hardware. RFC 826, 3444 November 1982. 3446 [26] J. B. Postel, editor. Internet Control Message Protocol. 3447 RFC 792, September 1981. 3449 [27] J. B. Postel, editor. Internet Protocol. RFC 791, September 3450 1981. 3452 [28] J. B. Postel, editor. Transmission Control Protocol. RFC 793, 3453 September 1981. 3455 [29] Joyce K. Reynolds and Jon Postel. Assigned Numbers. RFC 1700, 3456 October 1994. See also http://www.iana.org/numbers.html. 3458 [30] Rice University Monarch Project. Monarch Project Home Page. 3459 Available at http://www.monarch.cs.rice.edu/. 3461 [31] Alex Song. picoNet II: A Wireless Ad Hoc Network for Mobile 3462 Handheld Devices. Submitted for the degree of Bachelor of 3463 Engineering (Honours) in the division of Electrical Engineering, 3464 Department of Information Technology and Electrical Engineering, 3465 University of Queensland, Australia, October 2001. Available at 3466 http://student.uq.edu.au/~s369677/main.html. 3468 [32] Paul Turner. NetWare Communications Processes. NetWare 3469 Application Notes, Novell Research, pages 25--91, September 3470 1990. 3472 [33] Gary R. Wright and W. Richard Stevens. TCP/IP Illustrated, 3473 Volume 2: The Implementation. Addison-Wesley, Reading, 3474 Massachusetts, 1995. 3476 Chair's Address 3478 The MANET Working Group can be contacted via its current chairs: 3480 M. Scott Corson Phone: +1 908 947-7033 3481 Flarion Technologies, Inc. Email: corson@flarion.com 3482 Bedminster One 3483 135 Route 202/206 South 3484 Bedminster, NJ 07921 3485 USA 3487 Joseph Macker Phone: +1 202 767-2001 3488 Information Technology Division Email: macker@itd.nrl.navy.mil 3489 Naval Research Laboratory 3490 Washington, DC 20375 3491 USA 3493 Authors' Addresses 3495 Questions about this document can also be directed to the authors: 3497 David B. Johnson Phone: +1 713 348-3063 3498 Rice University Fax: +1 713 348-5930 3499 Computer Science Department, MS 132 Email: dbj@cs.rice.edu 3500 6100 Main Street 3501 Houston, TX 77005-1892 3502 USA 3504 David A. Maltz Phone: +1 650 688-3128 3505 AON Networks Fax: +1 650 688-3119 3506 3045 Park Blvd. Email: dmaltz@cs.cmu.edu 3507 Palo Alto, CA 94306 3508 USA 3510 Yih-Chun Hu Phone: +1 412 268-3075 3511 Rice University Fax: +1 412 268-5576 3512 Computer Science Department, MS 132 Email: yihchun@cs.cmu.edu 3513 6100 Main Street 3514 Houston, TX 77005-1892 3515 USA 3517 Jorjeta G. Jetcheva Phone: +1 412 268-3053 3518 Carnegie Mellon University Fax: +1 412 268-5576 3519 Computer Science Department Email: jorjeta@cs.cmu.edu 3520 5000 Forbes Avenue 3521 Pittsburgh, PA 15213-3891 3522 USA