Network Working Group R. Singh, Ed. Internet-Draft G. Kalyani Intended status: Standards Track Cisco Expires: April14,28, 2011 Y. Nir Check Point D. Zhang Huawei October11,25, 2010 Protocol Support for High Availability of IKEv2/IPsecdraft-ietf-ipsecme-ipsecha-protocol-01draft-ietf-ipsecme-ipsecha-protocol-02 AbstractIKEv2 andThe IPsecprotocols areprotocol suite is widely used fordeploying VPN.the deployment of virtual private networks (VPNs). In order to make suchVPNVPNs highly available, more scalable andfailure- prone,failure-resistant, these VPNs are implemented asIKEv2/IPsec Highly AvailableIPsec High Availability (HA)cluster. Butclusters. However there are many issues inIKEv2/IPsecIPsec HAcluster. The draftclustering, and in particular in IKEv2 clustering. An earlier document, "IPsec Cluster ProblemStatement"Statement", enumeratesallthe issues encountered in the IKEv2/IPsec HA cluster environment. This document attempts to resolve these issues with the least possible change to the protocol. This document proposes an extension to the IKEv2 protocol to solve the main issues of "IPsec Cluster Problem Statement" inHot Standby clusterthe commonly deployed hot-standby cluster, andgivesprovides implementation advice for other issues. The main issues to be solvedare: oare the synchronization of IKEv2 MessageId synchronization : This is done by syncing up expected send and receive message Id values with the peerID counters, andupdating the values at the newly active cluster member after the failover. oof IPsec ReplayCounter synchronization : This is done by syncing up bumped up outgoing SA replay counters values with peer and updating the values at the newly active cluster member after the failover.Counters. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. 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." This Internet-Draft will expire on April14,28, 2011. Copyright Notice Copyright (c) 2010 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 (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . .43 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . .54 3. IssuessolvedResolved from IPsec Cluster Problem Statement . . . . .. 65 4. The IKEv2/IPsec SA Counter Synchronization Problem . . . . . .. . 65 5.IKEv2/IPsec SACounter Synchronization Solution . . . . . . .8. . . . . . . . 7 6. IKEv2/IPsecsynchronization notification payloadsSynchronization Notification Payloads . . . . . . 9 6.1. IKEV2_MESSAGE_ID_SYNC_SUPPORTED . . . . . . . . . . . . .109 6.2. IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED . . . . . . . . . . . 10 6.3. IKEV2_MESSAGE_ID_SYNC . . . . . . . . . . . . . . . . . .1110 6.4. IPSEC_REPLAY_COUNTER_SYNC . . . . . . . . . . . . . . . . 11 7. Implementation Detailsof implementation. . . . . . . . . . . . . . . . . . . . 12 8.Step-by-Step detailsStep by Step Details . . . . . . . . . . . . . . . . . . . . . 13 9. Security Considerations . . . . . . . . . . . . . . . . . . . 14 10. Interaction with other drafts . . . . . . . . . . . . . . . . 14 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . .1615 13. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . .1615 13.1. Draft-01-02 . . . . . . . . . . . . . . . . . . . . . . . . 16 13.2. Draft -01 . . . . . . . . . . . . . . . . . . . . . . . . 16 13.3. Draft -00 . . . . . . . . . . . . . . . . . . . . . . . . 16 14. References . . . . . . . . . . . . . . . . . . . . . . . . . .1716 14.1. Normative References . . . . . . . . . . . . . . . . . . .1716 14.2. Informative References . . . . . . . . . . . . . . . . . . 17 Appendix A. IKEv2 MessageId examplesID Sync Examples . . . . . . . . . . . 17 A.1. Normal Failover - Example 1 . . . . . . . . . . . . . . . 17Authors' AddressesA.2. Normal Failover - Example 2 . . . . . . . . . . . . . . . 18 A.3. Simultaneous Failover . . . . . . . . . . . . . . . . . . 181. Introduction IKEv2 is used for deploying IPsec-based VPNs. In order to make such VPN highly available, more scalable and failure-prone,Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 18 1. Introduction The IPsec protocol suite, including IKEv2, is a major building block of virtual private networks (VPNs). In order to make such VPNs highly available, more scalable and failure-resistant, these VPNs are implemented as IKEv2/IPsec Highly Available (HA) cluster.ButHowever there are many issuesinwith the IKEv2/IPsec HA cluster. The problem statement draft"IPsec Cluster Problem Statement"Section 4 enumeratesallthe issuesencountered inaround the IKEv2/ IPsec HAcluster.cluster solution. In the case ofHot Standbya hot-standby cluster implementation of IKEv2/IPsec based VPNs, the IKEv2/IPsec sessiongetsis first establishedwithbetween the peer and the active member of the cluster.After that,Later, the active membersyncs/ updatescontinuously syncs/updates the IKE/IPsec SA state to the standby member of the cluster. This primary SA state sync-upis done ontakes place upon each SAbring upbring-up and/or rekey.DoingPerforming the SA statesynchronization/updation between active and peer membersynchronization/update foreachevery single IKE and IPsec messagestandby clusteris very costly, so normallyitsit is done periodically.So,As a result, when"failover" event happens inthecluster, first "failover'failover event happens, this is first detected by the standby memberand thenand, possibly after a considerable amount of time, it becomes the activemember and it takes considerable time.member. Duringthe time ofthis failoverand standby member becoming newly active member,process the peer is unaware of the failover event, and keeps sending IKErequestrequests and IPsec packets to thecluster whichcluster, as in fact it is allowedas perto do because of the IKEv2and IPsecwindowing feature.Now, newly activeAfter the newly-active memberafter coming up findsstarts, it detects themismtachmismatch in IKEmessage Id'sMessage ID values and IPsec replaycounters.counters and needs to resolve this situation. Please see Section 4 for moredetails.details of the problem. This document proposes an extension to the IKEv2 protocol to solve main issues of IKEmessage id syncMessage ID synchronization and IPsec SA replay countersyncsynchronization and gives implementation advice for others.HereFollowing is a summary of the solutions provided in this document: o IKEv2 MessageId synchronization :ThisID synchronization: this is done by syncing up the expected send and receivemessage IdMessage ID values with thepeerpeer, and updating the values at the newly active clustermember after the failover.member. o IPsec Replay Countersynchronization : Thissynchronization: this is done bysyncing up bumped upincrementing the cluster's outgoing SA replaycounterscounter valueswith peerby a "large" number, andupdating thesynchronizing these valuesatwith thenewly active cluster member afterpeer. The peer send its outgoing SA reply counter in thefailover Thoughresponse. Although this document describes the IKEv2message Id syncMessage ID and IPsec replay counter synchronization in the context of an IPsec HA cluster, the solution provided isgeneticgeneric and can be used in other scenarios where IKEv2message Id syncMessage ID or IPsec SA replaycounters sync is required. While some IPsec HA implementation suffers from IKEv2 message Idcounter synchronizationproblem, some other implementation suffers frommay be required. Implementations differ on the need to synchronize the IKEv2 Message ID and/or IPsec replaycounter synchronization.counters. Both of these problem are handled separately, using a separatenotifynotification for eachproblem.capability. This provides the flexibility of implementingIKEv2 message Id synchronization or IPsec replay counter synchronizationeither orboth.both of these solutions. 2. Terminology 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 inRFC 2119[RFC2119]. "SA CounterSYNC Request" isSynchronization Request/Response" are theinformation exchangerequestdefined in this document to synchronize the IKEv2/IPsec SA counter information between memberviz. response of thecluster and the peer. "SA Counter SYNC Response" is theinformation exchangeresponsedefined in this document to synchronize the IKEv2/IPsec SA counter information between one member of the cluster and the peer.Below areSome of the termstakenlisted below are reused from[IPsec Cluster Problem Statement][RFC6027] withadded informationfurther clarification in the context ofthisthe current document. o "Hot Standby Cluster", or "HS Cluster" is a cluster where only one of the members is active at any one time. This member is also referred to as the"active","active" member, whereas the other(s) are referred to as"standbys"."standby" members. VRRP([RFC5798])[RFC5798] is one method of building such a cluster. The goal of Hot Standby Cluster is that it creates illusion of single virtual gateway to the peer(s). o "Active Member" is the primary member in theHot StandbyHot-Standby cluster. It is responsible for forwarding packetsforon behalf of the virtual gateway. o "Standby Member" is the primary backuprouter. Themember. This member takescontrolcontrol, i.e. becomes the activemembermember, after the"failover"failover event. o "Peer" isthean IKEv2/IPsec endpointwhich establishesthat maintains a VPN connection withHot Standbythe Hot-Standby cluster. The Peerknows Hot Standby Clusteridentifies the cluster bysinglethe cluster's (single) IP address.In case of "failover",If a failover event occurs, the standby member of the cluster becomes active,soand the peer normally doesn't notice that"failover"failover hasoccurredtaken place. o "Failover Count" is a global failover event counter maintained by the HA cluster and incremented by 1 upon each failover event in the HA cluster. All members of the HA cluster share the failover count. o "Multiple failover" is the situationwhenwhere, in a cluster with three or morenodesmembers, failover happens in rapid succession.The protocol andIt is our goal that the implementationmustshould be able to handlemultiple failoverthis situation, i.e.ableto handle the new failover event even ifthey areit is still processing the old failover. o "Simultaneous failover" is the situationwhen inwhere two clusters have acluster theVPN connection between them, and failover happens at the both ends at the same time.The protocol andIt is our goal that implementationmustshould be able to handle simultaneous failover. The generic termIKEv2/IPsec"IKEv2/IPsec SAcountersCounters" is usedthroughout. By IKEv2 SA counter stands forthroughout this document. This term refers to both IKEv2 Message ID counters (mandatory, and used to ensure reliable delivery as well as to protect against messageidsreplay in IKEv2) and IPsec SAcounter stands for IPsec SAreplay counterswhich are(optional, and used to provideoptionalthe IPsec anti-replayfeature.feature). 3. IssuessolvedResolved from IPsec Cluster Problem Statement The IPsec Cluster Problem Statementdefines[RFC6027] enumerates the problemsencountered inraised by IPsecClusters. .clusters. Theproblems along with their section names as given in the statementfollowing table lists the problem statement's sections that areas follows.resolved by this document. o 3.2. Lots of Long Lived State o 3.3. IKE Counters o 3.4. Outbound SA Counters o 3.5. Inbound SA Counters o 3.6. MissingSynchSynchronization Messages o 3.7. Simultaneous use of IKE and IPsec SAs by Different Members * 3.7.1. Outbound SAs using counter modes o 3.8. Different IP addresses for IKE and IPsec o 3.9. Allocation of SPIsThis document solves theThe mainissuesproblem areas are solved using the protocolextension,extension defined below, and additionally this document provides implementation advice for other issues, given as follows. o 3.2 This section mentions thatthere's lotsthere is a large amount of state that needs to be synchronized.IfHowever if state is not synchronized,it'sthis is not really an interestingcluster -cluster: failoverwill be just likeis equivalent to areboot,reboot of the cluster member, and so the issue need not be solved with protocol extensions. o 3.3, 3.4,3.5, and 3.6 are solved by this document. Please see Section 4, for more details. o 3.7 isthean implementation problem that needs to be solved while building IPsec clusters. However, the peers should bemandatedrequired to accept multiple parallel SAs for3.7.13.7.1. o 3.8 can be solved by using the IKEv2 RedirectMechanism [RFC-5685].mechanism [RFC5685]. o 3.9isdiscusses theproblem about avoiding collisionavoidance ofsame SPI's amongcollisions where the same SPI value is used by multiple cluster members. This is outside the document's scopeof the documentsincethis hasthe problem needs to be solvedwithin the context ofinternally to the cluster and does notwithinvolve the peer. 4. The IKEv2/IPsec SA Counter Synchronization Problem The IKEv2RFCprotocol [RFC5996] states that "An IKE endpoint MUST NOT exceed the peer's stated window size for transmitted IKE requests".As per the protocol, allAll IKEv2packets followsmessages are required to follow a request-response paradigm. The initiator of an IKEv2 request MUST retransmit the request, until it has received a response from the peer. IKEv2 introduces a windowing mechanism that allows multiple requests to be outstanding at a given point of time, but mandates that the sender windowdoesshould not move until the oldest message sent from one peer to another is acknowledged. Loss of even a singlepacketmessage leads to repeatedre-transmissionsretransmissions followed by an IKEv2 SA teardown if there- transmissionsretransmissions are unacknowledged. An IPsec Hot Standby Cluster is required to ensure that in the case offailover of active member,failover, the standby member becomes active immediately. The standby member is expected to have the exactvalues of message id fieldsvalue of the Message ID counter as the active member had before failover. Evenwithassuming the besteffortseffort to update themessage IdMessage ID values from active to standby member, the values at the standby member can still be stale due to the following reasons: oStandbyThe standby member is unaware of the last message that was received and acknowledged by theolderpreviously activemembermember, as the failover event could have happened before the standby member could be updated. oStandbyThe standby member does not have information about on-going unacknowledged requestsof active member beforereceived by thefailover event. Sopreviously active member. As a result after the failoverevent when standbyevent, the newly active memberbecomes active, it can not re-transmitcannot retransmit those requests. When a standby member takes over as the active member, itwould startcan only initialize themessage id rangesMessage ID values from the previously updated values. This would make it reject requests from thepeer, since thepeer when these valueswould beare stale.As a sender,Conversely, the standby member may end up reusing a stalemessage idMessage ID value whichwillwould cause the peer to drop the request. Eventually there is a high probability of the IKEv2 and corresponding IPsec SAs getting torn down simply because of a transitorymessage id mis-matchMessage ID mismatch andre-transmissionretransmission ofrequests. This is not a desirable featurerequests, negating the benefits ofHA. Even after updating standby member periodicallythe high availability clustercan loose IKE and so all IPsec SA due to message id i.e. SA counter mismatch. Similardespite the periodic update between the cluster members. A similar issue is also observedinwith IPsec anti-replay countersalsoif anti-replay protection/ESN isimplemented. Even withimplemented, which is commonly thebest effortscase. Regardless ofsyncinghow well the ESP and AH SAcounter numberscounters are synchronized from the active tostand by member ,the standby member, there is a chance that thestand-bystandby member wouldhaveend up with stale counter values. The standby member would thensend theuse those stale counternumbers.values when sending IPsec packets. The peer would reject/drop such packets sincein case ofwhen the anti-replay protectionfeature,feature is enabled, duplicate use of countersareis not allowed.In case ofNote that IPsecit is OKallows the sender to skip some counter values andstartcontinue sending withthehigher counter values.HenceWe conclude that a mechanism is requiredin HAto ensure that the standby member has correctvalues of message Id valuesMessage ID and IPseccounters,counter values when it becomes active, so that sessions are not torn downjust becauseas a result ofmismatchingmismatched counters. 5.IKEv2/IPsec SACounter Synchronization SolutionWhenIn general, when the standby member becomes the active member afterfailover event inthecluster,failover event, the standby memberwould sendsends an authenticated IKEv2 request to thepeerpeer, asking it to send itsvalues ofSAcounters.counter values. The standby memberwouldthenupdateupdates itsvalues ofown SAcounterscounter values andthen start sending/receiving the requests.can resume normally sending and receiving protocol messages. First, the peer MUST negotiate its ability to support IKEv2message IdMessage ID synchronizationinformationwith the active member of the cluster by sending the IKEV2_MESSAGE_ID_SYNC_SUPPORTED notification in the IKE_AUTH exchange.SimilarlySimilarly, to support IPsecreplay counterReplay Counter synchronization, the peer MUST negotiateits ability to support IPsec replay counter synchronizationthis capability with the active member of the cluster by sending the IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED notification in the IKE_AUTH exchange. Peer Active Member - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HDR, SK {IDi, [CERT], [CERTREQ], [IDr], AUTH,N[IKEV2_MESSAGE_ID_SYNC_SUPPORTED], N[IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED],[N(IKEV2_MESSAGE_ID_SYNC_SUPPORTED),] [N(IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED),] SAi2, TSi, TSr} ----------><----------<-------- HDR, SK {IDr, [CERT+], [CERTREQ+], AUTH,N[IKEV2_MESSAGE_ID_SYNC_SUPPORTED], N[IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED],[N(IKEV2_MESSAGE_ID_SYNC_SUPPORTED),] [N(IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED),] SAr2, TSi, TSr} When the peer and active member both support SA counter synchronization, the active member MUSTsync/updateinform the standby member of the SA counter synchronization capabilityto the standby memberafter the establishment of the IKESA . So thatSA. The standby memberis aware of the capability andcan then useitthis capability when it becomes the active member after a failover event. After the failover event, when the standby member becomesthe active member,active, it has to request thepeer for theSAcounters. Standbycounters from the peer. The newly-active memberwould initiateinitiates theSYNC Requestsynchronization request with anINFORMATIONALInformational exchange withmessage IdMessage ID zero containing either thenotifynotification IKEV2_MESSAGE_ID_SYNC orIPSEC_REPLAY_COUNTER_SYNC or boththe two notifications IKEV2_MESSAGE_ID_SYNC and IPSEC_REPLAY_COUNTER_SYNC, depending on whether the synchronizationneedsis to be done for IKEv2message Ids,Message IDs or for both IKEv2 Message IDs and IPsec replaycounters, or both.counters. If the active member has only negotiated synchronization of IPsec Replay Counters, the request is sent as a regular IKEv2 Informational exchange (i.e. with a non-zero Message ID) containing the notification IPSEC_REPLAY_COUNTER_SYNC. The initiator of the IKEv2message Id syncMessage ID synchronization request sends its expected send and receivemessage IdMessage ID values and "failover count" in a IKEV2_MESSAGE_ID_SYNCnotify.notification. The responderof the requestcompares the received values withthe availableits local values. For both send and receive values, The higheramong bothbetween the cluster member's and the local value isselectedselected, and sentas syncin the response message withnotifythe notification IKEV2_MESSAGE_ID_SYNC. The initiator now updates its send and receive IKEv2message IdsMessage IDs to the values received insyncthe response and can now start a normal IKEv2 message exchange. The initiator of an IPsecreplay counter syncReplay Counter synchronization sendsbumpedthe incremented outgoing IPsec SA reply counter value and a "failover count" in a IPSEC_REPLAY_COUNTER_SYNCnotify.notification in IKEv2 INFORMATIONAL exchange. The responderof the requestupdates its incoming IPsec SA counter valuesandaccording to the received value. The responder now sends itsbumpedown incremented outgoing IPsec SAreplay counterReplay Counter value insynca synchronization response message, withIPSEC_REPLAY_COUNTER_SYNC.the same IPSEC_REPLAY_COUNTER_SYNC notification. The initiator can nowupdatesupdate its incoming IPsec SA counter to values received insyncthe response message and can start normal IPsec data traffic.Both the notify typesThe IKEV2_MESSAGE_ID_SYNCand IPSEC_REPLAY_COUNTER_SYNC contain Nonce Data in thenotification payload contain nonce data to avoidDOSa denial-of-service (DoS) attack due to replay of SA countersync request/response.synchronization response. TheNoncenonce values aredefined per notifyselected randomly on each new notification and MUST bevalidated.validated by the receiver. TheNoncenonce data sent in the response MUST matchwiththe nonce data sent by the newly-active member in its request. If the nonce data received in the response does not matchwiththe request's noncedata sent in request,data, thestandby i.e. newly-activecluster member MUST silently discard this response, and SHOULD revert to normal IKEv2 behavior ofre- transmittingretransmitting the request and waiting for a genuine a reply from thepeer SHOULD follow, before tearing downpeer. Eventually this might result in the SA being torn down because ofre-transmits.excessive retransmissions. Standby [Newly Active] Member Peer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HDR, SK{N[IKEV2_MESSAGE_ID_SYNC ], N[IPSEC_REPLAY_COUNTER_SYNC]}{N(IKEV2_MESSAGE_ID_SYNC), [N(IPSEC_REPLAY_COUNTER_SYNC)]} --------> <--------- HDR, SK {N(IKEV2_MESSAGE_ID_SYNC), [N(IPSEC_REPLAY_COUNTER_SYNC)]} Alternatively, if only IPsec Replay Counter synchronization is desired, a normal Information exchange is used, where the Message ID is non-zero: Standby [Newly Active] Member Peer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HDR, SK{N(IPSEC_REPLAY_COUNTER_SYNC)} --------> <--------- HDR, SK{N[IKEV2_MESSAGE_ID_SYNC ], N[IPSEC_REPLAY_COUNTER_SYNC]}{N(IPSEC_REPLAY_COUNTER_SYNC)} 6. IKEv2/IPsecsynchronization notification payloads Below areSynchronization Notification Payloads This section lists the newnotify and payloadnotification payloads typesthat aredefined by this extension. 6.1. IKEV2_MESSAGE_ID_SYNC_SUPPORTED IKEV2_MESSAGE_ID_SYNC_SUPPORTED: Thisnotifynotification payload is included in the IKE_AUTH request/response to indicate supportforof the IKEv2message IdMessage ID synchronization mechanism described in this document. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Payload |C| RESERVED | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Protocol ID(=0)| SPI Size (=0) | Notify Message Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The 'Next Payload', 'Payload Length', 'Protocol ID', 'SPI Size', and 'Notify Message Type' fields are the same as described in Section 3 of[RFC5996].[RFC5996] . The 'SPI Size' field MUST be set to 0 to indicate that the SPI is not present in this message. The 'Protocol ID' MUST be set to 0, since the notification is not specific to a particular security association. The 'Payload Length' field is set to the length in octets of the entire payload, including the generic payload header. The 'Notify Message Type' field is set to indicatethe IKEV2_MESSAGE_ID_SYNC_SUPPORTED payload.IKEV2_MESSAGE_ID_SYNC_SUPPORTED, value TBD by IANA. There is no data associated with this notification. 6.2. IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED: Thisnotifynotification payload is included in the IKE_AUTH request/response to indicate support for the IPsec SAreplay counterReplay Counter synchronization mechanism described in this document. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Payload |C| RESERVED | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Protocol ID(=0)| SPI Size (=0) | Notify Message Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The 'Next Payload', 'Payload Length', 'Protocol ID', 'SPI Size', and 'Notify Message Type' fields are the same as described in Section 3 of[RFC5996].[RFC5996] . The 'SPI Size' field MUST be set to 0 to indicate that the SPI is not present in this message. The 'Protocol ID' MUST be set to 0, since the notification is not specific to a particular security association. The 'Payload Length' field is set to the length in octets of the entire payload, including the generic payload header. The 'Notify Message Type' field is set to indicatethe IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED payload.IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED, value TBD by IANA. There is no data associated with this notification. 6.3. IKEV2_MESSAGE_ID_SYNC IKEV2_MESSAGE_ID_SYNC : This notification payload type (value TBD by IANA) is defined tosyncsynchronize the IKEv2message Ids amongMessage ID values between the newly-active[standby](formerly standby) cluster member and the peer. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Payload | RESERVED | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Protocol ID(=0)| SPI Size (=0) | Notify Message Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FailovercountCount | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nonce Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | EXPECTED_SEND_REQ_MESSAGE_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | EXPECTED_RECV_REQ_MESSAGE_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ It contains the following data. o FailovercountCount (4octets) : The failoveroctets): a running countwithin the cluster,of failover events between cluster members, itincreases withis initialized to 0 when the cluster is first set up, and incremented by 1 upon each failoverevent in HA cluster.event. o Nonce Data (4octets) : Theoctets): the random nonce data.ItThe data should besent sameidentical in theSYNC Requestsynchronization request andResponse. The nonce data is used to counter the replay of IKEV2_MESSAGE_ID_SYNC response by the attacker.response. o EXPECTED_SEND_REQ_MESSAGE_ID (4octets) : This MUST be present only if protocol ID is IKE. Thisoctets): this field is used by the sender of thisnotify,notification payload to indicate themessage IdMessage ID it will use in the nextrequest,request that it will send to the othersideprotocol peer. o EXPECTED_RECV_REQ_MESSAGE_ID (4octets) : Thisoctets): this field is used by the sender of thisnotify,notification payload to indicate themessage IdMessage ID itcan acceptis expecting in the nextrequest,request to be received from the othersideprotocol peer. 6.4. IPSEC_REPLAY_COUNTER_SYNC IPSEC_REPLAY_COUNTER_SYNC: This notification payload type (value TBD by IANA) is defined tosyncsynchronize the IPsec SAreplay counters amongReplay Counters between the newly-active[standby](formerly standby) cluster member and the peer. Since there may be numerous IPsec SAs established under a single IKE SA, we do not directly synchronize the value of each one. Instead, a delta value is sent and all Replay Counters for child SAs of this IKE SA are incremented by the same value. Note that this solution requires that all these Child SAs either use or do not use Extended Sequence Numbers [RFC4301]. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Payload|ESN||E| RESERVED | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Protocol ID(=0)| SPI Size (=0) |Failover countNotify Message Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Outgoing IPsec SA counter | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ItThe notification payload contains the following data. oESNE (1bit) :bit): The ESNbitbit. This MUST beON1 if the IPsecSASAs were established with Extended Sequence Numbers. oFailover count (4 octets) : The failover count within the cluster, it increases with each failover event in HA cluster. oOutgoing IPsec SAcounterdelta value (4octetsor 8octect) :octects): Theoutgoing IPsec SA counter issender will increment the all thebumped-up outgoing IPsec SA replay counter value considering ALLChild SAunder the IKEv2 SA.Replay Counters for its outgoing traffic by this value. The size ofoutgoing IPsec SA counterthis field depends on ESNbit. Ifbit: if the ESN bit isON, it is1, its sizeofis 8octets elseoctets, otherwise it is 4 octets. 7. Implementation Detailsof implementationThemessage Id used IKEV2_MESSAGE_ID_SYNCMessage ID value used in the Informational exchange that contains the IKEV2_MESSAGE_ID_SYNC notification MUST be zero so that it is not validated upon receipt asperrequired by normal IKEv2 windowing. The MessageIdID zero MUST bepermittedaccepted onlyfor informationalin an Informational exchange thatwould have NOTIFYcontains a notification of type IKEV2_MESSAGE_ID_SYNC. If anyINFORMATIONALInformational exchangeuses the message Id Zero, without havinghas a Message ID zero, but not thisNotify, thennotification type, suchpacketsmessages MUST be discarded upon decryption and the INVALID_SYNTAXnotifynotification SHOULD be sent.No otherOther payloadsare allowedMUST NOT be sent in this Informational exchange. Whenever an IKEV2_MESSAGE_ID_SYNC or IPSEC_REPLAY_COUNTER_SYNCnotifynotification payload is received with an invalid failover count or invalid nonce data, the event SHOULD be logged. The standby member can initiate the synchronization of IKEv2 MessageId'sID's under different circumstances. o When it receivesthe bada problematic IKEv2/IPsecpacket. The 'bad" IKEv2/ IPsec packet meanspacket, i.e. a packet outside its expected receive window. o When it has to sendanthe first IKEv2/IPsec packet after a failover event. oItWhen it has justgot thereceived control from active member andwould requirewishes to update the valuesbefore-hand,proactively, so that it need not start this exchangeat the time of sending/receivinglater, when sending or receiving the request. The standby member can initiate the synchronization of IPsec SACountersReplay Counters: o If thereishas been traffic using the IPsec SA in the recent past andthere could be stale replay counter atthe standby member suspects that its Replay Counter may be stale. Since there can bemanya large number of sessions atStandbythe standby member, and sending synchronization exchangesfromfor all ofthe sessions can cause throttling,them may result in overload, the standby member can choose to initiate the exchange in a "lazy" fashion: only when it has to send or receive the request.ThusIn general, thetriggerstandby member is free to initiate this exchangedepends on the requirement/discretion of the standby member. Theat its discretion. A cluster member which has not announced its capability by using IKEV2_MESSAGE_ID_SYNC_SUPPORTED MUST NOTsend/receivesend or accept thenotifynotification IKEV2_MESSAGE_ID_SYNC.TheA cluster member which has not announced its capability by using IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED MUST NOTsend/receivesend or accept thenotifynotification IPSEC_REPLAY_COUNTER_SYNC. If a peergetsreceives a IKEV2_MESSAGE_ID_SYNC or IPSEC_REPLAY_COUNTER_SYNC requesteven thoughalthough itdidhad notannounce itsannounced the appropriate capability in the IKE_AUTH exchange, then it MUST silently ignore this message.IfAs usual in IKEv2, if any of theNotify or the SYNC request/responsenotification payloads defined here is malformed,then it is treated asthe receiver must announce this fact using the INVALID_SYNTAXmessage.notification. 8.Step-by-Step details The stepStep bystep details ofStep Details This section goes through thesynchronizationsequence ofIKE message Id is as follows.steps of a typical failover event, where the IKEv2 Message ID values are synchronized. oActiveThe active cluster member and the peer device establish thesession .session. They both announce the capability tosync thesynchronize counterinfoinformation by sending the IKEV2_MESSAGE_ID_SYNC_SUPPORTEDnotifynotification in the IKE_AUTH Exchange. oActiveThe active memberdiesdies, andStand-bya standby member takes over.Standby MemberThe standby member sends its own idea of the IKE MessageID (its side)IDs (both incoming and outgoing) to the peer in anINFORMATIONALInformational message exchange withmessage IdMessage ID zero. o The peer first authenticates the message and then validatesthatthe failover count. The peerwill comparecompares the received values with the values available locally andfinallypicks the higher value. It then updates itsmessage Id'sMessage IDs with the higher values and also propose the same values inResponse.its response. o The peer should not wait for any pendingresponseresponses while responding withthis message Idthe new Message ID values. Forexampleexample, if the window size is 5 andpeerthe peer's window is3-73-7, and if the peer has sent requests 3,4,5,6,74, 5, 6, 7 andbut got responsereceived responses only for4,5,6,74, 5, 6, 7 but not3for 3, then it shouldsendinclude theEXPECTED_SEND_REQ_MESSAGE_ID asvalue 8 in its EXPECTED_SEND_REQ_MESSAGE_ID payload and should not wait for a responseofto message 3 anymore. oTheSimilarly, the peer should also not wait for pendingrequest also.(incoming) requests. For example if the window size is 5 andpeerthe peer's window is 3-7 and if the peer has received requests4,5,6,74, 5, 6, 7 but not33, then it should send theEXPECTED_RECV_REQ_MESSAGE_ID asvalue 8 in the EXPECTED_RECV_REQ_MESSAGE_ID payload, and should notwait forexpect to receive message 3 anymore.There is cornerIn casewith "failover count' andmultiplefailover. What if "failover count" issuccessive failover events and sync request getting lost, the failover count value at peer will not be updatedon a member,andnext "failover" happened, then "failover count"new standby member will become active with incremented failover count value. So, peer can receive valid failover count value which isupdated on other side butnoton this member. [[ This need to be discussed on mailing list. ]]just incremented by 1 in case of multiple failover. Accepting incremented failover count within a range is allowed and increases interoperability. 9. Security ConsiderationsThereSince Message ID synchronization messages need to be sent with Message ID zero, they are potentially vulnerable to replay attacks. Because of the semantics of this protocol, these can only betwo typesdenial- of-service (DoS) attacks, and we are aware ofDOS attacks.two variants. o Replay of MessageSYNC Request.ID synchronization request: This is countered by"failover count",use of the Failover Count, since synchronization starts after the failover event and each member of the clusterisneeds to be aware of the failover event. The receiver ofsyncthe synchronization request should verify the received Failover Count and maintainfailover count.its own copy of it. If a peeragainreceives asyncsynchronization request withsame "failover count',an already observed Failover Count, it can safelysafelydiscard the request if it has already received valid IKEv2 request/response from other side peer after sync exchange. The peer will be not be aware that sync response has reached to other side till it receives a valid IKEv2 request/response from other side. The peer can send the cached response for sync request till it has not received valid request/response from other side peer or failover count has not increased. o Replay of the MessageSYNC Response.ID synchronization response: This is countered by sending theNONCEnonce data along with thesync notify.synchronization payload. The sameNONCEnonce data has to be returned in response. Thus the standby membercanwill acceptthea reply only for the current request. After it receivesthea valid response, it MUST NOT process the same response again and MUST discardthe response.any additional responses. 10. Interaction with other drafts Theprimary assumptionusage scenario of the IKEv2/IPsec SACounter Synchronizationcounter synchronization proposal is that an IKEv2 SA has been established between the active member ofHot Standby Clustera hot-standby cluster and a peer,after that thethen a failover event occurredand nowwith the standby memberhas "become"becoming active.It alsoThe proposal further assumes that the IKEv2 SA state wassyncedcontinuously synchronized between the active and standbymembermembers of theHot Standby Clustercluster before the failover event. o SessionResumption. Sessionresumption [RFC5723] assumes that a peeri.e. client(client orinitiatorinitiator) detects the need to re-establish the session. In IKEv2/IPsec SA counter synchronization,standbyit is the newly-active memberwhich becomes active i.e.(a gateway orresponderresponder) that detects the need to synchronize the SA counter after the failover event. Also inHot Standby Cluster,a hot-standby cluster, the peer establishes the IKEv2/IPsec session withsingle cluster's IP address, so peer normally does not detect the event of failover in the cluster until standby member took very long to become active and IKEv2 SA times out via liveness check. So, session resumption and SA counter synchronization after failover are mutually exclusive. o This document describes the operation of tightly coupled clusters, which are the common way of building IPsec clusters. In these clusters, all members appear to the peer as one gateway, specifically they sharea single IPaddress. High availability can also be provided by loosely coupled clusters (for lack of a better term), which are a group of gateways that do not share an IPaddressand do not synchronize state. In this architecture,that represents theclient can use Session Resumption to fail-over from one cluster member to another. Specifically this requires: * Support of session resumption on peers and gateways. * A common session resumption ticket format on all gateways (not currently standardized). * Configuration onwhole cluster, so thepeerspeer normally does not detect the event of failover in the cluster unless the standby member takes too long to become active and thegroupIKEv2 SA times out by use ofgateways that constitutethecluster.IKEv2 liveness check mechanism. To conclude, session resumption and SA counter synchronization after failover are mutually exclusive. oRedirect.The IKEv2 Redirect mechanism for load-balancing [RFC5685] can be used either duringinit (IKE_SA_INIT) and auth (IKE_AUTH)the initial stages of SA setup (the IKE_SA_INIT and IKE_AUTH exchanges) or after session establishment.WhileSA countersyncsynchronization isusedonly useful after the IKE SA has been established and a failover event has occurred.SoSo, unlike Redirect, it ismutually exclusive with redirectirrelevant duringinit and auth. The redirectthe first two exchanges. Redirect after the session has been established isusedmostly useful for timed or planned shutdown/maintenance.TheA real failover eventcan notcannot be detectedonby the active memberbeforehandahead of time, and so usingredirectRedirect after session establishment is not possible in the case of failover. So, Redirect and SA counter synchronization after failover are mutually exclusive. oCrash detection. Solves theIKEv2 Failure Detection [I-D.ietf-ipsecme-failure-detection] solves a similar problem where the peer can rapidly detect that a cluster member has crashed based on a token. It ismutually exclusive with HA with SA counter sync.unrelated to the current scenario because the goal in failover is for the peer not to notice that a failure has occurred. 11. IANA Considerations This document introduces four new IKEv2 Notification Message types as described in Section 6.The new Notify Message Types must be assigned values between 16396 and 40959. o IKEV2_MESSAGE_ID_SYNC_SUPPORTED. o IPSEC_REPLAY_COUNTER_SYNC_SUPPORTED. o IKEV2_MESSAGE_ID_SYNC. o IPSEC_REPLAY_COUNTER_SYNC. 12. Acknowledgements We would like to thank Pratima Sethi and Frederic Detienne for theirreviewsreview comments and valuable suggestions for the initial version of the document. We would also like to thank the following people (in alphabetical order) for their review comments and valuable suggestions: Dan Harkins, Paul Hoffman, Steve Kent, Tero Kivinen, David McGrew, Pekka Riikonen, and YaronSheffar.Sheffer. 13. Change Log This section lists all the changes in this document. NOTE TO RFC EDITOR: Please remove this section before publication. 13.1. Draft -02 Addressed comments by Yaron Sheffer posted on the WG mailing list. Numerous editorial changes. 13.2. Draft -01 Added "Multiple and Simultaneous failover'scenarios.scenarios as pointed out by Pekka Riikonen. Now document provides a mechanism to sync either IKEv2 message or IPsec replay counter or both to cater different types of implementations. HA cluster's "failover count' is used to encounter replay of sync requests by attacker. The sync of IPsec SA replay counter optimized to to have just one global bumped-up outgoing IPsec SA counter of ALL Child SAs under an IKEv2 SA. The examples added for IKEv2message IdMessage ID sync to provide more clarity. Some edits as per comments on mailing list to enhance clarity.13.2.13.3. Draft -00 Version 00 is identical to draft-kagarigi-ipsecme-ikev2-windowsync-04, started as WG document. Added IPSECME WG HA design team members as authors. Added comment in Introduction to discuss the window sync process on WG mailing list to solve some concerns. 14. References 14.1. Normative References[IPsec Cluster Problem Statement] Nir, Y., "IPsec Cluster Problem Statement", July 2010.[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC4301] Kent, S. and K. Seo, "Security Architecture for the Internet Protocol", RFC 4301, December 2005. [RFC5996] Kaufman, C., Hoffman, P., Nir, Y., and P. Eronen, "Internet Key ExchangeProtocol: IKEv2",Protocol Version 2 (IKEv2)", RFC 5996, September 2010. [RFC6027] Nir, Y., "IPsec Cluster Problem Statement", RFC 6027, October 2010. 14.2. Informative References [I-D.ietf-ipsecme-failure-detection] Nir, Y., Wierbowski, D., Detienne, F., and P. Sethi, "A Quick Crash Detection Method for IKE", draft-ietf-ipsecme-failure-detection-01 (work in progress), October 2010. [RFC5685] Devarapalli, V. and K. Weniger, "Redirect Mechanism forIKEv2",the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 5685, November 2009. [RFC5723] Sheffer, Y. and H. Tschofenig,"IKEv2"Internet Key Exchange Protocol Version 2 (IKEv2) Session Resumption", RFC 5723, January 2010. [RFC5798] Nadas, S., "Virtual Router Redundancy Protocol (VRRP) Version 3 for IPv4 and IPv6", RFC 5798, March 2010. Appendix A. IKEv2 MessageId examples Below are theID Sync Examples This (non-normative) section presents some examplestothat illustrate how the IKEv2message IdMessage ID values aresynced. The notation used to denotesynchronized. We use a tuple notation, denoting the two counters EXPECTED_SEND_REQ_MESSAGE_ID and EXPECTED_RECV_REQ_MESSAGE_ID on a memberisas (EXPECTED_SEND_REQ_MESSAGE_ID, EXPECTED_RECV_REQ_MESSAGE_ID). A.1. NormalfailoverFailover - Example 1 Standby[Newly Active](Newly Active) Member Peer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sync RequestSYNC(2, 3) --------> Peer has the valuesas(4, 5) so it sends< -------------( 4,<------------- (4, 5) as the Sync ResponseSYNCA.2. NormalfailoverFailover - Example 2 Standby[Newly Active](Newly Active) Member Peer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sync RequestSYNC(2, 5) --------> Peer has the valuesas(2, 4) so it sends< -------------( 5,<-------------(5, 4) as the Sync ResponseSYNCA.3. SimultaneousfailoverFailover In the case of simultaneous failover, boththesides send theSYNCsynchronization request, but whichever side has the higher value will be eventuallysynced.synchronized. Standby[Newly Active](Newly Active) Member Peer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -request SYNCSync Request (4,4) -----> <--------------request SYNCSync Request (5,5)response SYNCSync Response (5,5) ----> <--------response SYNCSync Response (5,5) Authors' Addresses Raj Singh (Editor) Cisco Systems, Inc. Divyashree Chambers, B Wing, O'Shaugnessy Road Bangalore, Karnataka 560025 India Phone: +91 80 4301 3320 Email: rsj@cisco.com Kalyani Garigipati Cisco Systems, Inc. Divyashree Chambers, B Wing, O'Shaugnessy Road Bangalore, Karnataka 560025 India Phone: +91 80 4426 4831 Email: kagarigi@cisco.com Yoav Nir Check Point Software Technologies Ltd. 5 Hasolelimst.St. Tel Aviv 67897 Israel Email: ynir@checkpoint.com Dacheng Zhang Huawei Technologies Ltd. Email: zhangdacheng@huawei.com