INTERNET-DRAFT N. Elkins Inside Products R. Hamilton Chemical Abstracts Service M. Ackermann Intended Status: Proposed Standard BCBS Michigan Expires:September 14,November 10, 2017March 13,May 9, 2017 IPv6 Performance and Diagnostic Metrics (PDM) Destination Optiondraft-ietf-ippm-6man-pdm-option-09draft-ietf-ippm-6man-pdm-option-10 Abstract To assess performance problems,measurements based onthis document describes optional headers embedded in each packet that provide sequence numbers and timingmay be embedded in each packet.information as a basis for measurements. Such measurements may be interpreted in real-time or after the fact. An implementation of the existing IPv6 Destination Options extension header, the Performance and Diagnostic Metrics (PDM) Destination Options extension header as well as the field limits, calculations, and usage of the PDM in measurement are included in this document. Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. 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/1id-abstracts.html The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html Copyright and License Notice Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1 Background . . . . . . . . . . . . . . . . . . . . . . . . . .45 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . .4 1.2 End User Quality of Service (QoS) . . . . . . . . . . . . . 4 1.3 Need for a Packet Sequence Number (PSN) . . . . . . . . . .51.41.2 Rationale for defined solution . . . . . . . . . . . . . . . 51.5 PDM Works in Collaboration with Other Headers . . . . . . . 6 1.61.3 IPv6 Transition Technologies . . . . . . . . . . . . . . . .76 2 Measurement Information Derived from PDM . . . . . . . . . . . .76 2.1 Round-Trip Delay . . . . . . . . . . . . . . . . . . . . . .76 2.2 Server Delay . . . . . . . . . . . . . . . . . . . . . . . .87 3 Performance and Diagnostic Metrics Destination Option Layout . .87 3.1 Destination Options Header . . . . . . . . . . . . . . . . .87 3.2 Performance and Diagnostic Metrics Destination Option . . .87 3.2.1 PDM Layout . . . . . . . . . . . . . . . . . . . . . . .87 3.2.2 Base Unit for Time Measurement . . . . . . . . . . . . .10 3.2.3 Considerations of this time-differential representation . . . . . . . . . . . . . . . . . . . . . 11 3.2.3.1 Limitations with this encoding method . . . . . . . 11 3.2.3.2 Loss of precision induced by timer value truncation . . . . . . . . . . . . . . . . . . . . . 129 3.3 Header Placement . . . . . . . . . . . . . . . . . . . . . .1310 3.4 Header Placement Using IPSec ESP Mode . . . . . . . . . . .1310 3.4.1 Using ESP Transport Mode . . . . . . . . . . . . . . . .1310 3.4.2 Using ESP Tunnel Mode . . . . . . . . . . . . . . . . .1410 3.5 Implementation Considerations . . . . . . . . . . . . . . .1511 3.5.1 PDM Activation . . . . . . . . . . . . . . . . . . . . .1511 3.5.2 PDM Timestamps . . . . . . . . . . . . . . . . . . . . .1511 3.6 Dynamic Configuration Options . . . . . . . . . . . . . . .16 3.6 5-tuple Aging . . . . . . . .11 3.7 Information Access and Storage . . . . . . . . . . . . . . .1611 4 Security Considerations . . . . . . . . . . . . . . . . . . . .16 4.1. SYN Flood12 4.1 Resource Consumption and Resource Consumption Attacks . . .. . . . . 1612 4.2 Pervasive monitoring . . . . . . . . . . . . . . . . . . .17. 12 4.3 PDM as a Covert Channel . . . . . . . . . . . . . . . . . .1713 4.4 Timing Attacks . . . . . . . . . . . . . . . . . . . . . . .1813 5 IANA Considerations . . . . . . . . . . . . . . . . . . . . . .1814 6 References . . . . . . . . . . . . . . . . . . . . . . . . . . .1914 6.1 Normative References . . . . . . . . . . . . . . . . . . . .1914 6.2 Informative References . . . . . . . . . . . . . . . . . . .1915 AppendixA : Timing Time Differential CalculationsA: Context for PDM . . . . . . . .20 Appendix B: Sample Packet Flows. . . . . . . . . . . 15 A.1 End User Quality of Service (QoS) . . . . . .21 B.1 PDM Flow - Simple. . . . . . . 15 A.2 Need for a Packet Sequence Number (PSN) . . . . . . . . . . 15 A.3 Rationale for Defined Solution . . . . . . . . . . . . . . . 16 A.4 Use PDM with Other Headers . . . . . . . . . . . . . . . . . 16 Appendix B : Timing Considerations . . . . . . . . . . . . . . . . 17 B.1 Timing Differential Calculations . . . . . . . . . . . . . . 17 B.2 Considerations of this time-differential representation . . 18 B.2.1 Limitations with this encoding method . . . . . . . . . 18 B.2.2 Loss of precision induced by timer value truncation . . 19 Appendix C: Sample Packet Flows . . . . . . . . . . . . . . . . . 20 C.1 PDM Flow - Simple Client Server . . . . . . . . . . . . . .21 B.1.120 C.1.1 Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . 21B.1.2C.1.2 Step 2 . . . . . . . . . . . . . . . . . . . . . . . . .22 B.1.321 C.1.3 Step 3 . . . . . . . . . . . . . . . . . . . . . . . . .23 B.1.422 C.1.4 Step 4 . . . . . . . . . . . . . . . . . . . . . . . . .24 B.1.523 C.1.5 Step 5 . . . . . . . . . . . . . . . . . . . . . . . . .25 B.224 C.2 Other Flows . . . . . . . . . . . . . . . . . . . . . . . .25 B.2.124 C.2.1 PDM Flow - One Way Traffic . . . . . . . . . . . . . . .25 B.2.224 C.2.2 PDM Flow - Multiple Send Traffic . . . . . . . . . . . . 26B.2.3C.2.3 PDM Flow - Multiple Send with Errors . . . . . . . . . . 27 AppendixC:D: Potential Overhead Considerations . . . . . . . . . .2928 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .3029 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 30 1 Background To assess performance problems, measurements based on optional sequence numbers and timing may be embedded in each packet. Such measurements may be interpreted in real-time or after the fact. As defined in RFC2460 [RFC2460], destination options are carried by the IPv6 Destination Options extension header. Destination options include optional information that need be examined only by the IPv6 node given as the destination address in the IPv6 header, not by routers or other "middle boxes". This document specifies a new destination option, the Performance and Diagnostic Metrics (PDM) destination option. This document specifies the layout, field limits, calculations, and usage of the PDM in measurement. 1.1 Terminology The key words "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 [RFC2119]. 1.2End User Quality of Service (QoS)Rationale for defined solution The current IPv6 specification does not provide timingvaluesnor a similar field in thePDM embeddedIPv6 main header or inthe packet will be usedany extension header. The IPv6 Performance and Diagnostic Metrics destination option (PDM) provides such fields. Advantages include: 1. Real measure of actual transactions. 2. Independence from transport layer protocols. 3. Ability toestimate QoS as experienced by an end user device. For many applications, the key user performance indicator is response time. Whenspan organizational boundaries with consistent instrumentation. 4. No time synchronization needed between session partners 5. Ability to handle all transport protocols (TCP, UDP, SCTP, etc) in a uniform way The PDM provides theend user is an individual, he is generally indifferentability towhat is happening alongdetermine quickly if thenetwork; what he really cares about(latency) problem ishow longin the network or in the server (application). That is, ittakes to get a response back. But thisisnot justamatterfast way to do triage. For more information on background and usage ofindividuals' personal convenience.PDM, see Appendix A. 1.3 IPv6 Transition Technologies Inmany cases, rapid responsethe path to full implementation of IPv6, transition technologies such as translation or tunneling may be employed. The PDM header iscriticalnot expected to work in such scenarios. It is likely that an IPv6 packet containing PDM will be dropped if using IPv6 transition technologies. 2 Measurement Information Derived from PDM Each packet contains information about thebusiness being conducted. Whensender and receiver. In IP protocol, theend useridentifying information is called adevice (e.g. with the Internet"5-tuple". The 5-tuple consists of: SADDR : IP address ofThings), what matters isthespeed with which requested data can be transferred -- specifically, whethersender SPORT : Port for sender DADDR : IP address of therequested data can be transferred in time to accomplishdestination DPORT : Port for destination PROTC : Protocol for upper layer (ex. TCP, UDP, ICMP, etc.) The PDM contains thedesired actions.following base fields: PSNTP : Packet Sequence Number Thiscan be important when the relevant external conditions are subject to rapid change. Low, reliable and acceptable response timesPacket PSNLR : Packet Sequence Number Last Received DELTATLR : Delta Time Last Received DELTATLS : Delta Time Last Sent Other fields for storing time scaling factors arenot just "nice to have". On many networks,also in theimpact canPDM and will befinancial hardship or can endanger human life. In some cities,described in section 3. This information, combined with theemergency police contact system operates over IP; law enforcement, at all levels, use IP networks; transactions on our stock exchanges are settled using IP networks. The critical nature5-tuple, allows the measurement ofsuch activities to our daily lives and financial well-being demandthe following metrics: 1. Round-trip delay 2. Server delay 2.1 Round-Trip Delay Round-trip *Network* delay is the delay for packet transfer from asimple solutionsource host tosupport response time measurements. 1.3 Need foraPacket Sequence Number (PSN) While performing network diagnostics of an end-to-end connection, it often becomes necessarydestination host and then back toisolatethefactors alongsource host. This measurement has been defined, and thenetwork path responsibleadvantages and disadvantages discussed in "A Round-trip Delay Metric forproblems. Diagnostic data may be collected at multiple places along the path (if possible), or atIPPM" [RFC2681]. 2.2 Server Delay Server delay is thesourceinterval between when a packet is received by a device anddestination. Then, in post-collection processing,thediagnostic datafirst correspondingto eachpacketat different observation points must be matched for proper measurements. A sequence numberis sent back ineach packet provides sufficient basis for the matching process. If need be, the timing fieldsresponse. This may beused along with"Server Processing Time". It may also be a delay caused by acknowledgements. Server processing time includes thesequence number to ensure uniqueness. This method of data collection alongtime taken by thepath iscombination ofspecial usethe stack and application todetermine where packet loss or packet corruptionreturn the response. The stack delay may be related to network performance. If this aggregate time ishappening.seen as a problem, and there is a need to make a clear distinction between application processing time and stack delay, including that caused by the network, then more client based measurements are needed. 3 Performance and Diagnostic Metrics Destination Option Layout 3.1 Destination Options Header Thepacket sequence numberIPv6 Destination Options Header is used to carry optional information that needs to beunique in the context of the session (5-tuple). See section 2 forexamined only by adefinition of 5-tuple. 1.4 Rationale for defined solutionpacket's destination node(s). Thecurrent IPv6 specification does not provide timing norDestination Options Header is identified by asimilar fieldNext Header value of 60 in theIPv6 mainimmediately preceding headerorand is defined inany extension header. So, we define theRFC2460 [RFC2460]. The IPv6 Performance and Diagnostic Metricsdestination option (PDM). Advantages include: 1. Real measureDestination Option (PDM) is an implementation ofactual transactions. 2. Independence from transport layer protocols. 3. Ability to span organizational boundaries with consistent instrumentation. 4. Nothe Destination Options Header. The PDM does not require timesynchronization needed between session partners 5. Ability to handle all transport protocols (TCP, UDP, SCTP, etc) in a uniform way Thesynchronization. 3.2 Performance and Diagnostic Metrics Destination Option 3.2.1 PDMprovides the ability to determine quickly ifLayout The IPv6 Performance and Diagnostic Metrics Destination Option (PDM) contains the(latency) problemfollowing fields: SCALEDTLR: Scale for Delta Time Last Received SCALEDTLS: Scale for Delta Time Last Sent PSNTP : Packet Sequence Number This Packet PSNLR : Packet Sequence Number Last Received DELTATLR : Delta Time Last Received DELTATLS : Delta Time Last Sent The PDM destination option is encoded in type-length-value (TLV) format as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | ScaleDTLR | ScaleDTLS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PSN This Packet | PSN Last Received | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Delta Time Last Received | Delta Time Last Sent | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type TBD = 0xXX (TBD) [To be assigned by IANA] [RFC2780] In keeping with RFC2460[RFC2460], thenetwork or intwo high order bits of theserver (application). That is, it is a fast wayOption Type field are encoded todo triage. Oneindicate specific processing of theimportant functions of PDM is to allow you to do quickly dispatchoption; for therightPDM destination option, these two bits MUST be set to 00. The third high order bit ofdiagnosticians. Within networkthe Option Type specifies whether orserver latency, there may be many components. The job of the diagnostician is to rule each one out untilnot theculprit is found. How PDM fits into this diagnostic picture isOption Data of thatPDM will quickly tell you how to escalate. PDM will pointoption can change en-route toeitherthenetwork area orpacket's final destination. In theserver area. WithinPDM, theserver latency, PDM does not tell you ifvalue of thebottleneck isthird high order bit MUST be 0. Option Length 8-bit unsigned integer. Length of the option, in octets, excluding theIP stack orOption Type and Option Length fields. This field MUST be set to 16. Scale Delta Time Last Received (SCALEDTLR) 8-bit unsigned integer. This is theapplication or buffer allocation. Withinscaling value for thenetwork latency, PDM does not tell you whichDelta Time Last Received (DELTATLR) field. The possible values are from 0-255. See Section 4 for further discussion on Timing Considerations and formatting of thenetwork segments or middle boxes is at fault. What PDM will tell you is whether the problemscaling values. Scale Delta Time Last Sent (SCALEDTLS) 8-bit signed integer. This isinthenetwork orscaling value for theserver. In our experience, thereDelta Time Last Sent (DELTATLS) field. The possible values are from 0 to 255. Packet Sequence Number This Packet (PSNTP) 16-bit unsigned integer. This field will wrap. It isoftenintended for use while analyzing packet traces. Initialized at adifferent group which is involved to troubleshoot the problem depending on the naturerandom number and incremented monotonically for each packet of theproblem. That is,session flow of theproblem may be escalated5-tuple. The random number initialization is intended tothe application developers or the team that deals with the routers and infrastructure. Both the network groupmake it harder to spoof andthe application group have quiteinsert such packets. Operating systems MUST implement afew specialized tools at their disposal to further investigate their own areas. What is missingseparate packet sequence number counter per 5-tuple. Packet Sequence Number Last Received (PSNLR) 16-bit unsigned integer. This is thefirst step, which PDM provides. In our experience, valuable time is often lost at this first stagePSNTP oftriage. PDMthe packet last received on the 5-tuple. This field isexpectedinitialized toreduce this time substantially. 1.5 PDM Works in Collaboration with Other Headers0. Delta Time Last Received (DELTATLR) A 16-bit unsigned integer field. Thepurpose of the PDMvalue isnotset according tosupplant allthevariables presentscale inall other headers but to provide data whichSCALEDTLR. Delta Time Last Received = (Send time packet n - Receive time packet n-1) Delta Time Last Sent (DELTATLS) A 16-bit unsigned integer field. The value isnot available or very difficultset according toget. The way PDM would be usedthe scale in SCALEDTLS. Delta Time Last Sent = (Receive time packet n - Send time packet n-1) 3.2.2 Base Unit for Time Measurement A time differential isbyalways atechnician (or tool) looking atwhole number in apacket capture. WithinCPU; it is thepacket capture, they would have available to themunit specification -- hours, seconds, nanoseconds -- that determine what thelayer 2 header, IP header (v6 or v4), TCP, UCP, ICMP, SCTP or other headers. All information would be looked at together to make sense ofnumeric value means. For PDM, thepacket flow. The technician or processing tool could analyze, report or ignore the data from PDM, as necessary. For an examplebase time unit is 1 attosecond (asec). This allows for a common unit and scaling ofhowthe time differential among all IP stacks and hardware implementations. Note that PDMcan help with TCP retransmit problems, please look at section 8. 1.6 IPv6 Transition Technologies Inprovides thepathability tofull implementation of IPv6, transition technologies such as translation or tunnelingmeasure both time differentials that are extremely small, and time differentials in a DTN-type environment where the delays may beemployed. The PDM header is not expected to workvery great. To store a time differential insuch scenarios. It is likelyjust 16 bits thatan IPv6 packet containing PDMmust range in this way willbe dropped if using IPv6 transition technologies. 2 Measurement Information Derivedrequire some scaling of the time differential value. One issue is the conversion fromPDM Each packet contains information aboutthesender and receiver. In IP protocol,native time base in theidentifying informationCPU hardware of whatever device iscalled a "5-tuple". The 5-tuple consists of: SADDR : IP addressin use to some number of attoseconds. It might seem this will be an astronomical number, but thesender SPORT : Port for sender DADDR : IP addressconversion is straightforward. It involves multiplication by an appropriate power of 10 to change thedestination DPORT : Port for destination PROTC : Protocol for upper layer (ex. TCP, UDP, ICMP, etc.) The PDM containsvalue into a number of attoseconds. Then, to scale thefollowing base fields: PSNTP : Packet Sequence Number This Packet PSNLR : Packet Sequence Number Last Receivedvalue so that it fits into DELTATLR: Delta Time Last Received DELTATLS : Delta Time Last Sent Other fields for storing time scaling factors are also in the PDM and will be described in section 3. This information, combined with the 5-tuple, allows the measurement ofor DELTATLS, thefollowing metrics: 1. Round-trip delay 2. Server delay 2.1 Round-Trip Delay Round-trip *Network* delayvalue isthe delay for packet transfer from a source host toshifted by of adestination host and then back to the source host. This measurement has been defined, andnumber of bits, retaining theadvantages and disadvantages discussed in "A Round-trip Delay Metric for IPPM" [RFC2681]. 2.2 Server Delay Server delay is16 high-order or most significant bits. The number of bits shifted becomes theinterval between when a packet is received byscaling factor, stored as SCALEDTLR or SCALEDTLS, respectively. For adevice and the first corresponding packetfull description of this process, including examples, please see Appendix A. 3.3 Header Placement The PDM Destination Option issent backplaced as defined inresponse. This may be "Server Processing Time". ItRFC2460 [RFC2460]. There mayalsobe adelay caused by acknowledgements. Server processing time includes the time taken by the combinationchoice ofthe stack and applicationwhere toreturnplace theresponse. The stack delay may be related to network performance.Destination Options header. If using ESP mode, please see section 3.4 of thisaggregate time is seen as a problem, and there is a need to make a clear distinction between application processing time and stack delay, including that caused bydocument for placement of thenetwork, then more client based measurements are needed. 3 Performance and Diagnostic Metrics Destination Option Layout 3.1PDM Destination OptionsHeader Theheader. For each IPv6Destination Options Header is used to carry optional information that needs to be examined only by a packet's destination node(s). The Destination Options Header is identified bypacket header, the PDM MUST NOT appear more than once. However, an encapsulated packet MAY contain aNextseparate PDM associated with each encapsulated IPv6 header. 3.4 Headervalue of 60 in the immediately preceding header andPlacement Using IPSec ESP Mode IPSec Encapsulating Security Payload (ESP) is defined inRFC2460 [RFC2460]. The IPv6 Performance[RFC4303] andDiagnostic Metrics Destination Option (PDM)isan implementationwidely used. Section 3.1.1 of [RFC4303] discusses placement oftheDestination OptionsHeader.Headers. The placement of PDMdoes not require time synchronization. 3.2 Performance and Diagnostic Metrics Destination Option 3.2.1 PDM Layout The IPv6 Performance and Diagnostic Metricsis different depending on if ESP is used in tunnel or transport mode. 3.4.1 Using ESP Transport Mode Note that DestinationOption (PDM) contains the following fields: SCALEDTLR: Scale for Delta Time Last Received SCALEDTLS: Scale for Delta Time Last Sent PSNTP : Packet Sequence Number This Packet PSNLR : Packet Sequence Number Last Received DELTATLR : Delta Time Last Received DELTATLS : Delta Time Last Sent TheOptions MAY be placed before or after ESP or both. If using PDMdestination option is encodedintype-length-value (TLV) formatESP transport mode, PDM MUST be placed after the ESP header so asfollows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | ScaleDTLR | ScaleDTLS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PSN This Packet | PSN Last Received | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Delta Time Last Received | Delta Time Last Sent | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Type TBD = 0xXX (TBD) [Tonot to leak information. 3.4.2 Using ESP Tunnel Mode Note that Destination Options MAY beassigned by IANA] [RFC2780] Option Length 8-bit unsigned integer. Length of the option,placed before or after ESP or both inoctets, excludingboth theOption Type and Option Length fields. This field MUST beouter setto 16. Scale Delta Time Last Received (SCALEDTLR) 8-bit unsigned integer. This is the scaling value for the Delta Time Last Received (DELTATLR) field. The possible values are from 0-255. See Section 4 for further discussion on Timing Considerations and formattingof IP headers and thescaling values. Scale Delta Time Last Sent (SCALEDTLS) 8-bit signed integer. This is the scaling value for the Delta Time Last Sent (DELTATLS) field. The possible values are from 0 to 255. Packet Sequence Number This Packet (PSNTP) 16-bit unsigned integer. This field will wrap. It is intended for use while analyzing packet traces. Initialized atinner set of IP headers. A tunnel endpoint that creates arandom number and incremented monotonically for eachnew packet may decide to use PDM independent of thesession flowuse of PDM of the5-tuple. The random number initialization is intendedoriginal packet tomake it harderenable delay measurements between the two tunnel endpoints 3.5 Implementation Considerations 3.5.1 PDM Activation An implementation should provide an interface tospoof and insert such packets. Operating systemsenable or disable the use of PDM. This specification recommends having PDM off by default. PDM MUSTimplementNOT be turned on merely if aseparatepacketsequence number counter per 5-tuple. Packet Sequence Number Last Received (PSNLR) 16-bit unsigned integer. Thisisthe PSNTP of the packet lastreceivedon the 5-tuple. Delta Time Last Received (DELTATLR) A 16-bit unsigned integer field.with a PDM header. Thevalue is set according to the scale in SCALEDTLR. Delta Time Last Received = (Send time packet 2 - Receive timereceived packet1) Delta Time Last Sent (DELTATLS) A 16-bit unsigned integer field.could be spoofed by another device. 3.5.2 PDM Timestamps Thevalue is set accordingPDM timestamps are intended tothe scale in SCALEDTLS. Delta Time Last Sent = (Receiveisolate wire timepacket 2 - Sendfrom server or host time, but may necessarily attribute some host processing timepacket 1) Option Type In keeping with RFC2460[RFC2460], theto network latency. RFC2330 [RFC2330] "Framework for IP Performance Metrics" describes twohigh order bitsnotions ofthe Option Type fieldwire time in section 10.2. These notions areencoded to indicate specific processingonly defined in terms of an Internet host H observing an Internet link L at a particular location: + For a given IP packet P, theoption; for the PDM destination option, these two bits MUST be set to 00. The third high order bit'wire arrival time' of P at H on L is theOption Type specifies whether or not the Option Datafirst time T at which any bit ofthat option can change en-route toP has appeared at H's observational position on L. + For a given IP packet P, thepacket's final destination. In'wire exit time' of P at H on L is thePDM,first time T at which all thevaluebits of P have appeared at H's observational position on L. This specification does not define thethird high order bit MUST be 0. 3.2.2 Base Unit for Time Measurement A time differential is always a whole number in a CPU; itexact H's observing position on L. That is left for theunit specification -- hours, seconds, nanoseconds -- that determine whatdeployment setups to define. However, thenumeric value means. For PDM, we establishposition where PDM timestamps are taken SHOULD be as close to thebase time unitphysical network interface as1 attosecond (asec). This allows for a common unit and scalingpossible. Not all implementations will be able to achieve the ideal level of measurement. 3.6 Dynamic Configuration Options If thetime differential amongPDM destination options extension header is used, then it MAY be turned on for allIP stacks and hardware implementations. Note that we are trying to providepackets flowing through theabilityhost, applied tomeasure both time differentials that are extremely small, and time differentials inan upper-layer protocol (TCP, UDP, SCTP, etc), aDTN-type environment wherelocal port, or IP address only. These are at thedelaysdiscretion of the implementation. 3.7 Information Access and Storage Measurement information provided by PDM may bevery great. To store a time differential in just 16 bits that must range in this way will require some scalingmade accessible for higher layers or the user itself. Similar to activating the use of PDM, thetime differential value. One issueimplementation may also provide an interface to indicate if received PDM information may be stored, if desired. If a packet with PDM information is received and theconversion frominformation should be stored, thenative time base inupper layers may be notified. Furthermore, theCPU hardwareimplementation should define a configurable maximum lifetime after which the information can be removed as well as a configurable maximum amount ofwhatever device is in use tomemory that should be allocated for PDM information. 4 Security Considerations PDM may introduce somenumbernew security weaknesses. 4.1 Resource Consumption and Resource Consumption Attacks PDM needs to calculate the deltas for time and keep track ofattoseconds. It might seem this willthe sequence numbers. This means that control blocks which reside in memory may bean astronomical number, butkept at theconversionend hosts per 5-tuple. A limit on how much memory isstraightforward. It involves multiplication bybeing used SHOULD be implemented. Without a memory limit, any time a control block is kept in memory, anappropriate power of 10attacker can try tochangemis-use thevalue into a number of attoseconds. Then,control blocks toscalecause excessive resource consumption. This could be used to compromise thevalue so that it fits into DELTATLR or DELTATLS,end host. PDM is used only at thevalueend hosts and memory isshifted by of a number of bits, retainingused only at the16 high-orderend host and not at routers ormost significant bits. The number of bits shifted becomesmiddle boxes. 4.2 Pervasive monitoring Since PDM passes in thescaling factor, stored as SCALEDTLR or SCALEDTLS, respectively. For a full description of this process, including examples, please see Appendix A. 3.2.3 Considerations of this time-differential representation There areclear, afew considerationsconcern arises as tobe taken into account with this representation of a time differential. The first iswhetherthere are any limitations onthemaximum or minimum time differential thatdata can beexpressed using methodused to fingerprint the system or somehow obtain information about the contents ofa delta value and a scaling factor. The second istheamountpayload. Let us discuss fingerprinting ofimprecision introduced by this method. 3.2.3.1 Limitations with this encoding method The DELTATLS and DELTATLR fields store onlythe16 most-significant bitsend host first. It is possible that seeing the pattern of deltas or thetime differential value. Thusabsolute values could give some information as to therange, excludingspeed of thescaling factor,end host - that is, if it isfrom 0 to 65535, oramaximum of 2**16-1.very fast system or an older, slow device. Thismethod is further described in [TRAM-TCPM]. The actual magnitude ofmay be useful to thetime differential is determined byattacker. However, if thescaling factor. SCALEDTLR and SCALEDTLS are 8-bit unsigned integers, soattacker has access to PDM, thescaling factor ranges from 0attacker also has access to255. The smallest number that can be represented would have a value of 1 inthedelta fieldentire packet and could make such avalue of 0 in the associated scale field. This isdeduction based merely on therepresentation for 1 attosecond. Clearly this allows PDM to measure extremely smalltimedifferentials. Onframes elapsed between packets WITHOUT PDM. As far as deducing theother endcontent of thescale, the maximum delta valuepayload, it appears to us that PDM is65535, or FFFFquite unhelpful inhexadecimal. If the maximum scale valuethis regard. 4.3 PDM as a Covert Channel PDM provides a set of255 is used,fields in thetime differential represented is 65535*2**255,packet whichis over 3*10**55 years, essentially, forever. So there appears tocould be used to leak data. But, there is no reallimitationreason tothe time differentialsuspect thatcan be represented. 3.2.3.2 Loss of precision induced by timer value truncation AsPDMspecifies the DELTATLR and DELTATLS values as 16-bit unsigned integers, any time the precision is greater than those 16 bits, there willwould betruncation of the trailing bits, with an accompanying losschosen rather than another part ofprecision inthevalue. Any time differential value smaller than 65536 asec can be stored exactly in DELTATLRpayload orDELTATLS, becauseanother Extension Header. A firewall or another device could sanity check therepresentation of this value requires at most 16 bits. Sincefields within thetime differential values inPDMare measuredbut randomly assigned sequence numbers and delta times might be expected to vary widely. The biggest problem though is how an attacker would get access to PDM inattoseconds,therange of values thatfirst place to leak data. The attacker wouldbe truncatedhave to either compromise thesame encoded value is 2**(Scale)-1 asec. For example,end host or have Man in thesmallest time differentialMiddle (MitM). It is possible that either one could change the fields. But, then the other end host wouldbe truncated to fit into a delta field is 1 0000 0000 0000 0000 = 65536 asec This value would be encoded as a delta value of 8000 (hexadecimal) with a scaling factor of 1. The value 1 0000 0000 0000 0001 = 65537 asec would also be encoded as a delta value of 8000get sequence numbers and deltas that don't make any sense. It is conceivable that someone could compromise an end host and make it start sending packets witha scaling factorPDM without the knowledge of1. This actually isthelargest value that would be truncated to that same encoded value. Whenhost. But, again, thescale valuebigger problem is1,thevalue range is calculated as 2**1 - 1, or 1 asec, which you can see iscompromise of thedifference between these minimum and maximum values. The scaling factorend host. Once that isdefined asdone, the attacker probably has better ways to leak data. Having said that, if a PDM aware middle box or an implementation detects some number oflow-order bits truncated"nonsensical" sequence numbers it could take action toreduceblock (or alert on) this traffic. 4.4 Timing Attacks The fact that PDM can help in thesizeseparation ofthe resultingnode processing time from network latency brings valuesoto performance monitoring. Yet, itfits into a 16-bit delta field. If, for example, you hadis this very characteristic of PDM which may be misused totruncate 12 bits, the lossmake certain new type ofprecision would dependtiming attacks against protocols and implementations possible. Depending on thebits you truncated. The rangenature ofthese values wouldthe cryptographic protocol used, it may be0000 0000 0000 = 0 asecpossible to1111 1111 1111 = 4095 asec Soleak theminimum losslong term credentials ofprecision would be 0 asec, wherethedelta value exactly representsdevice. For example, if an attacker is able to create an attack which causes thetime differential, andenterprise to turn on PDM to diagnose themaximum loss of precision would be 4095 asec. As stated above,attack, then thescaling factor of 12 meansattacker might use PDM during that debugging time to launch a timing attack against themaximum loss of precisionlong term keying material used by the cryptographic protocol. An implementation may want to be sure that PDM is2**12-1 asec,enabled only for certain ip addresses, or4095 asec. Compare this loss of precision toonly for some ports. Additionally, theactual time differential. The rangeimplementation SHOULD require an explicit restart ofactualmonitoring after a certain timedifferential valuesperiod (for example for 1 hour), to make sure thatwould incur this loss of precisionPDM isfrom 1000 0000 0000 0000 0000 0000 0000 = 2**27 asec or 134217728 asecnot accidentally left on after debugging has been done etc. Even so, if using PDM, a user "Consent to1111 1111 1111 1111 1111 1111 1111 = 2**28-1 asec or 268435455 asec Granted, these are small values, but the point is, any value between these two values will havebe Measured" SHOULD be amaximum loss of precision of 4095 asec, or about 0.00305%pre-requisite forthe first value, as encoded, and at most 0.001526% for the second. These maximum-loss percentages are consistent for all scaling values. 3.3 Header Placement The PDM Destination Optionusing PDM. Consent isplaced as definedcommon inRFC2460 [RFC2460]. There may be a choiceenterprises and with some subscription services. The actual content ofwhere"Consent toplacebe Measured" will differ by site but it SHOULD make clear that theDestination Options header. If using ESP mode, please see section 3.4 of this documenttraffic is being measured forplacementquality ofthe PDM Destination Options header. For each IPv6 packet header, the PDM MUST NOT appear more than once. However, an encapsulated packet MAY contain a separate PDM associated with each encapsulated IPv6 header. 3.4 Header Placement Using IPSec ESP Mode IPSec Encapsulating Security Payload (ESP) is defined in [RFC4303]service andis widely used. Section 3.1.1 of [RFC4303] discusses placement of Destination Options Headers. The placementto assist in diagnostics as well as to make clear that there may be potential risks ofPDM is different depending oncertain vulnerabilities ifESPthe traffic isusedcaptured during a diagnostic session 5 IANA Considerations This draft requests an Option Type assignment intunnel or transport mode. 3.4.1 Using ESP Transport Mode Below isthediagram from [RFC4303] discussing placement of headers. Note thatDestination OptionsMAY be placed before or after ESP or both. If using PDM in ESP transport mode, PDM MUST be placed after the ESP header so as notand Hop-by-Hop Options sub-registry of Internet Protocol Version 6 (IPv6) Parameters [ref toleak information. BEFORE APPLYING ESP --------------------------------------- IPv6 | | ext hdrs | | | | orig IP hdr |if present| TCP | Data | --------------------------------------- AFTER APPLYING ESP --------------------------------------------------------- IPv6 | orig |hop-by-hop,dest*,| |dest| | | ESP | ESP| |IP hdr|routing,fragment.|ESP|opt*|TCP|Data|Trailer| ICV| --------------------------------------------------------- |<--- encryption ---->| |<------ integrity ------>| * = if present, could be before ESP, after ESP, or both 3.4.2 Using ESP Tunnel Mode Below isRFCs and URL below]. http://www.iana.org/assignments/ipv6-parameters/ipv6- parameters.xhtml#ipv6-parameters-2 Hex Value Binary Value Description Reference act chg rest ------------------------------------------------------------------- TBD TBD Performance and [This draft] Diagnostic Metrics (PDM) 6 References 6.1 Normative References [RFC1122] Braden, R., "Requirements for Internet Hosts -- Communication Layers", RFC 1122, October 1989. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998. [RFC2681] Almes, G., Kalidindi, S., and M. Zekauskas, "A Round-trip Delay Metric for IPPM", RFC 2681, September 1999. [RFC2780] Bradner, S. and V. Paxson, "IANA Allocation Guidelines For Values In thediagram fromInternet Protocol and Related Headers", BCP 37, RFC 2780, March 2000. [RFC4303]discussing placementKent, S, "IP Encapsulating Security Payload (ESP)", RFC 4303, December 2005. 6.2 Informative References [RFC2330] Paxson, V., Almes, G., Mahdavi, J., and M. Mathis, "Framework for IP Performance Metrics", RFC 2330, May 1998. [TRAM-TCPM] Trammel, B., "Encoding ofheaders. Note that Destination Options MAY be placed before or after ESP or both in bothTime Intervals for theouter setTCP Timestamp Option-01", Internet Draft, July 2013. [Work in Progress] Appendix A: Context for PDM A.1 End User Quality ofIP headers andService (QoS) The timing values in theinner set of IP headers. In ESP tunnel mode,PDMMAYembedded in the packet will beplaced before or afterused to estimate QoS as experienced by an end user device. For many applications, theESP header or both. BEFORE APPLYING ESP --------------------------------------- IPv6 | | ext hdrs | | | | orig IP hdr |if present| TCP | Data | --------------------------------------- AFTER APPLYING ESP ------------------------------------------------------------ IPv6 | new* |new ext | | orig*|orig ext | | | ESP | ESP| |IP hdr| hdrs* |ESP|IP hdr| hdrs * |TCP|Data|Trailer| ICV| ------------------------------------------------------------ |<--------- encryption ---------->| |<------------ integrity ------------>| * = if present, construction of outer IP hdr/extensions and modification of inner IP hdr/extensionskey user performance indicator isdiscussed in the Security Architecture document. As a completely new IP packet will be made, it means that PDM information for that packet does not contain any information from the inner packet, i.e. the PDM information will NOT be based on the transport layer (TCP, UDP, etc) ports etc inresponse time. When theinner header, but will be specificend user is an individual, he is generally indifferent tothe ESP flow. If PDM information for the inner packetwhat isdesired, the original host sendinghappening along theinner packet needsnetwork; what he really cares about is how long it takes toput PDM header in the tunneled packet, and then the PDM information will be specific for that stream. 3.5 Implementation Considerations 3.5.1 PDM Activation The PDM destination options extension header MUST be explicitly turned on by each stack onget ahost node by administrative action. The default value of PDMresponse back. But this isoff. PDM MUST NOT be turned on merely ifnot just apacketmatter of individuals' personal convenience. In many cases, rapid response isreceived with a PDM header. The received packet could be spoofed by another device. 3.5.2 PDM Timestamps The PDM timestampscritical to the business being conducted. Low, reliable and acceptable response times areintendednot just "nice toisolate wire time from serverhave". On many networks, the impact can be financial hardship orhost time, but may necessarily attributecan endanger human life. In somehost processing time to network latency. RFC2330 [RFC2330] "Framework forcities, the emergency police contact system operates over IP; law enforcement, at all levels, use IPPerformance Metrics" describes two notions of wire time in section 10.2. These notionsnetworks; transactions on our stock exchanges areonly defined in terms of an Internet host H observing an Internet link L at a particular location: + For a givensettled using IPpacket P, the 'wire arrival time'networks. The critical nature ofP at H on L is the firstsuch activities to our daily lives and financial well-being demand a simple solution to support response timeT at which any bit of P has appeared at H's observational position on L. + Formeasurements. A.2 Need for agiven IP packet P, the 'wire exit time'Packet Sequence Number (PSN) While performing network diagnostics ofP at H on L isan end-to-end connection, it often becomes necessary to isolate thefirst time Tfactors along the network path responsible for problems. Diagnostic data may be collected atwhich allmultiple places along thebits of P have appearedpath (if possible), or atH's observational position on L. This specification does not definetheexact H's observing position on L. That is left forsource and destination. Then, in post-collection processing, thedeployment setupsdiagnostic data corresponding todefine. However, the position where PDM timestamps are taken SHOULDeach packet at different observation points must beas close tomatched for proper measurements. A sequence number in each packet provides sufficient basis for thephysical network interface as possible. Not all implementations will be able to achieve the ideal level of measurement. 3.6 Dynamic Configuration Options If implemented, each operating system MUST have a default configuration parameter, e.g. diag_header_sys_default_value=yes/no. The operating system MAY also have a dynamic configuration option to change the configuration setting as needed.matching process. If need be, thePDM destination options extension header is used, then it MAYtiming fields may beturned on for all packets flowing throughused along with thehost, appliedsequence number toan upper-layer protocol (TCP, UDP, SCTP, etc), a local port, or IP address only. These are at the discretionensure uniqueness. This method of data collection along theimplementation. 3.6 5-tuple Aging Within the operating system, metrics must be kept on a 5-tuple basis. The question comespath is ofwhenspecial use tostop keeping datadetermine where packet loss orrestarting the numbering for a 5-tuple. For example,packet corruption is happening. The packet sequence number needs to be unique in thecasecontext ofTCP, at some point,theconnection will terminate. Keeping data in control blocks forever, will have unfortunate consequencessession (5-tuple). A.3 Rationale for Defined Solution One of theoperating system. So, the recommendationimportant functions of PDM is touse a known aging parameter such as Max Segment Lifetime (MSL) as defined in Transmission Control Protocol [RFC0793]allow you toreuse or dropdo quickly dispatch thecontrol block.right set of diagnosticians. Within network or server latency, there may be many components. Thechoicejob ofaging parameterthe diagnostician isleft upto rule each one out until theimplementation. 4 Security Considerationsculprit is found. How PDMmay introduce some new security weaknesses. 4.1. SYN Flood and Resource Consumption Attacksfits into this diagnostic picture is that PDMneedswill quickly tell you how tocalculateescalate. PDM will point to either thedeltas for time and keep track ofnetwork area or thesequence numbers. This means that control blocks must be kept at the end hosts per 5-tuple. Any time a control block is kept, an attacker can try to mis-use the control blocks such that there is a compromise ofserver area. Within theend host.server latency, PDM does not tell you if the bottleneck isused only atin theend hosts andIP stack or thecontrol blocks are only kept atapplication or buffer allocation. Within theend host andnetwork latency, PDM does notat routerstell you which of the network segments or middleboxes. Remember,boxes is at fault. What PDM does tell you isan implementation ofwhether theDestination Option extension header. A "SYN flood" type of attack succeeds because a TCP SYN packetproblem issmall but it causesin theend host to start creating a place holder fornetwork or thesession such that quite a bit of control block andserver. A.4 Use PDM with Other Headers For diagnostics, one my want to use PDM with otherstorageheaders (L2, L3, etc). For example, if PDM isused. Thisused isan asynchronous type of attack in that a small amount of workbythe attacker createsalarge amount of work by the resource attacked. For PDM,technician (or tool) looking at a packet capture, within theamount of datapacket capture, they would have available tobe kept is quite small. That is,them thecontrol block is quite lightweight. Concerns about SYN Flood andlayer 2 header, IP header (v6 or v4), TCP, UCP, ICMP, SCTP or othertype of resource consumption attacks (memory, processing power, etc) canheaders. All information would bealleviated by having a limit on the number of control block entries. We recommend that implementationlooked at together to make sense ofPDM SHOULD have a limit onthenumberpacket flow. The technician or processing tool could analyze, report or ignore the data from PDM, as necessary. For an example ofcontrol block entries. 4.2 Pervasive monitoring Sincehow PDMpassescan help with TCP retransmit problems, please look at Appendix C. Appendix B : Timing Considerations B.1 Timing Differential Calculations The time counter inthe clear,aconcern arisesCPU is a binary whole number, representing a number of milliseconds (msec), microseconds (usec) or even picoseconds (psec). Representing one of these values as attoseconds (asec) means multiplying by 10 raised towhether the data can be usedsome exponent. Refer tofingerprint the system or somehow obtain information about the contentsthis table ofthe payload. Let us discuss fingerprintingequalities: Base value = # ofthe end host first. Itsec = # of asec 1000s of asec --------------- ------------- ------------- ------------- 1 second 1 sec 10**18 asec 1000**6 asec 1 millisecond 10**-3 sec 10**15 asec 1000**5 asec 1 microsecond 10**-6 sec 10**12 asec 1000**4 asec 1 nanosecond 10**-9 sec 10**9 asec 1000**3 asec 1 picosecond 10**-12 sec 10**6 asec 1000**2 asec 1 femtosecond 10**-15 sec 10**3 asec 1000**1 asec For example, if you have a time differential expressed in microseconds, since each microsecond ispossible that seeing10**12 asec, you would multiply your time value by 10**12 to obtain thepatternnumber ofdeltas or the absolute values could give some information asattoseconds. If you time differential is expressed in nanoseconds, you would multiply by 10**9 to get thespeednumber ofthe end host - that is, if itattoseconds. The result is avery fast system or an older, slow device. This may be useful to the attacker. However, if the attacker has access to PDM, the attacker also has accessbinary value that will need tothe entire packet and could make suchbe shortened by adeduction based merely on the time frames elapsed between packets WITHOUT PDM. As far as deducing the contentnumber ofthe payload,bits so itappears to us thatwill fit into the 16-bit PDM DELTA field. The next step isquite unhelpfulto divide by 2 until the value is contained inthis regard. 4.3 PDM as a Covert Channel PDM provides a setjust 16 significant bits. The exponent offieldsthe value in thepacket which could be used to leak data. But, there is no real reason to suspect that PDM would be chosen rather than another partlast column of of thepayload or another Extension Header. A firewall or another device could sanity check the fields withintable is useful here; thePDM but randomly assigned sequence numbers and delta times might be expected to vary widely. The biggest problem thoughinitial scaling factor ishow an attacker would get accessthat exponent multiplied by 10. This is the minimum number of low-order bits toPDM inbe shifted-out or discarded. It represents dividing thefirst placetime value by 1024 raised toleak data.that exponent. Theattacker would haveresulting value may still be too large toeither compromisefit into 16 bits, but can be normalized by shifting out more bits (dividing by 2) until theend host or have Man invalue fits into theMiddle (MitM). It16-bit DELTA field. The number of extra bits shifted out ispossible that either one could change the fields. But,then added to theother end host would get sequence numbers and deltas that don't make any sense. Presumably, one is using PDM and doing packet tracing for diagnostic purposes, soscaling factor. The scaling factor, thechanges would be obvious. Ittotal number of low-order bits dropped, isconceivable that someone could compromisethe SCALEDTL value. For example: say anend host and make itapplication has these startsending packets with PDM withoutand finish timer values (hexadecimal values, in microseconds): Finish: 27C849234 usec (02:57:58.997556) -Start: 27C83F696 usec (02:57:58.957718) ========== ========= =============== Difference 9B9E usec 00.039838 sec or 39838 usec To convert this differential value to binary attoseconds, multiply theknowledgenumber of microseconds by 10**12. Divide by 1024**4, or simply discard 40 bits from thehost. But, again,right. The result is 36232, or 8D88 in hex, with a scaling factor or SCALEDTL value of 40. For another example, presume thebigger problemtime differential is larger, say 32.311072 seconds, which is 32311072 usec. Each microsecond is 10**12 asec, so multiply by 10**12, giving thecompromisehexadecimal value 1C067FCCAE8120000. Using the initial scaling factor of 40, drop theend host. Oncelast 10 characters (40 bits) from that string, giving 1C067FC. This will not fit into a DELTA field, as it isdone,25 bits long. Shifting theattacker probably has better waysvalue toleak data. Having said that, an implementation SHOULD stop using PDM if it gets some number of "nonsensical" sequence numbers. 4.4 Timing Attacks The fact that PDM can help intheseparation of node processing time from network latency bringsright another 9 bits results in a DELTA valueto performance monitoring. Yet, it is this very characteristicofPDM which may be misused to make certain new typeE033, with a resulting scaling factor oftiming attacks against protocols and implementations possible. Depending on49. When thenaturetime differential value is a small number, regardless of thecryptographic protocol used, it may be possible to leaktime unit, thelong term credentials ofexponent trick given above is not useful in determining thedevice.proper scaling value. For example, ifan attacker is able to create an attack which causes the enterprise to turn on PDM to diagnose the attack, thentheattacker might use PDM during that debuggingtimeto launch a timing attack against the long term keying material used by the cryptographic protocol. An implementation maydifferential is 3 seconds and you want tobe sure that PDM is enabled only for certain ip addresses, or only for some ports. Additionally, we recommendconvert that directly, you would follow this path: 3 seconds = 3*10**18 asec (decimal) = 29A2241AF62C0000 asec (hexadecimal) If you just truncate theimplementation SHOULD require an explicit restartlast 60 bits, you end up with a delta value ofmonitoring after2 and acertain timeperiod (for example for 1 hour), to make sure that PDM is not accidently left on after debugging has been done etc. Even so, if using PDM, we introduce the conceptscaling factor ofuser "Consent to be Measured" as60, when what you really wanted was apre-requisite for using PDM. Consent is common in enterprises and with some subscription services. So, ifdelta value withPDM, we recommend that the user SHOULD consent to its use. 5 IANA Considerations This draft requests an Option Type assignmentmore significant digits. The most precision with which you can store this value inthe Destination Options and Hop-by-Hop Options sub-registry16 bits is A688, with a scaling factor ofInternet Protocol Version 6 (IPv6) Parameters [ref to RFCs and URL below]. http://www.iana.org/assignments/ipv6-parameters/ipv6- parameters.xhtml#ipv6-parameters-2 Hex Value Binary Value Description Reference act chg rest ------------------------------------------------------------------- TBD TBD Performance and [This draft] Diagnostic Metrics (PDM) 6 References 6.1 Normative References [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. [RFC1122] Braden, R., "Requirements for Internet Hosts -- Communication Layers", RFC 1122, October 1989. [RFC2119] Bradner, S., "Key words for use in RFCs46. B.2 Considerations of this time-differential representation There are a few considerations toIndicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998. [RFC2681] Almes, G., Kalidindi, S., and M. Zekauskas, "A Round-trip Delay Metric for IPPM", RFC 2681, September 1999. [RFC2780] Bradner, S. and V. Paxson, "IANA Allocation Guidelines For Values Inbe taken into account with this representation of a time differential. The first is whether there are any limitations on theInternet Protocolmaximum or minimum time differential that can be expressed using method of a delta value andRelated Headers", BCP 37, RFC 2780, March 2000. [RFC4303] Kent, S, "IP Encapsulating Security Payload (ESP)", RFC 4303, December 2005. 6.2 Informative References [RFC2330] Paxson, V., Almes, G., Mahdavi, J.,a scaling factor. The second is the amount of imprecision introduced by this method. B.2.1 Limitations with this encoding method The DELTATLS andM. Mathis, "Framework for IP Performance Metrics", RFC 2330, May 1998. [TRAM-TCPM] Trammel, B., "EncodingDELTATLR fields store only the 16 most-significant bits ofTime Intervals fortheTCP Timestamp Option-01", Internet Draft, July 2013. [Worktime differential value. Thus the range, excluding the scaling factor, is from 0 to 65535, or a maximum of 2**16-1. This method is further described inProgress] Appendix A : Timing Time Differential Calculations[TRAM-TCPM]. The actual magnitude of the time differential is determined by the scaling factor. SCALEDTLR and SCALEDTLS are 8-bit unsigned integers, so the scaling factor ranges from 0 to 255. Thetime countersmallest number that can be represented would have a value of 1 in the delta field and aCPUvalue of 0 in the associated scale field. This isa binary whole number, representing a numberthe representation for 1 attosecond. Clearly this allows PDM to measure extremely small time differentials. On the other end ofmilliseconds (msec), microseconds (usec)the scale, the maximum delta value is 65535, oreven picoseconds (psec). Representing oneFFFF in hexadecimal. If the maximum scale value ofthese values as attoseconds (asec) means multiplying by 10 raised255 is used, the time differential represented is 65535*2**255, which is over 3*10**55 years, essentially, forever. So there appears tosome exponent. Referbe no real limitation tothis tablethe time differential that can be represented. B.2.2 Loss ofequalities: Baseprecision induced by timer value= # of sec = # of asec 1000s of asec --------------- ------------- ------------- ------------- 1 second 1 sec 10**18 asec 1000**6 asec 1 millisecond 10**-3 sec 10**15 asec 1000**5 asec 1 microsecond 10**-6 sec 10**12 asec 1000**4 asec 1 nanosecond 10**-9 sec 10**9 asec 1000**3 asec 1 picosecond 10**-12 sec 10**6 asec 1000**2 asec 1 femtosecond 10**-15 sec 10**3 asec 1000**1 asec For example, if you have atruncation As PDM specifies the DELTATLR and DELTATLS values as 16-bit unsigned integers, any timedifferential expressed in microseconds, since each microsecondthe precision is10**12 asec, you would multiply yourgreater than those 16 bits, there will be truncation of the trailing bits, with an accompanying loss of precision in the value. Any time differential valueby 10**12 to obtainsmaller than 65536 asec can be stored exactly in DELTATLR or DELTATLS, because thenumberrepresentation ofattoseconds. If youthis value requires at most 16 bits. Since the time differentialis expressedvalues innanoseconds, youPDM are measured in attoseconds, the range of values that wouldmultiply by 10**9be truncated togetthenumber of attoseconds. The result is a binarysame encoded value is 2**(Scale)-1 asec. For example, the smallest time differential thatwill need towould beshortened by a number of bits so it willtruncated to fit intothe 16-bit PDM DELTA field. The next stepa delta field isto divide by 2 until the1 0000 0000 0000 0000 = 65536 asec This valueis contained in just 16 significant bits. The exponent of thewould be encoded as a delta valuein the last columnof 8000 (hexadecimal) with a scaling factor ofthe table is useful here; the initial1. The value 1 0000 0000 0000 0001 = 65537 asec would also be encoded as a delta value of 8000 with a scaling factoris that exponent multiplied by 10.of 1. This actually is theminimum number of low-order bits to be shifted-out or discarded. It represents dividing the timelargest valueby 1024 raised tothatexponent. The resulting value may stillwould betoo largetruncated tofit into 16 bits, but can be normalized by shifting out more bits (dividing by 2) untilthat same encoded value. When the scale valuefits intois 1, the16-bit DELTA field. The number of extra bits shifted outvalue range is calculated as 2**1 - 1, or 1 asec, which you can see isthen added tothescaling factor.difference between these minimum and maximum values. The scalingfactor,factor is defined as thetotalnumber of low-order bitsdropped, istruncated to reduce theSCALEDTL value. For example: say an application has these start and finish timer values (hexadecimal values, in microseconds): Finish: 27C849234 usec (02:57:58.997556) -Start: 27C83F696 usec (02:57:58.957718) ========== ========= =============== Difference 9B9E usec 00.039838 sec or 39838 usec To convert this differentialsize of the resulting value so it fits into a 16-bit delta field. If, for example, you had tobinary attoseconds, multiplytruncate 12 bits, thenumberloss ofmicroseconds by 10**12. Divide by 1024**4, or simply discard 40 bits fromprecision would depend on theright.bits you truncated. Theresult is 36232, or 8D88 in hex, with a scaling factor or SCALEDTL valuerange of40. For another example, presumethese values would be 0000 0000 0000 = 0 asec to 1111 1111 1111 = 4095 asec So thetime differential is larger, say 32.311072 seconds, which is 32311072 usec. Each microsecond is 10**12minimum loss of precision would be 0 asec,so multiply by 10**12, givingwhere thehexadecimaldelta value1C067FCCAE8120000. Using the initial scaling factor of 40, drop the last 10 characters (40 bits) from that string, giving 1C067FC. This will not fit into a DELTA field, as it is 25 bits long. Shiftingexactly represents thevalue totime differential, and theright another 9 bits results in a DELTA valuemaximum loss ofE033, with a resultingprecision would be 4095 asec. As stated above, the scaling factor of49. When12 means thetime differential valuemaximum loss of precision isa small number, regardless2**12-1 asec, or 4095 asec. Compare this loss of precision to the actual timeunit, the exponent trick given above is not useful in determining the proper scaling value. For example, if thedifferential. The range of actual time differentialis 3 seconds and you want to convertvalues thatdirectly, youwouldfollowincur thispath: 3 secondsloss of precision is from 1000 0000 0000 0000 0000 0000 0000 =3*10**182**27 asec(decimal)or 134217728 asec to 1111 1111 1111 1111 1111 1111 1111 =29A2241AF62C00002**28-1 asec(hexadecimal) If you just truncateor 268435455 asec Granted, these are small values, but thelast 60 bits, you end up with a deltapoint is, any valueof 2 andbetween these two values will have ascaling factormaximum loss of60, when what you really wanted was a delta value with more significant digits. The mostprecisionwith which you can store this value in 16 bits is A688, with a scaling factorof46.4095 asec, or about 0.00305% for the first value, as encoded, and at most 0.001526% for the second. These maximum-loss percentages are consistent for all scaling values. AppendixB:C: Sample Packet FlowsB.1C.1 PDM Flow - Simple Client Server Following is a sample simple flow for the PDM with one packet sent from Host A and one packet received by Host B. The PDM does not require time synchronization between Host A and Host B. The calculations to derive meaningful metrics for network diagnostics are shown below each packet sent or received.B.1.1C.1.1 Step 1 Packet 1 is sent from Host A to Host B. The time for Host A is set initially to 10:00AM. The time and packet sequence number are saved by the sender internally. The packet sequence number and delta times are sent in the packet. Packet 1 +----------+ +----------+ | | | | | Host | ----------> | Host | | A | | B | | | | | +----------+ +----------+ PDM Contents: PSNTP : Packet Sequence Number This Packet: 25 PSNLR : Packet Sequence Number Last Received: - DELTATLR : Delta Time Last Received: - SCALEDTLR: Scale of Delta Time Last Received: 0 DELTATLS : Delta Time Last Sent: - SCALEDTLS: Scale of Delta Time Last Sent: 0 Internally, within the sender, Host A, it must keep: Packet Sequence Number of the last packet sent: 25 Time the last packet was sent: 10:00:00 Note, the initial PSNTP from Host A starts at a random number. In this case, 25. The time in these examples is shown in seconds for the sake of simplicity.B.1.2C.1.2 Step 2 Packet 1 is received at Host B. Its time is set to one hour later than Host A. In this case, 11:00AM Internally, within the receiver, Host B, it must note: Packet Sequence Number of the last packet received: 25 Time the last packet was received : 11:00:03 Note, this timestamp is in Host B time. It has nothing whatsoever to do with Host A time. The Packet Sequence Number of the last packet received will become PSNLR which will be sent out in the packet sent by Host B in the next step. The time last received will be used to calculate the DELTALR value to be sent out in the packet sent by Host B in the next step.B.1.3C.1.3 Step 3 Packet 2 is sent by Host B to Host A. Note, the initial packet sequence number (PSNTP) from Host B starts at a random number. In this case, 12. Before sending the packet, Host B does a calculation of deltas. Since Host B knows when it is sending the packet, and it knows when it received the previous packet, it can do the following calculation: Sending time : packet 2 - receive time : packet 1We will call theThe result of thiscalculation:calculation is called: Delta Time Last Received (DELTATLR) Note, both sending time and receive time are saved internally in Host B. They do not travel in the packet. Only the Delta is in the packet. Assume that within Host B is the following: Packet Sequence Number of the last packet received: 25 Time the last packet was received: 11:00:03 Packet Sequence Number of this packet: 12 Time this packet is being sent: 11:00:07We can now calculateNow a delta value to be sent out in thepacket.packet can be calculated. DELTATLR becomes: 4 seconds = 11:00:07 - 11:00:03 = 3782DACE9D900000 asec This is the derived metric: Server Delay. The time and scaling factor must be converted; in this case, the time differential is DE0B, and the scaling factor is 2E, or 46 in decimal. Then, these values, along with the packet sequence numbers will be sent to Host A as follows: Packet 2 +----------+ +----------+ | | | | | Host | <---------- | Host | | A | | B | | | | | +----------+ +----------+ PDM Contents: PSNTP : Packet Sequence Number This Packet: 12 PSNLR : Packet Sequence Number Last Received: 25 DELTATLR : Delta Time Last Received: DE0B (4 seconds) SCALEDTLR: Scale of Delta Time Last Received: 2E (46 decimal) DELTATLS : Delta Time Last Sent: - SCALEDTLS: Scale of Delta Time Last Sent: 0 The metric left to be calculated is the Round-Trip Delay. This will be calculated by Host A when it receives Packet 2.B.1.4C.1.4 Step 4 Packet 2 is received at Host A. Remember, its time is set to one hour earlier than Host B. Internally, it must note: Packet Sequence Number of the last packet received: 12 Time the last packet was received : 10:00:12 Note, this timestamp is in Host A time. It has nothing whatsoever to do with Host B time. So, now, Host A can calculate total end-to-end time. That is: End-to-End Time = Time Last Received - Time Last Sent For example, packet 25 was sent by Host A at 10:00:00. Packet 12 was received by Host A at 10:00:12 so: End-to-End time = 10:00:12 - 10:00:00 or 12 (Server and Network RT delay combined). This time may also be called total Overall Round- Trip Time (RTT) which includes Network RTT and Host Response Time. This derived metric we will call Delta Time Last Sent (DELTATLS)WeRound trip delay can nowalso calculate round trip delay.be calculated. The formula is: Round trip delay = (Delta Time Last Sent - Delta Time Last Received) Or: Round trip delay = 12 - 4 or 8 Now, the only problem is that at this point all metrics are in Host A only and not exposed in a packet. To do that, we need a third packet. Note: this simple example assumes one send and one receive. That is done only for purposes of explaining the function of the PDM. In cases where there are multiple packets returned, one would take the time in the last packet in the sequence. The calculations of such timings and intelligent processing is the function of post-processing of the data.B.1.5C.1.5 Step 5 Packet 3 is sent from Host A to Host B. +----------+ +----------+ | | | | | Host | ----------> | Host | | A | | B | | | | | +----------+ +----------+ PDM Contents: PSNTP : Packet Sequence Number This Packet: 26 PSNLR : Packet Sequence Number Last Received: 12 DELTATLR : Delta Time Last Received: 0 SCALEDTLS: Scale of Delta Time Last Received 0 DELTATLS : Delta Time Last Sent: A688 (scaled value) SCALEDTLR: Scale of Delta Time Last Received: 30 (48 decimal) To calculate Two-Way Delay, any packet capture device may look at these packets and do what is necessary.B.2C.2 Other Flows Whatwe havehas been discussed so far is a simple flow with one packet sent and one returned. Let's look at how PDM may be useful in other types of flows.B.2.1C.2.1 PDM Flow - One Way Traffic The flow on a particular session may not be a send-receive paradigm. Let us consider some other situations. In the case of a one-way flow, one might see the following: Note: The time is expressed in generic units for simplicity. That is, these values do not represent a number of attoseconds, microseconds or any other real units of time. Packet Sender PSN PSN Delta Time Delta Time This Packet Last Recvd Last Recvd Last Sent ===================================================================== 1 Server 1 0 0 0 2 Server 2 0 0 5 3 Server 3 0 0 12 4 Server 4 0 0 20 What does this mean and how is it useful? In a one-way flow, only the Delta Time Last Sent will be seen as used. Recall, Delta Time Last Sent is the difference between the send of one packet from a device and the next. This is a measure of throughput for the sender - according to the sender's point of view. That is, it is a measure of how fast is the application itself (with stack time included) able to send packets. How might this be useful? If one is having a performance issue at the client and sees that packet 2, for example, is sent after 5 time units from the server but takes 10 times that long to arrive at the destination, then one may safely conclude that there are delays in the path other than at the server which may be causing the delivery issue of that packet. Such delays may include the network links, middle-boxes, etc. Now, true one-way traffic is quite rare. What people often mean by "one-way" traffic is an application such as FTP where a group of packets (for example, a TCP window size worth) is sent, then the sender waits for acknowledgment. This type of flow would actually fall into the "multiple-send" traffic model.B.2.2C.2.2 PDM Flow - Multiple Send Traffic Assume that two packets are sent for each ACK from the server. For example, a TCP flow will do this, per RFC1122 [RFC1122] Section- 4.2.3. Packet Sender PSN PSN Delta Time Delta Time This Packet Last Recvd Last Recvd Last Sent ===================================================================== 1 Server 1 0 0 0 2 Server 2 0 0 5 3 Client 1 2 20 0 4 Server 3 1 10 15 How might this be used? Notice that in packet 3, the client has a value of Delta Time Last received of 20. Recall that Delta Time Last Received is the Send time of packet 3 - receive time of packet 2. So, what does one know now? In this case, Delta Time Last Received is the processing time for the Client to send the next packet. How to interpret this depends on what is actually being sent. Remember, PDM is not being used in isolation, but to supplement the fields found in other headers. Let's take some examples: 1. Client is sending a standalone TCP ACK. One would find this by looking at the payload length in the IPv6 header and the TCP Acknowledgement field in the TCP header. So, in this case, the client is taking 20 units to send back the ACK. This may or may not be interesting. 2. Client is sending data with the packet. Again, one would find this by looking at the payload length in the IPv6 header and the TCP Acknowledgement field in the TCP header. So, in this case, the client is taking 20 units to send back data. This may represent "User Think Time". Again, this may or may not be interesting, in isolation. But, if there is a performance problem receiving data at the server, then taken in conjunction with RTT or other packet timing information, this information may be quite interesting. Of course, one also needs to look at the PSN Last Received field to make sure of the interpretation of this data. That is, to make sure that the Delta Last Received corresponds to the packet of interest. The benefits of PDM are thatwe havesuch information is now available in a uniform manner for all applications and all protocols without extensive changes required to applications.B.2.3C.2.3 PDM Flow - Multiple Send with Errors Let us now look at a case of how PDM may be able to help in a case of TCP retransmission and add to the information that is sent in the TCP header. Assume that three packets are sent with each send from the server. From the server, this is what is seen. Pkt Sender PSN PSN Delta Time Delta Time TCP Data This Pkt LastRecvd LastRecvd LastSent SEQ Bytes ===================================================================== 1 Server 1 0 0 0 123 100 2 Server 2 0 0 5 223 100 3 Server 3 0 0 5 333 100 The client, however, does not receive all the packets. From the client, this is what is seen for the packets sent from the server. Pkt Sender PSN PSN Delta Time Delta Time TCP Data This Pkt LastRecvd LastRecvd LastSent SEQ Bytes ===================================================================== 1 Server 1 0 0 0 123 100 2 Server 3 0 0 5 333 100 Let's assume that the server now retransmits the packet. (Obviously, a duplicate acknowledgment sequence for fast retransmit or a retransmit timeout would occur. To illustrate the point, these packets are being left out.) So, then if a TCP retransmission is done, then from the client, this is what is seen for the packets sent from the server. Pkt Sender PSN PSN Delta Time Delta Time TCP Data This Pkt LastRecvd LastRecvd LastSent SEQ Bytes ===================================================================== 1 Server 4 0 0 30 223 100 The server has resent the old packet 2 with TCP sequence number of 223. The retransmitted packet now has a PSN This Packet value of 4. The Delta Last Sent is 30 - the time between sending the packet with PSN of 3 and this current packet. Let's say that packet 4 is lost again. Then, after some amount of time (RTO) then the packet with TCP sequence number of 223 is resent. From the client, this is what is seen for the packets sent from the server. Pkt Sender PSN PSN Delta Time Delta Time TCP Data This Pkt LastRecvd LastRecvd LastSent SEQ Bytes ===================================================================== 1 Server 5 0 0 60 223 100 If now, this packet arrives at the destination, one has a very good idea that packets exist which are being sent from the server as retransmissions and not arriving at the client. This is because the PSN of the resent packet from the server is 5 rather than 4. If we had used TCP sequence number alone, we would never have seen this situation. The TCP sequence number in all situations is 223. This situation would be experienced by the user of the application (the human being actually sitting somewhere) as a "hangs" or long delay between packets. On large networks, to diagnose problems such as these where packets are lost somewhere on the network, one has to take multiple traces to find out exactly where. The first thing is to start with doing a trace at the client and the server. So, we can see if the server sent a particular packet and the client received it. If the client did not receive it, then we start tracking back to trace points at the router right after the server and the router right before the client. Did they get these packets which the server has sent? This is a time consuming activity. With PDM, we can speed up the diagnostic time because we may be able to use only the trace taken at the client to see what the server is sending. AppendixC:D: Potential Overhead Considerations One might wonder as to the potential overhead of PDM. First, PDM is entirely optional. That is, a site may choose to implement PDM or not as they wish. If they are happy with the costs of PDM vs. the benefits, then the choice should be theirs. Below is a table outlining the potential overhead in terms of additional time to deliver the response to the end user for various assumed RTTs. Bytes RTT Bytes Bytes New Overhead in Packet Per Millisec in PDM RTT ===================================================================== 1000 1000 milli 1 16 1016.000 16.000 milli 1000 100 milli 10 16 101.600 1.600 milli 1000 10 milli 100 16 10.160 .160 milli 1000 1 milli 1000 16 1.016 .016 milli Below are some examples of actual RTTs for packets traversing large enterprise networks. The first example is for packets going to multiple business partners. Bytes RTT Bytes Bytes New Overhead in Packet Per Millisec in PDM RTT ===================================================================== 1000 17 milli 58 16 17.360 .360 milli The second example is for packets at a large enterprise customer within a data center. Notice that the scale is now in microseconds rather than milliseconds. Bytes RTT Bytes Bytes New Overhead in Packet Per Microsec in PDM RTT ===================================================================== 1000 20 micro 50 16 20.320 .320 micro As with other diagnostic tools, such as packet traces, a certain amount of processing time will be required to create and process PDM. Since PDM is lightweight (has only a few variables), we expect the processing time to be minimal. Acknowledgments The authors would like to thank Keven Haining, Al Morton, Brian Trammel, David Boyes, Bill Jouris, Richard Scheffenegger, and Rick Troth for their comments and assistance. We would also like to thank Tero Kivinen and Jouni Korhonen for their detailed and perceptive reviews. Authors' Addresses Nalini Elkins Inside Products, Inc. 36A Upper Circle Carmel Valley, CA 93924 United States Phone: +1 831 659 8360 Email: nalini.elkins@insidethestack.com http://www.insidethestack.com Robert M. Hamilton Chemical Abstracts Service A Division of the American Chemical Society 2540 Olentangy River Road Columbus, Ohio 43202 United States Phone: +1 614 447 3600 x2517 Email: rhamilton@cas.org http://www.cas.org Michael S. Ackermann Blue Cross Blue Shield of Michigan P.O. Box 2888 Detroit, Michigan 48231 United States Phone: +1 310 460 4080 Email: mackermann@bcbsm.com http://www.bcbsm.com