| < draft-pauly-ipsecme-tcp-encaps-03.txt | draft-pauly-ipsecme-tcp-encaps-04.txt > | |||
|---|---|---|---|---|
| Network T. Pauly | Network T. Pauly | |||
| Internet-Draft Apple Inc. | Internet-Draft Apple Inc. | |||
| Intended status: Standards Track S. Touati | Intended status: Standards Track S. Touati | |||
| Expires: August 18, 2016 Ericsson | Expires: October 27, 2016 Ericsson | |||
| R. Mantha | R. Mantha | |||
| Cisco Systems | Cisco Systems | |||
| February 15, 2016 | April 25, 2016 | |||
| TCP Encapsulation of IKEv2 and IPSec Packets | TCP Encapsulation of IKEv2 and IPSec Packets | |||
| draft-pauly-ipsecme-tcp-encaps-03 | draft-pauly-ipsecme-tcp-encaps-04 | |||
| Abstract | Abstract | |||
| This document describes a method to transport IKEv2 and IPSec packets | This document describes a method to transport IKEv2 and IPSec packets | |||
| over a TCP connection for traversing network middleboxes that may | over a TCP connection for traversing network middleboxes that may | |||
| block IKEv2 negotiation over UDP. This method, referred to as TCP | block IKEv2 negotiation over UDP. This method, referred to as TCP | |||
| encapsulation, involves sending all packets for tunnel establishment | encapsulation, involves sending all packets for tunnel establishment | |||
| as well as tunneled packets over a TCP connection. This method is | as well as tunneled packets over a TCP connection. This method is | |||
| intended to be used as a fallback option when IKE cannot be | intended to be used as a fallback option when IKE cannot be | |||
| negotiated over UDP. | negotiated over UDP. | |||
| skipping to change at page 1, line 39 ¶ | skipping to change at page 1, line 39 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on August 18, 2016. | This Internet-Draft will expire on October 27, 2016. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2016 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 19 ¶ | skipping to change at page 2, line 19 ¶ | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 1.1. Prior Work and Motivation . . . . . . . . . . . . . . . . 3 | 1.1. Prior Work and Motivation . . . . . . . . . . . . . . . . 3 | |||
| 1.2. Requirements Language . . . . . . . . . . . . . . . . . . 4 | 1.2. Requirements Language . . . . . . . . . . . . . . . . . . 4 | |||
| 2. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 3. TCP-Encapsulated Header Formats . . . . . . . . . . . . . . . 5 | 3. TCP-Encapsulated Header Formats . . . . . . . . . . . . . . . 5 | |||
| 3.1. TCP-Encapsulated IKEv2 Header Format . . . . . . . . . . 5 | 3.1. TCP-Encapsulated IKEv2 Header Format . . . . . . . . . . 5 | |||
| 3.2. TCP-Encapsulated ESP Header Format . . . . . . . . . . . 6 | 3.2. TCP-Encapsulated ESP Header Format . . . . . . . . . . . 6 | |||
| 4. Applicability . . . . . . . . . . . . . . . . . . . . . . . . 6 | 4. TCP-Encapsulated Stream Prefix . . . . . . . . . . . . . . . 6 | |||
| 5. Connection Establishment and Teardown . . . . . . . . . . . . 6 | 5. Applicability . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 6. Interaction with NAT Detection Payloads . . . . . . . . . . . 8 | 6. Connection Establishment and Teardown . . . . . . . . . . . . 7 | |||
| 7. Using MOBIKE with TCP encapsulation . . . . . . . . . . . . . 8 | 7. Interaction with NAT Detection Payloads . . . . . . . . . . . 8 | |||
| 8. Using IKEv2 Message Fragmentation with TCP encapsulation . . 8 | 8. Using MOBIKE with TCP encapsulation . . . . . . . . . . . . . 8 | |||
| 9. Considerations for Keep-alives and DPD . . . . . . . . . . . 9 | 9. Using IKEv2 Message Fragmentation with TCP encapsulation . . 9 | |||
| 10. Middlebox Considerations . . . . . . . . . . . . . . . . . . 9 | 10. Considerations for Keep-alives and DPD . . . . . . . . . . . 9 | |||
| 11. Performance Considerations . . . . . . . . . . . . . . . . . 10 | 11. Middlebox Considerations . . . . . . . . . . . . . . . . . . 9 | |||
| 11.1. TCP-in-TCP . . . . . . . . . . . . . . . . . . . . . . . 10 | 12. Performance Considerations . . . . . . . . . . . . . . . . . 10 | |||
| 11.2. Added Reliability for Unreliable Protocols . . . . . . . 10 | 12.1. TCP-in-TCP . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 11.3. Encryption Overhead . . . . . . . . . . . . . . . . . . 10 | 12.2. Added Reliability for Unreliable Protocols . . . . . . . 10 | |||
| 11.4. Quality of Service Markings . . . . . . . . . . . . . . 11 | 12.3. Quality of Service Markings . . . . . . . . . . . . . . 10 | |||
| 11.5. Maximum Segment Size . . . . . . . . . . . . . . . . . . 11 | 12.4. Maximum Segment Size . . . . . . . . . . . . . . . . . . 10 | |||
| 12. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | 13. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | |||
| 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 11 | 15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 16. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 15.1. Normative References . . . . . . . . . . . . . . . . . . 12 | 16.1. Normative References . . . . . . . . . . . . . . . . . . 11 | |||
| 15.2. Informative References . . . . . . . . . . . . . . . . . 12 | 16.2. Informative References . . . . . . . . . . . . . . . . . 11 | |||
| Appendix A. Example exchanges of TCP Encapsulation with TLS . . 13 | Appendix A. Using TCP encapsulation with TLS . . . . . . . . . . 12 | |||
| A.1. Establishing an IKEv2 session . . . . . . . . . . . . . . 13 | Appendix B. Example exchanges of TCP Encapsulation with TLS . . 13 | |||
| A.2. Deleting an IKEv2 session . . . . . . . . . . . . . . . . 15 | B.1. Establishing an IKEv2 session . . . . . . . . . . . . . . 13 | |||
| A.3. Re-establishing an IKEv2 session . . . . . . . . . . . . 16 | B.2. Deleting an IKEv2 session . . . . . . . . . . . . . . . . 15 | |||
| A.4. Using MOBIKE between UDP and TCP Encapsulation . . . . . 16 | B.3. Re-establishing an IKEv2 session . . . . . . . . . . . . 16 | |||
| B.4. Using MOBIKE between UDP and TCP Encapsulation . . . . . 16 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 1. Introduction | 1. Introduction | |||
| IKEv2 [RFC7296] is a protocol for establishing IPSec tunnels, using | IKEv2 [RFC7296] is a protocol for establishing IPSec tunnels, using | |||
| IKE messages over UDP for control traffic, and using Encapsulating | IKE messages over UDP for control traffic, and using Encapsulating | |||
| Security Payload (ESP) messages for its data traffic. Many network | Security Payload (ESP) messages for its data traffic. Many network | |||
| middleboxes that filter traffic on public hotspots block all UDP | middleboxes that filter traffic on public hotspots block all UDP | |||
| traffic, including IKEv2 and IPSec, but allow TCP connections through | traffic, including IKEv2 and IPSec, but allow TCP connections through | |||
| since they appear to be web traffic. Devices on these networks that | since they appear to be web traffic. Devices on these networks that | |||
| skipping to change at page 3, line 30 ¶ | skipping to change at page 3, line 31 ¶ | |||
| initiator and the receiver, then subsequent IKEv2 packets are | initiator and the receiver, then subsequent IKEv2 packets are | |||
| sent over UDP port 4500 with four bytes of zero at the start of | sent over UDP port 4500 with four bytes of zero at the start of | |||
| the UDP payload and ESP packets are sent out over UDP port | the UDP payload and ESP packets are sent out over UDP port | |||
| 4500. Some peers default to using UDP encapsulation even when | 4500. Some peers default to using UDP encapsulation even when | |||
| no NAT are detected on the path as some middleboxes do not | no NAT are detected on the path as some middleboxes do not | |||
| support IP protocols other than TCP and UDP. | support IP protocols other than TCP and UDP. | |||
| 3. TCP Encapsulation. If both of the other two methods are not | 3. TCP Encapsulation. If both of the other two methods are not | |||
| available or appropriate, both IKEv2 negotiation packets as | available or appropriate, both IKEv2 negotiation packets as | |||
| well as ESP packets can be sent over a single TCP connection to | well as ESP packets can be sent over a single TCP connection to | |||
| the peer. This connection can itself use TLS [RFC5246] or | the peer. | |||
| other methods if needed. If the connection uses TLS, it will | ||||
| also be capable of traversing a web proxy [RFC2817]. | ||||
| Direct use of ESP or UDP Encapsulation SHOULD be preferred by IKEv2 | Direct use of ESP or UDP Encapsulation should be preferred by IKEv2 | |||
| implementations due to performance concerns when using TCP | implementations due to performance concerns when using TCP | |||
| Encapsulation Section 11. Most implementations should use TCP | Encapsulation Section 12. Most implementations should use TCP | |||
| Encapsulation only on networks where negotiation over UDP has been | Encapsulation only on networks where negotiation over UDP has been | |||
| attempted without receiving responses from the peer, or if a network | attempted without receiving responses from the peer, or if a network | |||
| is known to not support UDP. | is known to not support UDP. | |||
| 1.1. Prior Work and Motivation | 1.1. Prior Work and Motivation | |||
| Encapsulating IKEv2 connections within TCP or TLS streams is a common | Encapsulating IKEv2 connections within TCP streams is a common | |||
| approach to solve the problem of UDP packets being blocked by network | approach to solve the problem of UDP packets being blocked by network | |||
| middleboxes. The goal of this document is to promote | middleboxes. The goal of this document is to promote | |||
| interoperability by providing a standard method of framing IKEv2 and | interoperability by providing a standard method of framing IKEv2 and | |||
| ESP message within streams, and to provide guidelines for how to | ESP message within streams, and to provide guidelines for how to | |||
| configure and use TCP encapsulation. | configure and use TCP encapsulation. | |||
| Some previous solutions include: | Some previous solutions include: | |||
| Cellular Network Access Interworking Wireless LAN (IWLAN) uses IKEv2 | Cellular Network Access Interworking Wireless LAN (IWLAN) uses IKEv2 | |||
| to create secure connections to cellular carrier networks for | to create secure connections to cellular carrier networks for | |||
| skipping to change at page 4, line 42 ¶ | skipping to change at page 4, line 42 ¶ | |||
| exchange. Instead, support for TCP encapsulation must be pre- | exchange. Instead, support for TCP encapsulation must be pre- | |||
| configured on both the initiator and the responder. | configured on both the initiator and the responder. | |||
| The configuration defined on each peer should include the following | The configuration defined on each peer should include the following | |||
| parameters: | parameters: | |||
| o One or more TCP ports on which the responder will listen for | o One or more TCP ports on which the responder will listen for | |||
| incoming connections. Note that the initiator may initiate TCP | incoming connections. Note that the initiator may initiate TCP | |||
| connections to the responder from any local port. | connections to the responder from any local port. | |||
| o Whether or not to use TLS for connections to a given TCP port. | o Optionally, an extra framing protocol to use on top of TCP to | |||
| The responder may expect to read encapsulated IKEv2 and ESP | further encapsulate the stream of IKEv2 and IPSec packets. See | |||
| packets directly from the TCP connection, or it may expect to read | Appendix A for a detailed discussion. | |||
| them from a stream of TLS data packets. The initiator should be | ||||
| pre-configured to use TLS or not when communicating with a given | ||||
| port on the responder. | ||||
| This document leaves the selection of TCP ports up to | This document leaves the selection of TCP ports up to | |||
| implementations. If TLS is configured, many implementations will | implementations. It's suggested to use TCP port 4500, which is | |||
| select to listen on TCP port 443 in order to traverse firewalls. If | ||||
| TLS is not used, it is suggested to use TCP port 4500, which is | ||||
| allocated for IPSec NAT Traversal. | allocated for IPSec NAT Traversal. | |||
| Since TCP encapsulation of IKEv2 and IPSec packets adds overhead and | Since TCP encapsulation of IKEv2 and IPSec packets adds overhead and | |||
| has potential performance trade-offs compared to direct or UDP- | has potential performance trade-offs compared to direct or UDP- | |||
| encapsulated tunnels (as described in Performance Considerations, | encapsulated tunnels (as described in Performance Considerations, | |||
| Section 11), when possible, implementations SHOULD prefer IKEv2 | Section 12), when possible, implementations SHOULD prefer IKEv2 | |||
| direct or UDP encapsulated tunnels over TCP encapsulated tunnels. | direct or UDP encapsulated tunnels over TCP encapsulated tunnels. | |||
| 3. TCP-Encapsulated Header Formats | 3. TCP-Encapsulated Header Formats | |||
| In order to encapsulate IKEv2 and ESP messages within a stream (which | In order to encapsulate IKEv2 and ESP messages within a TCP stream, a | |||
| may be raw TCP, or TLS over TCP), a 32-bit length field precedes | 16-bit length field precedes every message. If the first 32-bits of | |||
| every message. If the first 32-bits of the message are zeros (a Non- | the message are zeros (a Non-ESP Marker), then the contents comprise | |||
| ESP Marker), then the contents comprise an IKEv2 message. Otherwise, | an IKEv2 message. Otherwise, the contents comprise an ESP message. | |||
| the contents comprise an ESP message. Authentication Header (AH) | Authentication Header (AH) messages are not supported for TCP | |||
| messages are not supported for TCP encapsulation. | encapsulation. | |||
| Although a TCP stream may be able to send very long messages, | Although a TCP stream may be able to send very long messages, | |||
| implementations SHOULD limit message lengths to typical UDP datagram | implementations SHOULD limit message lengths to typical UDP datagram | |||
| ESP payload lengths. The maximum message length is used as the | ESP payload lengths. The maximum message length is used as the | |||
| effective MTU for connections that are being encrypted using ESP, so | effective MTU for connections that are being encrypted using ESP, so | |||
| the maximum message length will influence characteristics of inner | the maximum message length will influence characteristics of inner | |||
| connections, such as the TCP Maximum Segment Size (MSS). | connections, such as the TCP Maximum Segment Size (MSS). | |||
| 3.1. TCP-Encapsulated IKEv2 Header Format | 3.1. TCP-Encapsulated IKEv2 Header Format | |||
| 1 2 3 | 1 2 3 | |||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Length | | | Length | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Non-ESP Marker | | | Non-ESP Marker | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | IKEv2 header [RFC7296] | | | | | |||
| ~ ~ | ~ IKEv2 header [RFC7296] ~ | |||
| | | | | | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 1 | Figure 1 | |||
| The IKE header is preceded by a 32-bit length field in network byte | The IKE header is preceded by a 16-bit length field in network byte | |||
| order that specifies the length of the IKE packet within the TCP | order that specifies the length of the IKE packet within the TCP | |||
| stream. As with IKEv2 over UDP port 4500, a zeroed 32-bit Non-ESP | stream. As with IKEv2 over UDP port 4500, a zeroed 32-bit Non-ESP | |||
| Marker is inserted before the start of the IKEv2 header in order to | Marker is inserted before the start of the IKEv2 header in order to | |||
| differentiate the traffic from ESP traffic between the same addresses | differentiate the traffic from ESP traffic between the same addresses | |||
| and ports. | and ports. | |||
| o Length (4 octets, unsigned integer) - Length of the IKE packet | o Length (2 octets, unsigned integer) - Length of the IKE packet | |||
| including the Length Field and Non-ESP Marker. | including the Length Field and Non-ESP Marker. | |||
| 3.2. TCP-Encapsulated ESP Header Format | 3.2. TCP-Encapsulated ESP Header Format | |||
| 1 2 3 | 1 2 3 | |||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Length | | | Length | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | ESP header [RFC4303] | | | | | |||
| ~ ~ | ~ ESP header [RFC4303] ~ | |||
| | | | | | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 2 | Figure 2 | |||
| The ESP header is preceded by a 32-bit length field in network byte | The ESP header is preceded by a 16-bit length field in network byte | |||
| order that specifies the length of the ESP packet within the TCP | order that specifies the length of the ESP packet within the TCP | |||
| stream. | stream. | |||
| o Length (4 octets, unsigned integer) - Length of the ESP packet | o Length (2 octets, unsigned integer) - Length of the ESP packet | |||
| including the Length Field. | including the Length Field. | |||
| 4. Applicability | 4. TCP-Encapsulated Stream Prefix | |||
| Each TCP stream used for IKEv2 and IPSec encapsulation MUST begin | ||||
| with a fixed sequence of five bytes as a magic value, containing the | ||||
| characters "IKEv2" as ASCII values. This allows peers to | ||||
| differentiate this protocol from other protocols that may be run over | ||||
| TCP streams, since the value does not overlap with the valid start of | ||||
| any other known stream protocol. This value is only sent once, by | ||||
| the Initiator only, at the beginning of any TCP stream. | ||||
| 0 1 2 3 4 | ||||
| +------+------+------+------+------+ | ||||
| | 0x69 | 0x6b | 0x65 | 0x76 | 0x32 | | ||||
| +------+------+------+------+------+ | ||||
| Figure 3 | ||||
| 5. Applicability | ||||
| TCP encapsulation is applicable only when it has been configured to | TCP encapsulation is applicable only when it has been configured to | |||
| be used with specific IKEv2 peers. If a responder is configured to | be used with specific IKEv2 peers. If a responder is configured to | |||
| use TCP encapsulation, it MUST listen on the configured port(s) in | use TCP encapsulation, it MUST listen on the configured port(s) in | |||
| case any peers will initiate new IKEv2 sessions. Initiators MAY use | case any peers will initiate new IKEv2 sessions. Initiators MAY use | |||
| TCP encapsulation for any IKEv2 session to a peer that is configured | TCP encapsulation for any IKEv2 session to a peer that is configured | |||
| to support TCP encapsulation, although it is recommended that | to support TCP encapsulation, although it is recommended that | |||
| initiators should only use TCP encapsulation when traffic over UDP is | initiators should only use TCP encapsulation when traffic over UDP is | |||
| blocked. | blocked. | |||
| Any specific IKE SA, along with its Child SAs, is either TCP | Any specific IKE SA, along with its Child SAs, is either TCP | |||
| encapsulated or not. A mix of TCP and UDP encapsulation for a single | encapsulated or not. A mix of TCP and UDP encapsulation for a single | |||
| SA is not allowed. The exception to this rule is SAs that are | SA is not allowed. | |||
| migrated between addresses using MOBIKE Section 7. | ||||
| 5. Connection Establishment and Teardown | 6. Connection Establishment and Teardown | |||
| When the IKEv2 initiator uses TCP encapsulation for its negotiation, | When the IKEv2 initiator uses TCP encapsulation for its negotiation, | |||
| it will initiate a TCP connection to the responder using the | it will initiate a TCP connection to the responder using the | |||
| configured TCP port. If TLS is being used, it will be negotiated at | configured TCP port. The first bytes sent on the stream MUST be the | |||
| this point. If a web proxy is applied to the ports for the TCP | stream prefix value [Section 4]. After this prefix, encapsulated | |||
| connection, and TLS is being used, the initiator can send an HTTP | IKEv2 messages will negotiate the IKE SA and initial Child SA | |||
| CONNECT message to establish a tunnel through the proxy [RFC2817]. | [RFC7296]. After this point, both encapsulated IKE Figure 1 and ESP | |||
| Figure 2 messages will be sent over the TCP connection. | ||||
| Once this connection is established, encapsulated IKEv2 messages will | ||||
| negotiate the IKE SA and initial Child SA [RFC7296]. After this | ||||
| point, both encapsulated IKE Figure 1 and ESP Figure 2 messages will | ||||
| be sent over the TCP connection. | ||||
| In order to close an IKE session, either the initiator or responder | In order to close an IKE session, either the initiator or responder | |||
| SHOULD gracefully tear down IKE SAs with DELETE payloads. Once all | SHOULD gracefully tear down IKE SAs with DELETE payloads. Once all | |||
| SAs have been deleted, the initiator of the original connection MUST | SAs have been deleted, the initiator of the original connection MUST | |||
| close the TCP connection. | close the TCP connection. | |||
| An unexpected FIN or a RST on the TCP connection may indicate either | An unexpected FIN or a RST on the TCP connection may indicate either | |||
| a loss of connectivity, an attack, or some other error. If a DELETE | a loss of connectivity, an attack, or some other error. If a DELETE | |||
| payload has not been sent, both sides SHOULD maintain the state for | payload has not been sent, both sides SHOULD maintain the state for | |||
| their SAs for the standard lifetime or time-out period. The original | their SAs for the standard lifetime or time-out period. The original | |||
| initiator (that is, the endpoint that initiated the TCP connection | initiator (that is, the endpoint that initiated the TCP connection | |||
| and sent the first IKE_SA_INIT message) is responsible for re- | and sent the first IKE_SA_INIT message) is responsible for re- | |||
| establishing the TCP connection if it is torn down for any unexpected | establishing the TCP connection if it is torn down for any unexpected | |||
| reason. Since new TCP connections may use different ports due to NAT | reason. Since new TCP connections may use different ports due to NAT | |||
| mappings or local port allocations changing, the responder MUST allow | mappings or local port allocations changing, the responder MUST allow | |||
| packets for existing SAs to be received from new source ports. | packets for existing SAs to be received from new source ports. | |||
| If TLS is being used, TLS must be re-negotiated on any new TCP | A peer MUST discard a partially received message due to a broken | |||
| connections created due to a broken connection. TLS Session | ||||
| Resumption is recommended to improve efficiency. | ||||
| A peer must discard a partially received message due to a broken | ||||
| connection. | connection. | |||
| The streams of data sent over any TCP connection used for this | The streams of data sent over any TCP connection used for this | |||
| protocol MUST begin with a complete message, which is either an | protocol MUST begin with the stream prefix value followed by a | |||
| encapsulated IKE or ESP message. If the connection is being used to | complete message, which is either an encapsulated IKE or ESP message. | |||
| resume a previous IKE session, the responder can recognize the | If the connection is being used to resume a previous IKE session, the | |||
| session using either the IKE SPI from an encapsulated IKE message or | responder can recognize the session using either the IKE SPI from an | |||
| the ESP SPI from an encapsulated ESP message. If the session had | encapsulated IKE message or the ESP SPI from an encapsulated ESP | |||
| been fully established previously, it is suggested that the initiator | message. If the session had been fully established previously, it is | |||
| send an UPDATE_SA_ADDRESSES message if MOBIKE is supported, or an | suggested that the initiator send an UPDATE_SA_ADDRESSES message if | |||
| INFORMATIONAL message (a keepalive) otherwise. If either initiator | MOBIKE is supported, or an INFORMATIONAL message (a keepalive) | |||
| or responder receives a stream that cannot be parsed correctly, it | otherwise. If either initiator or responder receives a stream that | |||
| MUST close the TCP connection. | cannot be parsed correctly, it MUST close the TCP connection. | |||
| Multiple TCP connections between the initiator and the responder are | Multiple TCP connections between the initiator and the responder are | |||
| allowed, but their use must take into account the initiator | allowed, but their use must take into account the initiator | |||
| capabilities and the deployment model such as to connect to multiple | capabilities and the deployment model such as to connect to multiple | |||
| gateways handling different ESP SAs when deployed in a high | gateways handling different ESP SAs when deployed in a high | |||
| availability model. It is also possible to negotiate multiple IKE | availability model. It is also possible to negotiate multiple IKE | |||
| SAs over the same TCP connection. | SAs over the same TCP connection. | |||
| The processing of the TCP packets is the same whether its within a | The processing of the TCP packets is the same whether its within a | |||
| single or multiple TCP connections. | single or multiple TCP connections. | |||
| 6. Interaction with NAT Detection Payloads | 7. Interaction with NAT Detection Payloads | |||
| When negotiating over UDP port 500, IKE_SA_INIT packets include | When negotiating over UDP port 500, IKE_SA_INIT packets include | |||
| NAT_DETECTION_SOURCE_IP and NAT_DETECTION_DESTINATION_IP payloads to | NAT_DETECTION_SOURCE_IP and NAT_DETECTION_DESTINATION_IP payloads to | |||
| determine if UDP encapsulation of IPSec packets should be used. | determine if UDP encapsulation of IPSec packets should be used. | |||
| These payloads contain SHA-1 digests of the SPIs, IP addresses, and | These payloads contain SHA-1 digests of the SPIs, IP addresses, and | |||
| ports. IKE_SA_INIT packets sent on a TCP connection SHOULD include | ports. IKE_SA_INIT packets sent on a TCP connection SHOULD include | |||
| these payloads, and SHOULD use the applicable TCP ports when creating | these payloads, and SHOULD use the applicable TCP ports when creating | |||
| and checking the SHA-1 digests. | and checking the SHA-1 digests. | |||
| If a NAT is detected due to the SHA-1 digests not matching the | If a NAT is detected due to the SHA-1 digests not matching the | |||
| expected values, no change should be made for encapsulation of | expected values, no change should be made for encapsulation of | |||
| subsequent IKEv2 or ESP packets, since TCP encapsulation inherently | subsequent IKEv2 or ESP packets, since TCP encapsulation inherently | |||
| supports NAT traversal. Implementations MAY use the information that | supports NAT traversal. Implementations MAY use the information that | |||
| a NAT is present to influence keep-alive timer values. | a NAT is present to influence keep-alive timer values. | |||
| 7. Using MOBIKE with TCP encapsulation | 8. Using MOBIKE with TCP encapsulation | |||
| When an IKEv2 session is transitioned between networks using MOBIKE | When an IKEv2 session is transitioned between networks using MOBIKE | |||
| [RFC4555], the initiator of the transition may switch between using | [RFC4555], the initiator of the transition may switch between using | |||
| TCP encapsulation, UDP encapsulation, or no encapsulation. | TCP encapsulation, UDP encapsulation, or no encapsulation. | |||
| Implementations that implement both MOBIKE and TCP encapsulation MUST | Implementations that implement both MOBIKE and TCP encapsulation MUST | |||
| support dynamically enabling and disabling TCP encapsulation as | support dynamically enabling and disabling TCP encapsulation as | |||
| interfaces change. | interfaces change. | |||
| The encapsulation method of ESP packets MUST always match the | The encapsulation method of ESP packets MUST always match the | |||
| encapsulation method of the IKEv2 negotiation, which may be different | encapsulation method of the IKEv2 negotiation, which may be different | |||
| skipping to change at page 8, line 47 ¶ | skipping to change at page 9, line 5 ¶ | |||
| SHOULD be sent out first over UDP before attempting over TCP. If | SHOULD be sent out first over UDP before attempting over TCP. If | |||
| there is a response to the UPDATE_SA_ADDRESSES notification sent over | there is a response to the UPDATE_SA_ADDRESSES notification sent over | |||
| UDP, then the ESP packets should be sent directly over IP or over UDP | UDP, then the ESP packets should be sent directly over IP or over UDP | |||
| port 4500 (depending on if a NAT was detected), regardless of if a | port 4500 (depending on if a NAT was detected), regardless of if a | |||
| connection on a previous network was using TCP encapsulation. | connection on a previous network was using TCP encapsulation. | |||
| Similarly, if the responder only responds to the UPDATE_SA_ADDRESSES | Similarly, if the responder only responds to the UPDATE_SA_ADDRESSES | |||
| notification over TCP, then the ESP packets should be sent over the | notification over TCP, then the ESP packets should be sent over the | |||
| TCP connection, regardless of if a connection on a previous network | TCP connection, regardless of if a connection on a previous network | |||
| did not use TCP encapsulation. | did not use TCP encapsulation. | |||
| 8. Using IKEv2 Message Fragmentation with TCP encapsulation | 9. Using IKEv2 Message Fragmentation with TCP encapsulation | |||
| IKEv2 Message Fragmentation [RFC7383] is not required when using TCP | IKEv2 Message Fragmentation [RFC7383] is not required when using TCP | |||
| encapsulation, since a TCP stream already handles the fragmentation | encapsulation, since a TCP stream already handles the fragmentation | |||
| of its contents across packets. Since fragmentation is redundant in | of its contents across packets. Since fragmentation is redundant in | |||
| this case, implementations might choose to not negotiate IKEv2 | this case, implementations might choose to not negotiate IKEv2 | |||
| fragmentation. Even if fragmentation is negotiated, an | fragmentation. Even if fragmentation is negotiated, an | |||
| implementation MAY choose to not fragment when going over a TCP | implementation MAY choose to not fragment when going over a TCP | |||
| connection. | connection. | |||
| If an implementation supports both MOBIKE and IKEv2 fragmentation, it | If an implementation supports both MOBIKE and IKEv2 fragmentation, it | |||
| SHOULD negotiate IKEv2 fragmentation over a TCP encapsulated session | SHOULD negotiate IKEv2 fragmentation over a TCP encapsulated session | |||
| in case the session switches to UDP encapsulation on another network. | in case the session switches to UDP encapsulation on another network. | |||
| 9. Considerations for Keep-alives and DPD | 10. Considerations for Keep-alives and DPD | |||
| Encapsulating IKE and IPSec inside of a TCP connection can impact the | Encapsulating IKE and IPSec inside of a TCP connection can impact the | |||
| strategy that implementations use to detect peer liveness and to | strategy that implementations use to detect peer liveness and to | |||
| maintain middlebox port mappings. Peer liveness should be checked | maintain middlebox port mappings. Peer liveness should be checked | |||
| using IKEv2 Informational packets [RFC7296]. | using IKEv2 Informational packets [RFC7296]. | |||
| In general, TCP port mappings are maintained by NATs longers than UDP | In general, TCP port mappings are maintained by NATs longers than UDP | |||
| port mappings, so IPSec ESP NAT keep-alives [RFC3948] SHOULD NOT be | port mappings, so IPSec ESP NAT keep-alives [RFC3948] SHOULD NOT be | |||
| sent when using TCP encapsulation. Any implementation using TCP | sent when using TCP encapsulation. Any implementation using TCP | |||
| encapsulation MUST silently drop incoming NAT keep-alive packets, and | encapsulation MUST silently drop incoming NAT keep-alive packets, and | |||
| not treat them as errors. NAT keep-alive packets over a TCP | not treat them as errors. NAT keep-alive packets over a TCP | |||
| encapsulated IPSec connection will be sent with a length value of 1 | encapsulated IPSec connection will be sent with a length value of 1 | |||
| byte, whose value is 0xFF Figure 2. | byte, whose value is 0xFF [Figure 2]. | |||
| Note that depending on the configuration of TCP and TLS on the | Note that depending on the configuration of TCP and TLS on the | |||
| connection, TCP keep-alives [RFC1122] and TLS keep-alives [RFC6520] | connection, TCP keep-alives [RFC1122] and TLS keep-alives [RFC6520] | |||
| may be used. These MUST NOT be used as indications of IKEv2 peer | may be used. These MUST NOT be used as indications of IKEv2 peer | |||
| liveness. | liveness. | |||
| 10. Middlebox Considerations | 11. Middlebox Considerations | |||
| Many security networking devices such as Firewalls or Intrusion | Many security networking devices such as Firewalls or Intrusion | |||
| Prevention Systems, network optimization/acceleration devices and | Prevention Systems, network optimization/acceleration devices and | |||
| Network Address Translation (NAT) devices keep the state of sessions | Network Address Translation (NAT) devices keep the state of sessions | |||
| that traverse through them. | that traverse through them. | |||
| These devices commonly track the transport layer and/or the | These devices commonly track the transport layer and/or the | |||
| application layer data to drop traffic that is anomalous or malicious | application layer data to drop traffic that is anomalous or malicious | |||
| in nature. | in nature. | |||
| A network device that monitors up to the application layer will | A network device that monitors up to the application layer will | |||
| commonly expect to see HTTP traffic within a TCP socket running over | commonly expect to see HTTP traffic within a TCP socket running over | |||
| port 80, if non-HTTP traffic is seen (such as TCP encapsulated | port 80, if non-HTTP traffic is seen (such as TCP encapsulated | |||
| IKEv2), this could be dropped by the security device. In this | IKEv2), this could be dropped by the security device. | |||
| scenario the IKEv2 and ESP packets are to be TLS encapsulated (using | ||||
| port 443) to ensure that the security device permits the traffic. | ||||
| In the case of a TLS proxy, where the network security device | ||||
| decrypts, inspects and re-encrypts the session the same | ||||
| considerations must be taken into account as for HTTP, where TLS can | ||||
| be inspected. In this case the TLS proxy must allow TCP | ||||
| encapsulation of IKEv2 and IPsec otherwise the session could be | ||||
| dropped. | ||||
| A network device that monitors the transport layer will track the | A network device that monitors the transport layer will track the | |||
| state of TCP sessions, such as TCP sequence numbers. TCP | state of TCP sessions, such as TCP sequence numbers. TCP | |||
| encapsulation of IKEv2 should therefore use standard TCP behaviors to | encapsulation of IKEv2 should therefore use standard TCP behaviors to | |||
| avoid being dropped by middleboxes. | avoid being dropped by middleboxes. | |||
| 11. Performance Considerations | 12. Performance Considerations | |||
| Several aspects of TCP encapsulation for IKEv2 and IPSec packets may | Several aspects of TCP encapsulation for IKEv2 and IPSec packets may | |||
| negatively impact the performance of connections within the tunnel. | negatively impact the performance of connections within the tunnel. | |||
| Implementations should be aware of these and take these into | Implementations should be aware of these and take these into | |||
| consideration when determining when to use TCP encapsulation. | consideration when determining when to use TCP encapsulation. | |||
| 11.1. TCP-in-TCP | 12.1. TCP-in-TCP | |||
| If the outer connection between IKEv2 peers is over TCP, inner TCP | If the outer connection between IKEv2 peers is over TCP, inner TCP | |||
| connections may suffer effects from using TCP within TCP. In | connections may suffer effects from using TCP within TCP. In | |||
| particular, the inner TCP's round-trip-time estimation will be | particular, the inner TCP's round-trip-time estimation will be | |||
| affected by the burstiness of the outer TCP. This will make loss- | affected by the burstiness of the outer TCP. This will make loss- | |||
| recovery of the inner TCP traffic less reactive and more prone to | recovery of the inner TCP traffic less reactive and more prone to | |||
| spurious retransmission timeouts. | spurious retransmission timeouts. | |||
| 11.2. Added Reliability for Unreliable Protocols | 12.2. Added Reliability for Unreliable Protocols | |||
| Since ESP is an unreliable protocol, transmitting ESP packets over a | Since ESP is an unreliable protocol, transmitting ESP packets over a | |||
| TCP connection will change the fundamental behavior of the packets. | TCP connection will change the fundamental behavior of the packets. | |||
| Some application-level protocols that prefer packet loss to delay | Some application-level protocols that prefer packet loss to delay | |||
| (such as Voice over IP or other real-time protocols) may be | (such as Voice over IP or other real-time protocols) may be | |||
| negatively impacted if their packets are retransmitted by the TCP | negatively impacted if their packets are retransmitted by the TCP | |||
| connection due to packet loss. | connection due to packet loss. | |||
| 11.3. Encryption Overhead | 12.3. Quality of Service Markings | |||
| If TLS or another encryption method is used on the TCP connection, | ||||
| there may be increased processing overhead for encrypting and | ||||
| decrypting. This overhead may be experienced as a decrease in | ||||
| throughput on CPU-limited devices, or an increase in CPU usage or | ||||
| battery consumption on other devices, therefore the initiator and | ||||
| responder MUST allow the selection of NULL cipher when using TLS. | ||||
| Additionally, the TLS record introduces another layer of overhead, | ||||
| requiring more bytes to transmit a given IKEv2 and IPSec packet. | ||||
| 11.4. Quality of Service Markings | ||||
| Quality of Service (QoS) markings, such as DSCP and Traffic Class, | Quality of Service (QoS) markings, such as DSCP and Traffic Class, | |||
| should be used with care on TCP connections used for encapsulation. | should be used with care on TCP connections used for encapsulation. | |||
| Individual packets SHOULD NOT use different markings than the rest of | Individual packets SHOULD NOT use different markings than the rest of | |||
| the connection, since packets with different priorities may be routed | the connection, since packets with different priorities may be routed | |||
| differently and cause unnecessary delays in the connection. | differently and cause unnecessary delays in the connection. | |||
| 11.5. Maximum Segment Size | 12.4. Maximum Segment Size | |||
| A TCP connection used for IKEv2 encapsulation SHOULD negotiate its | A TCP connection used for IKEv2 encapsulation SHOULD negotiate its | |||
| maximum segment size (MSS) in order to avoid unnecessary | maximum segment size (MSS) in order to avoid unnecessary | |||
| fragmentation of packets. | fragmentation of packets. | |||
| 12. Security Considerations | 13. Security Considerations | |||
| IKEv2 responders that support TCP encapsulation may become vulnerable | IKEv2 responders that support TCP encapsulation may become vulnerable | |||
| to new Denial-of-Service (DoS) attacks that are specific to TCP, such | to new Denial-of-Service (DoS) attacks that are specific to TCP, such | |||
| as SYN-flooding attacks. Responders should be aware of this | as SYN-flooding attacks. Responders should be aware of this | |||
| additional attack-surface. | additional attack-surface. | |||
| Attackers may be able to disrupt the TCP connection by sending | Attackers may be able to disrupt the TCP connection by sending | |||
| spurious RST packets. Due to this, implementations SHOULD make sure | spurious RST packets. Due to this, implementations SHOULD make sure | |||
| that IKE session state persists even if the underlying TCP connection | that IKE session state persists even if the underlying TCP connection | |||
| is torn down. | is torn down. | |||
| If TLS is used on the encapsulating TCP connection it should not be | 14. IANA Considerations | |||
| considered as a security measure, and no TLS profile is recommended | ||||
| by this specification. The security of the IKEv2 session is entirely | ||||
| derived from the IKEv2 negotiation and key establishment. | ||||
| 13. IANA Considerations | ||||
| This memo includes no request to IANA. | This memo includes no request to IANA. | |||
| TCP port 4500 is already allocated to IPSec. This port MAY be used | TCP port 4500 is already allocated to IPSec. This port MAY be used | |||
| for the protocol described in this document, but implementations MAY | for the protocol described in this document, but implementations MAY | |||
| prefer to use other ports based on local policy. We foresee some | prefer to use other ports based on local policy. | |||
| implementations using TCP port 443 to more easily pass through some | ||||
| middleboxes [I-D.tschofenig-hourglass]. | ||||
| 14. Acknowledgments | 15. Acknowledgments | |||
| The authors would like to acknowledge the input and advice of Stuart | The authors would like to acknowledge the input and advice of Stuart | |||
| Cheshire, Delziel Fernandes, Yoav Nir, Christoph Paasch, Yaron | Cheshire, Delziel Fernandes, Yoav Nir, Christoph Paasch, Yaron | |||
| Sheffer, David Schinazi, Graham Bartlett, Byju Pularikkal, March Wu | Sheffer, David Schinazi, Graham Bartlett, Byju Pularikkal, March Wu | |||
| and Kingwel Xie. Special thanks to Eric Kinnear for his | and Kingwel Xie. Special thanks to Eric Kinnear for his | |||
| implementation work. | implementation work. | |||
| 15. References | 16. References | |||
| 15.1. Normative References | 16.1. Normative References | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <http://www.rfc-editor.org/info/rfc2119>. | <http://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. | [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. | |||
| Kivinen, "Internet Key Exchange Protocol Version 2 | Kivinen, "Internet Key Exchange Protocol Version 2 | |||
| (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October | (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October | |||
| 2014, <http://www.rfc-editor.org/info/rfc7296>. | 2014, <http://www.rfc-editor.org/info/rfc7296>. | |||
| 15.2. Informative References | 16.2. Informative References | |||
| [I-D.nir-ipsecme-ike-tcp] | [I-D.nir-ipsecme-ike-tcp] | |||
| Nir, Y., "A TCP transport for the Internet Key Exchange", | Nir, Y., "A TCP transport for the Internet Key Exchange", | |||
| draft-nir-ipsecme-ike-tcp-01 (work in progress), July | draft-nir-ipsecme-ike-tcp-01 (work in progress), July | |||
| 2012. | 2012. | |||
| [I-D.tschofenig-hourglass] | ||||
| Tschofenig, H., "The New Waist of the Hourglass", draft- | ||||
| tschofenig-hourglass-00 (work in progress), July 2012. | ||||
| [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - | [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - | |||
| Communication Layers", STD 3, RFC 1122, | Communication Layers", STD 3, RFC 1122, | |||
| DOI 10.17487/RFC1122, October 1989, | DOI 10.17487/RFC1122, October 1989, | |||
| <http://www.rfc-editor.org/info/rfc1122>. | <http://www.rfc-editor.org/info/rfc1122>. | |||
| [RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within | [RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within | |||
| HTTP/1.1", RFC 2817, DOI 10.17487/RFC2817, May 2000, | HTTP/1.1", RFC 2817, DOI 10.17487/RFC2817, May 2000, | |||
| <http://www.rfc-editor.org/info/rfc2817>. | <http://www.rfc-editor.org/info/rfc2817>. | |||
| [RFC3948] Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. | [RFC3948] Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. | |||
| skipping to change at page 13, line 21 ¶ | skipping to change at page 12, line 43 ¶ | |||
| Layer Security (TLS) and Datagram Transport Layer Security | Layer Security (TLS) and Datagram Transport Layer Security | |||
| (DTLS) Heartbeat Extension", RFC 6520, | (DTLS) Heartbeat Extension", RFC 6520, | |||
| DOI 10.17487/RFC6520, February 2012, | DOI 10.17487/RFC6520, February 2012, | |||
| <http://www.rfc-editor.org/info/rfc6520>. | <http://www.rfc-editor.org/info/rfc6520>. | |||
| [RFC7383] Smyslov, V., "Internet Key Exchange Protocol Version 2 | [RFC7383] Smyslov, V., "Internet Key Exchange Protocol Version 2 | |||
| (IKEv2) Message Fragmentation", RFC 7383, | (IKEv2) Message Fragmentation", RFC 7383, | |||
| DOI 10.17487/RFC7383, November 2014, | DOI 10.17487/RFC7383, November 2014, | |||
| <http://www.rfc-editor.org/info/rfc7383>. | <http://www.rfc-editor.org/info/rfc7383>. | |||
| Appendix A. Example exchanges of TCP Encapsulation with TLS | Appendix A. Using TCP encapsulation with TLS | |||
| A.1. Establishing an IKEv2 session | This section provides recommendations on the support of TLS with the | |||
| TCP encapsulation. | ||||
| When using TCP encapsulation, implementations may choose to use TLS | ||||
| [RFC5246], to be able to traverse middle-boxes, which may block non | ||||
| HTTP traffic. | ||||
| If a web proxy is applied to the ports for the TCP connection, and | ||||
| TLS is being used, the initiator can send an HTTP CONNECT message to | ||||
| establish a tunnel through the proxy [RFC2817]. | ||||
| The use of TLS should be configurable on the peers. The responder | ||||
| may expect to read encapsulated IKEv2 and ESP packets directly from | ||||
| the TCP connection, or it may expect to read them from a stream of | ||||
| TLS data packets. The initiator should be pre-configured to use TLS | ||||
| or not when communicating with a given port on the responder. | ||||
| When new TCP connections are re-established due to a broken | ||||
| connection, TLS must be re-negotiated. TLS Session Resumption is | ||||
| recommended to improve efficiency in this case. | ||||
| The security of the IKEv2 session is entirely derived from the IKVEv2 | ||||
| negotiation and key establishment, therefore When TLS is used on the | ||||
| TCP connection, both the initiator and responder MUST allow for the | ||||
| NULL cipher to be selected. | ||||
| Implementations must be aware that the use of TLS introduces another | ||||
| layer of overhead requiring more bytes to transmit a given IKEv2 and | ||||
| IPSec packet. | ||||
| Appendix B. Example exchanges of TCP Encapsulation with TLS | ||||
| B.1. Establishing an IKEv2 session | ||||
| Client Server | Client Server | |||
| ---------- ---------- | ---------- ---------- | |||
| -------------------- TCP Connection ------------------- | -------------------- TCP Connection ------------------- | |||
| 1) (IP_I:Port_I -> IP_R:TCP443 or TCP4500) | 1) (IP_I:Port_I -> IP_R:TCP443 or TCP4500) | |||
| TcpSyn ----------> | TcpSyn ----------> | |||
| <---------- TcpSyn,Ack | <---------- TcpSyn,Ack | |||
| TcpAck ----------> | TcpAck ----------> | |||
| --------------------- TLS Session --------------------- | --------------------- TLS Session --------------------- | |||
| 2) ClientHello ----------> | 2) ClientHello ----------> | |||
| skipping to change at page 14, line 49 ¶ | skipping to change at page 14, line 49 ¶ | |||
| EAP ----------> | EAP ----------> | |||
| repeat 1..N times | repeat 1..N times | |||
| <---------- EAP | <---------- EAP | |||
| final IKE_AUTH ----------> | final IKE_AUTH ----------> | |||
| HDR, SK {AUTH} | HDR, SK {AUTH} | |||
| <---------- final IKE_AUTH | <---------- final IKE_AUTH | |||
| HDR, SK {AUTH, CP(CFG_REPLY), | HDR, SK {AUTH, CP(CFG_REPLY), | |||
| SA, TSi, TSr, ...} | SA, TSi, TSr, ...} | |||
| -------------- IKEv2 Tunnel Established ------------- | -------------- IKEv2 Tunnel Established ------------- | |||
| Figure 3 | Figure 4 | |||
| 1. Client establishes a TCP connection with the server on port 443 | 1. Client establishes a TCP connection with the server on port 443 | |||
| or 4500. | or 4500. | |||
| 2. Client initiates TLS handshake. During TLS handshake, the | 2. Client initiates TLS handshake. During TLS handshake, the | |||
| server SHOULD NOT request the client's' certificate, since | server SHOULD NOT request the client's' certificate, since | |||
| authentication is handled as part of IKEv2 negotiation. | authentication is handled as part of IKEv2 negotiation. | |||
| 3. Client and server establish an IKEv2 connection. This example | 3. Client and server establish an IKEv2 connection. This example | |||
| shows EAP-based authentication, although any authentication | shows EAP-based authentication, although any authentication | |||
| type may be used. | type may be used. | |||
| A.2. Deleting an IKEv2 session | B.2. Deleting an IKEv2 session | |||
| Client Server | Client Server | |||
| ---------- ---------- | ---------- ---------- | |||
| ---------------------- IKEv2 Session -------------------- | ---------------------- IKEv2 Session -------------------- | |||
| 1) INFORMATIONAL ----------> | 1) INFORMATIONAL ----------> | |||
| HDR, SK {[N,] [D,] | HDR, SK {[N,] [D,] | |||
| [CP,] ...} | [CP,] ...} | |||
| <---------- INFORMATIONAL | <---------- INFORMATIONAL | |||
| HDR, SK {[N,] [D,] | HDR, SK {[N,] [D,] | |||
| [CP], ...} | [CP], ...} | |||
| skipping to change at page 15, line 38 ¶ | skipping to change at page 15, line 38 ¶ | |||
| --------------------- TLS Session --------------------- | --------------------- TLS Session --------------------- | |||
| 2) close_notify ----------> | 2) close_notify ----------> | |||
| <---------- close_notify | <---------- close_notify | |||
| -------------------- TCP Connection ------------------- | -------------------- TCP Connection ------------------- | |||
| 3) TcpFin ----------> | 3) TcpFin ----------> | |||
| <---------- Ack | <---------- Ack | |||
| <---------- TcpFin | <---------- TcpFin | |||
| Ack ----------> | Ack ----------> | |||
| --------------------- Tunnel Deleted ------------------- | --------------------- Tunnel Deleted ------------------- | |||
| Figure 4 | Figure 5 | |||
| 1. Client and server exchange INFORMATIONAL messages to notify IKE | 1. Client and server exchange INFORMATIONAL messages to notify IKE | |||
| SA deletion. | SA deletion. | |||
| 2. Client and server negotiate TLS session deletion using TLS | 2. Client and server negotiate TLS session deletion using TLS | |||
| CLOSE_NOTIFY. | CLOSE_NOTIFY. | |||
| 3. The TCP connection is torn down. | 3. The TCP connection is torn down. | |||
| Unless the TCP connection and/or TLS session are being used for | Unless the TCP connection and/or TLS session are being used for | |||
| multiple IKE SAs, the deletion of the IKE SA should lead to the | multiple IKE SAs, the deletion of the IKE SA should lead to the | |||
| disposal of the underlying TLS and TCP state. | disposal of the underlying TLS and TCP state. | |||
| A.3. Re-establishing an IKEv2 session | B.3. Re-establishing an IKEv2 session | |||
| Client Server | Client Server | |||
| ---------- ---------- | ---------- ---------- | |||
| -------------------- TCP Connection ------------------- | -------------------- TCP Connection ------------------- | |||
| 1) (IP_I:Port_I -> IP_R:TCP443 or TCP4500) | 1) (IP_I:Port_I -> IP_R:TCP443 or TCP4500) | |||
| TcpSyn ----------> | TcpSyn ----------> | |||
| <---------- TcpSyn,Ack | <---------- TcpSyn,Ack | |||
| TcpAck ----------> | TcpAck ----------> | |||
| --------------------- TLS Session --------------------- | --------------------- TLS Session --------------------- | |||
| 2) ClientHello ----------> | 2) ClientHello ----------> | |||
| <---------- ServerHello | <---------- ServerHello | |||
| [ChangeCipherSpec] | [ChangeCipherSpec] | |||
| Finished | Finished | |||
| [ChangeCipherSpec] ----------> | [ChangeCipherSpec] ----------> | |||
| Finished | Finished | |||
| 3) <--------------------> IKEv2/ESP flow <-----------------> | 3) <--------------------> IKEv2/ESP flow <-----------------> | |||
| Figure 5 | Figure 6 | |||
| 1. If a previous TCP connection was broken (for example, due to a | 1. If a previous TCP connection was broken (for example, due to a | |||
| RST), the client is responsible for re-initiating the TCP | RST), the client is responsible for re-initiating the TCP | |||
| connection. The initiator's address and port (IP_I and Port_I) | connection. The initiator's address and port (IP_I and Port_I) | |||
| may be different from the previous connection's address and | may be different from the previous connection's address and | |||
| port. | port. | |||
| 2. In ClientHello TLS message, the client SHOULD send the Session | 2. In ClientHello TLS message, the client SHOULD send the Session | |||
| ID it received in the previous TLS handshake if available. It | ID it received in the previous TLS handshake if available. It | |||
| is up to the server to perform either an abbreviated handshake | is up to the server to perform either an abbreviated handshake | |||
| or full handshake based on the session ID match. | or full handshake based on the session ID match. | |||
| 3. After TCP and TLS are complete, the IKEv2 and ESP packet flow | 3. After TCP and TLS are complete, the IKEv2 and ESP packet flow | |||
| can resume. If MOBIKE is being used, the initiator SHOULD send | can resume. If MOBIKE is being used, the initiator SHOULD send | |||
| UPDATE_SA_ADDRESSES. | UPDATE_SA_ADDRESSES. | |||
| A.4. Using MOBIKE between UDP and TCP Encapsulation | B.4. Using MOBIKE between UDP and TCP Encapsulation | |||
| Client Server | Client Server | |||
| ---------- ---------- | ---------- ---------- | |||
| (IP_I1:UDP500 -> IP_R:UDP500) | (IP_I1:UDP500 -> IP_R:UDP500) | |||
| 1) ----------------- IKE_SA_INIT Exchange ----------------- | 1) ----------------- IKE_SA_INIT Exchange ----------------- | |||
| (IP_I1:UDP4500 -> IP_R:UDP4500) | (IP_I1:UDP4500 -> IP_R:UDP4500) | |||
| Intial IKE_AUTH -----------> | Intial IKE_AUTH -----------> | |||
| HDR, SK { IDi, CERT, AUTH, | HDR, SK { IDi, CERT, AUTH, | |||
| CP(CFG_REQUEST), | CP(CFG_REQUEST), | |||
| SAi2, TSi, TSr, | SAi2, TSi, TSr, | |||
| skipping to change at page 17, line 48 ¶ | skipping to change at page 17, line 48 ¶ | |||
| INFORMATIONAL -----------> | INFORMATIONAL -----------> | |||
| HDR, SK { N(UPDATE_SA_ADDRESSES), | HDR, SK { N(UPDATE_SA_ADDRESSES), | |||
| N(NAT_DETECTION_SOURCE_IP), | N(NAT_DETECTION_SOURCE_IP), | |||
| N(NAT_DETECTION_DESTINATION_IP) } | N(NAT_DETECTION_DESTINATION_IP) } | |||
| <----------- INFORMATIONAL | <----------- INFORMATIONAL | |||
| HDR, SK { N(NAT_DETECTION_SOURCE_IP), | HDR, SK { N(NAT_DETECTION_SOURCE_IP), | |||
| N(NAT_DETECTION_DESTINATION_IP) } | N(NAT_DETECTION_DESTINATION_IP) } | |||
| 6) <---------------- IKEv2/ESP data flow ------------------> | 6) <---------------- IKEv2/ESP data flow ------------------> | |||
| Figure 6 | Figure 7 | |||
| 1. During the IKE_SA_INIT exchange, the client and server exchange | 1. During the IKE_SA_INIT exchange, the client and server exchange | |||
| MOBIKE_SUPPORTED notify payloads to indicate support for | MOBIKE_SUPPORTED notify payloads to indicate support for | |||
| MOBIKE. | MOBIKE. | |||
| 2. The client changes its point of attachment to the network, and | 2. The client changes its point of attachment to the network, and | |||
| receives a new IP address. The client attempts to re-establish | receives a new IP address. The client attempts to re-establish | |||
| the IKEv2 session using the UPDATE_SA_ADDRESSES notify payload, | the IKEv2 session using the UPDATE_SA_ADDRESSES notify payload, | |||
| but the server does not respond because the network blocks UDP | but the server does not respond because the network blocks UDP | |||
| traffic. | traffic. | |||
| End of changes. 56 change blocks. | ||||
| 151 lines changed or deleted | 154 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||