<?xml version="1.0" encoding="US-ASCII"?>

<!-- xml2rfc v1 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>

<rfc category="std" number="7014" ipr="pre5378Trust200902"
submissionType="IETF" consensus="yes">

        <front>
    <title abbrev="Flow Selection Techniques">Flow Selection Techniques</title>

    <author fullname="Salvatore D'Antonio" initials="S." surname="D'Antonio">
      <organization abbrev="Univ. of Napoli &quot;Parthenope&quot;">University of Napoli "Parthenope"</organization>
      <address>
        <postal>
          <street>Centro Direzionale di Napoli Is. C4</street>
          <city>Naples</city>
          <code>80143</code>
          <country>Italy</country>
        </postal>
        <phone>+39 081 5476766</phone>
        <email>salvatore.dantonio@uniparthenope.it</email>
      </address>
    </author>

    <author fullname="Tanja Zseby" initials="T." surname="Zseby">
      <organization>CAIDA/FhG FOKUS</organization>
      <address>
        <postal>
          <street>San Diego Supercomputer Center (SDSC)</street>
          <street>University of California, San Diego (UCSD)</street>
          <street>9500 Gilman Drive</street>
          <city>La Jolla</city>
          <region>CA</region>
          <code>92093-0505</code>
          <country>USA</country>
        </postal>
        <email>tanja.zseby@tuwien.ac.at</email>
      </address>
    </author>

    <author fullname="Christian Henke" initials="C." surname="Henke">
      <organization>Tektronix Communications Berlin</organization>
      <address>
        <postal>
          <street>Wohlrabedamm 32</street>
          <city>Berlin</city>
          <code>13629</code>
          <country>Germany</country>
        </postal>
        <phone>+49 17 2323 8717</phone>
        <email>christian.henke@tektronix.com</email>
      </address>
    </author>

    <author fullname="Lorenzo Peluso" initials="L." surname="Peluso">
      <organization>University of Napoli</organization>
      <address>
        <postal>
          <street>Via Claudio 21</street>
          <city>Napoli</city>
          <code>80125</code>
          <country>Italy</country>
        </postal>
        <phone>+39 081 7683821</phone>
        <email>lorenzo.peluso@unina.it</email>
      </address>
    </author>

    <date month="September" year="2013"/>

    <workgroup>Internet Engineering Task Force</workgroup>

    <abstract>
      <t>The Intermediate Flow Selection Process is the process of selecting a
subset of Flows from all observed Flows. The Intermediate Flow Selection
Process may be located at an IP Flow Information Export (IPFIX) Exporter or
Collector, or within an IPFIX Mediator. It reduces the effort of
post-processing Flow data and transferring Flow Records. This
document describes motivations for using the Intermediate Flow
Selection process and presents Intermediate Flow Selection techniques. It
provides an information model for configuring Intermediate Flow Selection
Process techniques and discusses what information about an Intermediate Flow
Selection Process should be exported.</t>
    </abstract>
        </front>

  <middle>

    <section title="Introduction" anchor="intro" toc="default">
      <t>This document describes Intermediate Flow Selection Process techniques for network traffic measurements. A Flow is defined as a set of packets with common
      properties, as described in <xref target="RFC7011"/>. An Intermediate
Flow Selection
Process can be executed to limit the resource demands for capturing, storing,
exporting, and post-processing Flow Records. It also can be used to select a
particular set of Flows that are of interest to a specific application.
      This document provides a categorization of Intermediate Flow Selection
Process techniques and describes configuration and reporting parameters for
them.</t>

      <t>This document also addresses configuration and reporting parameters
      for Flow-state dependent packet selection as described in <xref
      target="RFC5475"/>, although this technique is categorized as packet
      selection. The reason is that Flow-state dependent packet selection
      techniques often aim at the reduction of resources for Flow capturing
      and Flow processing. Furthermore, these techniques were only briefly
      discussed in <xref target="RFC5475"/>. Therefore, configuration and
      reporting considerations for Flow-state dependent packet selection
      techniques have been included in this document.</t>

    <section title="Requirements Language">
      <t>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 <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </section>

    </section>

    <section title="Terminology">
      <t>This document is consistent with the terminology introduced in <xref target="RFC7011"/>, <xref target="RFC5470"/>, <xref target="RFC5475"/>, and <xref target="RFC3917"/>. As in <xref target="RFC7011"/> and <xref
      target="RFC5476"/>, the first letter of each IPFIX specific and
      Packet Sampling (PSAMP) specific term is capitalized, along with the
      Intermediate Flow Selection Process specific terms defined here.</t>

      <t>* Packet Classification</t>

      <t><list style="empty">
          <t>Packet Classification is a process by which packets are mapped to
          specific Flow Records, based on packet properties or external
          properties (e.g., interface). The properties (e.g., header
          information, packet content, Autonomous System (AS) number)
          make up the Flow Key. &nbsp;If a Flow Record for a specific Flow Key
          value already exists, the Flow Record is updated; otherwise, a new
          Flow Record is created.</t>
        </list></t>

      <t>* Intermediate Flow Selection Process</t>

      <t><list style="empty">
          <t>An Intermediate Flow Selection Process is an Intermediate Process,
as defined in <xref target="RFC6183"/> that takes Flow Records as its input and
selects
a subset of this set as its output. The Intermediate Flow Selection Process is a
more general concept than the Intermediate Selection Process as defined in <xref
target="RFC6183"/>. While an Intermediate Selection Process selects Flow
Records from a sequence based upon criteria-evaluated Flow Record values and
only passes on those Flow Records that match the criteria, an Intermediate Flow
Selection Process selects Flow Records using selection criteria applicable to a
larger set of Flow characteristics and information.</t>
        </list></t>
                
          <t>* Flow Cache</t>

      <t><list style="empty">
          <t>A Flow Cache is the set of Flow Records.</t>
        </list></t>

      <t>* Flow Selection State</t>

      <t><list style="empty">
          <t>An Intermediate Flow Selection Process maintains state information for
          use by the Flow Selector. At a given time, the Flow Selection State
          may depend on Flows and packets observed at and before that time, as
          well as other variables. Examples include:<list style="hanging" hangIndent="8">
              <t hangText="  (i)">sequence number of packets and Flow Records;</t>

              <t hangText="  (ii)">number of selected Flows;</t>

              <t hangText="  (iii)">number of observed Flows;</t>

              <t hangText="  (iv)">current Flow Cache occupancy;</t>

              <t hangText="  (v)">Flow specific counters, lower and upper
              bounds;</t>

              <t hangText="  (vi)">Intermediate Flow Selection Process timeout intervals.</t>
            </list></t>
        </list></t>

      <t>* Flow Selector</t>

      <t><list style="empty">
          <t>A Flow Selector defines the action of an Intermediate Flow Selection Process on
          a single Flow of its input. The Flow Selector can make use of the
          following information in order to establish whether or not a Flow has to be
          selected:<list hangIndent="8" style="hanging">
              <t hangText="  (i)">the content of the Flow Record;</t>

              <t hangText="  (ii)">any state information related to the
              Metering Process or Exporting Process;</t>

              <t hangText="  (iii)">any Flow Selection State that may be
              maintained by the Intermediate Flow Selection Process.</t>
            </list></t>
        </list></t>

      <t>* Complete Flow</t>

      <t><list style="empty">
          <t>A Complete Flow consists of all the packets that enter the Intermediate Flow
          Selection Process within the Flow timeout interval and that
          belong to the same Flow, per the definition of "Flow" in <xref
          target="RFC5470"/>. For this definition, only packets that arrive at
          the Intermediate Flow Selection Process are considered.</t>
        </list></t>
                
         <t>* Flow Position</t>

     <t><list style="empty">
          <t>Flow Position is the position of a Flow Record within the Flow Cache.</t>
        </list></t>

      <t>* Flow Filtering</t>

      <t><list style="empty">
          <t>Flow Filtering selects flows based on a deterministic function on
          the Flow Record content, Flow Selection State, external properties
          (e.g., ingress interface), or external events (e.g., violated Access
          Control List). If the relevant parts of the Flow Record content can
          already be observed at the packet level (e.g., Flow Keys from packet
          header fields), Flow Filtering can be performed at the packet level
          by Property Match Filtering, as described in <xref target="RFC5475"/>.</t>
        </list></t>

      <t>* Hash-based Flow Filtering</t>

      <t><list style="empty">
          <t>Hash-based Flow Filtering is a deterministic Flow filter function
          that selects flows based on a hash function. The hash function is
          calculated over parts of the Flow Record content or external
          properties that are called the Hash Domain. If the hash value falls
          into a predefined Hash Selection Range, the Flow is selected.</t>
        </list></t>

      <t>* Flow-state Dependent Intermediate Flow Selection Process</t>

      <t><list style="empty">
          <t>The Flow-state dependent Intermediate Flow Selection Process is a
          selection function that selects or drops Flows based on the current
          Flow Selection State. The selection can be either deterministic,
          random, or non-uniform random.</t>
        </list></t>

      <t>* Flow-state Dependent Packet Selection</t>

      <t><list style="empty">
          <t>Flow-state dependent packet selection is a selection function
          that selects or drops packets based on the current Flow Selection
          State. The selection can be either deterministic, random, or
          non-uniform random. Flow-state dependent packet selection can be
          used to implement a preference for the selection of packets belonging
          to specific Flows. For example, the selection probability of packets
          belonging to Flows that are already within the Flow Cache may be
          higher than for packets that have not been recorded yet.</t>
        </list></t>

      <t>* Flow Sampling</t>

      <t><list style="empty">
          <t>Flow Sampling selects flows based on Flow Record sequence or
          arrival times (e.g., entry in Flow Cache, arrival time at Exporter or
          Mediator). The selection can be systematic (e.g., every n-th Flow) or
          based on a random function (e.g., select each Flow Record with
          probability p, or randomly select n out of N Flow Records).</t>
        </list></t>
    </section>

    <section title="Difference between Intermediate Flow Selection Process and Packet Selection">
      <t>The Intermediate Flow Selection Process differs from packet selection
as described in <xref target="RFC5475"/>. Packet selection techniques consider
packets as the basic element, and the parent population consists of all packets
observed at an Observation Point. In contrast to this, the basic elements in
Flow selection are the Flows. The parent population consists of all observed
Flows, and the Intermediate Flow Selection Process operates on the Flows.
The major characteristics of the Intermediate Flow Selection Process are the
following:</t>

      <t><list hangIndent="3" style="hanging">
          <t hangText="- ">The Intermediate Flow Selection Process takes Flows as basic elements. For
          packet selection, packets are considered as basic elements.</t>

          <t hangText="- ">The Intermediate Flow Selection Process typically takes place after Packet
          Classification, because the classification rules determine to which
          Flow a packet belongs. The Intermediate Flow Selection Process can be
performed before Packet Classification. In that case, the Intermediate Flow
Selection Process is based on the Flow Key (and also on a hash value over the
Flow Key) but not on characteristics that are only available after Packet
Classification (e.g., Flow size, Flow duration). Packet selection can be
applied before and
          after Packet Classification. As an example, packet selection before
Packet Classification can be random packet selection, whereas packet selection
after Packet Classification can be Flow-state dependent packet selection (as
described in <xref target="RFC5475"/>).</t>

          <t hangText="- ">The Intermediate Flow Selection Process operates on Complete Flows. That
          means that after the Intermediate Flow Selection Process, either all packets of
          the Flow are kept or all packets of the Flow are discarded. That
          means that if the Intermediate Flow Selection Process is preceded by a packet selection
          process, the Complete Flow consists only of the packets that were not
          discarded during the packet selection.</t>
        </list></t>

      <t>There are some techniques that are difficult to unambiguously
      categorize into one of the categories. Here, some guidance is given on how to
      categorize such techniques: <list hangIndent="3" style="hanging">
          <t hangText="- ">Techniques that can be considered as both packet selection
          and an Intermediate Flow Selection Process: some packet selection techniques result in the selection of Complete Flows and therefore can be considered as
          packet selection or as an Intermediate Flow Selection Process at the
same time. An example is Property Match Filtering of all packets to a specific
destination address. If Flows are defined based on destination addresses, such
a packet selection also results in an Intermediate Flow Selection Process and
can be considered as packet selection or as an Intermediate Flow Selection Process.</t>

          <t hangText="- ">Flow-state Dependent Packet Selection: there exist techniques that select
          packets based on the Flow state, e.g., based on the number of already
          observed packets belonging to the Flow. Examples of these techniques
          from the literature include "Sample and Hold" <xref target="EsVa01"/>,
          "Fast Filtered Sampling" <xref target="MSZC10"/>, and the "Sticky
          Sampling" algorithm presented in <xref target="MaMo02"/>. Such
          techniques can be used to influence which Flows are captured (e.g.,
          increase the selection of packets belonging to large Flows) and
          reduce the number of Flows that need to be stored in the Flow Cache.
          Nevertheless, such techniques do not necessarily select Complete
          Flows, because they do not ensure that all packets of a selected
          Flow are captured. Therefore, Flow-state dependent packet selection
          techniques that do not ensure that either all or no packets of a Flow
          are selected, strictly speaking, have to be considered as packet
          selection techniques and not as Intermediate Flow Selection Process techniques.</t>
        </list></t>
    </section>

        <section title="Difference between Intermediate Flow Selection Process and Intermediate Selection Process">
        <t>The Intermediate Flow Selection Process differs from the
Intermediate Selection Process, since the Intermediate Flow Selection Process uses selection
criteria that apply to a larger set of Flow information and properties than
those used by the Intermediate Selection Process. The typical function of an
Intermediate Selection Process is Property Match Filtering, which selects a Flow
Record if the value of a specific field in the Flow Record matches a configured
value or falls within a configured range. This means that the selection
criteria used by an Intermediate Selection Process are evaluated only on Flow
Record values. An Intermediate Flow Selection Process makes its decision on
whether a Flow has to be selected or not by taking into account not only
information related to the content of the Flow Record but also any Flow
Selection State information or variable that can be used to select Flows in
order to meet application requirements or resource constraints (e.g., Flow
Cache occupancy, export link capacity). Examples include flow counters,
Intermediate Flow Selection Process timeout intervals, and Flow Record time
information.</t>
        </section>
        
    <section title="Intermediate Flow Selection Process within the IPFIX Architecture">
      <t>An Intermediate Flow Selection Process can be deployed at any of three
places within the IPFIX architecture. As shown in <xref
target="flowselection"/>, the Intermediate Flow Selection Process can occur 
          <list
          style="numbers">
          <t>in the Metering Process at the IPFIX Exporter</t>

          <t>in the Exporting Process at the Collector</t>

          <t>within a Mediator</t>
        </list></t> <figure anchor="flowselection" align="center"
          title="Potential Intermediate Flow Selection Process Locations">
          <artwork>                 
   +===========================================+
   |  IPFIX Exporter        +----------------+ |
   |                        | Metering Proc. | |
   | +-----------------+    +----------------+ |
   | |    Metering     |    |  Intermediate  | |
   | |    Process      | or | Flow Selection | |
   | |                 |    |     Process    | |
   | +-----------------+----+----------------+ |
   | |           Exporting Process           | |
   | +----|-------------------------------|--+ |
   +======|===============================|====+
          |                               |
          |                               |
   +======|========================+      |
   |      |  Mediator              |      |
   |    +-V-------------------+    |      |
   |    | Collecting Process  |    |      |
   |    +---------------------+    |      |
   |    | Intermediate Flow   |    |      |
   |    | Selection Process   |    |      |        
   |    +---------------------+    |      |
   |    |  Exporting Process  |    |      |
   |    +-|-------------------+    |      |
   +======|========================+      |
          |                               |
          |                               |
   +======|===============================|=====+
   |      |         Collector             |     |
   | +----V-------------------------------V-+   |
   | |         Collecting Process           |   |
   | +--------------------------------------+   |
   | | Intermediate Flow Selection Process  |   |
   | +--------------------------------------+   |
   | |           Exporting Process          |   |
   | +------------------------------|-------+   |
   +================================|===========+
                                    |
                                    |
                                    V
                             +------------------+
                             |       IPFIX      |
                             +------------------+
                                                         </artwork>
        </figure> 
                
                <t>In contrast to packet selection, the Intermediate Flow
Selection Process is always applied after the packets are classified into
Flows. </t>

      <section title="Intermediate Flow Selection Process in the Metering Process">
        <t>An Intermediate Flow Selection Process in the Metering Process uses packet information to update the Flow Records in the Flow Cache.
        The Intermediate Flow Selection Process, before Packet Classification,
can be based on the Flow Key (and also on a hash value over the Flow Key) but not on characteristics that are only available after Packet Classification (e.g.,
        Flow size, Flow duration). Here, an Intermediate Flow Selection Process
        is applied to reduce resources for all subsequent processes or to
        select specific Flows of interest in cases where such Flow characteristics
        are already observable at the packet level (e.g., Flows to specific IP
        addresses). In contrast, Flow-state dependent packet selection is a
        packet selection technique, because it does not necessarily select
        Complete Flows.</t>
      </section>

      <section title="Intermediate Flow Selection Process in the Exporting Process">
        <t>An Intermediate Flow Selection Process in the Exporting Process
works on Flow Records and can therefore depend on Flow
        characteristics that are only visible after the classification of
        packets, such as Flow size and Flow duration. The Exporting Process
        may implement policies for exporting only a subset of the Flow Records
        that have been stored in the system's memory, in order to offload Flow
        export and Flow post-processing. An Intermediate Flow Selection Process in the Exporting
        Process may select only the subset of Flow Records that are of
        interest to the user's application or select only as many Flow Records
        as can be handled by the available resources (e.g., limited export link
        capacity).</t>
      </section>

      <section title="Intermediate Flow Selection Process as a Function of the IPFIX Mediator">
        <t>As shown in <xref target="flowselection"/>, the Intermediate Flow Selection Process can be performed within an IPFIX Mediator <xref
        target="RFC6183"/>. The Intermediate Flow Selection Process takes a Flow
        Record stream as its input and selects Flow Records from a sequence
        based upon criteria-evaluated record values. The Intermediate Flow
        Selection Process can again apply an Intermediate Flow Selection
        Process technique to obtain Flows of interest to the
        application. Further, the Intermediate Flow Selection Process can
        base its selection decision on the correlation of data from
        different IPFIX Exporters, e.g., by only selecting Flows that were
        recorded on two or more IPFIX Exporters.</t>
      </section>
    </section>
        
    <section title="Intermediate Flow Selection Process Techniques">
      <t>An Intermediate Flow Selection Process technique selects either all or none of the packets of a Flow; otherwise, the technique has to be considered as packet
      selection. A difference between Flow Filtering and Flow sampling is
recognized.</t>

      <section title="Flow Filtering">
        <t>Flow Filtering is a deterministic function on the IPFIX Flow Record
        content. If the relevant Flow characteristics are already observable
        at the packet level (e.g., Flow Keys), Flow Filtering can be applied before
        aggregation at the packet level. In order to be compliant with IPFIX, at least one of this document's Flow Filtering schemes MUST be
        implemented.</t>

        <section title="Property Match Filtering">
          <t>Property Match Filtering is performed similarly to Property
          Match Filtering for packet selection as described in <xref
          target="RFC5475"/>. The difference is that Flow Record fields are
          used here, instead of packet fields, to derive the selection
          decision. Property Match Filtering is used to select a
          specific subset of the Flows that are of interest to a particular
          application (e.g., all Flows to a specific destination, all large
          Flows, etc.). Properties on which the filtering is based can be Flow
          Keys, Flow Timestamps, or Per-Flow Counters as described in <xref
          target="RFC7012"/>. Examples include the Flow size in
          bytes, the number of packets in the Flow, the observation time of
          the first or last packet, and the maximum packet length. An example
of Property Match Filtering is to select Flows with more than a threshold
number of observed octets. The selection criteria can be a specific value, a
set of specific values, or an interval. For example, a Flow is selected if
          destinationIPv4Address and the total number of packets of the Flow
          equal two predefined values. An Intermediate Flow Selection Process
using Property Match Filtering in the Metering Process relies on properties
that are observable at the packet level (e.g., Flow Key). For example, a Flow
is selected if sourceIPv4Address and sourceIPv4PrefixLength equal,
respectively, two specific values.</t>

          <t>An Intermediate Flow Selection Process using Property Match
Filtering in the Exporting Process is based on properties that are only visible
after Packet Classification, such as Flow size and Flow duration. An example is
the selection of the largest Flows or a percentage of Flows with the longest
lifetime. Another example is to select and remove from the Flow Cache the Flow
Record with the lowest Flow volume per current Flow lifetime if the Flow Cache
is full.</t>
                  
                  <t>An Intermediate Flow Selection Process using Property
Match Filtering within an IPFIX Mediator selects a Flow Record if the value of
a specific field in the Flow Record equals a configured value or falls within a
configured range <xref target="RFC6183"/>.</t>
        </section>

        <section title="Hash-Based Flow Filtering">
          <t>Hash-based Flow Filtering uses a hash function h to map the Flow
          Key c onto a Hash Range R. &nbsp;A Flow is selected if the hash
          value h(c) is within the Hash Selection Range S, which is a
          subset of R.&nbsp; Hash-based Flow Filtering can be used to emulate a
          random sampling process but still enable the correlation between
          selected Flow subsets at different Observation Points. 
                  Hash-based Flow Filtering is similar to Hash-based packet
selection and is in fact identical when Hash-based packet selection uses the
Flow Key that defines the Flow as the hash input. Nevertheless, there may be
the incentive to apply Hash-based Flow Filtering, but not at the packet level,
in the Metering Process, for example, when the size of the selection range,
          and therefore the sampling probability, are dependent on the number
of observed Flows.
          If Hash-based Flow Filtering is used to select the same subset
          of flows at different Observation Points, the Hash Domain MUST
          only include parts of the Flow Record content that are invariant on the
          Flow path. Refer also to the Trajectory Sampling application example
          of coordinated packet selection <xref target="RFC5475"/>, which
          explains the hash-based filtering approach at the packet level.</t>
        </section>
      </section>

      <section title="Flow Sampling">
        <t>Flow sampling operates on Flow Record sequence or arrival times. It
        can use either a systematic or a random function for the Intermediate Flow Selection Process. Flow sampling usually aims at the selection of a
        representative subset of all Flows in order to estimate
        characteristics of the whole set (e.g., mean Flow size in the
        network).</t>

        <section title="Systematic Sampling">
          <t>Systematic sampling is a deterministic selection function.
          It may be a periodic selection of the N-th Flow
          Record that arrives at the Intermediate Flow Selection
          Process. Systematic sampling MAY be applied in the Metering
          Process. An example would be to create, besides the Flow Cache of
          selected Flows, an additional data structure that saves the Flow
          Key values of the Flows that are not selected. The selection of a Flow
          would then be based on the first packet of a Flow. Every time a
          packet belonging to a new Flow (which is not in the data
          structure of either the selected or non-selected Flows) arrives at the
          Observation Point, a counter is increased. If the counter is
          increased to a multiple of N, a new Flow Cache entry is created;
          if the counter is not a multiple of N, the Flow Key value is added to
          the data structure for non-selected Flows.</t>

          <t>Systematic sampling can also be time-based. Time-based systematic
          sampling is applied by only creating Flows that are observed between
          time-based start and stop triggers. The time interval may be applied
          at the packet level in the Metering Process or after aggregation at
          the Flow level, e.g., by selecting a Flow arriving at the Exporting
          Process every n seconds.</t>
        </section>

        <section title="Random Sampling">
          <t>Random Flow sampling is based on a random process that requires
          the calculation of random numbers. One can differentiate between
          n-out-of-N and probabilistic Flow sampling.</t>

          <section title="n-out-of-N Flow Sampling">
            <t>In n-out-of-N Sampling, n elements are selected out of the
            parent population, which consists of N elements. One example would
            be to generate n different random numbers in the range [1,N] and
            select all Flows that have a Flow Position equal to one of the
            random numbers.</t>
          </section>

          <section title="Probabilistic Flow Sampling">
            <t>In probabilistic Sampling, the decision of whether or not a Flow
            is selected is made in accordance with a predefined selection
            probability. For probabilistic Sampling, the Sample Size can vary
            for different trials. The selection probability does not
            necessarily have to be the same for each Flow. Therefore, a
difference between uniform probabilistic sampling (with the same selection
probability for all Flows) and non-uniform probabilistic
            sampling (where the selection probability can vary for different
            Flows) is recognized. For non-uniform probabilistic Flow sampling,
the sampling
            probability may be adjusted according to the Flow Record content.
            An example would be to increase the selection probability of
            large-volume Flows over small-volume Flows, as described in
            <xref target="DuLT01"/>.</t>
          </section>
        </section>
      </section>

      <section title="Flow-State Dependent Intermediate Flow Selection Process">
        <t>The Flow-state dependent Intermediate Flow Selection Process can be
a deterministic or random Intermediate Flow Selection Process, based on the
Flow Record content and the Flow state that may be kept additionally for each
of the Flows. External processes may update counters, bounds, and timers for
each of
        the Flow Records, and the Intermediate Flow Selection Process utilizes this
        information for the selection decision. A review of Flow-state
        dependent Intermediate Flow Selection Process techniques that aim at
the selection of the most frequent items by keeping additional Flow state
information can be found in <xref target="CoHa08"/>. The Flow-state dependent
Intermediate Flow Selection Process can only be applied after packet
aggregation, when a packet has been assigned to a Flow. The Intermediate Flow
Selection Process then decides, based on the Flow state for each Flow,
whether it is kept in the Flow Cache or not. Two Flow-state dependent
Intermediate Flow Selection Process Algorithms are described here:</t>

        <t>The Frequent algorithm <xref target="KaPS03"/> is a technique that
        aims at the selection of all flows that at least exceed a 1/k fraction
        of the Observed Packet Stream. The algorithm has only a Flow Cache of
        size k-1, and each Flow in the Flow Cache has an additional counter. The
        counter is incremented each time a packet belonging to the Flow in the
        Flow Cache is observed. If the observed packet does not belong to
        any Flow, all counters are decremented; if any of the Flow counters
        has a value of zero, the Flow is replaced with a Flow formed from the
        new packet.</t>

        <t>Lossy counting is a selection technique that identifies all Flows
        whose packet count exceeds a certain percentage of the whole observed
        packet stream (e.g., 5% of all packets) with a certain estimation error
        e. &nbsp;Lossy counting separates the observed packet stream in windows of
        size N=1/e, where N is an amount of consecutive packets. For each
        observed Flow, an additional counter will be held in the Flow state.
        The counter is incremented each time a packet belonging to the Flow is
        observed, and all counters are decremented at the end of each window.
        Also, all Flows with a counter of zero are removed from the Flow
        Cache.</t>
      </section>

      <section title="Flow-State Dependent Packet Selection">
        <t>Flow-state dependent packet selection is not an Intermediate Flow
Selection Process technique but a packet selection technique. Nevertheless,
configuration and reporting parameters for this technique will be described in
this document. An example is the "Sample and Hold" algorithm <xref
        target="EsVa01"/>, which tries to implement a preference for
large-volume Flows in the
        selection. When a packet arrives, it is selected when a Flow Record for
        this packet already exists. If there is no Flow Record, the
        packet is selected according to a certain probability that is dependent
on the packet size.</t>
      </section>
    </section>

    <section anchor="config"
             title="Configuration of Intermediate Flow Selection Process Techniques">
      <t>This section describes the configuration parameters of the Flow
      selection techniques presented above. It provides the basis for an
      information model to be adopted in order to configure the Intermediate
Flow Selection Process within an IPFIX Device. The information model with the
Information Elements (IEs) for Intermediate Flow Selection Process
configuration is described together with the reporting IEs
in <xref target="info-model"/>. <xref target="table1"/> gives an overview
of the defined Intermediate Flow Selection Process techniques,
where they can be applied, and what their input parameters are. Depending on
where the Flow selection techniques are applied, different
input parameters can be configured.</t>
<?rfc compact="no"?>
      <texttable align="left" title="Overview of Intermediate Flow Selection
Process Techniques" anchor="table1">
        <ttcol>Location</ttcol>

        <ttcol>Selection Technique</ttcol>

        <ttcol>Selection Input</ttcol>

        <c>In the Metering Process</c>

        <c>Flow-state Dependent Packet Selection</c>

        <c>packet sampling probabilities, Flow Selection State, packet
        properties</c>

        <c>In the Metering Process</c>

        <c>Property Match Flow Filtering</c>

        <c>Flow Record IEs, Selection Interval</c>

        <c>In the Metering Process</c>

        <c>Hash-based Flow Filtering</c>

        <c>selection range, hash function, Flow Key, seed (optional)</c>

        <c>In the Metering Process</c>

        <c>Time-based Systematic Flow sampling</c>

        <c>Flow Position (derived from arrival time of packets), Flow
        Selection State</c>

        <c>In the Metering Process</c>

        <c>Sequence-based Systematic Flow sampling</c>

        <c>Flow Position (derived from packet position), Flow Selection
        State</c>

        <c>In the Metering Process</c>

        <c>Random Flow sampling</c>

        <c>random number generator or list and packet position, Flow state</c>

        <c>In the Exporting Process/ within the IPFIX Mediator</c>

        <c>Property Match Flow Filtering</c>

        <c>Flow Record content, filter function</c>

        <c>In the Exporting Process/ within the IPFIX Mediator</c>

        <c>Hash-based Flow Filtering</c>

        <c>selection range, hash function, hash input (Flow Keys and other
        Flow properties)</c>

        <c>In the Exporting Process/ within the IPFIX Mediator</c>

        <c>Flow-state Dependent Intermediate Flow Selection Process</c>

        <c>Flow state parameters, random number generator or list</c>

        <c>In the Exporting Process/ within the IPFIX Mediator</c>

        <c>Time-based Systematic Flow sampling</c>

        <c>Flow arrival time, Flow state</c>

        <c>In the Exporting Process/ within the IPFIX Mediator</c>

        <c>Sequence-based Systematic Flow sampling</c>

        <c>Flow Position, Flow state</c>

        <c>In the Exporting Process/ within the IPFIX Mediator</c>

        <c>Random Flow sampling</c>

        <c>random number generator or list and Flow Position, Flow state</c>
      </texttable>

<?rfc compact="yes" ?>
      <section title="Intermediate Flow Selection Process Parameters">
        <t>This section defines what parameters are required to describe
        the most common Intermediate Flow Selection Process techniques.</t>

        <t>Intermediate Flow Selection Process Parameters:</t>

        <t>For Property Match Filtering: <list hangIndent="3" style="hanging">
            <t hangText="- ">Information Element as specified in <xref
            target="IANA-IPFIX"/>): <vspace blankLines="0"/>
            Specifies the Information Element that is used as the property in
            the filter expression. <xref target="info-model"/> specifies the
            Information Elements that MUST be
                        exported by an Intermediate Flow Selection Process using Property Match Filtering.</t>

            <t hangText="- ">Selection Value or Value Interval: <vspace
            blankLines="0"/> Specifies the value or interval of the filter
            expression. Packets and Flow Records that have a value equal to the
            Selection Value or within the Interval will be selected.</t>
          </list></t>

        <t>For Hash-based Flow Filtering: <list hangIndent="3" style="hanging">
            <t hangText="- ">Hash Domain: <vspace blankLines="0"/> Specifies
            the bits from the packet or Flow that are taken as the hash input
            to the hash function.</t>

            <t hangText="- ">Hash Function: <vspace blankLines="0"/> Specifies
            the name of the hash function that is used to calculate the hash
            value. Possible hash functions are BOB <xref target="RFC5475"/>,
            IP Shift-XOR (IPSX) <xref target="RFC5475"/>, and CRC-32 <xref target="Bra75"/>.</t>

            <t hangText="- ">Hash Selection Range: <vspace blankLines="0"/>
            Flows that have a hash value within the Hash Selection Range are
            selected. The Hash Selection Range can be a value interval or
            arbitrary hash values within the Hash Range of the hash
            function.</t>

            <t hangText="- ">Random Seed or Initializer Value: <vspace
            blankLines="0"/> Some hash functions require an initializing
            value. In order to make the selection decision more secure, one can
            choose a random seed that configures the hash function.</t>
          </list></t>

        <t>For Flow-state Dependent Intermediate Flow Selection Process: <list hangIndent="3"
            style="hanging">
            <t hangText="- ">Frequency threshold: <vspace blankLines="0"/>
            Specifies the frequency threshold s for Flow-state dependent Flow
            Selection techniques that try to find the most frequent items
            within a dataset. All Flows that exceed the defined threshold
            will be selected.</t>

            <t hangText="- ">Accuracy parameter: <vspace blankLines="0"/>
            Specifies the accuracy parameter e for techniques that deal with
            the issue of mining frequent items in a dataset. The
            accuracy parameter defines the maximum error, i.e.,
            no Flows that have a true frequency less than
            (s - e) N are selected, where s is the frequency threshold and N
            is the total number of packets.</t>
          </list></t>

        <t>The above list of parameters for Flow-state dependent Flow
        Selection techniques is suitable for the presented frequent item and
        lossy counting algorithms. Nevertheless, a variety of techniques exist
        with very specific parameters not defined here.</t>

        <t>For Systematic time-based Flow sampling: <list hangIndent="3"
            style="hanging">
            <t hangText="- ">Interval length (in usec): <vspace
            blankLines="0"/> Defines the length of the sampling interval
            during which Flows are selected.</t>

            <t hangText="- ">Spacing (in usec): <vspace blankLines="0"/>
            Defines the spacing in usec between the end of
            one sampling interval and the start of the next interval.</t>
          </list></t>

        <t>For Systematic count-based Flow sampling: <list hangIndent="3"
            style="hanging">
            <t hangText="- ">Interval length: <vspace blankLines="0"/> Defines
            the number of Flows that are selected within the sampling
            interval.</t>

            <t hangText="- ">Spacing: <vspace blankLines="0"/> Defines
            the spacing, in number of observed Flows, between
            the end of one sampling interval and the start of the
            next interval.</t>
          </list></t>

        <t>For random n-out-of-N Flow sampling: <list hangIndent="3"
            style="hanging">
            <t hangText="- ">Population Size N: <vspace blankLines="0"/>The
            number of all Flows in the Population from which the sample is
            drawn.</t>

            <t hangText="- ">Sampling Size n: <vspace blankLines="0"/> The
            number of Flows that are randomly drawn from the population N.</t>
          </list></t>

        <t>For probabilistic Flow sampling: <list hangIndent="3"
            style="hanging">
            <t hangText="- ">Sampling probability p: <vspace blankLines="0"/>
            Defines the probability by which each
            of the observed Flows is selected.</t>
          </list></t>
      </section>

      <section title="Description of Flow-State Dependent Packet Selection">
        <t>The configuration of Flow-state dependent packet selection has not
        been described in <xref target="RFC5475"/>; therefore, the parameters
        are defined here:</t>

        <t>For Flow-state Dependent Packet Selection: <list hangIndent="3"
            style="hanging">
            <t hangText="- ">Packet selection probability per possible Flow
            state interval: <vspace blankLines="0"/> Defines multiple {Flow
            interval, packet selection probability} value pairs that configure
            the sampling probability, depending on the current Flow state.</t>

            <t hangText="- ">Additional parameters: <vspace blankLines="0"/>
            For the configuration of Flow-state dependent packet selection,
            additional parameters or packet properties may be required, e.g.,
            the packet size <xref target="EsVa01"/>.</t>
          </list></t>
      </section>
    </section>

    <section title="Information Model for Intermediate Flow Selection Process
Configuration and Reporting" anchor="info-model">
      <t>This section specifies the Information Elements that MUST be
      exported by an Intermediate Flow Selection Process in order to support the
      interpretation of measurement results from Flow measurements. The information is mainly used to report how
      many packets and Flows have been observed in total and how many of them
      were selected. This helps, for instance, to calculate the Attained
      Selection Fraction (see also <xref target="RFC5476"/>), which is an
      important parameter for providing an accuracy statement. The IEs can
      provide reporting information about Flow Records, packets, or bytes. The
      reported metrics are the total number of elements and the number of
      selected elements. The number of dropped elements can be derived
      from this information. </t>
          
     <t><xref target="table2"/> shows a list of Intermediate Flow Selection Process Information Elements:</t>
<?rfc compact="no" ?>
      <texttable align="center" title="Intermediate Flow Selection Process
Information Elements" anchor="table2">
        <ttcol>ID</ttcol>

        <ttcol>Name</ttcol>

        <ttcol>ID</ttcol>

        <ttcol>Name</ttcol>

        <c>301</c>

        <c>selectionSequenceID</c>

        <c>302</c>

        <c>selectorID</c>

        <c>390</c>

        <c>flowSelectorAlgorithm</c>

        <c>1</c>

        <c>octetDeltaCount</c>

        <c>391</c>

        <c>flowSelectedOctetDeltaCount</c>

        <c>2</c>

        <c>packetDeltaCount</c>

        <c>392</c>

        <c>flowSelectedPacketDeltaCount</c>

        <c>3</c>

        <c>originalFlowsPresent</c>

        <c>393</c>

        <c>flowSelectedFlowDeltaCount</c>

        <c>394</c>

        <c>selectorIDTotalFlowsObserved</c>

        <c>395</c>

        <c>selectorIDTotalFlowsSelected</c>

        <c>396</c>

        <c>samplingFlowInterval</c>

        <c>397</c>

        <c>samplingFlowSpacing</c>

        <c>309</c>

        <c>samplingSize</c>

        <c>310</c>

        <c>samplingPopulation</c>

        <c>311</c>

        <c>samplingProbability</c>

        <c>398</c>

        <c>flowSamplingTimeInterval</c>

        <c>399</c>

        <c>flowSamplingTimeSpacing</c>

        <c>326</c>

        <c>digestHashValue</c>

        <c>400</c>

        <c>hashFlowDomain</c>

        <c>329</c>

        <c>hashOutputRangeMin</c>

        <c>330</c>

        <c>hashOutputRangeMax</c>

        <c>331</c>

        <c>hashSelectedRangeMin</c>

        <c>332</c>

        <c>hashSelectedRangeMax</c>

        <c>333</c>

        <c>hashDigestOutput</c>

        <c>334</c>

        <c>hashInitialiserValue</c>

        <c>320</c>

        <c>absoluteError</c>

        <c>321</c>

        <c>relativeError</c>

        <c>336</c>

        <c>upperCILimit</c>

        <c>337</c>

        <c>lowerCILimit</c>

        <c>338</c>

        <c>confidenceLevel</c>

        <c></c>

        <c></c>
      </texttable>   
<?rfc compact="yes"?>  
    </section>

    <section title="IANA Considerations">
      <section title="Registration of Information Elements">

<!--[rfced] [IANA] Nit: Please update occurrences of SelectorId to
appear as SelectorID at http://www.iana.org/assignments/ipfix for
Information Elements 390-400. -->

        <t>IANA has registered the following IEs in the "IPFIX Information
        Elements" registry at
        http://www.iana.org/assignments/ipfix/.</t>

                <section title="flowSelectorAlgorithm">
        <t>Description:<list>
        <t>This Information Element identifies the Intermediate Flow
                Selection Process technique (e.g., Filtering, Sampling) that is
                applied by the Intermediate Flow Selection Process. Most of these techniques have parameters; configuration 
                parameter(s) MUST be clearly specified.  Further Information
                Elements are needed to fully specify packet selection with these
                methods and all their parameters. Further method identifiers may be added to the list below.  It
                might be necessary to define new Information Elements to specify
                their parameters.
                The flowSelectorAlgorithm registry is maintained by IANA.  New
                assignments for the registry will be administered by IANA, on a 
                First Come First Served basis <xref target="RFC5226"/>, subject
                to Expert Review <xref target="RFC5226"/>.

                Please note that the purpose of the flow selection techniques
described in this document is the improvement of measurement functions as
defined in the Introduction (<xref target="intro"/>). Before adding new flow
selector algorithms, their intended purposes should be determined,
especially if those purposes contradict any policies defined in <xref target="RFC2804"/>. The designated
expert(s) should consult with the community if a request that runs
counter to <xref target="RFC2804"/> is received. 
                The registry can be updated when specifications of the new
                method(s) and any new Information Elements are provided.
                The group of experts must double-check the flowSelectorAlgorithm 
                definitions and Information Elements with already-defined
                flowSelectorAlgorithm definitions and Information Elements for completeness,
                accuracy, and redundancy.  Those experts will initially be drawn
                from the Working Group Chairs and document editors of the IPFIX
                and PSAMP Working Groups.
                The following identifiers for Intermediate Flow Selection
                Process Techniques are defined here:
                </t>
        </list></t>

     <figure align="center" title="Table 3: Intermediate Flow Selection Process Techniques">
          <artwork> 
+----+------------------------+--------------------------+
| ID |        Technique       |      Parameters          |
+----+------------------------+--------------------------+
| 1  | Systematic count-based | flowSamplingInterval     |
|    | Sampling               | flowSamplingSpacing      |
+----+------------------------+--------------------------+
| 2  | Systematic time-based  | flowSamplingTimeInterval |
|    | Sampling               | flowSamplingTimeSpacing  |
+----+------------------------+--------------------------+
| 3  | Random n-out-of-N      | samplingSize             |
|    | Sampling               | samplingPopulation       |
+----+------------------------+--------------------------+
| 4  | Uniform probabilistic  | samplingProbability      |
|    | Sampling               |                          |
+----+------------------------+--------------------------+
| 5  | Property Match         | Information Element      |
|    | Filtering              | Value Range              |
+----+------------------------+--------------------------+
|   Hash-based Filtering      | hashInitialiserValue     |
+----+------------------------+ hashFlowDomain           |
| 6  | using BOB              | hashSelectedRangeMin     | 
+----+------------------------+ hashSelectedRangeMax     |
| 7  | using IPSX             | hashOutputRangeMin       |
+----+------------------------+ hashOutputRangeMax       |
| 8  | using CRC              |                          |
+----+------------------------+--------------------------+
| 9  | Flow-state Dependent   |No agreed Parameters      |
|    | Intermediate Flow      |                          |
|    | Selection Process      |                          |
+----+------------------------+--------------------------+
                </artwork>
        </figure>

        <t>Abstract Data Type: unsigned16</t>

        <t>ElementId: 390</t>

        <t>Data Type Semantics: identifier</t>

        <t>Status: current</t>
                </section>

                <section title="flowSelectedOctetDeltaCount">
        <t>Description:<list>
            <t>This Information Element specifies the volume in octets of all
            Flows that are selected in the Intermediate Flow Selection Process since
            the previous report.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 391</t>

        <t>Units: octets</t>

        <t>Status: current</t>
                </section>

                <section title="flowSelectedPacketDeltaCount">
        <t>Description:<list>
            <t>This Information Element specifies the volume in packets of all
            Flows that were selected in the Intermediate Flow Selection Process since
            the previous report.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 392</t>

        <t>Units: packets</t>

        <t>Status: current</t>
                </section>

                <section title="flowSelectedFlowDeltaCount">
        <t>Description:<list>
            <t>This Information Element specifies the number of Flows that
            were selected in the Intermediate Flow Selection Process since the last
            report.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 393</t>

        <t>Units: flows</t>

        <t>Status: current</t>
                </section>

                <section title="selectorIDTotalFlowsObserved">
        <t>Description:<list>
            <t>This Information Element specifies the total number of Flows
            observed by a Selector, for a specific value of SelectorID. This
            Information Element should be used in an Options Template scoped
            to the observation to which it refers. See Section 3.4.2.1 of the
            IPFIX protocol document <xref target="RFC7011"/>.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 394</t>

        <t>Units: flows</t>

        <t>Status: current</t>
                </section>

                <section title="selectorIDTotalFlowsSelected">
        <t>Description:<list>
            <t>This Information Element specifies the total number of Flows
            selected by a Selector, for a specific value of SelectorID. This
            Information Element should be used in an Options Template scoped
            to the observation to which it refers. See Section 3.4.2.1 of the
            IPFIX protocol document <xref target="RFC7011"/>.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 395</t>

        <t>Units: flows</t>

        <t>Status: current</t>
                </section>

                <section title="samplingFlowInterval">
        <t>Description:<list>
            <t>This Information Element specifies the number of Flows that are
            consecutively sampled. A value of 100 means that 100 consecutive
            Flows are sampled. For example, this Information Element may be
            used to describe the configuration of a systematic count-based
            Sampling Selector.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 396</t>

        <t>Units: flows</t>

        <t>Status: current</t>
                </section>

                <section title="samplingFlowSpacing">
        <t>Description:<list>
            <t>This Information Element specifies the number of Flows between
            two "samplingFlowInterval"s. &nbsp;A value of 100 means that the
            next interval starts 100 Flows (which are not sampled) after the
            current "samplingFlowInterval" is over. For example, this
            Information Element may be used to describe the configuration of a
            systematic count-based Sampling Selector.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 397</t>

        <t>Units: flows</t>

        <t>Status: current</t>
                </section>

                <section title="flowSamplingTimeInterval">
        <t>Description:<list>
            <t>This Information Element specifies the time interval in
            microseconds during which all arriving Flows are sampled. For
            example, this Information Element may be used to describe the
            configuration of a systematic time-based Sampling Selector.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 398</t>

        <t>Units: microseconds</t>

        <t>Status: current</t>
                </section>

                <section title="flowSamplingTimeSpacing">
        <t>Description:<list>
            <t>This Information Element specifies the time interval in
            microseconds between two "flowSamplingTimeInterval"s. &nbsp;A value of
            100 means that the next interval starts 100 microseconds (during
            which no Flows are sampled) after the current
            "flowsamplingTimeInterval" is over. For example, this Information
            Element may be used to describe the configuration of a systematic
            time-based Sampling Selector.</t>
          </list></t>

        <t>Abstract Data Type: unsigned64</t>

        <t>ElementId: 399</t>

        <t>Units: microseconds</t>

        <t>Status: current</t>
                </section>

                <section title="hashFlowDomain">

<!--[rfced] [IANA] Please note the the value listed in the "units" column for 
hashFlowDomain at
http://www.iana.org/assignments/ipfix/ipfix.xhtml#ipfix-flowselectoralgorithm
should appear in the "Data Type Semantics" column instead.

Authors:

Please confirm that no units should be listed. -->

        <t>Description:<list>
            <t>This Information Element specifies the Information Elements
            that are used by the Hash-based Flow Selector as the
            Hash Domain.</t>
          </list></t>

        <t>Abstract Data Type: unsigned16</t>

        <t>ElementId: 400</t>

        <t>Data Type Semantics: identifier</t>

        <t>Status: Current</t>
                </section>                
     </section>

      <section title="Registration of Object Identifier">
        <t>IANA has registered the following OID in the IPFIX-SELECTOR-MIB
        Functions subregistry at http://www.iana.org/assignments/smi-numbers
        according to the procedures set forth in <xref target="RFC6615"/>.
        </t>
<?rfc compact="no"?>
        <texttable align="center" title="Table 4: Object Identifiers to Be Registered" >
          <ttcol>Decimal</ttcol>

          <ttcol>Name</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Reference</ttcol>

          <c>8</c>

          <c>flowSelectorAlgorithm</c>

          <c>This Object Identifier identifies the Intermediate Flow Selection Process technique (e.g., Filtering, Sampling) that is applied by the Intermediate Flow Selection Process</c>

          <c>[RFC7014]</c>
        </texttable>
<?rfc compact="yes"?>

      </section>
    </section>

    <section title="Security and Privacy Considerations">
      <t> Flow data exported by Exporting Processes, and collected by Collecting Processes, can be sensitive for privacy reasons and need to be protected. Privacy considerations for collected data are provided in <xref target="RFC7011"/>. 
          </t>

          <t>Some of the described Intermediate Flow Selection Process
techniques (e.g., Flow sampling, hash-based Flow Filtering) aim at the
selection of a representative subset of flows in order to estimate parameters
of the population. An adversary may have incentives to influence the selection
of flows, for example, to circumvent accounting 
          or to avoid the detection of packets that are part of an attack. 
          </t>

      <t>Security considerations concerning the choice of a hash function for Hash-based packet selection have 
          been discussed in Section 6.2.3 of <xref target="RFC5475"/> and are also appropriate for Hash-based Flow 
          Selection. <xref target="RFC5475"/> discusses the possibility of
crafting Packet Streams that are disproportionately
          selected or can be used to discover hash function parameters. It also describes vulnerabilities of different hash
          functions to these attacks and discusses practices to minimize these
vulnerabilities.</t>

      <t>For other sampling approaches, an adversary can gain knowledge about
the start and stop triggers in time-based systematic Sampling, e.g., by sending
test packets. This knowledge might allow adversaries to modify their send
schedule in such a way
          that their packets are disproportionately selected or not
selected. For random Sampling, an input to the encryption process, like the
Initialization Vector of the CBC (Cipher Block Chaining) mode, should be used
to prevent an adversary from predicting the selection decision <xref target="Dw01"/>.</t>

      <t>Further security threats can occur when Intermediate Flow Selection Process parameters are configured or communicated to other entities.
          The protocol(s) for the configuration and reporting of Intermediate Flow Selection Process parameters are out of scope for this document. 
          Nevertheless, a set of initial requirements for future configuration and reporting protocols are stated below: 
          <list style="numbers">
          <t> Protection against disclosure of configuration information:
<vspace /> Intermediate Flow Selection Process configuration information
describes the Intermediate Flow Selection Process and its parameters. This
information can be useful to attackers. Attackers may craft packets that never
fit the selection criteria in order to prevent Flows from being seen by the
Intermediate Flow Selection Process. They can also craft a lot of packets that
fit the selection criteria  and overload or bias subsequent
processes. Therefore, any transmission of configuration data (e.g., to
configure a process or to report its actual status) should be protected by
encryption.</t>

          <t> Protection against modification of configuration information:
<vspace />Sending incorrect configuration information to the Intermediate Flow
Selection Process can lead to a malfunction of the Intermediate Flow
Selection Process.  Additionally, reporting incorrect configuration information
from the Intermediate Flow Selection Process to other processes can lead to
incorrect estimations at subsequent processes. Therefore, any protocol that
transmits configuration information should prevent an attacker from modifying
configuration information. Data integrity can be achieved by authenticating the
data.</t>

          <t>Protection against malicious nodes sending configuration
information:<vspace />The remote configuration of Intermediate Flow Selection Process
techniques should be protected against access by unauthorized nodes.  This can
be achieved by access control lists at the device that hosts the Intermediate
Flow Selection Process (e.g., IPFIX Exporter, IPFIX Mediator, or IPFIX
Collector) and by source authentication. The reporting of configuration data
from an Intermediate Flow Selection Process has to be protected in the same
way. That means that protocols that report configuration data from the
Intermediate Flow Selection Process to other processes also need to protect
against unauthorized nodes reporting configuration information.</t>
        </list>
          </t>
          
          <t>The security threats that originate from communicating
configuration information to and from Intermediate Flow Selection Processes
cannot be assessed solely with the information given in this  document. A
further and more detailed assessment of security threats is necessary when a
specific protocol for the configuration or reporting configuration data is
proposed.</t>
          
    </section>

    <section title="Acknowledgments">
      <t>We would like to thank the IPFIX group, especially Brian Trammell,
      Paul Aitken, and Benoit Claise, for fruitful discussions and for
      proofreading the document.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

<!-- draft-ietf-ipfix-protocol-rfc5101bis (RFC 7011) -->
<reference anchor="RFC7011">
<front>
<title>Specification of the IP Flow Information Export (IPFIX) Protocol for the Exchange of Flow Information</title>
<author initials='B' surname='Claise' fullname='Benoit Claise' role="editor">
    <organization />
</author>
<author initials='B' surname='Trammell' fullname='Brian Trammell' role="editor">
    <organization />
</author>
<author initials='P' surname='Aitken' fullname='Paul Aitken'>
    <organization />
</author>
<date month='September' year='2013' />
</front>
<seriesInfo name='STD' value='77' />
<seriesInfo name='RFC' value='7011' />
</reference>

<!-- draft-ietf-ipfix-information-model-rfc5102bis (RFC 7012) -->
<reference anchor="RFC7012">
<front>
<title>Information Model for IP Flow Information Export (IPFIX)</title>
<author initials='B' surname='Claise' fullname='Benoit Claise' role="editor">
    <organization />
</author>
<author initials='B' surname='Trammell' fullname='Brian Trammell' role="editor">
    <organization />
</author>
<date month='September' year='2013' />
</front>
<seriesInfo name='RFC' value='7012' />
</reference>

      <?rfc include="reference.RFC.5475"?>

      <?rfc include="reference.RFC.5476"?>
          
      <?rfc include="reference.RFC.6615"?>
    </references>

    <references title="Informative References">

      <reference anchor="DuLT01">
        <front>
          <title>Charging from Sampled Network Usage</title>
          <author fullname="N.G. Duffield" initials="N.G." surname="Duffield"/>
          <author fullname="C. Lund" initials="C." surname="Lund">
            <organization/>
          </author>
          <author fullname="M. Thorup" initials="M." surname="Thorup">
            <organization/>
          </author>
          <date day="1-2" month="November" year="2001"/>
        </front>
        <seriesInfo name="ACM SIGCOMM Internet Measurement Workshop (IMW) 2001,"
            value="pages 245-256, San Francisco, CA, USA"/>
      </reference>

      <reference anchor="Bra75">
        <front>
          <title>Evaluation of 32 Degree Polynomials in Error Detection on the
          SATIN IV Autovon Error Patterns</title>
          <author fullname="Kenneth Brayer" initials="K." surname="Brayer">
            <organization/>
          </author>
          <date month="August" year="1975"/>
        </front>
        <seriesInfo name="National Technical Information" value="Service"/>
      </reference>

      <reference anchor="CoHa08">
        <front>
          <title>Finding Frequent Items in Data Streams</title>
          <author fullname="Graham Cormode" initials="G." surname="Cormode">
            <organization/>
          </author>
          <author fullname="Marios Hadjieleftheriou" initials="M."
                  surname="Hadjieleftheriou">
            <organization/>
          </author>
          <date month="August" year="2008"/>
       </front>
       <seriesInfo name="Proceedings of the 34th International Conference on Very Large DataBases (VLDB), Auckland, New Zealand,"
                   value="Volume 1, Issue 2, pages 1530-1541"/>
      </reference>

      <reference anchor="KaPS03">
        <front>
          <title>A simple algorithm for finding frequent elements in sets and bags</title>
          <author fullname=" R. Karp" initials="R." surname="Karp">
            <organization/>
          </author>
          <author fullname="C. Papadimitriou" initials="C."
                  surname="Papadimitriou">
            <organization/>
          </author>
          <author fullname="S. Shenker" initials="S." surname="Shenker">
            <organization/>
          </author>
          <date month="March" year="2003"/>
        </front>
        <seriesInfo name="ACM Transactions on Database Systems,"
                    value="Volume 28, pages 51-55"/>
      </reference>

      <reference anchor="MaMo02">
        <front>
          <title>Approximate Frequency Counts over Data Streams</title>
          <author fullname="Gurmeet Singh Manku " initials="G.S."
                  surname="Manku">
            <organization/>
          </author>
          <author fullname="Rajeev Motwani " initials="R." surname="Motwani">
            <organization/>
          </author>
          <date month="August" year="2002"/>
        </front>
        <seriesInfo name="Proceedings of the 28th International Conference on Very Large DataBases (VLDB),"
                    value="Hong Kong, China, pages 346-357"/>
      </reference>

      <reference anchor="MSZC10">
        <front>
          <title>Fast Filtered Sampling</title>
          <author fullname="Jianning Mai" initials="J." surname="Mai">
            <organization/>
          </author>
          <author fullname="Ashwin Sridharan" initials="A."
                  surname="Sridharan">
            <organization/>
          </author>
          <author fullname="Hui Zang" initials="H." surname="Zang">
            <organization/>
          </author>
          <author fullname="Chen-Nee Chuah" initials="C.-N." surname="Chuah">
            <organization/>
          </author>
          <date month="August" year="2010"/>
        </front>
        <seriesInfo name="Computer Networks"
                    value="Volume 54, Issue 11, pages 1885-1898, ISSN 1389-1286"/>
      </reference>

      <reference anchor="IANA-IPFIX"
                 target="http://www.iana.org/assignments/ipfix/">
        <front>
          <title>IP Flow Information Export (IPFIX) Entities Registry</title>
          <author><organization>IANA</organization></author>
        </front>
      </reference>

      <reference anchor="EsVa01">
        <front>
          <title>New Directions in Traffic Measurement and Accounting:
          Focusing on the Elephants, Ignoring the Mice</title>
          <author fullname="C. Estan" initials="C." surname="Estan">
            <organization/>
          </author>
          <author fullname="G. Varghese" initials="G," surname="Varghese">
            <organization/>
          </author>
          <date month="November" year="2001"/>
        </front>
        <seriesInfo name="ACM SIGCOMM Internet Measurement Workshop (IMW) 2001,"
             value="San Francisco, CA, USA"/>
      </reference>

      <reference anchor="Dw01">
        <front>
          <title>Recommendation for Block Cipher Modes of Operation - Methods and Techniques</title>
          <author fullname="M. Dworkin" initials="M." surname="Dworkin">
            <organization/>
          </author>
          <date month="December" year="2001"/>
        </front>
        <seriesInfo name="NIST Special Publication"
                value="800-38A"/>
      </reference>

      <?rfc include="reference.RFC.3917"?>

      <?rfc include="reference.RFC.5470"?>

      <?rfc include="reference.RFC.6183"?>

      <?rfc include="reference.RFC.5226"?>
          
      <?rfc include="reference.RFC.2804"?>
          
    </references>        
        </back>
</rfc>
