idnits 2.17.1 draft-cfb-ippm-spinbit-measurements-01.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC8321], [I-D.trammell-ippm-spin]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (March 23, 2020) is 1488 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-27 ** Obsolete normative reference: RFC 8321 (Obsoleted by RFC 9341) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 IPPM M. Cociglio 3 Internet-Draft Telecom Italia 4 Intended status: Experimental G. Fioccola 5 Expires: September 24, 2020 Huawei Technologies 6 M. Nilo 7 F. Bulgarella 8 Telecom Italia 9 R. Sisto 10 Politecnico di Torino 11 March 23, 2020 13 Client-Server Explicit Performance Measurements 14 draft-cfb-ippm-spinbit-measurements-01 16 Abstract 18 This document introduces an additional single bit signal to enhance 19 the spin bit [I-D.trammell-ippm-spin] performance in presence of 20 network impairments and application limited flow. In addition, it 21 defines two new explicit per-flow transport-layer signals for hybrid 22 measurement of connection loss rate. The former is a spin-bit 23 dependent signal and uses a single bit. The latter is a standalone 24 solution based on a two bits loss signal and on alternate marking RFC 25 8321 [RFC8321]. 27 Requirements Language 29 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 30 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 31 document are to be interpreted as described in RFC 2119 [RFC2119]. 33 Status of This Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at https://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on September 24, 2020. 50 Copyright Notice 52 Copyright (c) 2020 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (https://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 68 2. Spin bit and Delay bit mechanism . . . . . . . . . . . . . . 4 69 2.1. Delay Sample generation . . . . . . . . . . . . . . . . . 5 70 2.1.1. The recovery process . . . . . . . . . . . . . . . . 6 71 2.2. Delay Sample reflection . . . . . . . . . . . . . . . . . 6 72 3. Using the Spin bit and Delay bit for Hybrid RTT Measurement . 7 73 3.1. End-to-end RTT measurement . . . . . . . . . . . . . . . 7 74 3.2. Half-RTT measurement . . . . . . . . . . . . . . . . . . 8 75 3.3. Intra-domain RTT measurement . . . . . . . . . . . . . . 9 76 4. Observer's algorithm and Waiting Interval . . . . . . . . . . 10 77 5. Adding a Loss signal for Packet loss measurement . . . . . . 11 78 5.1. Round Trip Packet Loss measurement . . . . . . . . . . . 13 79 6. Packet Loss using one bit loss signal . . . . . . . . . . . . 14 80 6.1. Observer's logic for one bit loss signal . . . . . . . . 16 81 7. Two Bits packet loss measurement using alternate marking . . 16 82 7.1. Setting the square bit (Q) on outgoing packets . . . . . 16 83 7.2. Setting the reflection square bit (R) on outgoing packets 17 84 7.2.1. Determining the completion of an incoming marking 85 period . . . . . . . . . . . . . . . . . . . . . . . 18 86 7.3. Observer's logic and passive loss measurements . . . . . 18 87 7.3.1. Upstream one-way loss . . . . . . . . . . . . . . . . 19 88 7.3.2. Three-quarters connection loss . . . . . . . . . . . 19 89 7.3.3. Full one-way loss in the opposite direction . . . . . 20 90 7.3.4. Half round-trip loss . . . . . . . . . . . . . . . . 21 91 7.3.5. Downstream one-way loss . . . . . . . . . . . . . . . 21 92 7.4. Enhancement of reflection period size computation . . . . 22 93 8. Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . 22 94 8.1. QUIC . . . . . . . . . . . . . . . . . . . . . . . . . . 22 95 8.2. TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 96 9. Security Considerations . . . . . . . . . . . . . . . . . . . 23 97 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 23 98 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 99 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 100 12.1. Normative References . . . . . . . . . . . . . . . . . . 23 101 12.2. Informative References . . . . . . . . . . . . . . . . . 24 102 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 104 1. Introduction 106 Both [I-D.trammell-tsvwg-spin] and [I-D.trammell-ippm-spin] define an 107 explicit per-flow transport-layer signal for hybrid measurement of 108 end-to-end RTT. This signal consists of three bits: a spin bit, 109 which oscillates once per end-to-end RTT, and a two-bit Valid Edge 110 Counter (VEC), which compensates for loss and reordering of the spin 111 bit to increase fidelity of the signal in less than ideal network 112 conditions. 114 In this document it is introduced the delay bit, that is a single bit 115 signal that can be used together with the spin bit by passive 116 observers to measure the RTT of a network flow, avoiding the spin bit 117 ambiguities that arise as soon as network conditions deteriorate. 118 Unlike the spin bit, which is actually set in every packet 119 transmitted on the network, the delay bit is set only once per round 120 trip. 122 Regarding loss rate measurement, two new algorithms are introduced. 123 The first algorithm enables end-to-end round trip loss rate 124 measurement using a single bit signal called loss bit. This signal 125 is used to mark a train of packets (a portion of traffic) which 126 bounces back an forth two times between endpoints, realizing a two 127 round trip reflection. A passive on-path observer, placed on 128 whatever direction, can trivially count and compare the number of 129 marked packets seen during the two reflections estimating 130 statistically the loss rate experienced by the connection. The 131 second algorithm uses a double square signal and RFC 8321 [RFC8321] 132 to mark the whole traffic exchanged between endpoints. This solution 133 enables different types of measurements providing a complete picture 134 of connection loss events. 136 This document defines hybrid measurement RFC 7799 [RFC7799] path 137 signals to be embedded into a transport layer protocol, explicitly 138 intended for exposing end-to-end RTT and loss rate information to 139 measurement devices on path. 141 The document introduces mechanisms applicable to any transport-layer 142 protocol, then explains how to bind the signals to a variety of IETF 143 transport protocols, and in particular to QUIC and TCP. 145 The application of the spin bit to QUIC is described in 146 [I-D.ietf-quic-spin-exp] which adds the spin bit to QUIC for 147 experimentation purposes. 149 Note that spin bit, delay bit and loss bits explained in this 150 document are inspired by RFC 8321 [RFC8321]. This is also mentioned 151 in [I-D.trammell-quic-spin]. 153 Note that additional details about the Performance Measurements for 154 QUIC are also described in the paper [ANRW19-PM-QUIC]. 156 2. Spin bit and Delay bit mechanism 158 The main idea is to have a single packet, with a second marked bit 159 (the delay bit), that bounces between client and server during the 160 entire connection life. This single packet is called Delay Sample. 162 A simple observer placed in an intermediate point, tracking the delay 163 sample and the relative timestamp in every spin bit period, can 164 measure the end-to-end round trip delay of the connection. In the 165 same way as seen with the spin bit, it is possible to carry out other 166 types of measurements using this additional bit. The next paragraphs 167 give an overview of the observer capabilities. 169 In order to describe the delay sample working mechanism in detail, we 170 have to distinguish two different phases which take part in the delay 171 bit lifetime: initialization and reflection. The initialization is 172 the generation of the delay sample, while the reflection realizes the 173 bounce behavior of this single packet between the two endpoints. 175 The next figure describes the Delay bit mechanism: the first bit is 176 the spin bit and the second one is the delay bit. 178 +--------+ -- -- -- -- -- +--------+ 179 | | -----------> | | 180 | Client | | Server | 181 | | <----------- | | 182 +--------+ -- -- -- -- -- +--------+ 184 (a) No traffic at beginning. 186 +--------+ 00 00 01 -- -- +--------+ 187 | | -----------> | | 188 | Client | | Server | 189 | | <----------- | | 190 +--------+ -- -- -- -- -- +--------+ 191 (b) The Client starts sending data and 192 sets the first packet as Delay Sample. 194 +--------+ 00 00 00 00 00 +--------+ 195 | | -----------> | | 196 | Client | | Server | 197 | | <----------- | | 198 +--------+ -- -- 01 00 00 +--------+ 200 (c) The Server starts sending data 201 and reflects the Delay Sample. 203 +--------+ 10 10 11 00 00 +--------+ 204 | | -----------> | | 205 | Client | | Server | 206 | | <----------- | | 207 +--------+ 00 00 00 00 00 +--------+ 209 (d) The Client inverts the spin bit and 210 reflects the Delay Sample. 212 +--------+ 10 10 10 10 10 +--------+ 213 | | -----------> | | 214 | Client | | Server | 215 | | <----------- | | 216 +--------+ 00 00 11 10 10 +--------+ 218 (e) The Server reflects the Delay Sample. 220 +--------+ 00 00 01 10 10 +--------+ 221 | | -----------> | | 222 | Client | | Server | 223 | | <----------- | | 224 +--------+ 10 10 10 10 10 +--------+ 226 (f) The client reverts the spin 227 bit and reflects the Delay Sample. 229 Figure 1: Spin bit and Delay bit 231 2.1. Delay Sample generation 233 During this first phase, endpoints play different roles. First of 234 all a single delay sample must be bouncing per round trip period (and 235 so per spin bit period). According to that statement and in order to 236 simplify the general algorithm, the delay sample generation is in 237 charge of just one of the two endpoints: 239 o the client, when connection starts and spin bit is set to 0, 240 initializes the delay bit of the first packet to 1, so it becomes 241 the delay sample for that marking period. Only this packet is 242 marked with the delay bit set to 1 for this round trip period; the 243 other ones will carry only the spin bit; 245 o the server never initializes the delay bit to 1; its only task is 246 to reflect the incoming delay bit into the next outgoing packet 247 only if certain conditions occur. 249 Theoretically, in absence of network impairments, the delay sample 250 should bounce between client and server continuously, for the entire 251 duration of the connection. Actually, that is highly unlikely mainly 252 for two different reasons: 254 1) the packet carrying the delay bit might be lost during its journey 255 on the network which is unreliable by definition; 257 2) one of the two endpoints could stop or delay sending data because 258 the application is limiting the amount of traffic transmitted; 260 To deal with these problems, the algorithm provides a procedure to 261 regenerate the delay sample and to inform a possible observer that a 262 problem has occurred, and then the measurement has to be restarted. 264 2.1.1. The recovery process 266 In order to relieve the server from tasks that go beyond the mere 267 reflection of the sample, even in this case the recovery process 268 belongs to the client. A fundamental assumption is that a delay 269 sample is strictly related to its spin bit period. Considering this 270 rule, the client verifies that every spin bit period ends with its 271 delay sample. If that does not happen and a marking period 272 terminates without a delay sample, the client waits a further empty 273 period; then, in the following period, it reinitializes the mechanism 274 by setting the delay bit of the first outgoing packet to 1, making it 275 the new delay sample. The empty period is needed to inform the 276 intermediate points that there was an issue and a new delay 277 measurement session is starting. 279 2.2. Delay Sample reflection 281 The reflection is the process that enables the bouncing of the delay 282 sample between client and server. The behavior of the two endpoints 283 is slightly different. With the exception of the client that, as 284 previously exposed, generates a new delay sample, by default the 285 delay bit is set to 0. 287 Server side reflection: when a packet with the delay bit set to 1 288 arrives, the server marks the first packet in the opposite direction 289 as the delay sample, if it has the same spin bit value. While if it 290 has the opposite spin bit value this sample is considered lost. 292 Client side reflection: when a packet with delay bit set to 1 293 arrives, the client marks the first packet in the opposite direction 294 as the delay sample, if it has the opposite spin bit value. While if 295 it has the same spin bit value this sample is considered lost. 297 In both cases, if the outgoing marked packet is transmitted with a 298 delay greater than a predetermined threshold after the reception of 299 the incoming delay sample (1ms by default), reflection is aborted and 300 this sample is considered lost. 302 Note that reflection takes place for the packet that is carrying the 303 delay bit regardless of its position within the period. For this 304 reason it is necessary to introduce that condition of validation in 305 order to identify and discard those samples that, due to reordering, 306 might move to a contiguous period. Furthermore, by introducing a 307 threshold for the retransmission delay of the sample, it is possible 308 to eliminate all those measurements which, due to lack of traffic on 309 the endpoints, would be overestimated and not true. Thus, the 310 maximum estimation error, without considering any other delays due to 311 flow control, would amount to twice the threshold (e.g. 2ms) per 312 measurement, in the worst case. 314 3. Using the Spin bit and Delay bit for Hybrid RTT Measurement 316 Unlike what happens with the spin bit for which it is necessary to 317 validate or at least heuristically evaluate the goodness of an edge, 318 the delay sample can be used by an intermediate observer as a simple 319 demarcator between a period and the following one eliminating the 320 ambiguities on the calculation of the RTT found with the analysis of 321 the spin-bit only. The measurement types, that can be done from the 322 observation of the delay sample, are exactly the same achievable with 323 the spin bit only. 325 3.1. End-to-end RTT measurement 327 The delay sample generation process ensures that only one packet 328 marked with the delay bit set to 1 runs back and forth on the wire 329 between two endpoints per round trip time. Therefore, in order to 330 determine the end-to-end RTT measurement of a QUIC flow, an on-path 331 passive observer can simply compute the time difference between two 332 delay samples observed in a single direction. Note that a 333 measurement, to be valid, must take into account the difference in 334 time between the timestamps of two consecutive delay samples 335 belonging to adjacent spin-bit periods. For this reason, an 336 observer, in addition to intercepting and analyzing the packets 337 containing the delay bit set to 1, must maintain awareness of each 338 spin period in such a way as to be able to assign each delay sample 339 to its period and, at the same time, identifying those periods that 340 do not contain it. 342 =======================|======================> 343 = ********** -----Obs----> ********** = 344 = * Client * * Server * = 345 = ********** <------------ ********** = 346 <============================================== 348 (a) client-server RTT 350 ==============================================> 351 = ********** ------------> ********** = 352 = * Client * * Server * = 353 = ********** <----Obs----- ********** = 354 <======================|======================= 356 (b) server-client RTT 358 Figure 2: Round-trip time (both direction) 360 3.2. Half-RTT measurement 362 An on-path passive observer that is sniffing traffic in both 363 directions -- from client to server and from server to client -- can 364 also use the delay sample to measure "upstream" and "downstream" RTT 365 components. Also known as the half-RTT measurement, it represents 366 the components of the end-to-end RTT concerning the paths between the 367 client and the observer (upstream), and the observer and the server 368 (downstream). It does this by measuring the delay between a delay 369 sample observed in the downstream direction and the one observed in 370 the upstream direction, and vice versa. Also in this case, it should 371 verify that the two delay samples belong to two adjacent periods, for 372 the upstream component, or to the same period for the downstream 373 component. 375 =======================> 376 = ********** ------|-----> ********** 377 = * Client * Obs * Server * 378 = ********** <-----|------ ********** 379 <======================= 381 (a) client-observer half-RTT 383 =======================> 384 ********** ------|-----> ********** = 385 * Client * Obs * Server * = 386 ********** <-----|------ ********** = 387 <======================= 389 (b) observer-server half-RTT 391 Figure 3: Half Round-trip time (both direction) 393 3.3. Intra-domain RTT measurement 395 Taking advantage of the half-RTT measurements it is also possible to 396 calculate the intra-domain RTT which is the portion of the entire RTT 397 used by a QUIC flow to traverse the network of a provider (or part of 398 it). To achieve this result two observers, able to watch traffic in 399 both directions, must be employed simultaneously at ingress and 400 egress of the network to be measured. At this point, to determine 401 the delay between the two observers, it is enough to subtract the two 402 computed upstream (or downstream) RTT components. 404 =========================================> 405 = =====================> 406 = = ********** ---|--> ---|--> ********** 407 = = * Client * Obs Obs * Server * 408 = = ********** <--|--- <--|--- ********** 409 = <===================== 410 <========================================= 412 (a) client-observer RTT components (half-RTTs) 414 ==================> 415 ********** ---|--> ---|--> ********** 416 * Client * Obs Obs * Server * 417 ********** <--|--- <--|--- ********** 418 <================== 420 (b) the intra-domain RTT resulting from the 421 subtraction of the above RTT components 423 Figure 4: Intra-domain Round-trip time (client-observer: upstream) 425 The spin bit is an alternate marking generated signal and the only 426 difference than RFC 8321 [RFC8321] is the size of the alternation 427 that will change with the flight size each RTT. So it can be useful 428 to segment the RTT and deduce the contribution to the RTT of the 429 portion of the network between two on-path observers and it can be 430 easily performed by calculating the delay between two or more 431 measurement points on a single direction by applying RFC 8321 432 [RFC8321]. 434 4. Observer's algorithm and Waiting Interval 436 Given below is a formal summary of the functioning of the observer 437 every time a delay sample is detected. A packet containing the delay 438 bit set to 1: 440 o if it has the same spin bit value of the current period and no 441 delay sample was detected in the previous period, then it can be 442 used as a left edge (i.e. to start measuring an RTT sample), but 443 not as a right edge (i.e. to complete and RTT measurement since 444 the last edge). If the observation point is symmetric (i.e. it 445 can see both upstream and downstream packets in the flow) and in 446 the current period a delay sample was detected in the opposite 447 direction (i.e. in the upstream direction), the packet can also be 448 used to compute the downstream RTT component. 450 o if it has the same spin bit value of the current period and a 451 delay sample was detected in the previous period, then it can be 452 used at the same time as a left or right edge, and to compute RTT 453 component in both directions. 455 Like stated previously, every time an empty period is detected, the 456 observer must restart the measurement process and consider the next 457 delay sample that will come as the beginning of a new measure, then 458 as a left edge. As a result, being able to assign the delay sample 459 to the corresponding spin period becomes a crucial factor for the 460 proper functioning of the entire algorithm. 462 Considering that the division into periods is realized by exploiting 463 the spin bit square wave, it is easy to understand that the presence 464 of spurious spin edges -- caused by packet reordering -- would 465 inevitably lead the observer to overestimate the amount of periods 466 actually present in the transmission. This results in a greater 467 number of empty periods detected and the consequent decrease of the 468 actual RTT samples achievable. Therefore, in order to maximize the 469 performance of the whole algorithm, the observer must implement a 470 mechanism to filter out spurious spin edges. 472 To face this problem the waiting interval has to be introduced. 473 Basically, every time a spin bit edge is detected, the observer sets 474 a time interval during which it rejects every potential spurious 475 edges observed on the wire. While, at the end of the interval it 476 starts again to accept changes in the spin bit value. This 477 guarantees a proper protection against the spurious edges in relation 478 to the size of the interval itself. For instance, an interval of 5ms 479 is able to filter out edges that have been reordered by a maximum of 480 5ms. Clearly, the mechanism does its job for intervals smaller than 481 the RTT of the observed connection (if RTT is smaller than the 482 waiting interval the observer can't measure the RTT). 484 5. Adding a Loss signal for Packet loss measurement 486 It is possible to introduce a mechanism to evaluate also the packet 487 loss together with the delay measurement. This can be achieved by 488 introducing the loss signal, a single or two bits signal whose 489 purpose is to mark a variable number of packets (from live traffic) 490 which are exchanged two times between the endpoints realizing a two 491 round-trip reflection. The overall exchange comprises: 493 o The client first selects, generates and consequent transmits to 494 the server a first train of packets, by marking the loss bit to 1; 496 o The server, upon reception from the client of each one of the 497 packets included in the first train, reflects to the client a 498 respective second train of packets of the same size as the first 499 train received, by marking the loss bit to 1; 501 o The client, upon reception from the server of each one of the 502 packets included in the second train, reflects to the server a 503 respective third train of packets of the same size as the second 504 train received, by marking the loss bit to 1; 506 o The server, upon reception from the client of each one of the 507 packets included in the third train, finally reflects to the 508 client a respective fourth train of packets of the same size as 509 the third train received, by marking the loss bit to 1. 511 Packets belonging to the first round (first and second train) 512 represent the Generation Phase while those belonging to the second 513 round (third and fourth train) represent the Reflection Phase. 515 A passive on-path observer, placed on whatever direction, can 516 trivially count and compare the number of marked packets seen during 517 the two mentioned phases (i.e. the first and third or the second and 518 the fourth trains of packets, depending on which direction is 519 observed) and estimate the loss rate experienced by the connection. 520 This process is repeated continuously to obtain more measurements as 521 long as the endpoints exchange traffic. These measurements can be 522 called Round Trip(RT) losses 524 The general algorithm shown above gives an idea of its underlying 525 principles but is not enough to make the whole process working 526 properly. 528 Firstly, there is the issue that packet rates in the two directions 529 may be different. Therefore, the right number of packets to be 530 marked has to be chosen in order to avoid their congestion on the 531 slowest traffic direction. As a consequence, this number is 532 inevitably equal to the amount of packets transited, indeed, on the 533 slowest direction. This problem can be easily addressed by a method 534 wherein the two endpoints of a communication exchange marked packets 535 interleaved with unmarked packets. From an implementation point of 536 view, this result can be achieved by introducing a single token 537 system that adjusts the number of outgoing marked packets. 538 Basically, the token is enabled every time a packet arrives and 539 disabled when a marked packet is transmitted. Since the creation of 540 the initial train of marked packets is carried out by the client, the 541 management and use of this single token is also assigned to it, which 542 in fact "calculates" the correct number of packets to be marked each 543 time. 545 Secondly, a mechanism to individually identify each train of packets 546 must be provided to enable the observer to distinguish between trains 547 belonging to different phases (Generation and Reflection). 549 5.1. Round Trip Packet Loss measurement 551 Since the measurements are performed on a portion of the traffic 552 exchanged between client and server, the observer calculates the end- 553 to-end Round Trip Packet Loss that, statistically, will be equal to 554 the loss rate experienced by the connection along the entire network 555 path. So this measurement can be simply referred as the Round Trip 556 Packet Loss (RTPL). 558 =======================|======================> 559 = ********** -----Obs----> ********** = 560 = * Client * * Server * = 561 = ********** <------------ ********** = 562 <============================================== 564 (a) client-server RTPL 566 ==============================================> 567 = ********** ------------> ********** = 568 = * Client * * Server * = 569 = ********** <----Obs----- ********** = 570 <======================|======================= 572 (b) server-client RTPL 574 Figure 5: Round-trip packet loss (both direction) 576 In addition, this methodology allows the Half-RTPL measurement and 577 the Intra-domain RTPL measurement, in the same way as described in 578 the previous sections for RTT measurement. 580 =======================> 581 = ********** ------|-----> ********** 582 = * Client * Obs * Server * 583 = ********** <-----|------ ********** 584 <======================= 586 (a) client-observer half-RTPL 588 =======================> 589 ********** ------|-----> ********** = 590 * Client * Obs * Server * = 591 ********** <-----|------ ********** = 592 <======================= 594 (b) observer-server half-RTPL 596 Figure 6: Half Round-trip packet loss (both direction) 598 =========================================> 599 =====================> = 600 ********** ---|--> ---|--> ********** = = 601 * Client * Obs Obs * Server * = = 602 ********** <--|--- <--|--- ********** = = 603 <===================== = 604 <========================================= 606 (a) observer-server RTPL components (half-RTPLs) 608 ==================> 609 ********** ---|--> ---|--> ********** 610 * Client * Obs Obs * Server * 611 ********** <--|--- <--|--- ********** 612 <================== 614 (b) the intra-domain RTPL resulting from the 615 subtraction of the above RTPL components 617 Figure 7: Intra-domain Round-trip packet loss (observer-server) 619 6. Packet Loss using one bit loss signal 621 The single bit loss signal is implemented using just one bit: marked 622 packets have this bit set to 1, whereas unmarked ones have it set to 623 0. This solution requires a working spin-bit signal used to separate 624 different trains of packets. In particular, a "pause" of at least 625 one empty spin-bit period is introduced between each phase of the 626 algorithm. An on-path observer can determine in this way if a phase 627 (and therefore a train of packets) is ended and a new one is 628 starting. 630 The client is in charge of almost the entire complexity of the 631 algorithm. Its task can be summarized in 4 different points: 633 1. The client starts generating marked packets for two consecutive 634 spin-bit periods; it maintains a generation token that is enabled 635 every time a packet arrives and disabled when another one is 636 forwarded. When this token is disabled, the generation process 637 is paused (i.e. outgoing packets are transmitted unmarked) and 638 resumes as soon as its value returns true, and that happens as 639 soon as a packet is received. In addition, at the end of the 640 first spin-bit period spent in generation, the reflection counter 641 is unlocked to start counting incoming marked packets which will 642 be later reflected; 644 2. When the generation is completed, the client waits to see in 645 input an empty spin-bit period so as to be sure that everyone has 646 seen at least that empty period. This one will be used by the 647 observer as a divider between generated and reflected packets. 648 During this phase, all the outgoing packets are forwarded with 649 the loss bit set to 0. The reflection counter is still 650 incremented every time a marked packet arrives; 652 3. The client starts reflecting marked packets until the reflection 653 counter is zeroed; the generation token is also used (in the same 654 way) during this phase to avoid congestion on the slowest traffic 655 direction. In addition, at the end of the first spin-period 656 spent in reflection, the reflection counter is locked to avoid 657 incoming reflected packets incrementing it; 659 4. When the reflection is completed, the client waits to see in 660 input an empty spin-bit period so as to be sure that everyone has 661 seen at least that empty period. This one will be used by the 662 observer as a divider between reflected and newly generated 663 packets. During this phase, all the outgoing packets are 664 forwarded with the loss bit set to 0. The whole process restarts 665 going back to the first point. 667 As previously anticipated, the server simply reflects each incoming 668 marked packet sent by the client. It maintains a simple counter that 669 is incremented every time a marked packet arrives and decremented 670 when a marked one is sent in the opposite direction. 672 6.1. Observer's logic for one bit loss signal 674 The on-path observer, placed in any direction, counts marked packets 675 and separates different trains detecting empty spin-bit periods 676 between them (one or more). Then, it simply computes the difference 677 between a Generation train and a Reflection train to produce a 678 statistical measurement of the Round Trip Packet Loss (RTPL) and of 679 the connection end-to-end loss rate. 681 Here is an example. Packets are represented by two digits (first one 682 is the spin bit, second one is the loss bit): 684 Generation Pause Reflection Pause 685 ____________________ ______________ ____________________ ________ 686 | | | | | 687 01 01 00 01 11 10 11 00 00 10 10 10 01 00 01 01 10 11 10 00 00 10 689 Figure 8: one bit loss signal example 691 Note that 5 marked packets have been generated of which 4 reflected. 693 7. Two Bits packet loss measurement using alternate marking 695 An alternative methodology, based on the classical alternate marking 696 RFC 8321 [RFC8321], can be deployed to enable passive packet loss 697 measurement in a connection oriented communication. This section 698 explains its fundamentals and all the metrics that can be achieved by 699 exploiting this mechanism. 701 Two new loss bits are introduced: 703 o Square Bit (Q): this bit is toggled every N outgoing packets 704 generating a square signal as already seen in the alternate 705 marking methodology RFC 8321 [RFC8321]. 707 o Reflection Square Bit (R): this bit is used to reflect the 708 incoming square signal (the one generated by the opposite 709 endpoint) according to the algorithm explained in next Section; in 710 a nutshell, it is used to report the losses found in the opposite 711 transmission channel. 713 7.1. Setting the square bit (Q) on outgoing packets 715 The sQuare value is initialized to 0 and is applied to the Q bit of 716 every outgoing packet. The sQuare value is toggled after sending N 717 packets (e.g. 64). By doing so, each endpoint splits its outgoing 718 traffic into blocks of N packets with different "packet color" as 719 defined by RFC 8321 [RFC8321]. A single block of N packets is called 720 "marking period". Observation points can estimate upstream losses by 721 counting the number of packets included in a marking period of the 722 produced square signal. 724 7.2. Setting the reflection square bit (R) on outgoing packets 726 Unlike the sQuare signal for which packets are transmitted into 727 blocks of fixed size, the Reflection square signal (being an 728 alternate marking signal too) produces blocks of packets whose size 729 varies according to these simple rules: 731 o when the transmission of a new block starts, its size is set equal 732 to the size of the last marking period whose reception has been 733 completed; 735 o if, before transmission of the block is terminated, the reception 736 of at least one further marking period is completed, the size of 737 the block is updated to the average size of the further received 738 marking periods. Implementation details follow. 740 The Reflection square value is initialized to 0 and is applied to the 741 R bit of every outgoing packet. The Reflection square value is 742 toggled for the first time when the completion of a marking period is 743 detected in the incoming sQuare signal (produced by the opposite node 744 using the Q bit). When this happens, the number of packets (p), 745 detected within this first marking period, is used to generate a 746 reflection square signal which toggles every M=p packets (at first). 747 This new signal produces blocks of M packets (marked using the R bit) 748 and each of them is called "reflection marking period". 750 The M value is then updated every time a completed marking period in 751 the incoming sQuare signal is received, following this formula: 752 M=round(avg(p)). 754 The parameter avg(p) is the average number of packets in a marking 755 period computed considering all the marking periods received since 756 the beginning of the current reflection marking period. 758 Looking at the R bit, observation points have clear indication of 759 losses experienced by the entire opposite channel plus those occurred 760 in the path from the sender up to them (if losses occur in this 761 latter portion of path). 763 7.2.1. Determining the completion of an incoming marking period 765 A simple sQuare bit transition cannot be used to determine the 766 completion of a marking period. Indeed, packet reordering can lead 767 to the generation of spurious edges in the sQuare signal. To address 768 this problem, a marking period is considered ended when at least X 769 packets (e.g. 5) with reverse marking (i.e. belonging to the 770 following marking period) have been received. 772 This same approach can be used by observation points to clean both 773 sQuare and Reflection square signals. 775 7.3. Observer's logic and passive loss measurements 777 Since both sQuare and Reflection square bits are toggled at most 778 every N packets (except for the first transition of the R bit as 779 explained before), an on-path observer can trivially count the number 780 of packets of each marking block and, knowing the value of N, can 781 estimate the amount of loss experienced by the connection. Different 782 metrics can be measured depending on which direction the observer is 783 looking to. 785 One direction observer: 787 o upstream one-way loss: the loss between the sender and the 788 observation point 790 o "three-quarters" connection loss: the loss between the receiver 791 and the sender in the opposite direction plus the loss between the 792 sender and the observation point in the observed direction 794 o full one-way loss in the opposite direction: the loss between the 795 receiver and the sender in the opposite direction 797 Two directions observer (same metrics seen previously applied to both 798 direction, plus): 800 o client-observer half round-trip loss: the loss between the client 801 and the observation point in both directions 803 o observer-server half round-trip loss: the loss between the 804 observation point and the server in both directions 806 o downstream one-way loss: the loss between the observation point 807 and the receiver (valid for both directions) 809 7.3.1. Upstream one-way loss 811 Since packets are continuously Q bit marked into alternate blocks of 812 size N, knowing the value of N, an on-path observer can estimate the 813 amount of loss occurred from the sender up to it after observing at 814 least N packets. The upstream one-way loss rate ("uowl") is one 815 minus the average number of packets in a block of packets with the 816 same Q value ("p") divided by N ("uowl=1-avg(p)/N"). 818 =====================> 819 ********** -----Obs----> ********** 820 * Client * * Server * 821 ********** <------------ ********** 823 (a) in client-server channel (uowl_up) 825 ********** ------------> ********** 826 * Client * * Server * 827 ********** <----Obs----- ********** 828 <===================== 830 (b) in server-client channel (uowl_down) 832 Figure 9: Upstream one-way loss 834 7.3.2. Three-quarters connection loss 836 Except for the very first block in which there is nothing to reflect 837 (a complete marking period has not been yet received), packets are 838 continuously R bit marked into alternate blocks of size lower or 839 equal than N. Knowing the value of N, an on-path observer can 840 estimate the amount of loss occurred in the whole opposite channel 841 plus the loss from the sender up to it in the observation channel. 842 As for the previous metric, the "three-quarters" connection loss rate 843 ("tql") is one minus the average number of packets in a block of 844 packets with the same R value ("t") divided by N ("tql=1-avg(t)/N"). 846 =======================> 847 = ********** -----Obs----> ********** 848 = * Client * * Server * 849 = ********** <------------ ********** 850 <============================================ 852 (a) in client-server channel (tql_up) 854 ============================================> 855 ********** ------------> ********** = 856 * Client * * Server * = 857 ********** <----Obs----- ********** = 858 <======================= 860 (b) in server-client channel (tql_down) 862 Figure 10: Three-quarters connection loss 864 The following metrics derive from these first two metrics. 866 7.3.3. Full one-way loss in the opposite direction 868 Using the previous metrics, full one-way loss can be computed: 870 fowl_down = tql_up - uowl_up 872 fowl_up = tql_down - uowl_down 874 ********** -----Obs----> ********** 875 * Client * * Server * 876 ********** <------------ ********** 877 <========================================== 879 (a) in client-server channel (fowl_down) 881 ==========================================> 882 ********** ------------> ********** 883 * Client * * Server * 884 ********** <----Obs----- ********** 886 (b) in server-client channel (fowl_up) 888 Figure 11: Full one-way loss in the opposite direction 890 7.3.4. Half round-trip loss 892 Using the previous metrics, the two half round-trip loss measurements 893 can be computed: 895 hrtl_co = tql_up - uowl_down 897 hrtl_os = tql_down - uowl_up 899 =======================> 900 = ********** ------|-----> ********** 901 = * Client * Obs * Server * 902 = ********** <-----|------ ********** 903 <======================= 905 (a) client-observer half round-trip loss (hrtl_co) 907 =======================> 908 ********** ------|-----> ********** = 909 * Client * Obs * Server * = 910 ********** <-----|------ ********** = 911 <======================= 913 (b) observer-server half round-trip loss (hrtl_os) 915 Figure 12: Half Round-trip loss (both direction) 917 7.3.5. Downstream one-way loss 919 Using the previous metrics, downstream one-way loss can be computed: 921 dowl_up = hrtl_os - uowl_down 923 dowl_down = hrtl_co - uowl_up 924 =====================> 925 ********** ------|-----> ********** 926 * Client * Obs * Server * 927 ********** <-----|------ ********** 929 (a) in client-server channel (dowl_up) 931 ********** ------|-----> ********** 932 * Client * Obs * Server * 933 ********** <-----|------ ********** 934 <===================== 936 (b) in server-client channel (dowl_down) 938 Figure 13: Downstream one-way loss 940 7.4. Enhancement of reflection period size computation 942 The use of the rounding function used in the M computation introduces 943 errors. However, these errors can be minimized by storing the 944 rounding applied each time M is computed, and using it during the 945 computation of the M value in the following reflection marking 946 period. 948 This can be achieved introducing the new r_avg parameter in the 949 previous M formula. The new formula is M=round(avg(p)+r_avg) where 950 r_avg is computed as not rounded M minus rounded M; its initial value 951 is equal to 0. 953 8. Protocols 955 8.1. QUIC 957 The binding of the delay bit signal to QUIC is partially described in 958 [I-D.ietf-quic-transport], which adds the spin bit to the first byte 959 of the short packet header, leaving two reserved bits for future 960 experiments. 962 To implement the additional signals discussed in this document, the 963 first byte of the short packet header can be modified as follows: 965 the delay bit (D) can be placed in the first reserved bit (i.e. 966 the fourth most significant bit _0x10_) while the loss bit in the 967 second reserved bit (i.e. the fifth most significant bit _0x08_); 968 the proposed scheme is: 970 0 1 2 3 4 5 6 7 971 +-+-+-+-+-+-+-+-+ 972 |0|1|S|D|L|K|P|P| 973 +-+-+-+-+-+-+-+-+ 975 Figure 14: scheme 1 977 alternatively, the standalone two bits loss signal (QR) can be 978 placed in both reserved bits; the proposed scheme, in this case, 979 is: 981 0 1 2 3 4 5 6 7 982 +-+-+-+-+-+-+-+-+ 983 |0|1|S|Q|R|K|P|P| 984 +-+-+-+-+-+-+-+-+ 986 Figure 15: scheme 2 988 8.2. TCP 990 The signals can be added to TCP by defining bit 4 of bytes 13-14 of 991 the TCP header to carry the spin bit, and eventually bits 5 and 6 to 992 carry additional information, like the delay bit and the 1 bit loss 993 signal (or the two bits loss signal). 995 9. Security Considerations 997 The privacy considerations for the hybrid RTT measurement signal are 998 essentially the same as those for passive RTT measurement in general. 1000 10. Acknowledgements 1002 tbc 1004 11. IANA Considerations 1006 tbc 1008 12. References 1010 12.1. Normative References 1012 [I-D.ietf-quic-spin-exp] 1013 Trammell, B. and M. Kuehlewind, "The QUIC Latency Spin 1014 Bit", draft-ietf-quic-spin-exp-01 (work in progress), 1015 October 2018. 1017 [I-D.ietf-quic-transport] 1018 Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed 1019 and Secure Transport", draft-ietf-quic-transport-27 (work 1020 in progress), February 2020. 1022 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1023 Requirement Levels", BCP 14, RFC 2119, 1024 DOI 10.17487/RFC2119, March 1997, 1025 . 1027 [RFC7799] Morton, A., "Active and Passive Metrics and Methods (with 1028 Hybrid Types In-Between)", RFC 7799, DOI 10.17487/RFC7799, 1029 May 2016, . 1031 [RFC8321] Fioccola, G., Ed., Capello, A., Cociglio, M., Castaldelli, 1032 L., Chen, M., Zheng, L., Mirsky, G., and T. Mizrahi, 1033 "Alternate-Marking Method for Passive and Hybrid 1034 Performance Monitoring", RFC 8321, DOI 10.17487/RFC8321, 1035 January 2018, . 1037 12.2. Informative References 1039 [ANRW19-PM-QUIC] 1040 ACM/IRTF Applied Networking Research Workshop 2019 1041 (ANRW'19), "Performance measurements of QUIC 1042 communications", DOI 10.1145/3340301.3341127, 2019. 1044 [I-D.trammell-ippm-spin] 1045 Trammell, B., "An Explicit Transport-Layer Signal for 1046 Hybrid RTT Measurement", draft-trammell-ippm-spin-00 (work 1047 in progress), January 2019. 1049 [I-D.trammell-quic-spin] 1050 Trammell, B., Vaere, P., Even, R., Fioccola, G., Fossati, 1051 T., Ihlar, M., Morton, A., and S. Emile, "Adding Explicit 1052 Passive Measurability of Two-Way Latency to the QUIC 1053 Transport Protocol", draft-trammell-quic-spin-03 (work in 1054 progress), May 2018. 1056 [I-D.trammell-tsvwg-spin] 1057 Trammell, B., "A Transport-Independent Explicit Signal for 1058 Hybrid RTT Measurement", draft-trammell-tsvwg-spin-00 1059 (work in progress), July 2018. 1061 Authors' Addresses 1063 Mauro Cociglio 1064 Telecom Italia 1065 Via Reiss Romoli, 274 1066 Torino 10148 1067 Italy 1069 Email: mauro.cociglio@telecomitalia.it 1071 Giuseppe Fioccola 1072 Huawei Technologies 1073 Riesstrasse, 25 1074 Munich 80992 1075 Germany 1077 Email: giuseppe.fioccola@huawei.com 1079 Massimo Nilo 1080 Telecom Italia 1081 Via Reiss Romoli, 274 1082 Torino 10148 1083 Italy 1085 Email: massimo.nilo@telecomitalia.it 1087 Fabio Bulgarella 1088 Telecom Italia 1089 Via Reiss Romoli, 274 1090 Torino 10148 1091 Italy 1093 Email: fabio.bulgarella@guest.telecomitalia.it 1095 Riccardo Sisto 1096 Politecnico di Torino 1097 Corso Duca degli Abruzzi, 24 1098 Torino 10129 1099 Italy 1101 Email: riccardo.sisto@polito.it