draft-ietf-manet-dsr-07.txt   draft-ietf-manet-dsr-08.txt 
IETF MANET Working Group David B. Johnson, Rice University IETF MANET Working Group David B. Johnson, Rice University
INTERNET-DRAFT David A. Maltz, AON Networks INTERNET-DRAFT David A. Maltz, Carnegie Mellon University
21 February 2002 Yih-Chun Hu, Rice University 24 February 2003 Yih-Chun Hu, Rice University
Jorjeta G. Jetcheva, Carnegie Mellon University
The Dynamic Source Routing Protocol The Dynamic Source Routing Protocol
for Mobile Ad Hoc Networks (DSR) for Mobile Ad Hoc Networks (DSR)
<draft-ietf-manet-dsr-07.txt> <draft-ietf-manet-dsr-08.txt>
Status of This Memo Status of This Memo
This document is an Internet-Draft and is subject to all provisions This document is an Internet-Draft and is subject to all provisions
of Section 10 of RFC 2026. of Section 10 of RFC 2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note Task Force (IETF), its areas, and its working groups. Note
that other groups may also distribute working documents as that other groups may also distribute working documents as
Internet-Drafts. Internet-Drafts.
skipping to change at page 1, line 48 skipping to change at page 1, line 47
Abstract Abstract
The Dynamic Source Routing protocol (DSR) is a simple and efficient The Dynamic Source Routing protocol (DSR) is a simple and efficient
routing protocol designed specifically for use in multi-hop wireless routing protocol designed specifically for use in multi-hop wireless
ad hoc networks of mobile nodes. DSR allows the network to be ad hoc networks of mobile nodes. DSR allows the network to be
completely self-organizing and self-configuring, without the need completely self-organizing and self-configuring, without the need
for any existing network infrastructure or administration. The for any existing network infrastructure or administration. The
protocol is composed of the two main mechanisms of "Route Discovery" protocol is composed of the two main mechanisms of "Route Discovery"
and "Route Maintenance", which work together to allow nodes to and "Route Maintenance", which work together to allow nodes to
discover and maintain source routes to arbitrary destinations in the discover and maintain routes to arbitrary destinations in the ad hoc
ad hoc network. The use of source routing allows packet routing network. All aspects of the protocol operate entirely on-demand,
to be trivially loop-free, avoids the need for up-to-date routing allowing the routing packet overhead of DSR to scale automatically
information in the intermediate nodes through which packets are to only that needed to react to changes in the routes currently in
forwarded, and allows nodes forwarding or overhearing packets to use. The protocol allows multiple routes to any destination and
cache the routing information in them for their own future use. All allows each sender to select and control the routes used in routing
aspects of the protocol operate entirely on-demand, allowing the its packets, for example for use in load balancing or for increased
routing packet overhead of DSR to scale automatically to only that robustness. Other advantages of the DSR protocol include easily
needed to react to changes in the routes currently in use. This guaranteed loop-free routing, support for use in networks containing
document specifies the operation of the DSR protocol for routing unidirectional links, use of only "soft state" in routing, and very
unicast IPv4 packets in multi-hop wireless ad hoc networks. rapid recovery when routes in the network change. The DSR protocol
is designed mainly for mobile ad hoc networks of up to about two
The DSR protocol is designed for mobile ad hoc networks with up to hundred nodes, and is designed to work well with even very high
around two hundred nodes, and is designed to cope with relatively rates of mobility. This document specifies the operation of the DSR
high rates of mobility. protocol for routing unicast IPv4 packets.
Contents Contents
Status of This Memo i Status of This Memo i
Abstract ii Abstract ii
1. Introduction 1 1. Introduction 1
2. Assumptions 3 2. Assumptions 3
3. DSR Protocol Overview 5 3. DSR Protocol Overview 5
3.1. Basic DSR Route Discovery . . . . . . . . . . . . . . . . 5 3.1. Basic DSR Route Discovery . . . . . . . . . . . . . . . . 5
3.2. Basic DSR Route Maintenance . . . . . . . . . . . . . . . 7 3.2. Basic DSR Route Maintenance . . . . . . . . . . . . . . . 8
3.3. Additional Route Discovery Features . . . . . . . . . . . 9 3.3. Additional Route Discovery Features . . . . . . . . . . . 10
3.3.1. Caching Overheard Routing Information . . . . . . 9 3.3.1. Caching Overheard Routing Information . . . . . . 10
3.3.2. Replying to Route Requests using Cached Routes . 10 3.3.2. Replying to Route Requests using Cached Routes . 11
3.3.3. Preventing Route Reply Storms . . . . . . . . . . 11 3.3.3. Preventing Route Reply Storms . . . . . . . . . . 12
3.3.4. Route Request Hop Limits . . . . . . . . . . . . 13 3.3.4. Route Request Hop Limits . . . . . . . . . . . . 14
3.4. Additional Route Maintenance Features . . . . . . . . . . 14 3.4. Additional Route Maintenance Features . . . . . . . . . . 15
3.4.1. Packet Salvaging . . . . . . . . . . . . . . . . 14 3.4.1. Packet Salvaging . . . . . . . . . . . . . . . . 15
3.4.2. Queued Packets Destined over a Broken Link . . . 14 3.4.2. Queued Packets Destined over a Broken Link . . . 15
3.4.3. Automatic Route Shortening . . . . . . . . . . . 15 3.4.3. Automatic Route Shortening . . . . . . . . . . . 16
3.4.4. Increased Spreading of Route Error Messages . . . 16 3.4.4. Increased Spreading of Route Error Messages . . . 17
3.5. Optional DSR Flow State Extension . . . . . . . . . . . . 17
3.5.1. Flow Establishment . . . . . . . . . . . . . . . 18
3.5.2. Receiving and Forwarding Establishment Packets . 19
3.5.3. Sending Packets Along Established Flows . . . . . 19
3.5.4. Receiving and Forwarding Packets Sent Along
Established Flows . . . . . . . . . . . . 20
3.5.5. Processing Route Errors . . . . . . . . . . . . . 21
3.5.6. Interaction with Automatic Route Shortening . . . 21
3.5.7. Loop Detection . . . . . . . . . . . . . . . . . 22
3.5.8. Acknowledgement Destination . . . . . . . . . . . 22
3.5.9. Crash Recovery . . . . . . . . . . . . . . . . . 22
3.5.10. Rate Limiting . . . . . . . . . . . . . . . . . . 22
3.5.11. Interaction with Packet Salvaging . . . . . . . . 23
4. Conceptual Data Structures 17 4. Conceptual Data Structures 24
4.1. Route Cache . . . . . . . . . . . . . . . . . . . . . . . 17 4.1. Route Cache . . . . . . . . . . . . . . . . . . . . . . . 24
4.2. Send Buffer . . . . . . . . . . . . . . . . . . . . . . . 20 4.2. Send Buffer . . . . . . . . . . . . . . . . . . . . . . . 27
4.3. Route Request Table . . . . . . . . . . . . . . . . . . . 21 4.3. Route Request Table . . . . . . . . . . . . . . . . . . . 28
4.4. Gratuitous Route Reply Table . . . . . . . . . . . . . . 22 4.4. Gratuitous Route Reply Table . . . . . . . . . . . . . . 29
4.5. Network Interface Queue and Maintenance Buffer . . . . . 23 4.5. Network Interface Queue and Maintenance Buffer . . . . . 30
4.6. Blacklist . . . . . . . . . . . . . . . . . . . . . . . . 24 4.6. Blacklist . . . . . . . . . . . . . . . . . . . . . . . . 31
5. DSR Header Format 25 5. Additional Conceptual Data Structures for Flow State Extension 32
5.1. Fixed Portion of DSR Header . . . . . . . . . . . . . . . 26 5.1. Flow Table . . . . . . . . . . . . . . . . . . . . . . . 32
5.2. Route Request Option . . . . . . . . . . . . . . . . . . 28 5.2. Automatic Route Shortening Table . . . . . . . . . . . . 33
5.3. Route Reply Option . . . . . . . . . . . . . . . . . . . 30 5.3. Default Flow ID Table . . . . . . . . . . . . . . . . . . 33
5.4. Route Error Option . . . . . . . . . . . . . . . . . . . 32
5.5. Acknowledgment Request Option . . . . . . . . . . . . . . 35
5.6. Acknowledgment Option . . . . . . . . . . . . . . . . . . 36
5.7. DSR Source Route Option . . . . . . . . . . . . . . . . . 37
5.8. Pad1 Option . . . . . . . . . . . . . . . . . . . . . . . 39
5.9. PadN Option . . . . . . . . . . . . . . . . . . . . . . . 40
6. Detailed Operation 41
6.1. General Packet Processing . . . . . . . . . . . . . . . . 41 6. DSR Options Header Format 35
6.1.1. Originating a Packet . . . . . . . . . . . . . . 41
6.1.2. Adding a DSR Header to a Packet . . . . . . . . . 41
6.1.3. Adding a DSR Source Route Option to a Packet . . 42
6.1.4. Processing a Received Packet . . . . . . . . . . 43
6.1.5. Processing a Received DSR Source Route Option . . 45
6.2. Route Discovery Processing . . . . . . . . . . . . . . . 48
6.2.1. Originating a Route Request . . . . . . . . . . . 48
6.2.2. Processing a Received Route Request Option . . . 50
6.2.3. Generating a Route Reply using the Route Cache . 52
6.2.4. Originating a Route Reply . . . . . . . . . . . . 54
6.2.5. Processing a Received Route Reply Option . . . . 56
6.3. Route Maintenance Processing . . . . . . . . . . . . . . 57
6.3.1. Using Link-Layer Acknowledgments . . . . . . . . 57
6.3.2. Using Passive Acknowledgments . . . . . . . . . . 58
6.3.3. Using Network-Layer Acknowledgments . . . . . . . 59
6.3.4. Originating a Route Error . . . . . . . . . . . . 62
6.3.5. Processing a Received Route Error Option . . . . 63
6.3.6. Salvaging a Packet . . . . . . . . . . . . . . . 64
7. Multiple Interface Support 66 6.1. Fixed Portion of DSR Options Header . . . . . . . . . . . 36
6.2. Route Request Option . . . . . . . . . . . . . . . . . . 39
6.3. Route Reply Option . . . . . . . . . . . . . . . . . . . 41
6.4. Route Error Option . . . . . . . . . . . . . . . . . . . 43
6.4.1. Node Unreachable Type-Specific Information . . . 45
6.4.2. Flow State Not Supported Type-Specific Information 45
6.4.3. Option Not Supported Type-Specific Information . 45
6.5. Acknowledgement Request Option . . . . . . . . . . . . . 46
6.6. Acknowledgement Option . . . . . . . . . . . . . . . . . 47
6.7. DSR Source Route Option . . . . . . . . . . . . . . . . . 48
6.8. Pad1 Option . . . . . . . . . . . . . . . . . . . . . . . 50
6.9. PadN Option . . . . . . . . . . . . . . . . . . . . . . . 51
8. Fragmentation and Reassembly 67 7. Additional Header Formats and Options for Flow State Extension 52
9. Protocol Constants and Configuration Variables 68 7.1. DSR Flow State Header . . . . . . . . . . . . . . . . . . 53
7.2. Options and Extensions in DSR Options Header . . . . . . 54
7.2.1. Timeout Option . . . . . . . . . . . . . . . . . 54
7.2.2. Destination and Flow ID Option . . . . . . . . . 55
7.2.3. New Error Type Value for Unknown Flow . . . . . . 56
7.2.4. New Error Type Value for Default Flow Unknown . . 57
7.2.5. Acknowledgement Request Option
Previous Hop Address Extension . . . . . . 58
10. IANA Considerations 69 8. Detailed Operation 59
11. Security Considerations 70 8.1. General Packet Processing . . . . . . . . . . . . . . . . 59
8.1.1. Originating a Packet . . . . . . . . . . . . . . 59
8.1.2. Adding a DSR Options Header to a Packet . . . . . 59
8.1.3. Adding a DSR Source Route Option to a Packet . . 60
8.1.4. Processing a Received Packet . . . . . . . . . . 61
8.1.5. Processing a Received DSR Source Route Option . . 63
8.1.6. Handling an Unknown DSR Option . . . . . . . . . 65
8.2. Route Discovery Processing . . . . . . . . . . . . . . . 67
8.2.1. Originating a Route Request . . . . . . . . . . . 67
8.2.2. Processing a Received Route Request Option . . . 69
8.2.3. Generating a Route Reply using the Route Cache . 71
8.2.4. Originating a Route Reply . . . . . . . . . . . . 73
8.2.5. Processing a Received Route Reply Option . . . . 75
8.3. Route Maintenance Processing . . . . . . . . . . . . . . 76
8.3.1. Using Link-Layer Acknowledgements . . . . . . . . 76
8.3.2. Using Passive Acknowledgements . . . . . . . . . 77
8.3.3. Using Network-Layer Acknowledgements . . . . . . 78
8.3.4. Originating a Route Error . . . . . . . . . . . . 81
8.3.5. Processing a Received Route Error Option . . . . 82
8.3.6. Salvaging a Packet . . . . . . . . . . . . . . . 83
8.4. Multiple Interface Support . . . . . . . . . . . . . . . 85
8.5. Fragmentation and Reassembly . . . . . . . . . . . . . . 86
8.6. Flow State Processing . . . . . . . . . . . . . . . . . . 87
8.6.1. Originating a Packet . . . . . . . . . . . . . . 87
8.6.2. Inserting a DSR Flow State Header . . . . . . . . 89
8.6.3. Receiving a Packet . . . . . . . . . . . . . . . 89
8.6.4. Forwarding a Packet Using Flow IDs . . . . . . . 94
8.6.5. Promiscuously Receiving a Packet . . . . . . . . 94
8.6.6. Operation where the Layer below DSR Decreases
the IP TTL Non-Uniformly . . . . . . . . . 95
8.6.7. Salvage Interactions with DSR . . . . . . . . . . 95
Appendix A. Link-MaxLife Cache Description 71 9. Protocol Constants and Configuration Variables 96
Appendix B. Location of DSR in the ISO Network Reference Model 73 10. IANA Considerations 97
Appendix C. Implementation and Evaluation Status 74 11. Security Considerations 98
Changes from Previous Version of the Draft 75 Appendix A. Link-MaxLife Cache Description 99
Acknowledgements 76 Appendix B. Location of DSR in the ISO Network Reference Model 101
References 77 Appendix C. Implementation and Evaluation Status 102
Chair's Address 80 Changes from Previous Version of the Draft 104
Authors' Addresses 81 Acknowledgements 105
References 106
Chair's Address 110
Authors' Addresses 111
1. Introduction 1. Introduction
The Dynamic Source Routing protocol (DSR) [13, 14] is a simple and The Dynamic Source Routing protocol (DSR) [15, 16] is a simple and
efficient routing protocol designed specifically for use in multi-hop efficient routing protocol designed specifically for use in multi-hop
wireless ad hoc networks of mobile nodes. Using DSR, the network wireless ad hoc networks of mobile nodes. Using DSR, the network
is completely self-organizing and self-configuring, requiring no is completely self-organizing and self-configuring, requiring no
existing network infrastructure or administration. Network nodes existing network infrastructure or administration. Network nodes
cooperate to forward packets for each other to allow communication cooperate to forward packets for each other to allow communication
over multiple "hops" between nodes not directly within wireless over multiple "hops" between nodes not directly within wireless
transmission range of one another. As nodes in the network move transmission range of one another. As nodes in the network move
about or join or leave the network, and as wireless transmission about or join or leave the network, and as wireless transmission
conditions such as sources of interference change, all routing is conditions such as sources of interference change, all routing is
automatically determined and maintained by the DSR routing protocol. automatically determined and maintained by the DSR routing protocol.
Since the number or sequence of intermediate hops needed to reach any Since the number or sequence of intermediate hops needed to reach any
destination may change at any time, the resulting network topology destination may change at any time, the resulting network topology
may be quite rich and rapidly changing. may be quite rich and rapidly changing.
The DSR protocol allows nodes to dynamically discover a source
route across multiple network hops to any destination in the ad hoc
network. Each data packet sent then carries in its header the
complete, ordered list of nodes through which the packet will pass,
allowing packet routing to be trivially loop-free and avoiding the
need for up-to-date routing information in the intermediate nodes
through which the packet is forwarded. By including this source
route in the header of each data packet, other nodes forwarding or
overhearing any of these packets can also easily cache this routing
information for future use.
In designing DSR, we sought to create a routing protocol that had In designing DSR, we sought to create a routing protocol that had
very low overhead yet was able to react very quickly to changes in very low overhead yet was able to react very quickly to changes in
the network. The DSR protocol provides highly reactive service in the network. The DSR protocol provides highly reactive service in
order to help ensure successful delivery of data packets in spite of order to help ensure successful delivery of data packets in spite of
node movement or other changes in network conditions. node movement or other changes in network conditions.
The DSR protocol is composed of two main mechanisms that work The DSR protocol is composed of two main mechanisms that work
together to allow the discovery and maintenance of source routes in together to allow the discovery and maintenance of source routes in
the ad hoc network: the ad hoc network:
skipping to change at page 2, line 25 skipping to change at page 2, line 13
the number of overhead packets caused by DSR to scale all the way the number of overhead packets caused by DSR to scale all the way
down to zero, when all nodes are approximately stationary with down to zero, when all nodes are approximately stationary with
respect to each other and all routes needed for current communication respect to each other and all routes needed for current communication
have already been discovered. As nodes begin to move more or have already been discovered. As nodes begin to move more or
as communication patterns change, the routing packet overhead of as communication patterns change, the routing packet overhead of
DSR automatically scales to only that needed to track the routes DSR automatically scales to only that needed to track the routes
currently in use. Network topology changes not affecting routes currently in use. Network topology changes not affecting routes
currently in use are ignored and do not cause reaction from the currently in use are ignored and do not cause reaction from the
protocol. protocol.
All state maintained by DSR is "soft state" [6], in that the loss
of any state will not interfere with the correct operation of the
protocol; all state is discovered as needed and can easily and
quickly be rediscovered if needed after a failure without significant
impact on the protocol. This use of only soft state allows the
routing protocol to be very robust to problems such as dropped or
delayed routing packets or node failures. In particular, a node in
DSR that fails and reboots can easily rejoin the network immediately
after rebooting; if the failed node was involved in forwarding
packets for other nodes as an intermediate hop along one or more
routes, it can also resume this forwarding quickly after rebooting,
with no or minimal interruption to the routing protocol.
In response to a single Route Discovery (as well as through routing In response to a single Route Discovery (as well as through routing
information from other packets overheard), a node may learn and cache information from other packets overheard), a node may learn and
multiple routes to any destination. This allows the reaction to cache multiple routes to any destination. This support for multiple
routing changes to be much more rapid, since a node with multiple routes allows the reaction to routing changes to be much more rapid,
routes to a destination can try another cached route if the one it since a node with multiple routes to a destination can try another
has been using should fail. This caching of multiple routes also cached route if the one it has been using should fail. This caching
avoids the overhead of needing to perform a new Route Discovery each of multiple routes also avoids the overhead of needing to perform a
time a route in use breaks. new Route Discovery each time a route in use breaks. The sender of
a packet selects and controls the route used for its own packets,
which together with support for multiple routes also allows features
such as load balancing to be defined. In addition, all routes used
are easily guaranteed to be loop-free, since the sender can avoid
duplicate hops in the routes selected.
The operation of both Route Discovery and Route Maintenance in DSR The operation of both Route Discovery and Route Maintenance in DSR
are designed to allow unidirectional links and asymmetric routes are designed to allow unidirectional links and asymmetric routes
to be easily supported. In particular, as noted in Section 2, in to be easily supported. In particular, as noted in Section 2, in
wireless networks, it is possible that a link between two nodes may wireless networks, it is possible that a link between two nodes may
not work equally well in both directions, due to differing antenna not work equally well in both directions, due to differing antenna
or propagation patterns or sources of interference. DSR allows such or propagation patterns or sources of interference. DSR allows such
unidirectional links to be used when necessary, improving overall unidirectional links to be used when necessary, improving overall
performance and network connectivity in the system. performance and network connectivity in the system.
This document specifies the operation of the DSR protocol for This document specifies the operation of the DSR protocol for
routing unicast IPv4 packets in multi-hop wireless ad hoc networks. routing unicast IPv4 packets in multi-hop wireless ad hoc networks.
Advanced, optional features, such as Quality of Service (QoS) support Advanced, optional features, such as Quality of Service (QoS) support
and efficient multicast routing, and operation of DSR with IPv6 [6], and efficient multicast routing, and operation of DSR with IPv6 [7],
are covered in other documents. The specification of DSR in this are covered in other documents. The specification of DSR in this
document provides a compatible base on which such features can be document provides a compatible base on which such features can be
added, either independently or by integration with the DSR operation added, either independently or by integration with the DSR operation
specified here. specified here.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [4]. document are to be interpreted as described in RFC 2119 [4].
2. Assumptions 2. Assumptions
The DSR protocol as described here is designed mainly for mobile
ad hoc networks of up to about two hundred nodes, and is designed
to work well with even very high rates of mobility. Other protocol
features and enhancements that may allow DSR to scale to larger
networks are outside the scope of this document.
We assume in this document that all nodes wishing to communicate with We assume in this document that all nodes wishing to communicate with
other nodes within the ad hoc network are willing to participate other nodes within the ad hoc network are willing to participate
fully in the protocols of the network. In particular, each node fully in the protocols of the network. In particular, each node
participating in the ad hoc network SHOULD also be willing to forward participating in the ad hoc network SHOULD also be willing to forward
packets for other nodes in the network. packets for other nodes in the network.
The diameter of an ad hoc network is the minimum number of hops The diameter of an ad hoc network is the minimum number of hops
necessary for a packet to reach from any node located at one extreme necessary for a packet to reach from any node located at one extreme
edge of the ad hoc network to another node located at the opposite edge of the ad hoc network to another node located at the opposite
extreme. We assume that this diameter will often be small (e.g., extreme. We assume that this diameter will often be small (e.g.,
skipping to change at page 3, line 44 skipping to change at page 4, line 8
to operate the network interface in "promiscuous" receive mode. to operate the network interface in "promiscuous" receive mode.
This mode causes the hardware to deliver every received packet to This mode causes the hardware to deliver every received packet to
the network driver software without filtering based on link-layer the network driver software without filtering based on link-layer
destination address. Although we do not require this facility, some destination address. Although we do not require this facility, some
of our optimizations can take advantage of its availability. Use of our optimizations can take advantage of its availability. Use
of promiscuous mode does increase the software overhead on the CPU, of promiscuous mode does increase the software overhead on the CPU,
but we believe that wireless network speeds are more the inherent but we believe that wireless network speeds are more the inherent
limiting factor to performance in current and future systems; we also limiting factor to performance in current and future systems; we also
believe that portions of the protocol are suitable for implementation believe that portions of the protocol are suitable for implementation
directly within a programmable network interface unit to avoid this directly within a programmable network interface unit to avoid this
overhead on the CPU [14]. Use of promiscuous mode may also increase overhead on the CPU [16]. Use of promiscuous mode may also increase
the power consumption of the network interface hardware, depending the power consumption of the network interface hardware, depending
on the design of the receiver hardware, and in such cases, DSR can on the design of the receiver hardware, and in such cases, DSR can
easily be used without the optimizations that depend on promiscuous easily be used without the optimizations that depend on promiscuous
receive mode, or can be programmed to only periodically switch the receive mode, or can be programmed to only periodically switch the
interface into promiscuous mode. Use of promiscuous receive mode is interface into promiscuous mode. Use of promiscuous receive mode is
entirely optional. entirely optional.
Wireless communication ability between any pair of nodes may at Wireless communication ability between any pair of nodes may at
times not work equally well in both directions, due for example to times not work equally well in both directions, due for example to
differing antenna or propagation patterns or sources of interference differing antenna or propagation patterns or sources of interference
around the two nodes [1, 18]. That is, wireless communications around the two nodes [1, 20]. That is, wireless communications
between each pair of nodes will in many cases be able to operate between each pair of nodes will in many cases be able to operate
bidirectionally, but at times the wireless link between two nodes bidirectionally, but at times the wireless link between two nodes
may be only unidirectional, allowing one node to successfully send may be only unidirectional, allowing one node to successfully send
packets to the other while no communication is possible in the packets to the other while no communication is possible in the
reverse direction. Although many routing protocols operate correctly reverse direction. Although many routing protocols operate correctly
only over bidirectional links, DSR can successfully discover and only over bidirectional links, DSR can successfully discover and
forward packets over paths that contain unidirectional links. Some forward packets over paths that contain unidirectional links. Some
MAC protocols, however, such as MACA [17], MACAW [2], or IEEE MAC protocols, however, such as MACA [19], MACAW [2], or IEEE
802.11 [11], limit unicast data packet transmission to bidirectional 802.11 [13], limit unicast data packet transmission to bidirectional
links, due to the required bidirectional exchange of RTS and CTS links, due to the required bidirectional exchange of RTS and CTS
packets in these protocols and due to the link-layer acknowledgment packets in these protocols and due to the link-layer acknowledgement
feature in IEEE 802.11; when used on top of MAC protocols such as feature in IEEE 802.11; when used on top of MAC protocols such as
these, DSR can take advantage of additional optimizations, such as these, DSR can take advantage of additional optimizations, such as
the ability to reverse a source route to obtain a route back to the the ability to reverse a source route to obtain a route back to the
origin of the original route. origin of the original route.
The IP address used by a node using the DSR protocol MAY be assigned The IP address used by a node using the DSR protocol MAY be assigned
by any mechanism (e.g., static assignment or use of DHCP for dynamic by any mechanism (e.g., static assignment or use of DHCP for dynamic
assignment [7]), although the method of such assignment is outside assignment [8]), although the method of such assignment is outside
the scope of this specification. the scope of this specification.
3. DSR Protocol Overview 3. DSR Protocol Overview
This section provides an overview of the operation of the DSR
protocol. The basic version of DSR uses explicit "source routing",
in which each data packet sent carries in its header the complete,
ordered list of nodes through which the packet will pass. This use
of explicit source routing allows the sender to select and control
the routes used for its own packets, supports the use of multiple
routes to any destination (for example, for load balancing), and
allows a simple guarantee that the routes used are loop-free; by
including this source route in the header of each data packet, other
nodes forwarding or overhearing any of these packets can also easily
cache this routing information for future use. Section 3.1 describes
this basic operation of Route Discovery, Section 3.2 describes basic
Route Maintenance, and Sections 3.3 and 3.4 describe additional
features of these two parts of DSR's operation. Section 3.5 then
describes an optional, compatible extension to DSR, known as "flow
state", that allows the routing of most packets without an explicit
source route header in the packet, while still preserves the
fundamental properties of DSR's operation.
3.1. Basic DSR Route Discovery 3.1. Basic DSR Route Discovery
When some source node originates a new packet addressed to some When some source node originates a new packet addressed to some
destination node, the source node places in the header of the packet destination node, the source node places in the header of the packet
a source route giving the sequence of hops that the packet is to a "source route" giving the sequence of hops that the packet is to
follow on its way to the destination. Normally, the sender will follow on its way to the destination. Normally, the sender will
obtain a suitable source route by searching its "Route Cache" of obtain a suitable source route by searching its "Route Cache" of
routes previously learned; if no route is found in its cache, it will routes previously learned; if no route is found in its cache, it will
initiate the Route Discovery protocol to dynamically find a new route initiate the Route Discovery protocol to dynamically find a new route
to this destination node. In this case, we call the source node to this destination node. In this case, we call the source node
the "initiator" and the destination node the "target" of the Route the "initiator" and the destination node the "target" of the Route
Discovery. Discovery.
For example, suppose a node A is attempting to discover a route to For example, suppose a node A is attempting to discover a route to
node E. The Route Discovery initiated by node A in this example node E. The Route Discovery initiated by node A in this example
skipping to change at page 6, line 23 skipping to change at page 6, line 43
In returning the Route Reply to the initiator of the Route Discovery, 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 such as in this example, node E replying back to node A, node E will
typically examine its own Route Cache for a route back to A, and if typically examine its own Route Cache for a route back to A, and if
found, will use it for the source route for delivery of the packet found, will use it for the source route for delivery of the packet
containing the Route Reply. Otherwise, E SHOULD perform its own containing the Route Reply. Otherwise, E SHOULD perform its own
Route Discovery for target node A, but to avoid possible infinite Route Discovery for target node A, but to avoid possible infinite
recursion of Route Discoveries, it MUST piggyback this Route Reply recursion of Route Discoveries, it MUST piggyback this Route Reply
on the packet containing its own Route Request for A. It is also on the packet containing its own Route Request for A. It is also
possible to piggyback other small data packets, such as a TCP SYN possible to piggyback other small data packets, such as a TCP SYN
packet [28], on a Route Request using this same mechanism. packet [31], on a Route Request using this same mechanism.
Node E could instead simply reverse the sequence of hops in the route Node E could instead simply reverse the sequence of hops in the route
record that it is trying to send in the Route Reply, and use this as record that it is trying to send in the Route Reply, and use this as
the source route on the packet carrying the Route Reply itself. For the source route on the packet carrying the Route Reply itself. For
MAC protocols such as IEEE 802.11 that require a bidirectional frame MAC protocols such as IEEE 802.11 that require a bidirectional frame
exchange as part of the MAC protocol [11], the discovered source exchange as part of the MAC protocol [13], the discovered source
route MUST be reversed in this way to return the Route Reply since it route MUST be reversed in this way to return the Route Reply since it
tests the discovered route to ensure it is bidirectional before the tests the discovered route to ensure it is bidirectional before the
Route Discovery initiator begins using the route; this route reversal Route Discovery initiator begins using the route; this route reversal
also avoids the overhead of a possible second Route Discovery. also avoids the overhead of a possible second Route Discovery.
However, this route reversal technique will prevent the discovery of However, this route reversal technique will prevent the discovery of
routes using unidirectional links, and in wireless environments where routes using unidirectional links, and in wireless environments where
the use of unidirectional links is permitted, such routes may in some the use of unidirectional links is permitted, such routes may in some
cases be more efficient than those with only bidirectional links, or cases be more efficient than those with only bidirectional links, or
they may be the only way to achieve connectivity to the target node. they may be the only way to achieve connectivity to the target node.
When initiating a Route Discovery, the sending node saves a copy of When initiating a Route Discovery, the sending node saves a copy of
the original packet (that triggered the Discovery) in a local buffer the original packet (that triggered the Discovery) in a local buffer
called the "Send Buffer". The Send Buffer contains a copy of each called the "Send Buffer". The Send Buffer contains a copy of each
packet that cannot be transmitted by this node because it does not packet that cannot be transmitted by this node because it does not
skipping to change at page 7, line 48 skipping to change at page 8, line 21
node E using a source route through intermediate nodes B, C, and D: node E using a source route through intermediate nodes B, C, and D:
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
| A |---->| B |---->| C |-->? | D | | E | | A |---->| B |---->| C |-->? | D | | E |
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
In this case, node A is responsible for the link from A to B, node B In this case, node A is responsible for the link from A to B, node B
is responsible for the link from B to C, node C is responsible for is responsible for the link from B to C, node C is responsible for
the link from C to D, node D is responsible for the link from D to E. the link from C to D, node D is responsible for the link from D to E.
An acknowledgment can provide confirmation that a link is capable of An acknowledgement can provide confirmation that a link is capable of
carrying data, and in wireless networks, acknowledgments are often carrying data, and in wireless networks, acknowledgements are often
provided at no cost, either as an existing standard part of the MAC provided at no cost, either as an existing standard part of the MAC
protocol in use (such as the link-layer acknowledgment frame defined protocol in use (such as the link-layer acknowledgement frame defined
by IEEE 802.11 [11]), or by a "passive acknowledgment" [16] (in by IEEE 802.11 [13]), or by a "passive acknowledgement" [18] (in
which, for example, B confirms receipt at C by overhearing C transmit which, for example, B confirms receipt at C by overhearing C transmit
the packet when forwarding it on to D). the packet when forwarding it on to D).
If a built-in acknowledgment mechanism is not available, the node If a built-in acknowledgement mechanism is not available, the
transmitting the packet can explicitly request a DSR-specific node transmitting the packet can explicitly request a DSR-specific
software acknowledgment be returned by the next node along the route; software acknowledgement be returned by the next node along the
this software acknowledgment will normally be transmitted directly route; this software acknowledgement will normally be transmitted
to the sending node, but if the link between these two nodes is directly to the sending node, but if the link between these two nodes
unidirectional, this software acknowledgment could travel over a is unidirectional, this software acknowledgement could travel over a
different, multi-hop path. different, multi-hop path.
After an acknowledgment has been received from some neighbor, a node After an acknowledgement has been received from some neighbor, a node
MAY choose to not require acknowledgments from that neighbor for a MAY choose to not require acknowledgements from that neighbor for a
brief period of time, unless the network interface connecting a node brief period of time, unless the network interface connecting a node
to that neighbor always receives an acknowledgment in response to to that neighbor always receives an acknowledgement in response to
unicast traffic. unicast traffic.
When a software acknowledgment is used, the acknowledgment request When a software acknowledgement is used, the acknowledgement
SHOULD be retransmitted up to a maximum number of times. A request SHOULD be retransmitted up to a maximum number of times.
retransmission of the acknowledgment request can be sent as a A retransmission of the acknowledgement request can be sent as a
separate packet, piggybacked on a retransmission of the original separate packet, piggybacked on a retransmission of the original
data packet, or piggybacked on any packet with the same next-hop data packet, or piggybacked on any packet with the same next-hop
destination that does not also contain a software acknowledgment. destination that does not also contain a software acknowledgement.
After the acknowledgment request has been retransmitted the maximum After the acknowledgement request has been retransmitted the maximum
number of times, if no acknowledgment has been received, then the number of times, if no acknowledgement has been received, then the
sender treats the link to this next-hop destination as currently sender treats the link to this next-hop destination as currently
"broken". It SHOULD remove this link from its Route Cache and "broken". It SHOULD remove this link from its Route Cache and
SHOULD return a "Route Error" to each node that has sent a packet SHOULD return a "Route Error" to each node that has sent a packet
routed over that link since an acknowledgment was last received. routed over that link since an acknowledgement was last received.
For example, in the situation shown above, if C does not receive For example, in the situation shown above, if C does not receive
an acknowledgment from D after some number of requests, it would an acknowledgement from D after some number of requests, it would
return a Route Error to A, as well as any other node that may have return a Route Error to A, as well as any other node that may have
used the link from C to D since C last received an acknowledgment used the link from C to D since C last received an acknowledgement
from D. Node A then removes this broken link from its cache; any from D. Node A then removes this broken link from its cache; any
retransmission of the original packet can be performed by upper retransmission of the original packet can be performed by upper
layer protocols such as TCP, if necessary. For sending such a layer protocols such as TCP, if necessary. For sending such a
retransmission or other packets to this same destination E, if A has retransmission or other packets to this same destination E, if A has
in its Route Cache another route to E (for example, from additional in its Route Cache another route to E (for example, from additional
Route Replies from its earlier Route Discovery, or from having Route Replies from its earlier Route Discovery, or from having
overheard sufficient routing information from other packets), it overheard sufficient routing information from other packets), it
can send the packet using the new route immediately. Otherwise, it can send the packet using the new route immediately. Otherwise, it
SHOULD perform a new Route Discovery for this target (subject to the SHOULD perform a new Route Discovery for this target (subject to the
back-off described in Section 3.1). back-off described in Section 3.1).
skipping to change at page 9, line 32 skipping to change at page 10, line 32
unidirectionally (not bidirectionally), but this unidirectional unidirectionally (not bidirectionally), but this unidirectional
restriction on any link is not persistent, almost all links restriction on any link is not persistent, almost all links
are physically bidirectional, and the MAC protocol in use in are physically bidirectional, and the MAC protocol in use in
the network is capable of transmitting unicast packets over the network is capable of transmitting unicast packets over
unidirectional links. unidirectional links.
- The MAC protocol in use in the network is not capable of - The MAC protocol in use in the network is not capable of
transmitting unicast packets over unidirectional links; transmitting unicast packets over unidirectional links;
only bidirectional links can be used by the MAC protocol for only bidirectional links can be used by the MAC protocol for
transmitting unicast packets. For example, the IEEE 802.11 transmitting unicast packets. For example, the IEEE 802.11
Distributed Coordination Function (DCF) MAC protocol [11] Distributed Coordination Function (DCF) MAC protocol [13]
is capable of transmitting a unicast packet only over a is capable of transmitting a unicast packet only over a
bidirectional link, since the MAC protocol requires the return bidirectional link, since the MAC protocol requires the return of
of a link-level acknowledgment packet from the receiver and also a link-level acknowledgement packet from the receiver and also
optionally requires the bidirectional exchange of an RTS and CTS optionally requires the bidirectional exchange of an RTS and CTS
packet between the transmitter and receiver nodes. packet between the transmitter and receiver nodes.
In the first case above, for example, the source route used in a data In the first case above, for example, the source route used in a data
packet, the accumulated route record in a Route Request, or the route packet, the accumulated route record in a Route Request, or the route
being returned in a Route Reply SHOULD all be cached by any node in being returned in a Route Reply SHOULD all be cached by any node in
the "forward" direction; any node SHOULD cache this information from the "forward" direction; any node SHOULD cache this information from
any such packet received, whether the packet was addressed to this any such packet received, whether the packet was addressed to this
node, sent to a broadcast (or multicast) MAC address, or overheard node, sent to a broadcast (or multicast) MAC address, or overheard
while the node's network interface is in promiscuous mode. However, while the node's network interface is in promiscuous mode. However,
skipping to change at page 13, line 43 skipping to change at page 14, line 43
form of Route Request is called a "non-propagating" Route Request; form of Route Request is called a "non-propagating" Route Request;
it provides an inexpensive method for determining if the target is it provides an inexpensive method for determining if the target is
currently a neighbor of the initiator or if a neighbor node has a currently a neighbor of the initiator or if a neighbor node has a
route to the target cached (effectively using the neighbors' Route route to the target cached (effectively using the neighbors' Route
Caches as an extension of the initiator's own Route Cache). If no Caches as an extension of the initiator's own Route Cache). If no
Route Reply is received after a short timeout, then the node sends a Route Reply is received after a short timeout, then the node sends a
"propagating" Route Request (i.e., with no hop limit) for the target "propagating" Route Request (i.e., with no hop limit) for the target
node. node.
As another example, a node MAY use this hop limit to implement an As another example, a node MAY use this hop limit to implement an
"expanding ring" search for the target [14]. A node using this "expanding ring" search for the target [16]. A node using this
technique sends an initial non-propagating Route Request as described technique sends an initial non-propagating Route Request as described
above; if no Route Reply is received for it, the node originates above; if no Route Reply is received for it, the node originates
another Route Request with a hop limit of 2. For each Route Request another Route Request with a hop limit of 2. For each Route Request
originated, if no Route Reply is received for it, the node doubles originated, if no Route Reply is received for it, the node doubles
the hop limit used on the previous attempt, to progressively explore the hop limit used on the previous attempt, to progressively explore
for the target node without allowing the Route Request to propagate for the target node without allowing the Route Request to propagate
over the entire network. However, this expanding ring search over the entire network. However, this expanding ring search
approach could have the effect of increasing the average latency of approach could have the effect of increasing the average latency of
Route Discovery, since multiple Discovery attempts and timeouts may Route Discovery, since multiple Discovery attempts and timeouts may
be needed before discovering a route to the target node. be needed before discovering a route to the target node.
skipping to change at page 15, line 6 skipping to change at page 16, line 6
link. Specifically, the node SHOULD search its Network Interface link. Specifically, the node SHOULD search its Network Interface
Queue and Maintenance Buffer (Section 4.5) for packets for which Queue and Maintenance Buffer (Section 4.5) for packets for which
the next-hop link is this new broken link. For each such packet the next-hop link is this new broken link. For each such packet
currently queued at this node, the node SHOULD process that packet as currently queued at this node, the node SHOULD process that packet as
follows: follows:
- Remove the packet from the node's Network Interface Queue and - Remove the packet from the node's Network Interface Queue and
Maintenance Buffer. Maintenance Buffer.
- Originate a Route Error for this packet to the original sender of - Originate a Route Error for this packet to the original sender of
the packet, using the procedure described in Section 6.3.4, as if the packet, using the procedure described in Section 8.3.4, as if
the node had already reached the maximum number of retransmission the node had already reached the maximum number of retransmission
attempts for that packet for Route Maintenance. However, in attempts for that packet for Route Maintenance. However, in
sending such Route Errors for queued packets in response to a sending such Route Errors for queued packets in response to a
single new broken link detected, the node SHOULD send no more single new broken link detected, the node SHOULD send no more
than one Route Error to each original sender of any of these than one Route Error to each original sender of any of these
packets. packets.
- If the node has another route to the packet's IP - If the node has another route to the packet's IP
Destination Address in its Route Cache, the node SHOULD Destination Address in its Route Cache, the node SHOULD
salvage the packet as described in Section 6.3.6. Otherwise, the salvage the packet as described in Section 8.3.6. Otherwise, the
node SHOULD discard the packet. node SHOULD discard the packet.
3.4.3. Automatic Route Shortening 3.4.3. Automatic Route Shortening
Source routes in use MAY be automatically shortened if one or more Source routes in use MAY be automatically shortened if one or more
intermediate nodes in the route become no longer necessary. This intermediate nodes in the route become no longer necessary. This
mechanism of automatically shortening routes in use is somewhat mechanism of automatically shortening routes in use is somewhat
similar to the use of passive acknowledgments [16]. In particular, similar to the use of passive acknowledgements [18]. In particular,
if a node is able to overhear a packet carrying a source route (e.g., if a node is able to overhear a packet carrying a source route (e.g.,
by operating its network interface in promiscuous receive mode), then by operating its network interface in promiscuous receive mode), then
this node examines the unexpended portion of that source route. If this node examines the unexpended portion of that source route. If
this node is not the intended next-hop destination for the packet this node is not the intended next-hop destination for the packet
but is named in the later unexpended portion of the packet's source but is named in the later unexpended portion of the packet's source
route, then it can infer that the intermediate nodes before itself in 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 the source route are no longer needed in the route. For example, the
figure below illustrates an example in which node D has overheard a figure below illustrates an example in which node D has overheard a
data packet being transmitted from B to C, for later forwarding to D data packet being transmitted from B to C, for later forwarding to D
and to E: and to E:
skipping to change at page 17, line 5 skipping to change at page 17, line 36
from C to D is currently broken. It thus removes this link from 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 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 no other route to E in its Route Cache). On the Route Request
packet initiating this Route Discovery, node A piggybacks a copy packet initiating this Route Discovery, node A piggybacks a copy
of this Route Error, ensuring that the Route Error spreads well to of this Route Error, ensuring that the Route Error spreads well to
other nodes, and guaranteeing that any Route Reply that it receives other nodes, and guaranteeing that any Route Reply that it receives
(including those from other node's Route Caches) in response to this (including those from other node's Route Caches) in response to this
Route Request does not contain a route that assumes the existence of Route Request does not contain a route that assumes the existence of
this broken link. this broken link.
3.5. Optional DSR Flow State Extension
This section describes an optional, compatible extension to the DSR
protocol, known as "flow state", that allows the routing of most
packets without an explicit source route header in the packet. The
DSR flow state extension further reduces the overhead of the protocol
yet still preserves the fundamental properties of DSR's operation.
Once a sending node has discovered a source route such as through
DSR's Route Discovery mechanism, the flow state mechanism allows the
sending node to establish hop-by-hop forwarding state within the
network, based on this source route, to enable each node along the
route to forward the packet to the next hop based on the node's own
local knowledge of the flow along which this packet is being routed.
Flow state is dynamically initialized by the first packet using a
source route and is then able to route subsequent packets along
the same flow without use of a source route header in the packet.
The state established at each hop along a flow is "soft state" and
thus automatically expires when no longer needed and can be quickly
recreated as necessary. Extending DSR's basic operation based on an
explicit source route in the header of each packet routed, the flow
state extension operates as a form of "implicit source routing" by
preserving DSR's basic operation but removing the explicit source
route from packets.
3.5.1. Flow Establishment
A source node sending packets to some destination node MAY use the
DSR flow state extension described here to establish a route to
that destination as a flow. A "flow" is a route from the source to
the destination represented by hop-by-hop forwarding state within
the nodes along the route. Each flow is uniquely identified by a
combination of the source node address, the destination node address,
and a flow identifier (flow ID) chosen by the source node.
Each flow ID is a 16-bit unsigned integer. Comparison between
different flow IDs MUST be performed modulo 2**16. For example,
using an implementation in the C programming language, a
flow ID value (a) is greater than another flow ID value (b) if
((short)((a) - (b)) > 0), if a C language "short" data type is
implemented as a 16-bit signed integer.
A DSR Flow State header in a packet identifies the flow ID to
be followed in forwarding that packet. From a given source to
some destination, any number of different flows MAY exist and
be in use, for example following different sequences of hops to
reach the destination. One of these flows may be considered to be
the "default" flow from that source to that destination. A node
receiving a packet with neither a DSR Options header specifying the
route to be taken (with a Source Route option in the DSR Options
header) nor a DSR Flow State header specifying the flow ID to be
followed, is forwarded along the default flow for the source and
destination addresses specified in the packet's IP header.
In establishing a new flow, the source node generates a nonzero
16-bit flow ID greater than any unexpired flow IDs for this
(source, destination) pair. If the source wishes for this flow to
become the default flow, the low bit of the flow ID MUST be set (the
flow ID is an odd number); otherwise, the low bit MUST NOT be set
(the flow ID is an even number).
The source node establishing the new flow then transmits a packet
containing a DSR Options header with a Source Route option; to
establish the flow, the source node also MUST include in the packet
a DSR Flow State header, with the Flow ID field set to the chosen
flow ID for the new flow, and MUST include a Timeout option in the
DSR Options header, giving the lifetime after which state information
about this flow is to expire. This packet will generally be a normal
data packet being sent from this sender to the receiver (for example,
the first packet sent after discovering the new route) but is also
treated as a "flow establishment" packet.
The source node records this flow in its Flow Table for future use,
setting the TTL in this Flow Table entry to be the value used in the
TTL field in the packet's IP header and setting the Lifetime in this
entry to be the lifetime specified in the Timeout option in the DSR
Options header.
Any further packets sent with this flow ID before the timeout that
also contain a DSR Options header with a Source Route option MUST use
this same source route in the Source Route option.
3.5.2. Receiving and Forwarding Establishment Packets
Packets intended to establish a flow, as described in Section 3.5.1,
contain a DSR Options header with a Source Route option, and are
forwarded along the indicated route. A node implementing the DSR
flow state extension, when receiving and forwarding such a DSR
packet, also keeps some state in its own Flow Table to enable it
to forward future packets that are sent along this flow with only
the flow ID specified. Specifically, if the packet also contains
a DSR Flow State header, this packet SHOULD cause an entry to be
established for this flow in the Flow Table of each node along the
packet's route.
The Hop Count field of the DSR Flow State header is also stored in
the Flow Table, as is Lifetime option specified in the DSR Options
header.
If the Flow ID is odd and there is no flow in the Flow Table with
Flow ID greater than the received Flow ID, set the default Flow ID
for this (IP Source Address, IP Destination Address) pair to the
received Flow ID, and the TTL of the packet is recorded.
The Flow ID option is removed before final delivery of the packet.
3.5.3. Sending Packets Along Established Flows
When a flow is established as described in Section 3.5.1, a packet
is sent which establishes state in each node along the route.
This state is soft; that is, the protocol contains mechanisms for
recovering from the loss of this state. However, the use of these
mechanisms may result in reduced performance for packets sent
along flows with forgotten state. As a result, it is desirable
to differentiate behavior based on whether or not the sender is
reasonably certain that the flow state exists on each node along
the route. We define a flow's state to be "established end-to-end"
if the Flow Tables of all nodes on the route contains forwarding
information for that flow. While it is impossible to detect whether
or not a flow's state has been established end-to-end without sending
packets, implementations may make reasonable assumptions about the
retention of flow state and the probability that an establishment
packet has been seen by all nodes on the route.
A source wishing to send a packet along an established flow
determines if the flow state has been established end-to-end. If
it has not, a DSR Options header with Source Route option with this
flow's route is added to the packet. The source SHOULD set the
Flow ID field of the DSR Flow State header either to the flow ID
previously associated with this flow's route or to zero. If it sets
the Flow ID field to any other value, it MUST follow the processing
steps in Section 3.5.1 for establishing a new flow ID. If it sets the
Flow ID field to a nonzero value, it MUST include a Timeout option
with a value not greater than the timeout remaining in the node's
Flow Table, and if its TTL is not equal to that specified in the Flow
Table, the flow MUST NOT be used as a default flow in the future.
Once flow state has been established end-to-end for non-default
flows, a source adds a DSR Flow State header to each packet it wishes
to send along that flow, setting the Flow ID field to the flow ID of
that flow. A Source Route option SHOULD NOT be added to the packet,
though if one is, then the steps for processing flows that have not
been established end to end MUST be followed.
Once flow state has been established end-to-end for default flows,
sources sending packets with IP TTL equal to the TTL value in the
local Flow Table entry for this flow then transmit the packet to the
next hop. In this case, a DSR Flow State header SHOULD NOT be added
to the packet and a DSR Options header likewise SHOULD NOT be added
to the packet; though if one is, the steps for sending packets along
non-default flows MUST be followed. If the IP TTL is not equal to
the TTL value in the local Flow Table, then the steps for processing
a non-default flow MUST be followed.
3.5.4. Receiving and Forwarding Packets Sent Along Established Flows
The handling of packets containing a DSR Options header with
both a nonzero Flow ID and a Source Route option is described in
Section 3.5.2. The Flow ID is ignored when it is equal to zero.
This section only describes handling of packets without a Source
Route option.
If a node receives a packet with a Flow ID in the DSR Options
header that indicates an unexpired flow in the node's Flow Table, it
increments the Hop Count in the DSR Options header and forwards the
packet to the next hop indicated in the Flow Table.
If a node receives a packet with a Flow ID that indicates a flow not
currently in the node's Flow Table, it returns a Route Error of type
UNKNOWN_FLOW with Error Destination and IP Destination addresses
copied from the IP Source of the packet triggering the error. This
error packet SHOULD be MAC-destined to the node from which it was
received; if it cannot confirm reachability of the previous node
using Route Maintenance, it MUST send the error as described in
Section 8.1.1. The node sending the error SHOULD attempt to salvage
the packet triggering the Route Error. If it does salvage the
packet, it MUST zero the Flow ID.
If a node receives a packet with no DSR Options header and no DSR
Flow State header, it checks the Default Flow Table. If there is
an entry, it forwards to the next hop indicated in the Flow Table
for the default flow. Otherwise, it returns a Route Error of type
DEFAULT_FLOW_UNKNOWN with Error Destination and IP Destination
addresses copied from the IP Source of the packet triggering the
error. This error packet SHOULD be MAC-destined to the node from
which it was received; if it cannot confirm reachability of the
previous node using Route Maintenance, it MUST send the error as
described in Section 8.1.1. The node sending the error SHOULD
attempt to salvage the packet triggering the Route Error. If it does
salvage the packet, it MUST zero the Flow ID.
3.5.5. Processing Route Errors
When a node receives a Route Error of type Unknown Flow, it marks
the flow to indicate that it has not been established end-to-end.
When a node receives a Route Error of type Default Flow Unknown, it
marks the default flow to indicate that it has not been established
end-to-end.
3.5.6. Interaction with Automatic Route Shortening
Because a full source route is not carried in every packet, an
alternative method for performing automatic route shortening is
necessary for packets using the flow state extension. Instead, nodes
promiscuously listen to packets, and if a node receives a packet
with (IP Source, IP Destination, Flow ID) found in the Flow Table
but the MAC-layer (next hop) destination address of the packet is
not this node, the node determines whether the packet was sent by
an upstream or downstream node by examining the Hop Count field in
the DSR Flow State header. If the Hop Count field is less than the
expected Hop Count at this node, the node assumes that the packet
was sent by an upstream node, and adds an entry for the packet to
its Automatic Route Shortening Table, possibly evicting an earlier
entry added to this table. When the packet is then sent to that node
for forwarding, the node finds that it has previously received the
packet by checking its Automatic Route Shortening Table, and returns
a gratuitous Route Reply to the source of the packet.
3.5.7. Loop Detection
If a node receives a packet for forwarding with adjusted TTL lower
than expected and default flow forwarding is being used, it sends
a Route Error of type Default Flow Unknown back to the IP source.
It can attempt delivery of the packet by normal salvaging (subject
to constraints described in Section 8.6.7) or by inserting a
Flow ID option with Special TTL extension based on what that node's
understanding of the default Flow ID and TTL.
3.5.8. Acknowledgement Destination
In packets sent using Flow State, the previous hop is not necessarily
known. In order to allow nodes that have lost flow state to
determine the previous hop, the address of the previous hop can
optionally be stored in the Acknowledgement Request. This extension
SHOULD NOT be used when a Source Route option is present, MAY be used
when flow state routing is used without a Source Route option, and
SHOULD be used before Route Maintenance determines that the next-hop
destination is unreachable.
3.5.9. Crash Recovery
Each node has a maximum Timeout value that it can possibly generate.
This can be based on the largest number that can be set in a timeout
option (2**16 - 1 seconds) or set in system software. When a node
crashes, it does not establish new flows for a period equal to this
maximum Timeout value, in order to avoid colliding with its old
Flow IDs.
3.5.10. Rate Limiting
Flow IDs can be assigned with a counter. More specifically, the
"Current Flow ID" is kept. When a new default Flow ID needs to be
assigned, if the Current Flow ID is odd, the Current Flow ID is
assigned as the Flow ID and the Current Flow ID is incremented by
one; if the Current Flow ID is even, one plus the Current Flow ID is
assigned as the Flow ID and the Current Flow ID is incremented by
two.
If Flow IDs are assigned in this way, one algorithm for avoiding
duplicate, unexpired Flow IDs is to rate limit new Flow IDs to an
average rate of n assignments per second, where n is 2**15 divided by
the maximum Timeout value. This can be averaged over any period not
exceeding the maximum Timeout value.
3.5.11. Interaction with Packet Salvaging
Salvaging is modified to zero the Flow ID field. Also, any time the
this document refers to the Salvage field in the Source Route option
in a DSR Options header, packets without a Source Route option are
considered to have the value zero in the Salvage field.
4. Conceptual Data Structures 4. Conceptual Data Structures
This document describes the operation of the DSR protocol in terms This document describes the operation of the DSR protocol in terms
of a number of conceptual data structures. This section describes of a number of conceptual data structures. This section describes
each of these data structures and provides an overview of its use each of these data structures and provides an overview of its use
in the protocol. In an implementation of the protocol, these data in the protocol. In an implementation of the protocol, these data
structures MAY be implemented in any manner consistent with the structures MAY be implemented in any manner consistent with the
external behavior described in this document. external behavior described in this document.
4.1. Route Cache 4.1. Route Cache
skipping to change at page 17, line 47 skipping to change at page 24, line 47
external to this DSR network. Such external networks may, for external to this DSR network. Such external networks may, for
example, be the Internet, or may be other ad hoc networks routed example, be the Internet, or may be other ad hoc networks routed
with a routing protocol other than DSR. Such external networks may with a routing protocol other than DSR. Such external networks may
also be other DSR networks that are treated as external networks also be other DSR networks that are treated as external networks
in order to improve scalability. The complete handling of such in order to improve scalability. The complete handling of such
external networks is beyond the scope of this document. However, external networks is beyond the scope of this document. However,
this document specifies a minimal set of requirements and features this document specifies a minimal set of requirements and features
necessary to allow nodes only implementing this specification to necessary to allow nodes only implementing this specification to
interoperate correctly with nodes implementing interfaces to such interoperate correctly with nodes implementing interfaces to such
external networks. This minimal set of requirements and features external networks. This minimal set of requirements and features
involve the First Hop External (F) and Last Hop External (L) involve the First Hop External (F) and Last Hop External (L) bits
bits in a DSR Source Route option (Section 5.7) and a Route Reply in a DSR Source Route option (Section 6.7) and a Route Reply option
option (Section 5.3) in a packet's DSR header (Section 5). These (Section 6.3) in a packet's DSR Options header (Section 6). These
requirements also include the addition of an External flag bit requirements also include the addition of an External flag bit
tagging each link in the Route Cache, copied from the First Hop tagging each link in the Route Cache, copied from the First Hop
External (F) and Last Hop External (L) bits in the DSR Source Route External (F) and Last Hop External (L) bits in the DSR Source Route
option or Route Reply option from which this link was learned. option or Route Reply option from which this link was learned.
The Route Cache SHOULD support storing more than one route to each The Route Cache SHOULD support storing more than one route to each
destination. In searching the Route Cache for a route to some destination. In searching the Route Cache for a route to some
destination node, the Route Cache is indexed by destination node destination node, the Route Cache is indexed by destination node
address. The following properties describe this searching function address. The following properties describe this searching function
on a Route Cache: on a Route Cache:
skipping to change at page 19, line 11 skipping to change at page 26, line 11
promiscuous snooping on other packets. In particular, a node promiscuous snooping on other packets. In particular, a node
SHOULD prefer routes that it is presently using over those that SHOULD prefer routes that it is presently using over those that
it is not. it is not.
Any suitable data structure organization, consistent with this Any suitable data structure organization, consistent with this
specification, MAY be used to implement the Route Cache in any node. specification, MAY be used to implement the Route Cache in any node.
For example, the following two types of organization are possible: For example, the following two types of organization are possible:
- In DSR, the route returned in each Route Reply that is received - In DSR, the route returned in each Route Reply that is received
by the initiator of a Route Discovery (or that is learned from by the initiator of a Route Discovery (or that is learned from
the header of overhead packets, as described in Section 6.1.4) the header of overhead packets, as described in Section 8.1.4)
represents a complete path (a sequence of links) leading to the represents a complete path (a sequence of links) leading to the
destination node. By caching each of these paths separately, destination node. By caching each of these paths separately,
a "path cache" organization for the Route Cache can be formed. a "path cache" organization for the Route Cache can be formed.
A path cache is very simple to implement and easily guarantees A path cache is very simple to implement and easily guarantees
that all routes are loop-free, since each individual route from that all routes are loop-free, since each individual route from
a Route Reply or Route Request or used in a packet is loop-free. a Route Reply or Route Request or used in a packet is loop-free.
To search for a route in a path cache data structure, the sending To search for a route in a path cache data structure, the sending
node can simply search its Route Cache for any path (or prefix of node can simply search its Route Cache for any path (or prefix of
a path) that leads to the intended destination node. a path) that leads to the intended destination node.
This type of organization for the Route Cache in DSR has been This type of organization for the Route Cache in DSR has been
extensively studied through simulation [5, 9, 12, 19] and extensively studied through simulation [5, 10, 14, 21] and
through implementation of DSR in a mobile outdoor testbed under through implementation of DSR in a mobile outdoor testbed under
significant workload [20, 21, 22]. significant workload [22, 23, 24].
- Alternatively, a "link cache" organization could be used for the - Alternatively, a "link cache" organization could be used for the
Route Cache, in which each individual link (hop) in the routes Route Cache, in which each individual link (hop) in the routes
returned in Route Reply packets (or otherwise learned from the returned in Route Reply packets (or otherwise learned from the
header of overhead packets) is added to a unified graph data header of overhead packets) is added to a unified graph data
structure of this node's current view of the network topology. structure of this node's current view of the network topology.
To search for a route in link cache, the sending node must use To search for a route in link cache, the sending node must use
a more complex graph search algorithm, such as the well-known a more complex graph search algorithm, such as the well-known
Dijkstra's shortest-path algorithm, to find the current best path Dijkstra's shortest-path algorithm, to find the current best path
through the graph to the destination node. Such an algorithm is through the graph to the destination node. Such an algorithm is
skipping to change at page 19, line 50 skipping to change at page 26, line 50
cache organization, in its ability to effectively utilize all of cache organization, in its ability to effectively utilize all of
the potential information that a node might learn about the state the potential information that a node might learn about the state
of the network. In particular, links learned from different of the network. In particular, links learned from different
Route Discoveries or from the header of any overheard packets can Route Discoveries or from the header of any overheard packets can
be merged together to form new routes in the network, but this be merged together to form new routes in the network, but this
is not possible in a path cache due to the separation of each is not possible in a path cache due to the separation of each
individual path in the cache. individual path in the cache.
This type of organization for the Route Cache in DSR, including This type of organization for the Route Cache in DSR, including
the effect of a range of implementation choices, has been studied the effect of a range of implementation choices, has been studied
through detailed simulation [9]. through detailed simulation [10].
The choice of data structure organization to use for the Route Cache The choice of data structure organization to use for the Route Cache
in any DSR implementation is a local matter for each node and affects in any DSR implementation is a local matter for each node and affects
only performance; any reasonable choice of organization for the Route only performance; any reasonable choice of organization for the Route
Cache does not affect either correctness or interoperability. Cache does not affect either correctness or interoperability.
Each entry in the Route Cache SHOULD have a timeout associated Each entry in the Route Cache SHOULD have a timeout associated
with it, to allow that entry to be deleted if not used within some with it, to allow that entry to be deleted if not used within some
time. The particular choice of algorithm and data structure used time. The particular choice of algorithm and data structure used
to implement the Route Cache SHOULD be considered in choosing the to implement the Route Cache SHOULD be considered in choosing the
skipping to change at page 20, line 22 skipping to change at page 27, line 22
RouteCacheTimeout defined in Section 9 specifies the timeout to be RouteCacheTimeout defined in Section 9 specifies the timeout to be
applied to entries in the Route Cache, although it is also possible applied to entries in the Route Cache, although it is also possible
to instead use an adaptive policy in choosing timeout values rather to instead use an adaptive policy in choosing timeout values rather
than using a single timeout setting for all entries; for example, the than using a single timeout setting for all entries; for example, the
Link-MaxLife cache design (below) uses an adaptive timeout algorithm Link-MaxLife cache design (below) uses an adaptive timeout algorithm
and does not use the RouteCacheTimeout configuration variable. and does not use the RouteCacheTimeout configuration variable.
As guidance to implementors, Appendix A describes a type of link As guidance to implementors, Appendix A describes a type of link
cache known as "Link-MaxLife" that has been shown to outperform cache known as "Link-MaxLife" that has been shown to outperform
other types of link caches and path caches studied in detailed other types of link caches and path caches studied in detailed
simulation [9]. Link-MaxLife is an adaptive link cache in which each simulation [10]. Link-MaxLife is an adaptive link cache in which
link in the cache has a timeout that is determined dynamically by the each link in the cache has a timeout that is determined dynamically
caching node according to its observed past behavior of the two nodes by the caching node according to its observed past behavior of the
at the ends of the link; in addition, when selecting a route for a two nodes at the ends of the link; in addition, when selecting a
packet being sent to some destination, among cached routes of equal route for a packet being sent to some destination, among cached
length (number of hops) to that destination, Link-MaxLife selects the routes of equal length (number of hops) to that destination,
route with the longest expected lifetime (highest minimum timeout of Link-MaxLife selects the route with the longest expected lifetime
any link in the route). Use of the Link-MaxLife design for the Route (highest minimum timeout of any link in the route). Use of
Cache is recommended in implementations of DSR. the Link-MaxLife design for the Route Cache is recommended in
implementations of DSR.
4.2. Send Buffer 4.2. Send Buffer
The Send Buffer of a node implementing DSR is a queue of packets that The Send Buffer of a node implementing DSR is a queue of packets that
cannot be sent by that node because it does not yet have a source cannot be sent by that node because it does not yet have a source
route to each such packet's destination. Each packet in the Send route to each such packet's destination. Each packet in the Send
Buffer is logically associated with the time that it was placed into Buffer is logically associated with the time that it was placed into
the Buffer, and SHOULD be removed from the Send Buffer and silently the Buffer, and SHOULD be removed from the Send Buffer and silently
discarded after a period of SendBufferTimeout after initially being discarded after a period of SendBufferTimeout after initially being
placed in the Buffer. If necessary, a FIFO strategy SHOULD be used placed in the Buffer. If necessary, a FIFO strategy SHOULD be used
to evict packets before they timeout to prevent the buffer from to evict packets before they timeout to prevent the buffer from
overflowing. overflowing.
Subject to the rate limiting defined in Section 6.2, a Route Subject to the rate limiting defined in Section 8.2, a Route
Discovery SHOULD be initiated as often as possible for the Discovery SHOULD be initiated as often as possible for the
destination address of any packets residing in the Send Buffer. destination address of any packets residing in the Send Buffer.
4.3. Route Request Table 4.3. Route Request Table
The Route Request Table of a node implementing DSR records The Route Request Table of a node implementing DSR records
information about Route Requests that have been recently originated information about Route Requests that have been recently originated
or forwarded by this node. The table is indexed by IP address. or forwarded by this node. The table is indexed by IP address.
The Route Request Table on a node records the following information The Route Request Table on a node records the following information
skipping to change at page 23, line 18 skipping to change at page 30, line 18
4.5. Network Interface Queue and Maintenance Buffer 4.5. Network Interface Queue and Maintenance Buffer
Depending on factors such as the structure and organization of Depending on factors such as the structure and organization of
the operating system, protocol stack implementation, network the operating system, protocol stack implementation, network
interface device driver, and network interface hardware, a packet interface device driver, and network interface hardware, a packet
being transmitted could be queued in a variety of ways. For being transmitted could be queued in a variety of ways. For
example, outgoing packets from the network protocol stack might be example, outgoing packets from the network protocol stack might be
queued at the operating system or link layer, before transmission queued at the operating system or link layer, before transmission
by the network interface. The network interface might also by the network interface. The network interface might also
provide a retransmission mechanism for packets, such as occurs in provide a retransmission mechanism for packets, such as occurs in
IEEE 802.11 [11]; the DSR protocol, as part of Route Maintenance, IEEE 802.11 [13]; the DSR protocol, as part of Route Maintenance,
requires limited buffering of packets already transmitted for requires limited buffering of packets already transmitted for
which the reachability of the next-hop destination has not yet been which the reachability of the next-hop destination has not yet been
determined. The operation of DSR is defined here in terms of two determined. The operation of DSR is defined here in terms of two
conceptual data structures that together incorporate this queueing conceptual data structures that together incorporate this queuing
behavior. behavior.
The Network Interface Queue of a node implementing DSR is an output The Network Interface Queue of a node implementing DSR is an output
queue of packets from the network protocol stack waiting to be queue of packets from the network protocol stack waiting to be
transmitted by the network interface; for example, in the 4.4BSD transmitted by the network interface; for example, in the 4.4BSD
Unix network protocol stack implementation, this queue for a network Unix network protocol stack implementation, this queue for a network
interface is represented as a "struct ifqueue" [33]. This queue is interface is represented as a "struct ifqueue" [36]. This queue is
used to hold packets while the network interface is in the process of used to hold packets while the network interface is in the process of
transmitting another packet. transmitting another packet.
The Maintenance Buffer of a node implementing DSR is a queue of The Maintenance Buffer of a node implementing DSR is a queue of
packets sent by this node that are awaiting next-hop reachability packets sent by this node that are awaiting next-hop reachability
confirmation as part of Route Maintenance. For each packet in confirmation as part of Route Maintenance. For each packet in
the Maintenance Buffer, a node maintains a count of the number the Maintenance Buffer, a node maintains a count of the number
of retransmissions and the time of the last retransmission. The of retransmissions and the time of the last retransmission. The
Maintenance Buffer MAY be of limited size; when adding a new packet Maintenance Buffer MAY be of limited size; when adding a new packet
to the Maintenance Buffer, if the buffer size is insufficient to hold to the Maintenance Buffer, if the buffer size is insufficient to hold
the new packet, the new packet SHOULD be silently discarded. If, the new packet, the new packet SHOULD be silently discarded. If,
after MaxMaintRexmt attempts to confirm next-hop reachability of after MaxMaintRexmt attempts to confirm next-hop reachability of
some node, no confirmation is received, all packets in this node's some node, no confirmation is received, all packets in this node's
Maintenance Buffer with this next-hop destination SHOULD be removed Maintenance Buffer with this next-hop destination SHOULD be removed
from the Maintenance Buffer; in this case, the node also SHOULD from the Maintenance Buffer; in this case, the node also SHOULD
originate a Route Error for this packet to each original source of originate a Route Error for this packet to each original source of
a packet removed in this way (Section 6.3) and SHOULD salvage each a packet removed in this way (Section 8.3) and SHOULD salvage each
packet removed in this way (Section 6.3.6) if it has another route packet removed in this way (Section 8.3.6) if it has another route
to that packet's IP Destination Address in its Route Cache. The to that packet's IP Destination Address in its Route Cache. The
definition of MaxMaintRexmt conceptually includes any retransmissions definition of MaxMaintRexmt conceptually includes any retransmissions
that might be attempted for a packet at the link layer or within that might be attempted for a packet at the link layer or within
the network interface hardware. The timeout value to use for each the network interface hardware. The timeout value to use for each
transmission attempt for an acknowledgment request depends on the transmission attempt for an acknowledgement request depends on the
type of acknowledgment mechanism used for Route Maintenance for that type of acknowledgement mechanism used by Route Maintenance for that
attempt, as described in Section 6.3. attempt, as described in Section 8.3.
4.6. Blacklist 4.6. Blacklist
When a node using the DSR protocol is connected through an When a node using the DSR protocol is connected through an
interface that requires physically bidirectional links for unicast interface that requires physically bidirectional links for unicast
transmission, it MUST keep a blacklist. A Blacklist is a table, transmission, it MUST maintain a blacklist. A Blacklist is a table,
indexed by neighbor address, that indicates that the link between indexed by neighbor address, that indicates that the link between
this node and the specified neighbor may not be bidirectional. A this node and the specified neighbor may not be bidirectional. A
node places another node's address in this list when it believes that node places another node's address in this list when it believes that
broadcast packets from that other node reach this node, but that broadcast packets from that other node reach this node, but that
unicast transmission between the two nodes is not possible. For unicast transmission between the two nodes is not possible. For
example, if a node forwarding a Route Reply discovers that the next example, if a node forwarding a Route Reply discovers that the next
hop is unreachable, it places that next hop in the node's blacklist. hop is unreachable, it places that next hop in the node's blacklist.
Once a node discovers that it can communicate bidirectionally with Once a node discovers that it can communicate bidirectionally with
one of the nodes listed in the blacklist, it SHOULD remove that node one of the nodes listed in the blacklist, it SHOULD remove that
from the blacklist. For example, if A has B in its blacklist, but node from the blacklist. For example, if node A has node B in its
A hears B forward a Route Request with a hop list indicating that blacklist, but A hears B forward a Route Request with a hop list
the broadcast from A to B was successful, A SHOULD remove B from its indicating that the broadcast from A to B was successful, then A
blacklist. SHOULD remove B from its blacklist.
A node MUST associate a state with each node in the blacklist, A node MUST associate a state with each node in the blacklist,
specifying whether the unidirectionality is "questionable" or specifying whether the unidirectionality is "questionable"
"probable." Each time the unreachability is positively determined, or "probable". Each time the unreachability is positively
the node SHOULD set the state to "probable." After the unreachability determined, the node SHOULD set the state to "probable". After the
has not been positively determined for some amount of time, the state unreachability has not been positively determined for some amount of
should revert to "questionable." A node MAY expire nodes from its time, the state should revert to "questionable". A node MAY expire
blacklist after a reasonable amount of time. nodes from its blacklist after a reasonable amount of time.
5. DSR Header Format 5. Additional Conceptual Data Structures for Flow State Extension
This section defines additional conceptual data structures used by
the optional "flow state" extension to DSR. In an implementation of
the protocol, these data structures MAY be implemented in any manner
consistent with the external behavior described in this document.
5.1. Flow Table
A node implementing the flow state extension MUST implement a Flow
Table or other data structure consistent with the external behavior
described in this section. A node not implementing the flow state
extension SHOULD NOT implement a Flow Table.
The Flow Table records information about flows from which packets
recently have been sent or forwarded by this node. The table is
indexed by a triple (IP Source Address, IP Destination Address,
Flow ID), where Flow ID is a 16-bit token assigned by the source as
described in Section 3.5.1. Each entry in the Flow Table contains
the following fields:
- The MAC address of the next-hop node along this flow.
- An indication of the outgoing network interface on this node to
be used in transmitting packets along this flow.
- The MAC address of the previous-hop node along this flow.
- An indication of the network interface on this node from which
packets from that previous-hop node are received.
- A timeout after which this entry in the Flow Table MUST be
deleted.
- The expected value of the Hop Count field in the DSR Flow State
header for packets received for forwarding along this field (for
use with packets containing a DSR Flow State header).
- An indication of whether or not this flow can be used as a
default flow for packets originated by this node (the flow IP
MUST be odd).
- The entry SHOULD record the complete source route for the flow.
(Nodes not recording the complete source route cannot participate
in Automatic Route Shortening.)
- The entry MAY contain a field recording the time this entry was
last used.
The entry MUST be deleted when its timeout expires.
5.2. Automatic Route Shortening Table
A node implementing the flow state extension SHOULD implement an
Automatic Route Shortening Table or other data structure consistent
with the external behavior described in this section. A node
not implementing the flow state extension SHOULD NOT implement an
Automatic Route Shortening Table.
The Automatic Route Shortening Table records information about
received packets for which Automatic Route Shortening may be
possible. The table is indexed by a triple (IP Source Address, IP
Destination Address, Flow ID). Each entry in the Automatic Route
Shortening Table contains a list of (packet identifier, Hop Count)
pairs for that flow. The packet identifier in the list may be any
unique identifier for the received packet; for example, for IPv4
packets, the combination of the following fields from the packet's
IP header MAY be used as a unique identifier for the packet: Source
Address, Destination Address, Identification, Protocol, Fragment,
and Total Length. The Hop Count in the list in the entry is copied
from the Hop Count field in the DSR Flow State header of the received
packet for which this table entry was created. Any packet identifier
SHOULD appear at most once in the list in an entry, and this list
item SHOULD record the minimum Hop Count value received for that
packet (if the wireless signal strength or signal-to-noise ratio at
which a packet is received is available to the DSR implementation
in a node, the node MAY, for example, remember instead in this list
the minimum Hop Count value for which the received packet's signal
strength or signal-to-noise ratio exceeded some threshold).
Space in the Automatic Route Shortening Table of a node MAY be
dynamically managed by any local algorithm at the node. For example,
in order to limit the amount of memory used to store the table, any
existing entry MAY be deleted at any time, and the number of packets
listed in each entry MAY be limited. However, when reclaiming space
in the table, nodes SHOULD favor retaining information about more
flows in the table rather than more packets listed in each entry
in the table, as long as at least the listing of some small number
of packets (e.g., 3) can be retained in each entry. In addition,
subject to any implementation limit on the number of packets listed
in each entry in the table, information about a packet listed in an
entry SHOULD be retained until the expiration of the packet's IP TTL.
5.3. Default Flow ID Table
A node implementing the flow state extension MUST implement a Default
Flow Table or other data structure consistent with the external
behavior described in this section. A node not implementing the flow
state extension SHOULD NOT implement a Default Flow Table.
For each (source, destination) pair for which a node forwards
packets, the node MUST record:
- the largest odd Flow ID value seen
- the time at which all of this (source, destination) pair's flows
that are forwarded by this node expire
- the current default Flow ID
- a flag indicating whether or not the current default Flow ID is
valid
If a node deletes this record for a (source, destination) pair,
it MUST also delete all Flow Table entries for that (source,
destination) pair. Nodes MUST delete table entries if all of this
(source, destination) pair's flows that are forwarded by this node
expire.
6. DSR Options Header Format
The Dynamic Source Routing protocol makes use of a special header The Dynamic Source Routing protocol makes use of a special header
carrying control information that can be included in any existing IP carrying control information that can be included in any existing
packet. This DSR header in a packet contains a small fixed-sized, IP packet. This DSR Options header in a packet contains a small
4-octet portion, followed by a sequence of zero or more DSR options fixed-sized, 4-octet portion, followed by a sequence of zero or more
carrying optional information. The end of the sequence of DSR DSR options carrying optional information. The end of the sequence
options in the DSR header is implied by total length of the DSR of DSR options in the DSR Options header is implied by total length
header. of the DSR Options header.
For IPv4, the DSR header MUST immediately follow the IP header in the For IPv4, the DSR Options header MUST immediately follow the IP
packet. (If a Hop-by-Hop Options extension header, as defined in header in the packet. (If a Hop-by-Hop Options extension header, as
IPv6 [6], becomes defined for IPv4, the DSR header MUST immediately defined in IPv6 [7], becomes defined for IPv4, the DSR Options header
follow the Hop-by-Hop Options extension header, if one is present in MUST immediately follow the Hop-by-Hop Options extension header, if
the packet, and MUST otherwise immediately follow the IP header.) one is present in the packet, and MUST otherwise immediately follow
the IP header.)
To add a DSR header to a packet, the DSR header is inserted following To add a DSR Options header to a packet, the DSR Options header is
the packet's IP header, before any following header such as a inserted following the packet's IP header, before any following
traditional (e.g., TCP or UDP) transport layer header. Specifically, header such as a traditional (e.g., TCP or UDP) transport layer
the Protocol field in the IP header is used to indicate that a DSR header. Specifically, the Protocol field in the IP header is used
header follows the IP header, and the Next Header field in the DSR to indicate that a DSR Options header follows the IP header, and the
header is used to indicate the type of protocol header (such as a Next Header field in the DSR Options header is used to indicate the
transport layer header) following the DSR header. type of protocol header (such as a transport layer header) following
the DSR Options header.
If any headers follow the DSR header in a packet, the total length If any headers follow the DSR Options header in a packet, the total
of the DSR header (and thus the total, combined length of all DSR length of the DSR Options header (and thus the total, combined length
options present) MUST be a multiple of 4 octets. This requirement of all DSR options present) MUST be a multiple of 4 octets. This
preserves the alignment of these following headers in the packet. requirement preserves the alignment of these following headers in the
packet.
5.1. Fixed Portion of DSR Header 6.1. Fixed Portion of DSR Options Header
The fixed portion of the DSR header is used to carry information that The fixed portion of the DSR Options header is used to carry
must be present in any DSR header. This fixed portion of the DSR information that must be present in any DSR Options header. This
header has the following format: fixed portion of the DSR Options header has the following format:
0 1 2 3 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 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 Header | Reserved | Payload Length | | Next Header |F| Reserved | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. . . .
. Options . . Options .
. . . .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Next Header Next Header
8-bit selector. Identifies the type of header immediately 8-bit selector. Identifies the type of header immediately
following the DSR header. Uses the same values as the IPv4 following the DSR Options header. Uses the same values as the
Protocol field [29]. IPv4 Protocol field [32].
Flow State Header (F)
Flag bit. MUST be set to 0. This bit is set in a DSR Flow
State header (Section 7.1) and clear in a DSR Options header.
Reserved Reserved
MUST be sent as 0 and ignored on reception. MUST be sent as 0 and ignored on reception.
Payload Length Payload Length
The length of the DSR header, excluding the 4-octet fixed The length of the DSR Options header, excluding the 4-octet
portion. The value of the Payload Length field defines the fixed portion. The value of the Payload Length field defines
total length of all options carried in the DSR header. the total length of all options carried in the DSR Options
header.
Options Options
Variable-length field; the length of the Options field is Variable-length field; the length of the Options field is
specified by the Payload Length field in this DSR header. specified by the Payload Length field in this DSR Options
Contains one or more pieces of optional information (DSR header. Contains one or more pieces of optional information
options), encoded in type-length-value (TLV) format (with the (DSR options), encoded in type-length-value (TLV) format (with
exception of the Pad1 option, described in Section 5.8). the exception of the Pad1 option, described in Section 6.8).
The placement of DSR options following the fixed portion of the DSR The placement of DSR options following the fixed portion of the DSR
header MAY be padded for alignment. However, due to the typically Options header MAY be padded for alignment. However, due to the
limited available wireless bandwidth in ad hoc networks, this padding typically limited available wireless bandwidth in ad hoc networks,
is not required, and receiving nodes MUST NOT expect options within a this padding is not required, and receiving nodes MUST NOT expect
DSR header to be aligned. options within a DSR Options header to be aligned.
Each DSR option is assigned a unique Option Type code. The most
significant 3 bits (that is, Option Type & 0xE0) allow a node not
implementing processing for this Option Type value to behave in the
manner closest to correct for that type:
- The most significant bit in the Option Type value (that is,
Option Type & 0x80) represents whether or not a node receiving
this Option Type SHOULD respond to such a DSR option with a Route
Error of type OPTION_NOT_SUPPORTED, except that such a Route
Error SHOULD never be sent in response to a packet containing a
Route Request option.
- The two follow bits in the Option Type value (that is,
Option Type & 0x60) are a two-bit field indicating how such a
node that does not support this Option Type MUST process the
packet:
00 = Ignore Option
01 = Remove Option
10 = Mark Option
11 = Drop Packet
When these two bits are zero (that is, Option Type & 0x60 == 0),
a node not implementing processing for that Option Type
MUST use the Opt Data Len field to skip over the option and
continue processing. When these two bits are 01 (that is,
Option Type & 0x60 == 0x20), a node not implementing processing
for that Option Type MUST use the Opt Data Len field to remove
the option from the packet and continue processing as if the
option had not been included in the received packet. When these
two bits are 10 (that is, Option Type & 0x60 == 0x40), a node not
implementing processing for that Option Type MUST set the most
significant bit following the Opt Data Len field, MUST ignore the
contents of the option using the Opt Data Len field, and MUST
continue processing the packet. Finally, when these two bits are
11 (that is, Option Type & 0x60 == 0x60), a node not implementing
processing for that Option Type MUST drop the packet.
The following types of DSR options are defined in this document for The following types of DSR options are defined in this document for
use within a DSR header: use within a DSR Options header:
- Route Request option (Section 5.2) - Route Request option (Section 6.2)
- Route Reply option (Section 5.3) - Route Reply option (Section 6.3)
- Route Error option (Section 5.4) - Route Error option (Section 6.4)
- Acknowledgment Request option (Section 5.5) - Acknowledgement Request option (Section 6.5)
- Acknowledgment option (Section 5.6) - Acknowledgement option (Section 6.6)
- DSR Source Route option (Section 5.7) - DSR Source Route option (Section 6.7)
- Pad1 option (Section 5.8) - Pad1 option (Section 6.8)
- PadN option (Section 5.9) - PadN option (Section 6.9)
5.2. Route Request Option 6.2. Route Request Option
The Route Request option in a DSR header is encoded as follows: The Route Request option in a DSR Options header is encoded as
follows:
0 1 2 3 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 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 | | Option Type | Opt Data Len | Identification |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Target Address | | Target Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[1] | | Address[1] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 29, line 41 skipping to change at page 40, line 41
field in the IP header is the address of the initiator of field in the IP header is the address of the initiator of
the Route Discovery and MUST NOT be listed in the Address[i] the Route Discovery and MUST NOT be listed in the Address[i]
fields; the address given in Address[1] is thus the address fields; the address given in Address[1] is thus the address
of the first node on the path after the initiator. The of the first node on the path after the initiator. The
number of addresses present in this field is indicated by the number of addresses present in this field is indicated by the
Opt Data Len field in the option (n = (Opt Data Len - 6) / 4). Opt Data Len field in the option (n = (Opt Data Len - 6) / 4).
Each node propagating the Route Request adds its own address to Each node propagating the Route Request adds its own address to
this list, increasing the Opt Data Len value by 4 octets. this list, increasing the Opt Data Len value by 4 octets.
The Route Request option MUST NOT appear more than once within a DSR The Route Request option MUST NOT appear more than once within a DSR
header. Options header.
5.3. Route Reply Option 6.3. Route Reply Option
The Route Reply option in a DSR header is encoded as follows: The Route Reply option in a DSR Options header is encoded as follows:
0 1 2 3 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 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 |L| Reserved | | Option Type | Opt Data Len |L| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[1] | | Address[1] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[2] | | Address[2] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 30, line 45 skipping to change at page 41, line 45
MUST be set to the address of the source node of the route MUST be set to the address of the source node of the route
being returned. Copied from the Source Address field of the being returned. Copied from the Source Address field of the
Route Request generating the Route Reply, or in the case of a Route Request generating the Route Reply, or in the case of a
gratuitous Route Reply, copied from the Source Address field of gratuitous Route Reply, copied from the Source Address field of
the data packet triggering the gratuitous Reply. the data packet triggering the gratuitous Reply.
Route Reply fields: Route Reply fields:
Option Type Option Type
3 1. Nodes not understanding this option will ignore this
option.
Opt Data Len Opt Data Len
8-bit unsigned integer. Length of the option, in octets, 8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields. excluding the Option Type and Opt Data Len fields.
Last Hop External (L) Last Hop External (L)
Set to indicate that the last hop given by the Route Reply Set to indicate that the last hop given by the Route Reply
(the link from Address[n-1] to Address[n]) is actually an (the link from Address[n-1] to Address[n]) is actually an
skipping to change at page 31, line 35 skipping to change at page 42, line 35
indicates a sequence of hops, originating at the source node indicates a sequence of hops, originating at the source node
specified in the Destination Address field of the IP header specified in the Destination Address field of the IP header
of the packet carrying the Route Reply, through each of the of the packet carrying the Route Reply, through each of the
Address[i] nodes in the order listed in the Route Reply, Address[i] nodes in the order listed in the Route Reply,
ending with the destination node indicated by Address[n]. ending with the destination node indicated by Address[n].
The number of addresses present in the Address[1..n] The number of addresses present in the Address[1..n]
field is indicated by the Opt Data Len field in the option field is indicated by the Opt Data Len field in the option
(n = (Opt Data Len - 1) / 4). (n = (Opt Data Len - 1) / 4).
A Route Reply option MAY appear one or more times within a DSR A Route Reply option MAY appear one or more times within a DSR
header. Options header.
5.4. Route Error Option 6.4. Route Error Option
The Route Error option in a DSR header is encoded as follows: The Route Error option in a DSR Options header is encoded as follows:
0 1 2 3 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 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| | Option Type | Opt Data Len | Error Type |Reservd|Salvage|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Error Source Address | | Error Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Error Destination Address | | Error Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. . . .
. Type-Specific Information . . Type-Specific Information .
. . . .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option Type Option Type
4 2. Nodes not understanding this option will ignore this
option.
Opt Data Len Opt Data Len
8-bit unsigned integer. Length of the option, in octets, 8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields. excluding the Option Type and Opt Data Len fields.
For the current definition of the Route Error option, For the current definition of the Route Error option,
this field MUST be set to 10, plus the size of any this field MUST be set to 10, plus the size of any
Type-Specific Information present in the Route Error. Further Type-Specific Information present in the Route Error. Further
extensions to the Route Error option format may also be extensions to the Route Error option format may also be
skipping to change at page 32, line 49 skipping to change at page 43, line 50
When the Opt Data Len is greater than that required for When the Opt Data Len is greater than that required for
the fixed portion of the Route Error plus the necessary the fixed portion of the Route Error plus the necessary
Type-Specific Information as indicated by the Option Type Type-Specific Information as indicated by the Option Type
value in the option, the remaining octets are interpreted as value in the option, the remaining octets are interpreted as
extensions. Currently, no such further extensions have been extensions. Currently, no such further extensions have been
defined. defined.
Error Type Error Type
The type of error encountered. Currently, the following type The type of error encountered. Currently, the following type
value is defined: values are defined:
1 = NODE_UNREACHABLE 1 = NODE_UNREACHABLE
2 = FLOW_STATE_NOT_SUPPORTED
3 = OPTION_NOT_SUPPORTED
Other values of the Error Type field are reserved for future Other values of the Error Type field are reserved for future
use. use.
Reservd Reservd
Reserved. MUST be sent as 0 and ignored on reception. Reserved. MUST be sent as 0 and ignored on reception.
Salvage Salvage
A 4-bit unsigned integer. Copied from the Salvage field in A 4-bit unsigned integer. Copied from the Salvage field in
skipping to change at page 33, line 42 skipping to change at page 44, line 44
NODE_UNREACHABLE, this field will be set to the address of the NODE_UNREACHABLE, this field will be set to the address of the
node that generated the routing information claiming that the node that generated the routing information claiming that the
hop from the Error Source Address to Unreachable Node Address hop from the Error Source Address to Unreachable Node Address
(specified in the Type-Specific Information) was a valid hop. (specified in the Type-Specific Information) was a valid hop.
Type-Specific Information Type-Specific Information
Information specific to the Error Type of this Route Error Information specific to the Error Type of this Route Error
message. message.
Currently, the Type-Specific Information field is defined only for A Route Error option MAY appear one or more times within a DSR
Route Error messages of type NODE_UNREACHABLE. In this case, the Options header.
6.4.1. Node Unreachable Type-Specific Information
When the Route Error is of type NODE_UNREACHABLE, the
Type-Specific Information field is defined as follows: Type-Specific Information field is defined as follows:
0 1 2 3 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 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Unreachable Node Address Unreachable Node Address
The address of the node that was found to be unreachable The address of the node that was found to be unreachable
(the next-hop neighbor to which the node with address (the next-hop neighbor to which the node with address
Error Source Address was attempting to transmit the packet). Error Source Address was attempting to transmit the packet).
A Route Error option MAY appear one or more times within a DSR 6.4.2. Flow State Not Supported Type-Specific Information
header.
5.5. Acknowledgment Request Option When the Route Error is of type FLOW_STATE_NOT_SUPPORTED, the
Type-Specific Information field is empty.
The Acknowledgment Request option in a DSR header is encoded as 6.4.3. Option Not Supported Type-Specific Information
follows:
When the Route Error is of type OPTION_NOT_SUPPORTED, the
Type-Specific Information field is defined as follows:
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|Unsupported Opt|
+-+-+-+-+-+-+-+-+
Unsupported Opt
The type of option triggering the Route Error.
6.5. Acknowledgement Request Option
The Acknowledgement Request option in a DSR Options header is encoded
as follows:
0 1 2 3 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 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 | | Option Type | Opt Data Len | Identification |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option Type Option Type
5 160. Nodes not understanding this option will remove the
option and return a Route Error.
Opt Data Len Opt Data Len
8-bit unsigned integer. Length of the option, in octets, 8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields. excluding the Option Type and Opt Data Len fields.
Identification Identification
The Identification field is set to a unique value and is copied The Identification field is set to a unique value and is copied
into the Identification field of the Acknowledgment option when into the Identification field of the Acknowledgement option
returned by the node receiving the packet over this hop. when returned by the node receiving the packet over this hop.
An Acknowledgment Request option MUST NOT appear more than once An Acknowledgement Request option MUST NOT appear more than once
within a DSR header. within a DSR Options header.
5.6. Acknowledgment Option 6.6. Acknowledgement Option
The Acknowledgment option in a DSR header is encoded as follows: The Acknowledgement option in a DSR Options header is encoded as
follows:
0 1 2 3 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 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 | | Option Type | Opt Data Len | Identification |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ACK Source Address | | ACK Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ACK Destination Address | | ACK Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option Type Option Type
6 32. Nodes not understanding this option will remove the
option.
Opt Data Len Opt Data Len
8-bit unsigned integer. Length of the option, in octets, 8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields. excluding the Option Type and Opt Data Len fields.
Identification Identification
Copied from the Identification field of the Acknowledgment Copied from the Identification field of the Acknowledgement
Request option of the packet being acknowledged. Request option of the packet being acknowledged.
ACK Source Address ACK Source Address
The address of the node originating the acknowledgment. The address of the node originating the acknowledgement.
ACK Destination Address ACK Destination Address
The address of the node to which the acknowledgment is to be The address of the node to which the acknowledgement is to be
delivered. delivered.
An Acknowledgment option MAY appear one or more times within a DSR An Acknowledgement option MAY appear one or more times within a DSR
header. Options header.
5.7. DSR Source Route Option 6.7. DSR Source Route Option
The DSR Source Route option in a DSR header is encoded as follows: The DSR Source Route option in a DSR Options header is encoded as
follows:
0 1 2 3 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 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 | | Option Type | Opt Data Len |F|L|Reservd|Salvage| Segs Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[1] | | Address[1] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[2] | | Address[2] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[n] | | Address[n] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option Type Option Type
7 96. Nodes not understanding this option will drop the packet.
Opt Data Len Opt Data Len
8-bit unsigned integer. Length of the option, in octets, 8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields. For the excluding the Option Type and Opt Data Len fields. For the
format of the DSR Source Route option defined here, this field format of the DSR Source Route option defined here, this field
MUST be set to the value (n * 4) + 2, where n is the number of MUST be set to the value (n * 4) + 2, where n is the number of
addresses present in the Address[i] fields. addresses present in the Address[i] fields.
First Hop External (F) First Hop External (F)
skipping to change at page 38, line 30 skipping to change at page 49, line 32
Segments Left (Segs Left) Segments Left (Segs Left)
Number of route segments remaining, i.e., number of explicitly Number of route segments remaining, i.e., number of explicitly
listed intermediate nodes still to be visited before reaching listed intermediate nodes still to be visited before reaching
the final destination. the final destination.
Address[1..n] Address[1..n]
The sequence of addresses of the source route. In routing The sequence of addresses of the source route. In routing
and forwarding the packet, the source route is processed as and forwarding the packet, the source route is processed as
described in Sections 6.1.3 and 6.1.5. The number of addresses described in Sections 8.1.3 and 8.1.5. The number of addresses
present in the Address[1..n] field is indicated by the present in the Address[1..n] field is indicated by the
Opt Data Len field in the option (n = (Opt Data Len - 2) / 4). Opt Data Len field in the option (n = (Opt Data Len - 2) / 4).
When forwarding a packet along a DSR source route using a DSR Source When forwarding a packet along a DSR source route using a DSR Source
Route option in the packet's DSR header, the Destination Address Route option in the packet's DSR Options header, the Destination
field in the packet's IP header is always set to the address of the Address field in the packet's IP header is always set to the address
packet's ultimate destination. A node receiving a packet containing of the packet's ultimate destination. A node receiving a packet
a DSR header with a DSR Source Route option MUST examine the containing a DSR Options header with a DSR Source Route option MUST
indicated source route to determine if it is the intended next-hop examine the indicated source route to determine if it is the intended
node for the packet and determine how to forward the packet, as next-hop node for the packet and determine how to forward the packet,
defined in Sections 6.1.4 and 6.1.5. as defined in Sections 8.1.4 and 8.1.5.
5.8. Pad1 Option 6.8. Pad1 Option
The Pad1 option in a DSR header is encoded as follows: The Pad1 option in a DSR Options header is encoded as follows:
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
| Option Type | | Option Type |
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
Option Type Option Type
0 224. Nodes not understanding this option will drop the packet
and return a Route Error.
A Pad1 option MAY be included in the Options field of a DSR header A Pad1 option MAY be included in the Options field of a DSR Options
in order to align subsequent DSR options, but such alignment is header in order to align subsequent DSR options, but such alignment
not required and MUST NOT be expected by a node receiving a packet is not required and MUST NOT be expected by a node receiving a packet
containing a DSR header. containing a DSR Options header.
If any headers follow the DSR header in a packet, the total length of If any headers follow the DSR Options header in a packet, the total
a DSR header, indicated by the Payload Length field in the DSR header length of a DSR Options header, indicated by the Payload Length field
MUST be a multiple of 4 octets. In this case, when building a DSR in the DSR Options header MUST be a multiple of 4 octets. In this
header in a packet, sufficient Pad1 or PadN options MUST be included case, when building a DSR Options header in a packet, sufficient Pad1
in the Options field of the DSR header to make the total length a or PadN options MUST be included in the Options field of the DSR
multiple of 4 octets. Options header to make the total length a multiple of 4 octets.
If more than one consecutive octet of padding is being inserted in If more than one consecutive octet of padding is being inserted in
the Options field of a DSR header, the PadN option, described next, the Options field of a DSR Options header, the PadN option, described
SHOULD be used, rather than multiple Pad1 options. next, SHOULD be used, rather than multiple Pad1 options.
Note that the format of the Pad1 option is a special case; it does Note that the format of the Pad1 option is a special case; it does
not have an Opt Data Len or Option Data field. not have an Opt Data Len or Option Data field.
5.9. PadN Option 6.9. PadN Option
The PadN option in a DSR header is encoded as follows: The PadN option in a DSR Options header is encoded as follows:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
| Option Type | Opt Data Len | Option Data | Option Type | Opt Data Len | Option Data
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
Option Type Option Type
1 0. Nodes not understanding this option will ignore this
option.
Opt Data Len Opt Data Len
8-bit unsigned integer. Length of the option, in octets, 8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields. excluding the Option Type and Opt Data Len fields.
Option Data Option Data
A number of zero-valued octets equal to the Opt Data Len. A number of zero-valued octets equal to the Opt Data Len.
A PadN option MAY be included in the Options field of a DSR header A PadN option MAY be included in the Options field of a DSR Options
in order to align subsequent DSR options, but such alignment is header in order to align subsequent DSR options, but such alignment
not required and MUST NOT be expected by a node receiving a packet is not required and MUST NOT be expected by a node receiving a packet
containing a DSR header. containing a DSR Options header.
If any headers follow the DSR header in a packet, the total length of If any headers follow the DSR Options header in a packet, the total
a DSR header, indicated by the Payload Length field in the DSR header length of a DSR Options header, indicated by the Payload Length field
MUST be a multiple of 4 octets. In this case, when building a DSR in the DSR Options header MUST be a multiple of 4 octets. In this
header in a packet, sufficient Pad1 or PadN options MUST be included case, when building a DSR Options header in a packet, sufficient Pad1
in the Options field of the DSR header to make the total length a or PadN options MUST be included in the Options field of the DSR
multiple of 4 octets. Options header to make the total length a multiple of 4 octets.
6. Detailed Operation 7. Additional Header Formats and Options for Flow State Extension
6.1. General Packet Processing The optional DSR flow state extension requires a new header type, the
DSR Flow State header.
6.1.1. Originating a Packet In addition, the DSR flow state extension adds the following options
for the DSR Options header defined in Section 6:
- Timeout option
- Destination and Flow ID option
Two new Error Type values are also defined for use in the Route Error
option in a DSR Options header:
- Unknown Flow
- Default Flow Unknown
Finally, an extension to the Acknowledgement Request option in a DSR
Options header is also defined:
- Previous Hop Address
This section defines each of these new header or option formats.
7.1. DSR Flow State Header
The DSR Flow State header is a small 4-byte header optionally used
to carry the flow ID and hop count for a packet being sent along a
DSR flow. It is distinguished from the fixed DSR Options header
(Section 6.1) in that the Flow State Header (F) bit is set in the DSR
Flow State header and is clear in the fixed DSR 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header |F| Hop Count | Flow Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Next Header
8-bit selector. Identifies the type of header immediately
following the DSR Flow State header. Uses the same values as
the IPv4 Protocol field [32].
Flow State Header (F)
Flag bit. MUST be set to 1. This bit is set in a DSR Flow
State header and clear in a DSR Options header (Section 6.1).
Hop Count
7-bit unsigned integer. The number of hops through which this
packet has been forwarded.
Flow Identification
The flow ID for this flow, as described in Section 3.5.1.
7.2. Options and Extensions in DSR Options Header
7.2.1. Timeout Option
The Timeout option is defined for use in a DSR Options header to
indicate the amount of time before the expiration of the flow ID
along which the packet is being sent.
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 | Timeout |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option Type
128. Nodes not understanding this option will ignore the
option and return a Route Error.
Opt Data Len
8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields.
When no extensions are present, the Opt Data Len of a Timeout
option is 2. Further extensions to DSR may include additional
data in a Timeout option. The presence of such extensions is
indicated by an Opt Data Len greater than 2. Currently, no
such extensions have been defined.
Timeout
The number of seconds for which this flow remains valid.
The Timeout option MUST NOT appear more than once within a DSR
Options header.
7.2.2. Destination and Flow ID Option
The Destination and Flow ID option is defined for use in a DSR
Options header to send a packet to an intermediate host along one
flow, for eventual forwarding to the final destination along a
different flow. This option enables the aggregation of the state of
multiple flows.
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 | New Flow Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| New IP Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option Type
129. Nodes not understanding this option will ignore the
option and return a Route Error.
Opt Data Len
8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Opt Data Len fields.
When no extensions are present, the Opt Data Len of a
Destination and Flow ID option is 6. Further extensions to
DSR may include additional data in a Destination and Flow ID
option. The presence of such extensions is indicated by an
Opt Data Len greater than 6. Currently, no such extensions
have been defined.
New Flow Identifier
Indicates the next identifier to store in the Flow ID field of
the DSR Options header.
New IP Destination Address
Indicates the next address to store in the Destination Address
field of the IP header.
The Destination and Flow ID option MAY appear one or more times
within a DSR Options header.
7.2.3. New Error Type Value for Unknown Flow
A new Error Type value of 129 (Unknown Flow) is defined for use in
a Route Error option in a DSR Options header. The Type-Specific
Information for errors of this type 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Original IP Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Flow ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Original IP Destination Address
The IP Destination Address of the packet that caused the error.
Flow ID
The Flow ID contained in the DSR Flow ID option that caused the
error.
7.2.4. New Error Type Value for Default Flow Unknown
A new Error Type value of 130 (Default Flow Unknown) is defined
for use in a Route Error option in a DSR Options header. The
Type-Specific Information for errors of this type 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Original IP Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Original IP Destination Address
The IP Destination Address of the packet that caused the error.
7.2.5. Acknowledgement Request Option Previous Hop Address Extension
When the Option Length field of an Acknowledgement Request option
in a DSR Options header is greater than or equal to 6, a Previous
Hop Address Extension is present. The option is then formatted 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 | Packet Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ACK Request Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option Type
5
Option Length
8-bit unsigned integer. Length of the option, in octets,
excluding the Option Type and Option Length fields.
When no extensions are presents, the Option Length of a
Acknowledgement Request option is 2. Further extensions to
DSR may include additional data in a Acknowledgement Request
option. The presence of such extensions is indicated by an
Opt Data Len greater than 2.
Currently, one such extension has been defined. If the
Option Length is at least 6, then a ACK Request Source Address
is present.
Packet Identifier
The Packet Identifier field is set to a unique number and is
copied into the Identification field of the DSR Acknowledgement
option when returned by the node receiving the packet over this
hop.
ACK Request Source Address
The address of the node requesting the DSR Acknowledgement.
8. Detailed Operation
8.1. General Packet Processing
8.1.1. Originating a Packet
When originating any packet, a node using DSR routing MUST perform When originating any packet, a node using DSR routing MUST perform
the following sequence of steps: the following sequence of steps:
- Search the node's Route Cache for a route to the address given in - Search the node's Route Cache for a route to the address given in
the IP Destination Address field in the packet's header. the IP Destination Address field in the packet's header.
- If no such route is found in the Route Cache, then perform - If no such route is found in the Route Cache, then perform
Route Discovery for the Destination Address, as described in Route Discovery for the Destination Address, as described in
Section 6.2. Initiating a Route Discovery for this target node Section 8.2. Initiating a Route Discovery for this target node
address results in the node adding a Route Request option in address results in the node adding a Route Request option in
a DSR header in this existing packet, or saving this existing a DSR Options header in this existing packet, or saving this
packet to its Send Buffer and initiating the Route Discovery existing packet to its Send Buffer and initiating the Route
by sending a separate packet containing such a Route Request Discovery by sending a separate packet containing such a Route
option. If the node chooses to initiate the Route Discovery Request option. If the node chooses to initiate the Route
by adding the Route Request option to this existing packet, Discovery by adding the Route Request option to this existing
it will replace the IP Destination Address field with the IP packet, it will replace the IP Destination Address field with the
"limited broadcast" address (255.255.255.255) [3], copying the IP "limited broadcast" address (255.255.255.255) [3], copying the
original IP Destination Address to the Target Address field of original IP Destination Address to the Target Address field of
the new Route Request option added to the packet, as described in the new Route Request option added to the packet, as described in
Section 6.2.1. Section 8.2.1.
- If the packet now does not contain a Route Request option, - If the packet now does not contain a Route Request option,
then this node must have a route to the Destination Address then this node must have a route to the Destination Address
of the packet; if the node has more than one route to this of the packet; if the node has more than one route to this
Destination Address, the node selects one to use for this packet. Destination Address, the node selects one to use for this packet.
If the length of this route is greater than 1 hop, or if the If the length of this route is greater than 1 hop, or if the
node determines to request a DSR network-layer acknowledgment node determines to request a DSR network-layer acknowledgement
from the first-hop node in that route, then insert a DSR header from the first-hop node in that route, then insert a DSR Options
into the packet, as described in Section 6.1.2, and insert a DSR header into the packet, as described in Section 8.1.2, and insert
Source Route option, as described in Section 6.1.3. The source a DSR Source Route option, as described in Section 8.1.3. The
route in the packet is initialized from the selected route to the source route in the packet is initialized from the selected route
Destination Address of the packet. to the Destination Address of the packet.
- Transmit the packet to the first-hop node address given in - Transmit the packet to the first-hop node address given in
selected source route, using Route Maintenance to determine the selected source route, using Route Maintenance to determine the
reachability of the next hop, as described in Section 6.3. reachability of the next hop, as described in Section 8.3.
6.1.2. Adding a DSR Header to a Packet 8.1.2. Adding a DSR Options Header to a Packet
A node originating a packet adds a DSR header to the packet, if A node originating a packet adds a DSR Options header to the packet,
necessary, to carry information needed by the routing protocol. A if necessary, to carry information needed by the routing protocol.
packet MUST NOT contain more than one DSR header. A DSR header is A packet MUST NOT contain more than one DSR Options header. A DSR
added to a packet by performing the following sequence of steps Options header is added to a packet by performing the following
(these steps assume that the packet contains no other headers that sequence of steps (these steps assume that the packet contains no
MUST be located in the packet before the DSR header): other headers that MUST be located in the packet before the DSR
Options header):
- Insert a DSR header after the IP header but before any other - Insert a DSR Options header after the IP header but before any
header that may be present. other header that may be present.
- Set the Next Header field of the DSR header to the Protocol - Set the Next Header field of the DSR Options header to the
number field of the packet's IP header. Protocol number field of the packet's IP header.
- Set the Protocol field of the packet's IP header to the Protocol - Set the Protocol field of the packet's IP header to the Protocol
number assigned for a DSR header (TBA???). number assigned for a DSR Options header (TBA???).
6.1.3. Adding a DSR Source Route Option to a Packet 8.1.3. Adding a DSR Source Route Option to a Packet
A node originating a packet adds a DSR Source Route option to the A node originating a packet adds a DSR Source Route option to the
packet, if necessary, in order to carry the source route from this packet, if necessary, in order to carry the source route from this
originating node to the final destination address of the packet. originating node to the final destination address of the packet.
Specifically, the node adding the DSR Source Route option constructs Specifically, the node adding the DSR Source Route option constructs
the DSR Source Route option and modifies the IP packet according to the DSR Source Route option and modifies the IP packet according to
the following sequence of steps: the following sequence of steps:
- The node creates a DSR Source Route option, as described in - The node creates a DSR Source Route option, as described
Section 5.7, and appends it to the DSR header in the packet. in Section 6.7, and appends it to the DSR Options header in
(A DSR header is added, as described in Section 6.1.2, if not the packet. (A DSR Options header is added, as described in
already present.) Section 8.1.2, if not already present.)
- The number of Address[i] fields to include in the DSR Source - The number of Address[i] fields to include in the DSR Source
Route option (n) is the number of intermediate nodes in the Route option (n) is the number of intermediate nodes in the
source route for the packet (i.e., excluding address of the source route for the packet (i.e., excluding address of the
originating node and the final destination address of the originating node and the final destination address of the
packet). The Segments Left field in the DSR Source Route option packet). The Segments Left field in the DSR Source Route option
is initialized equal to n. is initialized equal to n.
- The addresses within the source route for the packet are copied - The addresses within the source route for the packet are copied
into sequential Address[i] fields in the DSR Source Route option, into sequential Address[i] fields in the DSR Source Route option,
skipping to change at page 43, line 5 skipping to change at page 61, line 5
copied from the External bit flagging the first hop in the source copied from the External bit flagging the first hop in the source
route for the packet, as indicated in the Route Cache. route for the packet, as indicated in the Route Cache.
- The Last Hop External (L) bit in the DSR Source Route option is - The Last Hop External (L) bit in the DSR Source Route option is
copied from the External bit flagging the last hop in the source copied from the External bit flagging the last hop in the source
route for the packet, as indicated in the Route Cache. route for the packet, as indicated in the Route Cache.
- The Salvage field in the DSR Source Route option is - The Salvage field in the DSR Source Route option is
initialized to 0. initialized to 0.
6.1.4. Processing a Received Packet 8.1.4. Processing a Received Packet
When a node receives any packet (whether for forwarding, overheard, When a node receives any packet (whether for forwarding, overheard,
or as the final destination of the packet), if that packet contains a or as the final destination of the packet), if that packet contains
DSR header, then that node MUST process any options contained in that a DSR Options header, then that node MUST process any options
DSR header, in the order contained there. Specifically: contained in that DSR Options header, in the order contained there.
Specifically:
- If the DSR header contains a Route Request option, the node - If the DSR Options header contains a Route Request option, the
SHOULD extract the source route from the Route Request and add node SHOULD extract the source route from the Route Request and
this routing information to its Route Cache, subject to the add this routing information to its Route Cache, subject to the
conditions identified in Section 3.3.1. The routing information conditions identified in Section 3.3.1. The routing information
from the Route Request is the sequence of hop addresses from the Route Request is the sequence of hop addresses
initiator, Address[1], Address[2], ..., Address[n] initiator, Address[1], Address[2], ..., Address[n]
where initiator is the value of the Source Address field in where initiator is the value of the Source Address field in
the IP header of the packet carrying the Route Request (the the IP header of the packet carrying the Route Request (the
address of the initiator of the Route Discovery), and each address of the initiator of the Route Discovery), and each
Address[i] is a node through which this Route Request has passed, Address[i] is a node through which this Route Request has passed,
in turn, during this Route Discovery. The value n here is the in turn, during this Route Discovery. The value n here is the
number of addresses recorded in the Route Request option, or number of addresses recorded in the Route Request option, or
(Opt Data Len - 6) / 4. (Opt Data Len - 6) / 4.
After possibly updating the node's Route Cache in response to After possibly updating the node's Route Cache in response to
the routing information in the Route Request option, the node the routing information in the Route Request option, the node
MUST then process the Route Request option as described in MUST then process the Route Request option as described in
Section 6.2.2. Section 8.2.2.
- If the DSR header contains a Route Reply option, the node SHOULD - If the DSR Options header contains a Route Reply option, the node
extract the source route from the Route Reply and add this SHOULD extract the source route from the Route Reply and add this
routing information to its Route Cache, subject to the conditions routing information to its Route Cache, subject to the conditions
identified in Section 3.3.1. The source route from the Route identified in Section 3.3.1. The source route from the Route
Reply is the sequence of hop addresses Reply is the sequence of hop addresses
initiator, Address[1], Address[2], ..., Address[n] initiator, Address[1], Address[2], ..., Address[n]
where initiator is the value of the Destination Address field in where initiator is the value of the Destination Address field in
the IP header of the packet carrying the Route Reply (the address the IP header of the packet carrying the Route Reply (the address
of the initiator of the Route Discovery), and each Address[i] of the initiator of the Route Discovery), and each Address[i]
is a node through which the source route passes, in turn, on is a node through which the source route passes, in turn, on
skipping to change at page 44, line 6 skipping to change at page 62, line 9
set in the Route Reply, the node MUST flag the last hop from set in the Route Reply, the node MUST flag the last hop from
the Route Reply (the link from Address[n-1] to Address[n]) in the Route Reply (the link from Address[n-1] to Address[n]) in
its Route Cache as External. The value n here is the number of its Route Cache as External. The value n here is the number of
addresses in the source route being returned in the Route Reply addresses in the source route being returned in the Route Reply
option, or (Opt Data Len - 1) / 4. option, or (Opt Data Len - 1) / 4.
After possibly updating the node's Route Cache in response to After possibly updating the node's Route Cache in response to
the routing information in the Route Reply option, then if the the routing information in the Route Reply option, then if the
packet's IP Destination Address matches one of this node's IP packet's IP Destination Address matches one of this node's IP
addresses, the node MUST then process the Route Reply option as addresses, the node MUST then process the Route Reply option as
described in Section 6.2.5. described in Section 8.2.5.
- If the DSR header contains a Route Error option, the node MUST - If the DSR Options header contains a Route Error option,
process the Route Error option as described in Section 6.3.5. the node MUST process the Route Error option as described in
Section 8.3.5.
- If the DSR header contains an Acknowledgment Request option, the - If the DSR Options header contains an Acknowledgement Request
node MUST process the Acknowledgment Request option as described option, the node MUST process the Acknowledgement Request option
in Section 6.3.3. as described in Section 8.3.3.
- If the DSR header contains an Acknowledgment option, then subject - If the DSR Options header contains an Acknowledgement option,
to the conditions identified in Section 3.3.1, the node SHOULD then subject to the conditions identified in Section 3.3.1, the
add to its Route Cache the single link from the node identified node SHOULD add to its Route Cache the single link from the node
by the ACK Source Address field to the node identified by the identified by the ACK Source Address field to the node identified
ACK Destination Address field. by the ACK Destination Address field.
After possibly updating the node's Route Cache in response to After possibly updating the node's Route Cache in response to
the routing information in the Acknowledgment option, the node the routing information in the Acknowledgement option, the node
MUST then process the Acknowledgment option as described in MUST then process the Acknowledgement option as described in
Section 6.3.3. Section 8.3.3.
- If the DSR header contains a DSR Source Route option, the node - If the DSR Options header contains a DSR Source Route option, the
SHOULD extract the source route from the DSR Source Route and node SHOULD extract the source route from the DSR Source Route
add this routing information to its Route Cache, subject to the and add this routing information to its Route Cache, subject to
conditions identified in Section 3.3.1. If the value of the the conditions identified in Section 3.3.1. If the value of the
Salvage field in the DSR Source Route option is zero, then the Salvage field in the DSR Source Route option is zero, then the
routing information from the DSR Source Route is the sequence of routing information from the DSR Source Route is the sequence of
hop addresses hop addresses
source, Address[1], Address[2], ..., Address[n], destination source, Address[1], Address[2], ..., Address[n], destination
and otherwise (Salvage is nonzero), the routing information from and otherwise (Salvage is nonzero), the routing information from
the DSR Source Route is the sequence of hop addresses the DSR Source Route is the sequence of hop addresses
Address[1], Address[2], ..., Address[n], destination Address[1], Address[2], ..., Address[n], destination
skipping to change at page 44, line 53 skipping to change at page 63, line 8
original sender of the packet), each Address[i] is the value in original sender of the packet), each Address[i] is the value in
the Address[i] field in the DSR Source Route, and destination is the Address[i] field in the DSR Source Route, and destination is
the value of the Destination Address field in the packet's IP the value of the Destination Address field in the packet's IP
header (the last-hop address of the source route). The value n header (the last-hop address of the source route). The value n
here is the number of addresses in source route in the DSR Source here is the number of addresses in source route in the DSR Source
Route option, or (Opt Data Len - 2) / 4. Route option, or (Opt Data Len - 2) / 4.
After possibly updating the node's Route Cache in response to After possibly updating the node's Route Cache in response to
the routing information in the DSR Source Route option, the node the routing information in the DSR Source Route option, the node
MUST then process the DSR Source Route option as described in MUST then process the DSR Source Route option as described in
Section 6.1.5. Section 8.1.5.
- Any Pad1 or PadN options in the DSR header are ignored. - Any Pad1 or PadN options in the DSR Options header are ignored.
Finally, if the Destination Address in the packet's IP header matches Finally, if the Destination Address in the packet's IP header matches
one of this receiving node's own IP address(es), remove the DSR one of this receiving node's own IP address(es), remove the DSR
header and all the included DSR options in the header, and pass the Options header and all the included DSR options in the header, and
rest of the packet to the network layer. pass the rest of the packet to the network layer.
6.1.5. Processing a Received DSR Source Route Option 8.1.5. Processing a Received DSR Source Route Option
When a node receives a packet containing a DSR Source Route option When a node receives a packet containing a DSR Source Route option
(whether for forwarding, overheard, or as the final destination of (whether for forwarding, overheard, or as the final destination of
the packet), that node SHOULD examine the packet to determine if the packet), that node SHOULD examine the packet to determine if
the receipt of that packet indicates an opportunity for automatic the receipt of that packet indicates an opportunity for automatic
route shortening, as described in Section 3.4.3. Specifically, if route shortening, as described in Section 3.4.3. Specifically, if
this node is not the intended next-hop destination for the packet this node is not the intended next-hop destination for the packet
but is named in the later unexpended portion of the source route in but is named in the later unexpended portion of the source route in
the packet's DSR Source Route option, then this packet indicates an the packet's DSR Source Route option, then this packet indicates an
opportunity for automatic route shortening: the intermediate nodes opportunity for automatic route shortening: the intermediate nodes
skipping to change at page 46, line 27 skipping to change at page 64, line 32
the packet's source route; discarding this initial copy of the the packet's source route; discarding this initial copy of the
packet, which triggered the gratuitous Route Reply, will prevent packet, which triggered the gratuitous Route Reply, will prevent
the duplication of this packet that would otherwise occur. the duplication of this packet that would otherwise occur.
If the packet is not discarded as part of automatic route shortening If the packet is not discarded as part of automatic route shortening
above, then the node MUST process the option according to the above, then the node MUST process the option according to the
following sequence of steps: following sequence of steps:
- If the value of the Segments Left field in the DSR Source Route - If the value of the Segments Left field in the DSR Source Route
option equals 0, then remove the DSR Source Route option from the option equals 0, then remove the DSR Source Route option from the
DSR header. DSR Options header.
- Else, let n equal (Opt Data Len - 2) / 4. This is the number of - Else, let n equal (Opt Data Len - 2) / 4. This is the number of
addresses in the DSR Source Route option. addresses in the DSR Source Route option.
- If the value of the Segments Left field is greater than n, then - If the value of the Segments Left field is greater than n, then
send an ICMP Parameter Problem, Code 0, message [26] to the IP send an ICMP Parameter Problem, Code 0, message [29] to the IP
Source Address, pointing to the Segments Left field, and discard Source Address, pointing to the Segments Left field, and discard
the packet. Do not process the DSR Source Route option further. the packet. Do not process the DSR Source Route option further.
- Else, decrement the value of the Segments Left field by 1. Let i - Else, decrement the value of the Segments Left field by 1. Let i
equal n minus Segments Left. This is the index of the next equal n minus Segments Left. This is the index of the next
address to be visited in the Address vector. address to be visited in the Address vector.
- If Address[i] or the IP Destination Address is a multicast - If Address[i] or the IP Destination Address is a multicast
address, then discard the packet. Do not process the DSR Source address, then discard the packet. Do not process the DSR Source
Route option further. Route option further.
- If the MTU of the link over which this node would transmit - If the MTU of the link over which this node would transmit
the packet to forward it to the node Address[i] is less than the packet to forward it to the node Address[i] is less than
the size of the packet, the node MUST either discard the the size of the packet, the node MUST either discard the
packet and send an ICMP Packet Too Big message to the packet's packet and send an ICMP Packet Too Big message to the packet's
Source Address [26] or fragment it as specified in Section 8. Source Address [29] or fragment it as specified in Section 8.5.
- Forward the packet to the IP address specified in the Address[i] - Forward the packet to the IP address specified in the Address[i]
field of the IP header, following normal IP forwarding field of the IP header, following normal IP forwarding
procedures, including checking and decrementing the Time-to-Live procedures, including checking and decrementing the Time-to-Live
(TTL) field in the packet's IP header [27, 3]. In this (TTL) field in the packet's IP header [30, 3]. In this
forwarding of the packet, the next-hop node (identified by forwarding of the packet, the next-hop node (identified by
Address[i]) MUST be treated as a direct neighbor node: the Address[i]) MUST be treated as a direct neighbor node: the
transmission to that next node MUST be done in a single IP transmission to that next node MUST be done in a single IP
forwarding hop, without Route Discovery and without searching the forwarding hop, without Route Discovery and without searching the
Route Cache. Route Cache.
- In forwarding the packet, perform Route Maintenance for the - In forwarding the packet, perform Route Maintenance for the
next hop of the packet, by verifying that the next-hop node is next hop of the packet, by verifying that the next-hop node is
reachable, as described in Section 6.3. reachable, as described in Section 8.3.
Multicast addresses MUST NOT appear in a DSR Source Route option or Multicast addresses MUST NOT appear in a DSR Source Route option or
in the IP Destination Address field of a packet carrying a DSR Source in the IP Destination Address field of a packet carrying a DSR Source
Route option in a DSR header. Route option in a DSR Options header.
6.2. Route Discovery Processing 8.1.6. Handling an Unknown DSR Option
Nodes implementing DSR MUST handle all options specified in this
document, except those options pertaining to the optional flow
state extension (Section 7). However, further extensions to
DSR may include other option types that may not be understood by
implementations conforming to this version of the DSR specification.
In DSR, Option Type codes encode required behavior for nodes not
implementing that type of option. These behaviors are included in
the most significant three bits of the Option Type.
If the most significant bit of the Option Type is set (that is,
Option Type & 0x80 is nonzero), and this packet does not contain
a Route Request option, a node SHOULD return a Route Error to the
IP Source Address, following the steps described in Section 8.3.4,
except that the Error Type MUST be set to OPTION_NOT_SUPPORTED and
the Unsupported Opt field MUST be set to the Option Type triggering
the Route Error.
Whether or not a Route Error is sent in response to this DSR option,
as described above, the node also MUST examine the next two most
significant bits (that is, Option Type & 0x60):
- When these two bits are zero (that is, Option Type & 0x60 == 0),
a node not implementing processing for that Option Type MUST
use the Opt Data Len field to skip over the option and continue
processing.
- When these two bits are 01 (that is, Option Type & 0x60 == 0x20),
a node not implementing processing for that Option Type MUST use
the Opt Data Len field to remove the option from the packet and
continue processing as if the option had not been included in the
received packet.
- When these two bits are 10 (that is, Option Type & 0x60 == 0x40),
a node not implementing processing for that Option Type MUST set
the most significant bit following the Opt Data Len field; in
addition, the node MUST then ignore the contents of the option
using the Opt Data Len field, and MUST continue processing the
packet.
- Finally, when these two bits are 11 (that is,
Option Type & 0x60 == 0x60), a node not implementing processing
for that Option Type MUST drop the packet.
8.2. Route Discovery Processing
Route Discovery is the mechanism by which a node S wishing to send a Route Discovery is the mechanism by which a node S wishing to send a
packet to a destination node D obtains a source route to D. Route packet to a destination node D obtains a source route to D. Route
Discovery is used only when S attempts to send a packet to D and Discovery is used only when S attempts to send a packet to D and
does not already know a route to D. The node initiating a Route does not already know a route to D. The node initiating a Route
Discovery is known as the "initiator" of the Route Discovery, and the Discovery is known as the "initiator" of the Route Discovery, and the
destination node for which the Route Discovery is initiated is known destination node for which the Route Discovery is initiated is known
as the "target" of the Route Discovery. as the "target" of the Route Discovery.
Route Discovery operates entirely on demand, with a node initiating Route Discovery operates entirely on demand, with a node initiating
Route Discovery based on its own origination of new packets for Route Discovery based on its own origination of new packets for
some destination address to which it does not currently know a some destination address to which it does not currently know a
route. Route Discovery does not depend on any periodic or background route. Route Discovery does not depend on any periodic or background
exchange of routing information or neighbor node detection at any exchange of routing information or neighbor node detection at any
layer in the network protocol stack at any node. layer in the network protocol stack at any node.
The Route Discovery procedure utilizes two types of messages, a Route The Route Discovery procedure utilizes two types of messages, a Route
Request (Section 5.2) and a Route Reply (Section 5.3), to actively Request (Section 6.2) and a Route Reply (Section 6.3), to actively
search the ad hoc network for a route to the desired destination. search the ad hoc network for a route to the desired destination.
These DSR messages MAY be carried in any type of IP packet, through These DSR messages MAY be carried in any type of IP packet, through
use of the DSR header as described in Section 5. use of the DSR Options header as described in Section 6.
Except as discussed in Section 6.3.5, a Route Discovery for a Except as discussed in Section 8.3.5, a Route Discovery for a
destination address SHOULD NOT be initiated unless the initiating destination address SHOULD NOT be initiated unless the initiating
node has a packet in its Send Buffer requiring delivery to that node has a packet in its Send Buffer requiring delivery to that
destination. A Route Discovery for a given target node MUST NOT be destination. A Route Discovery for a given target node MUST NOT be
initiated unless permitted by the rate-limiting information contained initiated unless permitted by the rate-limiting information contained
in the Route Request Table. After each Route Discovery attempt, the in the Route Request Table. After each Route Discovery attempt, the
interval between successive Route Discoveries for this target SHOULD interval between successive Route Discoveries for this target SHOULD
be doubled, up to a maximum of MaxRequestPeriod, until a valid Route be doubled, up to a maximum of MaxRequestPeriod, until a valid Route
Reply is received for this target. Reply is received for this target.
6.2.1. Originating a Route Request 8.2.1. Originating a Route Request
A node initiating a Route Discovery for some target creates and A node initiating a Route Discovery for some target creates and
initializes a Route Request option in a DSR header in some IP packet. initializes a Route Request option in a DSR Options header in some
This MAY be a separate IP packet, used only to carry this Route IP packet. This MAY be a separate IP packet, used only to carry
Request option, or the node MAY include the Route Request option this Route Request option, or the node MAY include the Route Request
in some existing packet that it needs to send to the target node option in some existing packet that it needs to send to the target
(e.g., the IP packet originated by this node, that caused the node to node (e.g., the IP packet originated by this node, that caused the
attempt Route Discovery for the destination address of the packet). node to attempt Route Discovery for the destination address of the
The Route Request option MUST be included in a DSR header in the packet). The Route Request option MUST be included in a DSR Options
packet. To initialize the Route Request option, the node performs header in the packet. To initialize the Route Request option, the
the following sequence of steps: node performs the following sequence of steps:
- The Option Type in the option MUST be set to the value 2. - The Option Type in the option MUST be set to the value 2.
- The Opt Data Len field in the option MUST be set to the value 6. - The Opt Data Len field in the option MUST be set to the value 6.
The total size of the Route Request option when initiated The total size of the Route Request option when initiated
is 8 octets; the Opt Data Len field excludes the size of the is 8 octets; the Opt Data Len field excludes the size of the
Option Type and Opt Data Len fields themselves. Option Type and Opt Data Len fields themselves.
- The Identification field in the option MUST be set to a new - The Identification field in the option MUST be set to a new
value, different from that used for other Route Requests recently value, different from that used for other Route Requests recently
skipping to change at page 50, line 5 skipping to change at page 69, line 5
next attempt at a Route Discovery for that target node. next attempt at a Route Discovery for that target node.
A node MUST use these values to implement a back-off algorithm to A node MUST use these values to implement a back-off algorithm to
limit the rate at which this node initiates new Route Discoveries limit the rate at which this node initiates new Route Discoveries
for the same target address. In particular, until a valid Route for the same target address. In particular, until a valid Route
Reply is received for this target node address, the timeout Reply is received for this target node address, the timeout
between consecutive Route Discovery initiations for this target between consecutive Route Discovery initiations for this target
node with the same hop limit SHOULD increase by doubling the node with the same hop limit SHOULD increase by doubling the
timeout value on each new initiation. timeout value on each new initiation.
The behavior of a node processing a packet containing DSR header The behavior of a node processing a packet containing DSR Options
with both a DSR Source Route option and a Route Request option is header with both a DSR Source Route option and a Route Request option
unspecified. Packets SHOULD NOT contain both a DSR Source Route is unspecified. Packets SHOULD NOT contain both a DSR Source Route
option and a Route Request option. option and a Route Request option.
Packets containing a Route Request option SHOULD NOT include Packets containing a Route Request option SHOULD NOT include
an Acknowledgment Request option, SHOULD NOT expect link-layer an Acknowledgement Request option, SHOULD NOT expect link-layer
acknowledgment or passive acknowledgment, and SHOULD NOT be acknowledgement or passive acknowledgement, and SHOULD NOT be
retransmitted. The retransmission of packets containing a Route retransmitted. The retransmission of packets containing a Route
Request option is controlled solely by the logic described in this Request option is controlled solely by the logic described in this
section. section.
6.2.2. Processing a Received Route Request Option 8.2.2. Processing a Received Route Request Option
When a node receives a packet containing a Route Request option, that When a node receives a packet containing a Route Request option, that
node MUST process the option according to the following sequence of node MUST process the option according to the following sequence of
steps: steps:
- If the Target Address field in the Route Request matches this - If the Target Address field in the Route Request matches this
node's own IP address, then the node SHOULD return a Route Reply node's own IP address, then the node SHOULD return a Route Reply
to the initiator of this Route Request (the Source Address in the to the initiator of this Route Request (the Source Address in the
IP header of the packet), as described in Section 6.2.4. The IP header of the packet), as described in Section 8.2.4. The
source route for this Reply is the sequence of hop addresses source route for this Reply is the sequence of hop addresses
initiator, Address[1], Address[2], ..., Address[n], target initiator, Address[1], Address[2], ..., Address[n], target
where initiator is the address of the initiator of this where initiator is the address of the initiator of this
Route Request, each Address[i] is an address from the Route Route Request, each Address[i] is an address from the Route
Request, and target is the target of the Route Request (the Request, and target is the target of the Route Request (the
Target Address field in the Route Request). The value n here Target Address field in the Route Request). The value n here
is the number of addresses recorded in the Route Request, or is the number of addresses recorded in the Route Request, or
(Opt Data Len - 6) / 4. (Opt Data Len - 6) / 4.
skipping to change at page 50, line 52 skipping to change at page 69, line 52
node MUST NOT process the Route Request option further and MUST node MUST NOT process the Route Request option further and MUST
NOT retransmit the Route Request to propagate it to other nodes NOT retransmit the Route Request to propagate it to other nodes
as part of the Route Discovery. as part of the Route Discovery.
- Else, the node MUST examine the route recorded in the Route - Else, the node MUST examine the route recorded in the Route
Request option (the IP Source Address field and the sequence of Request option (the IP Source Address field and the sequence of
Address[i] fields) to determine if this node's own IP address Address[i] fields) to determine if this node's own IP address
already appears in this list of addresses. If so, the node MUST already appears in this list of addresses. If so, the node MUST
discard the entire packet carrying the Route Request option. discard the entire packet carrying the Route Request option.
- Else, if the Route Request through a network interface that - Else, if the Route Request was received through a network
requires physically bidirectional links for unicast transmission, interface that requires physically bidirectional links for
the node MUST check if the Request was last forwarded by a node unicast transmission, the node MUST check if the Request was last
on its blacklist. If such an entry is found, and the state of forwarded by a node on its blacklist. If such an entry is found,
the unidirectional link is "probable," then the Request MUST be and the state of the unidirectional link is "probable", then the
silently discarded. Request MUST be silently discarded.
- Else, if the Route Request through a network interface that - Else, if the Route Request was received through a network
requires physically bidirectional links for unicast transmission, interface that requires physically bidirectional links for
the node MUST check if the Request was last forwarded by a node unicast transmission, the node MUST check if the Request was last
on its blacklist. If such an entry is found, and the state of forwarded by a node on its blacklist. If such an entry is found,
the unidirectional link is "questionable," then the node MUST and the state of the unidirectional link is "questionable",
create and unicast a Route Request packet to that previous node, then the node MUST create and unicast a Route Request packet to
setting the IP Time-To-Live (TTL) to 1 to prevent the Request that previous node, setting the IP Time-To-Live (TTL) to 1 to
from being propagated. If the node receives a Route Reply in prevent the Request from being propagated. If the node receives
response to the new Request, it MUST remove the blacklist entry a Route Reply in response to the new Request, it MUST remove the
for that node, and SHOULD continue processing. If the node does blacklist entry for that node, and SHOULD continue processing.
not receive a Reply within some reasonable amount of time, MUST If the node does not receive a Route Reply within some reasonable
silently discard the Route Request packet. amount of time, MUST silently discard the Route Request packet.
- Else, the node MUST search its Route Request Table for an entry - Else, the node MUST search its Route Request Table for an entry
for the initiator of this Route Request (the IP Source Address for the initiator of this Route Request (the IP Source Address
field). If such an entry is found in the table, the node MUST field). If such an entry is found in the table, the node MUST
search the cache of Identification values of recently received search the cache of Identification values of recently received
Route Requests in that table entry, to determine if an entry Route Requests in that table entry, to determine if an entry
is present in the cache matching the Identification value is present in the cache matching the Identification value
and target node address in this Route Request. If such an and target node address in this Route Request. If such an
(Identification, target address) entry is found in this cache in (Identification, target address) entry is found in this cache in
this entry in the Route Request Table, then the node MUST discard this entry in the Route Request Table, then the node MUST discard
skipping to change at page 51, line 52 skipping to change at page 70, line 52
o Append this node's own IP address to the list of Address[i] o Append this node's own IP address to the list of Address[i]
values in the Route Request, and increase the value of the values in the Route Request, and increase the value of the
Opt Data Len field in the Route Request by 4 (the size of an Opt Data Len field in the Route Request by 4 (the size of an
IP address). IP address).
o This node SHOULD search its own Route Cache for a route o This node SHOULD search its own Route Cache for a route
(from itself, as if it were the source of a packet) to the (from itself, as if it were the source of a packet) to the
target of this Route Request. If such a route is found in target of this Route Request. If such a route is found in
its Route Cache, then this node SHOULD follow the procedure its Route Cache, then this node SHOULD follow the procedure
outlined in Section 6.2.3 to return a "cached Route Reply" outlined in Section 8.2.3 to return a "cached Route Reply"
to the initiator of this Route Request, if permitted by the to the initiator of this Route Request, if permitted by the
restrictions specified there. restrictions specified there.
o If the node does not return a cached Route Reply, then this o If the node does not return a cached Route Reply, then this
node SHOULD link-layer re-broadcast this copy of the packet, node SHOULD link-layer re-broadcast this copy of the packet,
with a short jitter delay before the broadcast is sent. The with a short jitter delay before the broadcast is sent. The
jitter period SHOULD be chosen as a random period, uniformly jitter period SHOULD be chosen as a random period, uniformly
distributed between 0 and BroadcastJitter. distributed between 0 and BroadcastJitter.
6.2.3. Generating a Route Reply using the Route Cache 8.2.3. Generating a Route Reply using the Route Cache
As described in Section 3.3.2, it is possible for a node processing a As described in Section 3.3.2, it is possible for a node processing a
received Route Request to avoid propagating the Route Request further received Route Request to avoid propagating the Route Request further
toward the target of the Request, if this node has in its Route Cache toward the target of the Request, if this node has in its Route Cache
a route from itself to this target. Such a Route Reply generated by a route from itself to this target. Such a Route Reply generated by
a node from its own cached route to the target of a Route Request is a node from its own cached route to the target of a Route Request is
called a "cached Route Reply", and this mechanism can greatly reduce called a "cached Route Reply", and this mechanism can greatly reduce
the overall overhead of Route Discovery on the network by reducing the overall overhead of Route Discovery on the network by reducing
the flood of Route Requests. The general processing of a received the flood of Route Requests. The general processing of a received
Route Request is described in Section 6.2.2; this section specifies Route Request is described in Section 8.2.2; this section specifies
the additional requirements that MUST be met before a cached Route the additional requirements that MUST be met before a cached Route
Reply may be generated and returned and specifies the procedure for Reply may be generated and returned and specifies the procedure for
returning such a cached Route Reply. returning such a cached Route Reply.
While processing a received Route Request, for a node to possibly While processing a received Route Request, for a node to possibly
return a cached Route Reply, it MUST have in its Route Cache a route return a cached Route Reply, it MUST have in its Route Cache a route
from itself to the target of this Route Request. However, before from itself to the target of this Route Request. However, before
generating a cached Route Reply for this Route Request, the node MUST generating a cached Route Reply for this Route Request, the node MUST
verify that there are no duplicate addresses listed in the route verify that there are no duplicate addresses listed in the route
accumulated in the Route Request together with the route from this accumulated in the Route Request together with the route from this
skipping to change at page 52, line 48 skipping to change at page 71, line 48
- The Address[i] fields in the Route Request, and - The Address[i] fields in the Route Request, and
- The nodes listed in the route obtained from this node's Route - The nodes listed in the route obtained from this node's Route
Cache, excluding the address of this node itself (this node Cache, excluding the address of this node itself (this node
itself is the common point between the route accumulated in the itself is the common point between the route accumulated in the
Route Request and the route obtained from the Route Cache). Route Request and the route obtained from the Route Cache).
If any duplicates exist among these addresses, then the node MUST NOT If any duplicates exist among these addresses, then the node MUST NOT
send a cached Route Reply. The node SHOULD continue to process the send a cached Route Reply. The node SHOULD continue to process the
Route Request as described in Section 6.2.2. Route Request as described in Section 8.2.2.
If the Route Request and the route from the Route Cache meet the If the Route Request and the route from the Route Cache meet the
restriction above, then the node SHOULD construct and return a cached restriction above, then the node SHOULD construct and return a cached
Route Reply as follows: Route Reply as follows:
- The source route for this reply is the sequence of hop addresses - The source route for this reply is the sequence of hop addresses
initiator, Address[1], Address[2], ..., Address[n], c-route initiator, Address[1], Address[2], ..., Address[n], c-route
where initiator is the address of the initiator of this Route where initiator is the address of the initiator of this Route
Request, each Address[i] is an address from the Route Request, Request, each Address[i] is an address from the Route Request,
and c-route is the sequence of hop addresses in the source route and c-route is the sequence of hop addresses in the source route
to this target node, obtained from the node's Route Cache. In to this target node, obtained from the node's Route Cache. In
appending this cached route to the source route for the reply, appending this cached route to the source route for the reply,
the address of this node itself MUST be excluded, since it is the address of this node itself MUST be excluded, since it is
already listed as Address[n]. already listed as Address[n].
- Send a Route Reply to the initiator of the Route Request, using - Send a Route Reply to the initiator of the Route Request, using
the procedure defined in Section 6.2.4. The initiator of the the procedure defined in Section 8.2.4. The initiator of the
Route Request is indicated in the Source Address field in the Route Request is indicated in the Source Address field in the
packet's IP header. packet's IP header.
If the node returns a cached Route Reply as described above, then If the node returns a cached Route Reply as described above,
the node MUST NOT propagate the Route Request further (i.e., the then the node MUST NOT propagate the Route Request further (i.e.,
node MUST NOT rebroadcast the Route Request). In this case, instead, the node MUST NOT rebroadcast the Route Request). In this case,
if the packet contains no other DSR options and contains no payload instead, if the packet contains no other DSR options and contains
after the DSR header (e.g., the Route Request is not piggybacked no payload after the DSR Options header (e.g., the Route Request is
on a TCP or UDP packet), then the node SHOULD simply discard the not piggybacked on a TCP or UDP packet), then the node SHOULD simply
packet. Otherwise (if the packet contains other DSR options or discard the packet. Otherwise (if the packet contains other DSR
contains any payload after the DSR header), the node SHOULD forward options or contains any payload after the DSR Options header), the
the packet along the cached route to the target of the Route Request. node SHOULD forward the packet along the cached route to the target
Specifically, if the node does so, it MUST use the following of the Route Request. Specifically, if the node does so, it MUST use
steps: the following steps:
- Copy the Target Address from the Route Request option in the - Copy the Target Address from the Route Request option in the DSR
DSR header to the Destination Address field in the packet's IP Options header to the Destination Address field in the packet's
header. IP header.
- Remove the Route Request option from the DSR header in the - Remove the Route Request option from the DSR Options header in
packet, and add a DSR Source Route option to the packet's DSR the packet, and add a DSR Source Route option to the packet's DSR
header. Options header.
- In the DSR Source Route option, set the Address[i] fields - In the DSR Source Route option, set the Address[i] fields
to represent the source route found in this node's Route to represent the source route found in this node's Route
Cache to the original target of the Route Discovery (the Cache to the original target of the Route Discovery (the
new IP Destination Address of the packet). Specifically, new IP Destination Address of the packet). Specifically,
the node copies the hop addresses of the source route into the node copies the hop addresses of the source route into
sequential Address[i] fields in the DSR Source Route option, sequential Address[i] fields in the DSR Source Route option,
for i = 1, 2, ..., n. Address[1] here is the address of this for i = 1, 2, ..., n. Address[1] here is the address of this
node itself (the first address in the source route found from node itself (the first address in the source route found from
this node to the original target of the Route Discovery). The this node to the original target of the Route Discovery). The
skipping to change at page 54, line 29 skipping to change at page 73, line 29
a nonzero value, nodes forwarding or overhearing this packet will a nonzero value, nodes forwarding or overhearing this packet will
not consider a link to exist between the IP Source Address of the not consider a link to exist between the IP Source Address of the
packet and the Address[1] address in the DSR Source Route option packet and the Address[1] address in the DSR Source Route option
(e.g., they will not attempt to add this to their Route Cache as (e.g., they will not attempt to add this to their Route Cache as
a link). By choosing MAX_SALVAGE_COUNT as the nonzero value to a link). By choosing MAX_SALVAGE_COUNT as the nonzero value to
which the node initializes this field, nodes furthermore will not which the node initializes this field, nodes furthermore will not
attempt to salvage this packet. attempt to salvage this packet.
- Transmit the packet to the next-hop node on the new source route - Transmit the packet to the next-hop node on the new source route
in the packet, using the forwarding procedure described in in the packet, using the forwarding procedure described in
Section 6.1.5. Section 8.1.5.
6.2.4. Originating a Route Reply 8.2.4. Originating a Route Reply
A node originates a Route Reply in order to reply to a received and A node originates a Route Reply in order to reply to a received and
processed Route Request, according to the procedures described in processed Route Request, according to the procedures described in
Sections 6.2.2 and 6.2.3. The Route Reply is returned in a Route Sections 8.2.2 and 8.2.3. The Route Reply is returned in a Route
Reply option (Section 5.3). The Route Reply option MAY be returned Reply option (Section 6.3). The Route Reply option MAY be returned
to the initiator of the Route Request in a separate IP packet, used to the initiator of the Route Request in a separate IP packet, used
only to carry this Route Reply option, or it MAY be included in any only to carry this Route Reply option, or it MAY be included in any
other IP packet being sent to this address. other IP packet being sent to this address.
The Route Reply option MUST be included in a DSR header in the packet The Route Reply option MUST be included in a DSR Options header in
returned to the initiator. To initialize the Route Reply option, the the packet returned to the initiator. To initialize the Route Reply
node performs the following sequence of steps: option, the node performs the following sequence of steps:
- The Option Type in the option MUST be set to the value 3. - The Option Type in the option MUST be set to the value 3.
- The Opt Data Len field in the option MUST be set to the value - The Opt Data Len field in the option MUST be set to the value
(n * 4) + 3, where n is the number of addresses in the source (n * 4) + 3, where n is the number of addresses in the source
route being returned (excluding the Route Discovery initiator route being returned (excluding the Route Discovery initiator
node's address). node's address).
- The Last Hop External (L) bit in the option MUST be - The Last Hop External (L) bit in the option MUST be
initialized to 0. initialized to 0.
skipping to change at page 55, line 34 skipping to change at page 74, line 34
After creating and initializing the Route Reply option and the IP After creating and initializing the Route Reply option and the IP
packet containing it, send the Route Reply. In sending the Route packet containing it, send the Route Reply. In sending the Route
Reply from this node (but not from nodes forwarding the Route Reply), Reply from this node (but not from nodes forwarding the Route Reply),
this node SHOULD delay the Reply by a small jitter period chosen this node SHOULD delay the Reply by a small jitter period chosen
randomly between 0 and BroadcastJitter. randomly between 0 and BroadcastJitter.
When returning any Route Reply in the case in which the MAC protocol When returning any Route Reply in the case in which the MAC protocol
in use in the network is not capable of transmitting unicast packets in use in the network is not capable of transmitting unicast packets
over unidirectional links, the source route used for routing the over unidirectional links, the source route used for routing the
Route Reply packet MUST be obtained by reversing the sequence Route Reply packet MUST be obtained by reversing the sequence of
of hops in the Route Request packet (the source route that is hops in the Route Request packet (the source route that is then
then returned in the Route Reply). This restriction on returning returned in the Route Reply). This restriction on returning a Route
a Route Reply enables the Route Reply to test this sequence of Reply enables the Route Reply to test this sequence of hops for
hops for bidirectionality, preventing the Route Reply from being bidirectionality, preventing the Route Reply from being received by
received by the initiator of the Route Discovery unless each of the initiator of the Route Discovery unless each of the hops over
the hops over which the Route Reply is returned (and thus each which the Route Reply is returned (and thus each of the hops in the
of the hops in the source route being returned in the Reply) is source route being returned in the Reply) is bidirectional.
bidirectional.
If sending a Route Reply to the initiator of the Route Request If sending a Route Reply to the initiator of the Route Request
requires performing a Route Discovery, the Route Reply Option MUST requires performing a Route Discovery, the Route Reply option MUST
be piggybacked on the packet that contains the Route Request. This be piggybacked on the packet that contains the Route Request. This
piggybacking prevents a loop wherein the target of the new Route piggybacking prevents a loop wherein the target of the new Route
Request (which was itself the initiator of the original Route Request (which was itself the initiator of the original Route
Request) must do another Route Request in order to return its Request) must do another Route Request in order to return its
Route Reply. Route Reply.
If sending the Route Reply to the initiator of the Route Request If sending the Route Reply to the initiator of the Route Request
does not require performing a Route Discovery, a node SHOULD send a does not require performing a Route Discovery, a node SHOULD send a
unicast Route Reply in response to every Route Request it receives unicast Route Reply in response to every Route Request it receives
for which it is the target node. for which it is the target node.
6.2.5. Processing a Received Route Reply Option 8.2.5. Processing a Received Route Reply Option
Section 6.1.4 describes the general processing for a received packet, Section 8.1.4 describes the general processing for a received packet,
including the addition of routing information from options in the including the addition of routing information from options in the
packet's DSR header to the receiving node's Route Cache. packet's DSR Options header to the receiving node's Route Cache.
If the received packet contains a Route Reply, no additional special If the received packet contains a Route Reply, no additional special
processing of the Route Reply option is required beyond what is processing of the Route Reply option is required beyond what is
described there. As described in Section 4.1 anytime a node adds described there. As described in Section 4.1 anytime a node adds
new information to its Route Cache (including the information added new information to its Route Cache (including the information added
from this Route Reply option), the node SHOULD check each packet in from this Route Reply option), the node SHOULD check each packet in
its own Send Buffer (Section 4.2) to determine whether a route to its own Send Buffer (Section 4.2) to determine whether a route to
that packet's IP Destination Address now exists in the node's Route that packet's IP Destination Address now exists in the node's Route
Cache (including the information just added to the Cache). If so, Cache (including the information just added to the Cache). If so,
the packet SHOULD then be sent using that route and removed from the the packet SHOULD then be sent using that route and removed from the
Send Buffer. This general procedure handles all processing required Send Buffer. This general procedure handles all processing required
for a received Route Reply option. for a received Route Reply option.
When a MAC protocol requires bidirectional links for unicast When a MAC protocol requires bidirectional links for unicast
transmission, a unidirectional link may be discovered by the transmission, a unidirectional link may be discovered by the
propagation of the Route Request. When the Route Reply is sent over propagation of the Route Request. When the Route Reply is sent over
the reverse path, a forwarding node may discover that the next-hop is the reverse path, a forwarding node may discover that the next-hop is
unreachable. In this case, it MUST add the next-hop address to its unreachable. In this case, it MUST add the next-hop address to its
blacklist. blacklist.
6.3. Route Maintenance Processing 8.3. Route Maintenance Processing
Route Maintenance is the mechanism by which a source node S is able Route Maintenance is the mechanism by which a source node S is able
to detect, while using a source route to some destination node D, to detect, while using a source route to some destination node D,
if the network topology has changed such that it can no longer use 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 its route to D because a link along the route no longer works. When
Route Maintenance indicates that a source route is broken, S can Route Maintenance indicates that a source route is broken, S can
attempt to use any other route it happens to know to D, or can invoke 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 Route Discovery again to find a new route for subsequent packets
to D. Route Maintenance for this route is used only when S is to D. Route Maintenance for this route is used only when S is
actually sending packets to D. actually sending packets to D.
Specifically, when forwarding a packet, a node MUST attempt Specifically, when forwarding a packet, a node MUST attempt
to confirm the reachability of the next-hop node, unless such to confirm the reachability of the next-hop node, unless such
confirmation had been received in the last MaintHoldoffTime. confirmation had been received in the last MaintHoldoffTime.
Individual implementations MAY choose to bypass such confirmation Individual implementations MAY choose to bypass such confirmation
for some limited number of packets, as long as those packets for some limited number of packets, as long as those packets all
all fall within MaintHoldoffTime within the last confirmation. fall within MaintHoldoffTime within the last confirmation. If no
If no confirmation is received after the retransmission of confirmation is received after the retransmission of MaxMaintRexmt
MaxMaintRexmt acknowledgment requests, after the initial transmission acknowledgement requests, after the initial transmission of the
of the packet, and conceptually including all retransmissions packet, and conceptually including all retransmissions provided
provided by the MAC layer, the node determines that the link by the MAC layer, the node determines that the link for this
for this next-hop node of the source route is "broken". This next-hop node of the source route is "broken". This confirmation
confirmation from the next-hop node for Route Maintenance can be from the next-hop node for Route Maintenance can be implemented
implemented using a link-layer acknowledgment (Section 6.3.1), using a link-layer acknowledgement (Section 8.3.1), using a
using a "passive acknowledgment" (Section 6.3.2), or using a "passive acknowledgement" (Section 8.3.2), or using a network-layer
network-layer acknowledgment (Section 6.3.3); the particular strategy acknowledgement (Section 8.3.3); the particular strategy for
for retransmission timing depends on the type of acknowledgment retransmission timing depends on the type of acknowledgement
mechanism used. When passive acknowledgments are being used, each mechanism used. When passive acknowledgements are being used, each
retransmitted acknowledgment request SHOULD be explicit software retransmitted acknowledgement request SHOULD be explicit software
acknowledgment requests. If no acknowledgment is received after acknowledgement requests. If no acknowledgement is received after
MaxMaintRexmt retransmissions (if necessary), the node SHOULD MaxMaintRexmt retransmissions (if necessary), the node SHOULD
originate a Route Error to the original sender of the packet, as originate a Route Error to the original sender of the packet, as
described in Section 6.3.4. described in Section 8.3.4.
In deciding whether or not to send a Route Error in response to In deciding whether or not to send a Route Error in response to
attempting to forward a packet from some sender over a broken link, attempting to forward a packet from some sender over a broken link,
a node MUST limit the number of consecutive packets from a single a node MUST limit the number of consecutive packets from a single
sender that the node attempts to forward over this same broken sender that the node attempts to forward over this same broken
link for which the node chooses not to return a Route Error; this link for which the node chooses not to return a Route Error; this
requirement MAY be satisfied by returning a Route Error for each requirement MAY be satisfied by returning a Route Error for each
packet that the node attempts to forward over a broken link. packet that the node attempts to forward over a broken link.
6.3.1. Using Link-Layer Acknowledgments 8.3.1. Using Link-Layer Acknowledgements
If the MAC protocol in use provides feedback as to the successful If the MAC protocol in use provides feedback as to the successful
delivery of a data packet (such as is provided by the link-layer delivery of a data packet (such as is provided by the link-layer
acknowledgment frame defined by IEEE 802.11 [11]), then the use acknowledgement frame defined by IEEE 802.11 [13]), then the use
of the DSR Acknowledgment Request and Acknowledgment options of the DSR Acknowledgement Request and Acknowledgement options
is not necessary. If such link-layer feedback is available, it is not necessary. If such link-layer feedback is available, it
SHOULD be used instead of any other acknowledgment mechanism for SHOULD be used instead of any other acknowledgement mechanism
Route Maintenance, and the node SHOULD NOT use either passive for Route Maintenance, and the node SHOULD NOT use either passive
acknowledgments or network-layer acknowledgments for Route acknowledgements or network-layer acknowledgements for Route
Maintenance. Maintenance.
When using link-layer acknowledgments for Route Maintenance, the When using link-layer acknowledgements for Route Maintenance, the
retransmission timing and the timing at which retransmission attempts retransmission timing and the timing at which retransmission attempts
are scheduled are generally controlled by the particular link layer are scheduled are generally controlled by the particular link layer
implementation in use in the network. For example, in IEEE 802.11, implementation in use in the network. For example, in IEEE 802.11,
the link-layer acknowledgment is returned after the data packet as the link-layer acknowledgement is returned after the data packet as
a part of the basic access method of of the IEEE 802.11 Distributed a part of the basic access method of of the IEEE 802.11 Distributed
Coordination Function (DCF) MAC protocol; the time at which the Coordination Function (DCF) MAC protocol; the time at which the
acknowledgment is expected to arrive and the time at which the next acknowledgement is expected to arrive and the time at which the next
retransmission attempt (if necessary) will occur are controlled by retransmission attempt (if necessary) will occur are controlled by
the MAC protocol implementation. the MAC protocol implementation.
When a node receives a link-layer acknowledgment for any packet in When a node receives a link-layer acknowledgement for any packet in
its Maintenance Buffer, that node SHOULD remove that packet, as well its Maintenance Buffer, that node SHOULD remove that packet, as well
as any other packets in its Maintenance Buffer with the same next-hop as any other packets in its Maintenance Buffer with the same next-hop
destination, from its Maintenance Buffer. destination, from its Maintenance Buffer.
6.3.2. Using Passive Acknowledgments 8.3.2. Using Passive Acknowledgements
When link-layer acknowledgments are not available, but passive When link-layer acknowledgements are not available, but passive
acknowledgments [16] are available, passive acknowledgments SHOULD be acknowledgements [18] are available, passive acknowledgements SHOULD
used for Route Maintenance when originating or forwarding a packet be used for Route Maintenance when originating or forwarding a packet
along any hop other than the last hop (the hop leading to the IP along any hop other than the last hop (the hop leading to the IP
Destination Address node of the packet). In particular, passive Destination Address node of the packet). In particular, passive
acknowledgments SHOULD be used for Route Maintenance in such cases if acknowledgements SHOULD be used for Route Maintenance in such cases
the node can place its network interface into "promiscuous" receive if the node can place its network interface into "promiscuous"
mode, and network links used for data packets generally operate receive mode, and network links used for data packets generally
bidirectionally. operate bidirectionally.
A node MUST NOT attempt to use passive acknowledgments for Route A node MUST NOT attempt to use passive acknowledgements for Route
Maintenance for a packet originated or forwarded over its last hop Maintenance for a packet originated or forwarded over its last hop
(the hop leading to the IP Destination Address node of the packet), (the hop leading to the IP Destination Address node of the packet),
since the receiving node will not be forwarding the packet and thus since the receiving node will not be forwarding the packet and thus
no passive acknowledgment will be available to be heard by this node. no passive acknowledgement will be available to be heard by this
Beyond this restriction, a node MAY utilize a variety of strategies node. Beyond this restriction, a node MAY utilize a variety of
in using passive acknowledgments for Route Maintenance of a packet strategies in using passive acknowledgements for Route Maintenance of
that it originates or forwards. For example, the following two a packet that it originates or forwards. For example, the following
strategies are possible: two strategies are possible:
- Each time a node receives a packet to be forwarded to a node - Each time a node receives a packet to be forwarded to a node
other than the final destination (the IP Destination Address of other than the final destination (the IP Destination Address
the packet), that node sends the original transmission of that of the packet), that node sends the original transmission of
packet without requesting a network-layer acknowledgment for it. that packet without requesting a network-layer acknowledgement
If no passive acknowledgment is received within PassiveAckTimeout for it. If no passive acknowledgement is received within
after this transmission, the node retransmits the packet, again PassiveAckTimeout after this transmission, the node retransmits
without requesting a network-layer acknowledgment for it; the the packet, again without requesting a network-layer
same PassiveAckTimeout timeout value is used for each such acknowledgement for it; the same PassiveAckTimeout timeout value
attempt. If no acknowledgment has been received after a total is used for each such attempt. If no acknowledgement has been
of TryPassiveAcks retransmissions of the packet, network-layer received after a total of TryPassiveAcks retransmissions of
acknowledgments (as described in Section 6.3.3) are used for all the packet, network-layer acknowledgements (as described in
remaining attempts for that packet. Section 8.3.3) are used for all remaining attempts for that
packet.
- Each node keeps a table of possible next-hop destination nodes, - Each node maintains a table of possible next-hop destination
noting whether or not passive acknowledgments can typically nodes, noting whether or not passive acknowledgements can
be expected from transmission to that node, and the expected typically be expected from transmission to that node, and the
latency and jitter of a passive acknowledgment from that node. expected latency and jitter of a passive acknowledgement from
Each time a node receives a packet to be forwarded to a node that node. Each time a node receives a packet to be forwarded
other than the IP Destination Address, the node checks its table to a node other than the IP Destination Address, the node checks
of next-hop destination nodes to determine whether to use a its table of next-hop destination nodes to determine whether to
passive acknowledgment or a network-layer acknowledgment for use a passive acknowledgement or a network-layer acknowledgement
that transmission to that node. The timeout for this packet for that transmission to that node. The timeout for this packet
can also be derived from this table. A node using this method can also be derived from this table. A node using this method
SHOULD prefer using passive acknowledgments to network-layer SHOULD prefer using passive acknowledgements to network-layer
acknowledgments. acknowledgements.
In using passive acknowledgments for a packet that it originates or In using passive acknowledgements for a packet that it originates or
forwards, a node considers the later receipt of a new packet (e.g., forwards, a node considers the later receipt of a new packet (e.g.,
with promiscuous receive mode enabled on its network interface) to be with promiscuous receive mode enabled on its network interface) to be
an acknowledgment of this first packet if both of the following two an acknowledgement of this first packet if both of the following two
tests succeed: tests succeed:
- The Source Address, Destination Address, Protocol, - The Source Address, Destination Address, Protocol,
Identification, and Fragment Offset fields in the IP header Identification, and Fragment Offset fields in the IP header
of the two packets MUST match [27], and of the two packets MUST match [30], and
- If either packet contains a DSR Source Route header, both packets - If either packet contains a DSR Source Route header, both packets
MUST contain one, and the value in the Segments Left field in the MUST contain one, and the value in the Segments Left field in the
DSR Source Route header of the new packet MUST be less than that DSR Source Route header of the new packet MUST be less than that
in the first packet. in the first packet.
When a node hears such a passive acknowledgment for any packet in its When a node hears such a passive acknowledgement for any packet in
Maintenance Buffer, that node SHOULD remove that packet, as well as its Maintenance Buffer, that node SHOULD remove that packet, as well
any other packets in its Maintenance Buffer with the same next-hop as any other packets in its Maintenance Buffer with the same next-hop
destination, from its Maintenance Buffer. destination, from its Maintenance Buffer.
6.3.3. Using Network-Layer Acknowledgments 8.3.3. Using Network-Layer Acknowledgements
When a node originates or forwards a packet and has no other When a node originates or forwards a packet and has no other
mechanism of acknowledgment available to determine reachability of mechanism of acknowledgement available to determine reachability
the next-hop node in the source route for Route Maintenance, that of the next-hop node in the source route for Route Maintenance,
node SHOULD request a network-layer acknowledgment from that next-hop that node SHOULD request a network-layer acknowledgement from that
node. To do so, the node inserts an Acknowledgment Request option next-hop node. To do so, the node inserts an Acknowledgement Request
in the DSR header in the packet. The Identification field in that option in the DSR Options header in the packet. The Identification
Acknowledgment Request option MUST be set to a value unique over all field in that Acknowledgement Request option MUST be set to a value
packets transmitted by this node to the same next-hop node that are unique over all packets transmitted by this node to the same next-hop
either unacknowledged or recently acknowledged. node that are either unacknowledged or recently acknowledged.
When a node receives a packet containing an Acknowledgment Request When a node receives a packet containing an Acknowledgement Request
option, then that node performs the following tests on the packet: option, then that node performs the following tests on the packet:
- If the indicated next-hop node address for this packet does not - If the indicated next-hop node address for this packet does not
match any of this node's own IP addresses, then this node MUST match any of this node's own IP addresses, then this node MUST
NOT process the Acknowledgment Request option. The indicated NOT process the Acknowledgement Request option. The indicated
next-hop node address is the next Address[i] field in the DSR next-hop node address is the next Address[i] field in the DSR
Source Route option in the DSR header in the packet, or is the IP Source Route option in the DSR Options header in the packet, or
Destination Address in the packet if the packet does not contain is the IP Destination Address in the packet if the packet does
a DSR Source Route option or the Segments Left there is zero. not contain a DSR Source Route option or the Segments Left there
is zero.
- If the packet contains an Acknowledgment option, then this node - If the packet contains an Acknowledgement option, then this node
MUST NOT process the Acknowledgment Request option. MUST NOT process the Acknowledgement Request option.
If neither of the tests above fails, then this node MUST process the If neither of the tests above fails, then this node MUST process the
Acknowledgment Request option by sending an Acknowledgment option Acknowledgement Request option by sending an Acknowledgement option
to the previous-hop node; to do so, the node performs the following to the previous-hop node; to do so, the node performs the following
sequence of steps: sequence of steps:
- Create a packet and set the IP Protocol field to the protocol - Create a packet and set the IP Protocol field to the protocol
number assigned for a DSR header (TBA???). number assigned for a DSR Options header (TBA???).
- Set the IP Source Address field in this packet to the IP address - Set the IP Source Address field in this packet to the IP address
of this node, copied from the source route in the DSR Source of this node, copied from the source route in the DSR Source
Route option in that packet (or from the IP Destination Address Route option in that packet (or from the IP Destination Address
field of the packet, if the packet does not contain a DSR Source field of the packet, if the packet does not contain a DSR Source
Route option). Route option).
- Set the IP Destination Address field in this packet to the IP - Set the IP Destination Address field in this packet to the IP
address of the previous-hop node, copied from the source route address of the previous-hop node, copied from the source route
in the DSR Source Route option in that packet (or from the IP in the DSR Source Route option in that packet (or from the IP
Source Address field of the packet, if the packet does not Source Address field of the packet, if the packet does not
contain a DSR Source Route option). contain a DSR Source Route option).
- Add a DSR header to the packet, and set the DSR header's - Add a DSR Options header to the packet, and set the DSR Options
Next Header field to the "No Next Header" value. header's Next Header field to the "No Next Header" value.
- Add an Acknowledgment option to the DSR header in the packet; - Add an Acknowledgement option to the DSR Options header in the
set the Acknowledgment option's Option Type field to 6 and the packet; set the Acknowledgement option's Option Type field to 6
Opt Data Len field to 10. and the Opt Data Len field to 10.
- Copy the Identification field from the received Acknowledgment - Copy the Identification field from the received Acknowledgement
Request option into the Identification field in the Request option into the Identification field in the
Acknowledgment option. Acknowledgement option.
- Set the ACK Source Address field in the Acknowledgment option to - Set the ACK Source Address field in the Acknowledgement option to
be the IP Source Address of this new packet (set above to be the be the IP Source Address of this new packet (set above to be the
IP address of this node). IP address of this node).
- Set the ACK Destination Address field in the Acknowledgment - Set the ACK Destination Address field in the Acknowledgement
option to be the IP Destination Address of this new packet (set option to be the IP Destination Address of this new packet (set
above to be the IP address of the previous-hop node). above to be the IP address of the previous-hop node).
- Send the packet as described in Section 6.1.1. - Send the packet as described in Section 8.1.1.
Packets containing an Acknowledgment option SHOULD NOT be placed in Packets containing an Acknowledgement option SHOULD NOT be placed in
the Maintenance Buffer. the Maintenance Buffer.
When a node receives a packet with both an Acknowledgment option and When a node receives a packet with both an Acknowledgement option
an Acknowledgment Request option, if that node is not the destination and an Acknowledgement Request option, if that node is not the
of the Acknowledgment option (the IP Destination Address of the destination of the Acknowledgement option (the IP Destination Address
packet), then the Acknowledgment Request option MUST be ignored. of the packet), then the Acknowledgement Request option MUST
Otherwise (that node is the destination of the Acknowledgment be ignored. Otherwise (that node is the destination of the
option), that node MUST process the Acknowledgment Request option Acknowledgement option), that node MUST process the Acknowledgement
by returning an Acknowledgment option according to the following Request option by returning an Acknowledgement option according to
sequence of steps: the following sequence of steps:
- Create a packet and set the IP Protocol field to the protocol - Create a packet and set the IP Protocol field to the protocol
number assigned for a DSR header (TBA???). number assigned for a DSR Options header (TBA???).
- Set the IP Source Address field in this packet to the IP address - Set the IP Source Address field in this packet to the IP address
of this node, copied from the source route in the DSR Source of this node, copied from the source route in the DSR Source
Route option in that packet (or from the IP Destination Address Route option in that packet (or from the IP Destination Address
field of the packet, if the packet does not contain a DSR Source field of the packet, if the packet does not contain a DSR Source
Route option). Route option).
- Set the IP Destination Address field in this packet to the IP - Set the IP Destination Address field in this packet to the IP
address of the node originating the Acknowledgment option. address of the node originating the Acknowledgement option.
- Add a DSR header to the packet, and set the DSR header's - Add a DSR Options header to the packet, and set the DSR Options
Next Header field to the "No Next Header" value. header's Next Header field to the "No Next Header" value.
- Add an Acknowledgment option to the DSR header in this packet; - Add an Acknowledgement option to the DSR Options header in this
set the Acknowledgment option's Option Type field to 6 and the packet; set the Acknowledgement option's Option Type field to 6
Opt Data Len field to 10. and the Opt Data Len field to 10.
- Copy the Identification field from the received Acknowledgment - Copy the Identification field from the received Acknowledgement
Request option into the Identification field in the Request option into the Identification field in the
Acknowledgment option. Acknowledgement option.
- Set the ACK Source Address field in the option to be the IP - Set the ACK Source Address field in the option to be the IP
Source Address of this new packet (set above to be the IP address Source Address of this new packet (set above to be the IP address
of this node). of this node).
- Set the ACK Destination Address field in the option to be the IP - Set the ACK Destination Address field in the option to be the IP
Destination Address of this new packet (set above to be the IP Destination Address of this new packet (set above to be the IP
address of the node originating the Acknowledgment option.) address of the node originating the Acknowledgement option.)
- Send the packet directly to the destination. The IP - Send the packet directly to the destination. The IP
Destination Address MUST be treated as a direct neighbor node: Destination Address MUST be treated as a direct neighbor node:
the transmission to that node MUST be done in a single IP the transmission to that node MUST be done in a single IP
forwarding hop, without Route Discovery and without searching forwarding hop, without Route Discovery and without searching
the Route Cache. In addition, this packet MUST NOT contain a the Route Cache. In addition, this packet MUST NOT contain a
DSR Acknowledgment Request, MUST NOT be retransmitted for Route DSR Acknowledgement Request, MUST NOT be retransmitted for Route
Maintenance, and MUST NOT expect a link-layer acknowledgment or Maintenance, and MUST NOT expect a link-layer acknowledgement or
passive acknowledgment. passive acknowledgement.
When using network-layer acknowledgments for Route Maintenance, When using network-layer acknowledgements for Route Maintenance,
a node SHOULD use an adaptive algorithm in determining the a node SHOULD use an adaptive algorithm in determining the
retransmission timeout for each transmission attempt of an retransmission timeout for each transmission attempt of an
acknowledgment request. For example, a node SHOULD maintain a acknowledgement request. For example, a node SHOULD maintain a
separate round-trip time (RTT) estimate for each to which it has separate round-trip time (RTT) estimate for each to which it has
recently attempted to transmit packets, and it SHOULD use this RTT recently attempted to transmit packets, and it SHOULD use this RTT
estimate in setting the timeout for each retransmission attempt estimate in setting the timeout for each retransmission attempt
for Route Maintenance. The TCP RTT estimation algorithm has been for Route Maintenance. The TCP RTT estimation algorithm has been
shown to work well for this purpose in implementation and testbed shown to work well for this purpose in implementation and testbed
experiments with DSR [20, 22]. experiments with DSR [22, 24].
6.3.4. Originating a Route Error 8.3.4. Originating a Route Error
When a node is unable to verify reachability of a next-hop node after When a node is unable to verify reachability of a next-hop node after
reaching a maximum number of retransmission attempts, a node SHOULD reaching a maximum number of retransmission attempts, a node SHOULD
send a Route Error to the IP Source Address of the packet. When send a Route Error to the IP Source Address of the packet. When
sending a Route Error for a packet containing either a Route Error sending a Route Error for a packet containing either a Route Error
option or an Acknowledgment option, a node SHOULD add these existing option or an Acknowledgement option, a node SHOULD add these existing
options to its Route Error, subject to the limit described below. options to its Route Error, subject to the limit described below.
A node transmitting a Route Error MUST perform the following steps: A node transmitting a Route Error MUST perform the following steps:
- Create an IP packet and set the Source Address field in this - Create an IP packet and set the Source Address field in this
packet's IP header to the address of this node. packet's IP header to the address of this node.
- If the Salvage field in the DSR Source Route option in the - If the Salvage field in the DSR Source Route option in the
packet triggering the Route Error is zero, then copy the packet triggering the Route Error is zero, then copy the
Source Address field of the packet triggering the Route Error Source Address field of the packet triggering the Route Error
into the Destination Address field in the new packet's IP into the Destination Address field in the new packet's IP
header; otherwise, copy the Address[1] field from the DSR Source header; otherwise, copy the Address[1] field from the DSR Source
Route option of the packet triggering the Route Error into the Route option of the packet triggering the Route Error into the
Destination Address field in the new packet's IP header Destination Address field in the new packet's IP header
- Insert a DSR header into the new packet. - Insert a DSR Options header into the new packet.
- Add a Route Error Option to the new packet, setting the Error - Add a Route Error Option to the new packet, setting the Error
Type to NODE_UNREACHABLE, the Salvage value to the Salvage Type to NODE_UNREACHABLE, the Salvage value to the Salvage
value from the DSR Source Route option of the packet triggering value from the DSR Source Route option of the packet triggering
the Route Error, and the Unreachable Node Address field to the Route Error, and the Unreachable Node Address field to
the address of the next-hop node from the original source the address of the next-hop node from the original source
route. Set the Error Source Address field to this node's IP route. Set the Error Source Address field to this node's IP
address, and the Error Destination field to the new packet's IP address, and the Error Destination field to the new packet's IP
Destination Address. Destination Address.
- If the packet triggering the Route Error contains any Route Error - If the packet triggering the Route Error contains any Route Error
or Acknowledgment options, the node MAY append to its Route Error or Acknowledgement options, the node MAY append to its Route
each of these options, with the following constraints: Error each of these options, with the following constraints:
o The node MUST NOT include any Route Error option from the o The node MUST NOT include any Route Error option from the
packet triggering the new Route Error, for which the total packet triggering the new Route Error, for which the total
salvage count (Section 5.4) of that included Route Error salvage count (Section 6.4) of that included Route Error
would be greater than MAX_SALVAGE_COUNT in the new packet. would be greater than MAX_SALVAGE_COUNT in the new packet.
o If any Route Error option from the packet triggering the new o If any Route Error option from the packet triggering the new
Route Error is not included in the packet, the node MUST NOT Route Error is not included in the packet, the node MUST NOT
include any following Route Error or Acknowledgment options include any following Route Error or Acknowledgement options
from the packet triggering the new Route Error. from the packet triggering the new Route Error.
o Any appended options from the packet triggering the Route o Any appended options from the packet triggering the Route
Error MUST follow the new Route Error in the packet. Error MUST follow the new Route Error in the packet.
o In appending these options to the new Route Error, the order o In appending these options to the new Route Error, the order
of these options from the packet triggering the Route Error of these options from the packet triggering the Route Error
MUST be preserved. MUST be preserved.
- Send the packet as described in Section 6.1.1. - Send the packet as described in Section 8.1.1.
6.3.5. Processing a Received Route Error Option 8.3.5. Processing a Received Route Error Option
When a node receives a packet containing a Route Error option, that When a node receives a packet containing a Route Error option, that
node MUST process the Route Error option according to the following node MUST process the Route Error option according to the following
sequence of steps: sequence of steps:
- The node MUST remove from its Route Cache the link from the - The node MUST remove from its Route Cache the link from the
node identified by the Error Source Address field to the node node identified by the Error Source Address field to the node
identified by the Unreachable Node Address field (if this link is identified by the Unreachable Node Address field (if this link is
present in its Route Cache). If the node implements its Route present in its Route Cache). If the node implements its Route
Cache as a link cache, as described in Section 4.1, only this Cache as a link cache, as described in Section 4.1, only this
single link is removed; if the node implements its Route Cache as single link is removed; if the node implements its Route Cache as
a path cache, however, all routes (paths) that use this link are a path cache, however, all routes (paths) that use this link are
removed. removed.
- If the option following the Route Error is an Acknowledgment - If the option following the Route Error is an Acknowledgement
or Route Error option sent by this node (that is, with or Route Error option sent by this node (that is, with
Acknowledgment or Error Source Address equal to this node's Acknowledgement or Error Source Address equal to this node's
address), copy the DSR options following the current Route Error address), copy the DSR options following the current Route
into a new packet with IP Source Address equal to this node's own Error into a new packet with IP Source Address equal to this
IP address and IP Destination Address equal to the Acknowledgment node's own IP address and IP Destination Address equal to the
or Error Destination Address. Transmit this packet as described Acknowledgement or Error Destination Address. Transmit this
in Section 6.1.1, with the salvage count in the DSR Source Route packet as described in Section 8.1.1, with the salvage count
option set to the Salvage value of the Route Error. in the DSR Source Route option set to the Salvage value of the
Route Error.
In addition, after processing the Route Error as described above, In addition, after processing the Route Error as described above,
the node MAY initiate a new Route Discovery for any destination node the node MAY initiate a new Route Discovery for any destination node
for which it then has no route in its Route Cache as a result of for which it then has no route in its Route Cache as a result of
processing this Route Error, if the node has indication that a route processing this Route Error, if the node has indication that a route
to that destination is needed. For example, if the node has an open to that destination is needed. For example, if the node has an open
TCP connection to some destination node, then if the processing of TCP connection to some destination node, then if the processing of
this Route Error removed the only route to that destination from this this Route Error removed the only route to that destination from this
node's Route Cache, then this node MAY initiate a new Route Discovery node's Route Cache, then this node MAY initiate a new Route Discovery
for that destination node. Any node, however, MUST limit the rate at for that destination node. Any node, however, MUST limit the rate at
which it initiates new Route Discoveries for any single destination which it initiates new Route Discoveries for any single destination
address, and any new Route Discovery initiated in this way as part of address, and any new Route Discovery initiated in this way as part of
processing this Route Error MUST conform to this limit. processing this Route Error MUST conform to this limit.
6.3.6. Salvaging a Packet 8.3.6. Salvaging a Packet
When an intermediate node forwarding a packet detects through Route When an intermediate node forwarding a packet detects through Route
Maintenance that the next-hop link along the route for that packet is Maintenance that the next-hop link along the route for that packet is
broken (Section 6.3), if the node has another route to the packet's broken (Section 8.3), if the node has another route to the packet's
IP Destination Address in its Route Cache, the node SHOULD "salvage" IP Destination Address in its Route Cache, the node SHOULD "salvage"
the packet rather than discarding it. To do so using the route found the packet rather than discarding it. To do so using the route found
in its Route Cache, this node processes the packet as follows: in its Route Cache, this node processes the packet as follows:
- If the MAC protocol in use in the network is not capable of - If the MAC protocol in use in the network is not capable of
transmitting unicast packets over unidirectional links, as transmitting unicast packets over unidirectional links, as
discussed in Section 3.3.1, then if this packet contains a Route discussed in Section 3.3.1, then if this packet contains a Route
Reply option, remove and discard the Route Reply option in the Reply option, remove and discard the Route Reply option in the
packet; if the DSR header in the packet then contains no DSR packet; if the DSR Options header in the packet then contains no
options, remove the DSR header from the packet. If the resulting DSR options, remove the DSR Options header from the packet. If
packet then contains only an IP header, the node SHOULD NOT the resulting packet then contains only an IP header, the node
salvage the packet and instead SHOULD discard the entire packet. SHOULD NOT salvage the packet and instead SHOULD discard the
entire packet.
When returning any Route Reply in the case in which the MAC When returning any Route Reply in the case in which the MAC
protocol in use in the network is not capable of transmitting protocol in use in the network is not capable of transmitting
unicast packets over unidirectional links, the source route unicast packets over unidirectional links, the source route
used for routing the Route Reply packet MUST be obtained by used for routing the Route Reply packet MUST be obtained by
reversing the sequence of hops in the Route Request packet (the reversing the sequence of hops in the Route Request packet (the
source route that is then returned in the Route Reply). This source route that is then returned in the Route Reply). This
restriction on returning a Route Reply and on salvaging a packet restriction on returning a Route Reply and on salvaging a packet
that contains a Route Reply option enables the Route Reply to that contains a Route Reply option enables the Route Reply to
test this sequence of hops for bidirectionality, preventing the test this sequence of hops for bidirectionality, preventing the
skipping to change at page 65, line 38 skipping to change at page 84, line 40
- The Last Hop External (L) bit in the DSR Source Route option is - The Last Hop External (L) bit in the DSR Source Route option is
copied from the External bit flagging the last hop in the source copied from the External bit flagging the last hop in the source
route for the packet, as indicated in the Route Cache. route for the packet, as indicated in the Route Cache.
- The Salvage field in the DSR Source Route option is set to 1 plus - The Salvage field in the DSR Source Route option is set to 1 plus
the value of the Salvage field in the DSR Source Route option of the value of the Salvage field in the DSR Source Route option of
the packet that caused the error. the packet that caused the error.
- Transmit the packet to the next-hop node on the new source route - Transmit the packet to the next-hop node on the new source route
in the packet, using the forwarding procedure described in in the packet, using the forwarding procedure described in
Section 6.1.5. Section 8.1.5.
As described in Section 6.3.4, the node in this case also SHOULD As described in Section 8.3.4, the node in this case also SHOULD
return a Route Error to the original sender of the packet. If the return a Route Error to the original sender of the packet. If the
node chooses to salvage the packet, it SHOULD do so after originating node chooses to salvage the packet, it SHOULD do so after originating
the Route Error. the Route Error.
7. Multiple Interface Support 8.4. Multiple Interface Support
A node in DSR MAY have multiple network interfaces that support A node in DSR MAY have multiple network interfaces that support
ad hoc network routing. This section describes special packet ad hoc network routing. This section describes special packet
processing at such nodes. processing at such nodes.
A node with multiple network interfaces MUST have some policy for A node with multiple network interfaces MUST have some policy for
determining which Request packets are forwarded out which network determining which Request packets are forwarded out which network
interfaces. For example, a node MAY choose to forward all Requests interfaces. For example, a node MAY choose to forward all Requests
out all network interfaces. out all network interfaces.
skipping to change at page 67, line 5 skipping to change at page 86, line 5
packet sent with a source route specifying an interface change to an packet sent with a source route specifying an interface change to an
interface that is no longer available, it MAY send a Route Error to interface that is no longer available, it MAY send a Route Error to
the source of the packet without attempting to forward the packet on the source of the packet without attempting to forward the packet on
the incoming interface, unless the network uses an autoconfiguration the incoming interface, unless the network uses an autoconfiguration
mechanism that may have allowed another node to acquire the now mechanism that may have allowed another node to acquire the now
unused address of the unavailable interface. unused address of the unavailable interface.
Source routes MUST never contain the special addresses 127.0.0.1 and Source routes MUST never contain the special addresses 127.0.0.1 and
127.0.0.2. 127.0.0.2.
8. Fragmentation and Reassembly 8.5. Fragmentation and Reassembly
When a node using DSR wishes to fragment a packet that contains a DSR When a node using DSR wishes to fragment a packet that contains a DSR
header not containing a Route Request option, it MUST perform the header not containing a Route Request option, it MUST perform the
following sequence of steps: following sequence of steps:
- Remove the DSR header from the packet. - Remove the DSR Options header from the packet.
- Fragment the packet. - Fragment the packet.
- IP-in-IP encapsulate each fragment. - IP-in-IP encapsulate each fragment.
- Add the DSR header to each fragment. If a Source Route header is - Add the DSR Options header to each fragment. If a Source Route
present in the DSR header, increment the Salvage field. header is present in the DSR Options header, increment the
Salvage field.
When a node using the DSR protocol receives an IP-in-IP encapsulated When a node using the DSR protocol receives an IP-in-IP encapsulated
packet destined to itself, it SHOULD decapsulate the packet and packet destined to itself, it SHOULD decapsulate the packet and
reassemble any fragments contained inside, in accordance with reassemble any fragments contained inside, in accordance with
RFC 791 [27]. RFC 791 [30].
8.6. Flow State Processing
A node implementing the optional DSR flow state extension MUST follow
these additional processing steps.
8.6.1. Originating a Packet
When originating any packet to be routed using flow state, a node
using DSR flow state MUST:
- If the route to be used for this packet has never had a DSR
flow state established along it (or the existing flow state has
expired):
o Generate a 16-bit Flow ID larger than any unexpired Flow IDs
used for this destination. Odd Flow IDs MUST be chosen for
"default" flows; even Flow IDs MUST be chosen for non-default
flows.
o Add a DSR Options header, as described in Section 8.1.2.
o Add a DSR Flow State header, as described in Section 8.6.2.
o Initialize the Hop Count field in the DSR Flow State header
to 0.
o Set the Flow ID field in the DSR Flow State header to the
Flow ID generated in the first step.
o Add a Timeout option to the DSR Options header.
o Add a Source Route option after the Timeout option. with the
route to be used, as described in Section 8.1.3.
o The source SHOULD record this flow in its Flow Table.
o If this flow is recorded in the Flow Table, the TTL MUST be
set to be the TTL of the flow establishment packet.
o If this flow is recorded in the Flow Table, the timeout MUST
be set to a value no less than the value specified in the
Timeout option.
- If the route to be used for this packet has had DSR flow state
established along it, but has not been established end-to-end:
o Add a DSR Options header, as described in Section 8.1.2.
o Add a DSR Flow State header, as described in Section 8.6.2.
o Initialize the Hop Count field in the DSR Flow State header
to 0.
o The Flow ID field of the DSR Flow State header SHOULD be the
Flow ID previously used for this route. If it is not, the
steps for sending packets along never before established
routes MUST be followed in place of these.
o Add a Timeout option to the DSR Options header, setting the
Timeout to a value not greater than the timeout remaining for
this flow in the Flow Table.
o Add a Source Route option after the Timeout option with the
route to be used, as described in Section 8.1.3
o If the IP TTL is not equal to the TTL specified in the Flow
Table, the source MUST set a flag to indicate that this flow
cannot be used as default.
- If the route the node wishes to use for this packet has been
established end-to-end and is not the default flow:
o Add a DSR Flow State header, as described in Section 8.6.2.
o Initialize the Hop Count field in the DSR Flow State header
to 0.
o The Flow ID field of the DSR Flow State header SHOULD be the
Flow ID previously used for this route. If it is not, the
steps for sending packets along never before established
routes MUST be followed in place of these.
o If the next hop requires a Hop-by-Hop acknowledgement,
add a DSR Options header, as described in Section 8.1.2,
and an Acknowledgement Request option, as described in
Section 8.3.3.
o A DSR Options header SHOULD NOT be added to a packet, unless
it is added to carry an Acknowledgement Request option, in
which case:
+ A Source Route option in the DSR Options header SHOULD
NOT be added.
+ If a Source Route option in the DSR Options header is
added, the steps for sending packets along routes not
yet established end-to-end MUST be followed in place of
these.
+ A Timeout option SHOULD NOT be added.
+ If a Timeout option is added, it MUST specify a timeout
not greater than the timeout remaining for this flow in
the Flow Table.
- If the route the node wishes to use for this packet has been
established end-to-end and is the current default flow:
o If the IP TTL is not equal to the TTL specified in the Flow
Table, the source MUST follow the steps for sending a packet
along a non-default flow that has been established end-to-end
in place of these steps.
o If the next hop requires a Hop-by-Hop acknowledgement,
the sending node MUST add a DSR Options header and
an Acknowledgement Request option, as described in
Section 8.3.3. The sending node MUST NOT add any additional
options to this header.
o A DSR Options header SHOULD NOT be added, except as specified
in the previous step. If one is added in a way inconsistent
with the previous step, the source MUST follow the steps
for sending a packet along a non-default flow that has been
established end-to-end in place of these steps.
8.6.2. Inserting a DSR Flow State Header
A node originating a packet adds a DSR Flow State header to the
packet, if necessary, to carry information needed by the routing
protocol. Only one DSR Flow State header may be in any packet.
A DSR Flow State header is added to a packet by performing the
following sequence of steps:
- Insert a DSR Flow State header after the IP header and any
Hop-by-Hop Options header that may already be in the packet, but
before any other header that may be present.
- Set the Next Header field of the DSR Flow State header to the
Next Header field of the previous header (either an IP header or
a Hop-by-Hop Options header).
- Set the Next Header field of the previous header to the Protocol
number assigned to DSR Options headers.
8.6.3. Receiving a Packet
This section describes processing only for packets that are sent to
the processing node as the next-hop node; that is, when the MAC-layer
destination address is the MAC address of this node. Otherwise, the
process described in Sections 8.6.5 should be followed.
The flow along which a packet is being sent is considered to be in
the Flow Table if the triple (IP Source Address, IP Destination
Address, Flow ID) has an unexpired entry in the Flow Table.
When a node using DSR flow state receives a packet, it MUST follow
the following steps for processing:
- If a DSR Flow State header is present, increment the Hop Count
field.
- In addition, if a DSR Flow State header is present, then if the
triple (IP Source Address, IP Destination Address, Flow ID) is
in this node's Automatic Route Shortening Table and the packet
is listed in the entry, then the node MAY send a gratuitous
Route Reply as described in Section 4.4, subject to the rate
limiting specified in Section 4.4. This gratuitous Route Reply
gives the route by which the packet originally reached this
node. Specifically, the node sending the gratuitous Route Reply
constructs the route to return in the Route Reply as follows:
o Let k = (packet Hop Count) - (table Hop Count), where
packet Hop Count is the value of the Hop Count field in this
received packet, and table Hop Count is the Hop Count value
stored for this packet in the corresponding entry in this
node's Automatic Route Shortening Table.
o Copy the complete source route for this flow from the
corresponding entry in the node's Flow Table.
o Remove from this route the k hops immediately preceding this
node in the route, since these are the hops "skipped over"
by the packet as recorded in the Automatic Route Shortening
Table entry.
- Process each of the DSR options within the DSR Options header in
order:
o On receiving a Pad1 or PadN option, skip over the option
o On receiving a Route Request for which this node is the
destination, remove the option and return a Route Reply as
specified in Section 8.2.2.
o On receiving a broadcast Route Request that this node has not
previously seen for which this node is not the destination,
append this node's incoming interface address to the Route
Request, continue propagating the Route Request as specified
in Section 8.2.2, send the payload, if any, to the network
layer, and stop processing.
o On receiving a Route Request that this node has not
previously seen for which this node is not the destination,
discard the packet and stop processing.
o On receiving any Route Request, add appropriate links to the
cache, as specified in Section 8.2.2.
o On receiving a Route Reply that this node is the Requester
for, remove the Route Reply from the packet and process it as
specified in Section 8.2.5.
o On receiving any Route Reply, add appropriate links to the
cache, as specified in Section 8.2.5.
o On receiving any Route Error of type NODE_UNREACHABLE,
remove appropriate links to the cache, as specified in
Section 8.3.5.
o On receiving a Route Error of type NODE_UNREACHABLE that
this node is the Error Destination Address of, remove the
Route Error from the packet and process it as specified
in Section 8.3.5. It also MUST stop originating packets
along any flows using the link from Error Source Address to
Unreachable Node, and it MAY remove from its Flow Table any
flows using the link from Error Source Address to Unreachable
Node.
o On receiving a Route Error of type UNKNOWN_FLOW that this
node is not the Error Destination Address of, the node checks
if the Route Error corresponds to a flow in its Flow Table.
If it does not, the node silently discards the Route Error;
otherwise, it forwards the packet to the expected previous
hop of the corresponding flow. If Route Maintenance cannot
confirm the reachability of the previous hop, the node checks
if the network interface requires bidirectional links for
operation. If it does, the node silently discards the Error;
otherwise, it sends the Error as if it were originating it,
as described in Section 8.1.1.
o On receiving a Route Error of type UNKNOWN_FLOW that this
node is the Error Destination Address of, remove the Route
Error from the packet and mark the flow specified by the
triple (Error Destination Address, Original IP Destination
Address, Flow ID) as not having been established end-to-end.
o On receiving a Route Error of type DEFAULT_FLOW_UNKNOWN
that this node is not the Error Destination Address of, the
node checks if the Route Error corresponds to a flow in
its Default Flow Table. If it does not, the node silently
discards the Route Error; otherwise, it forwards the packet
to the expected previous hop of the corresponding flow.
If Route Maintenance cannot confirm the reachability of
the previous hop, the node checks if the network interface
requires bidirectional links for operation. If it does,
the node silently discards the Error; otherwise, it sends
the Error as if it were originating it, as described in
Section 8.1.1.
o On receiving a Route Error of type DEFAULT_FLOW_UNKNOWN that
this node is the Error Destination Address of, remove the
Route Error from the packet and mark the default flow between
the Error Destination Address and the Original IP Destination
Address as not having been established end-to-end.
o On receiving a Acknowledgement Request option, the receiving
node removes the Acknowledgement Request option and replies
to the previous hop with a Acknowledgement option. If the
previous hop cannot be determined, the Acknowledgement
Request option is discarded, and processing continues.
o On receiving a Acknowledgement option, the receiving node
removes the Acknowledgement option and processes it.
o On receiving any Acknowledgement option, add the appropriate
link to the cache, as specified in Section 8.1.4
o On receiving any Source Route option, add appropriate links
to the cache, as specified in Section 8.1.4.
o On receiving a Source Route option and either no DSR Flow
State header is present, the flow this packet is being sent
along is in the Flow Table, or no Timeout option preceded the
Source Route option in this DSR Options header, process it
as specified in Section 8.1.4. Stop processing this packet
unless the last address in the Source Route option is an
address of this node.
o On receiving a Source Route option in a packet with a DSR
Flow State header, and the Flow ID specified in the DSR Flow
State header is not in the Flow Table, add the flow to the
Flow Table, setting the Timeout value to a value not greater
than the Timeout field of the Timeout option in this header.
If no Timeout option preceded the Source Route option in this
header, the flow MUST NOT be added to the Flow Table.
If the Flow ID is odd and larger than any unexpired, odd
Flow IDs, it is set to be default in the Default Flow ID
Table.
Then process the Route option as specified in Section 8.1.4.
Stop processing this packet unless the last address in the
Source Route option is an address of this node.
o On receiving a Timeout option, check if this packet contains
a DSR Flow State header. If this packet does not contain a
DSR Flow State header, discard the DSR option. Otherwise,
record the Timeout value in the option for future reference.
The value recorded SHOULD be discarded when the node has
finished processing this DSR Options header. If the flow
that this packet is being sent along is in the Flow Table, it
MAY set the flow to time out no more than Timeout seconds in
the future.
o On receiving a Destination and Flow ID option, if the
IP Destination Address is not an address of this node,
forward the packet according to the Flow ID, as described in
Section 8.6.4, and stop processing this packet.
o On receiving a Destination and Flow ID option, if the IP
Destination Address is an address of this node, set the
IP Destination Address to the New IP Destination Address
specified in the option, and set the Flow ID to the New
Flow Identifier. Then remove the DSR option from the packet
and continue processing.
- If the IP Destination Address is an address of this node, remove
the DSR Options header, if any, and pass the packet up the
network stack and stop processing.
- If there is still a DSR Options header containing no options,
remove the DSR Options header.
- If there is still a DSR Flow State header, forward the packet
according to the Flow ID, as described in Section 8.6.4.
- If there is neither a DSR Options header nor a DSR Flow State
header, but there is an entry in the Default Flow Table for the
(IP Source Address, IP Destination Address) pair:
o If the IP TTL is not equal to the TTL expected in the Flow
Table, insert a DSR Flow State header, setting Hop Count
equal to the Hop Count of this node, and the Flow ID equal
to the default Flow ID found in the table, and forward
this packet according to the Flow ID, as described in
Section 8.6.4.
o Otherwise, follow the steps for forwarding the packet using
Flow IDs described in Section 8.6.4, but taking the Flow ID
to be the default Flow ID found in the table.
- If there is no DSR Options header, no DSR Flow State header, and
no default flow can be found, the node returns a Route Error of
type Default Flow Unknown to the IP Source Address, specifying
the IP Destination Address as the Original IP Destination in the
type-specific field.
8.6.4. Forwarding a Packet Using Flow IDs
To forward a packet using Flow IDs, a node MUST follow the following
sequence of steps:
- If the triple (IP Source Address, IP Destination Address,
Flow ID) is not in the Flow Table, return a Route Error of type
Unknown Flow.
- If a hop-by-hop acknowledgement is required for the next hop, the
node MUST include an Acknowledegment Request option as specified
in Section 8.3.3. If no DSR Options header is in the packet for
the Acknowledgement Request option to be attached to, it MUST be
included, as described in Section 8.1.2, except that it MUST be
added after the DSR Flow State header, if one is present.
- Attempt to transmit this packet to the next hop as specified in
the Flow Table, performing Route Maintenance to detect broken
routes.
8.6.5. Promiscuously Receiving a Packet
This section describes processing only for packets that have MAC
destinations other than the processing node. Otherwise, the process
described in Section 8.6.3 should be followed.
When a node using DSR flow state promiscuously overhears a packet, it
SHOULD follow the following steps for processing:
- If the packet contains a DSR Flow State header, and if the triple
(IP Source Address, IP Destination Address, Flow ID) is in the
Flow Table and the Hop Count is less than the Hop Count in the
flow's entry, the node MAY retain the packet in the Automatic
Route Shortening Table. If it can be determined that this
Flow ID has been recently used, it SHOULD retain the packet in
the Automatic Route Shortening Table.
- If the packet contains neither a DSR Flow State header nor a
Source Route option, and a Default Flow ID can be found in
the Default Flow Table for (IP Source Address, IP Destination
Address), and the IP TTL is greater than the TTL in the table
for the default flow, the node MAY retain the packet in the
Automatic Route Shortening Table. If it can be determined that
this Flow ID has been used recently, the node SHOULD retain the
packet in the Automatic Route Shortening Table.
8.6.6. Operation where the Layer below DSR Decreases
the IP TTL Non-Uniformly
Some nodes may use an IP tunnel as a DSR hop. If different packets
sent along this IP tunnel can take different routes, the reduction
in IP TTL across this link may be different for different packets.
This prevents the Automatic Route Shortening and Loop Detection
functionality from working properly when used in conjunction with
default routes.
Nodes forwarding packets without a Source Route option onto a link
with unpredictable TTL changes MUST ensure that a DSR Flow State
header is present, indicating the correct Hop Count and Flow ID.
8.6.7. Salvage Interactions with DSR
Nodes salvaging packets MUST remove the DSR Flow State header, if
present.
Any time this document refers to the Salvage field in the Source
Route option, packets without a Source Route option are considered to
have the value zero in the Salvage field.
9. Protocol Constants and Configuration Variables 9. Protocol Constants and Configuration Variables
Any DSR implementation MUST support the following configuration Any DSR implementation MUST support the following configuration
variables and MUST support a mechanism enabling the value of these variables and MUST support a mechanism enabling the value of these
variables to be modified by system management. The specific variable variables to be modified by system management. The specific variable
names are used for demonstration purposes only, and an implementation names are used for demonstration purposes only, and an implementation
is not required to use these names for the configuration variables, is not required to use these names for the configuration variables,
so long as the external behavior of the implementation is consistent so long as the external behavior of the implementation is consistent
with that described in this document. with that described in this document.
For each configuration variable below, the default value is specified For each configuration variable below, the default value is specified
to simplify configuration. In particular, the default values given to simplify configuration. In particular, the default values given
below are chosen for a DSR network running over 2 Mbps IEEE 802.11 below are chosen for a DSR network running over 2 Mbps IEEE 802.11
network interfaces using the Distributed Coordination Function (DCF) network interfaces using the Distributed Coordination Function (DCF)
MAC with RTS and CTS [11, 5]. MAC with RTS and CTS [13, 5].
BroadcastJitter 10 milliseconds BroadcastJitter 10 milliseconds
RouteCacheTimeout 300 seconds RouteCacheTimeout 300 seconds
SendBufferTimeout 30 seconds SendBufferTimeout 30 seconds
RequestTableSize 64 nodes RequestTableSize 64 nodes
RequestTableIds 16 identifiers RequestTableIds 16 identifiers
MaxRequestRexmt 16 retransmissions MaxRequestRexmt 16 retransmissions
skipping to change at page 69, line 7 skipping to change at page 97, line 7
GratReplyHoldoff 1 second GratReplyHoldoff 1 second
In addition, the following protocol constant MUST be supported by any In addition, the following protocol constant MUST be supported by any
implementation of the DSR protocol: implementation of the DSR protocol:
MAX_SALVAGE_COUNT 15 salvages MAX_SALVAGE_COUNT 15 salvages
10. IANA Considerations 10. IANA Considerations
This document proposes the use of a DSR header, which requires an IP This document specifies the DSR Options header, which requires an IP
Protocol number. Protocol number.
This document also specifies the DSR Flow State header, which
requires an IP Protocol number.
In addition, this document proposes use of the value "No Next Header" In addition, this document proposes use of the value "No Next Header"
(originally defined for use in IPv6) within an IPv4 packet, to (originally defined for use in IPv6) within an IPv4 packet, to
indicate that no further header follows a DSR header. indicate that no further header follows a DSR Options header.
Finally, this document introduces a number of DSR options for use in
the DSR Options header, and additional new DSR options may be defined
in the future. Each of these options requires a unique Option Type
value, with the most significant 3 bits (that is, Option Type & 0xE0)
encoded as defined in Section 6.1. It is necessary only that each
Option Type value be unique, not that they be unique in the remaining
5 bits of the value after these 3 most significant bits.
11. Security Considerations 11. Security Considerations
This document does not specifically address security concerns. This This document does not specifically address security concerns. This
document does assume that all nodes participating in the DSR protocol document does assume that all nodes participating in the DSR protocol
do so in good faith and without malicious intent to corrupt the do so in good faith and without malicious intent to corrupt the
routing ability of the network. In mission-oriented environments routing ability of the network.
where all the nodes participating in the DSR protocol share a
common goal that motivates their participation in the protocol, the Depending on the threat model, a number of different mechanisms can
communications between the nodes can be encrypted at the physical be used to secure DSR. For example, in an environment where node
channel or link layer to prevent attack by outsiders. compromise is unrealistic and where 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. Cryptographic approaches, such as that provided
by Ariadne [12] or SRP [26], can resist stronger attacks.
Appendix A. Link-MaxLife Cache Description Appendix A. Link-MaxLife Cache Description
As guidance to implementors of DSR, the description below outlines As guidance to implementors of DSR, the description below outlines
the operation of a possible implementation of a Route Cache for DSR the operation of a possible implementation of a Route Cache for DSR
that has been shown to outperform other other caches studied in that has been shown to outperform other other caches studied in
detailed simulations. Use of this design for the Route Cache is detailed simulations. Use of this design for the Route Cache is
recommended in implementations of DSR. recommended in implementations of DSR.
This cache, called "Link-MaxLife" [9], is a link cache, in that each This cache, called "Link-MaxLife" [10], is a link cache, in that each
individual link (hop) in the routes returned in Route Reply packets individual link (hop) in the routes returned in Route Reply packets
(or otherwise learned from the header of overhead packets) is added (or otherwise learned from the header of overhead packets) is added
to a unified graph data structure of this node's current view of the to a unified graph data structure of this node's current view of the
network topology, as described in Section 4.1. To search for a route network topology, as described in Section 4.1. To search for a route
in this cache to some destination node, the sending node uses a graph in this cache to some destination node, the sending node uses a graph
search algorithm, such as the well-known Dijkstra's shortest-path search algorithm, such as the well-known Dijkstra's shortest-path
algorithm, to find the current best path through the graph to the algorithm, to find the current best path through the graph to the
destination node. destination node.
The Link-MaxLife form of link cache is adaptive in that each link in The Link-MaxLife form of link cache is adaptive in that each link in
skipping to change at page 73, line 16 skipping to change at page 101, line 16
When designing DSR, we had to determine at what layer within When designing DSR, we had to determine at what layer within
the protocol hierarchy to implement ad hoc network routing. We the protocol hierarchy to implement ad hoc network routing. We
considered two different options: routing at the link layer (ISO considered two different options: routing at the link layer (ISO
layer 2) and routing at the network layer (ISO layer 3). Originally, layer 2) and routing at the network layer (ISO layer 3). Originally,
we opted to route at the link layer for several reasons: we opted to route at the link layer for several reasons:
- Pragmatically, running the DSR protocol at the link layer - Pragmatically, running the DSR protocol at the link layer
maximizes the number of mobile nodes that can participate in maximizes the number of mobile nodes that can participate in
ad hoc networks. For example, the protocol can route equally ad hoc networks. For example, the protocol can route equally
well between IPv4 [27], IPv6 [6], and IPX [32] nodes. well between IPv4 [30], IPv6 [7], and IPX [35] nodes.
- Historically [13, 14], DSR grew from our contemplation of - Historically [15, 16], DSR grew from our contemplation of
a multi-hop propagating version of the Internet's Address a multi-hop propagating version of the Internet's Address
Resolution Protocol (ARP) [25], as well as from the routing Resolution Protocol (ARP) [28], as well as from the routing
mechanism used in IEEE 802 source routing bridges [24]. These mechanism used in IEEE 802 source routing bridges [27]. These
are layer 2 protocols. are layer 2 protocols.
- Technically, we designed DSR to be simple enough that it could - Technically, we designed DSR to be simple enough that it could
be implemented directly in the firmware inside wireless network be implemented directly in the firmware inside wireless network
interface cards [13, 14], well below the layer 3 software within interface cards [15, 16], well below the layer 3 software within
a mobile node. We see great potential in this for DSR running a mobile node. We see great potential in this for DSR running
inside a cloud of mobile nodes around a fixed base station, inside a cloud of mobile nodes around a fixed base station,
where DSR would act to transparently extend the coverage range where DSR would act to transparently extend the coverage range
to these nodes. Mobile nodes that would otherwise be unable to these nodes. Mobile nodes that would otherwise be unable
to communicate with the base station due to factors such as to communicate with the base station due to factors such as
distance, fading, or local interference sources could then reach distance, fading, or local interference sources could then reach
the base station through their peers. the base station through their peers.
Ultimately, however, we decided to specify and to implement [20] Ultimately, however, we decided to specify and to implement [22]
DSR as a layer 3 protocol, since this is the only layer at which we DSR as a layer 3 protocol, since this is the only layer at which we
could realistically support nodes with multiple network interfaces of could realistically support nodes with multiple network interfaces of
different types forming an ad hoc network. different types forming an ad hoc network.
Appendix C. Implementation and Evaluation Status Appendix C. Implementation and Evaluation Status
The initial design of the DSR protocol, including DSR's basic Route The initial design of the DSR protocol, including DSR's basic Route
Discovery and Route Maintenance mechanisms, was first published in Discovery and Route Maintenance mechanisms, was first published in
December 1994 [13], with significant additional design details and December 1994 [15], with significant additional design details and
initial simulation results published in early 1996 [14]. initial simulation results published in early 1996 [16].
The DSR protocol has been extensively studied since then through The DSR protocol has been extensively studied since then through
additional detailed simulations. In particular, we have implemented additional detailed simulations. In particular, we have implemented
DSR in the ns-2 network simulator [23, 5] and performed extensive DSR in the ns-2 network simulator [25, 5] and performed extensive
simulations of DSR using ns-2 (e.g., [5, 19]). We have also simulations of DSR using ns-2 (e.g., [5, 21]). We have also
conducted evaluations of different caching strategies documented in conducted evaluations of the different caching strategies in this
this draft [9]. document [10].
We have also implemented the DSR protocol under the FreeBSD 2.2.7 We have also implemented the DSR protocol under the FreeBSD 2.2.7
operating system running on Intel x86 platforms. FreeBSD [8] is operating system running on Intel x86 platforms. FreeBSD [9] is
based on a variety of free software, including 4.4 BSD Lite from the based on a variety of free software, including 4.4 BSD Lite from the
University of California, Berkeley. For the environments in which University of California, Berkeley. For the environments in which
we used it, this implementation is functionally equivalent to the we used it, this implementation is functionally equivalent to the
version of the DSR protocol specified in this draft. version of the DSR protocol specified in this document.
During the 7 months from August 1998 to February 1999, we designed During the 7 months from August 1998 to February 1999, we designed
and implemented a full-scale physical testbed to enable the and implemented a full-scale physical testbed to enable the
evaluation of ad hoc network performance in the field, in an actively evaluation of ad hoc network performance in the field, in an actively
mobile ad hoc network under realistic communication workloads. The mobile ad hoc network under realistic communication workloads. The
last week of February and the first week of March of 1999 included last week of February and the first week of March of 1999 included
demonstrations of this testbed to a number of our sponsors and demonstrations of this testbed to a number of our sponsors and
partners, including Lucent Technologies, Bell Atlantic, and DARPA. partners, including Lucent Technologies, Bell Atlantic, and DARPA.
A complete description of the testbed is available as a Technical A complete description of the testbed is available as a Technical
Report [20]. Report [22].
We have since ported this implementation of DSR to FreeBSD 3.3, and We have since ported this implementation of DSR to FreeBSD 3.3, and
we have also added a preliminary version of Quality of Service (QoS) we have also added a preliminary version of Quality of Service (QoS)
support for DSR. A demonstration of this modified version of DSR was support for DSR. A demonstration of this modified version of DSR was
presented in July 2000. These QoS features are not included in this presented in July 2000. These QoS features are not included in this
draft, and will be added later in a separate draft on top of the base document, and will be added later in a separate document on top of
protocol specified here. the base protocol specified here.
DSR has also been implemented under Linux by Alex Song at the DSR has also been implemented under Linux by Alex Song at the
University of Queensland, Australia [31]. This implementation University of Queensland, Australia [34]. This implementation
supports the Intel x86 PC platform and the Compaq iPAQ. supports the Intel x86 PC platform and the Compaq iPAQ.
The Network and Telecommunications Research Group at Trinity College The Network and Telecommunications Research Group at Trinity College
Dublin have implemented a version of DSR on Windows CE. Dublin have implemented a version of DSR on Windows CE.
Microsoft Research has implemented a version of DSR on Windows XP,
and has used it in testbeds of over 15 nodes. Several machines use
this implementation as their primary means of accessing the Internet.
Several other independent groups have also used DSR as a platform for Several other independent groups have also used DSR as a platform for
their own research, or and as a basis of comparison between ad hoc their own research, or and as a basis of comparison between ad hoc
network routing protocols. network routing protocols.
A preliminary version of the optional DSR flow state extension was
implemented in FreeBSD 3.3. A demonstration of this modified version
of DSR was presented in July 2000. The DSR flow state extension has
also been extensively evaluated using simulation [11].
Changes from Previous Version of the Draft Changes from Previous Version of the Draft
This appendix briefly lists some of the major changes in this This appendix briefly lists some of the major changes in this
draft relative to the previous version of this same draft, draft relative to the previous version of this same draft,
draft-ietf-manet-dsr-06.txt: draft-ietf-manet-dsr-07.txt:
- Added a blacklist mechanism for handling unidirectional links - Integrated the specification of the DSR flow state extension into
when the network interface requires bidirectionality. the main DSR draft. Previously, these had been specified in a
separate draft.
- Added language describing multiple interface support. - Included processing directions for unknown Option Types.
- Described fragmentation and reassembly processing. - Changed the name of the DSR header to DSR Options header, to
clarify it as a separate header type from the DSR Flow State
header.
- Updated the implementation and evaluation list. - Slightly changed the format of the DSR Options header and the DSR
Flow State header to allow the same IP protocol number to be used
for both. The new Flow State Header (F) bit in the two headers
indicates which type of header is being used (the bit is clear in
a DSR Options header and set in a DSR Flow State header).
Acknowledgements Acknowledgements
The protocol described in this draft has been designed and developed The protocol described in this document has been designed and
within the Monarch Project, a research project at Rice University developed within the Monarch Project, a research project at Rice
(previously at Carnegie Mellon University) that is developing University (previously at Carnegie Mellon University) that is
adaptive networking protocols and protocol interfaces to allow truly developing adaptive networking protocols and protocol interfaces to
seamless wireless and mobile node networking [15, 30]. allow truly seamless wireless and mobile node networking [17, 33].
The authors would like to acknowledge the substantial contributions The authors would like to acknowledge the substantial contributions
of Josh Broch in helping to design, simulate, and implement the DSR of Josh Broch in helping to design, simulate, and implement the DSR
protocol. Josh is currently on leave of absence from Carnegie Mellon protocol. We thank him for his contributions to earlier versions of
University at AON Networks. We thank him for his contributions to this document.
earlier versions of this draft.
We would also like to acknowledge the assistance of Robert V. Barron We would also like to acknowledge the assistance of Robert V. Barron
at Carnegie Mellon University. Bob ported our DSR implementation at Carnegie Mellon University. Bob ported our DSR implementation
from FreeBSD 2.2.7 into FreeBSD 3.3. from FreeBSD 2.2.7 into FreeBSD 3.3.
Many valuable suggestions came from participants in the IETF process. Many valuable suggestions came from participants in the IETF process.
We would like to acknowledge Fred Baker, who provided extensive We would particularly like to acknowledge Fred Baker, who provided
feedback on our previous draft, as well as the working group chairs, extensive feedback on a previous version of this document, as well as
for their suggestions of previous versions of the draft. the working group chairs, for their suggestions of previous versions
of the document.
References References
[1] David F. Bantz and Frederic J. Bauchot. Wireless LAN Design [1] David F. Bantz and Frederic J. Bauchot. Wireless LAN Design
Alternatives. IEEE Network, 8(2):43--53, March/April 1994. Alternatives. IEEE Network, 8(2):43--53, March/April 1994.
[2] Vaduvur Bharghavan, Alan Demers, Scott Shenker, and Lixia [2] Vaduvur Bharghavan, Alan Demers, Scott Shenker, and Lixia
Zhang. MACAW: A Media Access Protocol for Wireless LAN's. In Zhang. MACAW: A Media Access Protocol for Wireless LAN's. In
Proceedings of the ACM SIGCOMM '94 Conference, pages 212--225, Proceedings of the ACM SIGCOMM '94 Conference, pages 212--225,
August 1994. August 1994.
skipping to change at page 77, line 27 skipping to change at page 106, line 27
[4] Scott Bradner. Key words for use in RFCs to Indicate [4] Scott Bradner. Key words for use in RFCs to Indicate
Requirement Levels. RFC 2119, March 1997. Requirement Levels. RFC 2119, March 1997.
[5] Josh Broch, David A. Maltz, David B. Johnson, Yih-Chun Hu, [5] Josh Broch, David A. Maltz, David B. Johnson, Yih-Chun Hu,
and Jorjeta Jetcheva. A Performance Comparison of Multi-Hop and Jorjeta Jetcheva. A Performance Comparison of Multi-Hop
Wireless Ad Hoc Network Routing Protocols. In Proceedings of Wireless Ad Hoc Network Routing Protocols. In Proceedings of
the Fourth Annual ACM/IEEE International Conference on Mobile the Fourth Annual ACM/IEEE International Conference on Mobile
Computing and Networking, pages 85--97, October 1998. Computing and Networking, pages 85--97, October 1998.
[6] Stephen E. Deering and Robert M. Hinden. Internet Protocol [6] David D. Clark. The Design Philosophy of the DARPA Internet
Protocols. In Proceedings of the ACM SIGCOMM '88 Conference,
pages 106--114, August 1988.
[7] Stephen E. Deering and Robert M. Hinden. Internet Protocol
Version 6 (IPv6) Specification. RFC 2460, December 1998. Version 6 (IPv6) Specification. RFC 2460, December 1998.
[7] Ralph Droms. Dynamic Host Configuration Protocol. RFC 2131, [8] Ralph Droms. Dynamic Host Configuration Protocol. RFC 2131,
March 1997. March 1997.
[8] The FreeBSD Project. Project web page available at [9] The FreeBSD Project. Project web page available at
http://www.freebsd.org/. http://www.freebsd.org/.
[9] Yih-Chun Hu and David B. Johnson. Caching Strategies in [10] Yih-Chun Hu and David B. Johnson. Caching Strategies in
On-Demand Routing Protocols for Wireless Ad Hoc Networks. In On-Demand Routing Protocols for Wireless Ad Hoc Networks. In
Proceedings of the Sixth Annual ACM International Conference on Proceedings of the Sixth Annual ACM International Conference on
Mobile Computing and Networking, August 2000. Mobile Computing and Networking, August 2000.
[10] Yih-Chun Hu, David B. Johnson, and David A. Maltz. Flow [11] Yih-Chun Hu and David B. Johnson. Implicit Source Routing
State in the Dynamic Source Routing Protocol for Mobile Ad Hoc in On-Demand Ad Hoc Network Routing. In Proceedings of the
Networks. Internet-Draft, draft-ietf-manet-dsrflow-00.txt, Second Symposium on Mobile Ad Hoc Networking and Computing
February 2001. Work in progress. (MobiHoc 2001), pages 1--10, October 2001.
[11] IEEE Computer Society LAN MAN Standards Committee. Wireless [12] Yih-Chun Hu, Adrian Perrig, and David B. Johnson. Ariadne:
A Secure On-Demand Routing Protocol for Ad Hoc Networks. In
Proceedings of the Eighth Annual International Conference on
Mobile Computing and Networking (MobiCom 2002), pages 12--23,
September 2002.
[13] IEEE Computer Society LAN MAN Standards Committee. Wireless
LAN Medium Access Control (MAC) and Physical Layer (PHY) LAN Medium Access Control (MAC) and Physical Layer (PHY)
Specifications, IEEE Std 802.11-1997. The Institute of Specifications, IEEE Std 802.11-1997. The Institute of
Electrical and Electronics Engineers, New York, New York, 1997. Electrical and Electronics Engineers, New York, New York, 1997.
[12] Per Johansson, Tony Larsson, Nicklas Hedman, Bartosz Mielczarek, [14] Per Johansson, Tony Larsson, Nicklas Hedman, Bartosz Mielczarek,
and Mikael Degermark. Scenario-based Performance Analysis of and Mikael Degermark. Scenario-based Performance Analysis of
Routing Protocols for Mobile Ad-hoc Networks. In Proceedings Routing Protocols for Mobile Ad-hoc Networks. In Proceedings
of the Fifth Annual ACM/IEEE International Conference on Mobile of the Fifth Annual ACM/IEEE International Conference on Mobile
Computing and Networking, pages 195--206, August 1999. Computing and Networking, pages 195--206, August 1999.
[13] David B. Johnson. Routing in Ad Hoc Networks of Mobile Hosts. [15] David B. Johnson. Routing in Ad Hoc Networks of Mobile Hosts.
In Proceedings of the IEEE Workshop on Mobile Computing Systems In Proceedings of the IEEE Workshop on Mobile Computing Systems
and Applications, pages 158--163, December 1994. and Applications, pages 158--163, December 1994.
[14] David B. Johnson and David A. Maltz. Dynamic Source Routing in [16] David B. Johnson and David A. Maltz. Dynamic Source Routing in
Ad Hoc Wireless Networks. In Mobile Computing, edited by Tomasz Ad Hoc Wireless Networks. In Mobile Computing, edited by Tomasz
Imielinski and Hank Korth, chapter 5, pages 153--181. Kluwer Imielinski and Hank Korth, chapter 5, pages 153--181. Kluwer
Academic Publishers, 1996. Academic Publishers, 1996.
[15] David B. Johnson and David A. Maltz. Protocols for Adaptive [17] David B. Johnson and David A. Maltz. Protocols for Adaptive
Wireless and Mobile Networking. IEEE Personal Communications, Wireless and Mobile Networking. IEEE Personal Communications,
3(1):34--42, February 1996. 3(1):34--42, February 1996.
[16] John Jubin and Janet D. Tornow. The DARPA Packet Radio Network [18] John Jubin and Janet D. Tornow. The DARPA Packet Radio Network
Protocols. Proceedings of the IEEE, 75(1):21--32, January 1987. Protocols. Proceedings of the IEEE, 75(1):21--32, January 1987.
[17] Phil Karn. MACA---A New Channel Access Method for Packet Radio. [19] Phil Karn. MACA---A New Channel Access Method for Packet Radio.
In ARRL/CRRL Amateur Radio 9th Computer Networking Conference, In ARRL/CRRL Amateur Radio 9th Computer Networking Conference,
pages 134--140, September 1990. pages 134--140, September 1990.
[18] Gregory S. Lauer. Packet-Radio Routing. In Routing in [20] Gregory S. Lauer. Packet-Radio Routing. In Routing in
Communications Networks, edited by Martha E. Steenstrup, Communications Networks, edited by Martha E. Steenstrup,
chapter 11, pages 351--396. Prentice-Hall, Englewood Cliffs, chapter 11, pages 351--396. Prentice-Hall, Englewood Cliffs,
New Jersey, 1995. New Jersey, 1995.
[19] David A. Maltz, Josh Broch, Jorjeta Jetcheva, and David B. [21] David A. Maltz, Josh Broch, Jorjeta Jetcheva, and David B.
Johnson. The Effects of On-Demand Behavior in Routing Protocols Johnson. The Effects of On-Demand Behavior in Routing Protocols
for Multi-Hop Wireless Ad Hoc Networks. IEEE Journal on for Multi-Hop Wireless Ad Hoc Networks. IEEE Journal on
Selected Areas of Communications, 17(8):1439--1453, August 1999. Selected Areas of Communications, 17(8):1439--1453, August 1999.
[20] David A. Maltz, Josh Broch, and David B. Johnson. Experiences [22] David A. Maltz, Josh Broch, and David B. Johnson. Experiences
Designing and Building a Multi-Hop Wireless Ad Hoc Network Designing and Building a Multi-Hop Wireless Ad Hoc Network
Testbed. Technical Report CMU-CS-99-116, School of Computer Testbed. Technical Report CMU-CS-99-116, School of Computer
Science, Carnegie Mellon University, Pittsburgh, Pennsylvania, Science, Carnegie Mellon University, Pittsburgh, Pennsylvania,
March 1999. March 1999.
[21] David A. Maltz, Josh Broch, and David B. Johnson. Quantitative [23] David A. Maltz, Josh Broch, and David B. Johnson. Quantitative
Lessons From a Full-Scale Multi-Hop Wireless Ad Hoc Network Lessons From a Full-Scale Multi-Hop Wireless Ad Hoc Network
Testbed. In Proceedings of the IEEE Wireless Communications and Testbed. In Proceedings of the IEEE Wireless Communications and
Networking Conference, September 2000. Networking Conference, September 2000.
[22] David A. Maltz, Josh Broch, and David B. Johnson. Lessons From [24] David A. Maltz, Josh Broch, and David B. Johnson. Lessons From
a Full-Scale MultiHop Wireless Ad Hoc Network Testbed. IEEE a Full-Scale MultiHop Wireless Ad Hoc Network Testbed. IEEE
Personal Communications, 8(1):8--15, February 2001. Personal Communications, 8(1):8--15, February 2001.
[23] The Network Simulator -- ns-2. Project web page available at [25] The Network Simulator -- ns-2. Project web page available at
http://www.isi.edu/nsnam/ns/. http://www.isi.edu/nsnam/ns/.
[24] Radia Perlman. Interconnections: Bridges and Routers. [26] Panagiotis Papadimitratos and Zygmunt J. Haas. Secure Routing
for Mobile Ad Hoc Networks. In SCS Communication Networks and
Distributed Systems Modeling and Simulation Conference (CNDS
2002), January 2002.
[27] Radia Perlman. Interconnections: Bridges and Routers.
Addison-Wesley, Reading, Massachusetts, 1992. Addison-Wesley, Reading, Massachusetts, 1992.
[25] David C. Plummer. An Ethernet Address Resolution Protocol: [28] David C. Plummer. An Ethernet Address Resolution Protocol:
Or Converting Network Protocol Addresses to 48.bit Ethernet Or Converting Network Protocol Addresses to 48.bit Ethernet
Addresses for Transmission on Ethernet Hardware. RFC 826, Addresses for Transmission on Ethernet Hardware. RFC 826,
November 1982. November 1982.
[26] J. B. Postel, editor. Internet Control Message Protocol. [29] J. B. Postel, editor. Internet Control Message Protocol.
RFC 792, September 1981. RFC 792, September 1981.
[27] J. B. Postel, editor. Internet Protocol. RFC 791, September [30] J. B. Postel, editor. Internet Protocol. RFC 791, September
1981. 1981.
[28] J. B. Postel, editor. Transmission Control Protocol. RFC 793, [31] J. B. Postel, editor. Transmission Control Protocol. RFC 793,
September 1981. September 1981.
[29] Joyce K. Reynolds and Jon Postel. Assigned Numbers. RFC 1700, [32] Joyce K. Reynolds and Jon Postel. Assigned Numbers. RFC 1700,
October 1994. See also http://www.iana.org/numbers.html. October 1994. See also http://www.iana.org/numbers.html.
[30] Rice University Monarch Project. Monarch Project Home Page. [33] Rice University Monarch Project. Monarch Project Home Page.
Available at http://www.monarch.cs.rice.edu/. Available at http://www.monarch.cs.rice.edu/.
[31] Alex Song. picoNet II: A Wireless Ad Hoc Network for Mobile [34] Alex Song. picoNet II: A Wireless Ad Hoc Network for Mobile
Handheld Devices. Submitted for the degree of Bachelor of Handheld Devices. Submitted for the degree of Bachelor of
Engineering (Honours) in the division of Electrical Engineering, Engineering (Honours) in the division of Electrical Engineering,
Department of Information Technology and Electrical Engineering, Department of Information Technology and Electrical Engineering,
University of Queensland, Australia, October 2001. Available at University of Queensland, Australia, October 2001. Available at
http://student.uq.edu.au/~s369677/main.html. http://student.uq.edu.au/~s369677/main.html.
[32] Paul Turner. NetWare Communications Processes. NetWare [35] Paul Turner. NetWare Communications Processes. NetWare
Application Notes, Novell Research, pages 25--91, September Application Notes, Novell Research, pages 25--91, September
1990. 1990.
[33] Gary R. Wright and W. Richard Stevens. TCP/IP Illustrated, [36] Gary R. Wright and W. Richard Stevens. TCP/IP Illustrated,
Volume 2: The Implementation. Addison-Wesley, Reading, Volume 2: The Implementation. Addison-Wesley, Reading,
Massachusetts, 1995. Massachusetts, 1995.
Chair's Address Chair's Address
The MANET Working Group can be contacted via its current chairs: The MANET Working Group can be contacted via its current chairs:
M. Scott Corson Phone: +1 908 947-7033 M. Scott Corson Phone: +1 908 947-7033
Flarion Technologies, Inc. Email: corson@flarion.com Flarion Technologies, Inc. Email: corson@flarion.com
Bedminster One Bedminster One
skipping to change at page 81, line 16 skipping to change at page 111, line 16
Questions about this document can also be directed to the authors: Questions about this document can also be directed to the authors:
David B. Johnson Phone: +1 713 348-3063 David B. Johnson Phone: +1 713 348-3063
Rice University Fax: +1 713 348-5930 Rice University Fax: +1 713 348-5930
Computer Science Department, MS 132 Email: dbj@cs.rice.edu Computer Science Department, MS 132 Email: dbj@cs.rice.edu
6100 Main Street 6100 Main Street
Houston, TX 77005-1892 Houston, TX 77005-1892
USA USA
David A. Maltz Phone: +1 650 688-3128 David A. Maltz Phone: +1 412 268-5329
AON Networks Fax: +1 650 688-3119 Carnegie Mellon University Fax: +1 412 268-5576
3045 Park Blvd. Email: dmaltz@cs.cmu.edu Computer Science Department Email: dmaltz@cs.cmu.edu
Palo Alto, CA 94306 5000 Forbes Avenue
Pittsburgh, PA 15213
USA USA
Yih-Chun Hu Phone: +1 412 268-3075 Yih-Chun Hu Phone: +1 412 268-3075
Rice University Fax: +1 412 268-5576 Rice University Fax: +1 412 268-5576
Computer Science Department, MS 132 Email: yihchun@cs.cmu.edu Computer Science Department, MS 132 Email: yihchun@cs.cmu.edu
6100 Main Street 6100 Main Street
Houston, TX 77005-1892 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
USA USA
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/