rfc-4737

Packet Reordering Metrics

A. Morton, L. Ciavattone, G. Ramachandran, S. Shalunov, J. Perser
date2006-11 streamIETF areaops wgippm statusPROPOSED STANDARD pages45 canonicalhttps://www.rfc-editor.org/rfc/rfc4737 doi10.17487/RFC4737
This memo defines metrics to evaluate whether a network has maintained packet order on a packet-by-packet basis. It provides motivations for the new metrics and discusses the measurement issues, including the context information required for all metrics. The memo first defines a reordered singleton, and then uses it as the basis for sample metrics to quantify the extent of reordering in several useful dimensions for network characterization or receiver design. Additional metrics quantify the frequency of reordering and the distance between separate occurrences. We then define a metric oriented toward assessment of reordering effects on TCP. Several examples of evaluation using the various sample metrics are included. An appendix gives extended definitions for evaluating order with packet fragmentation. [STANDARDS-TRACK]

updated by

Extracted elements (28)

design-rationale §1

Reordering is defined by classifying 'late' arriving packets (those with sequence numbers smaller than previously seen) rather than 'premature' packets, because only the arrival of the late packet distinguishes reordering from packet loss. This maintains orthogonality with the packet loss metric and matches Paxson's definition.

measurement

design-rationale §6

Sequence number rollover is mitigated by: (1) detecting rollover via impossibly large jumps (more than half the total range) between successive packets, (2) representing all sequence numbers in sufficient precision with a correction factor applied on rollover, and (3) detecting reordered packets coincident with end-of-range.

measurement

design-rationale §5.4

The n-reordering metric was designed to estimate whether reordering might cause the TCP DUP-ACK threshold to be exceeded and trigger Fast Retransmit. n=3 corresponds to the default DUP-ACK threshold in RFC 2581 (NewReno TCP), SCTP (RFC 2960), and DCCP with CC-ID 2 (RFC 4341).

measurement, tcp

design-rationale §4.2.3

The reordering extent metric tends to overestimate the receiver storage needed to restore order because it does not subtract earlier reordered packets the receiver could pass on. This bias is acknowledged as acceptable, especially for on-the-fly calculation requirements.

measurement

design-rationale §6

To minimize storage for duplicate detection, tracking the sequence numbers of missing packets (rather than storing full packet copies) is sufficient. The missing packet list plus NextExp-1 fully determines whether any arriving packet is a duplicate.

measurement

interoperability-note §6.1

Reordering metrics may be evaluated passively if the packet payload carries sequence information (e.g., RTP headers). For TCP streams, retransmitted segments must be distinguished from original transmissions to avoid false reordering declarations; the optional TCP timestamp field (RFC 1323) or the SrcTime parameter helps resolve this ambiguity.

measurement, tcp

interoperability-note §4.3.4

The Reordering Late Time metric differs from IPDV (RFC 3393), which gives delay variation for a packet with respect to its predecessor in source sequence. When earlier packets are lost, IPDV is undefined for adjacent pairs, whereas LateTime may still be computable and is the only way to evaluate usefulness of a late packet.

measurement

normative-requirement §3.6 MUST

If duplicate packets (multiple non-corrupt copies) arrive at the destination, they MUST be noted and only the first copy considered for further analysis; subsequent copies are treated as reordered according to the singleton definition.

measurement

normative-requirement §B.2 MUST

In the fragment order evaluation appendix, packets with missing fragments MUST be declared lost and the reordering status of any fragments that do arrive MUST be excluded from sample metrics.

measurement, ip

normative-requirement §6 RECOMMENDED

It is RECOMMENDED to use the same test stream parameters when intending to compare independent measurements of reordering, and RECOMMENDED to choose the periodic sending interval to reproduce the closest expected source packet spacing.

measurement

normative-requirement §1.2 MUST

Reordering Metrics MUST have one or more applications, MUST be computable 'on the fly', and MUST work even if the stream has duplicate or lost packets.

measurement

normative-requirement §6 MUST

Streams sent at the link speed serialization limit MUST have limited duration and MUST consider packet loss an indication that the stream has caused congestion; testing MUST be suspended in that case.

measurement, congestion

normative-requirement §6 REQUIRED

To make inferences about TCP, it is REQUIRED to use TCP-like streams as in RFC 3148. For real-time applications, it is RECOMMENDED to use periodic streams as in RFC 3432. The exact method of packet generation MUST be reported with the measurement results.

measurement

normative-requirement §1.3 MUST

Whenever a reordering metric is reported, it MUST include a description of the Packet of Type-P identifiers and the stream parameter set (sending discipline, packet size, etc.) to provide a complete measurement context.

measurement

protocol-element §3.4

A Sequence Discontinuity occurs when an arriving packet s > NextExp, indicating missing packets (lost or reordered). Its size is s - NextExp. A discontinuity is reclassified as a Reordering Discontinuity only if the missing packets subsequently arrive as reordered packets.

measurement

protocol-element §4.6

The Type-P-Packet-Reordering-Free-Run metrics (numruns x, squruns q, numpkts p, accpkts a) count consecutive in-order packets between reordered packets. The average free-run length is a/x and the ratio (q/a)/(a/x) equals 1 when all runs are equal length, indicating run-length variability.

measurement

protocol-element §4.4

Type-P-Packet-Byte-Offset-Stream measures the byte storage a receiver needs to accommodate a reordered packet. ByteOffset(s[i]) is the sum of payload sizes of all packets that arrived before s[i] and have a larger source sequence number than s[i]; these are the packets normally buffered waiting for order to be restored.

measurement

protocol-element §4.3

Type-P-Packet-Late-Time-Stream measures the temporal lateness of a reordered packet: LateTime(s[i]) = DstTime(i) - DstTime(j), where j is the earliest arrival index of a packet with a larger sequence number. This helps predict whether reordered packets will be useful in a finite receiver buffer or de-jitter buffer.

measurement

protocol-element §5

Type-P-Packet-n-Reordering-Stream: a received packet with arrival index i is n-reordered if and only if all n packets preceding it in arrival order (indexes i-n through i-1) have larger source sequence numbers. The degree of n-reordering is m/l, where m is the count of n-reordered packets and l is packets received.

measurement, tcp

protocol-element §4.2

Type-P-Packet-Reordering-Extent-Stream quantifies how far out-of-order a reordered packet is. The reordering extent e of packet s[i] is i - j, where j is the smallest arrival index before i such that s[j] > s[i]. This represents the maximum distance to the earliest packet received with a larger sequence number.

measurement

protocol-element §4.5

Type-P-Packet-Reordering-Gap-Stream measures the arrival-position distance between successive reordering discontinuities: Gap(s[j']) = j' - j, where j and j' are the arrival indexes of two consecutive reordering discontinuities. An optional GapTime metric expresses the same distance in seconds.

measurement

protocol-element §3.3

Type-P-Reordered is the singleton metric. A packet with sequence number s is declared reordered (TRUE) if s < NextExp at the time of arrival; otherwise it is in-order (FALSE) and NextExp is updated to s+1. NextExp never decreases, providing a non-reversing order criterion.

measurement

protocol-element §4.1

Type-P-Reordered-Ratio-Stream measures the ratio R of reordered packets to received packets in a sample: R = (count of packets with Type-P-Reordered=TRUE) / L, where L is the number of received packets (duplicates removed). When R = 0, no further reordering metrics need be examined.

measurement

registry §9

This document registered 12 metrics in the IANA IPPM METRICS REGISTRY (RFC 4148): ietfReorderedSingleton (34), ietfReorderedPacketRatio (35), ietfReorderingExtent (36), ietfReorderingLateTimeOffset (37), ietfReorderingByteOffset (38), ietfReorderingGap (39), ietfReorderingGapTime (40), ietfReorderingFreeRunx (41), ietfReorderingFreeRunq (42), ietfReorderingFreeRunp (43), ietfReorderingFreeRuna (44), and ietfnReordering (45).

registry, measurement

security-consideration §8.3

An adversary who identifies measurement packets can manipulate the metric by altering packet processing (changing delay) or injecting additional packets that appear part of the sample, perturbing results by causing injected or original packets to be seen as duplicates. OWAMP (RFC 4656) provides mechanisms for data collection resistance to such interference.

security, measurement

security-consideration §8.2 MUST

Passive measurement may require temporarily storing user payloads for length analysis; suitable precautions MUST be taken to keep this information safe and confidential. In most cases, a hashing function will produce a value suitable for payload comparisons without retaining the payload itself.

security, privacy, measurement

security-consideration §8.1

The packet stream required by these metrics could be abused for denial-of-service attacks against the destination or intervening networks. Administrators should establish bilateral or multilateral agreements regarding timing, size, and frequency of sample metric collection.

security, measurement

state-machine §3.3

The NextExp state variable tracks the next expected sequence number. On arrival of packet s: if s >= NextExp, set NextExp = s+1 and mark in-order; if s < NextExp, mark reordered without changing NextExp. When s > NextExp a sequence discontinuity of size s - NextExp is recorded.

measurement