-
Notifications
You must be signed in to change notification settings - Fork 2
/
draft-ietf-manet-dsr-10.txt
6785 lines (4164 loc) · 259 KB
/
draft-ietf-manet-dsr-10.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
IETF MANET Working Group David B. Johnson, Rice University
INTERNET-DRAFT David A. Maltz, Carnegie Mellon University
19 July 2004 Yih-Chun Hu, Rice University
The Dynamic Source Routing Protocol
for Mobile Ad Hoc Networks (DSR)
<draft-ietf-manet-dsr-10.txt>
Status of This Memo
This document is an Internet-Draft and is subject to all provisions
of Section 10 of RFC 2026.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note
that other groups may also distribute working documents as
Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at
any time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress".
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft is a submission to the IETF Mobile Ad Hoc
Networks (MANET) Working Group. Comments on this draft may be sent
to the Working Group at [email protected], or may be sent
directly to the authors.
Johnson, et al Expires 19 January 2005 [Page i]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
Abstract
The Dynamic Source Routing protocol (DSR) is a simple and efficient
routing protocol designed specifically for use in multi-hop wireless
ad hoc networks of mobile nodes. DSR allows the network to be
completely self-organizing and self-configuring, without the need for
any existing network infrastructure or administration. The protocol
is composed of the two main mechanisms of "Route Discovery" and
"Route Maintenance", which work together to allow nodes to discover
and maintain routes to arbitrary destinations in the ad hoc network.
All aspects of the protocol operate entirely on-demand, allowing
the routing packet overhead of DSR to scale automatically to only
that needed to react to changes in the routes currently in use. The
protocol allows multiple routes to any destination and allows each
sender to select and control the routes used in routing its packets,
for example for use in load balancing or for increased robustness.
Other advantages of the DSR protocol include easily guaranteed
loop-free routing, operation in networks containing unidirectional
links, use of only "soft state" in routing, and very rapid recovery
when routes in the network change. The DSR protocol 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.
This document specifies the operation of the DSR protocol for routing
unicast IPv4 packets.
Johnson, et al Expires 19 January 2005 [Page ii]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
Contents
Status of This Memo i
Abstract ii
1. Introduction 1
2. Assumptions 4
3. DSR Protocol Overview 6
3.1. Basic DSR Route Discovery . . . . . . . . . . . . . . . . 6
3.2. Basic DSR Route Maintenance . . . . . . . . . . . . . . . 9
3.3. Additional Route Discovery Features . . . . . . . . . . . 11
3.3.1. Caching Overheard Routing Information . . . . . . 11
3.3.2. Replying to Route Requests using Cached Routes . 12
3.3.3. Route Request Hop Limits . . . . . . . . . . . . 13
3.4. Additional Route Maintenance Features . . . . . . . . . . 14
3.4.1. Packet Salvaging . . . . . . . . . . . . . . . . 14
3.4.2. Queued Packets Destined over a Broken Link . . . 15
3.4.3. Automatic Route Shortening . . . . . . . . . . . 16
3.4.4. Increased Spreading of Route Error Messages . . . 16
3.5. Optional DSR Flow State Extension . . . . . . . . . . . . 17
3.5.1. Flow Establishment . . . . . . . . . . . . . . . 17
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 . . . . . . . . . . . . . . . . . 21
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 . . . . . . . . 22
4. Conceptual Data Structures 23
4.1. Route Cache . . . . . . . . . . . . . . . . . . . . . . . 23
4.2. Send Buffer . . . . . . . . . . . . . . . . . . . . . . . 26
4.3. Route Request Table . . . . . . . . . . . . . . . . . . . 27
4.4. Gratuitous Route Reply Table . . . . . . . . . . . . . . 28
4.5. Network Interface Queue and Maintenance Buffer . . . . . 29
4.6. Blacklist . . . . . . . . . . . . . . . . . . . . . . . . 30
Johnson, et al Expires 19 January 2005 [Page iii]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
5. Additional Conceptual Data Structures for Flow State Extension 31
5.1. Flow Table . . . . . . . . . . . . . . . . . . . . . . . 31
5.2. Automatic Route Shortening Table . . . . . . . . . . . . 32
5.3. Default Flow ID Table . . . . . . . . . . . . . . . . . . 32
6. DSR Options Header Format 34
6.1. Fixed Portion of DSR Options Header . . . . . . . . . . . 35
6.2. Route Request Option . . . . . . . . . . . . . . . . . . 38
6.3. Route Reply Option . . . . . . . . . . . . . . . . . . . 40
6.4. Route Error Option . . . . . . . . . . . . . . . . . . . 42
6.4.1. Node Unreachable Type-Specific Information . . . 44
6.4.2. Flow State Not Supported Type-Specific Information 44
6.4.3. Option Not Supported Type-Specific Information . 44
6.5. Acknowledgement Request Option . . . . . . . . . . . . . 45
6.6. Acknowledgement Option . . . . . . . . . . . . . . . . . 46
6.7. DSR Source Route Option . . . . . . . . . . . . . . . . . 47
6.8. Pad1 Option . . . . . . . . . . . . . . . . . . . . . . . 49
6.9. PadN Option . . . . . . . . . . . . . . . . . . . . . . . 50
7. Additional Header Formats and Options for Flow State Extension 51
7.1. DSR Flow State Header . . . . . . . . . . . . . . . . . . 52
7.2. New Options and Extensions in DSR Options Header . . . . 53
7.2.1. Timeout Option . . . . . . . . . . . . . . . . . 53
7.2.2. Destination and Flow ID Option . . . . . . . . . 54
7.3. New Error Types for Route Error Option . . . . . . . . . 55
7.3.1. Unknown Flow Type-Specific Information . . . . . 55
7.3.2. Default Flow Unknown Type-Specific Information . 56
7.4. New Acknowledgement Request Option Extension . . . . . . 57
7.4.1. Previous Hop Address Extension . . . . . . . . . 57
8. Detailed Operation 58
8.1. General Packet Processing . . . . . . . . . . . . . . . . 58
8.1.1. Originating a Packet . . . . . . . . . . . . . . 58
8.1.2. Adding a DSR Options Header to a Packet . . . . . 58
8.1.3. Adding a DSR Source Route Option to a Packet . . 59
8.1.4. Processing a Received Packet . . . . . . . . . . 60
8.1.5. Processing a Received DSR Source Route Option . . 62
8.1.6. Handling an Unknown DSR Option . . . . . . . . . 64
8.2. Route Discovery Processing . . . . . . . . . . . . . . . 66
8.2.1. Originating a Route Request . . . . . . . . . . . 66
8.2.2. Processing a Received Route Request Option . . . 68
8.2.3. Generating a Route Reply using the Route Cache . 70
8.2.4. Originating a Route Reply . . . . . . . . . . . . 72
8.2.5. Preventing Route Reply Storms . . . . . . . . . . 74
8.2.6. Processing a Received Route Reply Option . . . . 75
8.3. Route Maintenance Processing . . . . . . . . . . . . . . 77
Johnson, et al Expires 19 January 2005 [Page iv]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
8.3.1. Using Link-Layer Acknowledgements . . . . . . . . 77
8.3.2. Using Passive Acknowledgements . . . . . . . . . 78
8.3.3. Using Network-Layer Acknowledgements . . . . . . 79
8.3.4. Originating a Route Error . . . . . . . . . . . . 82
8.3.5. Processing a Received Route Error Option . . . . 83
8.3.6. Salvaging a Packet . . . . . . . . . . . . . . . 84
8.4. Multiple Network Interface Support . . . . . . . . . . . 86
8.5. IP Fragmentation and Reassembly . . . . . . . . . . . . . 87
8.6. Flow State Processing . . . . . . . . . . . . . . . . . . 88
8.6.1. Originating a Packet . . . . . . . . . . . . . . 88
8.6.2. Inserting a DSR Flow State Header . . . . . . . . 90
8.6.3. Receiving a Packet . . . . . . . . . . . . . . . 90
8.6.4. Forwarding a Packet Using Flow IDs . . . . . . . 95
8.6.5. Promiscuously Receiving a Packet . . . . . . . . 95
8.6.6. Operation where the Layer below DSR Decreases
the IP TTL Non-Uniformly . . . . . . . . . 96
8.6.7. Salvage Interactions with DSR . . . . . . . . . . 96
9. Protocol Constants and Configuration Variables 97
10. IANA Considerations 98
11. Security Considerations 99
Appendix A. Link-MaxLife Cache Description 100
Appendix B. Location of DSR in the ISO Network Reference Model 102
Appendix C. Implementation and Evaluation Status 103
Changes from Previous Version of the Draft 105
Acknowledgements 106
References 107
Chair's Address 111
Authors' Addresses 112
Johnson, et al Expires 19 January 2005 [Page v]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
1. Introduction
The Dynamic Source Routing protocol (DSR) [15, 16] is a simple and
efficient routing protocol designed specifically for use in multi-hop
wireless ad hoc networks of mobile nodes. Using DSR, the network
is completely self-organizing and self-configuring, requiring no
existing network infrastructure or administration. Network nodes
cooperate to forward packets for each other to allow communication
over multiple "hops" between nodes not directly within wireless
transmission range of one another. As nodes in the network move
about or join or leave the network, and as wireless transmission
conditions such as sources of interference change, all routing is
automatically determined and maintained by the DSR routing protocol.
Since the number or sequence of intermediate hops needed to reach any
destination may change at any time, the resulting network topology
may be quite rich and rapidly changing.
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
the network. The DSR protocol provides highly reactive service in
order to help ensure successful delivery of data packets in spite of
node movement or other changes in network conditions.
The DSR protocol is composed of two main mechanisms that work
together to allow the discovery and maintenance of source routes in
the ad hoc network:
- 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 Discovery is used only when S attempts to send a
packet to D and does not already know a route to D.
- Route Maintenance is the mechanism by which node S is able
to detect, while using a source route to D, if the network
topology has changed such that it can no longer use its route
to D because a link along the route no longer works. When Route
Maintenance indicates a source route is broken, S can attempt to
use any other route it happens to know to D, or can invoke Route
Discovery again to find a new route for subsequent packets to D.
Route Maintenance for this route is used only when S is actually
sending packets to D.
In DSR, Route Discovery and Route Maintenance each operate entirely
"on demand". In particular, unlike other protocols, DSR requires no
periodic packets of any kind at any layer within the network. For
example, DSR does not use any periodic routing advertisement, link
status sensing, or neighbor detection packets, and does not rely on
these functions from any underlying protocols in the network. This
entirely on-demand behavior and lack of periodic activity allows
the number of overhead packets caused by DSR to scale all the way
Johnson, et al Expires 19 January 2005 [Page 1]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
down to zero, when all nodes are approximately stationary with
respect to each other and all routes needed for current communication
have already been discovered. As nodes begin to move more or
as communication patterns change, the routing packet overhead of
DSR automatically scales to only that needed to track the routes
currently in use. Network topology changes not affecting routes
currently in use are ignored and do not cause reaction from the
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
information from other packets overheard), a node may learn and
cache multiple routes to any destination. This support for multiple
routes allows the reaction to routing changes to be much more rapid,
since a node with multiple routes to a destination can try another
cached route if the one it has been using should fail. This caching
of multiple routes also avoids the overhead of needing to perform a
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
are designed to allow unidirectional links and asymmetric routes to
be supported. In particular, as noted in Section 2, in wireless
networks, it is possible that a link between two nodes may not
work equally well in both directions, due to differing antenna or
propagation patterns or sources of interference.
This document specifies the operation of the DSR protocol for
routing unicast IPv4 packets in multi-hop wireless ad hoc networks.
Advanced, optional features, such as Quality of Service (QoS) support
and efficient multicast routing, and operation of DSR with IPv6 [7],
are covered in other documents. The specification of DSR in this
document provides a compatible base on which such features can be
Johnson, et al Expires 19 January 2005 [Page 2]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
added, either independently or by integration with the DSR operation
specified here.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [4].
Johnson, et al Expires 19 January 2005 [Page 3]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
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
other nodes within the ad hoc network are willing to participate
fully in the protocols of the network. In particular, each node
participating in the ad hoc network SHOULD also be willing to forward
packets for other nodes in the network.
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
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.,
perhaps 5 or 10 hops), but may often be greater than 1.
Packets may be lost or corrupted in transmission on the wireless
network. We assume that a node receiving a corrupted packet can
detect the error and discard the packet.
Nodes within the ad hoc network MAY move at any time without notice,
and MAY even move continuously, but we assume that the speed with
which nodes move is moderate with respect to the packet transmission
latency and wireless transmission range of the particular underlying
network hardware in use. In particular, DSR can support very
rapid rates of arbitrary node mobility, but we assume that nodes do
not continuously move so rapidly as to make the flooding of every
individual data packet the only possible routing protocol.
A common feature of many network interfaces, including most current
LAN hardware for broadcast media such as wireless, is the ability
to operate the network interface in "promiscuous" receive mode.
This mode causes the hardware to deliver every received packet to
the network driver software without filtering based on link-layer
destination address. Although we do not require this facility, some
of our optimizations can take advantage of its availability. Use
of promiscuous mode does increase the software overhead on the CPU,
but we believe that wireless network speeds are more the inherent
limiting factor to performance in current and future systems; we also
believe that portions of the protocol are suitable for implementation
directly within a programmable network interface unit to avoid this
overhead on the CPU [16]. Use of promiscuous mode may also increase
the power consumption of the network interface hardware, depending
on the design of the receiver hardware, and in such cases, DSR can
easily be used without the optimizations that depend on promiscuous
receive mode, or can be programmed to only periodically switch the
Johnson, et al Expires 19 January 2005 [Page 4]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
interface into promiscuous mode. Use of promiscuous receive mode is
entirely optional.
Wireless communication ability between any pair of nodes may at
times not work equally well in both directions, due for example to
differing antenna or propagation patterns or sources of interference
around the two nodes [1, 20]. That is, wireless communications
between each pair of nodes will in many cases be able to operate
bidirectionally, but at times the wireless link between two nodes
may be only unidirectional, allowing one node to successfully
send packets to the other while no communication is possible
in the reverse direction. Some MAC protocols, however, such as
MACA [19], MACAW [2], or IEEE 802.11 [13], limit unicast data
packet transmission to bidirectional links, due to the required
bidirectional exchange of RTS and CTS 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 these, DSR can take advantage
of additional optimizations, such as the ability to reverse a source
route to obtain a route back to the origin of the original route.
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
assignment [8]), although the method of such assignment is outside
the scope of this specification.
A routing protocol such as DSR chooses a next-hop for each packet
and provides the IP address of that next-hop. When the packet
is transmitted, however, the lower-layer protocol often has a
separate, MAC-layer address for the next-hop node. DSR uses the
Address Resolution Protocol (ARP) [30] to translate from next-hop IP
addresses to next-hop MAC addresses. In addition, a node MAY add
an entry to its ARP cache based on any received packet, when the IP
address and MAC address of the transmitting node are available in
the packet; for example, the IP address of the transmitting node
is present in a Route Request option (in the Address list being
accumulated) and any packets containing a source route. Adding
entries to the ARP cache in this way avoids the overhead of ARP in
most cases.
Johnson, et al Expires 19 January 2005 [Page 5]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
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
When some source node originates a new packet addressed to some
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
follow on its way to the destination. Normally, the sender will
obtain a suitable source route by searching its "Route Cache" of
routes previously learned; if no route is found in its cache, it will
initiate the Route Discovery protocol to dynamically find a new route
to this destination node. In this case, we call the source node
the "initiator" and the destination node the "target" of the Route
Discovery.
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
would proceed as follows:
^ "A" ^ "A,B" ^ "A,B,C" ^ "A,B,C,D"
| id=2 | id=2 | id=2 | id=2
+-----+ +-----+ +-----+ +-----+ +-----+
| A |---->| B |---->| C |---->| D |---->| E |
+-----+ +-----+ +-----+ +-----+ +-----+
| | | |
v v v v
To initiate the Route Discovery, node A transmits a "Route
Request" as a single local broadcast packet, which is received by
(approximately) all nodes currently within wireless transmission
Johnson, et al Expires 19 January 2005 [Page 6]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
range of A, including node B in this example. Each Route Request
identifies the initiator and target of the Route Discovery, and
also contains a unique request identification (2, in this example),
determined by the initiator of the Request. Each Route Request also
contains a record listing the address of each intermediate node
through which this particular copy of the Route Request has been
forwarded. This route record is initialized to an empty list by the
initiator of the Route Discovery. In this example, the route record
initially lists only node A.
When another node receives this Route Request (such as node B in this
example), if it is the target of the Route Discovery, it returns
a "Route Reply" to the initiator of the Route Discovery, giving
a copy of the accumulated route record from the Route Request;
when the initiator receives this Route Reply, it caches this route
in its Route Cache for use in sending subsequent packets to this
destination.
Otherwise, if this node receiving the Route Request has recently seen
another Route Request message from this initiator bearing this same
request identification and target address, or if this node's own
address is already listed in the route record in the Route Request,
this node discards the Request. (A node considers a Request recently
seen if it still has information about that Request in its Route
Request Table, which is described in Section 4.3.) Otherwise, this
node appends its own address to the route record in the Route Request
and propagates it by transmitting it as a local broadcast packet
(with the same request identification). In this example, node B
broadcast the Route Request, which is received by node C; nodes C
and D each also, in turn, broadcast the Request, resulting in a copy
of the Request being received by node E.
In returning the Route Reply to the initiator of the Route Discovery,
such as in this example, node E replying back to node A, node E will
typically examine its own Route Cache for a route back to A, and if
found, will use it for the source route for delivery of the packet
containing the Route Reply. Otherwise, E SHOULD perform its own
Route Discovery for target node A, but to avoid possible infinite
recursion of Route Discoveries, it MUST piggyback this Route Reply
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
packet [33], on a Route Request using this same mechanism.
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
the source route on the packet carrying the Route Reply itself. For
MAC protocols such as IEEE 802.11 that require a bidirectional frame
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
tests the discovered route to ensure it is bidirectional before the
Johnson, et al Expires 19 January 2005 [Page 7]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
Route Discovery initiator begins using the route; this route reversal
also avoids the overhead of a possible second Route Discovery.
When initiating a Route Discovery, the sending node saves a copy of
the original packet (that triggered the Discovery) in a local buffer
called the "Send Buffer". The Send Buffer contains a copy of each
packet that cannot be transmitted by this node because it does not
yet have a source route to the packet's destination. Each packet in
the Send Buffer is logically associated with the time that it was
placed into the Send Buffer and is discarded after residing in the
Send Buffer for some timeout period SendBufferTimeout; if necessary
for preventing the Send Buffer from overflowing, a FIFO or other
replacement strategy MAY also be used to evict packets even before
they expire.
While a packet remains in the Send Buffer, the node SHOULD
occasionally initiate a new Route Discovery for the packet's
destination address. However, the node MUST limit the rate at which
such new Route Discoveries for the same address are initiated (as
described in Section 4.3), since it is possible that the destination
node is not currently reachable. In particular, due to the limited
wireless transmission range and the movement of the nodes in the
network, the network may at times become partitioned, meaning that
there is currently no sequence of nodes through which a packet could
be forwarded to reach the destination. Depending on the movement
pattern and the density of nodes in the network, such network
partitions may be rare or may be common.
If a new Route Discovery was initiated for each packet sent by a
node in such a partitioned network, a large number of unproductive
Route Request packets would be propagated throughout the subset
of the ad hoc network reachable from this node. In order to
reduce the overhead from such Route Discoveries, a node SHOULD use
an exponential back-off algorithm to limit the rate at which it
initiates new Route Discoveries for the same target, doubling the
timeout between each successive Discovery initiated for the same
target. If the node attempts to send additional data packets to this
same destination node more frequently than this limit, the subsequent
packets SHOULD be buffered in the Send Buffer until a Route Reply is
received giving a route to this destination, but the node MUST NOT
initiate a new Route Discovery until the minimum allowable interval
between new Route Discoveries for this target has been reached. This
limitation on the maximum rate of Route Discoveries for the same
target is similar to the mechanism required by Internet nodes to
limit the rate at which ARP Requests are sent for any single target
IP address [3].
Johnson, et al Expires 19 January 2005 [Page 8]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
3.2. Basic DSR Route Maintenance
When originating or forwarding a packet using a source route, each
node transmitting the packet is responsible for confirming that data
can flow over the link from that node to the next hop. For example,
in the situation shown below, node A has originated a packet for
node E using a source route through intermediate nodes B, C, and D:
+-----+ +-----+ +-----+ +-----+ +-----+
| A |---->| B |---->| C |-->? | D | | E |
+-----+ +-----+ +-----+ +-----+ +-----+
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
the link from C to D, node D is responsible for the link from D to E.
An acknowledgement can provide confirmation that a link is capable of
carrying data, and in wireless networks, acknowledgements are often
provided at no cost, either as an existing standard part of the MAC
protocol in use (such as the link-layer acknowledgement frame defined
by IEEE 802.11 [13]), or by a "passive acknowledgement" [18] (in
which, for example, B confirms receipt at C by overhearing C transmit
the packet when forwarding it on to D).
If a built-in acknowledgement mechanism is not available, the
node transmitting the packet can explicitly request a DSR-specific
software acknowledgement be returned by the next node along the
route; this software acknowledgement will normally be transmitted
directly to the sending node, but if the link between these two nodes
is unidirectional (Section 4.6), this software acknowledgement could
travel over a different, multi-hop path.
After an acknowledgement has been received from some neighbor, a node
MAY choose to not require acknowledgements from that neighbor for a
brief period of time, unless the network interface connecting a node
to that neighbor always receives an acknowledgement in response to
unicast traffic.
When a software acknowledgement is used, the acknowledgement
request SHOULD be retransmitted up to a maximum number of times.
A retransmission of the acknowledgement request can be sent as a
separate packet, piggybacked on a retransmission of the original
data packet, or piggybacked on any packet with the same next-hop
destination that does not also contain a software acknowledgement.
After the acknowledgement request has been retransmitted the maximum
number of times, if no acknowledgement has been received, then the
sender treats the link to this next-hop destination as currently
"broken". It SHOULD remove this link from its Route Cache and
SHOULD return a "Route Error" to each node that has sent a packet
Johnson, et al Expires 19 January 2005 [Page 9]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
routed over that link since an acknowledgement was last received.
For example, in the situation shown above, if C does not receive
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
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
retransmission of the original packet can be performed by upper
layer protocols such as TCP, if necessary. For sending such a
retransmission or other packets to this same destination E, if A has
in its Route Cache another route to E (for example, from additional
Route Replies from its earlier Route Discovery, or from having
overheard sufficient routing information from other packets), it
can send the packet using the new route immediately. Otherwise, it
SHOULD perform a new Route Discovery for this target (subject to the
back-off described in Section 3.1).
Johnson, et al Expires 19 January 2005 [Page 10]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
3.3. Additional Route Discovery Features
3.3.1. Caching Overheard Routing Information
A node forwarding or otherwise overhearing any packet SHOULD add all
usable routing information from that packet to its own Route Cache.
The usefulness of routing information in a packet depends on the
directionality characteristics of the physical medium (Section 2), as
well as the MAC protocol being used. Specifically, three distinct
cases are possible:
- Links in the network frequently are capable of operating only
unidirectionally (not bidirectionally), and the MAC protocol in
use in the network is capable of transmitting unicast packets
over unidirectional links.
- Links in the network occasionally are capable of operating only
unidirectionally (not bidirectionally), but this unidirectional
restriction on any link is not persistent, almost all links
are physically bidirectional, and the MAC protocol in use in
the network is capable of transmitting unicast packets over
unidirectional links.
- The MAC protocol in use in the network is not capable of
transmitting unicast packets over unidirectional links;
only bidirectional links can be used by the MAC protocol for
transmitting unicast packets. For example, the IEEE 802.11
Distributed Coordination Function (DCF) MAC protocol [13]
is capable of transmitting a unicast packet only over a
bidirectional link, since the MAC protocol requires the return of
a link-level acknowledgement packet from the receiver and also
optionally requires the bidirectional exchange of an RTS and CTS
packet between the transmitter and receiver nodes.
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
being returned in a Route Reply SHOULD all be cached by any node in
the "forward" direction; any node SHOULD cache this information from
any such packet received, whether the packet was addressed to this
node, sent to a broadcast (or multicast) MAC address, or overheard
while the node's network interface is in promiscuous mode. However,
the "reverse" direction of the links identified in such packet
headers SHOULD NOT be cached.
Johnson, et al Expires 19 January 2005 [Page 11]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
For example, in the situation shown below, node A is using a source
route to communicate with node E:
+-----+ +-----+ +-----+ +-----+ +-----+
| A |---->| B |---->| C |---->| D |---->| E |
+-----+ +-----+ +-----+ +-----+ +-----+
As node C forwards a data packet along the route from A to E, it
SHOULD add to its cache the presence of the "forward" direction
links that it learns from the headers of these packets, from itself
to D and from D to E. Node C SHOULD NOT, in this case, cache the
"reverse" direction of the links identified in these packet headers,
from itself back to B and from B to A, since these links might be
unidirectional.
In the second case above, in which links may occasionally operate
unidirectionally, the links described above SHOULD be cached in both
directions. Furthermore, in this case, if node X overhears (e.g.,
through promiscuous mode) a packet transmitted by node C that is
using a source route from node A to E, node X SHOULD cache all of
these links as well, also including the link from C to X over which
it overheard the packet.
In the final case, in which the MAC protocol requires physical
bidirectionality for unicast operation, links from a source route
SHOULD be cached in both directions, except when the packet also
contains a Route Reply, in which case only the links already
traversed in this source route SHOULD be cached, but the links not
yet traversed in this route SHOULD NOT be cached.
3.3.2. Replying to Route Requests using Cached Routes
A node receiving a Route Request for which it is not the target,
searches its own Route Cache for a route to the target of the
Request. If found, the node generally returns a Route Reply to the
initiator itself rather than forwarding the Route Request. In the
Route Reply, this node sets the route record to list the sequence of
hops over which this copy of the Route Request was forwarded to it,
concatenated with the source route to this target obtained from its
own Route Cache.
However, before transmitting a Route Reply packet that was generated
using information from its Route Cache in this way, a node MUST
verify that the resulting route being returned in the Route Reply,
after this concatenation, contains no duplicate nodes listed in the
route record. For example, the figure below illustrates a case in
Johnson, et al Expires 19 January 2005 [Page 12]
INTERNET-DRAFT The Dynamic Source Routing Protocol 19 July 2004
which a Route Request for target E has been received by node F, and
node F already has in its Route Cache a route from itself to E:
+-----+ +-----+ +-----+ +-----+
| A |---->| B |- >| D |---->| E |
+-----+ +-----+ \ / +-----+ +-----+
\ /
\ +-----+ /
>| C |-
+-----+
| ^