idnits 2.17.1 draft-ietf-beep-tcpmapping-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 227: '... SHOULD NOT shrink the window, i.e.,...' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 22, 2000) is 8640 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-11) exists of draft-ietf-beep-framework-00 ** Obsolete normative reference: RFC 793 (ref. '2') (Obsoleted by RFC 9293) Summary: 6 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M.T. Rose 3 Internet-Draft Invisible Worlds, Inc. 4 Expires: February 20, 2001 August 22, 2000 6 Mapping the BXXP Framework onto TCP 7 draft-ietf-beep-tcpmapping-00 9 Status of this Memo 11 This document is an Internet-Draft and is in full conformance with 12 all provisions of Section 10 of RFC2026. 14 Internet-Drafts are working documents of the Internet Engineering 15 Task Force (IETF), its areas, and its working groups. Note that 16 other groups may also distribute working documents as 17 Internet-Drafts. 19 Internet-Drafts are draft documents valid for a maximum of six 20 months and may be updated, replaced, or obsoleted by other documents 21 at any time. It is inappropriate to use Internet-Drafts as reference 22 material or to cite them other than as "work in progress." 24 The list of current Internet-Drafts can be accessed at 25 http://www.ietf.org/ietf/1id-abstracts.txt. 27 The list of Internet-Draft Shadow Directories can be accessed at 28 http://www.ietf.org/shadow.html. 30 This Internet-Draft will expire on February 20, 2001. 32 Copyright Notice 34 Copyright (C) The Internet Society (2000). All Rights Reserved. 36 Abstract 38 This memo describes how a BXXP session is mapped onto a single TCP 39 connection. 41 Table of Contents 43 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 44 2. Session Management . . . . . . . . . . . . . . . . . . . . . 4 45 3. Data Exchange . . . . . . . . . . . . . . . . . . . . . . . 5 46 3.1 Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 6 47 3.1.1 Channel Creation . . . . . . . . . . . . . . . . . . . . . . 6 48 3.1.2 Sending REQ or RSP Messages . . . . . . . . . . . . . . . . 7 49 3.1.3 Processing SEQ Frames . . . . . . . . . . . . . . . . . . . 8 50 3.1.4 Use of Flow Control . . . . . . . . . . . . . . . . . . . . 9 51 References . . . . . . . . . . . . . . . . . . . . . . . . . 10 52 Author's Address . . . . . . . . . . . . . . . . . . . . . . 10 53 A. Changes from draft-mrose-bxxp-tcp-01 . . . . . . . . . . . . 11 54 B. Changes from draft-mrose-bxxp-tcpmapping-00 . . . . . . . . 12 55 C. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13 56 Full Copyright Statement . . . . . . . . . . . . . . . . . . 14 58 1. Introduction 60 This memo describes how a BXXP[1] session is mapped onto a single 61 TCP[2] connection. Refer to Section 2.5 of [1] for an explanation of 62 the mapping requirements. 64 2. Session Management 66 The mapping of BXXP session management onto the TCP service is 67 straight-forward. 69 A BXXP session is established when a TCP connection is established 70 between two BXXP peers: 72 o the BXXP peer that issues a passive OPEN call is termed the 73 listener; and, 75 o the BXXP peer that issues an active OPEN call is termed the 76 initiator. 78 A BXXP session is released when either peer issues the CLOSE call, 79 and the TCP connection is subsequently closed. 81 A BXXP session is terminated when either peer issues the ABORT call, 82 and the TCP connection is subsequently aborted. 84 3. Data Exchange 86 The mapping of BXXP data exchange onto the TCP service is less 87 straight-forward. 89 Messages are reliably sent and received using the SEND and RECEIVE 90 calls. (This also provides ordered delivery of messages on the same 91 channel.) 93 Although TCP imposes flow control on a per-connection basis, if 94 multiple channels are simultaneously in use on a BXXP session, BXXP 95 must provide a mechanism to avoid starvation and deadlock. To 96 achieve this, BXXP re-introduces a mechanism used by the TCP: 97 window-based flow control -- each channel has a sliding window that 98 indicates the number of payload octets that a peer may transmit 99 before receiving further permission. 101 3.1 Flow Control 103 Recall from Section 2.2.1.2 of [1] that every payload octet sent in 104 each direction on a channel has an associated sequence number. 105 Numbering of payload octets within a frame is such that the first 106 payload octet is the lowest numbered, and the following payload 107 octets are numbered consecutively. 109 The actual sequence number space is finite, though very large, 110 ranging from 0..4294967295 (2**32 - 1). Since the space is finite, 111 all arithmetic dealing with sequence numbers is performed modulo 112 2**32. This unsigned arithmetic preserves the relationship of 113 sequence numbers as they cycle from 2**32 - 1 to 0 again. 115 3.1.1 Channel Creation 117 When a channel is created, the sequence number associated with the 118 first payload octet of the first frame is 0, and the initial window 119 size for that channel is 4096 octets. After channel creation, a BXXP 120 peer may update the window size by sending a "SEQ" frame (Section 121 3.1.3). 123 If a BXXP peer is requested to create a channel and it is unable to 124 allocate at least 4096 octets for that channel, it must decline 125 creation of the channel, as specified in Section 2.3.1.3 of [1]. 126 Similarly, during establishment of the BXXP session, if the BXXP 127 peer acting in the listening role is unable to allocate at least 128 4096 octets for channel 0, then it must return a negative response, 129 as specified in Section 2.4 of [1]. instead of a greeting. 131 3.1.2 Sending REQ or RSP Messages 133 Before a message is sent, the sending BXXP peer must ensure that the 134 size of the payload is within the window advertised by the receiving 135 BXXP peer. If not, it has three choices: 137 o if the window would allow for at least one payload octet to be 138 sent, the BXXP peer may segment the message and start by sending 139 a smaller frame (up to the size of the remaining window); 141 o the BXXP peer may delay sending the message until the window 142 becomes larger; or, 144 o the BXXP peer may signal to its application that it is unable to 145 send the message, allowing the application to try again at a 146 later time (or perhaps signaling its application when a larger 147 window is available.) 149 The choice is implementation-dependent, although it is recommended 150 that the application using BXXP be given a mechanism for influencing 151 the decision. 153 3.1.3 Processing SEQ Frames 155 As an application accepts responsibility for incoming frames, its 156 BXXP peer should send "SEQ" frames to advertise a new window. 158 The ABNF for a "SEQ" frame is: 160 seq = "SEQ" SP channel SP ackno SP window CR LF 162 ackno = seqno 164 window = size 166 ; channel, seqno, and size are defined in Section 2.2.1 of [1]. 168 The "SEQ" frame has three parameters: 170 o a channel number; 172 o an acknowledgement number, that indicates the value of the next 173 sequence number that the sender is expecting to receive on this 174 channel; and, 176 o a window size, that indicates the number of payload octets 177 beginning with the one indicated by the acknowledgement number 178 that the sender is expecting to receive on this channel. 180 A single space character (decimal code 32, " ") separates each 181 component. The "SEQ" frame is terminated with a CRLF pair. 183 When a "SEQ" frame is received, if any of the channel number, 184 acknowledgement number, or window size cannot be determined or is 185 invalid, then the BXXP session is terminated without generating a 186 response, and it is recommended that a diagnostic entry be logged. 188 3.1.4 Use of Flow Control 190 The key to successful use of flow control within BXXP is to balance 191 performance and fairness: 193 o large messages should be segmented into multiple frames (e.g., 194 the ideal BXXP segment size should be no larger than TCP's 195 negotiated maximum segment size minus some small constant); 197 o frames for different channels with traffic ready to send should 198 be sent in a round-robin fashion; and, 200 o each time a "REQ" or "RSP" message is received, a "SEQ" frame 201 should be sent whenever the window size is at least one half of 202 the available buffer space (if the transport service presents 203 multiple messages to a BXXP peer simultaneously, then a single 204 consolidating "SEQ" frame may be sent). 206 In order to avoid pathological interactions with the transport 207 service, it is important that a BXXP peer advertise windows based on 208 available buffer space, to allow data to be read from the transport 209 service as soon as available. Further, "SEQ" frames for a channel 210 should have higher priority than "REQ" or "RSP" messages for that 211 channel. 213 Implementations may wish to provide queue management facilities to 214 the application using BXXP, e.g., channel priorities, (relative) 215 buffer allocations, and so on. In particular, implementations should 216 not allow a given channel to monopolize the underlying transport 217 window (e.g., slow readers should get small windows). 219 In addition, where possible, implementations should support 220 transport layer APIs that convey congestion information. 222 Finally, implementors should follow the guidelines given in the 223 relevant portions of RFC1122[3] that deal with flow control (and 224 bear in mind that issues such as retransmission, while they interact 225 with flow control in TCP, are not applicable to this memo). For 226 example, Section 4.2.2.16 of RFC1122[3] indicates that a "receiver 227 SHOULD NOT shrink the window, i.e., move the right window edge to 228 the left" and then discusses the impact of this rule on 229 unacknowledged data. In the context of mapping BXXP onto a single 230 TCP connection, only the portions concerning flow control should be 231 implemented. 233 References 235 [1] Rose, M.T., "The Blocks eXtensible eXchange Protocol 236 Framework", draft-ietf-beep-framework-00 (work in progress), 237 August 2000. 239 [2] Postel, J., "Transmission Control Protocol", RFC 793, STD 7, 240 Sep 1981. 242 [3] Braden, R.T., "Requirements for Internet hosts - communication 243 layers", RFC 1122, STD 3, Oct 1989. 245 Author's Address 247 Marshall T. Rose 248 Invisible Worlds, Inc. 249 1179 North McDowell Boulevard 250 Petaluma, CA 94954-6559 251 US 253 Phone: +1 707 789 3700 254 EMail: mrose@invisible.net 255 URI: http://invisible.net/ 257 Appendix A. Changes from draft-mrose-bxxp-tcp-01 259 o A reference to RFC1122, along with instructions on how to 260 interpret that specification, is added to Section 3.1.4. 262 Appendix B. Changes from draft-mrose-bxxp-tcpmapping-00 264 o The IPR notice is changed to be in full compliance of Section 10 265 of RFC 2026. 267 o SEQ messages are now (correcty) called SEQ frames. 269 o In Section 3.1.4, the explanation of when to send a SEQ frame is 270 clarified. 272 o In Section 3.1.4, the illustration of queue management facilities 273 is expanded. 275 Appendix C. Acknowledgements 277 The author gratefully acknowledges the contributions of: Dave 278 Crocker, Steve Harris, Eliot Lear, Keith McCloghrie, Craig 279 Partridge, Vernon Schryver, and, Joe Touch. In particular, Dave 280 Crocker provided helpful suggestions on the nature of flow control 281 in the mapping. 283 Full Copyright Statement 285 Copyright (C) The Internet Society (2000). All Rights Reserved. 287 This document and translations of it may be copied and furnished to 288 others, and derivative works that comment on or otherwise explain it 289 or assist in its implementation may be prepared, copied, published 290 and distributed, in whole or in part, without restriction of any 291 kind, provided that the above copyright notice and this paragraph 292 are included on all such copies and derivative works. However, this 293 document itself may not be modified in any way, such as by removing 294 the copyright notice or references to the Internet Society or other 295 Internet organizations, except as needed for the purpose of 296 developing Internet standards in which case the procedures for 297 copyrights defined in the Internet Standards process must be 298 followed, or as required to translate it into languages other than 299 English. 301 The limited permissions granted above are perpetual and will not be 302 revoked by the Internet Society or its successors or assigns. 304 This document and the information contained herein is provided on an 305 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 306 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 307 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 308 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 309 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 311 Acknowledgement 313 Funding for the RFC editor function is currently provided by the 314 Internet Society.