idnits 2.17.1 draft-ietf-6lo-minimal-fragment-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 30, 2019) is 1701 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-21) exists of draft-ietf-6lo-fragment-recovery-05 == Outdated reference: A later version (-02) exists of draft-ietf-lwig-6lowpan-virtual-reassembly-01 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 6lo T. Watteyne, Ed. 3 Internet-Draft Analog Devices 4 Intended status: Informational C. Bormann 5 Expires: March 2, 2020 Universitaet Bremen TZI 6 P. Thubert 7 Cisco 8 August 30, 2019 10 6LoWPAN Fragment Forwarding 11 draft-ietf-6lo-minimal-fragment-04 13 Abstract 15 This document provides a simple method to forwarding 6LoWPAN 16 fragments. When employing adaptation layer fragmentation in 6LoWPAN, 17 it may be beneficial for a forwarder not to have to reassemble each 18 packet in its entirety before forwarding it. This has always been 19 possible with the original fragmentation design of RFC4944. This 20 method reduces the latency and increases end-to-end reliability in 21 route-over forwarding. It is the companion to the virtual Reassembly 22 Buffer which is a pure implementation technique. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at https://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on March 2, 2020. 41 Copyright Notice 43 Copyright (c) 2019 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (https://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Overview of 6LoWPAN Fragmentation . . . . . . . . . . . . . . 2 59 2. Limits of Per-Hop Fragmentation and Reassembly . . . . . . . 4 60 2.1. Latency . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 2.2. Memory Management and Reliability . . . . . . . . . . . . 4 62 3. Virtual Reassembly Buffer (VRB) Implementation . . . . . . . 5 63 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 64 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 65 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 6 66 7. Informative References . . . . . . . . . . . . . . . . . . . 7 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 69 1. Overview of 6LoWPAN Fragmentation 71 The original 6LoWPAN fragmentation is defined in [RFC4944] and it is 72 implicitly defined for use over a single IP hop though possibly 73 multiple Layer-2 hops in a meshed 6LoWPAN Network. Although 74 [RFC6282] updates [RFC4944], it does not redefine 6LoWPAN 75 fragmentation. 77 We use Figure 1 to illustrate 6LoWPAN fragmentation. We assume node 78 A forwards a packet to node B, possibly as part of a multi-hop route 79 between IPv6 source and destination nodes which are neither A nor B. 81 +---+ +---+ 82 ... ---| A |-------------------->| B |--- ... 83 +---+ +---+ 84 # (frag. 5) 86 123456789 123456789 87 +---------+ +---------+ 88 | # ###| |### # | 89 +---------+ +---------+ 90 outgoing incoming 91 fragmentation reassembly 92 buffer buffer 94 Figure 1: Fragmentation at node A, reassembly at node B. 96 Node A starts by compacting the IPv6 packet using the header 97 compression mechanism defined in [RFC6282]. If the resulting 6LoWPAN 98 packet does not fit into a single link-layer frame, node A's 6LoWPAN 99 sublayer cuts it into multiple 6LoWPAN fragments, which it transmits 100 as separate link-layer frames to node B. Node B's 6LoWPAN sublayer 101 reassembles these fragments, inflates the compressed header fields 102 back to the original IPv6 header, and hands over the full IPv6 packet 103 to its IPv6 layer. 105 In Figure 1, a packet forwarded by node A to node B is cut into nine 106 fragments, numbered 1 to 9. Each fragment is represented by the '#' 107 symbol. Node A has sent fragments 1, 2, 3, 5, 6 to node B. Node B 108 has received fragments 1, 2, 3, 6 from node A. Fragment 5 is still 109 being transmitted at the link layer from node A to node B. 111 The reassembly buffer for 6LoWPAN is indexed in node B by: 113 o a unique Identifier of Node A (e.g., Node A's link-layer address) 114 o the datagram_tag chosen by node A for this fragmented datagram 116 Because it may be hard for node B to correlate all possible link- 117 layer addresses that node A may use (e.g., short vs. long addresses), 118 node A must use the same link-layer address to send all the fragments 119 of a same datagram to node B. 121 Conceptually, the reassembly buffer in node B contains, assuming that 122 node B is neither the source nor the final destination: 124 o a datagram_tag as received in the incoming fragments, associated 125 to link-layer address of node A for which the received 126 datagram_tag is unique, 127 o the link-layer address that node B uses to forward the fragments 128 o the link-layer address of the next hop that is resolved on the 129 first fragment 130 o a datagram_tag that node B uniquely allocated for this datagram 131 and that is used when forwarding the fragments of the datagram 132 o the actual packet data from the fragments received so far, in a 133 form that makes it possible to detect when the whole packet has 134 been received and can be processed or forwarded, 135 o a datagram_size, 136 o a buffer for the remainder of a previous fragment left to be sent, 137 o a timer that allows discarding a partially reassembled packet 138 after some timeout. 140 A fragmentation header is added to each fragment; it indicates what 141 portion of the packet that fragment corresponds to. Section 5.3 of 142 [RFC4944] defines the format of the header for the first and 143 subsequent fragments. All fragments are tagged with a 16-bit 144 "datagram_tag", used to identify which packet each fragment belongs 145 to. Each datagram can be uniquely identified by the sender link- 146 layer addresses of the frame that carries it and the datagram_tag 147 that the sender allocated for this datagram. Each fragment can be 148 identified within its datagram by the datagram-offset. 150 Node B's typical behavior, per [RFC4944], is as follows. Upon 151 receiving a fragment from node A with a datagram_tag previously 152 unseen from node A, node B allocates a buffer large enough to hold 153 the entire packet. The length of the packet is indicated in each 154 fragment (the datagram_size field), so node B can allocate the buffer 155 even if the first fragment it receives is not fragment 1. As 156 fragments come in, node B fills the buffer. When all fragments have 157 been received, node B inflates the compressed header fields into an 158 IPv6 header, and hands the resulting IPv6 packet to the IPv6 layer. 160 This behavior typically results in per-hop fragmentation and 161 reassembly. That is, the packet is fully reassembled, then 162 (re)fragmented, at every hop. 164 2. Limits of Per-Hop Fragmentation and Reassembly 166 There are at least 2 limits to doing per-hop fragmentation and 167 reassembly. See [ARTICLE] for detailed simulation results on both 168 limits. 170 2.1. Latency 172 When reassembling, a node needs to wait for all the fragments to be 173 received before being able to generate the IPv6 packet, and possibly 174 forward it to the next hop. This repeats at every hop. 176 This may result in increased end-to-end latency compared to a case 177 where each fragment is forwarded without per-hop reassembly. 179 2.2. Memory Management and Reliability 181 Constrained nodes have limited memory. Assuming 1 kB reassembly 182 buffer, typical nodes only have enough memory for 1-3 reassembly 183 buffers. 185 To illustrate this we use the topology from Figure 2, where nodes A, 186 B, C and D all send packets through node E. We further assume that 187 node E's memory can only hold 3 reassembly buffers. 189 +---+ +---+ 190 ... --->| A |------>| B | 191 +---+ +---+\ 192 \ 193 +---+ +---+ 194 | E |--->| F | ... 195 +---+ +---+ 196 / 197 / 198 +---+ +---+ 199 ... --->| C |------>| D | 200 +---+ +---+ 202 Figure 2: Illustrating the Memory Management Issue. 204 When nodes A, B and C concurrently send fragmented packets, all 3 205 reassembly buffers in node E are occupied. If, at that moment, node 206 D also sends a fragmented packet, node E has no option but to drop 207 one of the packets, lowering end-to-end reliability. 209 3. Virtual Reassembly Buffer (VRB) Implementation 211 Virtual Reassembly Buffer (VRB) is the implementation technique 212 described in [I-D.ietf-lwig-6lowpan-virtual-reassembly] in which a 213 forwarder does not reassemble each packet in its entirety before 214 forwarding it. 216 VRB overcomes the limits listed in Section 2. Nodes do not wait for 217 the last fragment before forwarding, reducing end-to-end latency. 218 Similarly, the memory footprint of VRB is just the VRB table, 219 reducing the packet drop probability significantly. 221 There are, however, limits: 223 Non-zero Packet Drop Probability: The abstract data in a VRB table 224 entry contains at a minimum the MAC address of the predecessor 225 and that of the successor, the datagram_tag used by the 226 predecessor and the local datagram_tag that this node will swap 227 with it. The VRB may need to store a few octets from the last 228 fragment that may not have fit within MTU and that will be 229 prepended to the next fragment. This yields a small footprint 230 that is 2 orders of magnitude smaller compared to needing a 231 1280-byte reassembly buffer for each packet. Yet, the size of 232 the VRB table necessarily remains finite. In the extreme case 233 where a node is required to concurrently forward more packets 234 that it has entries in its VRB table, packets are dropped. 235 No Fragment Recovery: There is no mechanism in VRB for the node that 236 reassembles a packet to request a single missing fragment. 238 Dropping a fragment requires the whole packet to be resent. This 239 causes unnecessary traffic, as fragments are forwarded even when 240 the destination node can never construct the original IPv6 241 packet. 242 No Per-Fragment Routing: All subsequent fragments follow the same 243 sequence of hops from the source to the destination node as the 244 first fragment, because the IP header is required to route the 245 fragment and is only present in the first fragment. A side 246 effect is that the first fragment must always be forwarded first. 248 The severity and occurrence of these limits depends on the link-layer 249 used. Whether these limits are acceptable depends entirely on the 250 requirements the application places on the network. 252 If the limits are present and not acceptable for the application, 253 future specifications may define new protocols to overcome these 254 limits. One example is [I-D.ietf-6lo-fragment-recovery] which 255 defines a protocol which allows fragment recovery. 257 4. Security Considerations 259 An attacker can perform a Denial-of-Service (DoS) attack on a node 260 implementing VRB by generating a large number of bogus "fragment 1" 261 fragments without sending subsequent fragments. This causes the VRB 262 table to fill up. Note that the VRB does not need to remember the 263 full datagram as received so far but only possibly a few octets from 264 the last fragment that could not fit in it. It is expected that an 265 implementation protects itself to keep the number of VRBs within 266 capacity, and that old VRBs are protected by a timer of a reasonable 267 duration for the technology and destroyed upon timeout. 269 Secure joining and the link-layer security that it sets up protects 270 against those attacks from network outsiders. 272 5. IANA Considerations 274 No requests to IANA are made by this document. 276 6. Acknowledgments 278 The authors would like to thank Yasuyuki Tanaka, for his in-depth 279 review of this document. Also many thanks to Georgies Papadopoulos 280 and Dominique Barthel for their own reviews. 282 7. Informative References 284 [ARTICLE] Tanaka, Y., Minet, P., and T. Watteyne, "6LoWPAN Fragment 285 Forwarding", IEEE Communications Standards Magazine , 286 2019. 288 [I-D.ietf-6lo-fragment-recovery] 289 Thubert, P., "6LoWPAN Selective Fragment Recovery", draft- 290 ietf-6lo-fragment-recovery-05 (work in progress), July 291 2019. 293 [I-D.ietf-lwig-6lowpan-virtual-reassembly] 294 Bormann, C. and T. Watteyne, "Virtual reassembly buffers 295 in 6LoWPAN", draft-ietf-lwig-6lowpan-virtual-reassembly-01 296 (work in progress), March 2019. 298 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 299 "Transmission of IPv6 Packets over IEEE 802.15.4 300 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 301 . 303 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 304 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 305 DOI 10.17487/RFC6282, September 2011, 306 . 308 Authors' Addresses 310 Thomas Watteyne (editor) 311 Analog Devices 312 32990 Alvarado-Niles Road, Suite 910 313 Union City, CA 94587 314 USA 316 Email: thomas.watteyne@analog.com 318 Carsten Bormann 319 Universitaet Bremen TZI 320 Postfach 330440 321 Bremen D-28359 322 Germany 324 Email: cabo@tzi.org 325 Pascal Thubert 326 Cisco Systems, Inc 327 Building D 328 45 Allee des Ormes - BP1200 329 MOUGINS - Sophia Antipolis 06254 330 France 332 Email: pthubert@cisco.com