rfc-5476

Packet Sampling (PSAMP) Protocol Specifications

B. Claise (Editor), A. Johnson, J. Quittek
date2009-03 streamIETF areaops wgpsamp statusPROPOSED STANDARD pages45 canonicalhttps://www.rfc-editor.org/rfc/rfc5476 doi10.17487/RFC5476 errataview
This document specifies the export of packet information from a Packet SAMPling (PSAMP) Exporting Process to a PSAMP Collecting Process. For export of packet information, the IP Flow Information eXport (IPFIX) protocol is used, as both the IPFIX and PSAMP architecture match very well, and the means provided by the IPFIX protocol are sufficient. The document specifies in detail how the IPFIX protocol is used for PSAMP export of packet information. [STANDARDS-TRACK]

Extracted elements (25)

design-rationale §1

IPFIX was chosen as the PSAMP export protocol because the IPFIX and PSAMP architectures match very well and the means provided by IPFIX are sufficient for PSAMP export. PSAMP export can be viewed as a special IPFIX Flow Record containing information about a single packet rather than aggregated flows.

measurement

design-rationale §6.5.2.6

The hashInitialiserValue Information Element is optional rather than required. The rationale stated is security considerations: making the hash initializer value optional avoids mandatory disclosure of state that could be exploited.

measurement, security

interoperability-note §5

Export Packet compression (mentioned as an option in the PSAMP framework [RFC5474] Section 8.5) is the only PSAMP framework requirement not met by the IPFIX-based PSAMP protocol specification.

measurement

interoperability-note §6.5.2.5

Logical OR operations across multiple filter criteria are not supported in the PSAMP Property Match Filtering specification; multiple Information Elements in the same Options Template Record represent a logical AND. Implementations needing OR semantics cannot rely on the basic PSAMP filtering mechanism.

measurement

normative-requirement §6.4.1 MUST

A Basic Packet Report MUST contain the selectionSequenceId Information Element and some number of contiguous bytes from the start of the packet (or start of payload) using one of the defined packet-section Information Elements. If a digest function is in the Selection Sequence, the digestHashValue MUST also be included.

measurement

normative-requirement §6.3 MUST

An Exporting Process MUST be able to limit the export rate according to a configurable value, and MAY limit the export rate on a per-Collecting-Process basis.

measurement

normative-requirement §6.5.2 MUST

Configuration details of every Selector MUST be exported using an IPFIX Data Record defined by an Options Template Record with selectorId as scope field and selectorAlgorithm followed by algorithm-specific Information Elements as non-scope fields.

measurement

normative-requirement §6.5.2.7 MUST

Each new selection method MUST be assigned a unique value for the selectorAlgorithm Information Element, and its configuration parameters and the Options Template used to report them MUST be clearly specified.

measurement, registry

normative-requirement §6.1 MUST

Each Primitive Selector MUST have a unique Selector ID within the Observation Domain. The Selector ID is represented by the selectorId Information Element [RFC5477].

measurement

normative-requirement §6.5.3 MUST

Each separate logical instance of a Selector used across multiple Selection Sequences MUST maintain its own individual Selection State and statistics. The Selection Sequence Statistics Report Interpretation MUST be exported periodically and MUST include packetsObserved and packetsSelected for each Primitive Selector in sequence order.

measurement

normative-requirement §6.4 MUST

For each Selection Sequence, a Packet Report MUST be created for each selected packet. The format of the Packet Report is specified in a Template Record contained in a Template Set.

measurement

normative-requirement §6.5.1 MUST

For every selectionSequenceId in use, the PSAMP Device MUST export a Selection Sequence Report Interpretation via an Options Template with selectionSequenceId as scope and non-scope fields for the Observation Point and one or more selectorId values listed in their usage order.

measurement

normative-requirement §6.5.2.6 MUST

For Hash-based Filtering on IPv4, the input to the Hash Function MUST include IP identification, flags, fragment offset, source IP address, destination IP address, and a configurable number of bytes from the IP payload. Minimum configuration ranges MUST support 8–32 bytes and offsets 0–64.

measurement, ip

normative-requirement §6.4.1 MUST NOT

If a contiguous-bytes Information Element is encoded with a fixed-length field that is too long for the selected packet, padding MUST NOT be used; instead the Exporting Process MUST export a new Template Record with the correct fixed-length or a variable-length field.

measurement

normative-requirement §6.5.2.6 SHOULD

Of the defined hash functions BOB (selectorAlgorithm=6), IPSX (7), and CRC (8), only BOB is recommended and SHOULD be used for Hash-based Selection.

measurement

normative-requirement §6.5.4 MUST

The Accuracy Report Interpretation MUST be exported using an Options Template with a scope containing the Information Element for which accuracy is required; if accuracy is template-specific a second scope containing templateId MUST be added. The accuracy SHOULD be reported using absoluteError or relativeError Information Elements [RFC5477].

measurement

normative-requirement §5.1 MUST

The entire IPFIX protocol specification [RFC5101] MUST be implemented for PSAMP; PSAMP cannot rely on a subset, because it requires all three Set types (Data Set, Template Set, Options Template Set) and both Template Record types.

measurement

normative-requirement §6.5.2.5 MUST NOT

The Property Match Filtering Options Template Record MUST NOT contain multiple identical Information Elements; when multiple different IEs are defined the filter acts as a logical AND. OR operations are explicitly not supported by PSAMP.

measurement

normative-requirement §6.5.2.5 MUST

When Property Match Filtering or Hash-based Filtering is based on encrypted fields, the Selector MUST recognize that the fields are not available and MUST NOT select those packets; encrypted packets MUST still be counted in the packetsObserved Information Element.

measurement, security

protocol-element §6.2

A Selection Sequence is a unique value per Observation Domain identifying the combination of an Observation Point and one or more Selector IDs through which packets are selected. It is represented by the selectionSequenceId Information Element defined in [RFC5477].

measurement

protocol-element §6.4.2

An Extended Packet Report MAY contain other Information Elements related to protocol fields (e.g., source/destination IP addresses), packet treatment (e.g., output interface, BGP AS), or Selection State (e.g., hash value), and MAY omit the raw packet content bytes that are mandatory in the basic report.

measurement

protocol-element §6

Four types of Report Interpretation are defined: Selection Sequence Report Interpretation (identifies Observation Points and Selectors per sequence), Selector Report Interpretation (configuration of each Selector), Selection Sequence Statistics Report Interpretation (packet counts observed and selected), and Accuracy Report Interpretation (field accuracy).

measurement

registry §8.2

The selectorAlgorithm Information Element [RFC5477] identifies the selection method. Values currently defined: 1 = systematic count-based sampling, 2 = systematic time-based sampling, 3 = random n-out-of-N sampling, 4 = uniform probabilistic sampling, 5 = property match filtering, 6 = BOB hash-based filtering, 7 = IPSX hash-based filtering, 8 = CRC hash-based filtering.

registry, measurement

security-consideration §7

PSAMP security relies on the security mechanisms of the underlying IPFIX protocol [RFC5101]. The hashInitialiserValue is designated optional (MAY be omitted) so that implementations are not forced to expose hash state that could enable an adversary to predict or reverse-engineer packet selection decisions.

security, measurement

wire-format §6.4.1

Basic Packet Report uses an IPFIX Template Record (Set ID=2) with fields selectionSequenceId (IE 301, 4 bytes), digestHashValue (IE 326, 4 bytes), a packet-section field such as dataLinkFrameSection (IE 315, fixed or variable length), and observationTimeMicroseconds (IE 324, 4 bytes). The Data Record carries the actual packet bytes.

measurement