IP Flow Information Export WG S. Leinen Internet-Draft SWITCH Expires: April 24, 2005 October 24, 2004 IP Flow Information Export (IPFIX) Over TCP draft-leinen-ipfix-tcp-01 Status of this Memo This document is an Internet-Draft and is subject to all provisions of section 3 of RFC 3667. By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she 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. 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 April 24, 2005. Copyright Notice Copyright (C) The Internet Society (2004). Abstract This document describes how the IP Flow Information Export (IPFIX) protocol should be mapped to the Transmission Control Protocol (TCP), including how Transport Layer Security (TLS) can be used with this mapping. Leinen Expires April 24, 2005 [Page 1] Internet-Draft IPFIX over TCP October 2004 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. REVISION HISTORY . . . . . . . . . . . . . . . . . . . . . . . 3 2.1 Changes between -00 and -01 . . . . . . . . . . . . . . . 3 3. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1 Connection Establishment . . . . . . . . . . . . . . . . . 3 3.2 Data Transmission . . . . . . . . . . . . . . . . . . . . 3 3.2.1 IPFIX Message Encoding . . . . . . . . . . . . . . . . 4 3.2.2 Templates . . . . . . . . . . . . . . . . . . . . . . 4 3.2.3 Congestion Handling . . . . . . . . . . . . . . . . . 4 3.3 Connection Release . . . . . . . . . . . . . . . . . . . . 4 3.4 Fail-Over . . . . . . . . . . . . . . . . . . . . . . . . 5 3.5 TLS Usage . . . . . . . . . . . . . . . . . . . . . . . . 5 3.5.1 Starting a session using TLS . . . . . . . . . . . . . 5 3.5.2 Authentication . . . . . . . . . . . . . . . . . . . . 5 3.5.3 Closing a session using TLS . . . . . . . . . . . . . 6 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6.1 Normative References . . . . . . . . . . . . . . . . . . . . 6 6.2 Informative References . . . . . . . . . . . . . . . . . . . 7 Author's Address . . . . . . . . . . . . . . . . . . . . . . . 7 Intellectual Property and Copyright Statements . . . . . . . . 8 Leinen Expires April 24, 2005 [Page 2] Internet-Draft IPFIX over TCP October 2004 1. Introduction IP Flow Information Export (IPFIX) [I-D.ietf-ipfix-protocol] 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 [RFC2960] with the Partial Reliability extension (SCTP-PR) [RFC3758]. In this document, we specify an alternate mapping of IPFIX to TCP [RFC0793], which can be used when SCTP-PR isn't available, and reliable transmission and/or congestion handling are required. In addition, we describe how Transport Layer Security (TLS) [RFC2246] can be used with this mapping to provide authentication and protect privacy. 2. REVISION HISTORY 2.1 Changes between -00 and -01 The directionality was inverted. In -00, the collector would initiate the connection, while in -01 the connection would be initiated by the exporter. Added a description (Section 3.5) on how to use TLS to protect and/or authenticate an IPFIX-over-TCP session. 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. 3.1 Connection Establishment The IPFIX exporter initiates a TCP connection to the collector. By default, the collector 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). 3.2 Data Transmission Once a TCP connection is established, the exporter starts sending Leinen Expires April 24, 2005 [Page 3] Internet-Draft IPFIX over TCP October 2004 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 domains, 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. 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. When an IPFIX Exporting Process has records to export, but detects that transmission to TCP is temporarily impossible ("would block"), it can either block 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 Leinen Expires April 24, 2005 [Page 4] Internet-Draft IPFIX over TCP October 2004 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. 3.4 Fail-Over When a collector detects that the TCP connection to the exporter is broken, it MUST continue to listen for a new connection. When an exporter detects that the TCP connection to the collector 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. 3.5 TLS Usage Configuration of both the exporter and the collector may specify that Transport Layer Security (TLS) [RFC2246] must be used. 3.5.1 Starting a session using TLS When an exporter opens a TCP connection to a collector for which use of TLS has been configured, the exporter MUST immediately start a TLS negotiation on this connection. The exporter SHOULD immediately abort the connection when TLS negotiation fails for some reason. When a collector accepts a connection from an exporter for which use of TLS has been configured, the collector MUST wait for the exporter to start negotiating TLS. 3.5.2 Authentication Exporter and collectors with TLS support SHOULD allow the configuration of both the permitted levels of encryption, and of the authorized identities to which data should be exported or, respectively, from which data should be received. After successful TLS negotiation, the collector and exporter should each decide whether the required level of authentication and/or privacy was achieved. If this is not the case, the connection MUST be closed immediately; an exporter MUST NOT send any IPFIX data, and an collector MUST ignore any IPFIX data received. Leinen Expires April 24, 2005 [Page 5] Internet-Draft IPFIX over TCP October 2004 3.5.3 Closing a session using TLS When TLS is used, the exporter SHOULD always send a close_notify alert before closing the TCP connection. 4. Security Considerations Exporters and collectors SHOULD implement TLS as described in Section 3.5 to protect confidentiality of the exported data, and to optionally authenticate peers using certificates. Exporters and collectors MUST implement IPsec [RFC2401] with the Authentication Header (AH) [RFC2402] to ensure authenticity of the exporter and the collector. Exporters SHOULD implement IPsec Encapsulating Security Payload (ESP) [RFC2406] 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) [RFC2409] 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 be used as a default for the IPFIX over SCTP and IPFIX over UDP mappings [I-D.ietf-ipfix-protocol]. 6. References 6.1 Normative References [I-D.ietf-ipfix-protocol] Claise, B., "IPFIX Protocol Specifications", draft-ietf-ipfix-protocol-04 (work in progress), July 2004. [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the Internet Protocol", RFC 2401, November 1998. [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", Leinen Expires April 24, 2005 [Page 6] Internet-Draft IPFIX over TCP October 2004 RFC 2246, January 1999. [RFC2402] Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402, November 1998. [RFC2406] Kent, S. and R. Atkinson, "IP Encapsulating Security Payload (ESP)", RFC 2406, November 1998. [RFC2409] Harkins, D. and D. Carrel, "The Internet Key Exchange (IKE)", RFC 2409, November 1998. 6.2 Informative References [RFC2960] 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. [RFC3758] Stewart, R., Ramalho, M., Xie, Q., Tuexen, M. and P. Conrad, "Stream Control Transmission Protocol (SCTP) Partial Reliability Extension", RFC 3758, May 2004. Author's Address Simon Leinen SWITCH Limmatquai 138 P.O. Box CH-8021 Zurich Switzerland Phone: +41 1 268 1536 EMail: simon@switch.ch Leinen Expires April 24, 2005 [Page 7] Internet-Draft IPFIX over TCP October 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 http://www.ietf.org/ipr. 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 ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 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. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Leinen Expires April 24, 2005 [Page 8]