RFC 2680
A One-way Packet Loss Metric for IPPM
RFC 2680: A One-way Packet Loss Metric for IPPM π
- Request for Comments: 2680
- Authors: G. Almes, S. Kalidindi, M. Zekauskas (all from Advanced Network & Services)
- Category: Standards Track π₯
- Date: September 1999
- Obsoletes / Updates: this title block doesn't list anything it obsoletes or updates π«Ά
Status of This Memo β¨
okay so this doc is a Standards Track protocol spec for the Internet community, and it's basically asking everyone to talk about it and suggest improvements π£οΈ if you want to know where it sits in the official standardization stuff, go check the current edition of "Internet Official Protocol Standards" (STD 1) π and yes, distribution of this memo is unlimited, so share it with everyone π
Copyright Notice π
Copyright (C) The Internet Society (1999). All Rights Reserved. π
1. Introduction π¦
so this memo defines a metric for one-way packet loss across Internet paths πΈ it builds on ideas from the IPPM Framework document, RFC 2330 [1], so you should already be familiar with that one bestie π
this memo is also meant to be structured like its companion doc for One-way Delay ("A One-way Delay Metric for IPPM") [2], so if you've read that, you're already halfway there π§
the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in RFC 2119 [5] π RFC 2119 was written with protocols in mind, but the key words get used here for similar reasons π they make sure measurements from two different implementations can actually be compared, and they call out moments when an implementation could mess with the network π
the memo is laid out like this πΊοΈ
- A 'singleton' analytic metric, called Type-P-One-way-Loss, is introduced to measure a single observation of packet transmission or loss. π
- Using this singleton metric, a 'sample', called Type-P-One-way-Loss-Poisson-Stream, is introduced to measure a sequence of singleton transmissions and/or losses measured at times taken from a Poisson process. π
- Using this sample, several 'statistics' of the sample are defined and discussed. π
going singleton β sample β statistics, with clean separation between each one, is a whole big deal and it's important π
whenever a technical term from the IPPM Framework document shows up for the first time in this memo, it gets a trailing asterisk, so term* just means "term" is defined in the Framework β¨
1.1. Motivation:
okay why do we even care about one-way packet loss of Type-P* packets going from a source host* to a destination host? π€ lots of reasons, bestie:
- Some applications don't work well (or at all) if end-to-end loss between hosts is large relative to some threshold value. π
- Too much packet loss can make certain real-time applications hard to support (where the exact threshold of "too much" depends on the application). π§
- The bigger the packet loss, the harder it is for transport-layer protocols to sustain high bandwidths. π
- Real-time applications and transport-layer protocols get super sensitive to loss when very large delay-bandwidth products must be supported. π€
measuring one-way loss instead of round-trip loss is motivated by these factors π
- In today's Internet, the path from a source to a destination may be different from the path back from the destination to the source ("asymmetric paths"), so different sequences of routers get used for the forward and reverse paths π£οΈ which means round-trip measurements are actually measuring two different paths glued together π« measuring each path on its own highlights the performance difference between the two, and they might go through different Internet service providers, or even totally different kinds of networks (like research versus commodity networks, or ATM versus packet-over-SONET) π
- Even when the two paths are symmetric, they can have wildly different performance because of asymmetric queueing π
- An application's performance may mostly depend on performance in just one direction. For example, a TCP file transfer may depend more on the direction the data flows, rather than the direction the acknowledgements travel π
- In quality-of-service (QoS) enabled networks, provisioning in one direction can be totally different from provisioning in the reverse direction, so the QoS guarantees differ too π measuring the paths independently lets you verify both guarantees π
it's outside the scope of this document to say exactly how loss metrics would be applied to specific problems π ββοΈ
1.2. General Issues Regarding Time β°
{Comment: the terminology below is different from what ITU-T documents define (for example G.810, "Definitions and terminology for synchronization networks", and I.356, "B-ISDN ATM layer cell transfer performance"), but it's consistent with the IPPM Framework document. Honestly these differences come from different backgrounds: the ITU-T documents historically have a telephony origin, while the authors of this memo (and the Framework) come from a computer systems background. Even though the terms below don't have a direct equivalent in the ITU-T definitions, a rough mapping comes after our definitions. One potential confusion to note: our definition of "clock" is the computer operating systems definition meaning a time-of-day clock, while the ITU-T definition of clock means a frequency reference.}
whenever a time (aka a moment in history) is mentioned in here, it's understood to be measured in seconds (and fractions of seconds) relative to UTC β±οΈ
as the Framework document explains more fully, there are four distinct but related notions of clock uncertainty π°οΈ
synchronization*
Synchronization measures how well two clocks agree on what time it is. For example, the clock on one host might be 5.4 msec ahead of the clock on a second host. {Comment: A rough ITU-T equivalent is "time error".}
accuracy*
Accuracy measures how well a given clock agrees with UTC. For example, the clock on a host might be 27.1 msec behind UTC. {Comment: A rough ITU-T equivalent is "time error from UTC".}
resolution*
Resolution measures how precise a given clock is. For example, the clock on an old Unix host might only advance once every 10 msec, so it has a resolution of only 10 msec. {Comment: A very rough ITU-T equivalent is "sampling period".}
skew*
Skew measures how accuracy, or synchronization, changes over time. For example, the clock on a given host might gain 1.3 msec per hour, so it's 27.1 msec behind UTC at one point and only 25.8 msec behind an hour later. In this case, we say the clock of the given host has a skew of 1.3 msec per hour relative to UTC, which threatens accuracy. We might also talk about the skew of one clock relative to another clock, which threatens synchronization. {Comment: A rough ITU-T equivalent is "time drift".}
2. A Singleton Definition for One-way Packet Loss π
2.1. Metric Name:
Type-P-One-way-Packet-Loss π«
2.2. Metric Parameters:
Src, the IP address of a host π₯οΈDst, the IP address of a host π₯οΈT, a time β°
2.3. Metric Units:
the value of a Type-P-One-way-Packet-Loss is either a zero (meaning the packet was transmitted successfully) or a one (meaning it was lost) 0οΈβ£1οΈβ£
2.4. Definition:
here's the official definition, verbatim, because this part is serious π
>>The *Type-P-One-way-Packet-Loss* from Src to Dst at T is 0<< means
that Src sent the first bit of a Type-P packet to Dst at wire-time* T
and that Dst received that packet.
>>The *Type-P-One-way-Packet-Loss* from Src to Dst at T is 1<< means
that Src sent the first bit of a type-P packet to Dst at wire-time T
and that Dst did not receive that packet.
2.5. Discussion:
so basically Type-P-One-way-Packet-Loss is 0 exactly when Type-P-One-way-Delay is a finite value, and it's 1 exactly when Type-P-One-way-Delay is undefined π§
these issues are likely to come up in practice π
- A given methodology will have to include a way to tell a packet loss apart from a very large (but finite) delay. As noted by Mahdavi and Paxson [3], simple upper bounds (like the 255 seconds theoretical upper bound on the lifetimes of IP packets [4]) could be used, but good engineering, including an understanding of packet lifetimes, will be needed in practice. {Comment: Note that for many applications of these metrics, there may be no harm in treating a large delay as packet loss. An audio playback packet, for example, that arrives only after the playback point may as well have been lost.} πΆ
- If the packet arrives but is corrupted, it's counted as lost. {Comment: one is tempted to count the packet as received, since corruption and packet loss are related but distinct phenomena. If the IP header is corrupted, however, one can't be sure about the source or destination IP addresses, so you're on shaky grounds about knowing that the corrupted received packet corresponds to a given sent test packet. Similarly, if other parts of the packet that the methodology needs to know that the corrupted received packet corresponds to a given sent test packet are corrupted, then such a packet would have to be counted as lost. Counting these packets as lost but counting packets with corruption in other parts of the packet as not lost would be inconsistent.} π
- If the packet is duplicated along the path (or paths) so that multiple non-corrupt copies arrive at the destination, then the packet is counted as received. π«
- If the packet is fragmented and, for whatever reason, reassembly does not occur, then the packet will be deemed lost. π
2.6. Methodologies: π§
okay so this one is about how you actually go and measure it, bestie π and the big tea is that the exact method depends on the Type-P (protocol number, UDP/TCP port number, size, precedence, all that jazz) π
Generally, for a given Type-P, one possible methodology goes kinda like this:
- Make sure Src and Dst have clocks that are synchronized with each other π°οΈ how synced they need to be depends on the threshold you use to decide loss (more on that below), so it's a parameter you tune, not a fixed vibe β¨
- At the Src host, pick the Src and Dst IP addresses and build a test packet of Type-P with those addresses π¦
- At the Dst host, get ready to receive the packet π
- At the Src host, slap a timestamp into the prepared Type-P packet and send it toward Dst π
- If the packet shows up within a reasonable period of time, the one-way packet-loss is zero πΈ
- If it doesn't show up within a reasonable period of time, the one-way packet-loss is one π and the "reasonable" threshold here is a parameter of the methodology, so you get to decide it π
{Comment: The definition of reasonable is intentionally vague, and is intended to indicate a value "Th" so large that any value in the closed interval [Th-delta, Th+delta] is an equivalent threshold for loss. Here, delta encompasses all error in clock synchronization along the measured path. If there is a single value after which the packet must be counted as lost, then we reintroduce the need for a degree of clock synchronization similar to that needed for one-way delay. Therefore, if a measure of packet loss parameterized by a specific non-huge "reasonable" time-out value is needed, one can always measure one-way delay and see what percentage of packets from a given stream exceed a given time-out value.}
Issues like the packet format, how Dst knows when to expect the test packet, and how Src and Dst get synchronized are all outside the scope of this doc π {Comment: We plan to document elsewhere our own work in describing such more detailed implementation techniques and we encourage others to as well.}
2.7. Errors and Uncertainties: π
The description of any specific measurement method should include an accounting and analysis of the different sources of error or uncertainty π§ The Framework document has general guidance on this, so go check that out too π
For loss, there are three sources of error:
- Synchronization between the clocks on Src and Dst β°
- The packet-loss threshold (which is related to that synchronization) π
- Resource limits in the network interface or software on the receiving instrument π₯οΈ
The first two are interrelated and could end up with a test packet that has a finite delay being reported as lost π₯² Type-P-One-way-Packet-Loss is 0 if the test packet doesn't arrive, or if it does arrive and the difference between the Src timestamp and the Dst timestamp is greater than the "reasonable period of time," aka the loss threshold π If the clocks aren't synced well enough, the loss threshold may not be "reasonable," because the packet may take way less time to arrive than its Src timestamp suggests π΅βπ« Similarly, if the loss threshold is set too low, a bunch of packets get counted as lost π The loss threshold MUST be high enough, and the clocks MUST be synchronized well enough, so that a packet that arrives is rarely counted as lost. (See the discussions in the previous two sections.) π
Since packet loss measurement is less sensitive to lack of clock sync than delay is, we send you over to the treatment of synchronization errors in the One-way Delay metric [2] for more details π
The last source of error, resource limits, causes the packet to be dropped by the measurement instrument and counted as lost, even though the network actually delivered it in a reasonable time π€
The measurement instruments SHOULD be calibrated so that the loss threshold is reasonable for applying the metrics, and the clocks are synchronized enough that the loss threshold stays reasonable π―
Also, the instruments SHOULD be checked to make sure the possibility that a packet reaches the network interface but gets lost due to congestion on the interface or other resource exhaustion (e.g., buffers) on the instrument is low π§Ό
2.8. Reporting the metric: π£
The calibration and context in which the metric is measured MUST be carefully considered, and SHOULD always be reported along with the metric results π We now present four items to consider: Type-P of the test packets, the loss threshold, instrument calibration, and the path traversed by the test packets. This list is not exhaustive, so any additional info that could be useful for interpreting applications of the metrics should be reported too β¨
2.8.1. Type-P
As noted in the Framework document [1], the value of the metric may depend on the type of IP packets used to make the measurement, aka "Type-P" π¦ The value of Type-P-One-way-Delay could change if the protocol (UDP or TCP), port number, size, or arrangement for special treatment (e.g., IP precedence or RSVP) changes. The exact Type-P used to make the measurements MUST be accurately reported π«Ά
2.8.2. Loss threshold
The threshold (or methodology to tell apart) a large finite delay from loss MUST be reported π
2.8.3. Calibration results
The degree of synchronization between the Src and Dst clocks MUST be reported π°οΈ If possible, the possibility that a test packet arriving at the Dst network interface gets reported as lost due to resource exhaustion on Dst SHOULD be reported π§
2.8.4. Path
Finally, the path traversed by the packet SHOULD be reported, if possible πΊοΈ In general it's impractical to know the precise path a given packet takes through the network π© The precise path may be known for certain Type-P on short or stable paths. If Type-P includes the record route (or loose-source route) option in the IP header, the path is short enough, and all routers* on the path support record (or loose-source) route, then the path will be precisely recorded. This is impractical because the route has to be short enough, many routers don't support (or aren't configured for) record route, and using this feature would often artificially worsen the performance observed by pulling the packet out of common-case processing π However, partial info is still valuable context π For example, if a host can choose between two links* (and hence two separate routes from Src to Dst), then the initial link used is valuable context π£οΈ {Comment: For example, with Merit's NetNow setup, a Src on one NAP can reach a Dst on another NAP by either of several different backbone networks.}
- A Definition for Samples of One-way Packet Loss π
Given the singleton metric Type-P-One-way-Packet-Loss, we now define one particular sample of those singletons π§ The idea of the sample is to pick a particular binding of the parameters Src, Dst, and Type-P, then define a sample of values of parameter T. To define the values of T, you select a beginning time T0, a final time Tf, and an average rate lambda, then define a pseudo-random Poisson process of rate lambda whose values fall between T0 and Tf. The time interval between successive values of T will then average 1/lambda π¦
{Comment: Note that Poisson sampling is only one way of defining a sample. Poisson has the advantage of limiting bias, but other methods of sampling might be appropriate for different situations. We encourage others who find such appropriate cases to use this general framework and submit their sampling method for standardization.}
3.1. Metric Name:
Type-P-One-way-Packet-Loss-Poisson-Stream
3.2. Metric Parameters:
- Src, the IP address of a host
- Dst, the IP address of a host
- T0, a time
- Tf, a time
- lambda, a rate in reciprocal seconds
3.3. Metric Units:
A sequence of pairs; the elements of each pair are:
- T, a time, and
- L, either a zero or a one
The values of T in the sequence are monotonic increasing. Note that T would be a valid parameter to Type-P-One-way-Packet-Loss, and that L would be a valid value of Type-P-One-way-Packet-Loss. π
3.4. Definition:
Given T0, Tf, and lambda, we compute a pseudo-random Poisson process beginning at or before T0, with average arrival rate lambda, and ending at or after Tf. Those time values greater than or equal to T0 and less than or equal to Tf are then selected. At each of these times in the process, we obtain the value of Type-P-One-way-Packet-Loss at that time. The value of the sample is the sequence made up of the resulting <time, loss> pairs. If there are no such pairs, the sequence is of length zero and the sample is said to be empty π«§
3.5. Discussion:
The reader should be familiar with the in-depth discussion of Poisson sampling in the Framework document [1], which includes methods to compute and verify the pseudo-random Poisson process π
We specifically do not constrain the value of lambda, except to note the extremes. If the rate is too large, then the measurement traffic will perturb the network and itself cause congestion π₯ If the rate is too small, then you might not capture interesting network behavior π΄ {Comment: We expect to document our experiences with, and suggestions for, lambda elsewhere, culminating in a "best current practices" document.}
Since a pseudo-random number sequence is employed, the sequence of times, and hence the value of the sample, is not fully specified. Pseudo-random number generators of good quality will be needed to achieve the desired qualities π²
The sample is defined in terms of a Poisson process both to avoid the effects of self-synchronization and to capture a sample that is statistically as unbiased as possible π§ͺ The Poisson process is used to schedule the delay measurements. The test packets will generally not arrive at Dst according to a Poisson distribution, since they are influenced by the network π
{Comment: there is, of course, no claim that real Internet traffic arrives according to a Poisson arrival process. It is important to note that, in contrast to this metric, loss rates observed by transport connections do not reflect unbiased samples. For example, TCP transmissions both (1) occur in bursts, which can induce loss due to the burst volume that would not otherwise have been observed, and (2) adapt their transmission rate in an attempt to minimize the loss rate observed by the connection.}
All the singleton Type-P-One-way-Packet-Loss metrics in the sequence will have the same values of Src, Dst, and Type-P π―
Note also that, given one sample that runs from T0 to Tf, and given new time values T0' and Tf' such that T0 <= T0' <= Tf' <= Tf, the subsequence of the given sample whose time values fall between T0' and Tf' is also a valid Type-P-One-way-Packet-Loss-Poisson-Stream sample πΈ
3.6. Methodologies:
The methodologies follow directly from:
- the selection of specific times, using the specified Poisson arrival process, and
- the methodologies discussion already given for the singleton Type-P-One-way-Packet-Loss metric π§
Care must be given to correctly handle out-of-order arrival of test packets. It is possible that the Src could send one test packet at TS[i], then send a second one (later) at TS[i+1], while the Dst could receive the second test packet at TR[i+1], and then receive the first one (later) at TR[i]. π
3.7. Errors and Uncertainties:
okay so beyond the errors from measuring each singleton in the sample, we also have to check how accurate the Poisson arrival process is for the wire-times of the test packets π things can go sideways here for a few reasons, including problems with the pseudo-random number techniques used to generate the Poisson arrival process π The Framework document shows how to use the Anderson-Darling test to verify the accuracy of the Poisson process over small time frames π§ {Comment: The goal is to ensure that the test packets are sent "close enough" to a Poisson schedule, and avoid periodic behavior.} the vibe is basically "random but not too random" π
3.8. Reporting the metric:
the calibration and context for the underlying singletons MUST be reported along with the stream π (See "Reporting the metric" for Type-P-One-way-Packet-Loss.) it's giving dΓ©jΓ vu, but that's the rule π«Ά
4. Some Statistics Definitions for One-way Packet Loss
ok now that we've got the sample metric Type-P-One-way-Packet-Loss-Poisson-Stream, let's look at a few stats we can pull from it β¨ these are mostly here to show what's possible, not to be the only way to do things πΈ
4.1. Type-P-One-way-Packet-Loss-Average
given a Type-P-One-way-Packet-Loss-Poisson-Stream, the average is the mean of all the L values in the Stream π the Type-P-One-way-Packet-Loss-Average is undefined if the sample is empty, so no empty-sample averages, bestie π
example time! say we take a sample and get this:
Stream1 = <
<T1, 0>
<T2, 0>
<T3, 1>
<T4, 0>
<T5, 0>
>
then the average would be 0.2 π
ngl, healthy Internet paths should be operating at loss rates below 1% (especially if high delay-bandwidth products are going to be sustained) π that means your sample sizes might need to be bigger than you'd like π© like, if you want to tell apart different fractions of 1% over one-minute periods, you might need several hundred samples per minute π which leads to larger values of lambda than you'd normally want π
also, the loss threshold should be set so any errors in loss aren't significant. but if there's a real chance that a packet which actually arrived gets counted as lost because of resource exhaustion, and that chance is significant compared to the loss rate you care about, then Type-P-One-way-Packet-Loss-Average will be meaningless π
5. Security Considerations
conducting Internet measurements raises both security and privacy concerns π this memo doesn't specify an implementation of the metrics, so it doesn't directly affect the security of the Internet or the applications running on it π¦ but implementations of these metrics must be mindful of security and privacy concerns, periodt π
there are two kinds of security concerns: potential harm caused by the measurements, and potential harm to the measurements π³ the measurements could cause harm because they're active and inject packets into the network. The measurement parameters MUST be carefully selected so that the measurements inject trivial amounts of additional traffic into the networks they measure π« if they inject "too much" traffic, they can skew the results, and in extreme cases cause congestion and denial of service π
the measurements themselves could be harmed by routers giving measurement traffic a different priority than "normal" traffic, or by an attacker injecting artificial measurement traffic π if routers can recognize measurement traffic and treat it separately, the measurements won't reflect actual user traffic π€ and if an attacker injects artificial traffic that gets accepted as legitimate, the loss rate will be artificially lowered π«£ so the measurement methodologies SHOULD include appropriate techniques to reduce the probability that measurement traffic can be distinguished from "normal" traffic π‘οΈ authentication techniques, such as digital signatures, may be used where appropriate to guard against injected traffic attacks β¨
the privacy concerns of network measurement are limited by the active measurements described in this memo πΈ unlike passive measurements, there can be no release of existing user data π
6. Acknowledgements
big thank yous to Matt Mathis for encouraging this work and for calling attention, over and over, to how significant packet loss is π
also thanks to Vern Paxson for his valuable comments on early drafts, and to Garry Couch and Will Leland for several useful suggestions π«Ά
7. References
- [1] Paxson, V., Almes,G., Mahdavi, J. and M. Mathis, "Framework for IP Performance Metrics", RFC 2330, May 1998.
- [2] Almes, G., Kalidindi, S. and M. Zekauskas, "A One-way Delay Metric for IPPM", RFC 2679, September 1999.
- [3] Mahdavi, J. and V. Paxson, "IPPM Metrics for Measuring Connectivity", RFC 2678, September 1999.
- [4] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.
- [5] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [6] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.
8. Authors' Addresses
Guy Almes
Advanced Network & Services, Inc.
200 Business Park Drive
Armonk, NY 10504
USA
Phone: +1 914 765 1120
EMail: almes@advanced.org
Sunil Kalidindi
Advanced Network & Services, Inc.
200 Business Park Drive
Armonk, NY 10504
USA
Phone: +1 914 765 1128
EMail: kalidindi@advanced.org
Matthew J. Zekauskas
Advanced Network & Services, Inc.
200 Business Park Drive
Armonk, NY 10504
USA
Phone: +1 914 765 1112
EMail: matt@advanced.org
9. Full Copyright Statement
Copyright (C) The Internet Society (1999). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the Internet Society. β¨π«Ά
π¦ where this page comes from
- ietf: rfc2680 1999-09
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms