[Docs] [txt|pdf] [Tracker] [Email] [Nits]

Versions: 00 01

IP Flow Information Export Working                             S. Leinen
Group                                                             SWITCH
Internet-Draft                                             July 12, 2004
Expires: January 10, 2005

              IP Flow Information Export (IPFIX) Over TCP

Status of this Memo

   By submitting this Internet-Draft, I certify that any applicable
   patent or other IPR claims of which I am aware have been disclosed,
   and any of which I become aware will be disclosed, in accordance with
   RFC 3668.

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

   The list of Internet-Draft Shadow Directories can be accessed at

   This Internet-Draft will expire on January 10, 2005.

Copyright Notice

   Copyright (C) The Internet Society (2004).  All Rights Reserved.


   This documents describes how the IP Flow Information Export (IPFIX)
   protocol should be mapped to the Transmission Control Protocol (TCP).

1.  Introduction

   IP Flow Information Export (IPFIX) [1] is a protocol to convey
   accounting information from an exporter to a collector.  It has been
   proposed that the protocol operate over the Stream Control
   Transmission Protocol [7] with the Partial Reliability extension

Leinen                  Expires January 10, 2005                [Page 1]

Internet-Draft               IPFIX over TCP                    July 2004

   (SCTP-PR) [8].

   In this document, we specify an alternate mapping of IPFIX to TCP
   [2], which can be used when SCTP-PR isn't available, and reliable
   transmission and/or congestion handling are required.


2.1  Handshake

   Should we introduce a handshake sequence at the start of the
   connection? A simple ASCII-based handshake could be used to request

2.2  TLS

   It would make sense to add TLS support even in the absence of a
   handshake.  It would be the responsibility of the collector
   (connection initiator) to know whether TLS setup is required.

2.3  Directionality

   The fact that the connection is initiated by the collector is a
   departure from the way it is done in the SCTP mapping.  Personally I
   find it more natural this way.  There are not very many practical
   differences anyway.  Collector-initiated connections are easier to
   handle when the collector is behind a NAT or typical firewall, while
   exporter-initiated connections are easier when the exporter is behind
   a NAT or firewall.  Collector-initiated connections are faster to
   restart when a collector terminates, exporter-initated connections
   are faster to restart when an exporter restarts.

   One difference is that in the case of multiple observation domains,
   one may want to establish parallel IPFIX export connections.  The
   current definition makes this difficult.  Perhaps the most natural
   way to do this would be to have the exporter initiate the connection,
   require the collector to handle multiple connections, and allow the
   exporter to establish one connection per observation domain.

3.  Operation

   The following sections describe how an IPFIX-over-TCP connection is
   created, how IPFIX data is transferred over it, and how a connection
   is to be terminated.  In the following, the term "exporter" refers to
   an IPFIX exporting process, while a "collector" refers to an IPFIX
   collecting process.

Leinen                  Expires January 10, 2005                [Page 2]

Internet-Draft               IPFIX over TCP                    July 2004

3.1  Connection Establishment

   The IPFIX collector initiates a TCP connection to the exporter.  By
   default, the exporter listens for connections on TCP port XXXX (to be
   assigned by IANA).  It MUST be possible to configure the exporter to
   listen on a different TCP port.

   An exporter MAY support more than one active connection to different
   collectors (including the case of different collecting processes on
   the same host).

   It MUST be possible to configure, on an exporter, which collector(s)
   are allowed to establish a connection.  It SHOULD be possible to
   configure this in terms of strong identities such as IKE [6]
   public-key certificates or pre-shared keys.  An exporter SHOULD
   detect and log unauthorized connection attempts.

3.2  Data Transmission

   Once a TCP connection is established, the exporter starts sending
   IPFIX messages to the collector.

3.2.1  IPFIX Message Encoding

   IPFIX Messages are sent over the TCP connection without any special
   encoding.  The LENGTH field in the message header defines the end of
   each message and thus the start of the next message.  This means that
   IPFIX messages cannot be interleaved.

   The 16-bit LENGTH field limits the length of a message to 65536
   octets including the header.  A collector MUST be able to handle
   message lengths of up to 65536 octets.

   If an exporter exports data from multiple observation domain, it
   should be careful to choose message lengths appropriately to avoid
   head-of-line blocking between different observation domains.

3.2.2  Templates

   For each template, the exporter SHOULD send the Template Record
   before exporting Data Records that refer to this template.

   A collector MUST record all Template and Option Template Records for
   the duration of the connection, as an exporter is not required to
   re-export templates.

Leinen                  Expires January 10, 2005                [Page 3]

Internet-Draft               IPFIX over TCP                    July 2004

3.2.3  Congestion Handling

   TCP will detect congestion anywhere in the end-to-end path between
   the exporter and the collector, and limit the transfer rate
   accordingly.  Every time an IPFIX exporter has flow data to export,
   but notices that transmission to TCP is temporarily impossible
   ("would block"), it basically has two possibilities: Either it can
   wait until sending is possible again, or it can decide to drop the
   flow export data.  In the latter case, the dropped export data MUST
   be accounted for, so that the amount of dropped export data can later
   be exported in an option data record.

   When an exporter finds that the rate at which flow records should be
   exported is consistently higher than the rate at which TCP permits to
   send, it SHOULD adapt the metering process so that it generates a
   lower amount of data, for example by increasing the sampling
   interval, or by increasing the amount of aggregation.  If it does
   this, the exporter SHOULD periodically attempt to switch back to the
   original metering configuration when congestion subsides.

3.3  Connection Release

   When an exporter has no more data to send, it SHOULD close the TCP
   connection normally.

   When a collector no longer wants to receive IPFIX messages, it SHOULD
   close its end of the connection.  The collector SHOULD continue to
   read IPFIX messages until the exporter has closed its end.

   When an exporter detects that the TCP connection to the collector is
   broken, it MUST continue to listen for a new connection.

   When a collector detects that the TCP connection to the exporter is
   broken, it SHOULD try to re-establish the connection.  Connection
   timeouts and retry schedules SHOULD be configurable.  In the default
   configuration, a collector MUST NOT attempt to establish a connection
   more frequently than once per minute.

4.  Security Considerations

   In the current proposal, there is no handshake protocol once a TCP
   connection is established, so negotiation-based transport-layer
   security protocols such as TLS [9] cannot be used in a
   straightforward manner to ensure authenticity and confidentiality.

   Exporters and collectors MUST implement IPSEC [3] with the
   Authentication Header (AH) [4] to ensure authenticity of the exporter
   and the collector.  Exporters SHOULD implement IPSEC Encapsulating

Leinen                  Expires January 10, 2005                [Page 4]

Internet-Draft               IPFIX over TCP                    July 2004

   Security Payload (ESP) [5] to ensure confidentiality of the exported
   data.  The use of AH and ESP MUST be configurable for each exporter/
   collector pair.

   Exporters and collectors MUST implement the Internet Key Exchange
   (IKE) [6] protocol with pre-shared keys and public-key certificates.
   The use of these identities is described in Section 3.1.

5.  IANA Considerations

   No new registry is required for this specific protocol mapping.

   IANA should assign a well-known TCP port number for IPFIX over TCP.
   It is recommended that the same well-known port number is used as a
   default for the IPFIX over SCTP [1] and IPFIX over UDP mappings.

6.  References

6.1  Normative References

   [1]  Claise, B., "IPFIX Protocol Specifications",
        draft-ietf-ipfix-protocol-03 (work in progress), February 2004.

   [2]  Postel, J., "Transmission Control Protocol", STD 7, RFC 793,
        September 1981.

   [3]  Kent, S. and R. Atkinson, "Security Architecture for the
        Internet Protocol", RFC 2401, November 1998.

   [4]  Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402,
        November 1998.

   [5]  Kent, S. and R. Atkinson, "IP Encapsulating Security Payload
        (ESP)", RFC 2406, November 1998.

   [6]  Harkins, D. and D. Carrel, "The Internet Key Exchange (IKE)",
        RFC 2409, November 1998.

6.2  Informative References

   [7]  Stewart, R., Xie, Q., Morneault, K., Sharp, C., Schwarzbauer,
        H., Taylor, T., Rytina, I., Kalla, M., Zhang, L. and V. Paxson,
        "Stream Control Transmission Protocol", RFC 2960, October 2000.

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

Leinen                  Expires January 10, 2005                [Page 5]

Internet-Draft               IPFIX over TCP                    July 2004

   [9]  Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC
        2246, January 1999.

Author's Address

   Simon Leinen
   Limmatquai 138
   P.O. Box
   CH-8021 Zurich

   Phone: +41 1 268 1536
   EMail: simon@switch.ch

Leinen                  Expires January 10, 2005                [Page 6]

Internet-Draft               IPFIX over TCP                    July 2004

Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at

Disclaimer of Validity

   This document and the information contained herein are provided on an

Copyright Statement

   Copyright (C) The Internet Society (2004).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.


   Funding for the RFC Editor function is currently provided by the
   Internet Society.

Leinen                  Expires January 10, 2005                [Page 7]

Html markup produced by rfcmarkup 1.129b, available from https://tools.ietf.org/tools/rfcmarkup/