IP Flow Information Export WG                                   G. Muenz
Internet-Draft                                               TU Muenchen
Intended status: Standards Track                               B. Claise
Expires: September 7, 2009                           Cisco Systems, Inc.
                                                           March 6, 2009


              Configuration Data Model for IPFIX and PSAMP
               <draft-ietf-ipfix-configuration-model-02>

Status of this Memo

   This Internet-Draft is submitted to IETF in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on September 7, 2009.

Copyright Notice

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

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents in effect on the date of
   publication of this document (http://trustee.ietf.org/license-info).
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.

Abstract

   This document specifies a data model for the configuration of
   selection processes, caches, exporting processes, and collecting



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 1]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   processes of IPFIX and PSAMP compliant monitoring devices.  The
   configuration data is encoded in Extensible Markup Language (XML).
   The structure of the data model is specified in a YANG module to
   ensure compatibility with the NETCONF protocol.















































Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 2]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


Table of Contents

   1.  Open Issues  . . . . . . . . . . . . . . . . . . . . . . . . .  5

   2.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  5
     2.1.  IPFIX Documents Overview . . . . . . . . . . . . . . . . .  6
     2.2.  PSAMP Documents Overview . . . . . . . . . . . . . . . . .  6

   3.  Terminology  . . . . . . . . . . . . . . . . . . . . . . . . .  6

   4.  Structure of the Configuration Data Model  . . . . . . . . . .  8
     4.1.  UML Representation . . . . . . . . . . . . . . . . . . . . 10
     4.2.  Exporter Configuration . . . . . . . . . . . . . . . . . . 12
     4.3.  Collector Configuration  . . . . . . . . . . . . . . . . . 14

   5.  Configuration Parameters . . . . . . . . . . . . . . . . . . . 15
     5.1.  ObservationPoint Class . . . . . . . . . . . . . . . . . . 15
     5.2.  SelectionProcess Class . . . . . . . . . . . . . . . . . . 16
       5.2.1.  Selector Class . . . . . . . . . . . . . . . . . . . . 17
       5.2.2.  Sampler Classes  . . . . . . . . . . . . . . . . . . . 18
       5.2.3.  Filter Classes . . . . . . . . . . . . . . . . . . . . 18
     5.3.  Cache Class  . . . . . . . . . . . . . . . . . . . . . . . 19
       5.3.1.  CacheLayout Class  . . . . . . . . . . . . . . . . . . 20
     5.4.  ExportingProcess Class . . . . . . . . . . . . . . . . . . 21
       5.4.1.  Destination Class  . . . . . . . . . . . . . . . . . . 22
       5.4.2.  FileWriter Class . . . . . . . . . . . . . . . . . . . 24
       5.4.3.  Options Class  . . . . . . . . . . . . . . . . . . . . 24
       5.4.4.  OptionsTemplate Class  . . . . . . . . . . . . . . . . 26
     5.5.  CollectingProcess Class  . . . . . . . . . . . . . . . . . 26
       5.5.1.  Receiver Class . . . . . . . . . . . . . . . . . . . . 27
       5.5.2.  FileReader Class . . . . . . . . . . . . . . . . . . . 28
     5.6.  Template Class . . . . . . . . . . . . . . . . . . . . . . 28
     5.7.  Transport Session Class  . . . . . . . . . . . . . . . . . 29

   6.  Adaptation to Device Capabilities  . . . . . . . . . . . . . . 29

   7.  YANG Module of the IPFIX/PSAMP Configuration Data Model  . . . 31

   8.  Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
     8.1.  PSAMP Device . . . . . . . . . . . . . . . . . . . . . . . 54
     8.2.  IPFIX Device . . . . . . . . . . . . . . . . . . . . . . . 56
     8.3.  Export of Flow Records and Packet Reports  . . . . . . . . 59
     8.4.  Collector and File Writer  . . . . . . . . . . . . . . . . 63
     8.5.  Deviations . . . . . . . . . . . . . . . . . . . . . . . . 63

   9.  Security Considerations  . . . . . . . . . . . . . . . . . . . 64

   10. IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 64



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 3]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   Appendix A.  Acknowledgements  . . . . . . . . . . . . . . . . . . 64

   11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 65
     11.1. Normative References . . . . . . . . . . . . . . . . . . . 65
     11.2. Informative References . . . . . . . . . . . . . . . . . . 66

   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 67












































Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 4]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


1.  Open Issues

   Depending on the future of [I-D.ietf-psamp-mib], references to this
   document have to be replaced by references to
   [I-D.ietf-psamp-protocol], [I-D.ietf-psamp-info], and
   [I-D.ietf-psamp-sample-tech].


2.  Introduction

   IPFIX and PSAMP compliant monitoring devices (routers, switches,
   monitoring probes, Collectors etc.) offer various configuration
   possibilities that allow adapting network monitoring to the goals and
   purposes of the application, such as accounting and charging, traffic
   analysis, performance monitoring, security monitoring.  The use of a
   common vendor-independent configuration data model for IPFIX and
   PSAMP compliant monitoring devices facilitates network management and
   configuration, especially if monitoring devices of different
   implementers and/or manufacturers are deployed simultaneously.  On
   the one hand, a vendor-independent configuration data model helps
   storing and managing the configuration data of monitoring devices in
   a consistent format.  On the other hand, it can be used for local and
   remote configuration of monitoring devices.  However, this requires
   that monitoring devices natively support the configuration data
   model, or that a mapping between the configuration data model and the
   device-specific representation of configuration data is provided.

   The purpose of this document is the specification of a vendor-
   independent configuration data model that covers the commonly
   available configuration parameters of selection processes, caches,
   exporting processes, and collecting processes.  The configuration
   data is encoded in Extensible Markup Language (XML)
   [W3C.REC-xml-20040204].  An XML document conforming to the
   configuration data model contains the configuration data of one
   monitoring device.  In order to ensure compatibility with the NETCONF
   protocol [RFC4741], YANG [I-D.ietf-netmod-yang] is used as the
   modeling language.  If required, the YANG specification of the
   configuration data model can be converted into XML Schema language
   [W3C.REC-xmlschema-0-20041028] using the pyang tool [YANG-WEB].  YANG
   provides mechanisms to adapt the configuration data model to device-
   specific constraints and to augment the model with additional device-
   specific or vendor-specific parameters.

   For the configuration of remote monitoring devices, an appropriate
   protocol is needed to transfer the XML encoded configuration data.
   The configuration data model is compatible with the NETCONF protocol
   [RFC4741].  However, alternative protocols, such as the Simple Object
   Access Protocol (SOAP) [W3C.REC-soap12-part1-20070427], are also



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 5]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   suitable for transferring XML data from a network management system
   to a monitoring device.

   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].

2.1.  IPFIX Documents Overview

   The IPFIX protocol [RFC5101] provides network administrators with
   access to IP flow information.  The architecture for the export of
   measured IP flow information out of an IPFIX exporting process to a
   collecting process is defined in [I-D.ietf-ipfix-architecture], per
   the requirements defined in [RFC3917].  The IPFIX protocol [RFC5101]
   specifies how IPFIX data records and templates are carried via a
   number of transport protocols from IPFIX exporting processes to IPFIX
   collecting process.  IPFIX has a formal description of IPFIX
   information elements, their name, type and additional semantic
   information, as specified in [RFC5102].  [I-D.ietf-ipfix-mib]
   specifies the IPFIX Management Information Base.  Finally,
   [I-D.ietf-ipfix-as] describes what type of applications can use the
   IPFIX protocol and how they can use the information provided.  It
   furthermore shows how the IPFIX framework relates to other
   architectures and frameworks.  The storage of IPFIX messages in a
   file is specified in [I-D.ietf-ipfix-file].

2.2.  PSAMP Documents Overview

   The framework for packet selection and reporting
   [I-D.ietf-psamp-framework] enables network elements to select subsets
   of packets by statistical and other methods, and to export a stream
   of reports on the selected packets to a collector.  The set of packet
   selection techniques (Sampling, Filtering, and hashing) standardized
   by PSAMP are described in [I-D.ietf-psamp-sample-tech].  The PSAMP
   protocol [I-D.ietf-psamp-protocol] specifies the export of packet
   information from a PSAMP exporting process to a PSAMP collector.
   Instead of exporting PSAMP packet reports, the stream of selected
   packets may also serve as input to the generation of IPFIX flow
   records.  Like IPFIX, PSAMP has a formal description of its
   information elements, their name, type and additional semantic
   information.  The PSAMP information model is defined in
   [I-D.ietf-psamp-info].  [I-D.ietf-psamp-mib] describes the PSAMP
   Management Information Base.


3.  Terminology

   This document adopts the terminologies used in [RFC5101],



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 6]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   [I-D.ietf-ipfix-file], and [I-D.ietf-psamp-protocol].  As in these
   documents, all specific terms have the first letter of a word
   capitalized when used in the remainder of this document.  The
   following listing indicates in which references the definitions of
   those terms that are commonly used throughout this document can be
   found:

   o  Definitions adopted from [RFC5101]:
      *  Collection Process
      *  Collector
      *  Data Record
      *  Exporter
      *  Flow Record
      *  Information Element
      *  IPFIX Device
      *  IPFIX Message
      *  Observation Domain
      *  Observation Point
      *  (Options) Template
   o  Definitions adopted from [I-D.ietf-ipfix-file]:
      *  File Reader
      *  File Writer
   o  Definitions adopted from [I-D.ietf-psamp-protocol]:
      *  Filtering
      *  Observed Packet Stream
      *  Packet Report
      *  PSAMP Device
      *  Sampling
      *  Selection Process
      *  Selection Sequence
      *  Selector, Primitive Selector, Composite Selector

   The terms Metering Process and Exporting Process have different
   definitions in [RFC5101] and [I-D.ietf-psamp-protocol].  In the scope
   of this document, these terms are used according to the following
   definitions which cover the deployment in both PSAMP Devices and
   IPFIX Devices:

   Metering Process:  The Metering Process generates IPFIX Flow Records
      or PSAMP Packet Reports, depending on its deployment as part of an
      IPFIX Device or PSAMP Device.  Inputs to the process are packets
      observed at an Observation Point as well as characteristics
      describing the packet treatment at the Observation Point.  The
      function of the Metering Process is split into two types of
      functional blocks: Selection Processes and Caches.






Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 7]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   Exporting Process:  Depending on its deployment as part of an IPFIX
      Device or PSAMP Device, the Exporting Process sends IPFIX Flow
      Records or PSAMP Packet Reports to one or more Collecting
      Processes.  The IPFIX Flow Records or PSAMP Packet Reports are
      generated by one or more Metering Processes.

   In addition to the existing IPFIX and PSAMP terminology, the
   following terms are defined:

   Cache:  The Cache is a functional block in a Metering Process which
      maintains IPFIX Flow Records or PSAMP Packet Reports.  According
      to [RFC5101], the maintenance of Flow Records may include creating
      new records, updating existing ones, computing Flow statistics,
      deriving further Flow properties, detecting Flow expiration,
      passing Flow Records to the Exporting Process, and deleting Flow
      Records.  The maintenance of Packet Reports covers the same set of
      functions.
   Cache Layout:  The Cache Layout defines the superset of fields that
      are included in the Packet Reports or Flow Records maintained by
      the Cache.  The fields are specified by the corresponding
      Information Elements.  In general, the largest possible subset of
      the specified fields is derived for every Packet Report or Flow
      Record.  More specific rules about which fields must be included
      are given in Section 5.3.1.
   Cache Type:  The Cache Type specifies whether Packet Reports or Flow
      Records are generated by the Cache.  In the case of Flow Records,
      it also specifies the Flow expiration policy.
   Monitoring Device:  A Monitoring Device implements at least one of
      the functional blocks specified in the context of IPFIX or PSAMP.
      In particular, the term Monitoring Device encompasses Exporters,
      Collectors, IPFIX Devices, and PSAMP Devices.


4.  Structure of the Configuration Data Model

   The IPFIX reference model in [I-D.ietf-ipfix-architecture] describes
   Metering Processes, Exporting Processes, and Collecting Processes as
   functional blocks of IPFIX Devices.  The PSAMP framework
   [I-D.ietf-psamp-framework] provides the corresponding information for
   PSAMP Devices and introduces Selection Processes as functional blocks
   within Metering Processes.  In Section 3 of the document, the Cache
   is defined as another functional block within Metering Processes.
   Further explanations about the relationship between Selection
   Processes and Caches are given later on in this section.  IPFIX File
   Reader and File Writer are defined as specific kinds of Exporting and
   Collecting Processes in [I-D.ietf-ipfix-file].

   Monitoring Device implementations usually maintain the separation of



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 8]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   various functional blocks although they do not necessarily implement
   all of them.  Furthermore, they provide various configuration
   possibilities; some of them are specified as mandatory by the IPFIX
   protocol [RFC5101] or PSAMP protocol [I-D.ietf-psamp-protocol].  The
   configuration data model enables the setting of commonly available
   configuration parameters for Selection Processes, Caches, Exporting
   Processes, and Collecting Processes.  In addition, it allows
   specifying the composition of functional blocks within a Monitoring
   Device configuration and their linkage with Observation Points.

   In a Monitoring Device implementation, the functionality of the
   Metering Process is commonly split into packet Sampling and Filtering
   functions performed by Selection Processes, and the maintenance of
   Flow Records and Packet Reports performed by Caches.  Figure 1
   illustrates this separation with the example of a basic Metering
   Process consisting of one Selection Process and one Cache.

               +-----------------------------------+
               | Metering Process                  |
               | +-----------+ Stream of           |
      Observed | | Selection | selected  +-------+ |  Stream of
      Packet  -->| Process   |---------->| Cache |--> Flow Records or
      Stream   | +-----------+ packets   +-------+ |  Packet Reports
               +-----------------------------------+

     Figure 1: Selection Process and Cache forming a Metering Process

   The configuration data model adopts the separation of Selection
   Processes and Caches in order to support the flexible configuration
   and combination of these functional blocks.  As defined in
   [I-D.ietf-psamp-protocol], the Selection Process takes the Observed
   Packet Stream as its input and selects a subset of that stream as its
   output.  The action of the Selection Process on a single packet of
   its input is defined by a Primitive Selector or a Composite Selector.
   The Cache generates Flow Records or Packet Reports from the stream of
   selected packets, depending on the configured Cache Type.

   Beyond the basic Metering Process shown in Figure 1, the
   configuration data model enables the specification of more complex
   configurations.  A single Cache may process the output of multiple
   Selection Processes.  The stream of selected packets may be copied to
   enter several Caches, for example one Cache that generates Flow
   Records and another Cache that generates Packet Reports.  The stream
   of selected packets may also be passed to another Selection Process,
   which can be useful in specific contexts such as the example in
   Section 8.3.

   The selection of parameters in the configuration data model is based



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt     [Page 9]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   on configuration issues discussed in the IPFIX and PSAMP documents
   [RFC3917], [RFC5101], [I-D.ietf-ipfix-architecture],
   [I-D.ietf-psamp-protocol], [I-D.ietf-psamp-framework], and
   [I-D.ietf-psamp-sample-tech].  Furthermore, the structure and content
   of the IPFIX MIB module [I-D.ietf-ipfix-mib] and the PSAMP MIB module
   [I-D.ietf-psamp-mib] have been taken into consideration.  Consistency
   between the configuration data model and the IPFIX and PSAMP MIB
   modules is an intended goal.  Therefore, parameters in the
   configuration data model are named according to corresponding managed
   objects.  Certain IPFIX MIB objects containing state data have been
   adopted as state parameters in the configuration data model.  State
   parameters cannot be configured, yet their values can be queried from
   the Monitoring Device.

   The next section explains how UML class diagrams are deployed to
   illustrate the structure of the configuration data model.
   Thereafter, Section 4.2 and Section 4.3 explain the class diagrams
   for the configuration of Exporters and Collectors, respectively.
   Each of the presented classes contains specific configuration
   parameters which are specified in Section 5.  The formal definition
   of the configuration data model in YANG is given in Section 7.
   Section 8 illustrates the usage of the model with example
   configurations in XML.  Section 6 gives a short introduction to YANG
   concepts that allow adapting the configuration data model to the
   capabilities of a device.

4.1.  UML Representation

   We use Unified Modeling Language (UML) class diagrams [UML] to
   explain the structure of the configuration data model.  Each class
   contains a set of related parameters.  For example, the Selector
   class (see Section 5.2.1) contains the configuration parameters of a
   Selector.  If some parameters within a class belong together, it can
   make sense to group these parameters in a subclass.  This is
   especially useful if different subclasses represent choices of
   different parameter sets, or if the parameters of a subclass may
   appear multiple times.  For example, the Selector class contains the
   parameters of one of the subclasses SelectAll, SampCountBased,
   SampTimeBased,sampRandOutOfN, SampUniProb, SampNonUniProb,
   SampFlowState, FilterMatch, FilterHash, and FilterRState.  As another
   example, the OptionsTemplate class may contain multiple times the
   parameters of the OptionsField subclass (see Section 5.4.4).

   Classes define the structure of the objects of a specific
   configuration.  In the corresponding XML document, every object is
   encoded as an XML element.  So, one object of the Selector class
   corresponds to one occurrence of




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 10]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


     <selector>
       ...
     </selector>

   in the XML document.

   There are various possibilities how objects of classes can be related
   to each other.  In the scope of this document, we use two different
   types of relationship between objects: aggregation and unidirectional
   association.  In UML class diagrams, two different arrow types are
   used as shown in Figure 2.

            +---+   0..* +---+         +---+ 0..*  1 +---+
            | A |<>------| B |         | A |-------->| B |
            +---+        +---+         +---+         +---+
             (a) Aggregation     (b) Unidirectional association

            Figure 2: Class relationships in UML class diagrams

   Aggregation means that one object is part of the other object.  In
   Figure 2 (a), an object of class B is part of an object of class A.
   In the XML document, this corresponds to nested XML elements:

     <a>
       <b>
         ...
       </b>
       ...
     </a>

   Note that we write class names starting with a capital letter
   throughout this document.  The corresponding XML elements use
   identical names starting with an uncapitalized letter because they
   represent objects, not classes.

   A unidirectional association is a reference to an object.  In
   Figure 2 (b), an object of class A contains a reference to an object
   of class B. In the XML document, this corresponds to separate XML
   elements that are not nested.

   The indicated numbers define the multiplicity:

      "1": one only
      "0..*": zero or more
      "1..*": one or more

   In the case of aggregation, the multiplicity indicates how many
   objects of one class may be included in one object of the other



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 11]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   class.  In Figure 2 (a), an object of class A may contain an
   arbitrary number of objects of class B. In the case of unidirectional
   association, the multiplicity at the arrowhead specifies the number
   of objects of a given class that may be referred to.  The
   multiplicity at the arrowtail specifies how many different objects of
   one class may refer to a single object of the other class.  In
   Figure 2 (b), an object of class A refers to single object of class
   B. One object of class B can be referred to from an arbitrary number
   of objects of class A.

   In UML class diagrams, all classes that occur with multiplicity
   greater than one in an aggregation relationship, and all classes that
   are referenced in associations MUST have a key which allows
   distinguishing different objects of the class.  This key MUST be
   unique within the given scope.  Regarding Figure 2 (a), all objects
   of class B belonging to the same object of class A must have a key;
   the scope is local to the given object of class A. In Figure 2 (b),
   all objects of class B must have a unique key as they can be
   referenced by multiple objects of class A (i.e., the scope is
   global).

   In YANG, there exists a corresponding rule which mandates the
   existence of a key for all elements which appear in lists
   [I-D.ietf-netmod-yang] of configuration data.  In the configuration
   data model, the key is a string parameter called "name" in all
   concerned classes, corresponding to XML elements <name> in the XML
   document.

   The configuration data model for IPFIX and PSAMP makes use of
   unidirectional associations to specify the data flow between
   different functional blocks.  For example, if the output of a
   Selection Process is processed by a Cache, this corresponds to an
   object of the SelectionProcess class that contains a reference to an
   object of the Cache class.  The configuration data model does not
   mandate that such a reference exists for every functional block that
   has an output.  If such a reference is absent, the output is dropped
   without any further processing.  The motivation for allowing such
   incomplete configurations is that stand-by processes can be
   specified.

4.2.  Exporter Configuration

   Figure 3 below shows the main classes of the configuration data model
   which are involved in the configuration of an IPFIX or PSAMP
   Exporter.  The role of the classes can be briefly summarized as
   follows:





Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 12]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   o  The ObservationPoint class specifies an Observation Point (i.e.,
      an interface or linecard) of the Monitoring Device at which
      packets are captured for traffic measurements.  An object of the
      ObservationPoint class may be associated with one or more objects
      of the SelectionProcess class configuring Selection Processes that
      process the observed packets in parallel.  As long as an
      ObservationPoint object is specified without any references to
      SelectionProcess objects, the Observation Point is not deployed
      for traffic measurements.
   o  The SelectionProcess class contains the configuration parameters
      of a Selection Process.  The Selection Process may be composed of
      a single Selector or a sequence of Selectors, defining a Primitive
      or Composite Selector, respectively.
      Since the output of a Selection Process MAY be processed by
      further Selection Processes, the SelectionProcess class allows
      references to itself.  To configure two Selection Processes in a
      sequence, the SelectionProcess object defining the first Selection
      Process refers to the object of the second Selection Process.  A
      configuration example is given later in Section 8.3.  A Selection
      Process MAY pass the stream of selected packets to one or multiple
      Caches.  Therefore, the SelectionProcess class enables references
      to objects of the Cache class.
      A Selection Process MAY be configured without any reference to
      Selection Processes or Caches that receive the selected packets,
      which is useful for the configuration of standby processes.  In
      this case, the selected packets are not accounted in any Packet
      Report or Flow Record.
      A SelectionProcess object MAY be referred to from multiple
      ObservationPoint and SelectionProcess objects.
   o  The Cache class contains configuration parameters of a Cache.  A
      Cache may receive the output of one or more Selection Processes
      and maintains corresponding Packet Reports or Flow Records.
      Therefore, an object of the Cache class MAY be referred to from
      multiple SelectionProcess objects.
      Configuration parameters of the Cache class specify the size of
      the Cache, the Cache Type and Layout, and expiration parameters.
      The Cache Type determines if Packet Reports or Flow Records are
      generated.
      A Cache MAY pass its output to one or multiple Exporting Process.
      Therefore, the Cache class enables references to one or multiple
      objects of the ExportingProcess class.  A Cache object without any
      reference to an ExportingProcess object represents a standby
      Cache.  In this case, the Cache output is dropped.
   o  The ExportingProcess class contains configuration parameters of an
      Exporting Process.  It includes various transport protocol
      specific parameters and the export destinations.  An object of the
      ExportingProcess class MAY be referred to from multiple objects of
      the Cache class.



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 13]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


      An Exporting Process MAY be configured as a File Writer according
      to [I-D.ietf-ipfix-file].

                        +------------------+
                        | ObservationPoint |
                        +------------------+
                             0..* |
                                  |
                             0..* V
                        +------------------+
                        | SelectionProcess |
                        +------------------+<-+
                             0..* |  0..* |   | 0..*
                                  |       +---+
                             0..* V
                        +------------------+
                        | Cache            |
                        +------------------+
                             0..* |
                                  |
                             0..* V
                        +------------------+
                        | ExportingProcess |
                        +------------------+

             Figure 3: Class diagram of Exporter configuration

4.3.  Collector Configuration

   Figure 4 below shows the main classes of the configuration data model
   which are involved in the configuration of a Collector.  An object of
   the CollectingProcess class specifies the local IP addresses,
   transport protocols and port numbers of a Collecting Process.
   Alternatively, the Collecting Process MAY be configured as a File
   Reader according to [I-D.ietf-ipfix-file].

   An object of the CollectingProcess class may refer to one or multiple
   ExportingProcess objects configuring Exporting Processes that
   reexport the received data.  As an example, an Exporting Process can
   be configured as a File Writer in order to save the received IPFIX
   Messages in a file.

           +-------------------+ 0..*  0..* +------------------+
           | CollectingProcess |----------->| ExportingProcess |
           +-------------------+            +------------------+

            Figure 4: Class diagram of Collector configuration




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 14]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


5.  Configuration Parameters

   This section specifies the configuration and state parameters of the
   configuration data model separately for each class.  Parameters
   serving as keys are depicted in brackets.

5.1.  ObservationPoint Class

        +---------------------+
        | ObservationPoint    |
        +---------------------+          1 +--------------------+
        | [name]              |<>----------| Interface/Linecard |
        | observationPointId  |            +--------------------+
        | observationDomainId |
        |                     | 0..*  0..* +--------------------+
        |                     |----------->| SelectionProcess   |
        +---------------------+            +--------------------+

        +------------------+   +----------------------------------+
        | Interface        |   | Linecard                         |
        +------------------+   +----------------------------------+
        | ifIndex/ifName   |   | entPhysicalIndex/entPhysicalName |
        | direction        |   | direction                        |
        +------------------+   +----------------------------------+

                     Figure 5: ObservationPoint class

   Figure 5 shows the ObservationPoint class that identifies an
   Observation Point of the Monitoring Device.  The Observation Point
   can either be an interface or a linecard.

   An object of the ObservationPoint class MUST specify the ID of the
   Observation Domain the Observation Point belongs to.  Observation
   Points that are configured with the same Observation Domain ID belong
   to the same Observation Domain.  The configuration of the Observation
   Point ID (i.e., the value of the Information Element
   observationPointId [RFC5102]) is OPTIONAL.  If this parameter is
   missing in the configuration data, it is set by the Monitoring
   Device.

   The configuration parameters to identify an interface or a linecard
   are as follows:

   ifIndex/ifName (interface only):  Either the index or name of the
      interface MUST be specified according to corresponding objects in
      the IF-MIB [RFC2863].





Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 15]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   entPhysicalIndex/entPhysicalName (linecard only):  Either the index
      or name of the linecard MUST be specified according to
      corresponding objects in the ENTITY-MIB [RFC4133].
   direction:  This parameter specifies if ingress traffic, egress
      traffic, or both ingress and egress traffic is captured.  If not
      configured, ingress and egress traffic is captured.  If not
      applicable (e.g., in the case of a sniffing interface in
      promiscuous mode), the value of this parameter is ignored.

   An ObservationPoint object MAY refer to one or multiple
   SelectionProcess objects configuring Selection Processes that process
   the observed packets in parallel.

5.2.  SelectionProcess Class

              +---------------------+
              | SelectionProcess    |
              +---------------------+       1..* +----------+
              | [name]              |<>----------| Selector |
              | selectionSequenceId |            +----------+
              |                     | 0..*
              |                     |<---+
              |                     |    |
              |                     |----+
              |                     | 0..*
              |                     |
              |                     | 0..*  0..* +----------+
              |                     |----------->| Cache    |
              +---------------------+            +----------+

                     Figure 6: SelectionProcess class

   Figure 6 shows the SelectionProcess class.  The SelectionProcess
   class contains the configuration parameters of a Selection Process
   which selects packets from the Observed Packet Stream at its input
   and outputs the selected packets to one or multiple other Selection
   Processes or Caches.  A non-empty ordered list defines a sequence of
   Selectors.  The actions defined by the Selectors are applied to the
   stream of incoming packet in the specified order.

   The parameter selectionSequenceId configures the Selection Sequence
   ID (i.e., the value of the Information Element selectionSequenceId
   [I-D.ietf-psamp-info]).  If not configured, the Selection Sequence ID
   is assigned by the Monitoring Device.  In both cases, the Selection
   Sequence ID MUST be unique within the Observation Domain as required
   by [I-D.ietf-psamp-info].

   The output of one Selection Process MAY be processed by other



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 16]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   Selection Processes.  Therefore, the SelectionProcess class allows
   references to itself, meaning that one SelectionProcess object MAY
   refer to other SelectionProcess objects.

   A SelectionProcess object MAY include references to one or more
   objects of the Cache class configuring Caches that receive the
   selected packets and generate corresponding Packet Reports or Flow
   Records.

5.2.1.  Selector Class

               +-----------------+
               | Selector        |
               +-----------------+      1 +-----------------+
               | [name]          |<>------+ SelectAll/      |
               | selectorId      |        | SampCountBased/ |
               | packetsObserved |        | SampTimeBased/  |
               | packetsDropped  |        | SampRandOutOfN/ |
               |                 |        | SampUniProb/    |
               |                 |        | SampNonUniProb/ |
               |                 |        | SampFlowState/  |
               |                 |        | FilterMatch/    |
               |                 |        | FilterHash/     |
               |                 |        | FilterRState    |
               +-----------------+        +-----------------+

                         Figure 7: Selector class

   The Selector class in Figure 7 contains the configuration and state
   parameters of a Selector.  Standardized PSAMP Sampling and Filtering
   methods are described in [I-D.ietf-psamp-sample-tech]; their
   configuration parameters are specified in corresponding sampler
   (SampCountBased, SampTimeBased, SampRandOutOfN, SampUniProb,
   SampNonUniProb, SampFlowState) or filter (FilterMatch, FilterHash,
   FilterRState) classes.  In addition, the SelectAll class, which has
   no parameters, is used for a Selector that selects all packets.  The
   Selector class includes exactly one of these sampler and filter
   classes, depending on the applied method.

   The parameter selectorId configures the Selector ID (i.e., the value
   of the Information Element selectorId [I-D.ietf-psamp-info]).  If not
   configured, the Selector ID is assigned by the Monitoring Device.
   The Selector ID MUST be unique within the Observation Domain as
   required by [I-D.ietf-psamp-info].

   As state parameters, the Selector class contains the Selector
   statistics packetsObserved and packetsDropped that correspond to the
   objects of the ipfixSelectorStatsTable in the IPFIX MIB module



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 17]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   [I-D.ietf-ipfix-mib].

5.2.2.  Sampler Classes

        +----------------+   +----------------+   +----------------+
        | SampCountBased |   | SampTimeBased  |   | SampRandOutOfN |
        +----------------+   +----------------+   +----------------+
        | interval       |   | interval       |   | population     |
        | spacing        |   | spacing        |   | sample         |
        +----------------+   +----------------+   +----------------+

        +----------------+   +----------------+   +----------------+
        | SampUniProb    |   | SampNonUniProb |   | SampFlowState  |
        +----------------+   +----------------+   +----------------+
        | probability    |   | function       |   | func           |
        |                |   | funcParam      |   | funcParam      |
        +----------------+   +----------------+   +----------------+

                         Figure 8: Sampler classes

   The Sampler classes in Figure 8 contain the configuration parameters
   of specific Sampling algorithms.  The names and semantics of the
   parameters correspond to the managed objects in the PSAMP MIB module
   [I-D.ietf-psamp-mib].

5.2.3.  Filter Classes

       +------------------+   +----------------+   +----------------+
       | FilterMatch      |   | FilterHash     |   | FilterRState   |
       +------------------+   +----------------+   +----------------+
       | ieId/ieName      |   | addrType       |   | function       |
       | enterpriseNumber |   | headerBits     |   | negate         |
       | startValue       |   | payloadBytes   |   | ifIndex        |
       | stopValue        |   | payloadBits    |   | startAS        |
       | mask             |   | function       |   | stopAS         |
       |                  |   | inputBits      |   | vendorFunc     |
       |                  |   | outputBits     |   |                |
       |                  |   | outputMask     |   |                |
       |                  |   | selection      |   |                |
       +------------------+   +----------------+   +----------------+

                         Figure 9: Filter classes

   The Filter classes in Figure 9 contain the configuration parameters
   of specific Filtering methods.  The names and semantics of the
   parameters correspond to the managed objects in the PSAMP MIB module
   [I-D.ietf-psamp-mib].  In the case of the FilterMatch class, the
   configuration data model deviates from the PSAMP MIB module allowing



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 18]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   the specification of a field by either ID or name of the Information
   Element.  An enterprise number MAY be specified to define an
   enterprise-specific Information Element.

5.3.  Cache Class

            +-----------------+
            | Cache           |
            +-----------------+          1 +-------------+
            | [name]          |<>----------| CacheLayout |
            | cacheType       |            +-------------+
            | maxRecords      |
            | activeTimeout   | 0..*  0..* +------------------+
            | inactiveTimeout |----------->| ExportingProcess |
            | activeFlows     |            +------------------+
            | inactiveFlows   |
            | dataRecords     |
            +-----------------+

                          Figure 10: Cache class

   Figure 10 shows the Cache class that contains the configuration and
   state parameters of a Cache.  The configuration parameters of the
   Cache class are as follows:

   cacheType:  Configures the Cache Type.  The value of this parameter
      MUST be one of the following:
      *  immediate: Data Records expire after the first packet
      *  timeout: Data Records expire after active or inactive timeout
      *  permanent: Data Records never expire, but are periodically
         exported with interval set by the active timeout
      In the case of "immediate", PSAMP Packet Reports are generated.
      Otherwise, IPFIX Flow Records are generated.
   maxRecords:  Maximum number of Data Records in the Cache.
   activeTimeout:  Timeout in seconds after which an active Flow is
      timed out anyway even if there is still a continuous flow of
      packets.  If not configured, the Monitoring Devices sets this
      parameter.
   inactiveTimeout:  A Flow is considered to be timed out if no packets
      belonging to the Flow have been observed for the amount of time
      specified by this parameter.  The unit is seconds.  If not
      configured, the Monitoring Devices sets this parameter.

   The parameters activeTimeout and inactiveTimeout MUST NOT be
   specified if the Cache Type is "immediate".  The parameter
   inactiveTimeout MUST NOT be specified if the Cache Type is
   "permanent".




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 19]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   An object of the Cache class includes an object of the CacheLayout
   class that defines which fields are included in the Packet Reports or
   Flow Records.  A Cache object MAY refer to one or multiple
   ExportingProcess objects configuring different Exporting Processes.

   As state parameters, the Cache class contains the Metering Process
   statistics activeFlows, inactiveFlows, and dataRecords that
   correspond to the objects of the ipfixMeteringProcessStatsTable of
   the IPFIX MIB module [I-D.ietf-ipfix-mib].

5.3.1.  CacheLayout Class

                +--------------+
                | CacheLayout  |
                +--------------+   1..* +------------------+
                |              |<>------| CacheField       |
                |              |        +------------------+
                |              |        | [name]           |
                |              |        | ieId/ieName      |
                |              |        | ieLength         |
                |              |        | enterpriseNumber |
                |              |        | isFlowKey        |
                +--------------+        +------------------+

                       Figure 11: CacheLayout class

   A Cache generates and maintains Packet Reports or Flow Records
   containing information that has been extracted from the incoming
   stream of packets.  Using the CacheField class, the CacheLayout class
   specifies the superset of fields that are included in the Packet
   Reports or Flow Records (see Figure 11).

   If Packet Reports are generated (i.e., if Cache Type is "immediate"),
   every field specified by the Cache Layout MUST be included in the
   resulting Packet Report unless the corresponding Information Element
   is not applicable or cannot be derived from the content or treatment
   of the incoming packet.

   If Flow Records are generated (i.e., if Cache Type is "timeout" or
   "permanent"), every Flow Key field specified by the Cache Layout MUST
   be included as Flow Key in the resulting Flow Record unless the
   corresponding Information Element is not applicable or cannot be
   derived from the content or treatment of the incoming packet.  Two
   packets MUST be accounted by different Flow Records if different
   subsets of the Flow Key fields are applicable or derivable.  Every
   non-key field specified by the Cache Layout MUST be included in the
   resulting Flow Record unless the corresponding Information Element is
   not applicable or cannot be derived for the given Flow.



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 20]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   For example, if a non-key field specifies an Information Element
   whose value is determined by the first packet observed within a Flow
   (which is the default rule according to [RFC5102]), this field MUST
   be included in the resulting Flow Record if it can be determined from
   the first packet of the Flow.

   The CacheLayout class does not have any parameters.  The
   configuration parameters of the CacheField class are as follows:

   ieId, ieName, ieLength, enterpriseNumber:  These parameters specify a
      field by the combination of the Information Element identifier or
      name, the Information Element length, and the Information Element
      enterprise number.  Either ieId or ieName MUST be specified.
      ieLength MAY be omitted if a default length exists for the
      specified Information Element.  If ieLength is set to 65535, the
      field is exported as variable-length Information Element.
      enterpriseNumber is only used for enterprise-specific Information
      Elements.
   isFlowKey:  If present, this field is a Flow Key.

5.4.  ExportingProcess Class

             +--------------------+
             | ExportingProcess   |
             +--------------------+   0..* +------------------+
             | [name]             |<>------| Destination      |
             | exportingProcessId |        +------------------+
             |                    |
             |                    |   0..* +------------------+
             |                    |<>------| FileWriter       |
             |                    |        +------------------+
             |                    |
             |                    |   0..* +------------------+
             |                    |<>------| Options          |
             |                    |        +------------------+
             |                    |
             |                    |   0..* +------------------+
             |                    |<>------| Template         |
             |                    |        +------------------+
             |                    |
             |                    |   0..* +------------------+
             |                    |<>------| TransportSession |
             +--------------------+        +------------------+

                     Figure 12: ExportingProcess class

   The ExportingProcess class in Figure 12 specifies export destinations
   and files to which the IPFIX Messages are exported using objects of



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 21]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   the Destination class and the FileWriter, respectively.  These two
   classes are described in Section 5.4.1 and Section 5.4.2.  The
   parameter exportingProcessId configures the Exporting Process ID
   (i.e., the value of the Information Element exportingProcessId
   [RFC5102]).  If not configured, the Exporting Process ID is assigned
   by the Monitoring Device.  The reporting of specific information with
   Options Templates is defined with objects of the Options class.

   As state parameters, the ExportingProcess class contains the list of
   Templates the Exporting Process is using and the list of Transport
   Sessions that originate from the Exporting Process.  The Template
   class and TransportSession class are specified in Section 5.6 and
   Section 5.7, respectively.

5.4.1.  Destination Class

                   +------------------------------------+
                   | Destination                        |
                   +------------------------------------+
                   | [name]                             |
                   | type                               |
                   | transportProtocol                  |
                   | destinationIpAddress               |
                   | destinationPort                    |
                   | sourceIpAddress (UDP)              |
                   | localIpAddress* (SCTP)             |
                   | sendBufferSize                     |
                   | rateLimit                          |
                   | timedReliability (SCTP)            |
                   | numberOfStreams (SCTP)             |
                   | orderedDelivery (SCTP)             |
                   | templateRefreshTimeout (UDP)       |
                   | optionTemplateRefreshTimeout (UDP) |
                   | templateRefreshPacket (UDP)        |
                   | optionTemplateRefreshPacket (UDP)  |
                   +------------------------------------+

                       Figure 13: Destination class

   The Destination class shown in Figure 13 contains the configuration
   parameters of one export destination (i.e., Collector) the Exporting
   Process sends IPFIX Messages to.  Some of the parameters are only
   applicable if a specific transport protocol (SCTP, UDP, or TCP) is
   used.  The following parameters apply to all transport protocols:







Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 22]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   type:  Configures the export member type that corresponds to the
      ipfixTransportSessionGroupMemberType object in
      [I-D.ietf-ipfix-mib].  The value of this parameter MUST be one of
      the following:
      *  primary: primary target of the Exporting Process
      *  secondary: secondary target of the Exporting Process used when
         the primary target is not reachable
      *  duplicate: duplicate exporting to all destinations and files of
         the Exporting Process
      *  loadBalancing: load-balancing between different destinations
      At most one destination or file may be configured with type
      "primary".  If "duplicate" or "loadBalancing" is used, the same
      type must be configured for all destinations and File Writers of
      the Exporting Process.
   transportProtocol:  One of "sctp", "udp", and "tcp".
   destinationIpAddress, destinationPort:  Destination IP address and
      destination port number to be used. destinationIpAddress is a
      mandatory parameter.  If destinationPort is omitted, 4739 is used
      as port number.
   sendBufferSize:  Size of the socket send buffer in bytes.
   rateLimit:  Maximum number of bytes per second the Exporting Process
      may export to the given destination as required by
      [I-D.ietf-psamp-protocol].  The number of bytes is calculated from
      the lengths of the IPFIX Messages exported.

   The following parameters are applicable if SCTP is transport
   protocol:

   localIpAddress:  This optional parameter MAY appear multiple times to
      specify the list of eligible local IP addresses of the SCTP
      association [RFC4960].  If omitted, all locally assigned IP
      addresses are used by the SCTP endpoint.
   timedReliability:  Lifetime in timeticks (i.e., hundredths of a
      second) until an IPFIX Message containing Data Sets only is
      "abandoned" due to the timed reliability mechanism of PR-SCTP
      [RFC3758].  If this parameter is omitted or set to zero, reliable
      SCTP transport is used.
   numberOfStreams:  Number of outbound streams requested for SCTP
      associations [RFC4960].
   orderedDelivery:  Boolean parameter controlling the ordered delivery
      of IPFIX Messages containing Data Sets [RFC4960].  If this
      parameter is omitted, ordered delivery is enabled.

   The following parameters are applicable if UDP is transport protocol:







Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 23]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   sourceIpAddress:  This OPTIONAL parameter sets the source IP address.
      If this parameter is omitted, the address assigned to the outgoing
      interface is used.
   templateRefreshTimeout, optionTemplateRefreshTimeout,
   templateRefreshPacket, optionTemplateRefreshPacket:  Template refresh
      parameters when using UDP as transport protocol.
      templateRefreshTimeout and optionTemplateRefreshTimeout are
      specified in seconds between resendings of (Options) Templates.
      If omitted, the default value of 600 seconds (10 minutes) is used
      [RFC5101]. templateRefreshPacket and optionTemplateRefreshPacket
      are specified in number of IPFIX Messages.  If omitted, the
      (Options) Templates are only resent after timeout.

5.4.2.  FileWriter Class

                               +------------+
                               | FileWriter |
                               +------------+
                               | [name]     |
                               | type       |
                               | uri        |
                               +------------+

                       Figure 14: FileWriter classes

   Instead of exporting IPFIX Messages to remote destinations, the
   Exporting Process can write them to a file as proposed in
   [I-D.ietf-ipfix-file].  The FileWriter class contains the
   configuration parameters for writing the IPFIX Messages to a specific
   file:

   type:  Same parameter as in the Destination class.  The File Writers
      of an Exporting Process belong to the same Transport Session group
      as any destination configured for the same Exporting Process.
   uri:  File name and location encoded as URI.

5.4.3.  Options Class

                  +-----------+
                  | Options   |
                  +-----------+   0..1 +-----------------+
                  | [name]    |<>------| OptionsTemplate |
                  | type      |        +-----------------+
                  | timeout   |
                  +-----------+

                         Figure 15: Options class




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 24]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   The Options class in Figure 15 defines the type of specific
   information to be reported, such as statistics, flow keys, Sampling
   and Filtering parameters etc.  [RFC5101] and
   [I-D.ietf-psamp-protocol] specify several types of reporting
   information which may be exported.  The type parameter MUST be set to
   one of the following values:

   meteringStatistics:  Export of Metering Process statistics using the
      Metering Process Statistics Options Template [RFC5101].
   meteringReliability:  Export of Metering Process reliability
      statistics using the Metering Process Reliability Statistics
      Options Template [RFC5101].
   exportingReliability:  Export of Exporting Process reliability
      statistics using the Exporting Process Reliability Statistics
      Options Template [RFC5101].
   flowKeys:  Export of the Flow Key specification using the Flow Keys
      Options Template [RFC5101].
   selectionSequence:  Export of Selection Sequence Report
      Interpretation and Selector Report Interpretation
      [I-D.ietf-psamp-protocol].
   selectionStatistics:  Export of Selection Sequence Statistics Report
      Interpretation [I-D.ietf-psamp-protocol].
   accuracy:  Export of Accuracy Report Interpretation
      [I-D.ietf-psamp-protocol].
   reducingRedundancy:  Export of common properties according to
      [I-D.ietf-ipfix-reducing-redundancy].

   The options type is a mandatory parameter.  The Options Template MAY
   be configured, using the OptionsTemplate class.  If no Options
   Template is specified, the Exporter MUST choose a template definition
   according to the options type and available options data.

   The timeout parameter specifies the reporting interval.  If the
   timeout parameter is omitted or set to zero, the corresponding
   reporting information will be exported only once.  Otherwise, the
   information is exported periodically.















Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 25]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


5.4.4.  OptionsTemplate Class

              +-----------------+
              | OptionsTemplate |
              +-----------------+   0..* +------------------+
              |                 |<>------| OptionsField     |
              |                 |        +------------------+
              |                 |        | [name]           |
              |                 |        | ieId/ieName      |
              |                 |        | ieLength         |
              |                 |        | enterpriseNumber |
              |                 |        | isScope          |
              +-----------------+        +------------------+

                     Figure 16: OptionsTemplate class

   The Options Template class specifies the fields of an Options
   Template using the OptionsField class.  The configuration parameters
   of the OptionsField class are the same as for the CacheField class
   (see Section 5.3.1), except for the isFlowKey parameter which does
   not exist.  If the additional parameter isScope is present, the field
   is a scope field.

5.5.  CollectingProcess Class

           +-------------------+
           | CollectingProcess |
           +-------------------+
           | [name]            |       0..* +------------------+
           |                   |<>----------| Receiver         |
           |                   |            +------------------+
           |                   |
           |                   |       0..* +------------------+
           |                   |<>----------| FileReader       |
           |                   |            +------------------+
           |                   |
           |                   | 0..*  0..* +------------------+
           |                   |----------->| ExportingProcess |
           |                   |            +------------------+
           |                   |
           |                   |       0..* +------------------+
           |                   |<>----------| Template         |
           |                   |            +------------------+
           |                   |
           |                   |       0..* +------------------+
           |                   |<>----------| TransportSession |
           +-------------------+            +------------------+




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 26]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


                    Figure 17: CollectingProcess class

   Figure 17 shows the CollectingProcess class that contains the
   configuration and state parameters of a Collecting Process.  Objects
   of the Receiver class specify how IPFIX Messages are received from
   remote Exporters.  The Collecting Process can also be configured as a
   File Reader using objects of the FileReader class.

   As state data, the CollectingProcess class contains the list of
   received Templates and the list of Transport Sessions that terminate
   at the Collecting Process.  The Template class and TransportSession
   class are specified in Section 5.6 and Section 5.7, respectively.

   An CollectingProcess object MAY refer to one or multiple
   ExportingProcess objects configuring Exporting Processes that export
   the received data without modifications to a file or to another
   Collector.

5.5.1.  Receiver Class

                        +--------------------------+
                        | Receiver                 |
                        +--------------------------+
                        | [name]                   |
                        | transportProtocol        |
                        | localIpAddress*          |
                        | localPort                |
                        | maxAllowedStreams (SCTP) |
                        | templateLifetime (UDP)   |
                        +--------------------------+

                         Figure 18: Receiver class

   The Receiver class contains the configuration parameters of a
   listening socket of the Collecting Process.  Some of the parameters
   are specific to the transport protocol.  The parameters are as
   follows:

   transportProtocol:  One of "sctp", "udp", and "tcp".
   localIpAddress:  Local IP addresses the socket is bound to.  If
      ipAddress is omitted, the socket is bound to all local IP
      addresses.  In the case of SCTP, the local IP addresses correspond
      to the eligible local IP addresses used by the local SCTP endpoint
      [RFC4960].







Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 27]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   localPort:  Local port number.  If omitted, port number 4739 is used.
   maxAllowedStreams (available if transport protocol is SCTP):  Maximum
      number of allowed inbound streams per SCTP association.
   templateLifetime (available if transport protocol is UDP):  Template
      lifetime if UDP is used as transport protocol.

5.5.2.  FileReader Class

                               +------------+
                               | FileReader |
                               +------------+
                               | [name]     |
                               | uri        |
                               +------------+

                       Figure 19: FileReader classes

   The Collecting Process may import IPFIX Messages from a file as
   proposed in [I-D.ietf-ipfix-file].  The FileReader class defines the
   configuration parameter:

   uri:  File name and location encoded as URI.

5.6.  Template Class

               +---------------------+
               | Template            |
               +---------------------+   0..* +------------+
               | observationDomainId |<>------| Field      |
               | templateId          |        +------------+
               | setId               |        | ieId       |
               | accessTime          |        | ieLength   |
               | dataRecords         |        | enterprise |
               |                     |        | flags      |
               +---------------------+        +------------+

                         Figure 20: Template class

   The Template class contains state data about Templates used by an
   Exporting Process or received by a Collecting Process.  The Field
   class defines one field of the Template.  The names and semantics of
   the state parameters correspond to the managed objects in the
   ipfixTemplateTable, ipfixTemplateDefinitionTable, and
   ipfixTemplateStatsTable of the IPFIX MIB module [I-D.ietf-ipfix-mib].
   Hence, if these state parameters are queried from the Monitoring
   Device, the corresponding IPFIX MIB values can be returned without
   any further processing.




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 28]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


5.7.  Transport Session Class

                      +------------------------------+
                      | TransportSession             |
                      +------------------------------+
                      | index                        |
                      | protocol                     |
                      | sourceAddress                |
                      | destinationAddress           |
                      | sourcePort                   |
                      | destinationPort              |
                      | sctpAssocId                  |
                      | templateRefreshTimeout       |
                      | optionTemplateRefreshTimeout |
                      | templateRefreshPacket        |
                      | optionTemplateRefreshPacket  |
                      | status                       |
                      | rate                         |
                      | packets                      |
                      | bytes                        |
                      | messages                     |
                      | discardedMessages            |
                      | records                      |
                      | templates                    |
                      | optionTemplates              |
                      +------------------------------+

                     Figure 21: TransportSession class

   The TransportSession class contains state data about Transport
   Sessions originating from an Exporting Process or terminating at a
   Collecting Process.  The names and semantics of the state parameters
   correspond to the managed objects in the ipfixTransportSessionTable
   and ipfixTransportSessionStatsTable of the IPFIX MIB module
   [I-D.ietf-ipfix-mib].  Hence, if these state parameters are queried
   from the Monitoring Device, the corresponding IPFIX MIB values can be
   returned without any further processing.  The scope in which a
   TransportSession object appears (i.e., as part of an ExportingProcess
   object or a CollectingProcess object) indicates if the Monitoring
   Device is at the source or destination of the Transport Session.
   Therefore, the MIB object ipfixTransportSessionMode is not included.


6.  Adaptation to Device Capabilities

   The configuration data model standardizes a superset of common IPFIX
   and PSAMP configuration parameters.  A typical Monitoring Device
   implementation will not support the entire range of possible



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 29]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   configurations.  Certain functions may not be supported, such as the
   Collecting Process that does not exist on a Monitoring Device
   conceived as Exporter only.  The configuration of other functions may
   be subject to resource limitations.  For example, the Cache size is
   typically limited according to the available memory on the device.

   YANG [I-D.ietf-netmod-yang] offers several possibilities to restrict
   and adapt a configuration data model.  The current version of YANG
   defines the concepts of "features" and "deviations".

   The feature concept allows the modeler to make proportions of the
   model conditional in a manner that is controlled by the device.
   Devices do not have to support these conditional parts to conform to
   the model.  Those features that are supported by a device must be
   announced in the <hello> message of the NETCONF protocol [RFC4741].

   The configuration data model for IPFIX and PSAMP covers the
   configuration of Exporters, Collectors, and devices that may act as
   both.  As Exporters and Collectors implement different functions, the
   corresponding proportions of the model are conditional on the
   following features:

   exporter:  If this feature is supported, Exporting Processes can be
      configured.
   collector:  If this feature is supported, Collecting Processes can be
      configured.

   Exporters do not necessarily implement any Selection Processes,
   Caches, or even Observation Points in particular cases.  Therefore,
   the corresponding proportions of the model are conditional on the
   following feature:

   meter:  If this feature is supported, Observation Points, Selection
      Processes, and Caches can be configured.

   Additional features refer to different PSAMP Sampling and Filtering
   methods:

   psampSampCountBased:  If this feature is supported, Sampling method
      sampCountBased can be configured.
   psampSampTimeBased:  If this feature is supported, Sampling method
      sampTimeBased can be configured.
   psampSampRandOutOfN:  If this feature is supported, Sampling method
      sampRandOutOfN can be configured.







Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 30]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   psampSampUniProb:  If this feature is supported, Sampling method
      sampUniProb can be configured.
   psampSampNonUniProb:  If this feature is supported, Sampling method
      sampNonUniProb can be configured.
   psampSampFlowState:  If this feature is supported, Sampling method
      sampFlowState can be configured.
   psampFilterMatch:  If this feature is supported, Filtering method
      filterMatch can be configured.
   psampFilterHash:  If this feature is supported, Filtering method
      filterHash can be configured.
   psampFilterRState:  If this feature is supported, Filtering method
      filterRState can be configured.

   The following features concern the support of UDP and TCP as
   transport protocols and the support of File Readers and File Writers:

   udpTransport:  If this feature is supported, UDP can be used as
      transport protocol by Exporting Processes and Collecting
      Processes.
   tcpTransport:  If this feature is supported, TCP can be used as
      transport protocol by Exporting Processes and Collecting
      Processes.
   fileReader:  If this feature is supported, Collecting Processes can
      be configured as File Readers.
   fileReader:  If this feature is supported, Exporting Processes can be
      configured as File Writers.

   The deviation concept enables a device to announce deviations from
   the standard model.  Deviations are typically used to specify
   limitations due to resource constraints.  Deviations concern existing
   parameters of the standard model and must not be confused with model
   extensions that are realized with the YANG statement "augment".  Just
   like features, deviations are announced in NETCONF's <hello> message.
   A usage example of deviations is given in Section 8.5.


7.  YANG Module of the IPFIX/PSAMP Configuration Data Model

   The YANG module specification of the configuration data model is
   listed below.  It makes use of common YANG types defined in
   [I-D.ietf-netmod-yang-types].

module ipfix-psamp {
  namespace "urn:ietf:params:xml:ns:ipfix-psamp-config";
  prefix ipfix;

  import yang-types { prefix yang; }
  import inet-types { prefix inet; }



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 31]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


  organization "IPFIX WG";
  contact "muenz@net.in.tum.de";

  description "IPFIX/PSAMP Configuration Data Model";

  revision 2009-03-02 {
    description "Version of draft-ietf-ipfix-configuration-model-02
      Changes in draft-ietf-ipfix-configuration-model-02:
      - conformance to draft-ietf-netmod-yang-03 and
        draft-ietf-netmod-yang-types-01
      - canonical form
      - observationDomainId is now mandatory parameter
      - usage of YANG features
      - renamed parameter 'idleTimeout' in 'inactiveTimeout'
      - state data: Selector statistics, Cache statistics, Templates,
        Transport Sessions
      - Exporting Process: new structure of destination, fileWriter
      - Collecting Process: new structure of receiver, fileReader
      - more groupings and typedefs
      - options configured per Exporting Process, not per destination
      - verified optional parameters, added default values or
        description clause if necessary
      Changes in draft-ietf-ipfix-configuration-model-01:
      - separation of Selectors and Selection Processes as in PSAMP
        documents
      - parameter modifications in filterMatch
      - new rateLimit parameter in destinations of Exporting Process
      - Cache Type 'normal' now called 'timeout'
      Changes in draft-ietf-ipfix-configuration-model-00:
      - Metering Process container replaced by direct reference to
        Selection Process
      - meteringProcessId parameter disappears together with the
        Metering Process container
      - concatenation of Selection Processes realize Selection Sequence
      - removal of premature support of IPFIX Mediators/Concentrators.
      - more SCTP parameters in SctpReceiver and SctpExport classes
      - sendBufferSize parameter for all *Export classes
      - templateId no longer configuration parameter
      Changes in draft-muenz-ipfix-configuration-04:
      - first version in yang
      - Collecting Process can be configured for file import
      - Collecting Process can be configured to export received
        records without modifications (e.g., to file or other
        collectors)
      - SCTP export parameter timedReliability
      - parameter for eligible local IP addresses for SCTP endpoint
      - all tags names uncapitalized, types names etc. capitalized
      - CacheParameters renamed as Cache



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 32]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


      - description attribute removed
      Changes in -03:
      - Linecard and Interface classes now have direction element
      - sec => s (SI unit)
      - optional description attribute for annotations
      - simplifications in ExportingProcess class
      - new parameters: observationPointId, meteringProcessId,
        selectorId, exportingProcessId (note that devices do not
        have to support the configuration of these parameters)
      - new FileExport class for exporting into a file
      - Reporting class renamed Options Class
      Changes in -02:
      - new structure without next pointers
      - packet reporting and flow metering replaced by record cache
      - added reporting with options";
  }

  feature exporter {
    description "If supported, the device can be used as an Exporter.
      Exporting Processes can be configured.";
  }

  feature collector {
    description "If supported, the device can be used as a Collector.
      Collecting Processes can be configured.";
  }

  feature meter {
    description "If supported, Observation Points, Selection
      Processes, and Caches can be configured.";
  }

  feature psampSampCountBased {
    description "If supported, the device supports count-based Sampling.
      The Selector method sampCountBased can be configured.";
  }

  feature psampSampTimeBased {
    description "If supported, the device supports time-based Sampling.
      The Selector method sampTimeBased can be configured.";
  }

  feature psampSampRandOutOfN {
    description "If supported, the device supports random n-out-of-N
      Sampling. The Selector method sampRandOutOfN can be configured.";
  }

  feature psampSampUniProb {



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 33]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


    description "If supported, the device supports uniform probabilistic
      Sampling. The Selector method sampUniProb can be configured.";
  }

  feature psampSampNonUniProb {
    description "If supported, the device supports non-uniform
      probabilistic Sampling. The Selector method sampNonUniProb can be
      configured.";
  }

  feature psampSampFlowState {
    description "If supported, the device supports flow state dependent
      Sampling. The Selector method sampFlowState can be configured.";
  }

  feature psampFilterMatch {
    description "If supported, the device supports property match
      Filtering. The Selector method filterMatch can be configured.";
  }

  feature psampFilterHash {
    description "If supported, the device supports hash-based Filtering.
      The Selector method filterHash can be configured.";
  }

  feature psampFilterRState {
    description "If supported, the device supports router state
      Filtering. The Selector method filterRState can be configured.";
  }

  feature udpTransport {
    description "If supported, the device supports UDP as transport
      protocol.";
  }

  feature tcpTransport {
    description "If supported, the device supports TCP as transport
      protocol.";
  }

  feature fileReader {
    description "If supported, the device supports the configuration
      of Collecting Processes as File Readers.";
  }

  feature fileWriter {
    description "If supported, the device supports the configuration
      of Exporting Processes as File Writers.";



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 34]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


  }

  typedef direction {
    type enumeration {
      enum ingress;
      enum egress;
      enum both;
    }
    description "Direction of packets going through an interface or
      linecard.";
  }

  typedef cacheType {
    type enumeration {
      enum immediate {
        description "Flow expiration after the first packet,
          generation of Packet Records.";
      }
      enum timeout {
        description "Flow expiration after active and inactive timeout,
          generation of Flow Records.";
      }
      enum permanent {
        description "No flow expiration, periodical export after
          active timeout, generation of Flow Records.";
      }
    }
    description "Cache Type specifies the Flow expiration policy of a
      Cache.";
  }

  typedef exportMemberType {
    type enumeration {
      enum primary;
      enum secondary;
      enum duplicate;
      enum loadBalancing;
      enum unused;
    }
    description "This type defines different usages of an export
      destination among all destinations of an Exporting Process.
      It corresponds to ipfixExportMemberType in IPFIX-MIB.";
    reference "draft-ietf-ipfix-mib-05.";
  }

  typedef optionType {
    type enumeration {
      enum meteringStatistics {



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 35]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


        description "Metering Process Statistics.";
        reference "RFC 5101, section 4.1.";
      }
      enum meteringReliability {
        description "Metering Process Reliability Statistics.";
        reference "RFC 5101, section 4.2.";
      }
      enum exportingReliability {
        description "Exporting Process Reliability
          Statistics.";
        reference "RFC 5101, section 4.3.";
      }
      enum flowKeys {
        description "Flow Keys.";
        reference "RFC 5101, section 4.4.";
      }
      enum selectionSequence {
        description "Selection Sequence and Selector Reports.";
        reference "draft-ietf-psamp-protocol-09, section 6.5.1
          and 6.5.2.";
      }
      enum selectionStatistics {
        description "Selection Sequence Statistics Report.";
        reference "draft-ietf-psamp-protocol-09, section
          6.5.3.";
      }
      enum accuracy {
        description "Accuracy Report.";
        reference "draft-ietf-psamp-protocol-09, section
          6.5.4.";
      }
      enum reducingRedundancy {
        description "Application of ipfix-reducing-redundancy.";
        reference "draft-ietf-ipfix-reducing-redundancy-04";
      }
    }
    description "Options Templates specified by IPFIX and PSAMP.";
  }

  typedef transportSessionStatus {
    type enumeration {
      enum inactive;
      enum active;
      enum unknown;
    }
    description "Status of a Transport Session.";
    reference "draft-ietf-ipfix-mib-05, section 7
      (ipfixTransportSessionStatus).";



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 36]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


  }

  typedef ipfixTransportProtocol {
    type enumeration {
      enum sctp;
      enum udp {
        description "only applicable if the feature udpTransport is
          supported";
      }
      enum tcp {
        description "only applicable if the feature tcpTransport is
          supported";
      }
    }
    description "Transport protocols of IPFIX.";
    reference "RFC5101.";
  }

  typedef templateFieldFlags {
    type bits {
      bit scope {
        position 0;
      }
      bit flowKey {
        position 1;
      }
    }
    description "Attributes of a field in a Template.";
    reference "draft-ietf-ipfix-mib-05, section 7
      (ipfixTemplateDefinitionFlags)";
  }

  typedef filterRStateFunction {
    type enumeration {
      enum other;
      enum ingressIf;
      enum egressIf;
      enum aclViolation;
      enum rpfFailure;
      enum noResources;
      enum noRoute;
      enum originAS;
      enum destAS;
    }
    description "Filter function applied to router state.";
    reference "draft-ietf-psamp-mib-06, section 5.2.3.";
  }




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 37]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


  grouping informationElement {
    description "Parameters of an Information Element.";
    choice nameOrId {
      mandatory true;
      description "Name or ID of the Information Element.";
      reference "RFC5102";
      leaf ieName { type string; }
      leaf ieId { type uint16; }
    }
    leaf ieLength {
      type uint16;
      description "Length can be omitted if a default length exists
        for the specified Information Element. A value of 65535
        specifies a variable-length Information Element.";
      reference "RFC5102";
    }
    leaf ieEnterpriseNumber {
      type uint32;
      description "If present, this is an enterprise-specific
        Information Element.";
      reference "RFC5101, RFC5102";
    }
  }

  grouping interfaceParameters {
    description "Interface as input to Observation Point.";
    choice indexOrName {
      mandatory true;
      description "Index or name of the interface as stored in the
        ifTable of IF-MIB.";
      reference "RFC 1229.";
      leaf ifIndex { type uint32; }
      leaf ifName { type string; }
    }
    leaf direction {
      type direction;
      default both;
      description "Direction of packets. If not applicable (e.g., in
        the case of a sniffing interface in promiscuous mode), this
        parameter is ignored.";
    }
  }

  grouping linecardParameters {
    description "Linecard as input to Observation Point.";
    choice indexOrName {
      mandatory true;
      description "Index or name of the linecard as stored in the



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 38]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


        entPhysicalTable of ENTITY-MIB.";
      reference "RFC 4133.";
      leaf entPhysicalIndex { type uint32; }
      leaf entPhysicalName { type string; }
    }
    leaf direction {
      type direction;
      default both;
      description "Direction of packets. If not applicable (e.g., in
        the case of a sniffing interface in promiscuous mode), this
        parameter is ignored.";
    }
  }

  grouping selectorParameters {
    description "Configuration and state parameters of a Selector.";
    leaf selectorId {
      type uint16;
      description "The Selector ID must be unique within the
        Observation Domain.
        If not configured, this parameter is set by the monitoring
        device.";
      reference "draft-ietf-psamp-info-11";
    }
    choice Method {
      mandatory true;
      description "See PSAMP-MIB for details about the selection
        methods and their parameters.";
      reference "draft-ietf-psamp-mib-06.";
      leaf selectAll { type empty; }
      container sampCountBased {
        if-feature psampSampCountBased;
        leaf interval {
          type uint32;
          mandatory true;
        }
        leaf spacing {
          type uint32;
          mandatory true;
        }
      }
      container sampTimeBased {
        if-feature psampSampTimeBased;
        leaf interval {
          type uint32;
          mandatory true;
        }
        leaf spacing {



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 39]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


          type uint32;
          mandatory true;
        }
      }
      container sampRandOutOfN {
        if-feature psampSampRandOutOfN;
        leaf population {
          type uint32;
          mandatory true;
        }
        leaf sample {
          type uint32;
          mandatory true;
        }
      }
      container sampUniProb {
        if-feature psampSampUniProb;
        leaf probability {
          type uint32;
          mandatory true;
          description "The given value must be divided by
            4294967295.";
        }
      }
      container sampNonUniProb {
        if-feature psampSampNonUniProb;
        leaf function {
          type yang:object-identifier;
          mandatory true;
        }
        leaf funcParam {
          type yang:object-identifier;
          mandatory true;
        }
      }
      container sampFlowState {
        if-feature psampSampFlowState;
        leaf function {
          type yang:object-identifier;
          mandatory true;
        }
        leaf funcParam {
          type yang:object-identifier;
          mandatory true;
        }
      }
      container filterMatch {
        if-feature psampFilterMatch;



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 40]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


        choice nameOrId {
          mandatory true;
          description "Deviating from the PSAMP MIB, the field is
            specified by either the name or the ID of the
            Information Element.";
          leaf ieName {
            type string;
          }
          leaf ieId {
            type uint16;
          }
        }
        leaf ieEnterpriseNumber {
          type uint32;
          description "Deviating from the PSAMP MIB, an enterprise
            number may be specified to refer to an
            enterprise-specific Information Element.";
        }
        leaf startValue {
          type string;
          mandatory true;
        }
        leaf stopValue {
          type string;
          mandatory true;
        }
        leaf mask {
          type string;
          description "If not configured, no mask is applied.";
        }
      }
      container filterHash {
        if-feature psampFilterHash;
        leaf addrType {
          type inet:ip-version;
          mandatory true;
        }
        leaf headerBits {
          type string {
            length 40;
          }
          mandatory true;
          description "If addrType is 'ipv4', only the first 20 bytes
            are used.";
        }
        leaf payloadBytes {
          type uint32;
          default 0;



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 41]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


        }
        leaf payloadBits {
          type string;
          description "If not configured, all bits included in the
            payload section defined by payloadBytes are used.";
        }
        leaf function {
          type yang:object-identifier;
          mandatory true;
        }
        leaf funcParam {
          type yang:object-identifier;
          mandatory true;
        }
        leaf inputBits {
          type uint32;
          mandatory true;
        }
        leaf outputBits {
          type uint32;
          mandatory true;
        }
        leaf outputMask {
          type string;
          mandatory true;
        }
        leaf selection {
          type string;
          mandatory true;
        }
      }
      container filterRState {
        if-feature psampFilterRState;
        leaf function {
          type filterRStateFunction;
          mandatory true;
        }
        leaf negate {
          type boolean;
          default false;
        }
        leaf ifIndex {
          type uint32;
          mandatory true;
          description "Index of the interface as stored in the
            ifTable of IF-MIB.";
          reference "RFC 2863.";
        }



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 42]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


        leaf startAS {
          type inet:autonomous-system-number;
          must "../function=originAS or ../function=destAS";
        }
        leaf stopAS {
          type inet:autonomous-system-number;
          must "../function=originAS or ../function=destAS";
        }
        leaf vendorFunc {
          type yang:object-identifier;
          must "../function=other";
        }
      }
    }
    leaf packetsObserved {
      type yang:counter64;
      config false;
      description "Corresponds to ipfixSelectorStatsPacketsObserved
        in IPFIX-MIB.";
      reference "draft-ietf-ipfix-mib-05, section 7
        (ipfixSelectorStatsPacketsObserved).";
    }
    leaf packetsDropped {
      type yang:counter64;
      config false;
      description "Corresponds to ipfixSelectorStatsPacketsDropped
        in IPFIX-MIB.";
      reference "draft-ietf-ipfix-mib-05, section 7
        (ipfixSelectorStatsPacketsDropped).";
    }
  }

  grouping cacheLayoutParameters {
    description "Fields of a Cache Layout.";
    list cacheField {
      key name;
      min-elements 1;
      leaf name { type string; }
      uses informationElement;
      leaf isFlowKey {
        type empty;
        description "If present, this is a flow key.";
      }
    }
  }

  grouping destinationParameters {
    description "Parameters specifying an export destination.";



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 43]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


    leaf type {
      type exportMemberType;
      default primary;
      description "Member type within the Transport Session group
        that is composed of all destinations and fileWriters of the
        Exporting Process.";
    }
    leaf transportProtocol {
      type ipfixTransportProtocol;
      mandatory true;
    }
    leaf destinationIpAddress {
      type inet:ip-address;
      mandatory true;
    }
    leaf destinationPort {
      type inet:port-number;
      default 4739;
    }
    leaf sourceIpAddress {
      type inet:ip-address;
      must "../transportProtocol=udp";
      description "Sets source IP address if UDP is transport
        protocol. If not configured, the IP address assigned to the
        outgoing interface is used.";
    }
    leaf-list localIpAddress {
      type inet:ip-address;
      must "../transportProtocol=sctp";
      description "List of eligible local IP addresses to be
        used by the SCTP endpoint. If not configured, all locally
        assigned IP addresses are used by the local endpoint.";
      reference "RFC 3758, RFC 4960.";
    }
    leaf sendBufferSize {
      type uint32;
      units bytes;
      description "Size of the socket send buffer.
        If not configured, this parameter is set by the monitoring
        device";
    }
    leaf rateLimit {
      type uint32;
      units "bytes per second";
      description "Maximum number of bytes per second the Exporting
        Process may export to the given destination. The number of
        bytes is calculated from the lengths of the IPFIX Messages
        exported. If not configured, no rate limiting is performed.";



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 44]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


      reference "draft-ietf-psamp-protocol-09, section 6.3.";
    }
    leaf timedReliability {
      type yang:timeticks;
      must "../transportProtocol=sctp";
      default 0;
      description "PR-SCTP lifetime for IPFIX Messages
        containing Data Sets only. Zero means reliable transport.";
      reference "RFC 3758, RFC 4960.";
    }
    leaf numberOfStreams {
      type uint16;
      must "../transportProtocol=sctp";
      description "Number of outbound streams requested for the
        SCTP association.
        If not configured, this parameter is set by the monitoring
        device.";
      reference "RFC 3758, RFC 4960.";
    }
    leaf orderedDelivery {
      type boolean;
      must "../transportProtocol=sctp";
      default true;
      description "Ordered delivery of IPFIX Messages
        containing Data Sets.";
      reference "RFC 3758, RFC 4960.";
    }
    leaf templateRefreshTimeout {
      type uint32;
      units seconds;
      must "../transportProtocol=udp";
      default 600;
      description "Sets time after which Templates are resent if UDP
        is transport protocol.";
      reference "RFC5101.";
    }
    leaf optionTemplateRefreshTimeout {
      type uint32;
      units seconds;
      must "../transportProtocol=udp";
      default 600;
      description "Sets time after which Options Templates are resent
        if UDP is transport protocol.";
      reference "RFC5101.";
    }
    leaf templateRefreshPacket {
      type uint32;
      units "IPFIX Messages";



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 45]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


      must "../transportProtocol=udp";
      description "Sets number of IPFIX Messages after which
        Templates are resent if UDP is transport protocol.
        If omitted, Templates are only resent after timeout.";
      reference "RFC5101.";
    }
    leaf optionTemplateRefreshPacket {
      type uint32;
      units "IPFIX Messages";
      must "../transportProtocol=udp";
      description "Sets number of IPFIX Messages after which
        Options Templates are resent if UDP is transport protocol.
        If omitted, Templates are only resent after timeout.";
      reference "RFC5101.";
    }
  }

  grouping optionParameters {
    description "Parameters specifying the data export using an
      Options Template.";
    leaf type {
      type optionType;
      mandatory true;
    }
    leaf timeout {
      type yang:timeticks;
      default 0;
      description "Time interval for exporting options data.
        If set to zero, the options data is sent once.";
    }
    container optionTemplate {
      description "If no Options Template is specified, the
        Exporter defines a template according to options type and
        available options data.";
      list optionField {
        key name;
        ordered-by user;
        leaf name { type string; }
        uses informationElement;
        leaf isScope {
          type empty;
          description "If present, this is a scope field.";
        }
      }
    }
  }

  grouping receiverParameters {



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 46]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


    leaf transportProtocol {
      type ipfixTransportProtocol;
      mandatory true;
    }
    leaf-list localIpAddress {
      type inet:ip-address;
      description "List of local IP addresses on which the Collecting
        Process listens for IPFIX Messages. If not configured, all
        locally assigned IP addresses are used. In the case of SCTP,
        these IP addresses correspond to the eligible local IP
        addresses to be used by the SCTP endpoint.";
      reference "RFC 4960.";
    }
    leaf localPort {
      type inet:port-number;
      default 4739;
    }
    leaf maxAllowedStreams {
      type uint16;
      must "../transportProtocol=sctp";
      description "Maximum number of allowed inbound streams
        per SCTP association. If not configured, the maximum number of
        inbound streams is not restricted.";
    }
    leaf templateLifetime {
      type uint32;
      units seconds;
      must "../transportProtocol=udp";
      default 1800;
      description "Template lifetime if UDP is transport protocol.";
      reference "RFC5101, section 10.3.7";
    }
  }

  grouping fileWriterParameters {
    description "File Writer parameters.";
    leaf type {
      type exportMemberType;
      must "current()!=loadBalancing";
      default primary;
      description "Member type within the Transport Session group
        that is composed of all destinations and fileWriters of the
        Exporting Process.";
    }
    leaf uri {
      type inet:uri;
      mandatory true;
      description "URI specifying the location of the file.";



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 47]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


    }
  }

  grouping fileReaderParameters {
    description "File Reader parameters.";
    leaf uri {
      type inet:uri;
      mandatory true;
      description "URI specifying the location of the file.";
    }
  }

  grouping templateParameters {
    description "State parameters of a Template used by an Exporting
      Process or received by a Collecting Process. Parameter names
      and semantics correspond to the managed objects in IPFIX-MIB";
    reference "draft-ietf-ipfix-mib-05, section 7
      (ipfixTemplateEntry, ipfixTemplateDefinitionEntry,
      ipfixTemplateStatsEntry)";
    leaf observationDomainId { type uint32; }
    leaf templateId { type uint16; }
    leaf setId { type uint16; }
    leaf accessTime { type yang:date-and-time; }
    leaf dataRecords { type yang:counter64; }
    list field {
      leaf ieId { type uint16; }
      leaf ieLength { type uint16; }
      leaf enterprise { type uint32; }
      leaf flags { type templateFieldFlags; }
    }
  }

  grouping transportSessionParameters {
    description "State parameters of a Transport Session originating
      from an Exporting or terminating at a Collecting Process.
      Parameter names and semantics correspond to the managed
      objects in IPFIX-MIB";";
    reference "draft-ietf-ipfix-mib-05, section 7
      (ipfixTransportSessionEntry, ipfixTransportSessionStatsEntry)";
    leaf index { type int32; }
    leaf sourceAddress { type inet:ip-address; }
    leaf destinationAddress { type inet:ip-address; }
    leaf sourcePort { type inet:port-number; }
    leaf destinationPort { type inet:port-number; }
    leaf sctpAssocId { type uint32; }
    leaf templateRefreshTimeout {
      type uint32;
      units seconds;



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 48]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


    }
    leaf optionTemplateRefreshTimeout {
      type uint32;
      units seconds;
    }
    leaf templateRefreshPacket {
      type uint32;
      units "IPFIX Messages";
    }
    leaf optionTemplateRefreshPacket {
      type uint32;
      units "IPFIX Messages";
    }
    leaf status { type transportSessionStatus; }
    leaf rate {
      type int32;
      units "bytes per second";
    }
    leaf packets {
      type yang:counter64;
      units packets;
    }
    leaf bytes {
      type yang:counter64;
      units bytes;
    }
    leaf messages {
      type yang:counter64;
      units "IPFIX Messages";
    }
    leaf discardedMessages {
      type yang:counter64;
      units "IPFIX Messages";
    }
    leaf records {
      type yang:counter64;
      units "Data Records";
    }
    leaf templates {
      type yang:counter32;
      units "Templates";
    }
    leaf optionTemplates {
      type yang:counter32;
      units "Options Templates";
    }
  }




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 49]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


  container ipfix {
    list collectingProcess {
      if-feature collector;
      key name;
      description "Parameters of a Collecting Process.";
      leaf name { type string; }
      list receiver {
        key name;
        description "List of receivers (sockets) on which the
          Collecting Process receives IPFIX Messages.";
        leaf name { type string; }
        uses receiverParameters;
      }
      list fileReader {
        if-feature fileReader;
        key name;
        description "List of File Readers from which the Collecting
          Process reads IPFIX Messages.";
        leaf name { type string; }
        uses fileReaderParameters;
      }
      leaf-list exportingProcess {
        type keyref { path "/ipfix/exportingProcess/name"; }
        description "Export of received records without any
          modifications. Records are processed by all Exporting
          Processes in the list.";
      }
      list template {
        config false;
        uses templateParameters;
      }
      list transportSession {
        config false;
        uses transportSessionParameters;
      }
    }

    list observationPoint {
      if-feature meter;
      key name;
      description "Parameters of an Observation Point.";
      leaf name { type string; }
      leaf observationPointId {
        type uint32;
        description "If not configured, this parameter is set by the
          Monitoring Device.";
      }
      leaf observationDomainId {



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 50]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


        type uint32;
        mandatory true;
        description "The Observation Domain ID associates the
          Observation Point to an Observation Domain. Observation
          Points with identical Observation Domain ID belong to the
          same Observation Domain.";
      }
      choice OPType {
        mandatory true;
        container interface { uses interfaceParameters; }
        container linecard { uses linecardParameters; }
      }
      leaf-list selectionProcess {
        type keyref { path "/ipfix/selectionProcess/name"; }
        description "Selection Processes in this list process packets
          in parallel.";
      }
    }

    list selectionProcess {
      if-feature meter;
      key name;
      description "Parameters of a Selection Process.";
      leaf name { type string; }
      leaf selectionSequenceId {
        type uint64;
        description "The Selection Sequence ID must be unique within
          the Observation Domain.
          If not configured, this parameter is set by the monitoring
          device.";
        reference "draft-ietf-psamp-info-11";
      }
      list selector {
        key name;
        min-elements 1;
        ordered-by user;
        description "List of Selectors that define the action of the
          Selection Process on a single packet. The Selectors are
          serially invoked in the same order as they appear in this
          list.";
        leaf name { type string; }
        uses selectorParameters;
      }
      leaf-list selectionProcess {
        type keyref { path "/ipfix/selectionProcess/name"; }
        description "Selection Processes in this list receive the
          selected packets in parallel.";
      }



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 51]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


      leaf-list cache {
        type keyref { path "/ipfix/cache/name"; }
        description "Caches in this list receive the selected packets
          in parallel.";
      }
    }

    list cache {
      if-feature meter;
      key name;
      description "Parameters of a Cache.";
      leaf name { type string; }
      leaf cacheType {
        type cacheType;
        mandatory true;
      }
      leaf maxRecords {
        type uint32;
        description "If not configured, this parameter is set by the
          Monitoring Device.";
      }
      leaf activeTimeout {
        type uint32;
        units seconds;
        must "../cacheType!=immediate";
        description "If not configured, this parameter is set by the
          Monitoring Device.";
      }
      leaf inactiveTimeout {
        type uint32;
        units seconds;
        must "../cacheType!=permanent";
        description "If not configured, this parameter is set by the
          Monitoring Device.";
      }
      container cacheLayout { uses cacheLayoutParameters; }
      leaf-list exportingProcess {
        type keyref { path "/ipfix/exportingProcess/name"; }
        description "Records are exported by all Exporting Processes in
          the list.";
      }
      leaf activeFlows {
        type uint32;
        units flows;
        config false;
        description "Corresponds to
          ipfixMeteringProcessCacheActiveFlows in IPFIX-MIB.";
        reference "ietf-draft-ipfix-mib-05, section 7



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 52]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


          (ipfixMeteringProcessCacheActiveFlows)";
      }
      leaf inactiveFlows {
        type uint32;
        units flows;
        config false;
        description "Corresponds to
            ipfixMeteringProcessCacheInactiveFlows in IPFIX-MIB.";
        reference "ietf-draft-ipfix-mib-0, section 7
          (ipfixMeteringProcessCacheInactiveFlows)";
      }
      leaf dataRecords {
        type yang:counter64;
        units "Data Records";
        config false;
        description "Corresponds to
            ipfixMeteringProcessDataRecords in IPFIX-MIB.";
        reference "ietf-draft-ipfix-mib-0, section 7
          (ipfixMeteringProcessDataRecords)";
      }
    }

    list exportingProcess {
      if-feature exporter;
      key name;
      description "Parameters of an Exporting Process.";
      leaf name { type string; }
      leaf exportingProcessId {
        type uint32;
        description "If not configured, this parameter is set by the
          Monitoring Device.";
      }
      list destination {
        key name;

        leaf name { type string; }
        uses destinationParameters;
      }
      list fileWriter {
        if-feature fileWriter;
        key name;
        leaf name { type string; }
        uses fileWriterParameters;
      }
      list options {
        key name;
        leaf name { type string; }
        uses optionParameters;



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 53]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


      }
      list template {
        config false;
        uses templateParameters;
      }
      list transportSession {
        config false;
        uses transportSessionParameters;
      }
    }
  }
}


8.  Examples

   This section shows example configurations conforming to the YANG
   module specified in Section 7.

8.1.  PSAMP Device

   This configuration example contains two Selection Processes
   configured for the same Observation Point.  The first Selection
   Process implements two Selectors: a filter for UDP packets and a
   random sampler.  The second Selection Process implements an ICMP
   filter.  The outputs of both Selection Processes enter the same
   Cache.  The Cache Type is "immediate" resulting in the creation of a
   PSAMP Packet Report for every selected packet.  The associated
   Exporting Process exports to one Collector using PR-SCTP.  As the
   destination transport port is omitted, the standard IPFIX port 4739
   is used.  Exporting Process reliability statistics are reported using
   a user-defined Options Template.

   <ipfix xmlns="urn:ietf:params:xml:ns:ipfix-psamp-config">

     <observationPoint>
       <name>OP at linecard 3</name>
       <observationPointId>1</observationPointId>
       <observationDomainId>12345</observationDomainId>
       <linecard>
         <entPhysicalIndex>3</entPhysicalIndex>
       </linecard>
       <selectionProcess>Sampled UDP packets</selectionProcess>
       <selectionProcess>ICMP packets</selectionProcess>
     </observationPoint>

     <selectionProcess>
       <name>Sampled UDP packets</name>



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 54]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


       <selectionSequenceId>1</selectionSequenceId>
       <selector>
         <name>UDP filter</name>
         <selectorId>1</selectorId>
         <filterMatch>
           <ieId>4</ieId>
           <startValue>17</startValue>
           <stopValue>17</stopValue>
         </filterMatch>
       </selector>
       <selector>
         <name>10-out-of-100 sampler</name>
         <selectorId>2</selectorId>
         <sampRandOutOfN>
           <population>100</population>
           <sample>10</sample>
         </sampRandOutOfN>
       </selector>
       <cache>PSAMP cache</cache>
     </selectionProcess>

     <selectionProcess>
       <name>ICMP packets</name>
       <selectionSequenceId>2</selectionSequenceId>
       <selector>
         <name>ICMP filter</name>
         <selectorId>3</selectorId>
         <filterMatch>
           <ieId>4</ieId>
           <startValue>1</startValue>
           <stopValue>1</stopValue>
         </filterMatch>
       </selector>
       <cache>PSAMP cache</cache>
     </selectionProcess>

     <cache>
       <name>PSAMP cache</name>
       <cacheType>immediate</cacheType>
       <maxRecords>512</maxRecords>
       <cacheLayout>
         <cacheField>
           <name>Field 1</name>
           <ieId>313</ieId>
           <ieLength>64</ieLength>
         </cacheField>
         <cacheField>
           <name>Field 2</name>



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 55]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


           <ieId>154</ieId>
         </cacheField>
       </cacheLayout>
       <exportingProcess>The only exporter</exportingProcess>
     </cache>

     <exportingProcess>
       <name>The only exporter</name>
       <exportingProcessId>1</exportingProcessId>
       <destination>
         <name>PR-SCTP collector</name>
         <type>primary</type>
         <transportProtocol>sctp</transportProtocol>
         <destinationIpAddress>192.0.2.1</destinationIpAddress>
         <rateLimit>1000000</rateLimit>
         <timedReliability>500</timedReliability>
         <numberOfStreams>1</numberOfStreams>
       </destination>
       <options>
         <name>Options 1</name>
         <type>exportingReliability</type>
         <timeout>30000</timeout>
         <optionTemplate>
           <optionField>
             <name>Field 1</name>
             <ieName>exportingProcessId</ieName>
             <isScope/>
           </optionField>
           <optionField>
             <name>Field 2</name>
             <ieName>notSentPacketTotalCount</ieName>
           </optionField>
         </optionTemplate>
       </options>
     </exportingProcess>

   </ipfix>

8.2.  IPFIX Device

   This configuration example demonstrates the shared usage of a Cache
   for maintaining Flow Records from two different Observation Points.
   Packets are selected using different Sampling techniques: count-based
   Sampling for the first Observation Point and selection of all packets
   for the second Observation Point.  The Exporting Process sends the
   Flow Records to a primary destination using SCTP.  A UDP Collector is
   specified as secondary destination.  Exporting Process reliability
   statistics [RFC5101] and Selection Sequence Report Interpretation and



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 56]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   Selector Report Interpretation [I-D.ietf-psamp-protocol] are exported
   periodically using Options Templates chosen by the Monitoring Device.

  <ipfix xmlns="urn:ietf:params:xml:ns:ipfix-psamp-config">

    <observationPoint>
      <name>OP at eth0 (ingress)</name>
      <observationDomainId>12345</observationDomainId>
      <interface>
        <ifName>eth0</ifName>
        <direction>ingress</direction>
      </interface>
      <selectionProcess>Count-based packet selection</selectionProcess>
    </observationPoint>

    <observationPoint>
      <name>OP at eth1</name>
      <observationDomainId>12346</observationDomainId>
      <interface>
        <ifName>eth1</ifName>
      </interface>
      <selectionProcess>All packet selection</selectionProcess>
    </observationPoint>

    <selectionProcess>
      <name>Count-based packet selection</name>
      <selector>
        <name>Count-based sampler</name>
        <sampCountBased>
          <interval>1</interval>
          <spacing>99</spacing>
        </sampCountBased>
      </selector>
      <cache>Flow cache</cache>
    </selectionProcess>

    <selectionProcess>
      <name>All packet selection</name>
      <selector>
        <name>Select all</name>
        <selectAll/>
      </selector>
      <cache>Flow cache</cache>
    </selectionProcess>

    <cache>
      <name>Flow cache</name>
      <cacheType>timeout</cacheType>



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 57]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


      <maxRecords>4096</maxRecords>
      <activeTimeout>5</activeTimeout>
      <inactiveTimeout>10</inactiveTimeout>
      <cacheLayout>
        <cacheField>
          <name>Field 1</name>
          <ieName>sourceIPv4Address</ieName>
          <isFlowKey/>
        </cacheField>
        <cacheField>
          <name>Field 2</name>
          <ieName>destinationIPv4Address</ieName>
          <isFlowKey/>
        </cacheField>
        <cacheField>
          <name>Field 3</name>
          <ieName>transportProtocol</ieName>
          <isFlowKey/>
        </cacheField>
        <cacheField>
          <name>Field 4</name>
          <ieName>sourceTransportPort</ieName>
          <isFlowKey/>
        </cacheField>
        <cacheField>
          <name>Field 5</name>
          <ieName>destinationTransportPort</ieName>
          <isFlowKey/>
        </cacheField>
        <cacheField>
          <name>Field 6</name>
          <ieName>flowStartMilliSeconds</ieName>
        </cacheField>
        <cacheField>
          <name>Field 7</name>
          <ieName>flowEndSeconds</ieName>
        </cacheField>
        <cacheField>
          <name>Field 8</name>
          <ieName>octetDeltaCount</ieName>
        </cacheField>
        <cacheField>
          <name>Field 9</name>
          <ieName>packetDeltaCount</ieName>
        </cacheField>
      </cacheLayout>
      <exportingProcess>SCTP export with UDP backup</exportingProcess>
    </cache>



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 58]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


    <exportingProcess>
      <name>SCTP export with UDP backup</name>
      <destination>
        <name>SCTP destination</name>
        <type>primary</type>
        <transportProtocol>sctp</transportProtocol>
        <destinationIpAddress>192.0.2.1</destinationIpAddress>
        <destinationPort>4739</destinationPort>
        <orderedDelivery>true</orderedDelivery>
      </destination>
      <destination>
        <name>UDP destination</name>
        <type>secondary</type>
        <transportProtocol>udp</transportProtocol>
        <destinationIpAddress>192.0.2.2</destinationIpAddress>
        <destinationPort>4739</destinationPort>
        <sourceIpAddress>127.0.0.1</sourceIpAddress>
        <templateRefreshTimeout>300</templateRefreshTimeout>
        <optionTemplateRefreshTimeout>300</optionTemplateRefreshTimeout>
      </destination>
      <options>
        <name>Options 1</name>
        <type>selectionSequence</type>
        <timeout>30000</timeout>
      </options>
      <options>
        <name>Options 2</name>
        <type>exportingReliability</type>
        <timeout>6000</timeout>
      </options>
    </exportingProcess>

  </ipfix>

8.3.  Export of Flow Records and Packet Reports

   This configuration example demonstrates the combined export of Flow
   Records and Packet Reports for a single Observation Point.  A
   Selection Process applies random Sampling to the stream of observed
   packets.  The output is passed to a Cache generating Flow Records.
   In parallel, the output is passed to a second Selection Process which
   discards all non-ICMP packets.  A second Cache generates Packet
   Reports of the retained ICMP packets.  The output of both caches is
   exported to a single Collector using SCTP.

   <ipfix xmlns="urn:ietf:params:xml:ns:ipfix-psamp-config">

     <observationPoint>



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 59]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


       <name>OP at linecard 3</name>
       <observationDomainId>9876</observationDomainId>
       <linecard>
         <entPhysicalIndex>3</entPhysicalIndex>
       </linecard>
       <selectionProcess>Sampling</selectionProcess>
     </observationPoint>

     <selectionProcess>
       <name>Sampling</name>
       <selector>
         <name>Random sampler</name>
         <sampUniProb>
           <probability>4294967</probability>
         </sampUniProb>
       </selector>
       <selectionProcess>ICMP</selectionProcess>
       <cache>IPFIX cache</cache>
     </selectionProcess>

     <selectionProcess>
       <name>ICMP</name>
       <selector>
         <name>ICMP filter</name>
         <filterMatch>
           <ieId>4</ieId>
           <startValue>1</startValue>
           <stopValue>1</stopValue>
         </filterMatch>
       </selector>
       <cache>Packet cache</cache>
     </selectionProcess>

     <cache>
       <name>Flow cache</name>
       <cacheType>timeout</cacheType>
       <maxRecords>4096</maxRecords>
       <activeTimeout>5</activeTimeout>
       <inactiveTimeout>10</inactiveTimeout>
       <cacheLayout>
         <cacheField>
           <name>Field 1</name>
           <ieName>sourceIPv4Address</ieName>
           <isFlowKey/>
         </cacheField>
         <cacheField>
           <name>Field 2</name>
           <ieName>destinationIPv4Address</ieName>



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 60]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


           <isFlowKey/>
         </cacheField>
         <cacheField>
           <name>Field 6</name>
           <ieName>flowStartMilliSeconds</ieName>
         </cacheField>
         <cacheField>
           <name>Field 7</name>
           <ieName>flowEndSeconds</ieName>
         </cacheField>
         <cacheField>
           <name>Field 8</name>
           <ieName>octetDeltaCount</ieName>
         </cacheField>
         <cacheField>
           <name>Field 9</name>
           <ieName>packetDeltaCount</ieName>
         </cacheField>
       </cacheLayout>
       <exportingProcess>Export</exportingProcess>
     </cache>

     <cache>
       <name>Packet cache</name>
       <cacheType>immediate</cacheType>
       <maxRecords>512</maxRecords>
       <cacheLayout>
         <cacheField>
           <name>Field 1</name>
           <ieId>313</ieId>
           <ieLength>64</ieLength>
         </cacheField>
         <cacheField>
           <name>Field 2</name>
           <ieId>154</ieId>
         </cacheField>
       </cacheLayout>
       <exportingProcess>Export</exportingProcess>
     </cache>

     <exportingProcess>
       <name>Export</name>
       <destination>
         <name>SCTP collector</name>
         <transportProtocol>sctp</transportProtocol>
         <destinationIpAddress>192.0.2.1</destinationIpAddress>
         <timedReliability>0</timedReliability>
         <numberOfStreams>2</numberOfStreams>



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 61]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


       </destination>
     </exportingProcess>

   </ipfix>

   The following modifications lead to a similar but not identical
   configuration:

     ...
     <observationPoint>
       <name>OP at linecard 3</name>
       <linecard>
         <entPhysicalIndex>3</entPhysicalIndex>
       </linecard>
       <selectionProcess>Sampling</selectionProcess>
       <selectionProcess>Sampled ICMP packets</selectionProcess>
     </observationPoint>
     ...
     <selectionProcess>
       <name>Sampling</name>
       <selector>
         <name>Random sampler</name>
         <sampUniProb>
           <probability>4294967</probability>
         </sampUniProb>
       </selector>
       <cache>IPFIX cache</cache>
     </selectionProcess>

     <selectionProcess>
       <name>Sampled ICMP packets</name>
       <selector>
         <name>Random sampler</name>
         <sampUniProb>
           <probability>4294967</probability>
         </sampUniProb>
       </selector>
       <selector>
         <name>ICMP filter</name>
         <filterMatch>
           <ieId>4</ieId>
           <startValue>1</startValue>
           <stopValue>1</stopValue>
         </filterMatch>
       </selector>
       <cache>Packet cache</cache>
     </selectionProcess>
     ...



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 62]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   In this case, the random sampler is implemented in two different
   Selection Processes, leading to different sets of selected packets.
   As a consequence, the set of packets accounted in the Flow Cache is
   not identical to the set of packets from which the ICMP Packet
   Reports are generated.

8.4.  Collector and File Writer

   This configuration example configures a Collector which writes the
   received data to a file.

   <ipfix xmlns="urn:ietf:params:xml:ns:ipfix-psamp-config">

     <collectingProcess>
       <name>SCTP collector</name>
       <receiver>
         <name>Listening port 4739</name>
         <transportProtocol>sctp</transportProtocol>
         <localIpAddress>192.0.2.1</localIpAddress>
         <localPort>4739</localPort>
         <maxAllowedStreams>64</maxAllowedStreams>
       </receiver>
       <exportingProcess>File writer</exportingProcess>
     </collectingProcess>

     <exportingProcess>
       <name>File writer</name>
       <fileWriter>
         <name>Write to /tmp folder</name>
         <type>primary</type>
         <uri>file://tmp/collected-records.ipfix</uri>
       </fileWriter>
     </exportingProcess>

   </ipfix>

8.5.  Deviations

   Assume that a Monitoring Devices does not support the configuration
   of Observation Domain ID and Observation Point ID.  It supports a
   single Observation Domain with ID=1 to which two interfaces can be
   assigned.  The Observation Point ID is identical to the ifIndex.
   Linecards are not installed.

   The following YANG module specifies these deviations.






Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 63]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   module my-ipfix-psamp-deviation {
     namespace "urn:my-company:xml:ns:ipfix-psamp-config";
     prefix my;

     import ipfix-psamp { prefix ipfix; }

     deviation /ipfix:ipfix/ipfix:observationPoint/ipfix:linecard {
       deviate not-supported;
     }
     deviation /ipfix:ipfix/ipfix:observationPoint {
       deviate add {
         must "ipfix:observationDomainId=1";
       }
       deviate add {
         must "ipfix:interface/ipfix:ifIndex=1
           or ipfix:interface/ipfix:ifIndex=2";
       }
     }
     deviation
         /ipfix:ipfix/ipfix:observationPoint/ipfix:observationPointId {
       deviate add {
         must "current()=../ipfix:interface/ipfix:ifIndex";
       }
     }
   }


9.  Security Considerations

   The IPFIX/PSAMP configuration data model does not introduce security
   issues.  Configuration data encoded according to the configuration
   data model may contain sensitive information.  Therefore, if
   configuration data is transmitted, the underlying protocol must apply
   appropriate procedures to guarantee the integrity and confidentiality
   of the data.  Particularly, if the NETCONF protocol is used to
   configure Monitoring Devices, the security considerations of the
   NETCONF protocol apply [RFC4741].


10.  IANA Considerations

   This document has no actions for IANA.


Appendix A.  Acknowledgements

   The authors thank Martin Bjorklund for helping specifying the
   configuration data model in YANG.



Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 64]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


11.  References

11.1.  Normative References

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

   [RFC5101]  Claise, B., "Specification of the IP Flow Information
              Export (IPFIX) Protocol for the Exchange of IP Traffic
              Flow Information", RFC 5101, January 2008.

   [RFC5102]  Quittek, J., Bryant, S., Claise, B., Aitken, P., and J.
              Meyer, "Information Model for IP Flow Information Export",
              RFC 5102, January 2008.

   [I-D.ietf-psamp-protocol]
              Claise, B., "Packet Sampling (PSAMP) Protocol
              Specifications", draft-ietf-psamp-protocol-09 (work in
              progress), December 2007.

   [I-D.ietf-psamp-info]
              Dietz, T., Claise, B., Aitken, P., Dressler, F., and G.
              Carle, "Information Model for Packet Sampling Exports",
              draft-ietf-psamp-info-11 (work in progress), October 2008.

   [W3C.REC-xml-20040204]
              Paoli, J., Maler, E., Bray, T., Sperberg-McQueen, C., and
              F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third
              Edition)", World Wide Web Consortium FirstEdition REC-xml-
              20040204, February 2004,
              <http://www.w3.org/TR/2004/REC-xml-20040204>.

   [I-D.ietf-netmod-yang]
              Bjorklund, M., "YANG - A data modeling language for
              NETCONF", draft-ietf-netmod-yang-04 (work in progress),
              March 2009.

   [I-D.ietf-netmod-yang-types]
              Schoenwaelder, J., "Common YANG Data Types",
              draft-ietf-netmod-yang-types-01 (work in progress),
              November 2008.

   [UML]      "OMG Unified Modeling Language (OMG UML), Superstructure,
              V2.1.2", OMG formal/2007-11-02, November 2007.







Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 65]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


11.2.  Informative References

   [W3C.REC-xmlschema-0-20041028]
              Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer
              Second Edition", World Wide Web Consortium
              Recommendation REC-xmlschema-0-20041028, October 2004,
              <http://www.w3.org/TR/2004/REC-xmlschema-0-20041028>.

   [RFC4741]  Enns, R., "NETCONF Configuration Protocol", RFC 4741,
              December 2006.

   [W3C.REC-soap12-part1-20070427]
              Karmarkar, A., Mendelsohn, N., Gudgin, M., Nielsen, H.,
              Lafon, Y., Hadley, M., and J. Moreau, "SOAP Version 1.2
              Part 1: Messaging Framework (Second Edition)", World Wide
              Web Consortium Recommendation REC-soap12-part1-20070427,
              April 2007,
              <http://www.w3.org/TR/2007/REC-soap12-part1-20070427>.

   [I-D.ietf-ipfix-as]
              Zseby, T., "IPFIX Applicability", draft-ietf-ipfix-as-12
              (work in progress), July 2007.

   [I-D.ietf-ipfix-architecture]
              Sadasivan, G., "Architecture for IP Flow Information
              Export", draft-ietf-ipfix-architecture-12 (work in
              progress), September 2006.

   [I-D.ietf-ipfix-mib]
              Dietz, T., Kobayashi, A., and B. Claise, "Definitions of
              Managed Objects for IP Flow Information Export",
              draft-ietf-ipfix-mib-06 (work in progress), March 2009.

   [I-D.ietf-ipfix-file]
              Trammell, B., Boschi, E., Mark, L., Zseby, T., and A.
              Wagner, "Specification of the IPFIX File Format",
              draft-ietf-ipfix-file-03 (work in progress), October 2008.

   [I-D.ietf-ipfix-reducing-redundancy]
              Boschi, E., "Reducing Redundancy in IP Flow Information
              Export (IPFIX) and Packet  Sampling (PSAMP) Reports",
              draft-ietf-ipfix-reducing-redundancy-04 (work in
              progress), May 2007.

   [RFC3917]  Quittek, J., Zseby, T., Claise, B., and S. Zander,
              "Requirements for IP Flow Information Export (IPFIX)",
              RFC 3917, October 2004.




Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 66]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


   [RFC3758]  Stewart, R., Ramalho, M., Xie, Q., Tuexen, M., and P.
              Conrad, "Stream Control Transmission Protocol (SCTP)
              Partial Reliability Extension", RFC 3758, May 2004.

   [RFC4960]  Stewart, R., "Stream Control Transmission Protocol",
              RFC 4960, September 2007.

   [I-D.ietf-psamp-framework]
              Chiou, D., Claise, B., Duffield, N., Greenberg, A.,
              Grossglauser, M., Rexford, J., and S. Goldberg, "A
              Framework for Packet Selection and Reporting",
              draft-ietf-psamp-framework-13 (work in progress),
              June 2008.

   [I-D.ietf-psamp-mib]
              Dietz, T. and B. Claise, "Definitions of Managed Objects
              for Packet Sampling", draft-ietf-psamp-mib-06 (work in
              progress), June 2006.

   [I-D.ietf-psamp-sample-tech]
              Zseby, T., "Sampling and Filtering Techniques for IP
              Packet Selection", draft-ietf-psamp-sample-tech-11 (work
              in progress), July 2008.

   [RFC2863]  McCloghrie, K. and F. Kastenholz, "The Interfaces Group
              MIB", RFC 2863, June 2000.

   [RFC4133]  Bierman, A. and K. McCloghrie, "Entity MIB (Version 3)",
              RFC 4133, August 2005.

   [YANG-WEB]
              Bjoerklund, M., "YANG WebHome",
              Homepage http://www.yang-central.org, March 2009.


















Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 67]


Internet-Draft    IPFIX/PSAMP Configuration Data Model        March 2009


Authors' Addresses

   Gerhard Muenz
   Technische Universitaet Muenchen
   Department of Informatics
   Chair for Network Architectures and Services (I8)
   Boltzmannstr. 3
   Garching  D-85748
   DE

   Phone: +49 89 289-18008
   Email: muenz@net.in.tum.de
   URI:   http://www.net.in.tum.de/~muenz


   Benoit Claise
   Cisco Systems, Inc.
   De Kleetlaan 6a b1
   Diegem  1831
   BE

   Phone: +32 2 704 5622
   Email: bclaise@cisco.com




























Muenz & Claise  draft-ietf-ipfix-configuration-model-02.txt    [Page 68]