view Side-By-Side changes
IETF MANET Working GroupJosh Broch INTERNET-DRAFTDavid B.JohnsonJohnson, Rice University INTERNET-DRAFT David A.MaltzMaltz, AON Networks 2 March 2001 Yih-Chun Hu, Rice University Jorjeta G. Jetcheva, Carnegie Mellon University22 October 1999The Dynamic Source Routing Protocol for Mobile Ad Hoc Networks<draft-ietf-manet-dsr-03.txt><draft-ietf-manet-dsr-05.txt> Status of This Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC 2026 except that the right to produce derivative works is not granted. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work inprogress."progress". The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft is a submission to the IETF Mobile Ad Hoc Networks (MANET) Working Group. Comments on this draft may be sent to the Working Group at manet@itd.nrl.navy.mil, or may be sent directly to the authors. Johnson, et al Expires 2 September 2001 [Page i] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 Abstract The Dynamic Source Routing protocol (DSR) is a simple and efficient routing protocol designed specifically for use inmobilemulti-hop wireless ad hocnetworks.networks of mobile nodes. DSR allows the network to be completely self-organizing and self-configuring, without the need for any existing network infrastructure or administration. The protocolallowsis composed of the two mechanisms of "Route Discovery" and "Route Maintenance", which work together to allow nodes todynamicallydiscoveraand maintain sourceroute across multiple network hopsroutes toany destinationarbitrary destinations in the ad hoc network.When usingThe use of sourcerouting, eachrouting allows packet routing to berouted carriestrivially loop-free, avoids the need for up-to-date routing information inits headerthecomplete, ordered list ofintermediate nodes through whichthe packet must pass. A key advantage of source routing is that intermediate hops do not needpackets are forwarded, and allows nodes forwarding or overhearing packets tomaintaincache the routing information inorder to route the packets they receive, since the packets themselves already contain allthem for their own future use. All aspects of thenecessary routing information. This, coupled withprotocol operate entirely on-demand, allowing thedynamic, on-demand naturerouting packet overhead ofDSR's Route Discovery, completely eliminatesDSR to scale automatically to only that needed to react to changes in theneed for periodic router advertisements and link status packets, significantly reducingroutes currently in use. This document specifies theoverheadoperation ofDSR, especially during periods whenthenetwork topology is stable and theseDSR protocol for routing unicast IP packetsserve only as keep-alives. Broch,in multi-hop wireless ad hoc networks. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Pagei]ii] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 19992 March 2001 Contents Status of This Memo i Abstractiii 1. Introduction 1 2.Changes 1 3.Assumptions1 4. Terminology 2 4.1. General Terms3 3. DSR Protocol Overview 5 3.1. Basic DSR Route Discovery . . . . . . . . . . . . . . . . 5 3.2. Basic DSR Route Maintenance . . . . . .2 4.2. Specification Language. . . . . . . . . 7 3.3. Additional Route Discovery Features . . . . . . . .4 5. Protocol Overview 5 5.1.. . . 8 3.3.1. Caching Overheard Routing Information . . . . . . 8 3.3.2. Replying to RouteDiscovery andRequests using Cached Routes . 9 3.3.3. Preventing RouteMaintenanceReply Storms . . . . . . . . . .5 5.2. Packet Forwarding10 3.3.4. Route Request Hop Limits . . . . . . . . . . . . 12 3.4. Additional Route Maintenance Features . . . . . . . . . .6 5.3. Multicast Routing13 3.4.1. Packet Salvaging . . . . . . . . . . . . . . . . 13 3.4.2. Automatic Route Shortening . . . .7 6.. . . . . . . 13 3.4.3. Increased Spreading of Route Error Messages . . . 14 4. Conceptual Data Structures7 6.1.15 4.1. Route Cache . . . . . . . . . . . . . . . . . . . . . . .7 6.2.15 4.2. Route Request Table . . . . . . . . . . . . . . . . . . .9 6.3.17 4.3. Send Buffer . . . . . . . . . . . . . . . . . . . . . . .9 6.4.18 4.4. Retransmission Buffer . . . . . . . . . . . . . . . . . .9 7. Packet Formats 11 7.1. Destination Options Headers19 5. DSR Header Format 20 5.1. Fixed Portion of DSR Header . . . . . . . . . . . . . . .11 7.1.1. DSR21 5.2. Route Request Option . . . . . . . . . . . .12 7.2. Hop-by-Hop Options Headers . . .. . . . . . 23 5.3. Route Reply Option . . . . . .14 7.2.1. DSR Route Reply Option. . . . . . . . . . . . .15 7.2.2. DSR25 5.4. Route Error Option . . . . . . . . . . . . .17 7.2.3. DSR Acknowledgment Option .. . . . . . 27 5.5. Acknowledgment Request Option . . . . .18 7.3. DSR Routing Header. . . . . . . . . 29 5.6. Acknowledgment Option . . . . . . . . . .20 8. Detailed Operation 23 8.1. Originating a Data Packet. . . . . . . . 30 5.7. Source Route Option . . . . . . . .23 8.2. Originating a Packet with a DSR Routing Header. . . . .23 8.3. Processing a Routing Header. . . . . . 31 5.8. Pad1 Option . . . . . . . . .24 8.4. Route Discovery. . . . . . . . . . . . . . 33 5.9. PadN Option . . . . . . .25 8.4.1. Originating a Route Request. . . . . . . . . . .25 8.4.2. Processing a Route Request Option. . . . . 34 6. Detailed Operation 35 6.1. General Packet Processing . . .26 8.4.3. Generating Route Replies using the Route Cache.27 8.4.4. Originating a Route Reply. . . . . . . . . . . .28 8.4.5. Processing35 6.1.1. Originating aRoute Reply OptionPacket . . . . . . . . .29 Broch, Johnson, and Maltz Expires 22 April 2000 [Page ii] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 8.5. Route Maintenance. . . . . 35 6.1.2. Adding a DSR Header to a Packet . . . . . . . . .. . . . . . 30 8.5.1. Using Network-Layer Acknowledgments . . . . . . . 30 8.5.2. Using Link Layer Acknowledgments . . . . . . . . 32 8.5.3. Originating a Route Error . . . . . . . . . . . . 32 8.5.4. Processing35 6.1.3. Adding a Source RouteErrorOption to a Packet . . . .. . . . . 33 8.5.5. Salvaging36 6.1.4. Receiving a Packet . . . . . . . . . . . . . . .33 9. Optimizations 35 9.1. Leveraging the36 Johnson, et al Expires 2 September 2001 [Page iii] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 6.1.5. Processing a Received Source RouteCache . .Option . . . . 38 6.2. Route Discovery Processing . . . . . . . . .35 9.1.1. Promiscuous Learning of Source Routes. . . . . .35 9.2. Preventing40 6.2.1. Originating a RouteReply Storms . . .Request . . . . . . . . . . .36 9.3. Piggybacking on40 6.2.2. Processing a Received RouteDiscoveries . . . . . . . . . . . . 37 9.4. Discovering Shorter Routes . . . . . . . . . . . .Request Option . . .37 9.5. Rate Limiting42 6.2.3. Generating Route Replies using the RouteDiscovery Process .Cache . 43 6.2.4. Originating a Route Reply . . . . . .38 9.6. Improved Handling of Route Errors. . . . . . 44 6.2.5. Processing a Route Reply Option . . . . . .39 9.7. Increasing Scalability. . . 46 6.3. Route Maintenance Processing . . . . . . . . . . . . . .39 10. Path-State and Flow-State Mechanisms 40 10.1. Overview47 6.3.1. Using Network-Layer Acknowledgments . . . . . . . 47 6.3.2. Using Link Layer Acknowledgments . . . . . . . . 48 6.3.3. Originating a Route Error . . . . . . . . .40 10.2. Path-State and Flow-State Identifiers. . . 48 6.3.4. Processing a Route Error Option . . . . . . .41 10.3. Path-State Creation, Use, and Maintenance. . 49 6.3.5. Salvaging a Packet . . . . . .42 10.3.1. Creating Path-State for Routing. . . . . . . . .42 10.3.2. Monitoring Characteristics49 7. Constants 50 8. IANA Considerations 51 9. Security Considerations 52 Appendix A. Location of DSR in thePath . . . . . 43 10.3.3. Candidate Metrics . . . . . . . . . . . . . . . . 45 10.4. Flow-State Creation, Use,ISO Network Reference Model 53 Appendix B. Implementation andMaintenance . . . . . . . . 46 10.4.1. Requesting Promises along Existing Paths . . . . 46 10.4.2. Requesting Promises as Part of Route Discovery . 48 10.4.3. Providing Notifications of Changing Path Metrics 49 10.5. Expiration of State from Intermediate Nodes . . . . . . . 50 10.6. Packet Formats . . . . . . . . . . . . . . . . . . . . . 51 10.6.1. Identifier Option . . . . . . . . . . . . . . . . 51 10.6.2. Path-Metrics Option . . . . . . . . . . . . . . . 52 10.6.3. Flow Request Option . . . . . . . . . . . . . . .Evaluation Status 5410.6.4. Encoding Path-Metrics . . . . . . . . . . . . . .Acknowledgements 5511. Constants 58 12. IANA Considerations 59 13. Security Considerations 60 Location of DSR Functions in the ISO Model 61 Implementation Status 62 Acknowledgments 63References6456 Chair's Address66 Broch, Johnson, and Maltz Expires 22 April 2000 [Page iii] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 199959 Authors' Addresses67 Broch,60 Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page iv] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 19992 March 2001 1. IntroductionThis document describesThe Dynamic Source Routing protocol (DSR)[8, 9],[12, 13] is a simple and efficient routing protocoldeveloped by the Monarch Project [10, 19] at Carnegie Mellon Universitydesigned specifically forrouting packetsuse ina mobilemulti-hop wireless ad hocnetwork [5]. Source routing is a routing technique in which the sendernetworks ofa packet determinesmobile nodes. Using DSR, thecomplete sequence ofnetwork is completely self-organizing and self-configuring, requiring no existing network infrastructure or administration. Network nodesthrough whichcooperate to forwardthe packet; the sender explicitly lists this route in the packet's header, identifyingpackets for eachforwarding "hop" by the address of the next node to which to transmit the packet on its wayother tothe destination node. DSR offers a number of potential advantagesallow communication overother routing protocols for mobile ad hoc networks. First, DSR uses no periodic routing messagesmultiple "hops" between nodes not directly within wireless transmission range ofany kind (e.g., no router advertisements and no link-level neighbor status messages), thereby significantly reducingone another. As nodes in the networkbandwidth overhead, conserving battery power, reducingmove about or join or leave theprobability of packet collision,network, andavoiding the propagation of potentially large routing updates throughout the ad hoc network. Our Dynamic Source Routing protocol is able to adapt quickly to changesas wireless transmission conditions such asnode movement, yet requires nosources of interference change, all routingprotocol overhead during periods in which no such changes occur. In addition,is automatically determined and maintained by the DSRhas been designed to compute correct routes inrouting protocol. Since thepresence of asymmetric (uni-directional) links. In wireless networks, links may at times operate asymmetrically due to sources of interference, differing radio or antenna capabilities,number orthe intentional usesequence ofasymmetric communication technology such as satellites. Dueintermediate hops needed to reach any destination may change at any time, theexistence of asymmetric links, traditional link-state or distance vector protocolsresulting network topology maycompute routes that do not work. DSR, however, will always findbe quite rich and rapidly changing. The DSR protocol allows nodes to dynamically discover acorrectsource routeevenacross multiple network hops to any destination in thepresencead hoc network. Each data packet sent then carries in its header the complete, ordered list ofasymmetric links. 2. Changes Changes from version 02nodes through which the packet will pass, allowing packet routing toversion 03 (10/1999) - Added description of path-statebe trivially loop-free andflow-state maintenance (Section 10). These extensions removeavoiding the need forevery dataup-to-date routing information in the intermediate nodes through which the packetto carry ais forwarded. By including this sourceroute, thereby decreasingroute in thebyte-overheadheader ofDSR. Theyeach data packet, other nodes forwarding or overhearing any of these packets may alsoprovide a frameworkeasily cache this routing information forsupporting QoS inside DSR networks. 3. Assumptions We assumefuture use. In designing DSR, we sought to create a routing protocol thatall nodes wishinghad very low overhead yet was able tocommunicate with other nodes within the ad hoc network are willingreact quickly toparticipate fullychanges in theBroch, Johnson, and Maltz Expires 22 April 2000 [Page 1] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 protocols of thenetwork.In particular, each node participating in the network should also be willingThe DSR protocol provides highly reactive service toforwardhelp ensure successful delivery of data packetsfor other nodesinthe network. We refer to the minimum numberspite ofhops necessary for a packet to reach from anynodelocated at one extreme edge of themovement or other changes in networkto another node located at the opposite extreme, as the diameterconditions. The DSR protocol is composed ofthe network. We assumetwo mechanisms that work together to allow thediameterdiscovery and maintenance ofansource routes in the ad hocnetwork will be small (e.g., perhaps 5 or 10 hops), but may often be greater than 1. Packets may be lost or corrupted in transmission onnetwork: - Route Discovery is thewireless network. A node receivingmechanism by which acorrupted packet can detect the error and discard the packet. We assume that nodes can enable promiscuous receive mode on their wireless network interface hardware, causing the hardwarenode S wishing todeliver every receivedsend a packet tothe network driver software without filtering based on link-layera destinationaddress. Although we do not require this facility, itnode D obtains a source route to D. Route Discovery isfor example common in current LAN hardware for broadcast media including wireless,used only when S attempts to send a packet to D andsome of our optimizations take advantage of its availability. Use of promiscuous modedoesincreasenot already know a route to D. - Route Maintenance is thesoftware overhead onmechanism by which node S is able to detect, while using a source route to D, if theCPU, but we believe that wirelessnetworkspeeds are more the inherent limiting factor to performance in current and future systems. We also believetopology has changed such thatportions ofit can no longer use its route to D because a link along theprotocol are also suitable for implementation directly withinroute no longer works. When Route Maintenance indicates aprogrammable network interface unitsource route is broken, S can attempt toavoid this overhead on the CPU. 4. Terminology 4.1. General Terms link A communication facilityuse any other route it happens to know to D, ormedium over which nodescancommunicate at the link layer, such as an Ethernet (simple or bridged). A link is the layer immediately below IP. interface A node's attachmentinvoke Route Discovery again to find alink. prefix A bit string that consists of some number of initial bits of an address. Broch,new route for subsequent packets to D. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page2]1] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 interface index An 7-bit quantity which uniquely identifies an interface among a given node's interfaces. Each node can assign interface indices to its interfaces using any scheme it wishes. The index IF_INDEX_MA is reserved2 March 2001 Route Maintenance for this route is used only when S is actually sending packets to D. In DSR, Route Discovery and Route Maintenance each operate entirely "on demand". In particular, unlike other protocols, DSR requires no periodic packets of any kind at any level within the network. For example, DSR does not useby Mobile IP [14] mobility agents (homeany periodic routing advertisement, link status sensing, orforeign agents)neighbor detection packets, and does not rely on these functions from any underlying protocols in the network. This entirely on-demand behavior and lack of periodic activity allows the number of overhead packets caused by DSR toindicate that they believe they can reach a destination via a connected internet infrastructure. The index IF_INDEX_ROUTER is reservedscale all the way down to zero, when all nodes are approximately stationary with respect to each other and all routes needed foruse by routers not actingcurrent communication have already been discovered. As nodes begin to move more or asMobile IP mobility agentscommunication patterns change, the routing packet overhead of DSR automatically scales toindicateonly thatthey believe they can reach the destination via a connected internet infrastructure. The distinction betweenneeded to track theindex for mobility agentsroutes currently in use. Network topology changes not affecting routes currently in use are ignored and do not cause reaction from theindex for routers, allows mobility agentsprotocol. In response toadvertise their existence ``for free''. A node that processesa single Route Discovery (as well as through routingheader listing the interface index IF_INDEX_MA, can then sendinformation from other packets overheard), aunicast Agent Solicitationnode may learn and cache multiple routes to any destination. This allows thecorresponding address in thereaction to routingheaderchanges toobtain complete information aboutbe much more rapid, since a node with multiple routes to a destination can try another cached route if themobility services being provided. link-layer address A link-layer identifier for an interface, such as IEEE 802 addresses on Ethernet links. packet An IP header plus payload. piggybacking Including two or more conceptually different typesone it has been using should fail. This caching ofdata in the same packet so that all data elements move throughmultiple routes also avoids thenetwork together. home address An IP address that is assigned for an extended period of time to a mobile node. It remains unchanged regardlessoverhead ofwhere the node is attachedneeding tothe Internet [14]. Ifperform anode has more than one home address, it SHOULD select and usenew Route Discovery each time asingle home address when participating in the ad hoc network. source route A sourceroutefrom a node S to some node D is an ordered listin use breaks. The operation ofhome addressesboth Route Discovery andinterface indexes that contains all the information that would be neededRoute Maintenance in DSR are designed toforward a packet through Broch, Johnson, and Maltz Expires 22 April 2000 [Page 3] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 the ad hoc network. For each node that will transmit the packet, the source route provides the index of the interface over which the packet should be transmitted,allow uni-directional links andthe address of the node which is intendedasymmetric routes toreceive the packet. DSR Routing Headersbe easily supported. In particular, asdescribednoted in Section7.3 use2, in wireless networks, it is possible that amore compact encodinglink between two nodes may not work equally well in both directions, due to differing antenna or propagation patterns or sources ofthe source routeinterference. DSR allows such uni-directional links to be used when necessary, improving overall performance anddo not explicitly list address Snetwork connectivity in theRouting Header`, since it is carried assystem. This document specifies theIP Source Addressoperation of thepacket. A source route is described as ``broken'' when the specific path it describes through the network is not actually viable. Route Discovery The method inDSRby which a node S dynamically obtains a source route to some node D that will be used by S to routeprotocol for routing unicast IP packetsthrough the network to D. Performing a Route Discovery involves sending one or more Route Request packets. Route Maintenance The processinDSRmulti-hop wireless ad hoc networks. Advanced, optional features, such as Quality ofmonitoring the statusService (QoS) support and efficient multicast routing, are covered in other documents. The specification ofa source route whileDSR inuse, so that any link-failures along the source routethis document provides a compatible base on which such features can bedetected andadded, either independently or by integration with thebroken link removed from use. 4.2. Specification LanguageDSR operation specified here. The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119[3]. Broch,[4]. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page4]2] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 5. Protocol Overview 5.1. Route Discovery and Route Maintenance A source routing protocol must solve two challenges, which DSR terms Route Discovery and Route Maintenance. Route Discovery is the mechanism whereby a node S2 March 2001 2. Assumptions We assume that all nodes wishing tosend a packet to a destination D obtains a source route to D. Route Maintenance is the mechanism whereby S is able to detect, while using a source route to D, ifcommunicate with other nodes within the ad hoc networktopology has changed such that it can no longer use its routeare willing toD because a link alongparticipate fully in theroute no longer works. When Route Maintenance indicates a source route is broken, S can attemptprotocols of the network. In particular, each node participating in the network SHOULD also be willing touse anyforward packets for otherroute it happensnodes in the network. The diameter of an ad hoc network is the minimum number of hops necessary for a packet toknowreach from any node located at one extreme edge of the ad hoc network toD,another node located at the opposite extreme. We assume that this diameter will often be small (e.g., perhaps 5 orcan invoke Route Discovery again to find a new route. To perform Route Discovery,10 hops), but may often be greater than 1. Packets may be lost or corrupted in transmission on thesource node S link-layer broadcastswireless network. We assume that aRoute Request packet. Here,nodeS is termedreceiving a corrupted packet can detect theinitiator oferror and discard theRoute Discovery,packet. Nodes within the ad hoc network MAY move at any time without notice, and MAY even move continuously, but we assume that thenode tospeed with whichSnodes move isattemptingmoderate with respect todiscover a source route, say D, is termedthetargetpacket transmission latency and wireless transmission range of theDiscovery. Eachparticular underlying network hardware in use. In particular, DSR can support very rapid rates of arbitrary node mobility, but we assume thathearsnodes do not continuously move so rapidly as to make theRoute Requestflooding of every individual data packetforwards a copythe only possible routing protocol. A common feature of many network interfaces, including most current LAN hardware for broadcast media such as wireless, is theRequest, if appropriate, by adding its own addressability toa source route being recordedoperate the network interface in "promiscuous" receive mode. This mode causes theRequesthardware to deliver every received packetand then rebroadcastingto theRoute Request. The forwardingnetwork driver software without filtering based on link-layer destination address. Although we do not require this facility, some ofRoute Requests is constructed so that copiesour optimizations can take advantage of its availability. Use of promiscuous mode does increase theRequest propagate hop-by-hop outward from the node initiatingsoftware overhead on theRoute Discovery, until eitherCPU, but we believe that wireless network speeds are more thetargetinherent limiting factor to performance in current and future systems; we also believe that portions of theRequest is found or until another node is found that can supplyprotocol are suitable for implementation directly within arouteprogrammable network interface unit to avoid this overhead on thetarget. The basic mechanismCPU [13]. Use offorwarding Route Requests forwards the Request if the node (1) is notpromiscuous mode may also increase thetargetpower consumption of theRequest, (2) is not already listed innetwork interface hardware, depending on therecorded source route in this copydesign of theRequest,receiver hardware, and(3) has not recently seen another Route Request packet belonging to this same Route Discovery. A node can determine if it has recently seenin sucha Route Request, since each Route Request packet contains a unique identifier for this Route Discovery, generated by the initiator ofcases, DSR can easily be used without theDiscovery. Each node maintains an LRU cache ofoptimizations that depend on promiscuous receive mode, or can be programmed to only periodically switch theunique identifier from each recently received Route Request. By not propagating any copiesinterface into promiscuous mode. Use ofa Request after the first, the overhead of forwarding additional copies that reach this node along different pathspromiscuous receive mode isavoided. In addition, the Time-to-Live field in the IP headerentirely optional. Wireless communication ability between any pair ofthe packet carrying the Route Request MAY be usednodes may at times not work equally well in both directions, due for example tolimit the scope over which the Request will propagate, using the normal behavior of Time-to-Live defined by IP [17, 2]. Additional optimizations on the handling and forwardingdiffering antenna or propagation patterns or sources ofRoute Requests are also used to further reduce the Route Discovery overhead. Broch,interference Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page5]3] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 When2 March 2001 around thetargettwo nodes [1, 17]. That is, wireless communications between each pair of nodes will in many cases be able to operate bi-directionally, but at times theRequest (e.g.,wireless link between two nodes may be only uni-directional, allowing one nodeD) receives the Route Request,to successfully send packets to therecorded source routeother while no communication is possible in theRequest identifies the sequence of hopsreverse direction. Although many routing protocols operate correctly only overwhich this copy of the Request reached D. Node D copies this recorded source route into a Route Reply packetbi-directional links, DSR can successfully discover andsends this Route Reply backforward packets over paths that contain uni-directional links. Some MAC protocols, however, such as MACA [16], MACAW [2], or IEEE 802.11 [10], limit unicast data packet transmission to bi-directional links, due to theinitiatorrequired bi-directional exchange ofthe Route Request (e.g., node S). All source routes learned by a node are keptRTS and CTS packets ina Route Cache, which is usedthese protocols and due tofurther reducethecost of Route Discovery. When a node wishes to send a packet, it examines its own Route Cache and performs Route Discovery only if no suitable source route is foundlink-level acknowledgement feature inits Cache. Further,IEEE 802.11; whensome intermediate node B receives a Route Request from S for some target node D, B not equal D, B searches its own Route Cache for a route to D. If B finds such a route, it might not have to propagate the Route Request, but instead return a Route Reply to node S basedused onthe concatenationtop of MAC protocols such as these, DSR can take advantage of additional optimizations, such as therecordedeasy ability to reverse a source routefrom StoB in the Route Request and the cachedobtain a routefrom Bback toD. The detailsthe origin ofreplying from a Route Cache in this way are discussed in Section 9.1. As a node overhears routes being used by others, either on data packets or on control packetsthe original route. The IP address used byRoute Discovery or Route Maintenance, thea nodeMAY insert those routes into its Route Cache, leveraging the Route Discovery operations of the other nodes inusing thenetwork. Such route informationDSR protocol MAY belearned eitherassigned bypromiscuously snooping on packetsany mechanism (e.g., static assignment orwhen forwarding packets. 5.2. Packet Forwarding To represent a source route within a packet's header, DSR uses a Routing Header similar to the Routing Header format specifieduse of DHCP forIPv6, adapted todynamic assignment [8]), although theneedsmethod ofDSR and tosuch assignment is outside theusescope ofDSR in IPv4 (or in IPv6 in the future).this specification. Johnson, et al Expires 2 September 2001 [Page 4] INTERNET-DRAFT TheDSRDynamic Source RoutingHeader uses a unique Routing Type field value to distinguish it from the existing Type 0 Routing Header defined within IPv6 [6]. To forward a packet, a receivingProtocol 2 March 2001 3. DSR Protocol Overview 3.1. Basic DSR Route Discovery When some source nodeN simply processes the Routing Header as specified in Section 8.3 and transmits the packet to the next hop. Iforiginates aforwarding error occurs along the linknew packet addressed to some destination node, thenext hop in the route, thissource nodeN sends a Route Error back toplaces in theoriginator Sheader ofthisthe packetinforming S that this link is "broken". If node N's Route Cache containsadifferentsource routetogiving thedestinationsequence ofthe original packet, thenhops that the packet issalvaged usingto follow on its way to thenewdestination. Normally, the sender will obtain a suitable source route(Section 8.5.5). Otherwise, the packetby searching its "Route Cache" of routes previously learned, but if no route isdropped. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 6] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 Each node overhearing or forwarding a Route Error packet also removes fromfound in itsRoute Cache the link indicated to be broken, thereby cleaning the stale cache data from the network. 5.3. Multicast Routing At this time DSR does not support true multicasting. However,cache, itdoes supportwill initiate thecontrolled flooding ofRoute Discovery protocol to dynamically find adata packetnew route toall nodes inthis destination node. In this case, we call thenetwork that are within some number of hops ofsource node theoriginator. While this mechanism does not support pruning"initiator" and the destination node the "target" of thebroadcast treeRoute Discovery. For example, suppose a node A is attempting toconserve network resources, it can be used to distribute informationdiscover a route tonodesnode E. The Route Discovery initiated by node A in this example would proceed as follows: ^ "A" ^ "A,B" ^ "A,B,C" ^ "A,B,C,D" | id=2 | id=2 | id=2 | id=2 +-----+ +-----+ +-----+ +-----+ +-----+ | A |---->| B |---->| C |---->| D |---->| E | +-----+ +-----+ +-----+ +-----+ +-----+ | | | | v v v v To initiate thenetwork. When an application on a DSRRoute Discovery, nodesends a packet toA transmits amulticast address, DSR piggybacks the data from the packet inside"Route Request" as a single local broadcast packet, which is received by (approximately) all nodes currently within wireless transmission range of A, including node B in this example. Each Route Requestpacket targeted atidentifies the initiator and target of themulticast address. The normalRouteRequest distribution scheme described in Sections 5.1Discovery, and8.4.2 will resultalso contains a unique request identification (2, in thispacket being efficiently distributed to all nodes in the network withinexample), determined by thespecified TTLinitiator of theoriginator. The receiving nodes can then do destinationRequest. Each Route Request also contains a record listing the addressfiltering onof each intermediate node through which this particular copy of thepacket, discarding it if they do not wish to receive multicast packets destinedRoute Request has been forwarded. This route record is initialized tothis multicast address. 6. Conceptual Data Structuresan empty list by the initiator of the Route Discovery. Inorder to participate inthis example, theDynamic Source Routing Protocol, aroute record initially lists only nodeneeds four conceptual data structures: a Route Cache, aA. When another node receives this Route RequestTable, a Send Buffer, and a Retransmission Buffer. These data structures MAY be implemented in any manner consistent with the external behavior described(such as node B in thisdocument. 6.1. Route Cache All routing information needed by a node participating in an ad hoc network using DSRexample), if it isstored in a Route Cache. Each node inthenetwork maintains its owntarget of the RouteCache. The node adds informationDiscovery, it returns a "Route Reply" to theCache as it learnsinitiator ofnew links between nodes inthead hoc network, for example through packets carrying either aRouteReply orDiscovery, giving aRouting Header. Likewise,copy of thenode removes informationaccumulated route record from thecache as it learns existing links in the ad hoc network have broken, for example through packets carrying aRouteError or throughRequest; when thelink-layer retransmission mechanism reporting a failureinitiator receives this Route Reply, it caches this route inforwarding a packet toitsnext-hop destination. TheRoute Cacheis indexed logically by destinationfor use in sending subsequent packets to this destination. Otherwise, if this nodeaddress, and supportsreceiving thefollowing operations: Broch,Route Request has recently seen another Route Request message from this initiator bearing this same Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page7]5] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 void Insert(Route RT) Inserts information extracted from source2 March 2001 request identification and target address, or if this node's own address is already listed in the routeRT intorecord in the RouteCache. Route Get(Node DEST) Returns a source route fromRequest, this node discards the Request. Otherwise, this node appends its own address toDEST (if one is known). void Delete(Node FROM, Interface INDEX, Node TO) Removes fromthe routecache any routes which assume thatrecord in the Route Request and propagates it by transmitting it as a local broadcast packettransmitted by(with the same request identification). In this example, nodeFROM over its interface withB broadcast thegiven INDEX will beRoute Request, which is received by nodeTO. Each implementation MAY choose the cache replacementC; nodes C andcache search strategies forD each also, in turn, broadcast the Request, resulting in a copy of the Request being received by node E. In returning the Route Reply to the initiator of the Route Discovery, such as in this example, node E replying back to node A, node E will typically examine its own Route Cachethat are most appropriateforits particular network environment. For example, some environments may choose to return the shortesta route back toa node (the shortest sequence of hops), while others may select an alternate metricA, and if found, will use it for theGet() operation. The Route Cache SHOULD support storing more than onesource route foreach destination. If there are multiple cached routes to a destination,delivery of the packet containing the RouteGet() operationReply. Otherwise, E SHOULDprefer routes that do not traverse a hop with an interface index of IF_INDEX_MA or IF_INDEX_ROUTER. This will prefer routes that lead directly to theperform its own Route Discovery for target nodeover routes that attemptA, but toreachavoid possible infinite recursion of Route Discoveries, it MUST piggyback this Route Reply on thetarget via any internet infrastructure connectedpacket containing its own Route Request for A. It is also possible tothe ad hoc network. Ifpiggyback other small data packets, such as anode S is usingTCP SYN packet [25], on asource route to some destination D that includes intermediate node N, S SHOULD shortenRoute Request using this same mechanism. Node E could instead simply reverse theroute to destination D when it learnssequence ofa shorter route to node N thanhops in theoneroute record that it islistedtrying to send in the Route Reply, and use this as theprefix of its current route to D. A node S using asource routeto destination D through intermediate node N, MAY shortenon thesourcepacket carrying the Route Reply itself. For MAC protocols such as IEEE 802.11 that require a bi-directional frame exchange as part of the MAC protocol [10], this routeifreversal is preferred, as itlearnsavoids the overhead of ashorter path from node Npossible second Route Discovery, and it tests the discovered route tonode D. Theensure it is bi-directional before the RouteCache replacement policy SHOULD allowDiscovery initiator begins using the route. However, this technique will prevent the discovery of routesto be categorized based upon "preference",using uni-directional links. In wireless environments where the use of uni-directional links is permitted, such routes may in some cases be more efficient than those witha higher preferences are less likely toonly bi-directional links, or they may beremoved fromthecache. For example, a node could prefer routes for which it initiatedonly way to achieve connectivity to the target node. When initiating a RouteDiscovery over routes that it learned asDiscovery, theresultsending node saves a copy ofpromiscuous snooping on other packets. In particular,the original packet (that triggered the Discovery) in anode SHOULD prefer routes that it is presently using over those that it is not. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 8] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 6.2. Route Request Tablelocal buffer called the "Send Buffer". TheRoute Request Table isSend Buffer contains acollectioncopy ofrecords about Route Request packetseach packet thatwere recently originated or forwardedcannot be transmitted by thisnode. The table is indexed by the home address of the target of the route discovery. A record maintained on node S for node D contains the following: - The time that S last originated a Route Discovery for D. - The remaining amount of time that S must wait before the next attempt at a Route Discovery for D. - The Time-to-live (TTL) field in the IP header of last Route Request originated by S for D. - A FIFO cache of the last ID_FIFO_SIZE Identification values from Route Request packets targeted at node D that were forwarded by this node. Nodes SHOULD use an LRU policy to manage the entries of in their Route Request Table. ID_FIFO_SIZE MUST NOT be set to an unlimited value, since, in the worst case, when a node crashes and reboots the first ID_FIFO_SIZE Route Request packets it sends may appear to be duplicates to the other nodes in the network. 6.3. Send Buffer The Send Buffer of some node is a queue of packets that cannot be transmitted by thatnode because it does not yet have a source route toeach respectivethe packet's destination. Each packet in the Send Buffer isstampedlogically associated with the time that itiswas placed into theBuffer, and SHOULD be removed from theSend Buffer and is discardedSEND_BUFFER_TIMEOUT secondsafterinitially being placedresiding in theBuffer. If necessary,Send Buffer for some timeout period; if necessary for preventing the Send Buffer from overflowing, a FIFO or other replacement strategySHOULDMAY also be used to evict packets even before theytimeout to preventexpire. While a packet remains in thebuffer from overflowing. Subject toSend Buffer, therate limiting defined in Section 8.4,node SHOULD occasionally initiate a new Route DiscoverySHOULD be initiated as often as possiblefor the packet's destinationaddress of any packets residing inaddress. However, theSend Buffer. 6.4. Retransmission Buffer The Retransmission Buffer of a node is a queue of packets sent by thisnodethat are awaiting the receipt of an acknowledgment fromMUST limit thenext hop inrate at which such new Route Discoveries for thesource route (Section 7.3). Broch,same address are initiated, since Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page9]6] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 For each packet in2 March 2001 it is possible that theRetransmission Buffer, adestination nodemaintains (1) a count ofis not currently reachable. In particular, due to thenumber of retransmissionslimited wireless transmission range and(2)thetimemovement of thelast retransmission. Packets are removed fromnodes in thebuffer when an acknowledgment is received, or whennetwork, thenumbernetwork may at times become partitioned, meaning that there is currently no sequence ofretransmissions exceeds DSR_MAXRXTSHIFT. In the later case,nodes through which a packet could be forwarded to reach theremoval ofdestination. Depending on thepacket frommovement pattern and theRetransmission Buffer SHOULD resultdensity of nodes in the network, such network partitions may be rare or may be common. If a new RouteError being returned to the initial source of theDiscovery was initiated for each packet(Section 8.5). Broch, Johnson, and Maltz Expires 22 April 2000 [Page 10] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 7. Packet Formats Dynamic Source Routing makes usesent by a node in such a partitioned network, a large number offour options carrying control information that canunproductive Route Request packets would bepiggybacked in any existing IP packet. The mechanism used for these options is based onpropagated throughout thedesignsubset of theHop-by-Hop and Destination Options mechanisms in IPv6 [6]. The abilityad hoc network reachable from this node. In order togenerate and processreduce the overhead from suchoptions must be added toRoute Discoveries, a node MUST use anIPv4 protocol stack. Specifically, the Protocol field inexponential back-off algorithm to limit theIP header is usedrate at which it initiates new Route Discoveries for the same target. If the node attempts toindicate that a Hop-by-Hop Options or Destination Options extension header exists betweensend additional data packets to this same destination node more frequently than this limit, theIP header andsubsequent packets SHOULD be buffered in theremaining portion ofSend Buffer until apacket's payload (such asRoute Reply is received giving atransport layer header). The Next Header field in each extension header will then indicateroute to this destination, but thetype of header that follows it innode MUST NOT initiate apacket. 7.1. Destination Options Headers The Destination Options headernew Route Discovery until the minimum allowable interval between new Route Discoveries for this target has been reached. This limitation on the maximum rate of Route Discoveries for the same target isusedsimilar tocarry optional information that need be examined onlythe mechanism required by Internet nodes to limit the rate at which ARP Requests are sent for any single target IP address [3]. 3.2. Basic DSR Route Maintenance When originating or forwarding apacket's destination node(s). The Destination Options headerpacket using a source route, each node transmitting the packet isidentifiedresponsible for confirming that the packet has been received by the next hop along the source route; the packet SHOULD be retransmitted (up to aNext Header (or Protocol) valuemaximum number of60attempts) until this confirmation of receipt is received. For example, in theimmediately preceding header, andsituation shown below, node A hasthe following format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Lenoriginated a packet for node E using a source route through intermediate nodes B, C, and D: +-----+ +-----+ +-----+ +-----+ +-----+ | A |---->| B |---->| C |--x |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + |D |. . . Options . . .| E |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Next Header 8-bit selector. Identifies the type+-----+ +-----+ +-----+ +-----+ +-----+ In this case, node A is responsible for receipt ofheader immediately followingtheDestination Options header. Usespacket at B, node B is responsible for receipt at C, node C is responsible for receipt at D, and node D is responsible for receipt finally at thesame valuesdestination E. This confirmation of receipt in many cases may be provided at no cost to DSR, either asthe IPv4 Protocol field [20]. Hdr Ext Len 8-bit unsigned integer. Lengthan existing standard part of theDestination Options headerMAC protocol in4-octet units, not includinguse (such as the link-level acknowledgement frame defined by IEEE 802.11 [10]), or by a "passive acknowledgement" [15] (in which, for example, B confirms receipt at C by overhearing C transmit thefirst 8 octets. Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page11]7] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 Options Variable-length field,2 March 2001 packet when forwarding it on to D). If neither oflength such thatthese confirmation mechanisms are available, thecomplete Destination Options header is an integer multiple of 4 octets long. Contains one or more TLV-encoded options. The following destination option is usednode transmitting the packet can explicitly request a DSR-specific software acknowledgement be returned by theDynamic Source Routing protocol: - DSR Route Request option (Section 7.1.1) This destination option MUST NOT appear multiple times withinnext hop; this software acknowledgement will normally be transmitted directly to the sending node, but if the link between these two nodes is uni-directional, this software acknowledgement may travel over asingle Destination Options header. 7.1.1. DSR Route Request Option The DSR Route Request destination optiondifferent, multi-hop path. If no receipt confirmation isencoded in type-length-value (TLV) format as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | Identification | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Target Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C| IN Index[1] |C| IN Index[2] |C| IN Index[3] |C| IN Index[4] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C|OUT Index[1] |C|OUT Index[2] |C|OUT Index[3] |C|OUT Index[4] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[1] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[2] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[3] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[4] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C| IN Index[5] |C| IN Index[6] |C| IN Index[7] |C| IN Index[8]| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C|OUT Index[5] |C|OUT Index[6] |C| OUT Index[7] |C|OUT Index[8]| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[5] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IP fields: Broch, Johnson, and Maltz Expires 22 April 2000 [Page 12] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 Source Address MUST bereceived after thehome address ofpacket has been retransmitted thenode originatingmaximum number of attempts by some hop, thispacket. Intermediate nodes that repropagatenode SHOULD return a "Route Error" to therequest dooriginal sender of the packet, identifying the link over which the packet could notchange this field. Destination Address MUSTbe forwarded. For example, in thelimited broadcast address (255.255.255.255). Hop Limit (TTL) Can be varied from 1 to 255, forexample shown above, if C is unable toimplement expanding-ring searches. Route Request fields: Option Type ???. A node that does not understand this option MUST discarddeliver the packetand the Option Data may change en-route (the top three bits are 011). Option Length 8-bit unsigned integer. Length ofto theoption, in octets, excludingnext hop D, then C returns a Route Error to A, stating that theOption Type and Option Length fields. Identificationlink from C to D is currently "broken". Node Aunique value generated bythen removes this broken link from its cache; any retransmission of theinitiator (original sender) of the Route Request. This value allowsoriginal packet can be performed by upper layer protocols such as TCP, if necessary. For sending such arecipient to determine whetherretransmission ornot it has recently seen this a copy ofother packets to thisRequest;same destination E, if A has in its Route Cache another route to E (for example, from additional Route Replies from its earlier Route Discovery, or from having overheard sufficient routing information from other packets), ithas,can send the packetis simply discarded. When propagatingusing the new route immediately. Otherwise, it SHOULD perform a new RouteRequest,Discovery for thisfield MUST be copied from the received copy of the Request being forwarded. Target Address The home address oftarget (subject to the exponential back-off described in Section 3.1). 3.3. Additional Route Discovery Features 3.3.1. Caching Overheard Routing Information A node forwarding or otherwise overhearing any packet MAY add the routing information from thatispacket to its own Route Cache. In particular, thetarget ofsource route used in a data packet, the accumulated route record in a RouteRequest. Change Interface (C) bit[1..n] A flag associated with each interface index that indicates whetherRequest, ornotthecorresponding node repropagatedroute being returned in a Route Reply MAY all be cached by any node. Routing information from any of these packets received can be cached, whether theRequest overpacket was addressed to this node, sent to adifferent physical interface type than over which itbroadcast (or multicast) MAC address, or received while the node's network interface is in promiscuous mode. One limitation, however, on caching of such overheard routing information is the possible presence of uni-directional links in theRequest. Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page13]8] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 IN Index[1..n] IN Index[i] is the index of the interface over which2 March 2001 ad hoc network (Section 2). For example, in the situation shown below, nodeindicated by Address[i] received the Route Request option. These are usedA is using a source route torecordcommunicate with node E: +-----+ +-----+ +-----+ +-----+ +-----+ | A |---->| B |---->| C |---->| D |---->| E | +-----+ +-----+ +-----+ +-----+ +-----+ ^ | +-----+ +-----+ +-----+ +-----+ +-----+ | V |---->| W |---->| X |---->| Y |---->| Z | +-----+ +-----+ +-----+ +-----+ +-----+ As node C forwards areversedata packet along the route fromthe target of the requestA tothe originator, over which a Route ReplyE, it MAYbe sent. OUT Index[1..n] OUT Index[i] isadd to its cache theinterface index thatpresence of thenode indicated by Address[i-1] used when rebroadcasting"forward" direction links that it learns from theRoute Request option. Address[1..n] Address[i] isheaders of these packets, from itself to D and from D to E. However, thehome address"reverse" direction of theith hop recordedlinks identified in theRoute Request option. 7.2. Hop-by-Hop Options Headers The Hop-by-Hop Options header is usedpacket headers, from itself back tocarry optional information that mustB and from B to A, may not work for it since these links might beexamined by everyuni-directional. If C knows that the links are in fact bi-directional, for example due to the MAC protocol in use, it could cache them but otherwise SHOULD not. Likewise, nodealong a packet's delivery path. The Hop-by-Hop Options headerV in the example above isidentified byusing aNext Header (or Protocol) value of ??? indifferent source route to communicate with node Z. If node C overhears node X transmitting a data packet to forward it to Y (from V), node C SHOULD consider whether theIP header, and haslinks involved can be known to be bi-directional or not before caching them. If thefollowing format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | . . . Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Next Header 8-bit selector. Identifieslink from X to C (over which this data packet was received) can be known to be bi-directional, then C MAY cache thetypelink from itself to X, the link from X to Y, and the link from Y to Z. If all links can be assumed to be bi-directional, C MAY also cache the links from X to W and from W to V. Similar considerations apply to the routing information that might be learned from forwarded or otherwise overheard Route Request or Route Reply packets. 3.3.2. Replying to Route Requests using Cached Routes A node receiving a Route Request for which it is not the target, searches its own Route Cache for a route to the target ofheader immediately followingtheHop-by-Hop Options header. UsesRequest. If found, thesame values asnode generally returns a Route Reply to theIPv4 Protocol field [20]. Hdr Ext Len 8-bit unsigned integer. Lengthinitiator itself rather than forwarding the Route Request. In the Route Reply, this node sets the route record to list the sequence of hops over which this copy of theHop-by-Hop Options headerRoute Request was forwarded to it, concatenated with the source route to this target obtained from its own Route Cache. However, before transmitting a Route Reply packet that was generated using information from its Route Cache in4-octet units, not includingthis way, a node MUST verify that thefirst 8 octets. Broch,resulting route being returned in the Route Reply, Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page14]9] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 Options Variable-length field, of length such that2 March 2001 after this concatenation, contains no duplicate nodes listed in thecomplete Hop-by-Hop Options header is an integer multiple of 4 octets long. Contains one or more TLV-encoded options. The following hop-by-hop options are used byroute record. For example, theDynamic Source Routing protocol: - DSR Route Reply option (Section 7.2.1) - DSR Route Error option (Section 7.2.2) - DSR Acknowledgment option (Section 7.2.3) All of these destination options MAY appear one or more times withinfigure below illustrates a case in which asingle Hop-by-Hop Options header. 7.2.1. DSR Route Reply Option The DSRRouteReply hop-by-hop option is encodedRequest for target E has been received by node F, and node F already has intype-length-value (TLV) format as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Target Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C|OUT Index[1] |C|OUT Index[2] |C|OUT Index[3] |C|OUT Index[4] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[1] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[2] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[3] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[4]its Route Cache a route from itself to E: +-----+ +-----+ +-----+ +-----+ |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C|OUT Index[5] |C|OUT Index[6] |C|OUT Index[7] |C|OUT Index[8]A |---->| B |- >| D |---->| E |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-----+ +-----+ \ / +-----+ +-----+ \ / \ +-----+ / >| C |- +-----+ |Address[5]^ v |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Route Request +-----+ Route: A - B - C - F |...F |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Broch, Johnson, and Maltz Expires 22 April 2000 [Page 15] INTERNET-DRAFTCache: C - D - E +-----+ TheDynamic Source Routing Protocol 22 October 1999 Option Type ???. A node that does not understand this option should ignore this option and continue processing the packet, and the Option Data does not change en-route (the top three bits are 000). Option Length 8-bit unsigned integer. Lengthconcatenation of theoption, in octets, excludingaccumulated route record from theOption TypeRoute Request andOption Length fields. Reserved Sent as 0; ignored on reception. Target Address The home address ofthe cached route from F's Route Cache would include a duplicate node in passing from C towhichF and back to C. Node F in this case could attempt to edit theRoute Reply must be delivered. Change Interface (C) bit[1..n] Ifroute to eliminate theC bit associated withduplication, resulting in a route from A to B to C to D and on to E, but in this case, nodeN is set, it implies N willF would not beforwardingon thepacket outroute that it returned in its own Route Reply. DSR Route Discovery prohibits node F from returning such adifferent interface thanRoute Reply from its cache for two reasons. First, this limitation increases theone over which it was received (i.e.,probability that the resulting route is valid, since nodesending the packet to NF in this case shouldnot expecthave received apassive acknowledgment). OUT Index[1..n] OUT Index[i] isRoute Error if theinterface index ofroute had previously stopped working. Second, this limitation means that a Route Error traversing theith hop listed inroute is very likely to pass through any node that sent the Route Replyoption. It denotesfor theinterfaceroute (including node F), which helps to ensure thatshouldstale data is removed from caches (such as at F) in a timely manner. Otherwise, the next Route Discovery initiated by A might also beusedcontaminated byAddress[i-1] to reach Address[i] when usinga Route Reply from F containing thespecified sourcesame stale route.Address[1..n] Address[i] isIf thehome address ofRoute Request does not meet these restrictions, theith hop listednode (node F in this example) discards the Route Request rather than replying to it or propagating it. 3.3.3. Preventing Route Replyoption. Broch, Johnson, and Maltz Expires 22 April 2000Storms The ability for nodes to reply to a Route Request based on information in their Route Caches, as described in Section 3.3.2, could result in a possible Route Reply "storm" in some cases. In particular, if a node broadcasts a Route Request for a target node for which the node's neighbors have a route in their Route Caches, each neighbor may attempt to send a Route Reply, thereby wasting Johnson, et al Expires 2 September 2001 [Page16]10] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 7.2.2. DSR Route Error Option The DSR Route Error hop-by-hop option is encoded in type-length-value (TLV) format as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 123 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+March 2001 bandwidth and possibly increasing the number of network collisions in the area. For example, the figure below shows a situation in which nodes B, C, D, E, and F all receive A's Route Request for target G, and each has the indicated route cached for this target: +-----+ +-----+ |Option TypeD |< >| C |Option Length+-----+ \ / +-----+ Cache: C - B - G \ / Cache: B - G \ +-----+ / -| A |- +-----+\ +-----+ +-----+ |Index|Error Type\--->| B |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Error Source AddressG |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ \ +-----+ +-----+ / \ Cache: G v v +-----+ +-----+ |Error Destination AddressE |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Unreachable Node AddressF |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type ???. A node that does not understand this option should ignore the option+-----+ +-----+ Cache: F - B - G Cache: B - G Normally, these nodes would all attempt to reply from their own Route Caches, andcontinue processingwould all send their Route Replies at about thepacket, andsame time, since they all received theOption Data does not change en-route (the top three bits are 000). Option Length 8-bit unsigned integer. Length ofbroadcast Route Request at about theoption, in octets, excludingsame time. Such simultaneous replies from different nodes all receiving theOption Type and Option Length fields. Index The interface indexRoute Request may create packet collisions among some or all of these Replies and may cause local congestion in thenetwork interface over whichwireless network. In addition, it will often be the case that the different replies will indicate routes of different lengths, as shown in this example. If a nodedesignated by Error Source Address tried to forwardcan put its network interface into promiscuous receive mode, it SHOULD delay sending its own Route Reply for apacketshort period, while listening to see if the initiating nodedesignated by Unreachable Node Address. Error Type The type of error encountered. Values between 0 and 127 inclusive indicatebegins using ahard failure of connectivity between the Error Source Address and the Unreachable Node Address. Values between 128 and 255 inclusive indicateshorter route first. That is, this node SHOULD delay sending its own Route Reply for asoft failure. NODE_UNREACHABLErandom period d = H * (h - 1PATH_STATE_NOT_FOUND 129 Error Source Address The home address of the node originating+ r) where h is theRoute Error (e.g.,length in number of network hops for thenode that attemptedroute toforwardbe returned in this node's Route Reply, r is apacketrandom floating point number between 0 anddiscovered the link failure). Broch, Johnson,1, andMaltz Expires 22 April 2000 [Page 17] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 Error Destination Address The home address ofH is a small constant delay (at least twice thenodemaximum wireless link propagation delay) towhich the Route Error mustbedelivered (e.g,introduced per hop. This delay effectively randomizes the time at which each nodethat generatedsends its Route Reply, with all nodes sending Route Replies giving routes of length less than h sending their Replies before this node, and all nodes sending Route Replies giving routes of length greater than h sending their Replies after this node. Johnson, et al Expires 2 September 2001 [Page 11] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 Within therouting information claiming thatdelay period, this node promiscuously receives all packets, looking for data packets from thehop Error Source Address to Unreachable Node Address wasinitiator of this Route Discovery destined for the target of the Discovery. If such avalid hop). Unreachable Node Address The home addressdata packet received by this node during the delay period uses a source route of length less than or equal to h, this node may infer that the initiator of the Route Discovery has already received a Route Reply giving an equally good or better route. In this case, this node SHOULD cancel its delay timer and SHOULD NOT send its Route Reply for this Route Discovery. 3.3.4. Route Request Hop Limits Each Route Request message contains a "hop limit" thatwas found tomay beunreachable (the next hop neighborused towhichlimit thenode at ``Error Source Address'' was attemptingnumber of intermediate nodes allowed totransmitforward that copy of thepacket). 7.2.3. DSR Acknowledgment Option The DSR Acknowledgment hop-by-hop optionRoute Request. This hop limit isencodedimplemented using the Time-to-Live (TTL) field intype-length-value (TLV) format as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACK Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACK Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type ???. A node that does not understand this option should ignore the option and continue processing the packet, andtheOption Data does not change en-route (the top three bits are 000). Option Length 8-bit unsigned integer. LengthIP header of theoption, in octets, excludingpacket carrying theOption Type and Option Length fields. Identification A 32-bit value that when taken in conjunction with Data Source Address, uniquely identifiesRoute Request. As thepacket being acknowledged. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 18] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 The Identification valueRequest iscomputed as ((ip_id << 16) | ip_off) where ip_idforwarded, this limit is decremented, and thevalue of the 16-bit Identification field in the IP header of theRequest packetbeing acknowledged, and ip_offis discarded if thevalue of the 13-bit Fragment Offset field in the IP header of the packet being acknowledged. When constructinglimit reaches zero before finding theIdentification, ip_id and ip_off MUST be in host byte-order. The entire Identification value MUST thentarget. This Route Request hop limit can beconvertedused tonetwork byte-order before being placed in the Acknowledgment option. ACK Source Address The home addressimplement a variety of algorithms for controlling the spread of a Route Request during a Route Discovery attempt. For example, a nodeoriginating the Acknowledgment. ACK Destination Address The home addressMAY send its first Route Request attempt for some target node using a hop limit ofthe1, such that any nodeto whichreceiving theAcknowledgment must be delivered. Data Source Address The IP Source Addressinitial transmission of thepacket being acknowledged. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 19] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 7.3. DSR Routing Header As specified for IPv6 [6], a Routing header is used by a source to list one or more intermediate nodes to be ``visited'' onRoute Request will not forward thewayRequest toa packet's destination.other nodes by rebroadcasting it. Thisfunctionform of Route Request issimilar to IPv4's Loose Source and Recordcalled a "non-propagating" Routeoption, butRequest. It provides an inexpensive method for determining if theRouting header does not recordtarget is currently a neighbor of the initiator or if a neighbor node has a routetakento the target cached (effectively using the neighbors' Route Caches as an extension of thepacketinitiator's own Route Cache). If no Route Reply is received after a short timeout, then a "propagating" Route Request (i.e., with no hop limit) MAY be sent. Another possible use of the hop limit in a Route Request isforwarded. The specific processing steps requiredto implement an "expanding ring" search for theRouting header must be added totarget [13]. For example, a node could send anIPv4 protocol stack. The Routing headerinitial non-propagating Route Request as described above; if no Route Reply isidentified byreceived for it, the node could initiate another Route Request with aNext Header valuehop limit of43 in2. For each Route Request initiated, if no Route Reply is received for it, theimmediately preceding header, and hasnode could double thefollowing format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . type-specific data . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The type specific datahop limit used on the previous attempt, to progressively explore fora Routing Header carrying a DSR Sourcethe target node without allowing the Routeis: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |R|S| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C|OUT Index[1] |C|OUT Index[2] |C|OUT Index[3] |C|OUT Index[4] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[1] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[2] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[3] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[4] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C|OUT Index[5] |C|OUT Index[6] |C|OUT Index[7] |C|OUT Index[8] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[5] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Broch, Johnson,Request to propagate over the entire network. However, this expanding ring search approach could have the effect of increasing the average latency of Route Discovery, since multiple Discovery attempts andMaltztimeouts may be needed before discovering a route to the target node. Johnson, et al Expires22 April 20002 September 2001 [Page20]12] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 Routing Header Fields: Next Header 8-bit selector. Identifies the type2 March 2001 3.4. Additional Route Maintenance Features 3.4.1. Packet Salvaging After sending a Route Error message as part ofheader immediately followingRoute Maintenance as described in Section 3.2, a node MAY attempt to "salvage" theRouting header. Hdr Ext Len 8-bit unsigned integer. Length ofdata packet that caused theRouting header in 4-octet units, not includingRoute Error rather than discarding thefirst 8 octets. Routing Type ??? Segments Left Number of route segments remaining, i.e., number of explicitly listed intermediate nodes stillpacket. To attempt tobe visited before reachingsalvage a packet, thefinal destination. Type Specific Fields: Acknowledgment Request (R) The Acknowledgment Request (R) bit is setnode sending a Route Error searches its own Route Cache for a route from itself torequest an explicit acknowledgment from the next hop. After processing the Routing Header, The IP Destination Address liststheaddressdestination of thenext hop. Salvaged Packet (S) The Salvaged Packet (S) bit indicates that thispackethas been salvaged by an intermediate node, and thus that this Routing Header was generated by Address[1] and notcausing theIP Source Address (Section 8.5.5). Reserved Sent as 0; ignored on reception. Change Interface (C) bit[1..n]Error. Ifthe C bit associated withsuch anode Nroute isset, it implies N will be forwardingfound, the node MAY salvage the packetout a different interface thanafter returning theone over which it was received (i.e.,Route Error by replacing thenode sendingoriginal source route on the packetto N should not expect a passive acknowledgment and MAY wish to setwith theR bit). Broch, Johnson, and Maltz Expires 22 April 2000 [Page 21] INTERNET-DRAFTroute from its Route Cache. TheDynamic Source Routing Protocol 22 October 1999 OUT Index[1..n] Index[i] is the interface index that thenodeindicated by Address[i-1] must use when transmittingthen forwards the packet toAddress[i]. Index[1] indicates which interfacethe next node indicatedby the IP Source Address uses to transmit the packet. Address[1..n] Address[i] is the home address ofalong this source route. For example, in theith hopsituation shown in theRouting header. Note that Address[1] isexample of Section 3.2, if node C has another route cached to node E, it can salvage thefirst intermediate hop alongpacket by replacing theroute. The address oforiginal route in theoriginating node ispacket with this new route from its own Route Cache, rather than discarding theIP Source Address. The only exception topacket. When salvaging a packet in thisruleway, a count isfor packets that are salvaged, as describedmaintained inSection 8.5.5. Athe packet of the number of times that it has beensalvaged has an alternatesalvaged, to prevent a single packet from being salvaged endlessly. Otherwise, it could be possible for the packet to enter a routing loop, as different nodes repeatedly salvage the packet and replace the source routeplacedonit by anthe packet with routes to each other. 3.4.2. Automatic Route Shortening Source routes in use MAY be automatically shortened if one or more intermediatenodehops in thenetwork, androute become no longer necessary. This mechanism of automatically shortening routes inthis case,use is somewhat similar to theaddressuse ofthe originatingpassive acknowledgements [15]. In particular, if a node(the salvaging node)isAddress[1]. Salvaged packets are indicatedable to overhear a packet carrying a source route (e.g., bysettingoperating its network interface in promiscuous receive mode), then this node examines theS bitunused portion of that source route. If this node is not the intended next hop for the packet but is named in theDSR Routing header. Broch,later unused portion of the packet's source route, then it can infer that the intermediate nodes before itself in the source route are no longer needed in the route. For example, the figure below Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page22]13] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 8. Detailed Operation 8.1. Originating a Data Packet When2 March 2001 illustrates an example in which nodeA originates a packet, the following steps MUST be taken before transmitting the packet: 1. If the destination address isD has overheard amulticast address, piggyback thedata packetonbeing transmitted from B to C, for later forwarding to D and to E: +-----+ +-----+ +-----+ +-----+ +-----+ | A |---->| B |---->| C | | D | | E | +-----+ +-----+ +-----+ +-----+ +-----+ \ ^ \ / --------------------- In this case, this node (node D) returns a "gratuitous" RouteRequest targetingReply to themulticast address.original sender of the packet (node A). Thefollowing fields MUST be initializedRoute Reply gives the shorter route asspecified: IP.Source_Address = Home addressthe concatenation ofnode A IP.Destination_Address = 255.255.255.255 Request.Target_Address = Multicast destination address DONE. 2. Otherwise, call Route_Cache.Get() to determine if there is a cached source route tothedestination. 3. Ifportion of thecachedoriginal source routeindicates thatup through thedestination is directly reachable over one hop, no Routing Header should be added tonode that transmitted thepacket. Initializeoverheard packet (node B), plus thefollowing fields: IP.Source_Address = Home address of node A IP.Destination_Address = Home addresssuffix of theDestination DONE. 4. Otherwise, if the cachedoriginal source routeindicates that multiple hops are required to reachbeginning with thedestination, insert a Routing Header intonode returning the gratuitous Route Reply (node D). In this example, thepacket as described in Section 8.2. DONE. 5. Otherwise, if no cachedroutetoreturned in thedestination is found, insertgratuitous Route Reply message sent from D to A gives thepacket intonew route as theSend Buffer and initiatesequence of hops from A to B to D to E. 3.4.3. Increased Spreading of RouteDiscovery as described in Section 8.4. 8.2. Originating a Packet with a DSR Routing HeaderError Messages When a source nodeoriginatesreceives apacket withRoute Error for aRouting Header,data packet that it originated, this source node propagates this Route Error to its neighbors by piggybacking it on its next Route Request. In this way, stale information in theaddresscaches of nodes around this source node will not generate Route Replies that contain thefirst hop in thesame invalid link for which this sourceroute MUST be listed asnode received theIP Destination Address as well as Address[1]Route Error. For example, in theRouting Header. The final destination of the packet is listed as the last hopsituation shown in theRouting Header (Address[n]). At each intermediate hop i, Address[i] is copied intoexample of Section 3.2, node A learns from theIP Destination AddressRoute Error message from C, that the link from C to D is currently broken. It thus removes this link from its own Route Cache and initiates a new Route Discovery (if it has no other route to E in its Route Cache). On the Route Request packetis retransmitted. Broch, Johnson,initiating this Route Discovery, node A piggybacks a copy of this Route Error, ensuring that the Route Error spreads well to other nodes, andMaltzguaranteeing that any Route Reply that it receives (including those from other node's Route Caches) in response to this Route Request does not contain a route that assumes the existence of this broken link. Johnson, et al Expires22 April 20002 September 2001 [Page23]14] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 For example, suppose node A originates a packet destined for node D that should pass through intermediate hops B and C. The packet MUST be initialized as follows: IP.Source_Address = Home address2 March 2001 4. Conceptual Data Structures This document describes the operation ofnode A IP.Destination_Address = Home addressthe DSR protocol in terms ofnode B RT.Segments_Left = 2 RT.Out_Index[1] = Interface index used by A to reach B RT.Out_Index[2] = Interface index used by B to reach C RT.Out_Index[3] = Interface index used by C to reach D RT.Address[1] = Home addressa number ofnode B RT.Address[2] = Home addressconceptual data structures. This section describes each ofnode C RT.Address[3] = Home addressthese data structures and provides an overview ofnode D 8.3. Processing a Routing Header Excluding the exceptions listed here, a DSR Routing Header is processed usingits use in thesame rules as outlined for Type 0 Routing Headersprotocol. In an implementation of the protocol, these data structures MAY be implemented inIPv6 [6]. The Routing Header is only processedany manner consistent with the external behavior described in this document. 4.1. Route Cache All routing information needed by a node participating in an ad hoc network using DSR is stored in that node's Route Cache. Each node in the network maintains its own Route Cache. A nodewhose address appearsadds information to its Route Cache asthe IP destinationit learns of new links between nodes in thepacket. The following additional rules apply to processing the type specific data ofad hoc network; for example, aDSR Source Route: Let SegLft = the valuenode may learn ofSegments Leftnew links whentheit receives a packetwas received NumAddrs = the total number of addresses in thecarrying either a Route Reply or a DSR RoutingHeader 1. The address of the next hop, Address[NumAddrs - SegLft + 1], is copied into the IP.Destination_Address of the packet. Theheader. Likewise, a node removes information from its Route Cache as it learns that existingIP.Destination_Address is NOT copied back intolinks in theAddress listad hoc network have broken; for example, a node may learn of a broken link when it receives a packet carrying a Route Error or through theRouting Header. 2. The interface used to transmit thelink-layer retransmission mechanism reporting a failure in forwarding a packet to itsnext hop from this node MUST be the interface denoted by Index[NumAddrs - SegLft + 1]. 3. If the Acknowledgment Request (R) bitnext-hop destination. It isset, the node MUST transmitpossible to interface apacket containing theDSRAcknowledgment optionnetwork with other networks, external to this DSR network. Such external networks may, for example, be theprevious hop, Address[NumAddrs - SegLft - 1], performing Route Discovery if necessary. (Address[0] is taken as the IP.Source_Address) 4. Perform Route Maintenance by verifyingInternet, or may be other ad hoc networks routed with a routing protocol other than DSR. Such external networks may also be other DSR networks thatthe packet was received by the next hopare treated asdescribedexternal networks inSection 8.5. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 24] INTERNET-DRAFTorder to improve scalability. TheDynamic Source Routing Protocol 22 October 1999 8.4. Route Discovery Route Discoverycomplete handling of such external networks is beyond theon-demand process by which nodes actively obtain source routesscope of this document. However, this document specifies a minimal set of requirements and features necessary todestinationsallow nodes only implementing this specification towhich they are actively attemptinginteroperate correctly with nodes implementing interfaces tosend packets. The destination node for which a Route Discovery is initiated is known as the "target"such external networks. This minimal set of requirements and features involve the First Hop External (F) and Last Hop External (L) bits in a Source RouteDiscovery. Aoption (Section 5.7) and a RouteDiscovery forReply option (Section 5.3) in adestination SHOULD NOT be initiated unlesspacket's DSR header (Section 5). These requirements also include theinitiatingaddition of an External flag bit tagging each nodehas a packetin theSend Buffer requiring delivery to that destination. ARouteDiscovery for a given target node MUST NOT be initiated unless permitted byCache, copied from therate-limiting information containedFirst Hop External (F) and Last Hop External (L) bits in the Source RouteRequest Table. After eachoption or RouteDiscovery attempt,Reply option from which theinterval between successive Route Discoveries forlink to thistarget must be doubled, up to a maximum of MAX_REQUEST_PERIOD.node was learned. The RouteDiscoveries for a multicast address SHOULD NOT be rate limited, andCache SHOULDalways be permitted. 8.4.1. Originating a Route Request The basicsupport storing more than one route to each destination. In searching the RouteDiscovery algorithmCache for aunicastroute to some destinationis as follows: 1. Originate a Route Request packet withnode, theIP header Time-to-Live field initialized to 1. This type ofRouteRequestCache iscalledindexed by destination node address. The following properties describe this searching function on anon-propagatingRouteRequest and allows the originator of the Request to inexpensively query the route caches of eachCache: Johnson, et al Expires 2 September 2001 [Page 15] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 - Each implementation ofits neighborsDSR at any node MAY choose any appropriate strategy and algorithm for searching its Route Cache and selecting a "best" route to thedestination. 2. Ifdestination from among those found. For example, aRoute Reply is received in responsenode MAY choose to select thenon-propagating Request, use the returned sourceshortest route totransmit all packets forthe destinationthat are in(the shortest sequence of hops), or it MAY use an alternate metric to select theSend Buffer. DONE. 3. Otherwise, if no Route Reply is received within RING0_REQUEST_TIMEOUT seconds, transmit a Route Request withroute from theIP header Time-to-Live field initializedCache. - However, if there are multiple cached routes toMAX_ROUTE_LEN. This type of Route Request is calledapropagating Route Request. Updatedestination, theinformation inselection of routes when searching the RouteRequest Table, to doubleCache SHOULD prefer routes that do not have theamount of time beforeExternal flag set on anysubsequent Route Discovery attemptnode. This preference will select routes that lead directly tothis target. 4. If no Route Reply is received withinthetime interval indicated bytarget node over routes that attempt to reach theRoute Request Table, GOTO step 1. The Route Request option SHOULD be initialized as follows: IP.Source_Address = This node's home address IP.Destination_Address = 255.255.255.255 Request.Target = Home address of intended destination Broch, Johnson, and Maltz Expires 22 April 2000 [Page 25] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 Request.OUT_Index[1] = Index of interface usedtarget via any external networks connected totransmittheRequest The behavior of a node processing a packet containing both a Routing Header and aDSR ad hoc network. - In addition, any route selected when searching the RouteRequest Destination option is unspecified. Packets SHOULDCache MUST NOTcontain both a Routing Header and a Route Request Destination option. [This is not exactly true: A Route Request option appearing in the second Destination Options header that IPv6 allows after the Routing Header would probably do-what-you-mean, though wehavenot triple-checked it yet. Namely, it would allow the originator of a route discovery to unicasttherequest to someExternal bit set for any nodes other than possibly the first node,where it wouldthe last node, or both; the External bit MUST NOT bereleased and beginset for any intermediate hops in theflood fill. We call thisroute selected. An implementation of a RouteRequest Blossom sinceCache MAY provide a fixed capacity for theunicast portion ofcache, or thepath looks like a stem oncache size MAY be variable. The following properties describe theblossoming flood-fillmanagement ofthe request.] Packets containingavailable space within a node's RouteRequest Destination option SHOULD NOT be retransmitted, SHOULD NOT request an explicitCache: - Each implementation of DSRAcknowledgment by settingat each node MAY choose any appropriate policy for managing theR bit, SHOULD NOT expect a passive acknowledgment, and SHOULD NOT be placedentries inthe Retransmission Buffer. The repeated transmission of packets containing aits RouteRequest Destination option is controlled solely by the logic described in this section. 8.4.2. ProcessingCache, such as when limited cache capacity requires aRoute Request Option Whenchoice of which entries to retain in the Cache. For example, a nodeA receives a packet containingMAY chose aRoute Request option,"least recently used" (LRU) cache replacement policy, in which theRoute Request optionentry last used longest ago isprocessed as follows: 1. If Request.Target_Address matches the home address of this node, thendiscarded from theRoute Request option containscache if acomplete source route describing the path fromdecision needs to be made to allow space in theinitiator ofcache for some new entry being added. - However, the RouteRequestCache replacement policy SHOULD allow routes tothis node. (a) Sendbe categorized based upon "preference", where routes with a higher preferences are less likely to be removed from the cache. For example, a node could prefer routes for which it initiated a RouteReplyDiscovery over routes that it learned asdescribed in Section 8.4.4. (b) Continue processingthepacket in accordanceresult of promiscuous snooping on other packets. In particular, a node SHOULD prefer routes that it is presently using over those that it is not. Any suitable data structure organization, consistent with this specification, MAY be used to implement theNext Header value containedRoute Cache in any node. For example, theDestination Option extension header. DONE. 2. Otherwise, iffollowing two types of organization are possible: - In DSR, thecombination (IP.Source_Address, Request.Identification) is foundroute returned intheeach RouteRequest Table, then discard the packet, since thisReply that isa copyreceived by the initiator of arecently seenRouteRequest. DONE. 3. Otherwise, if Request.Target_Address is a multicast address then: (a) If node ADiscovery (or that isa member of the multicast group indicated by Request.Target_Address, then create a copy of the packet, setting IP.Destination_Address = REQUEST.Target_Address, and continue processinglearned from thecopyheader ofthe packetoverhead packets, as described inaccordance with the Next Header fieldSection 6.1.4) represents a complete path (a sequence of links) leading to theDestination option. Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page26]16] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 (b) If IP.TTL is non-zero, decrement IP.TTL, and retransmit the packet. DONE. (c) Otherwise, discard the packet. DONE. 4. Otherwise, if the home address2 March 2001 destination node. By caching each ofnodethese paths separately, a "path cache" organization for the Route Cache can be formed. A path cache isalready listed in thevery simple to implement and easily guarantees that all routes are loop-free, since each individual route from a RouteRequest (IP.Source_AddressReply orRequest.Address[]), then discard the packet. DONE. 5. Let m = number of addresses currently in theRoute Requestoption n = m + 1 6. Otherwise, appendor used in a packet is loop-free. To search for a route in a path cache data structure, thehome address ofsending nodeA to thecan simply search its RouteRequest option (Request.Address[n]). 7. Set Request.IN_Index[n] = indexCache for any path (or prefix ofinterface packet was received on. 8. Ifasource routepath) that leads toRequest.Target_Address is found in ourthe intended destination node. This type of organization for the Route Cache in DSR has been extensively studied through simulation [5, 11, 18] andthe rulesthrough implementation ofSection 8.4.3 permit it, returnDSR in aCachedmobile outdoor testbed under significant workload [19, 20, 20]. - Alternatively, a "link cache" organization could be used for the RouteReply as describedCache, inSection 8.4.3. DONE. 9. Otherwise, for each interface onwhich each individual link (hop) in thenoderoutes returned in Route Reply packets (or otherwise learned from the header of overhead packets) isconfiguredadded toparticipate inaDSR ad hoc network: (a) Make a copyunified graph data structure ofthe packet containing the Route Request. (b) Set Request.OUT_Index[n+1] = indexthis node's current view of theinterface. (c) If the outgoing interface is different fromnetwork topology. To search for a route in link cache, theincoming interface, then setsending node must use a more complex graph search algorithm, such as theC bit on both Request.OUT_Index[n+1] and Request.IN_Index[n] (d) Link-layer re-broadcastwell-known Dijkstra's shortest-path algorithm, to find thepacket containingcurrent best path through theRoute Request ongraph to theinterface jittered by T milliseconds, where Tdestination node. Such an algorithm isa uniformly distributed, random number between 0more difficult to implement andBROADCAST_JITTER. DONE. 8.4.3. Generating Route Replies using the Route Cache A node SHOULD use its Route Cachemay require significantly more CPU time toavoid propagating a Route Request packet received from another node. In particular, suppose a node receivesexecute. However, aRoute Request packet for which itlink cache organization isnotmore powerful than a path cache organization, in its ability to effectively utilize all of thetarget and which it does not discard based onpotential information that a node might learn about thelogicstate ofSection 8.4.2. Ifthenode has anetwork: links learned from different RouteCache entry forDiscoveries or from thetargetheader ofthe Request, it SHOULD append this cached routeany overheard packets can be merged together tothe accumulated route recordform new routes in thepacket and returnnetwork, but thisrouteis not possible in aRoute Reply packetpath cache due toBroch, Johnson, and Maltz Expires 22 April 2000 [Page 27] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999theinitiator without propagating (re-broadcasting)separation of each individual path in theRoute Request. Thus,cache. This type of organization forexample, if node F intheexample network shownRoute Cache inFigure 8.4.3 needs to send a packet to node D, it will initiateDSR, including the effect of a range of implementation choices, has been studied through detailed simulation [9]. The choice of data structure organization to use for the RouteDiscovery and broadcastCache in any DSR implementation is a local matter for each node and affects only performance; any reasonable choice of organization for the Route Cache does not affect either correctness or interoperability. 4.2. Route Requestpacket. IfTable The Route Request Table records information about Route Requests that have been recently originated or forwarded by thisbroadcastnode. The table isreceivedindexed by IP address. Johnson, et al Expires 2 September 2001 [Page 17] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 The Route Request Table on a nodeA,records the following information about nodes to which this nodeA can simply returnhas initiated a RouteReply packet to F containing the complete route to D consisting of the sequence of hops: A, B, C, and D. Before transmittingRequest: - The time that this node last originated a RouteReply packetRequest for thatwas generated using information from itstarget node. - The number of consecutive RouteCache,Requests initiated for this target since receiving a valid Route Reply giving anode MUST verify that: 1. The resultingroutecontains no loops. 2.to that target node. - The remaining amount of time before which this nodeissuing theMAY next attempt at a RouteReply is listed in the routeDiscovery for thatit specifiestarget node. - The Time-to-Live (TTL) field used inits Reply. This increasestheprobabilityIP header of last Route Request initiated by this node for that target node. In addition, theroute is valid, sinceRoute Request Table on a node also records the following information about initiator nodes from which this nodein question should havehas received a RouteError if this route stopped working. Additionally, this requirement means that a Route Error traversing the route will pass through the node that issued the Reply based on staleRequest: - A FIFO cachedata, which is critical for ensuring stale data is removed from caches in a timely manner. Without this requirement, the next Route Discovery initiated byof size REQUEST_TABLE_IDS entries containing theoriginal requester might also be contaminated by a Route ReplyIdentification value and target address fromthis node containingthesame stale route. 8.4.4. Originating amost recent RouteReply Let REQPacket denote a packetRequests received by this nodeAfrom thatcontains a Route Request option which lists node A asinitiator node. Nodes SHOULD use an LRU policy to manage theREQPacket.Request.Target_Address. Let REPPacket be a packet transmitted by node A that contains a correspondingentries in their RouteReply.Request Table. TheRoute Reply option transmitted in responsenumber of Identification values toaretain in each Route Request Table entry, REQUEST_TABLE_IDS, MUST NOT beinitialized as follows: B->C->D +---+ +---+ +---+ +---+ | A |---->| B |---->| C |---->| D | +---+ +---+ +---+ +---+ +---+ | F | +---+ +---+ | E | +---+ Figure 1: An example network where A knowsunlimited, since, in the worst case, when aroute to D via B and C. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 28] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 1. If REQPacket.Request.Address[] does not contain any hops, thennodeA is only a single hop from the originator ofcrashes and reboots, the first REQUEST_TABLE_IDS RouteRequest. BuildDiscoveries it initiates after rebooting could appear to be duplicates to the other nodes in the network. In addition, aRoute Reply packet as follows: REPPacket.IP.Source_Address = REQPacket.Request.Target_Address REPPacket.Reply.Target = REQPacket.IP.Source_Address REPPacket.Reply.OUT_Index[1] = REQPacket.Request.OUT_index[1] REPPacket.Reply.OUT_C_bit[1] = REQPacket.Request.OUT_C_bit[1] REPPacket.Reply.Address[1] = The home address ofnodeA GOTO step 3. 2. Otherwise, build aSHOULD base its initial Identification value, used for RouteReply packet as follows: REPPacket.IP.Source_Address = The home address of node A REPPacket.Reply.Target = REQPacket.IP.Source_Address REPPacket.Reply.OUT_Index[1..n]= REQPacket.Request.OUT_index[1..n] REPPacket.Reply.OUT_C_bit[1..n]= REQPacket.Request.OUT_C_bit[1..n] REPPacket.Reply.Address[1..n] = REQPacket.Request.Address[1..n] 3. Send the Route Reply jittered by T milliseconds, where T is a uniformly distributed random number between 0 and BROADCAST_JITTER. DONE. If sending a Route Reply packet to the originator of the Route Request requires performing a Route Discovery, the Route Reply hop-by-hop option MUST be piggybackedDiscoveries after rebooting, onthe packet that contains the Route Request. This preventsaloop wherein the target of the new Route Request (which was itself the originator of the original Route Request) must do another Route Requestbattery backed-up clock or other persistent memory device, in order toreturn its Route Reply. If sending the Route Reply to the originatorhelp avoid any possible such delay in successfully discovering new routes after rebooting; if no such source ofthe Route Request does not require performing Route Discovery,initial Identification value is available, a node SHOULDsend a unicast Route Reply in response to every Route Request targeted at it. 8.4.5. Processingbase its initial Identification value after rebooting on aRoute Reply Option Upon receiptrandom number. 4.3. Send Buffer The Send Buffer of aRoute Reply,node implementing DSR is a queue of packets that cannot be sent by that nodeshould extract thebecause it does not yet have a source route(Target_Address, OUT_Index[1]:Address[1], .. OUT_Index[n]:Address[n] ) and insert this route into its Route Cache. All the packetsto each such packet's destination. Each packet in the Send Buffer is logically associated with the time that it was placed into the Buffer, and SHOULD bechecked to see whetherremoved from theinformationSend Buffer and silently discarded SEND_BUFFER_TIMEOUT seconds after initially being placed inthe Reply allows them to be sent immediately. Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page29]18] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 8.5. Route Maintenance Route Maintenance requires that whenever a node transmits a data packet, a Route Reply, or a Route Error, it must verify that the next hop (indicated by the Destination IP Address) correctly receives2 March 2001 thepacket.Buffer. If necessary, a FIFO strategy SHOULD be used to evict packets before they timeout to prevent thesender cannot verify that the next hop received the packet, it MUST decide that its linkbuffer from overflowing. Subject to thenext hop is broken and MUST sendrate limiting defined in Section 6.2, a RouteError to the node responsibleDiscovery SHOULD be initiated as often as possible forgenerating the Routing Header that containsthebroken link (Section 8.5.3). The following ways may be used to verify thatdestination address of any packets residing in thenext hop correctly received a packet: -Send Buffer. 4.4. Retransmission Buffer ThereceiptRetransmission Buffer of apassive acknowledgment (Section 8.5.1). - Thenode implementing DSR is a queue of packets sent by this node that are awaiting the receipt of anexplicitly requestedacknowledgment from the next hop in the source route (Section8.5.1). - By5.7). For each packet in thepresenceRetransmission Buffer, a node maintains (1) a count of the number of retransmissions and (2) the time ofpositive feedbackthe last retransmission. Packets are removed from thelink layer indicating thatRetransmission Buffer when an acknowledgment is received or when thepacket was acknowledged bynumber of retransmissions exceeds DSR_MAXRXTSHIFT. In thenext hop (Section 8.5.2). - Bylater case, theabsenceremoval ofexplicit failure notificationthe packet from thelink layer that provides reliable hop-by-hop delivery such as MACAW or 802.11 (Section 8.5.2). Nodes MUST NOT perform Route Maintenance for packets containingRetransmission Buffer SHOULD result in a RouteRequest option or packets containing only an Acknowledgment option. Sending Acknowledgments for packets containing only an Acknowledgment option would create an infinite loop whereby acknowledgments would be sent for acknowledgments. Acknowledgments should be always sent for packets containing a Routing Header with the R bit set (e.g., packets which contain only an Acknowledgment and a Routing Header for whichError being returned to thelast forwarding hop requires an explicit acknowledgmentoriginal source ofreceipt by the final destination). 8.5.1. Using Network-Layer Acknowledgments For link layers that do not provide explicit failure notification, the following steps SHOULD be used by a node A to perform Route Maintenance. When receiving a packet: - Ifthe packetcontains a Routing Header with the R bit set, send an explicit acknowledgment as described in Section 8.3. Broch,(Section 6.3). Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page30]19] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 - If the packet does not contain a2 March 2001 5. DSR Header Format The Dynamic Source RoutingHeader, the node MUST transmitprotocol makes use of a special header carrying control information that can be included in any existing IP packet. This DSR header in a packetcontainingcontains a small fixed-sized, 4-octet portion, followed by a sequence of zero or more DSR options carrying optional information. The end of the sequence of DSRAcknowledgment option tooptions in theprevious hop as indicatedDSR header is implied by total length of theIP.Source_Address. Since the receiving nodeDSR header. The DSR header is inserted in thefinal destination, there will be no opportunity forpacket following theoriginatorpacket's IP header, before any following header such as a traditional (e.g., TCP or UDP) transport layer header. Specifically, the Protocol field in the IP header is used toobtainindicate that apassive acknowledgment,DSR header follows the IP header, and thereceiving node must infer the originator's request for an explicit acknowledgment. When sending a packet: 1. Before sending a packet, insert a copy of the packet into the Retransmission Buffer and update the information maintained about this packetNext Header field in theRetransmission Buffer. 2. If after processing the Routing Header, RH.Segments_LeftDSR header isequalused to0, then node A MUST setindicate theAcknowledgment Request (R) bit intype of protocol header (such as a transport layer header) following theRouting Header before transmittingDSR header. The total length of thepacket over its final hop. 3. If after processingDSR header (and thus theRouting Header and copying RH.Address[n] to IP.Destination_Address, node A determines that RH.OUT_C_bit[n+1] is set, then node Atotal, combined length of all DSR options present) MUSTset the Acknowledgment Request (R) bit in the Routing Header before transmitting the packet (since the C bit was set during Route Discovery by the node now listed as the IP.Destination_Address to indicate that it will propagate the packet out a different interface, and that node A will not receivebe apassive acknowledgment). 4. Set the retransmission timer formultiple of 4 octets. This requirement preserves thepacketalignment of any following headers in theRetransmission Buffer. 5. Transmit thepacket.6. If a passive or explicit acknowledgment is received before the retransmission timer expires, then remove the packet from the Retransmission Buffer and disable the retransmission timer. DONE. 7. Otherwise, when the Retransmission Timer expires, remove the packet from the Retransmission Buffer. 8. If DSR_MAXRXTSHIFT transmissions have been done, then attempt to salvage the packet (Section 8.5.5). Also, generate a Route Error. DONE. 9. GOTO step 1. Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page31]20] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 8.5.2. Using Link Layer Acknowledgments If explicit failure notifications are provided by the link layer, then all packets are assumed2 March 2001 5.1. Fixed Portion of DSR Header The fixed portion of the DSR header is used to carry information that must becorrectly received bypresent in any DSR header. This fixed portion of thenext hop and a Route Error is sent only when a explicit failure notification is made fromDSR header has thelink layer. Nodes receiving a packet without a Routingfollowing format: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Headerdo not need to send an explicit Acknowledgment to the packet's originator, since| Reserved | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . Options . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Next Header 8-bit selector. Identifies thelink layer will notifytype of header immediately following theoriginator ifDSR header. Uses thepacket was not received properly. 8.5.3. Originating a Route Error Ifsame values as thenext hop of a packet is found to be unreachableIPv4 Protocol field [26]. Reserved Sent asdescribed in Section 8.5, a Route Error packet (Section 7.2.2) MUST be returned to0; ignored on reception. Payload Length The length of thenode whose cache generatedDSR header, excluding theinformation used to route4-octet fixed portion. The value of thepacket. When a node A generates a Route Error for packet P, it MUST initializePayload Length field defines thefieldstotal length of all options carried in theRoute Error as follows: Error.Source_Address = Home address of node A Error.Unreachable_Address = Home addressDSR header. Options Variable-length field; the length of theunreachable node - IfOptions field is specified by thepacket contains aPayload Length field in this DSRRouting Header andheader. Contains one or more pieces of optional information (DSR options), encoded in type-length-value (TLV) format (with theS bit is NOT set,exception of thepacket has been forwarded withoutPad1 option, described in Section 5.8). The placement of DSR options following theneed for salvaging up to this point. Error.Destination_Address = P.IP.Source_Address - Otherwise, iffixed portion of thepacket contains aDSRRouting Header and the S bit IS set,header MAY be padded for alignment. However, due to thepacket has been salvaged by an intermediate node, and thustypically limited available wireless bandwidth in ad hoc networks, thisRouting Header was placed there by the salvaging node. Error.Destination_Address = P.RoutingHeader.Address[1] - Otherwise, if the packet doespadding is notcontainrequired, and receiving nodes MUST NOT expect options within a DSRRouting Header, the packet must have been originated by this node A. Error.Destination_Address = Home address of nodeheader to be aligned. ASend thenode inserting a DSR header into a packetcontainingMUST set theRoute Error to Error.Destination_Address, performing Route Discovery if necessary. As an optimization, Route Errors that are discovered byDon't Fragment (DF) bit in the packet'soriginator (such that Error.Source_Address is equal to Error.Destination_Address) SHOULD be processed internally. Such Broch,IP header. The following types of DSR options are defined in this document for use within a DSR header: Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page32]21] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 processing should invoke all the steps that would be taken if a2 March 2001 - RouteErrorRequest optionwas created, transmitted, received, and processed, but an actual packet containing a(Section 5.2) - RouteErrorReply optionSHOULD NOT be transmitted. 8.5.4. Processing a Route Error Option Upon receipt of a(Section 5.3) - Route Errorvia any mechanism, a node SHOULD remove any route from its Route Cache that uses the hop (Error.Source_Address, Error.Index to Error.Unreachable_Address). This includes alloption (Section 5.4) - Acknowledgement Request option (Section 5.5) - Acknowledgement option (Section 5.6) - Source RouteErrors overheard, and those processed internally as described in Section 8.5.3. When the node identified by Error.Destination_Address receives theoption (Section 5.7) - Pad1 option (Section 5.8) - PadN option (Section 5.9) Johnson, et al Expires 2 September 2001 [Page 22] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 5.2. RouteError, it SHOULD verify that the source route responsible for delivering theRequest Option The RouteError includes the same hopsRequest DSR option is encoded asthe working prefix of the original packet's source route (Error.Destination_Addressfollows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | Identification | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Target Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[1] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[2] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[n] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IP fields: Source Address MUST be set toError.Source_Address). If any hop listed intheworking prefix is not included inaddress of theRoute Error's source route, thennode originating this packet. Intermediate nodes that retransmit theoriginator SHOULD forwardpacket to propagate the RouteError back along the working prefix (Error.Destination_AddressRequest MUST NOT change this field. Destination Address MUST be set toError.Source_Address) so that each node along the working prefix will removetheinvalid routeIP limited broadcast address (255.255.255.255). Hop Limit (TTL) MAY be varied fromits1 to 255, for example to implement non-propagating RouteCache. If the node processing a Route Error option discovers its home address is Error.Destination_AddressRequests andthe packet contains additionalRouteError option(s) later on the insideRequest expanding-ring searches (Section 3.3.4). Route Request fields: Option Type 2 Opt Data Len 8-bit unsigned integer. Length of theHop by Hop options header, we calloption, in octets, excluding theadditional Route Errors nested Route Errors.Option Type and Opt Data Len fields. Johnson, et al Expires 2 September 2001 [Page 23] INTERNET-DRAFT Thenode MUST deliver the first nested Route Error to Nested_Error.Destination_Address, performing Route Discovery if needed. It does thisDynamic Source Routing Protocol 2 March 2001 Identification A unique value generated byremovingtheRoute Error option listing itself as the Error.Destination_Address, findinginitiator (original sender) of thefirst nestedRouteError option, and originating the remaining packet to Nested_Error.Destination_Address. This mechanism allowsRequest. Nodes initiating a Route Request generate a new Identification value forthe proper handling ofeach RouteErrors that are discovered while deliveringRequest, for example based on a sequence number counter of all RouteError. 8.5.5. SalvagingRequests initiated by the node. This value allows aPacket Whenreceiving nodeA attemptstosalvagedetermine whether it has recently seen apacket originated atcopy of this Route Request: if this Identification value is found by this receiving nodeS and destinedin its Route Request Table (in the cache of Identification values in the entry there for this initiating node), this receiving nodeD, itMUSTperformdiscard thefollowing steps: 1. Generate and send aRouteError to S as explained in Section 8.5.3. 2. Call Route_Cache.Get() to determine if it hasRequest. When propagating acached source route toRoute Request, this field MUST be copied from thepacket's ultimate destination D (which isreceived copy of thelastRoute Request being propagated. Target Addresslisted inThe address of theRouting Header). Broch, Johnson, and Maltz Expires 22 April 2000 [Page 33] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 3. If node A does not have a cached route fornodeD, it MUST discard the packet. DONE. 4. Otherwise, let Salvage_Address[1] through Salvage_Address[m] bethat is thesequencetarget ofhops returned fromthe RouteCache. Initialize the following fields inRequest. Address[1..n] Address[i] is thepacket's header: RT.Segments_Left = m - 2; RT.S = 1 RT.Address[1] = Homeaddress ofNode A RT.Address[2] = Salvage.Address[1] ... RT.Address[n] = Salvage.Address[m]the i-th hop recorded in the Route Request option. TheIPaddress given in the Source Addressof the packet MUST remain unchanged. When the Routing Headerfield in theoutgoing packetIP header isprocessed, RT.Address[2], will be copied totheIP Destination Address field. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 34] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 9. Optimizations A numberaddress ofoptimizations can be added tothebasic operationinitiator of the Route Discovery andRoute Maintenance as describedMUST NOT be listed inSections 8.4 and 8.5 that can reducethenumber of overhead packets and improveAddress[i] fields; theaverage efficiencyaddress given in Address[1] is thus the address of theroutes usedfirst node ondata packets. This section discusses some of those optimizations. 9.1. LeveragingtheRoute Cache The data in a node's Route Cache may be stored in any format, butpath after theactive routes in its cache form a treeinitiator. The number ofroutes, rooted at this node, to other nodesaddresses present in this field is indicated by thead hoc network. For example, the illustration below shows an ad hoc network of six mobile nodes,Opt Data Len field inwhich mobilethe option (n = (Opt Data Len - 2) / 4). Each nodeA has earlier completed apropagating the RouteDiscovery for mobile node D and has cached a routeRequest adds its own address toD through B and C: B->C->D +---+ +---+ +---+ +---+this list, increasing the Opt Data Len value by 4 octets. The Route Request option MUST NOT appear more than once within a DSR header. Johnson, et al Expires 2 September 2001 [Page 24] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 5.3. Route Reply Option The Route Reply DSR option is encoded as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+ |A |---->| B |---->| C |---->| DOption Type |+---+ +---+ +---+ +---+ +---++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FOpt Data Len |L| Reserved |+---+ +---+Identification |E+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |+---+ Since nodes B and C are on the routeAddress[1] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[2] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[n] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IP fields: Source Address Set toD,the address of the nodeA also learnssending theroute to bothRoute Reply. In the case ofthese nodesa node sending a reply from its RouteDiscovery for D. If A later performsCache (Section 3.3.2) or sending a gratuitous RouteDiscovery and learns the route to E through B and C, it can representReply (Section 3.4.2), thisin its Route Cache withaddress can differ from theadditionaddress that was the target of thesingle new hop from C to E. If A then learns it can reach C in a single hop (without needing to go through B), A SHOULD use this new route to CRoute Discovery. Destination Address MUST be set toalso shortentheroutes to D and E in its Route Cache. 9.1.1. Promiscuous Learningaddress ofSource Routes Athe source nodecan add entries to its Route Cache any time it learns a new route. In particular, when a node forwards a data packet as an intermediate hop onof the routein that packet,being returned. Copied from theforwarding node is able to observeSource Address field of theentire routeRoute Request generating the Route Reply, or in thepacket. Thus, for example, when any intermediate node B forwards packetscase of a gratuitous Route Reply, copied fromA to D, B SHOULD addthesource route information from that packet's Routing Header to its own Route Cache. If a node forwards aSource Address field of the data packet triggering the gratuitous Reply. Route Replypacket, it SHOULD also add the source route information fromfields: Option Type 3 Opt Data Len 8-bit unsigned integer. Length of theroute record being returnedoption, in octets, excluding theRoute Reply, to its own Route Cache. Broch, Johnson,Option Type andMaltzOpt Data Len fields. Johnson, et al Expires22 April 20002 September 2001 [Page35]25] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 In addition, since all wireless network transmissions at the physical layer are inherently broadcast, it may be possible for a node2 March 2001 Last Hop External (L) Set toconfigure its network interface into promiscuous receive mode, suchindicate that the last nodeis able to receive all packets without link layer address filtering. In this case, the node MAY add to its Route Cacheindicated by theroute information from any packet it can overhear. 9.2. PreventingRoute ReplyStorms The ability for nodes(Address[n]) is actually in a network external toreplythe DSR network; the exact sequence of hops leading toa Route Requestit outside the DSR network is nottargeted at them by using theirrepresented in the RouteCaches can resultReply. Nodes caching this hop inatheir RouteReply storm. IfCache MUST flag the cached hop with the External flag. Such hops MUST NOT be returned in anode broadcastscached Route Reply generated from this Route Cache entry, and selection of routes from the Route Cache to route a packet being sent SHOULD prefer routes that contain no hops flagged as External. Reserved Sent as 0; ignored on reception. Identification Copied from the Identification field of the Route Request fora node that its neighbors havewhich this Reply is sent intheirresponse. Sent as 0 if the RouteCaches, each neighbor may attemptReply is not sent in response tosenda RouteReply, thereby wasting bandwidth and increasingRequest (a gratuitous Route Reply). Address[1..n] The source route being returned by therateRoute Reply. The route indicates a sequence ofcollisions inhops, originating at thearea. For example,source node specified in thenetwork shown in Section 9.1, if both node A and node B receive F's Route Request, they will both attempt to reply from their Route Caches. Both will send their Replies at aboutDestination Address field of thesame time since they receiveIP header of thebroadcast at aboutpacket carrying thesame time. Particularly when more thanRoute Reply, through each of thetwo mobileAddress[i] nodes inthis example are involved, these simultaneous replies fromthemobile nodes receivingorder listed in thebroadcast may create packet collisions among some or allRoute Reply, ending with the destination node indicated by Address[n]. The number ofthese replies and may cause local congestionaddresses present in thewireless network. In addition, it will often beAddress[1..n] field is indicated by thecase thatOpt Data Len field in thedifferent replies will indicate routes of different lengths. For example, A's Route Reply will indicateoption (n = (Opt Data Len - 3) / 4). A Route Reply option MAY appear one or more times within aroute to D thatDSR header. Johnson, et al Expires 2 September 2001 [Page 26] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 5.4. Route Error Option The Route Error DSR option isone hop longer than thatencoded as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | Error Type |Reservd|Salvage| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . Type-Specific Information . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type 4 Opt Data Len 8-bit unsigned integer. Length of the option, inB's reply.octets, excluding the Option Type and Opt Data Len fields. Forinterfaces which can promiscuously listen tothechannel, mobile nodes SHOULD usecurrent definition of thefollowing algorithmRoute Error option, this field MUST be set toreduce10, plus thenumbersize ofsimultaneous replies by slightly delaying their Route Reply: 1. Pick a delay period d = H * (h - 1 + r) where h is the lengthany Type-Specific Information present innumber of network hops fortheroute to be returned in this node'sRouteReply, r is a random number between 0 and 1, and H is a small constant delayError. Further extensions tobe introduced per hop. 2. Delay transmittingthe RouteReply from this node for a periodError option format may also be included after the Type-Specific Information portion ofd. 3. Withinthedelay period, promiscuously receive all packets at this node. If a packet is receivedRoute Error option specified above. The presence of such extensions will be indicated bythis node duringthedelay period thatOpt Data Len field. When the Opt Data Len isaddressed togreater than that required for thetargetfixed portion ofthisthe RouteDiscovery (the target isError plus thefinal destination address fornecessary Type-Specific Information as indicated by thepacket, through any sequence of intermediate hops), and ifOption Type value in thelengthoption, the remaining octets are interpreted as extensions. Currently, no such further extensions have been defined. Error Type The type of error encountered. Currently, theroute on this packetfollowing type value isless than h, then canceldefined: 1 = NODE_UNREACHABLE Other values of thedelay Broch,Error Type field are reserved for future use. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page36]27] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 timer and do not transmit the Route Reply2 March 2001 Reservd Reserved. Sent as 0; ignored on reception. Salvage A 4-bit unsigned integer. Copied fromthis node; this node may infer thattheinitiatorSalvage field in the Source Route option ofthisthe packet triggering the RouteDiscovery has already received aError, incremented by the node returning the RouteReply, giving an equally good or better route. 9.3. Piggybacking onError. Error Source Address The address of the node originating the RouteDiscoveries As described in Section 5.1, when oneError (e.g., the nodeneedsthat attempted tosendforward a packetto another, ifand discovered thesender does not have a route cachedlink failure). Error Destination Address The address of the node to which thedestination node, it must initiate aRouteDiscovery, buffering the original packet untilError must be delivered For example, when theRoute Reply is returned. The delay for Route Discovery and the total number of packets transmitted can be reduced by allowing data to be piggybacked on Route Request packets. Since some Route Requests may be propagated widely within the ad hoc network, though, the amount of data piggybacked must be limited. We currently use piggybacking when sending a Route Reply or a RouteErrorpacket, since both are naturally small in size. Small data packets such as the initial SYN packet opening a TCP connection [18] could easily be piggybacked. One problem, however, arises when piggybacking on Route Request packets. If a Route RequestType field isreceived by a node that repliesset tothe request based on its Route Cache without propagating the Request (Section 9.1), the piggybacked data will be lost if the node simply discards the Route Request. In this case, before discarding the packet, the node must construct a new packet containing the piggybacked data from the Route Request packet. The source route inNODE_UNREACHABLE, thispacket MUSTfield will beconstructedset toappear as if the new packet had been sent bytheinitiatoraddress of theRoute Discovery and had been forwarded normally to this node. Hence,node that generated thefirst portion ofrouting information claiming that theroute is takenhop from theaccumulated route recordError Source Address to Unreachable Node Address (specified in theRoute Request packet andType-Specific Information) was a valid hop. Type-Specific Information Information specific to theremainderError Type ofthe route is taken fromthisnode'sRouteCache. The sender address in the packet MUST also be set to the initiator ofError message. Currently, the Type-Specific Information field is defined only for RouteDiscovery. SinceError messages of type NODE_UNREACHABLE. In this case, thereplying node will be unable to correctly recompute an Authentication header for the split off piggybacked data, data covered by an Authentication header SHOULD NOT be piggybacked on Route Request packets. 9.4. Discovering Shorter Routes Once a route between a packet source and a destination has been discovered,Type-Specific Information field is defined as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Unreachable Node Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Unreachable Node Address The address of thebasic DSR protocol MAY continue to usenode thatroute for all traffic from the sourcewas found tothe destination as long as it continuesbe unreachable (the next hop neighbor towork, even if the nodes move such that a shorter route becomes possible. In many cases, the basic Route Maintenance procedure will discoverwhich theshorter route, since if anodemoves enoughwith address Error Source Address was attempting tocreate a shorter route, it will likely also move out of transmission range of at least one hop ontransmit theexisting route. Broch,packet). A Route Error option MAY appear one or more times within a DSR header. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page37]28] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 Furthermore, when a data packet is received as the result of operating in promiscuous receive mode, the node checks if the Routing Header packet contains its address in the unprocessed portion of the source route (Address[NumAddrs - SegLft] to Address[NumAddrs]). If so, the node knows that packet could bypass the unprocessed hops preceding it in the source route.2 March 2001 5.5. Acknowledgment Request Option Thenode then sends whatAcknowledgment Request DSR option iscalled a gratuitous Route Reply message to the packet's source, giving it the shorter route without these hops. The following algorithm describes how a node A should process packets with an IP.Destination_Address not addressed to A or the IP broadcast address or a multicast address that are receivedencoded asa resultfollows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | Identification | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACK Request Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type 5 Opt Data Len 8-bit unsigned integer. Length ofA beingthe option, inpromiscuous receive mode: 1. Ifoctets, excluding thepacketOption Type and Opt Data Len fields. Identification The Identification field isnot a data packet containingset to aRouting Header, drop the packet. DONE. 2. If the home address of this node does not appear inunique nonzero value and is copied into theportionIdentification field of thesource route that has not yet been processed (indicatedAcknowledgement option when returned bySegments Left), then drop the packet. DONE. 3. Otherwise,the nodeB that just transmittedreceiving the packet(indicated by Address[NumAddrs - SegLft - 1]) can communicate directly withover thisnode A. Create a Route Reply.hop. ACK Request Source Address TheRoute Reply MUST list the entire source route contained in the received packet with the exceptionaddress of theintermediate nodes between node B and node A. 4. Send this gratuitous Route Reply to thenodelisted as the IP.Source_Address of the received packet. If Route Discovery is required it MAY be initiated, orrequesting thegratuitous Route Reply packet MAY be dropped. 9.5. Rate Limiting the Route Discovery Process One common error condition that must be handled in an ad hoc networkacknowledgment. An Acknowledgement Request option MUST NOT appear more than once within a DSR header. Johnson, et al Expires 2 September 2001 [Page 29] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 5.6. Acknowledgment Option The Acknowledgment DSR option is encoded as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | Identification | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACK Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACK Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type 6 Opt Data Len 8-bit unsigned integer. Length of thecaseoption, inwhichoctets, excluding thenetwork effectively becomes partitioned. That is, two nodes that wish to communicate are not within transmission range of each other,Option Type andthere are not enough other mobile nodes between them to form a sequenceOpt Data Len fields. Identification Copied from the Identification field ofhops through which they can forward packets. If a new Route Discovery was initiated for eachthe Acknowledgement Request option of the packetsent by a node in this situation, a large numberbeing acknowledged. ACK Source Address The address ofunproductive Route Request packets would be propagated throughoutthesubsetnode originating the acknowledgment. ACK Destination Address The address of thead hoc network reachable from this node. In ordernode toreducewhich theoverhead from such Route Discoveries, we use exponential back-offacknowledgment is tolimit the rate at which new Route Discoveries maybeinitiated from any node for the same target. If the node attempts to send additional data packets to this same nodedelivered. An Acknowledgement option MAY appear one or morefrequently than this limit, the subsequent packets SHOULD be buffered in the Send Buffer until a Route Reply is received, but it MUST NOT initiatetimes within aBroch,DSR header. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page38]30] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 new2 March 2001 5.7. Source RouteDiscovery until the minimum allowable interval between newOption The Source RouteDiscoveries for this target has been reached. This limitation on the maximum rateDSR option is encoded as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len |F|L|Reservd|Salvage| Segs Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[1] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[2] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[n] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type 7 Opt Data Len 8-bit unsigned integer. Length ofRoute Discoveries forthesame target is similar tooption, in octets, excluding themechanism required by Internet nodes to limitOption Type and Opt Data Len fields. For therate at which ARP requests are sent to any single IP address [2]. 9.6. Improved Handling of Route Errors All nodes SHOULD process allformat of the Source RouteError messages they receive, regardless of whetheroption defined here, this field MUST be set to thenodevalue (n * 4) + 2, where n is thedestinationnumber of addresses present in theRoute Error, is forwardingAddress[i] fields. First Hop External (F) Set to indicate that the first node indicated by the Source RouteError, or promiscuously overhears the Route Error. Sinceoption is actually in aRoute Error packet names both ends ofnetwork external to thehop that is no longer valid, anyDSR network; the exact sequence of hops leading from it outside thenodes receivingDSR network are not represented in theerror packet may updateSource Route option. Nodes caching this hop in their RouteCaches to reflectCache MUST flag thefact thatcached hop with thetwo nodes indicatedExternal flag. Such hops MUST NOT be returned inthe packet can no longer directly communicate. A node receivinga RouteError packet simply searches itsReply generated from this Route Cachefor anyentry, and selection of routesusing this hop. For each such route found, the route is effectively truncated at this hop. All nodes onfrom the Route Cache to routebefore this hop are still reachable on this route, but subsequent nodes are not. An experimental optimizationa packet being sent SHOULD prefer routes that contain no hops flagged as External. Last Hop External (L) Set toimproveindicate that thehandling of errors is to supportlast hop indicated by thecaching of "negative" information in a node'sSource RouteCache. The goal of negative informationoption isto record thatactually in agiven route was tried and found notnetwork external towork, so that if the same route is discovered again shortly afterthefailure, the Route Cache can ignore or downgradeDSR network; themetricexact sequence of hops leading to it outside thefailed route. We haveDSR network are notcurrently included thisrepresented in the Source Route option. Nodes cachingof negative informationthis hop inour simulations, since it appears to be unnecessary if nodes also promiscuously receivetheir RouteError packets. 9.7. Increasing Scalability We recently designed and began experimenting with ways to integrate ad hoc networks withCache MUST flag theInternet and with Mobile IP [14]. In addition to this, we are also exploring ways to increase the scalability of ad hoc networks by taking advantage of their cooperative nature and the fact that some hierarchy can be imposed on an ad hoc network, just be assigning addresses to the nodes in a reasonable way. These ideas are described in a workshop paper [4]. Broch,cached Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page39]31] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 10. Path-State2 March 2001 hop with the External flag. Such hops MUST NOT be returned in a Route Reply generated from this Route Cache entry, andFlow-State Mechanisms This section describesselection of routes from thecurrent designRoute Cache to route a packet being sent SHOULD prefer routes that contain no hops flagged as External. Reserved Sent as 0; ignored on reception. Salvage A 4-bit unsigned integer. Count ofour framework for supporting better-than-best-effort Qualitynumber of times that this packet has been salvaged as a part ofService in DSR networks. The framework dovetails into DSR's existing mechanisms, and, likeDSRitself, is completely on-demand in nature --- no packets are sent unless there is user data to transfer. The framework is based on the introductionrouting (Section 3.4.1). Segments Left (Segs Left) Number oftwo kindsroute segments remaining, i.e., number ofsoft-state, called path-state and flow-state, at theexplicitly listed intermediate nodesalongstill to be visited before reaching thepath between senders and destinations. Taken together,final destination. Address[1..n] The sequence of addresses of thepath-statesource route. In routing andflow-state extensions extend the Quality of Service provided by DSR networks inforwarding thefollowing ways: - They eliminatepacket, theneed for all data packets to carrysource route is processed as described in Sections 6.1.3 and 6.1.5. When forwarding a packet along a DSR sourceroute, increasingroute using a Source Route option in theefficiency ofpacket's DSR header, theprotocolSource Address field ingeneral. - They provide accurate measurements ofthestatepacket's IP header is always set to the address of thenetwork to higher layers protocols for use in adaptation. - They enable senders to explicitly managepacket's ultimate destination. A node receiving a packet containing a DSR header with a Source Route option MUST examine theconsumption of resources acrossindicated source route to determine if it is thenetwork. - They enableintended next hop for thenetwork to provide better-than-best-effort service via admission controlpacket andper-flow resource management. 10.1. Overview Path-state allows intermediate nodesdetermine how to forwardpackets according to a predetermined source route, even when most packets do not includethefull source route. Conceptually,packet, as defined in Sections 6.1.4 and 6.1.5. Johnson, et al Expires 2 September 2001 [Page 32] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 5.8. Pad1 Option The Pad1 DSR option is encoded as follows: +-+-+-+-+-+-+-+-+ | Option Type | +-+-+-+-+-+-+-+-+ Option Type 0 A Pad1 option MAY be included in theoriginatorOptions field ofeach data packet initially includes both a source route andaunique path identifierDSR header ineach packet it sends. As intermediateorder to align subsequent DSR options, but such alignment is not required and MUST NOT be expected by nodesforward the packet, they cache the source route from the packet, indexedreceiving packets containing a DSR header. The total length of a DSR header, indicated by thepath identifier. The source can then send subsequent packets carrying onlyPayload Length field in thepath identifier, since intermediate nodes willDSR header MUST beable to forward the packet based on the source route for the path that they have cached. While path-state allows the eliminationa multiple ofthe source route from each4 octets. When building a DSR header in a packet,thereby reducingsufficient Pad1 or PadN options MUST be included in theoverheadOptions field of the DSRprotocol, it also provides a way for sourcesheader tomonitormake thestate of each path through the network. Whentotal length asource wishes to know the characteristicsmultiple ofa path through4 octets. If more than one consecutive octet of padding is being inserted in thenetwork, it piggybacksOptions field of apath-metrics header onto any data or control packet traversing the path. As the packet propagates throughDSR header, thenetwork, each intermediate node updatesPadN option, described next, SHOULD be used, rather than multiple Pad1 options. Note that thesetformat ofpath-metrics carried by the packet to reflect the local network conditions seen at the node. These metrics are reflected back to the sender bythedestination, along with the path Broch,Pad1 option is a special case; it does not have an Opt Data Len or Option Data field. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page40]33] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 identifier, and enable the sender to track the value of these metrics for each of the source routes it2 March 2001 5.9. PadN Option The PadN DSR option iscurrently using. We are currently experimenting with metrics that are easy for nodes to measure, that require constant size to represent regardless of source route length, and that would enable the sender's network layer to provide useful feedback to higher layers on the stateencoded as follows: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | Option Type | Opt Data Len | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - Option Type 1 Opt Data Len 8-bit unsigned integer. Length of thenetwork. For example, by including ``available bandwidth'' or ``battery level'' as a metric, senders can load balanceoption, in octets, excluding theconsumptionOption Type and Opt Data Len fields. Option Data A number ofresources acrosszero valued octets equal to thenetwork. We have also consideredOpt Data Len. A PadN option MAY be included in thepossibilityOptions field ofreplacing the TCP congestion control algorithm witha``leaky-bucket'' system controlled by the reflected path-metrics --- our measured performance results show this could dramatically improve TCP throughputDSR header inenvironments where many packets are lost due to packet corruption. The feedback could also be used as inputsorder toother researcher's systems for improving the transport layer,align subsequent DSR options, but suchas Liualignment is not required andSingh's ATCP [11], or for adaptation at higher layers, as in Odyssey [13]. Flow-state allowsMUST NOT be expected by nodes receiving packets containing asource to differentiate its traffic into flows, and then request better-than-best-effort handling for these flows. With the additional information providedDSR header. The total length of a DSR header, indicated by theflow-state,Payload Length field in thenetwork can provide admission control and promiseDSR header MUST be aspecific Qualitymultiple ofService (QoS) to each flow. Since the ad hoc network may frequently change topology,4 octets. When building a DSR header in a packet, sufficient Pad1 or PadN options MUST be included in theflow-state mechanisms are directly integrated intoOptions field of therouting protocol to minimize their reaction time and provide notificationsDSR header toa flow whenmake thenetwork must break its promise fortotal length aspecific levelmultiple ofQoS. 10.2. Path-State and Flow-State Identifiers4 octets. Johnson, et al Expires 2 September 2001 [Page 34] INTERNET-DRAFT Themetadata that intermediate nodes in the network must process is divided into path-state and flow-state, where path-state is the fundamental unit ofDynamic Source Routing Protocol 2 March 2001 6. Detailed Operation 6.1. General Packet Processing 6.1.1. Originating a Packet When originating any packet, a node using DSR routinginformation and flow-state isMUST perform thefundamental unit of Quality of Service information. Path-state is associated with a particular setfollowing sequence ofhops throughsteps: - Search thenetwork from some source S to a destination D (i.e.,node's Route Cache for aparticular sourcerouteinto thenetwork). It consists ofaddress given in theinformation needed to route packets alongIP Destination Address field in thepath, and information aboutpacket's header. - If no such route is found in thecarrying capacity ofRoute Cache, then perform Route Discovery for thepath, suchDestination Address, as described in Section 6.2. - If theunused bandwidth alongpacket contains a Route Request option, then replace thepath orIP Destination Address field with theminimum latencyIP "limited broadcast" address (255.255.255.255) [3]. - Else, this node must have a route to the Destination Address of thepath. Flow-state is specific topacket (since otherwise aparticular classRoute Request would have been added to the packet). If the length ofpackets flowing between S and D that is routed over a given path. Flow-statethis route isusedgreater than 1 hop, or if the node determines torecord Qualityrequest a DSR network-layer acknowledgement from the first hop ofService promises that have been made forthe route, then insert aparticular flow,DSR header as described in Section 6.1.2, andallows packetsinsert a Source Route option, as described in Section 6.1.3. The source route in the packet is initialized fromSthe route toD that takethesame path throughDestination Address found in thenetworkRoute Cache. - Transmit the packet tobe treated differently by intermediate nodes. For example, alltheTCP connections between S and D that Broch, Johnson, and Maltz Expires 22 April 2000 [Page 41] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 takeaddress given in thesame path will sharenext hop, using Route Maintenance to retransmit thesame path-state, but may have independent flow-state. At any pointpacket if necessary, as described intime, S may use multiple paths for its trafficSection 6.3. 6.1.2. Adding a DSR Header toD and each of these paths may be comprised of many flows. However,asingle network layer flow may not be multiplexed over different paths. To represent paths and flows inside the network, we usePacket A node originating ascheme inspired bypacket adds a DSR header to theVirtual Path Index and Virtual Circuit Index of ATM networks [23, p. 451]. Paths are identifiedpacket, if necessary, to carry information needed by thelogical concatenation of the source node address androuting protocol. A packet MUST NOT contain more than one DSR header. A DSR header is added to a16-bit path identifier where the low 5 bits are 0. Flows are identifiedpacket bya path identifier whereperforming thelow 5 bits are used to distinguish betweenfollowing sequence of steps (these steps assume that thedifferent flowspacket contains no other headers thatuseMUST be located in thesame path. This scheme has two main advantages. First, each source node can independently generate globally unique path- and flow-identifiers. Second,packet before thehierarchical relation of flow-identifiers to path-identifiers meansDSR header): - Insert a DSR header after the IP header but before any other header thatmany flows frommay be present. - Set thesame source node can shareNext Header field of thesame path-state, which reducesDSR header to theoverheadProtocol number field ofmaintainingtherouting information.packet's IP header. Johnson, et al Expires 2 September 2001 [Page 35] INTERNET-DRAFT Thedrawback is that if a flow must be rerouted, its flow identifier will change. However, when a flow is rerouted the QoS metadata must be renegotiated anyway, so changing flow identifiers will not create needless additional work inDynamic Source Routing Protocol 2 March 2001 - Set thenetwork. 10.3. Path-State Creation, Use, and Maintenance The path-state portionProtocol field of theprotocol has two major goals. The first goal ispacket's IP header toensure sufficient state exists atthenodes alongProtocol number assigned for apath fromDSR header (???). 6.1.3. Adding asource SSource Route Option to adestination D so that packets from SPacket A node originating a packet adds a Source Route option toD do not needthe packet, if necessary, in order to carry thecompletesourceroute. The second goal is to allow S to discover the characteristicsroute ofa particular path to D so that it can adapt its sending patternhops from this originating node to thecapabilitiesfinal destination address of thepath, or even choose a different path entirely. The next sections describe howpacket. Specifically, thepath-state is created, hownode adding thecharacteristics ofSource Route option constructs thepath are discovered,Source Route option andwhat metrics can be used to characterizemodifies thepath. 10.3.1. Creating Path-State for Routing To createIP packet according to thepath-state, we assume thatfollowing sequence of steps: - A Source RouteDiscovery proceedsoption, asnormaldescribed inDSR. Once the source node S has obtained a source routeSection 5.7, is created and appended to thedestination D, it begins sending data packets to D as normally doneDSR header inDSR, with eachthe packetcarrying a full source route header. Internally, S assigns a path-identifier(a DSR header is added, as described in Section 6.1.2, if not already present). - The number of Address[i] fields tothat particular source route and storesinclude in the DSR Source Route option (n) is thepath-identifiernumber of intermediate nodes inits route cache along withthe sourceroute. S then includesroute for thepath-identifier as partpacket (i.e., excluding address of theBroch, Johnson,originating node andMaltz Expires 22 April 2000 [Page 42] INTERNET-DRAFTthe final destination address of the packet). TheDynamicSegments Left field in the DSR SourceRouting Protocol 22 October 1999 A -----------------> B -----------------> C -----------------> D +-------------+ +-------------+ +-------------+ |src: A | |src: A | |src: A | |dst: D | |dst: D | |dst: D | |path-id: 15 | |path-id: 15 | |path-id: 15 | |rt: A,(B),C,D| |rt: A,B,(C),D| |rt: A,B,C,(D)| +-------------+ +-------------+ +-------------+ | payload | | payload | | payload | (a) Packet with path identifier and source route. A -----------------> B -----------------> C -----------------> D +-------------+ +-------------+ +-------------+ |src: A | |src: A | |src: A | |dst: D | |dst: D | |dst: D | |path-id: 15 | |path-id: 15 | |path-id: 15 | +-------------+ +-------------+ +-------------+ | payload | | payload | | payload | (b) Packet with path identifier only. Figure 2: Path identifiers assigned to a source route by the originating node A enable later packetsRoute option is initialized equal toomitn. - The Destination Address from thesource route. source routeIP headeras shownis copied into Address[n] inFigure 2(a). As each intermediate node processesthe DSR Source Route option. - The first hop of the source routeto forwardfor thepacket, it also storespacket is copied into thesource routeDestination Address field inits route cache, indexed bythesource and path-identifier. After sending a packet containing bothIP header. - The remaining hops of the source routeandfor thepath-identifierpacket are copied into sequential Address[i] fields in the Source Route option, for i = 1, 2, ..., n-1. - The First Hop External (F) bit in the Source Route option is copied from the External bit flagging the first hop node in thenetwork, S can begin sending subsequent packets to D without a fullsource route--- carrying onlyfor thepath-identifierpacket, asshownindicated inFigure 2(b). Each intermediate node receiving such a packet queries its route cache to findtherouteRoute Cache. - The Last Hop External (L) bit in thepacketSource Route option issupposed to take, and determines its next hop. As explainedcopied from the External bit flagging the last hop node inSection 10.5, ifthecachedsource routeis not available at some intermediate node, S will receive a Route Error and can then correct the situation. 10.3.2. Monitoring Characteristics offor thePath In order to support network layer services suchpacket, asbalancing the traffic load acrossindicated in thenetwork, end-systems must haveRoute Cache. 6.1.4. Receiving amethod for determining the characteristics of the paths through the network that Broch,Packet When a node receives any packet containing a DSR header, it MUST process the packet according to the following sequence of steps: - If the Destination Address in the packet's IP header matches one of this receiving node's own IP address(es), remove the DSR Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page43]36] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 they could use. While many schemes have been proposed by which the end-systems themselves can measure the characteristics of a path (e.g., TCP congestion window and RTT calculations [1, 22, 24]2 March 2001 header andSPAND [21]), we hypothesize that, particularly inall the included DSR options in thedynamic environment of an ad hoc network, more useful, more accurate,header, andmore timely information can be developed by enlistingpass theaidrest of thenodes along the path to measure the path characteristics. We propose that each node can measure the activity around itself, and thereby determine information such as: the mean latency it addspacket to thepackets it forwardsnetwork layer. - Examine andthe latency variation (jitter); the numberprocess each ofadditional packets per second it believes it can process; ortheunused amount of wireless media capacityoptions (if any) in theair aroundDSR header in thenode. Experimentation will be required to discover exactlyorder in whichmetrics will prove tothey occur in the packet, skipping over any Pad1 or PadN options. Any DSR routing information carried in a packet SHOULD beaccurately measurableexamined anduseful, though Section 10.3.3 provides several proposals. Ifreflected in themetrics kept by each node on a pathnode's Route Cache, even if the options in the packet arecombined,not otherwise processed as described above. In particular, theresult shouldfollowing routing information SHOULD be handled in this way: - In acharacterization ofRoute Request option, thepath thataccumulated route record, represented by thepacket sender can use to organize or adapt its offered load. To implement this scheme, we first define a new typeIP Source Address ofextension header for DSR than can be piggybacked onto a packet in the same way astheexisting DSR headers. This new header is called the path metrics header (written as Measure)packet andconceptually consists ofby thepath-identifiersequence of Address[i] entries in thepath along whichRoute Request option SHOULD be added to themetrics are measured,node's Route Cache. - In a Route Reply option, thetyperoute record being returned, represented by the sequence of Address[i] entries in theMeasure,Route Request option and by themetrics themselves encodedDestination Address ina TLV format (Section 10.6.2). Whenever a sender S wishesthe packet's IP header SHOULD be added tomeasurethecharacteristics of a path it is using, it includesnode's Route Cache. - In an Acknowledgement option, theMeasure header in any packet it sends along that path, settingsingle link from thetype ofACK Source Address to theheaderACK Destination Address SHOULD be added torecord. As each node alongthepath forwardsnode's Route Cache. - In a Route Error option, thepacket, it updatessingle link from thevariables insideError Source Address to theMeasure header withUnreachable Node Address MUST be removed from themetrics it has measured locally. Whennode's Route Cache. - In a Source Route option, theheader reachesindicated source route SHOULD be added to thefinal destination D, D setsnode's Route Cache, subject to thetypeconditions identified in Section 3.3.1. The full sequence of hops in theMeasure header to return and piggybacksDSR Source Route option is as follows: * The Source Address in the packet's IP headerinto any packet headed back to S. Sinceis thepath metrics header includesfirst hop (the sender of thepath-identifierpacket). * The sequence of hops Address[1], Address[2], ..., Address[n] follow immediately after thepath along which it was measured, S can includeIP Source Address in thedata into its route cache for future use, and can treatsource route, where n is thereceiptnumber of addresses in thepath metrics header as a positive acknowledgment that the path-state between S and D forpacket, or (Opt Data Len - 2) / 4. * The Destination Address in thegiven path-identifierpacket's IP header iscorrectly set up. This could lead S to cease including source routes inthepackets it sends alongfinal destination of thepath, as described in Section 10.3.1. If we find that itpacket and isvaluable to immediately provide S withthepath metricslast hop ofevery discovered route, we could alter Route Discovery slightly to generate this information. Currently, if an intermediate node has a cached route that it can use to answer a Route Request, it generates a Route Reply itself. Instead, we could require it to place its proposed route ontheRoute Request (turning it from a Broch,source route. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page44]37] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 flood-fill broadcast into2 March 2001 In addition to the processing of received packets described above, aunicast packet) and sendnode SHOULD examine the packet to determine if thedestination so it will measure the metricsreceipt of this packet indicates an opportunity for automatic route shortening, as described in Section 3.4.2. If thecomplete path. The destination willreceived packet satisfies the tests described there, thenreturnthis node SHOULD perform themetricsfollowing sequence of steps: - Return a gratuitous Route Reply to thesource along withIP Source Address of theRoute Replypacket, as describedabove. We have been intending to experiment with this alteration to Route Discovery for some time,in Section 3.4.2. - Discard the received packet, sinceit offers two benefits, even without path-state metrics. It should decreasethenumberpacket has been received before its normal traversal ofbroken routes returned by Route Discovery since each cachedthe packet's source routeis tested before being returned, and it should save us from jeopardizing one data packet for every bad route in someone's cache. The cost is some extra latency on Route Discovery. 10.3.3. Candidate Metrics In order to limit the additional overhead that collecting and distributing path-state metrics will place on the network, all the metrics mustwould havethe property that the amount of space requiredcaused it toexpress the metric does not increase as the numberreach this receiving node. Another copy ofhops onthepath increases. Experimentationpacket willbe required to determine which metrics are most accurately measured and most useful, but our initial set of candidates includesnormally arrive at this node as indicated in thefollowing: - Interface queue length --- Our previous work [12] has shown thatpacket's source route; discarding thisis a good estimator of local congestion. - Rateinitial copy ofinterface queue draining --- When an interface is backlogged,therate atpacket, whichpackets leavetriggered thequeue directly measuresgratuitous Route Reply, will prevent theusable capacityduplication of this packet thatinterface. - Quiet time fraction --- When an interface is not backlogged, the usable capacity ofwould otherwise occur. 6.1.5. Processing a Received Source Route Option If a received packet contains a DSR header with a DSR Source Route option, theinterface canSource Route option MUST beestimated by promiscuously listening to the mediaexamined andmeasuring the fraction of time during which itprocessed (even though this node is not indicated inuse (though this will overestimatethecapacity). - Fraction Free Air Time --- The fractionDestination Address field oftime our interface would be ablethe packet's IP header). If, after processing a Source Route option in a received packet, an intermediate node determines that the packet is tosendbe forwarded onto apacket. That is,link whose link MTU is less than thefractionsize oftimetheinterface does not sense carrier, is not deferring,packet, the node MUST discard the packet andis not backed off. Current experiments show this issend anexcellent predictor of congestion and available capacity. - Forwarding latency and variation --- This can be measured asICMP Packet Too Big message to thetime between whenpacket's Source Address [23]. A Source Route option in apacket is received and when itDSR header for IPv4 isacknowledged byprocessed according to thenext hop. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 45] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999following sequence of steps: -Unidirectional links --- Paths containing unidirectional links are usable, but undesirable as they increaseIf theoverheadvalue of the Segments Left field in the Source RouteMaintenance. - Packet loss rate --- Signal quality informationoption equals 0, then remove the Source Route option from theinterface itself, orDSR header. - Else, let n equal (Opt Data Len - 2) / 4. This is thefrequencynumber ofhop-by-hop retransmission, can be used to estimateaddresses in theloss rate of each link.Source Route option. -Likelihood of path breakage --- Intermediate nodes may know ahead of time that they intend to shutdown or move such that paths through them will no longer work. These metrics all haveIf theproperty that they can be expressed in a singlevaluethat each node can measure locally. As a packet with a path metrics header passes through a node, the metrics inof theheader can be updatedSegments Left field is greater than n, then send an ICMP Parameter Problem, Code 0, message [23] toreflectthenode's metrics using a combination function like minimum, maximum, sum, or weighted average that produces another single valueIP Source Address, pointing toreplacetheone already inSegments Left field, and discard theheader. This updating will be done atpacket. Do not process thelast possible moment beforeSource Route option further. - Else, decrement thepacket is forwarded, in order to assurevalue of thepacket hasSegments Left field by 1. Let i equal n minus Segments Left. This is themost current metrics on it when it leaves. 10.4. Flow-State Creation, Use, and Maintenance The flow-state portionindex of theprotocol enables a sender to obtain promises from all nodes along a pathnext address to be visited in the Address vector. Johnson, et al Expires 2 September 2001 [Page 38] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 - If Address[i] or the IP Destination Address is adestination that a certain set of resources are available alongmulticast address, then discard thepath, and thatpacket. Do not process theintermediate nodes are committed to making these resources available forSource Route option further. - Forward theparticular flow. This allows a senderpacket toobtain better-than-best-effort Qualitythe IP address specified in the Address[i] field ofService for a flow by obtaining promises fromtheintermediate nodes to reserveIP header, following normal IP forwarding procedures, including checking and decrementing theresources needed to provide that QoS. Unlike prior QoS workTime-to-Live (TTL) field inwired networks, atthe packet's IP header [24, 3]. In thispoint we cannot formally characterize or bound exactly what typeforwarding ofservicestheflow-state protocol willpacket, the next hop node (identified by Address[i]) MUST beable to offer. The goal is to provide CBR and TCP streams withtreated as a direct neighbor node; theabilitytransmission tospecify and obtainthat next node MUST be done in aminimum bandwidthsingle IP forwarding hop, without Route Discovery anddelay/jitter bound. Ifwithout searching theenvironment is particularly harsh, it is possible that only best-effort service will be offerable. It is this intuition that leads us toRoute Cache. - In forwarding thesystempacket, perform Route Maintenance for the next hop ofpromises and notifications. Experimentally, we hope to determine how stable and effective this system will bethe packet, by verifying that the packet was received by that next hop, as described in Section 6.3. Multicast addresses MUST NOT appear in amulti-hop ad hoc network environment. 10.4.1. Requesting Promises along Existing Paths Similar toSource Route option or in theuseIP Destination Address field ofthe path metrics header, at any timeapromise can be requested or changed along any path an originator is currently Broch,packet carrying a Source Route option in a DSR header. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page46]39] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 using. Once an originating2 March 2001 6.2. Route Discovery Processing Route Discovery is the mechanism by which a nodehas createdS wishing to send apath-identifier forpacket to aroute through the network, it can requestdestination node D obtains apromise of network resources along thatsource routeby first generatingto D. Route Discovery is used only when S attempts to send anew flow-identifierpacket toidentify the promise.D and does not already know a route to D. Theoriginator then fills outnode initiating aflow-request header (writtenRoute Discovery is known asFlow Request) and inserts it into any packet sent along that path. Figure 3 shows the conceptual layout of a Flow Request, which contains the new path-identifier assigned by the originator, the flow-identifier of the promise that this request supersedes (if any),therequested lifetime"initiator" of thepromise,Route Discovery, and theQoS parameters that describedestination node for which therequested promise itself. Section 10.6.3 providesRoute Discovery is initiated is known as thedetailed packet format. The use"target" of theminimum and requested fields for the QoS parameters differs dependingRoute Discovery. Route Discovery operates entirely onwhether the Flow Request is piggybackeddemand, with a node initiating Route Discovery based on its own origination of new packets for some destination address to which it does not currently know a route. RouteRequestDiscovery does not depend on any periodic ornot, as described below. Whenbackground exchange of routing information or neighbor node detection at any layer in the network protocol stack at any node. The Route Discovery procedure utilizes two types of messages, aFlowRoute Requestpiggybacked on a unicast packet is received by(Section 5.2) and anode,Route Reply (Section 5.3), to actively search thenode performs the following steps: - If the node isad hoc network for a route to thedestinationdesired destination. These DSR messages MAY be carried in any type oftheIP packet,it convertsthrough use of theFlow Request intoDSR header as described in Section 5. A Route Discovery for aMeasure with type return and usesdestination address SHOULD NOT be initiated unless thecurrent valuesinitiating node has a packet in its Send Buffer requiring delivery to that destination. A Route Discovery for a given target node MUST NOT be initiated unless permitted by thedesired fields ofrate-limiting information contained in theFlowRoute Requestto populateTable. After each Route Discovery attempt, thefieldsinterval between successive Route Discoveries for this target MUST be doubled, up to a maximum of MAX_REQUEST_PERIOD, until a valid Route Reply is received for this target. 6.2.1. Originating a Route Request A node initiating a Route Discovery for some target creates and initializes a Route Request option in a DSR header in some IP packet. This MAY be a separate IP packet, used only to carry this Route Request option, or theMeasure. It then piggybacksnode MAY include theMeasure onto anyRoute Request option in some existing packetbeing returnedit needs to send to theoriginator. - Else if the intermediatetarget nodehas available enough resources to meet(e.g., theminimum requested promise inIP packet originated by this node, that caused theFlow Request, it: * Sets asidenode to attempt Route Discovery for themaximumdestination address ofits available resources andthedesired resources.packet). Theset aside resources are heldRoute Request option MUST be included in atentative promise pool untilDSR header in thepromise is confirmed, or a relatively short timeout expires. * Nodes can recycle resources from listed old flow-id +--------------------------------------+ | flow-id | old flow-id | +--------------------------------------+ | lifetime | +--------------------------------------+ | capacity | min | desired | | latency | min | desired | |variation | min | desired | | loss | min | desired | +--------------------------------------+ Figure 3: Conceptual layout ofpacket. To initialize theFlowRoute Requestheader. Broch,option, the node performs the following sequence of steps: - The Option Type in the option MUST be set to the value 2. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page47]40] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 * Updates the desired fields of2 March 2001 - The Opt Data Len field in theFlow Requestoption MUST be set toreflecttheresources set aside (there is questionablevaluein a down stream node allocating more resources to a flow than an upstream node can currently handle). * Forward6. The total size of thepacket and piggybacked FlowRoute Requesttooption when initiated is 8 octets; thenext node onOpt Data Len field excludes thepath.size of the Option Type and Opt Data Len fields themselves. -Else,The Identification field in thenode does not have enough resourcesoption MUST be set tomeet the minimum requested promise, so it sends the originatora new value, different from that used for other RouteError piggybacked withRequests recently initiated by this node. For example, each node MAY maintain aMeasure reflecting the minimum of the current values of the desired fields in the Flowsingle counter value for generating a new Identification value for each Route Requestand the available resources.it initiates. - ThetypeTarget Address fieldisin the option MUST be set torefused. Such a Measure enablestheoriginator to learn three things:IP address thatits requested cannot be satisfied along the given path;is theidentitytarget of this Route Discovery. The Source Address in thebottleneck node; and the available resources up to and throughIP header of this packet MUST be thebottleneck node. Whennode's own IP address. The Destination Address in theoriginating node receives a MeasureIP header oftype return for a flow on whichthis packet MUST be the IP "limited broadcast" address (255.255.255.255). A node MUST maintain in its Route Request Table, information about Route Requests that ithas an outstanding Flowinitiates. When initiating a new Route Request,it acceptsthepromised level of service by changingnode MUST use thetype ofinformation recorded in theMeasure header to confirmRoute Request Table entry for the target of that Route Request, andpiggybackingit MUST update that information in theheader on any packet going alongtable entry for use in theflow. This informsnext Route Request initiated for this target. In particular: - The Route Request Table entry for a target node records theintermediate nodes to moveTime-to-Live (TTL) field used in theset aside resources fromIP header of thetentative promise pool tolast Route Request initiated by this node for that target node. This value allows theallocated pool, and enables upstream nodesnode tofree any set aside resources in excessimplement a variety of algorithms for controlling thecapacityspread of its Route Request on each Route Discovery initiated for abottleneck downstream node. Thetarget. As examples, two possible algorithms for this use of theold flow-id to recycle resources is importantTTL field are described in Section 3.3.4. - The Route Request Table entry fortwo reasons. First, it enables an originator to attempt to increase or decrease the amount ofacurrent promise without losing the resources it already has promised. Second, both packet loss andtarget node records theexpanding ring searchnumber of consecutive RouteDiscovery may result in several Flow Requests being sent for the same flow. If subsequent FlowRequests initiated for this target since receiving aflow were not ablevalid Route Reply giving a route tonotify intermediate nodesthatthey can reuse resources set aside while processing earlier Flow Requests,target node, and thenetwork could quickly reach a state where admissible flows are being needlessly rejected. 10.4.2. Requesting Promises as Partremaining amount ofRoute Discovery The scheme for requesting promises described in the previous section has the advantagetime before which this node MAY next attempt at a Route Discovery for thatit enablestarget node. These values MUST be used to implement anoriginatorexponential back-off algorithm torequest or update a promise for a flow along any route currently in its route cache, regardless of how it obtained the route. Forlimit thecommon case inrate at whichathis nodewishes to obtain a resource promise for ainitiates newflow to a previously unknown destination, we can integrateRoute Discoveries for theflow request withsame target address. Until a valid Route Reply is received for this target node address, the timeout between consecutive Route Discovery initiations for this target node SHOULD increase by doubling thedestination. Broch, Johnson,timeout value on each new initiation. The behavior of a node processing a packet containing DSR header with both a Source Route option andMaltza Route Request option is unspecified. Johnson, et al Expires22 April 20002 September 2001 [Page48]41] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 Integrating the flow request with2 March 2001 Packets SHOULD NOT contain both a Source RouteDiscovery enables us to avoid the inefficiency of discovering routes that will notoption and a Route Request option. Packets containing a Route Request option SHOULD NOT beusableretransmitted, SHOULD NOT request a DSR acknowledgment by including an Acknowledgement Request option, SHOULD NOT expect a passive acknowledgment, and SHOULD NOT be placed in theflow due to insufficient resources.Retransmission Buffer. Theintegrationrepeated transmission offlow requests withpackets containing a RouteDiscovery also allows us to avoidRequest option is controlled solely by the logic described in this section. 6.2.2. Processing acommon pitfall of QoS schemes that layerReceived Route Request Option When areservation signaling protocol on top ofnode receives aunicast routing algorithm --- schemes without tight integration will refuse admissible flows wheneverpacket containing a Route Request option, theunicast routing algorithm directsnode MUST process therequest packets into a congested areaoption according to the following sequence of steps: - If thenetwork, unlessTarget Address field in thesignaling protocol also providesRoute Request matches this node's own IP address, then the node SHOULD return amethodRoute Reply tobacktracktherequest and route aroundinitiator of this Route Request (the Source Address in thecongested area. UtilizingIP header of thesame mechanisms currently usedpacket), as described inRoute Discovery, we can avoid the needSection 6.2.4. The source route forbacktracking. We callthis reply is thecombinationsequence offlow requests withhops initiator, Address[1], Address[2], ..., Address[n], target where initiator is the address of the initiator of this RouteDiscovery QoS-guidedRequest, each Address[i] is an address from the Route Request, and target is the target of the RouteDiscovery, which originating nodes can invoke simply by piggybacking a FlowRequeston(the Target Address field in the RouteRequest. EachRequest). The nodereceivingMUST then continue processing theFlow Request usesrest of thesame algorithm describedpacket normally. The node inSection 10.4.1, with two exceptions: - Nodes silently discardthis case MUST NOT retransmit the Route Requestif they canto propagate it to other nodes. Do notmeet minimum requirements - Unlessprocess the Route Requestindicates that replying from cache is forbidden, nodes with a cachedoption further. - Else, the node MUST examine the routeto destination unicastrecorded in the Route Requestalongoption (the IP Source Address field and the sequence of Address[i] fields) to determine if this node's own IP address already appears in this list of addresses. If so, thecached route. Anoderequiring a route with a QoS promise usesMUST discard the entire packet carrying thefollowing algorithm. First, it sends aRoute Requestthat permits intermediate nodes to reply from cache. Ifoption. - Else, thenetwork is uncongested, this should frequently and quickly succeed in returning both a Route Reply and a Measure describing the available QoS along the discovered path. If after a timeout, the originatingnodehas not received a Route Reply, it begins anotherMUST search its RouteDiscovery, this time forbidding replies from cache, which will force an exploration of all feasible paths to the destination. This scheme does riskRequest Table for animplosion of unicast Requests atentry for thetargetinitiator ofthethis RouteDiscovery (e.g., if targetRequest (the IP Source Address field). If such an entry isa popular server to which many nodes have cached routes). At the cost of additional complexity and soft-state, it would be possible to add hold-downs atfound in thenodes surroundingtable, thetarget so that onlynode MUST search thefirst fewcache of Identification values of recently received Route Requestsare forwarded towards the target. 10.4.3. Providing Notifications of Changing Path Metrics When a node detectsin thatit must break a promise, it must notify the nodetable entry, towhich it made that promise. It isdetermine if anopen question howentry is present in thenow reduced resources should be distributed amongcache matching theflows. We Broch, Johnson,Identification value andMaltztarget node address in this Route Request. If such an (Identification, target address) entry is found in this cache in Johnson, et al Expires22 April 20002 September 2001 [Page49]42] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 currently pick2 March 2001 this entry in theminimum set of promises to break that leaveRoute Request Table, then theother promises unchanged. The difficulty in providing notification of a changed path metric is getting this information back tonode MUST discard thesource. When promise must be broken at aentire packet carrying the Route Request option. - Else, this nodeB, it sends a Measure toSHOULD further process theoriginator indicating what resources are now available. The use of Measure headersRoute Request according todeterminethecurrently available resources along a path is more problematic, however, asfollowing sequence of steps: * Add an entry forevery Measure sent by the originator, the destination must sendthis Route Request in its cache of (Identification, target address) values of recently received Route Requests. * Create aresponse containing the measured metrics. If the traffic is TCP, the overheadcopy of this entire packet and perform theresponses are low, as they can be piggybackedfollowing steps on theACK stream. For one-way CBR traffic though, introducing the overheadcopy ofa reverse streamthe packet. * Append this node's own IP address tocarrythechanging metrics could be severe. Iflist of Address[i] values in theoverheadRoute Request, and increase the value of theresponses becomesOpt Data Len field in the Route Request by 4 (the size of an IP address). * This node SHOULD search its own Route Cache for aproblem,route (from itself, as if itmay be possiblewere the source of a packet) toimplementthe target of this Route Request. If such aenhanced piggyback mechanism. The approachroute isbased onfound in its Route Cache, then this node SHOULD follow thefact that although no work has been exertedprocedure outlined in Section 6.2.3 tocreate hop-by-hop routing information at each node, chances are good that each node can determinereturn anext-hop for packets headed"cached Route Reply" toany known destination by simply examining its route cache. By piggybackingtheMeasure header for one hop onto any packet that is headed to that next-hop, we can cheaply create a reverse flowinitiator ofinformation that will eventually reachthis Route Request, if permitted by theoriginator ofrestrictions specified there. * If theMeasure. Eachnodewho receivesdoes not return aMeasurecached Route Reply, then this node SHOULD link-layer re-broadcast this copy of the packet, with atype of return simply piggybacksshort jitter delay before theMeasure for one-hop on packets that seem tobroadcast is sent. The jitter period SHOULD beflowingchosen as a random period, uniformly distributed between 0 and BROADCAST_JITTER. 6.2.3. Generating Route Replies using theright direction backRoute Cache As described in Section 3.3.2, it is possible for a node processing a received Route Request to avoid propagating thesource. To insureRoute Request further toward thetimelinesstarget of theinformation, each Measure being returnedRequest, if this node has in its Route Cache a route from itself toan originator could includethis target. Such adeadlineRoute Reply generated bywhich the information is supposed to reach the originator. If it appears that hop-by-hop propagation will result in missing the deadline, the Measure can be unicast asafirst-class packetnode from its own cached route to theoriginator. 10.5. Expirationtarget ofState from Intermediate Nodes Since therea Route Request isno guarantee that either the source or destination ofcalled apacket flow will be able to communicate with all"cached Route Reply", and this mechanism can greatly reduce the overall overhead of Route Discovery on thenodes that carriednetwork by reducing theflow when they wish to terminateflood of Route Requests. The general processing of a received Route Request is described in Section 6.2.2; this section specifies theflow, there mustadditional requirements that MUST betime-based expiration mechanism by which intermediate nodes can purge the path-statemet before a cached Route Reply may be generated andflow-state from their cachesreturned andreclaimspecifies theresources set asideprocedure for returning such a cached Route Reply. While processing a received Route Request, for a node tomaintain it. However, if intermediate nodes werepossibly return a cached Route Reply, it MUST have in its Route Cache a route Johnson, et al Expires 2 September 2001 [Page 43] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 from itself topurgethestatetarget ofan active flow, the intermediate nodes would find themselves with packets to forward that do not contain a source route, but only containthis Route Request. However, before generating aflow-identifiercached Route Reply for this Route Request, the node MUST verify thatreferences state theythere are nolonger hold. Since intermediate nodes do not necessarily knowduplicate addresses listed in the route accumulated in thetimingRoute Request together withwhichthesender originates packets, an inactivity timer alone would have toroute from this node's Route Cache. Specifically, there MUST beset very conservatively to prevent purgingno duplicates among thepath-state of low bit-rate connections. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 50] INTERNET-DRAFTfollowing addresses: - TheDynamicIP SourceRouting Protocol 22 October 1999 To solve the expiration problem, we take advantageAddress of therelatively ``soft'' nature ofpacket containing thepath-state and flow-state. WhenRoute Request, - The Address[i] fields in thestate is created,Route Request, and - The nodes listed in thesource node specifies a time after which it should be discarded (This time will typically be onroute obtained from this node's Route Cache, excluding theorderaddress ofa hundred seconds). The sourcethis nodecan thereby estimate how often it must refreshitself (this node itself is the common point between thestate, for example, by sending packets that contain a full sourcerouteon them. Shouldaccumulated in thestate have somehow expired at an intermediate node when a packet labeled with a flow or path identifier arrives,Route Request and the route obtained from the Route Cache). If any duplicates exist among these addresses, then theintermediatenodecan returnMUST NOT send a cached RouteErrorReply. The node SHOULD continue to process thesource node specifying ``missing state information''Route Request as described in Section 6.2.2. If thecause of the ErrorRoute Request andelicitthesender to refresh the missing state. Since all path-state information is guaranteed to have expiredroute from thenetwork after a bounded amount of time, nodes can safely and unambiguously reuse path- and flow-identifiers after that period. 10.6. Packet Formats 10.6.1. Identifier Option Path and flow identifiers are carried as an option insideRoute Cache meet the restriction above, then theHop-by-Hop options header. This option MAY NOT appear more than once in a single Hop-by-Hop Options header. 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | Path-ID | Flow-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type ???. Anodethat does not understandSHOULD construct and return a cached Route Reply as follows: - The source route for thisoption should ignorereply is the sequence of hops initiator, Address[1], Address[2], ..., Address[n], c-route where initiator is the address of the initiator of thisoption and continue processingRoute Request, each Address[i] is an address from thepacket,Route Request, and c-route is theOption Data does not change en-route (the top three bits are 000). Option Length 8-bit unsigned integer. Lengthsequence ofthe option,hops inoctets, excludingtheOption Type and Option Length fields. Path-ID The identifier assignedsource route to thispath bytarget node, obtained from thenode listed asnode's Route Cache. In appending this cached route to theIP Source Address (Section 10.2). Broch, Johnson, and Maltz Expires 22 April 2000 [Page 51] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 Flow-ID The identifier assigned bysource route for the reply, the address of this node itself MUST be excluded, since it is already listed asthe IP Source Address toAddress[n]. - Send aparticular flow alongRoute Reply to thepath identified byinitiator of thePath-ID. If this portion is 0,Route Request, using theoption names a path, but not a particular flow. Discussion: This encodingprocedure defined in Section 6.2.4. The initiator of thepath and flow identifiers will cost 8 bytes of additional header overheadRoute Request is indicated ina data packet with no other extensions or options (4 bytes fortheHop-by-Hop options header, and 4 bytes forSource Address field in theidentifier option).packet's IP header. 6.2.4. Originating a Route Reply Amore compact encoding would be to define that, innode originates aDSR network, an IP destination address withRoute Reply in order to reply to afirst octet of 127 actually encodesreceived and processed Route Request, according to thepathprocedures described in Sections 6.2.2 andflow identifiers as follows: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 1 1 1 1 1 1| reserved | Path-ID | Flow-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+6.2.3. TheDSR module of the final destination would replace the IP destination address with its actual value before passing the packet upRoute Reply is returned in a Route Reply option (Section 5.3). The Route Reply option MAY be returned to thestack for further processing. This encoding hasinitiator of theadvantage that it requires no additional overheadRoute Request in adata packet.separate IP packet, used Johnson, et al Expires 2 September 2001 [Page 44] INTERNET-DRAFT Thedisadvantage is that if theDynamic Source Routing Protocol 2 March 2001 only to carry this Route Reply option, or it MAY be included in any other IP packetwas somehow received by a DSR-unaware node without firstbeingprocessed bysent to this address. The Route Reply option MUST be included in a DSRgateway node [4], the DSR-unaware node will either dropheader in the packetor will attemptreturned toreceive it locally (sincetheIP destination address belongs toinitiator. To initialize theloopback subnet). 10.6.2. Path-Metrics Option Path-metrics are carried as an option insideRoute Reply option, theHop-by-Hop options header. 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | Path-ID | Flow-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Metrics... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Broch, Johnson, and Maltz Expires 22 April 2000 [Page 52] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 Option Type ???. Anodethat does not understand this option should ignore this option and continue processing the packet, andperforms theOption Data does change en-route (the top three bits are 001). Option Length 8-bit unsigned integer. Lengthfollowing sequence ofthe option, in octets, excluding the Option Type and Option Length fields. Path-ID and Flow-IDsteps: - Thepath identifier of the path that the metrics correspond to. If the Path-MetricsOption Typeequals Measure, then the Path-ID and Flow-ID fields MUST equal those in any Identifier Option carriedin theHop-by-Hop Options Header. Type One of Measure Each node processing theoptionshould update the metricsMUST be set toreflecttheconditions at that node. Replyvalue 3. - ThemetricsOpt Data Len field inthis option SHOULD NOT be modified by any intermediate node. They represent the metrics measured alongtheidentified path. Confirm The metrics in thisoption MUSTNOTbemodified by any intermediate node. They represent a confirmation by the sender that will transmit traffic conformingset to thelisted Qualityvalue (n * 4) + 3, where n is the number ofService metrics alongaddresses in theidentified flow. Metricssource route being returned (excluding the Route Discovery initiator node's address). - Theindividual path-metrics, encoded as describedLast Hop External (L) bit inSection 10.6.4. Unknown metrics SHOULD be ignored. If a single value is provide forthemetric, itoption MUST beinterpreted as the metrics value. If two values are provided forinitialized to 0. - The Reserved field in themetric, theyoption MUST beinterpreted asinitialized to 0. - The Route Request Identifier MUST be initialized to therangeIdentifier field ofvalues taken bythemetric (low value first). ItRoute Request that this reply isundefined for there to be more than two values for the metric. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 53] INTERNET-DRAFTsent in response to. - TheDynamic Source Routing Protocol 22 October 1999 10.6.3. Flow Request Option Flow-requestssequence of addresses of the source route arecarried as an option insidecopied into theHop-by-Hop options header. They allow a sender to request that intermediate nodes reserve sufficient resources for a flowAddress[i] fields of the option. Address[1] MUST be set toprovide that flow withtheQoS characteristics described byfirst hop of themetrics. 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | old | old | new | new | | Path-ID | Flow-ID | Path-ID | Flow-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Metrics ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type ???. A node that does not understand this option should ignore this option and continue processingroute after thepacket, andinitiator of theOption Data does change en-routeRoute Discovery, Address[n] MUST be set to the last hop of the source route (thetop three bits are 001). Option Length 8-bit unsigned integer. Lengthaddress of theoption,target node), and each other Address[i] MUST be set to the next address in sequence inoctets, excludingtheOption Type and Option Length fields. old Path-ID and old Flow-IDsource route being returned. Theflow identifier provideDestination Address field in the IP header of the packet carrying the Route Reply option MUST be set to the address of the initiator of the Route Discovery (i.e., for aprevious request whichRoute Reply being returned in response to some Route Request, the IP Source Address of the Route Request). After creating and initializing the Route Reply option and the IP packet containing it, send the Route Reply. In sending the Route Reply from thisrequest supersedes. new Path-IDnode (but not from nodes forwarding the Route Reply), this node SHOULD delay the rely by a small jitter period chosen randomly between 0 andnew Flow-ID The flow identifierBROADCAST_JITTER milliseconds. If the MAC layer above which DSR is operating requires bidirectionality for unidirectional transmissions, the Route Reply MUST be sent by reversing the sequence of hops thatwillare stored in it. If sending a Route Reply to the originator of the Route Request requires performing a Route Discovery, the Route Reply Option MUST Johnson, et al Expires 2 September 2001 [Page 45] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 beused withpiggybacked on the packet that contains the Route Request. This piggybacking prevents a loop wherein the target of the new Route Request (which was itself the originator of the original Route Request) must do another Route Request in order to return its Route Reply. If sending the Route Reply to the originator of the Route Request does not require performing Route Discovery, a node SHOULD send a unicast Route Reply in response to every received Route Request targeted at it. 6.2.5. Processing a Route Reply Option Upon receiving a Route Reply, a node SHOULD extract the source route from the Route Reply and add this routing information to its Route Cache. The source route from the Route Reply is the sequence of hops initiator, Address[1], Address[2], ..., Address[n] where initiator is the value of the Destination Address field in the IP header of the packet carrying the Route Reply (the address of the initiator of the Route Discovery), and each Address[i] is a node through which the source route passes, in turn, on the route to the target of the Route Discovery. Address[n] is the address of the target. If the Last Hop External (L) bit is set in the Route Reply, the node MUST flag the hop Address[n] in its Route Cache as External. Each packet in the Send Buffer SHOULD then be checked to see whether the information in the Route Reply and now in the Route Cache allows it to be sent immediately. Johnson, et al Expires 2 September 2001 [Page 46] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 6.3. Route Maintenance Processing Route Maintenance is the mechanism by which node S is able to detect, while using a source route to D, if the network topology has changed such that it can no longer use its route to D because a link along the route no longer works. When Route Maintenance indicates a source route is broken, S can attempt to use any other route it happens to know to D, or can invoke Route Discovery again to find a new route for subsequent packets to D. Route Maintenance for this route is used only when S is actually sending packets to D. When forwarding a packet, a node MUST attempt to receive an acknowledgement for the packet from the next hop. If no acknowledgement is received, the node SHOULD return a Route Error to the IP Source Address of the packet, as described in Section 6.3.3. A node's algorithm for deciding whether or not to return a Route Error MUST NOT allow any node to attempt to send an unbounded number of packets along a broken link without receiving a Route Error. 6.3.1. Using Network-Layer Acknowledgments When a node retransmits a packet or has no other way to ensure successful delivery of a packet to the next hop, it MUST request a network-layer acknowledgement by placing inserting an Acknowledgement Request the DSR header. The Identification value contained in that header MUST be unique over all packets delivered to the same next hop which are either unacknowledged or recently acknowledged. A node receiving an Acknowledgement Request MUST send an acknowledgement to the previous hop by performing the following sequence of steps: - Create a packet and set the IP Source Address to the address of this node, the IP Destination Address to the address of the previous hop, and the IP Protocol field to the protocol number reserved for DSR headers. - Set the DSR header's Next Header field to be the "No Next Header" value. - Set the Acknowledgement option's Option Type field to 6, and the Opt Data Len field to 10. - Copy the Identification field from the Acknowledgement Request option into the Identification field in the Acknowledgement option. Set the ACK Source Address field in the option to be the IP Source Address and the ACK Destination Address field to the IP Destination Address. Johnson, et al Expires 2 September 2001 [Page 47] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 - Send the packet as described in Section 6.1.1. 6.3.2. Using Link Layer Acknowledgments If explicit failure notifications are provided by the link layer, then all packets are assumed to be correctly received by the next hop, and a Route Error is sent only when an explicit failure notification is made from the link layer. Nodes receiving a packet without an Acknowledgement Request Option do not need to send an explicit Acknowledgment to the packet's originator, since the link layer will notify the originator if the packet was not received properly. 6.3.3. Originating a Route Error When a node is unable to verify successful delivery of a packet to the next hop after a maximum number of retransmission attempts, a node SHOULD send a Route Error to the IP Source Address of the packet. In addition, a node's algorithm for deciding whether or not to return a Route Error MUST NOT allow any node to attempt to send an unbounded number of packets along a broken link without receiving a Route Error. When sending a Route Error for a packet containing either a Route Error option or an Acknowledgement option, a node SHOULD add these options to its Route Error, subject to some limit on lifetime. Specifically, we define the "salvage count" of an option toidentifybe thepackets that should receivesum of one plus theQoS described bysalvage count recorded in theincluded metrics. Metrics The metrics that characterizeSource Route option plus thedesired QoS, encoded as described in Section 10.6.4. Unknown metrics SHOULD be ignored. If a rangesum ofvalues are provided forthe salvage counts of any Route Errors preceding that option. A node transmitting ametric, theyRoute Error MUSTbe interpreted asfollow theminimum acceptable valuefollowing steps: - Create a packet and set thedesired value. Broch, Johnson, and Maltz Expires 22 April 2000 [Page 54] INTERNET-DRAFT The DynamicIP SourceRouting Protocol 22 October 1999 10.6.4. Encoding Path-Metrics Each path-metric is encoded in a modified Type-Length-Value form as 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type |R| Length | Data... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type The typeAddress to the address ofmetric R bit If 0,this node, thedata is a listIP Destination Address to the address IP Source Address ofdiscrete valuesthemetric can or did take. If 1,packet experiencing thedata representerror. - Insert arange of valuesDSR header into themetric can or did take. Ifpacket. - Add asingle metric value is supplied,Route Error Option, setting therange is assumedError Type tobe 0 <= metric <= value. If two metric values are supplied,NODE_UNREACHABLE, therange is assumedReserved bits tobe value1 <= metric <= value2. Option Length 8-bit unsigned integer. Length of0, themetric, in octets, excludingSalvage value to one plus theTypeSalvage value from the DSR Source Route option, andLength fields. The currently defined metric types follow: Padding Type: 0the Unreachable Node Address to the address of the next hop. Set the Error Source Address to the IP Source Address and the Error Destination to the IP Destination Address. - Thepadding metric is special in that it contains no length fieldnode MAY append each Route Error andno data. Available Capacity Type: 1 Broch,Acknowledgement option, in order, from the packet experiencing the error, Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page55]48] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 Data encoded as 0 1 0 1 2 3 4 5 6 7 8 9 0 123 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Mantissa | Shift | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ whereMarch 2001 though it MUST exclude options with salvage counts greater than MAX_SALVAGE_TIMES. - Send thevalue is (Mantissa << Shift) bits per second. Delay and Delay Variation Data encodedpacket as0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Delay | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type: 2 - Delay The value is Delay milliseconds. Type: 3described in Section 6.1.1. 6.3.4. Processing a Route Error Option A node receiving a Route Error MUST process it as follows: -Delay Variation The value isDelete all routes from thestandard deviation of Delay, in milliseconds. Link Bidirectionality Type: 16Route Cache that have a link from the Route Error Source Address to the Unreachable Node Address. -Link Bidirectionality Data encoded as 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | # Uni-links | #Explicit ACK | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ where # Uni-linksIf the option following the Route Error is an Acknowledgement or Route Error option sent by this node (that is, with Acknowledgement or Error Source Address equal to this node's address), copy the DSR options following the current Route Error into a new packet with IP Source Address equal to this node's own IP address and IP Destination Address equal to the Acknowledgement or Error Destination Address. Transmit this packet as described in Section 6.1.1, with thenumbersalvage count in the Source Route option set to the Salvage value ofuni-directional links onthepath, and # Explicit ACKRoute Error. 6.3.5. Salvaging a Packet When a node is unable to verify successful delivery of a packet to the next hop after a maximum number ofhops which require explicit acknowledgments. Broch, Johnson,retransmission attempts andMaltz Expires 22 April 2000 [Page 56] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 Packet Loss Rate Data encoded as 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | # Packets Lost | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ wherehas transmitted a Route Error to theloss rate is (# Packets Lost / 2 ** 16). Type: 17 - Path Packet Loss Rate The value issender, it MAY attempt to salvage theexpectedpacketloss rateby examining its route cache. If the node can find a route to the packet's IP Destination Address in its own Route Cache, then this node replaces the packet's Source Route option with a new Source Route option in the same way as described in Section 6.1.3, except that Address[1] MUST be set to the address of this node and theentire path Type: 18 - Worst Loss Rate The value isSalvage field MUST be set to 1 plus theexpected packet loss ratevalue of thesingle worst linkSalvage field in thepath. Broch,Source Route option that caused the error. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page57]49] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 11.2 March 2001 7. Constants BROADCAST_JITTER 10 milliseconds MAX_ROUTE_LEN 15 nodesInterface Indexes IF_INDEX_INVALID 0x7F IF_INDEX_MA 0x7E IF_INDEX_ROUTER 0x7DMAX_SALVAGE_TIMES 15 salvages Route Cache ROUTE_CACHE_TIMEOUT 300 seconds Send Buffer SEND_BUFFER_TIMEOUT 30 seconds Route Request TableMAX_REQUEST_ENTRIES 32REQUEST_TABLE_SIZE 64 nodesMAX_REQUEST_IDS 8REQUEST_TABLE_IDS 16 identifiers MAX_REQUEST_REXMT 16 retransmissions MAX_REQUEST_PERIOD 10 seconds REQUEST_PERIOD 500 millisecondsRING0_REQUEST_TIMEOUTNONPROP_REQUEST_TIMEOUT 30 milliseconds Retransmission Buffer DSR_RXMT_BUFFER_SIZE 50 packets Retransmission Timer DSR_MAXRXTSHIFT 2Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page58]50] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 12. IANA Considerations This document proposes the use of the Destination Options header and the Hop-by-Hop Options header, originally defined for IPv6, in IPv4. The Next Header values indicating these two extension headers thus must be reserved within the IPv4 Protocol number space. Furthermore, this2 March 2001 8. IANA Considerations This documentdefines four new types of destination options, eachproposes the use ofwhich must be assigned an Option Type value: - The DSR Route Request option, described in Section 7.1.1 - The DSR Route Reply option, described in Section 7.2.1 - The DSR Route Error option, described in Section 7.2.2 - The DSR Acknowledgment option, described in Section 7.2.3a DSRalsoheader, which requiresa routing header Routing Type be allocated foran IP Protocol number. In addition, this document proposes use of theDSR Source Routevalue "No Next Header" (originally defined for use inSection 7.3. In IPv4, we require two new protocol numbers be issuedIPv6) within an IPv4 packet, toidentify the nextindicate that no further headeras either an IPv6-style destination option, or an IPv6-style routingfollows a DSR header.Other protocols can make use of these protocol numbers as nodes that support them will processes any included destination options or routing headers according to the normal IPv6 semantics. Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page59]51] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 13.2 March 2001 9. Security Considerations This document does not specifically address security concerns. This document does assume that all nodes participating in the DSR protocol do so in good faith andwith outwithout malicious intent to corrupt the routing ability of the network. In mission-oriented environments where all the nodes participating in the DSR protocol share a common goal that motivates their participation in the protocol, the communications between the nodes can be encrypted at the physical channel or link layer to prevent attack by outsiders.Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page60]52] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 19992 March 2001 Appendix A. Location of DSRFunctionsin the ISO Network Reference Model When designing DSR, we had to determine at whatlevellayer within the protocol hierarchy to implementsourcead hoc network routing. We considered two different options: routing at the link layer (ISO layer 2) and routing at the network layer (ISO layer 3). Originally, we opted to route at the link layer forthe followingseveral reasons: - Pragmatically, running the DSR protocol at the link layer maximizes the number of mobile nodes that can participate in ad hoc networks. For example, the protocol can route equally well between IPv4[17],[24], IPv6[6],[7], and IPX[7][27] nodes. -Historically,Historically [12, 13], DSR grew from our contemplation of a multi-hopARP protocol [8, 9] andpropagating version of the Internet's Address Resolution Protocol (ARP) [22], as well as from the routing mechanism used in IEEE 802 source routing bridges[15]. ARP [16] is a[21]. These are layer 2protocol.protocols. - Technically, we designed DSR to be simple enough thatthatit could be implemented directly in the firmware inside wireless network interfacecards,cards [12, 13], well below the layer 3 software within a mobile node. We see great potential in this for DSR runningbetween cloudsinside a cloud of mobile nodes around a fixed basestations.station, where DSR would act to transparentlyfill inextend the coveragegaps between base stations.range to these nodes. Mobile nodes that would otherwise be unable to communicate with the base station due to factors such as distance, fading, or local interference sources could then reach the base station through their peers. Ultimately, however, we decided to specify and to implement [19] DSR as a layer 3protocolprotocol, since this is the only layer at which we could realistically support nodes with multiple network interfaces of differenttypes. Broch,types forming an ad hoc network. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page61]53] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 19992 March 2001 Appendix B. Implementation and Evaluation StatusWe haveThe DSR protocol has been implementedDynamic Source Routing (DSR)under the FreeBSD 2.2.7 operating system running on Intel x86 platforms. FreeBSD is based on a variety of free software, including 4.4 BSD Lite from the University of California, Berkeley. For the environments in which we used it, this implementation is functionally equivalent to the protocol specified in this draft. During the 7 months from August 1998 to February 1999, we designed and implemented a full-scale physical testbed to enable the evaluation of ad hoc network performance in thefield.field, in a actively mobile ad hoc network under realistic communication workloads. The last week of February and the first week of March included demonstrations of this testbed to a number of our sponsors and partners, including Lucent Technologies, Bell Atlantic, and DARPA. A complete description of the testbed is available as a Technical Report[12].[19]. The softwareis currently beingwas ported to FreeBSD3.3. Implementors notes: - Added field to Route Error Broch, Johnson,3.3, andMaltza preliminary version of Quality of Service (QoS) support was added. A demonstration of this modified version of DSR was presented in July 2000. Those QoS features are not included in this draft, and will be added later in a separate draft on top of the base protocol specified here. The DSR protocol has been extensively studied using simulation; we have implemented DSR in the ns-2 simulator [5, 18] and conducted evaluations of different caching strategies documented in this draft [9]. Several independent groups have also used DSR as a platform for their own research, or and as a basis of comparison between ad hoc network routing protocols. Johnson, et al Expires22 April 20002 September 2001 [Page62]54] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 1999 Acknowledgments2 March 2001 Acknowledgements The protocol described in this draft has been designed and developed within theCMUMonarch Project, a research project at Rice University and Carnegie Mellon University which is developing adaptive networking protocols and protocol interfaces to allow truly seamless wireless and mobile node networking[10, 19].[14, 6]. Thecurrent membersauthors would like to acknowledge the substantial contributions of Josh Broch in helping to design, simulate, and implement theCMU Monarch Project include: -DSR protocol. Josh is currently on leave of absence from Carnegie Mellon University at AON Networks. We thank him for his contributions to earlier versions of this draft. We would also like to acknowledge the assistance of Robert V. Barron- Josh Broch - Yih-Chun Hu - Jorjeta Jetcheva - David B. Johnson - Qifa Ke - David A. Maltz Broch,at Carnegie Mellon University. Bob ported our DSR implementation from FreeBSD 2.2.7 into FreeBSD 3.3. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page63]55] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 19992 March 2001 References [1]M. Allman, V. Paxson,David F. Bantz andW. Stevens. Tcp congestion control. Internet Request For Comments RFC 2581, April 1999.Frederic J. Bauchot. Wireless LAN design alternatives. IEEE Network, 8(2):43--53, March/April 1994. [2]R.Vaduvur Bharghavan, Alan Demers, Scott Shenker, and Lixia Zhang. MACAW: A media access protocol for wireless LAN's. In Proceedings of the ACM SIGCOMM '94 Conference, pages 212--225, August 1994. [3] Robert T. Braden, editor. Requirements for InternetHosts -- Communication Layers.hosts---communication layers. RFC 1122, October 1989.[3][4] Scott Bradner. Key words for use in RFCs toIndicate Requirement Levels.indicate requirement levels. RFC 2119, March 1997.[4][5] Josh Broch, David A. Maltz,andDavid B.Johnson. Supporting HierarchyJohnson, Yih-Chun Hu, andHeterogeneous Interfaces in Multi-Hop Wireless Ad Hoc Networks.Jorjeta Jetcheva. A performance comparison of multi-hop wireless ad hoc network routing protocols. In Proceedings of theWorkshopFourth Annual ACM/IEEE International Conference on Mobile Computingheld in conjunction with the International Symposium on Parallel Architectures, Algorithms,andNetworks,Networking, pages370--375, Perth, Australia, June 1999. [5] M. Scott Corson and Joe Macker. Mobile Ad hoc Networking (MANET): Routing Protocol Performance Issues and Evaluation Considerations howpublished = RFC 2501, month = jan, year = 1999.85--97, October 1998. [6] Carnegie Mellon University Monarch Project. CMU Monarch Project Home Page. Available at http://www.monarch.cs.cmu.edu/. [7] Stephen E. Deering and Robert M. Hinden. InternetProtocol,Protocol version 6 (IPv6)Specification.specification. RFC 2460, December 1998.[7] IPX Router Specification. Novell Part Number 107-000029-001, Document Version 1.30, March 1996.[8] Ralph Droms. Dynamic Host Configuration Protocol. RFC 2131, March 1997. [9] Yih-Chun Hu and David B. Johnson.RoutingCaching strategies inAd Hoc Networkson-demand routing protocols for wireless ad hoc networks. In Proceedings of the Sixth Annual ACM International Conference on Mobile Computing and Networking, August 2000. [10] IEEE Computer Society LAN MAN Standards Committee. Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, IEEE Std 802.11-1997. The Institute of Electrical and Electronics Engineers, New York, New York, 1997. [11] Per Johansson, Tony Larsson, Nicklas Hedman, Bartosz Mielczarek, and Mikael Degermark. Scenario-based performance analysis of routing protocols for mobile ad-hoc networks. In Proceedings of the Fifth Annual ACM/IEEE International Conference on MobileHosts.Computing and Networking, pages 195--206, August 1999. [12] David B. Johnson. Routing in ad hoc networks of mobile hosts. In Proceedings of the IEEE Workshop on Mobile Computing Systems and Applications, pages 158--163, December 1994.[9]Johnson, et al Expires 2 September 2001 [Page 56] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 [13] David B. Johnson and David A. Maltz. Dynamic Source Routing inAd Hoc Wireless Networks.ad hoc wireless networks. In Mobile Computing, edited by Tomasz Imielinski and Hank Korth, chapter 5, pages 153--181. Kluwer Academic Publishers, 1996.[10][14] David B. Johnson and David A. Maltz. Protocols forAdaptive Wirelessadaptive wireless andMobile Networking.mobile networking. IEEE Personal Communications, 3(1):34--42, February 1996.[11] Jian Liu[15] John Jubin and Janet D. Tornow. The DARPA Packet Radio Network Protocols. Proceedings of the IEEE, 75(1):21--32, January 1987. [16] Phil Karn. MACA---A new channel access method for packet radio. In ARRL/CRRL Amateur Radio 9th Computer Networking Conference, pages 134--140, September 1990. [17] Gregory S. Lauer. Packet-radio routing. In Routing in Communications Networks, edited by Martha E. Steenstrup, chapter 11, pages 351--396. Prentice-Hall, Englewood Cliffs, New Jersey, 1995. [18] David A. Maltz, Josh Broch, Jorjeta Jetcheva, andSuresh Singh. Atcp: TcpDavid B. Johnson. The effects of on-demand behavior in routing protocols formobilemulti-hop wireless ad hoc networks.Available from web page??? Personal Communication, JuneIEEE Journal on Selected Areas of Communications, 17(8):1439--1453, August 1999.[12][19] David A. Maltz, Josh Broch, and David B. Johnson. ExperiencesDesigningdesigning andBuildingbuilding aMulti-Hop Wireless Ad Hoc Network Testbed.multi-hop wireless ad hoc network testbed. Technical Report99-116,CMU-CS-99-116, School of Computer Science, Carnegie Mellon University, Pittsburgh, Pennsylvania, March 1999. [20] David A. Maltz, Josh Broch,Johnson,andMaltz Expires 22 April 2000 [Page 64] INTERNET-DRAFT The Dynamic Source Routing Protocol 22 October 1999 [13] Brian D. Noble, M. Satyanarayanan, Dushyanth Narayanan, Eric J. Tilton, Jason Flinn, and Kevin R. Walker. Agile Application-Aware Adaptation for Mobility. In Proceedings of the 16th ACM Symposium on Operating System Principles, pages 276--287, St. Malo, France, October 1997. [14] Charles Perkins, editor. IP Mobility Support. RFC 2002, October 1996. [15]David B. Johnson. Lessons from a full-scale multihop wireless ad hoc network testbed. IEEE Personal Communications, 8(1):8--15, February 2001. [21] Radia Perlman. Interconnections: Bridges and Routers. Addison-Wesley, Reading, Massachusetts, 1992.[16][22] David C. Plummer. An Ethernet address resolution protocol: Or converting network protocol addresses to 48.bit Ethernet addresses for transmission on Ethernet hardware. RFC 826, November 1982.[17][23] J.Postel.B. Postel, editor. Internet Control Message Protocol. RFC 792, September 1981. [24] J. B. Postel, editor. Internet Protocol. RFC 791, September 1981.[18]Johnson, et al Expires 2 September 2001 [Page 57] INTERNET-DRAFT The Dynamic Source Routing Protocol 2 March 2001 [25] J.Postel.B. Postel, editor. Transmission Control Protocol. RFC 793, September 1981.[19] The CMU Monarch Project. http://www.monarch.cs.cmu.edu/. Computer Science Department, Carnegie Mellon University. [20] J.[26] Joyce K. Reynolds andJ.Jon Postel. AssignedNumbers.numbers. RFC 1700, October 1994.[21] Srinivasan Seshan, Mark Stemm, and Randy H. Katz. Spand: Shared passive network performance discovery. In Proceedings of the USENIX Symposium on Internet Technologies and Systems,See also http://www.iana.org/numbers.html. [27] Paul Turner. NetWare communications processes. NetWare Application Notes, Novell Research, pages135--146, dec 1997. [22] W. Richard Stevens. TCP/IP IIlustrated, The Protocols, volume 1. Addison-Welsley, 1994. [23] Andrew S. Tannenbaum. Computer Networks. Prentice Hall, third edition, 1996. [24] Gary R. Wright and W. Richard Stevens. TCP/IP IIlustrated, The Implementation, volume 2. Addison-Welsley, 1995. Broch,25--91, September 1990. Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page65]58] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 19992 March 2001 Chair's Address The MANET Working Group can be contacted via its current chairs: M. Scott Corson Phone: +1 301 405-6630 Institute for Systems Research Email: corson@isr.umd.edu University of Maryland College Park, MD 20742 USAPhone: +1 301 405-6630 Email: corson@isr.umd.eduJoseph Macker Phone: +1 202 767-2001 Information Technology Division Email: macker@itd.nrl.navy.mil Naval Research Laboratory Washington, DC 20375 USAPhone: +1 202 767-2001 Email: macker@itd.nrl.navy.mil Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page66]59] INTERNET-DRAFT The Dynamic Source Routing Protocol22 October 19992 March 2001 Authors' Addresses Questions about this document can also be directed to the authors:Josh Broch Carnegie MellonDavid B. Johnson Phone: +1 713 348-3063 Rice UniversityElectrical andFax: +1 713 348-5930 ComputerEngineering 5000 Forbes Avenue Pittsburgh, PA 15213-3890Science Department, MS 132 Email: dbj@cs.rice.edu 6100 Main Street Houston, TX 77005-1892 USA David A. Maltz Phone: +1412 268-3056650 688-3128 AON Networks Fax: +1412 268-7196650 688-3119 3045 Park Blvd. Email:broch@cs.cmu.edu David B. Johnson Carnegie Mellon University Computer Science Department 5000 Forbes Avenue Pittsburgh, PA 15213-3891dmaltz@cs.cmu.edu Palo Alto, CA 94306 USA Yih-Chun Hu Phone: +1 412268-7399268-3075 Rice University Fax: +1 412 268-5576 Computer Science Department, MS 132 Email:dbj@cs.cmu.edu David A. Maltzyihchun@cs.cmu.edu 6100 Main Street Houston, TX 77005-1892 USA Jorjeta G. Jetcheva Phone: +1 412 268-3053 Carnegie Mellon University Fax: +1 412 268-5576 Computer Science Department Email: jorjeta@cs.cmu.edu 5000 Forbes Avenue Pittsburgh, PA 15213-3891 USAPhone: +1 412 268-3621 Fax: +1 412 268-5576 Email: dmaltz@cs.cmu.edu Broch,Johnson,and Maltzet al Expires22 April 20002 September 2001 [Page67]60] ----