RFC 5560

A One-Way Packet Duplication Metric

๐Ÿ“… published May 2009, from ietf

A One-Way Packet Duplication Metric ๐Ÿฆ‹

Okay bestie, this is RFC 5560 โœจ It's a Standards Track doc from May 2009, written by H. Uijterwaal at the RIPE NCC. The header doesn't list anything it obsoletes or updates, so it's standing on its own ๐Ÿ’… The whole point is measuring one-way packet duplication, aka when you send one packet and multiple copies show up. Iconic behaviour, honestly ๐Ÿ”ฅ

Status of This Memo ๐ŸŒธ

This doc specifies an Internet standards track protocol for the Internet community, and it asks for discussion and suggestions for improvements ๐Ÿซถ For the current standardization state and status of this protocol, check the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited ๐Ÿ’–

Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved.

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents, as they stand on the publication date. You can find them at http://trustee.ietf.org/license-info. Please read them carefully, because they spell out your rights and restrictions for this document ๐Ÿ“œ

Abstract ๐Ÿ”ฎ

Normally, when a packet goes from one host to another, you'd expect exactly one copy to land at the destination ๐Ÿ“ฆ But plot twist: the packet can get lost, or multiple copies can arrive ๐Ÿ˜ญ

Earlier work defined a metric for packet loss, covering the case where a sent packet doesn't show up at its destination within a reasonable time. This memo defines a metric for the other case, where a packet is sent but multiple copies arrive. It also covers streams and how to summarize their results ๐Ÿ“Š

Table of Contents ๐Ÿ“‘

   1. Introduction ....................................................3
      1.1. Requirements Notation ......................................3
      1.2. Motivation .................................................4
   2. A Singleton Definition for One-Way Packet Arrival Count .........4
      2.1. Metric Name ................................................4
      2.2. Metrics Parameters .........................................4
      2.3. Metric Units ...............................................4
      2.4. Definition .................................................4
      2.5. Discussion .................................................5
      2.6. Methodology ................................................6
      2.7. Errors and Uncertainties ...................................6
      2.8. Reporting the Metric .......................................6
   3. A Singleton Definition for One-Way Packet Duplication ...........6
      3.1. Metric Name ................................................6
      3.2. Metrics Parameters .........................................7
      3.3. Metric Units ...............................................7
      3.4. Definition .................................................7
      3.5. Discussion .................................................7
   4. Definition for Samples for One-Way Packet Duplication ...........7
      4.1. Poisson Streams ............................................7
           4.1.1. Metric Name .........................................7
           4.1.2. Metric Parameters ...................................8
           4.1.3. Metric Units ........................................8
           4.1.4. Definition ..........................................8
           4.1.5. Methodology .........................................8
           4.1.6. Errors and Uncertainties ............................8
           4.1.7. Reporting the Metric ................................8
      4.2. Periodic Streams ...........................................9
           4.2.1. Metric Name .........................................9
           4.2.2. Metric Parameters ...................................9
           4.2.3. Metric Units ........................................9
           4.2.4. Definition ..........................................9
           4.2.5. Methodology .........................................9
           4.2.6. Errors and uncertainties ............................9
           4.2.7. Reporting the metric ...............................10
   5. Some Statistics Definitions for One-Way Duplication ............10
      5.1. Type-P-one-way-packet-duplication-fraction ................10
      5.2. Type-P-one-way-replicated-packet-rate .....................10
      5.3. Examples ..................................................11
   6. Security Considerations ........................................12
   7. IANA Considerations ............................................12
   8. Acknowledgements ...............................................13
   9. References .....................................................13
      9.1. Normative References ......................................13
      9.2. Informative References ....................................13

1. Introduction ๐Ÿงš

This doc defines a metric for one-way packet duplication across Internet paths. It builds on the IP Performance Metrics (IPPM) Framework document [RFC2330], so you'll want to be comfy with that one first ๐ŸŒˆ

It also follows the same structure as the one-way packet loss doc [RFC2680], and the reader is assumed to know that one too ๐Ÿซถ

Here's how the memo is laid out:

  • First, a singleton metric called Type-P-one-way-packet-arrival-count measures the number of arriving packets for each packet sent.
  • Then a singleton metric called Type-P-one-way-packet-duplication describes a single instance of packet duplication.
  • Next, that singleton metric is used to define two kinds of samples, Type-P-one-way-Packet-Duplication-Poisson-Stream and Type-P-one-way-Packet-Duplication-Periodic-Stream. They measure duplication in a series of packets sent with either Poisson-distributed [RFC2680] or periodic [RFC3432] intervals between the packets.
  • Finally, statistics that summarize the properties of those samples are introduced ๐Ÿ“ˆ

1.1. Requirements Notation

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 [RFC2119] ๐Ÿ’œ

RFC 2119 was written with protocols in mind, but these key words are used in this doc for similar reasons. They keep measurement results from two different implementations comparable, and they flag instances where an implementation could perturb the network ๐Ÿ‘€

1.2. Motivation

Again, when a packet is sent from one host to the other, you'd normally expect exactly one copy to arrive at the destination. It's possible, though, that the packet gets lost or that multiple copies show up ๐Ÿ™ˆ

Earlier work defined a metric for packet loss [RFC2680], which tells apart the packet arriving and the packet not arriving within a reasonable time. This doc adds a metric for a third outcome: a single packet is sent, but multiple copies arrive ๐Ÿ“

Since this document describes a case similar to the one in [RFC2680], all the considerations from that document on timing and accuracy apply too โญ

2. A Singleton Definition for One-Way Packet Arrival Count ๐ŸŽฏ

2.1. Metric Name

The name is Type-P-one-way-packet-arrival-count ๐Ÿท๏ธ

2.2. Metrics Parameters

  • src: the IP address of a host
  • dst: the IP address of a host
  • T: the wire time of a packet at the source
  • T0: the maximum waiting time for a packet to arrive at the destination

2.3. Metric Units

The unit is an integer number ๐Ÿ”ข

2.4. Definition

Two packets are considered identical if and only if:

  • Both contain identical information fields (see Section 2.5). That means the recipient could take either packet and use the data in an application. The other packet doesn't carry any extra information.
  • Both packets appear to have been sent by one and the same host, to one and the same destination. Hosts are identified by their IP addresses.

The value of a Type-P-one-way-packet-arrival-count is a positive integer number. It tells you how many (uncorrupted and identical) copies were received by dst in the interval [T, T+T0] for a packet sent by src at time T ๐Ÿ’–

If a packet is sent but it's lost, or it doesn't arrive in the interval [T, T+T0], then the metric is undefined. Applications MAY report an "impossible" value (for example, -1) to indicate this condition instead of undefined ๐Ÿคทโ€โ™€๏ธ

If a packet is fragmented during transport and, for whatever reason, reassembly doesn't happen, then the packet is deemed lost. That means it isn't included in the Type-P-one-way-packet-arrival-count ๐Ÿงฉ

2.5. Discussion

This metric counts the number of packets arriving for each packet sent. The time-out value T0 SHOULD be set to a value when the application could still potentially use the packet and wouldn't discard it automatically โณ

If this metric is used in parallel with the Packet Loss Metric [RFC2680], the value of T0 MUST be the same for both cases, so the results stay comparable โš–๏ธ

The metric only counts packets that aren't corrupted during transmission. They may have been resent automatically by lower layers or intermediate devices. Packets that were corrupted during transmission but still arrived at dst are not counted ๐Ÿ™…โ€โ™€๏ธ

Clocks have to be synchronized between src and dst, so it's possible to uniquely and accurately determine the interval [T, T+T0] at both sides โฐ

If this metric is used in an active measurement system, the system MUST NOT send multiple packets with identical information fields. Otherwise all the packets would get declared duplicates ๐Ÿ˜ฑ This metric can also be used inside a passive measurement system, using packets generated by another source. However, if the source can send two identical packets within the interval [T, T+T0], they'll be incorrectly labeled as a duplicate, which gives a false positive. It's up to the implementor to estimate whether this scenario is likely to happen, and what rate of false positives is acceptable ๐Ÿง

The definition of identical information fields means two packets are considered identical if they're sent from the same source and contain the same information. That doesn't necessarily mean all the bits in the packet are the same. For example, when a packet is replicated and the copies travel along different paths, the Time to Live (TTL) may be different ๐Ÿ›ฃ๏ธ The implementation MUST specify which fields are compared when deciding whether or not two packets are identical ๐Ÿ“

For IPv4, these will usually be: version, ihl, identification, src, dst, protocol, and some or all upper-layer protocol data ๐ŸŒ

For IPv6, these will usually be: version, next header, source, destination, and some or all upper-layer protocol data ๐ŸŒ

Note that the identification field isn't present in non-fragmented IPv6 packets. It may also not be sufficient to distinguish packets from each even in IPv4, particularly at higher transmission speeds ๐Ÿš€

2.6. Methodology ๐ŸŽ€

okay so the way you measure this one basically follows the methodology in Section 2.6 of [RFC2680] ๐Ÿ’…, with exactly one twist. [RFC2680] doesn't say the receiving host has to be able to catch multiple copies of a single packet, because it only needs one copy to get the metrics ๐Ÿ™ˆ. For this metric, implementations should obviously be capable of receiving multiple copies ๐Ÿซถ.

2.7. Errors and Uncertainties ๐ŸŒธ

Refer to Section 2.7 of [RFC2680] โœจ.

2.8. Reporting the Metric ๐Ÿ“Š

Refer to Section 2.8 of [RFC2680] ๐Ÿ’–.


3. A Singleton Definition for One-Way Packet Duplication ๐Ÿฆ‹

3.1. Metric Name ๐Ÿ“

Type-P-one-way-packet-duplication

3.2. Metrics Parameters ๐Ÿงš

  • src, the IP address of a host
  • dst, the IP address of a host
  • T, the wire time of a packet at the source
  • T0, the maximum waiting time for a packet to arrive at the destination.

3.3. Metric Units ๐ŸŒˆ

An integer number.

3.4. Definition ๐Ÿ’œ

The value of a Type-P-one-way-packet-duplication is a positive integer number indicating the number of (uncorrupted and identical) additional copies of an individual packet received by dst in the interval [T, T+T0] as sent by src at time T.

If a packet is sent and only one copy arrives in the interval [T, T+T0], then the metric is 0. If no copy arrives in this interval, then the metric is undefined. Applications MAY report an "impossible" value (for example, -1) to indicate this condition ๐Ÿ™ƒ.

3.5. Discussion ๐Ÿ’ญ

This metric is equal to:

Type-P-one-way-packet-arrival-count - 1

This metric is expected to be used for applications that need to know duplication for an individual packet. All considerations regarding methodology, errors, and reporting from the previous section apply ๐Ÿ”ฅ.


4. Definition for Samples for One-Way Packet Duplication โœจ

4.1. Poisson Streams ๐ŸŒŠ

4.1.1. Metric Name ๐Ÿ‘

Type-P-one-way-Packet-Duplication-Poisson-Stream

4.1.2. Metric Parameters ๐ŸŽ€

  • src, the IP address of a host.
  • dst, the IP address of a host.
  • Ts, a time.
  • Tf, a time. Ts and Tf specify the time interval when packets can be sent for this stream.
  • T0, the maximum waiting time for a packet to arrive at the destination.
  • lambda, a rate in reciprocal seconds.

4.1.3. Metric Units ๐ŸŒธ

A sequence of pairs; the elements of each pair are:

  • T, a time
  • Type-P-one-way-packet-arrival-count for the packet sent at T.

4.1.4. Definition ๐Ÿ’…

Given Ts, Tf, and lambda, we compute a pseudo-random Poisson process beginning at or before Ts, with average-rate lambda, and ending at or after Tf. Those time values greater than or equal to Ts, and less than or equal to Tf are then selected. At each of the times in this process, we obtain the value of Type-P-one-way-packet-arrival-count. The value of the sample is the sequence made up of the resulting {time, duplication} pairs. If there are no such pairs, the sequence is of length zero, and the sample is said to be empty.

4.1.5. Methodology ๐Ÿง 

Refer to Section 3.6 of [RFC2680].

4.1.6. Errors and Uncertainties โš ๏ธ

Refer to Section 3.7 of [RFC2680].

4.1.7. Reporting the Metric ๐Ÿ“ฃ

Refer to Section 3.8 of [RFC2680].

4.2. Periodic Streams ๐Ÿฆ„

4.2.1. Metric Name ๐Ÿ’

Type-P-one-way-Packet-Duplication-Periodic-Stream

4.2.2. Metric Parameters ๐Ÿง

  • src, the IP address of a host.
  • dst, the IP address of a host.
  • Ts, a time.
  • Tf, a time. Ts and Tf specify the time interval when packets can be sent for this stream.
  • T0, the maximum waiting time for a packet to arrive at the destination.
  • lambda, a rate in reciprocal seconds.

4.2.3. Metric Units ๐ŸŒท

A sequence of pairs; the elements of each pair are:

  • T, a time
  • Type-P-one-way-packet-arrival-count for the packet sent at T.

4.2.4. Definition ๐ŸŽถ

At time Ts, we start sending packets with a constant-rate lambda, until time Tf. For each packet sent, we obtain the value of Type-P-one-way-packet-arrival-count. The value of the sample is the sequence made up of the resulting {time, duplication} pairs. If there are no such pairs, the sequence is of length zero and the sample is said to be empty.

4.2.5. Methodology ๐Ÿ› ๏ธ

Refer to Section 4.5 of [RFC3432].

4.2.6. Errors and uncertainties ๐Ÿ™ˆ

Refer to Section 4.6 of [RFC3432].

4.2.7. Reporting the metric ๐Ÿ“

Refer to Section 4.7 of [RFC3432].


5. Some Statistics Definitions for One-Way Duplication ๐Ÿ“ˆ

Note: the statistics described in this section can be used for both Type-P-one-way-Packet-Duplication-Poisson-Stream and Type-P-one-way-Packet-Duplication-Periodic-Stream. The application SHOULD report which sample was used as input.

5.1. Type-P-one-way-packet-duplication-fraction ๐Ÿ’–

This statistic gives the fraction of additional packets that arrived in a stream.

Given a Type-P-one-way-Packet-Duplication-Poisson-Stream, one first removes all values of Type-P-one-way-Packet-Duplication that are undefined. For the remaining pairs in the stream, one calculates:

(Sum Type-P-one-way-packet-arrival-count/Number of pairs left) - 1

(In other words, (number of packets received)/(number of packets sent and not lost).)

The number can be expressed as a percentage.

Note: this statistic is the equivalent to the Y.1540 IPDR [Y1540].

5.2. Type-P-one-way-replicated-packet-rate ๐Ÿ”

This statistic gives the fraction of packets that was duplicated (one or more times) in a stream.

Given a Type-P-one-way-Packet-Duplication-Poisson-Stream, one first removes all values of Type-P-one-way-packet-arrival-count that are undefined. For the remaining pairs in the stream, one counts the number of pairs with Type-P-one-way-packet-arrival-count greater than 1. Then, one calculates the fraction of packets that meet this criterion as a fraction of the total. (In other words: (number of duplicated packets)/(number of packets sent and not lost).)

The number can be expressed as a percentage.

Note: this statistic is the equivalent of the Y.1540 RIPR [Y1540].

5.3. Examples ๐Ÿงฉ

Consider a stream of 4 packets, sent as:

(1, 2, 3, 4)

and arriving as:

  • Case 1: (1, 2, 3, 4)
  • Case 2: (1, 1, 2, 2, 3, 3, 4, 4)
  • Case 3: (1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4)
  • Case 4: (1, 1, 1, 2, 3, 3, 3, 4)

Case 1: No packets are duplicated in a stream, and both the Type-P-one-way-packet-duplication-fraction and the Type-P-one-way-packet-replicated-packet-rate are 0. ๐Ÿ˜Œ

Case 2: Every packet is duplicated once, and the Type-P-one-way-packet-duplication-fraction is 100%. The Type-P-one-way-replicated-packet-rate is 100%, too. ๐Ÿ”ฅ

Case 3: Every packet is duplicated twice, so the Type-P-one-way-packet-duplication-fraction is 200%. The Type-P-one-way-replicated-packet-rate is still 100%. ๐Ÿ‘€

Case 4: Half the packets are duplicated twice and the other half are not duplicated. The Type-P-one-way-packet-duplication-fraction is again 100%, and this number does not show the difference with case 2. However, the Type-P-one-way-packet-replicated-packet-rate is 50% in this case and 100% in case 2. ๐Ÿ’…

However, the Type-P-one-way-packet-duplication-rate will not show the difference between cases 2 and 3. For this, one has to look at the Type-P-one-way-packet-duplication-fraction. ๐Ÿซ 

Finally, note that the order in which the packets arrived does not affect the results. For example, these variations of case 2:

  • Case 2a: (1, 1, 2, 2, 3, 3, 4, 4)
  • Case 2b: (1, 2, 3, 4, 1, 2, 3, 4)
  • Case 2c: (1, 2, 3, 4, 4, 3, 2, 1)

(as well as any other permutation) all yield the same results for Type-P-one-way-packet-duplication-fraction and the Type-P-one-way-replicated-packet-rate. โœจ


6. Security Considerations ๐Ÿ”

Conducting Internet measurements raises both security and privacy concerns. This memo does not specify an implementation of the metrics, so it does not directly affect the security of the Internet nor of applications that run on the Internet. However, implementations of these metrics must be mindful of security and privacy concerns.

There are two types of security concerns: potential harm caused by the measurements and potential harm to the measurements. The measurements could cause harm because they are active, and they 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 of the measurement, 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 will not reflect actual user traffic. If an attacker injects artificial traffic that is accepted as legitimate, the loss rate will be artificially lowered. Therefore, 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. ๐Ÿคซ


7. IANA Considerations ๐Ÿ“‹

IANA has registered the metrics defined in this document in the IP Performance Metrics (IPPM) Metrics Registry, see [RFC4148]. ๐ŸŽ‰


8. Acknowledgements ๐Ÿซถ

The idea to write this document came up in a meeting with Al Morton, Stanislav Shalunov, Emile Stephan, and the author on the IPPM reporting document.

This document relies heavily on [RFC2680], and the author would like to thank the authors of that document for writing it. ๐Ÿ’œ

Finally, thanks are due to Lars Eggert, Al Morton, Martin Swany, and Matt Zekauskas for their comments. ๐ŸŒŸ


9. References ๐Ÿ“š

9.1. Normative References

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2680]  Almes, G., Kalidindi, S., and M. Zekauskas, "A One-way
           Packet Loss Metric for IPPM", RFC 2680, September 1999.

[RFC3432]  Raisanen, V., Grotefeld, G., and A. Morton, "Network
           performance measurement with periodic streams", RFC 3432,
           November 2002.

9.2. Informative References

[RFC2330]  Paxson, V., Almes, G., Mahdavi, J., and M. Mathis,
           "Framework for IP Performance Metrics", RFC 2330,
           May 1998.

[RFC4148]  Stephan, E., "IP Performance Metrics (IPPM) Metrics
           Registry", BCP 108, RFC 4148, August 2005.

[Y1540]    "Y.1540 ITU-T Recommendation Y.1540 (2007), Internet
           protocol data communication service IP packet transfer and
           availability performance parameters.", 2007.

Author's Address ๐Ÿฆ‹

Henk Uijterwaal
RIPE NCC
Singel 258
1016 AB Amsterdam
The Netherlands

Phone: +31 20 535 4444
EMail: henk@ripe.net
๐Ÿ“ฆ where this page comes from