<?xml version="1.0" encoding="UTF-8"?><?rfc linefile="1:/tmp/CGI20477.1"?><?rfc linefile="1:/tmp/CGI20477.1"?>
<!-- automatically generated by xml2rfc v1.35 on 2010-06-14T15:29:31Z -->
<!-- automatically generated by xml2rfc v1.35 on 2010-06-14T15:29:31Z -->
<?xml-stylesheet type='text/xsl' href='./rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc symrefs="no"?>
<?rfc compact="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc strict="yes" ?>
<?rfc linkmailto="yes" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" >
    
<?xml-stylesheet type='text/xsl' href='./rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes" ?>
<?rfc subcompact="yes" ?>
<?rfc sortrefs="yes" ?>
<rfc ipr="trust200902" docName="draft-ikev2-windowssync-00" category="std">
  <front>
    <title abbrev="IKEv2 window synchronisation">IKEv2 window synchronisation among peers</title>
    <author initials="G." surname="Kalyani" fullname="Kalyani Garigipati">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>SEZ Unit, Cessna Business Park</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560025</code>
          <country>India</country>
        </postal>
        <phone>+91 80 4426 4831</phone>
        <email>kagarigi@cisco.com</email>
      </address>
    </author>
    <date year="2010"/>
    <area>Security Area</area>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>   This document describes an extension to the IKEv2 protocol that
        allows the synchronisation of ikev2 windows between the peers.</t>
    </abstract>
  </front>
  <middle>
    <!-- ====================================================================== -->
    <section title="Introduction" toc="default">
      <t>  IKEv2 RFC states that "An IKE endpoint MUST NOT exceed the peer's stated window size for
        transmitted IKE requests".</t>

      <t>As per the protocol , all IKEv2 packets must 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 window does not move until the oldest message sent from one peer to another is acknowledged.
        Loss of even a single packet leads to repeated retransmissions followed by an IKEv2 SA teardown if the retransmissions are unacknowledged.</t>

      <t>HA for IKEv2 is required to ensure that in case of crash of active device , the stand-by device becomes active immediately.
        The stand-by device is expected to have the exact values of message id fields of active device when it crashed.
        Even with the best efforts to update the message Id values from active to stand-by device, the values at standby 
        device can be stale due to following reasons.

        <list style="symbols">         
          
        <t> standby device does not have a retransmission buffer corresponding to that of old active SA .</t>
        
        <t> standby device is unaware of the last message that was received and acknowledged by the 
          older active device as failover could have happened before the standby could be updated. </t></list></t>
        
      <t> When a stand-by device takes over as the active device, it would start the message id ranges from previously updated values.
        This would make it reject requests from the peer , since the values would be stale.
        As a sender, the stand-by device may end up reusing a stale message-id which will 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 
        transitory message-id mismatch.  This is not a desirable feature of HA.</t>
        
      <t>Hence a mechanism is required in HA to ensure that the stand-by device has correct values of message Id values, 
        so that sessions are not torn down just because of window ranges.</t>      
         
    </section>
    <section title="Terminology" toc="include">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
        "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in
          <xref target="RFC2119" pageno="false" format="default">RFC 2119</xref>.</t>

      <t>
        <list style="symbols">
         
          <t> stand-by device : The device which will take control , when the active device crashes.</t>
           
          <t> active device : This is the primary device in the cluster. The stand-by and active device form a cluster. </t>         
          
          <t> peer device:  This is the device with which any device in the cluster , would establish an IKEv2 session.</t>     
          
          <t> WINDOW_SYNC : A new type of exchange that is used to update the window at stand-by device.</t>
          
          <t> SYNC_EXCH_MESSAGE_ID : This is the message Id sent as payload data in the WINDOW_SYNC exchange.</t>                    
          </list>
      </t>
    </section>
        
    <section title="Description of the solution" toc="include">
      <t>After the stand-by device takes control over the active device, the stand-by device 
        would request the peer to send its values of message Id fields.</t>
        
       <t> The stand-by device would then update its values 
        of message Id fields and then start sending/receiving the requests.</t>   
      
    </section>
    
    <section title="Details of implementation" toc="include">
      
      <t>A new exchange called WINDOW_SYNC exchange is required which is used
        to exchange the message Id information among stand-by and peer device.  These
        exchanges are rate limited per IKEv2 SA.</t>
       
      <t>  Device which receives the messages of type WINDOWS_SYNC exchange MUST
        ignore the message Id field and MUST NOT validate the message Id in the header with the current window.</t> 
       
      <t>    The stand-by device can initiate this Exchange    <list style="symbols">   
                       
        <t> when it has to send/receive the request.</t>
        <t>  It has just got the control from active device and want to update the values before-hand,
        so that it need not start this exchange at the time of sending/receiving the request.</t> 
      </list>
      </t>
        
      <t> Since there can be many sessions at Stand-by device, and sending exchanges from all of the
        sessions can cause throttling, the stand-by device can chose to initiate the exchange when it has to
        send or receive the request. Thus the trigger to initiate this exchange depends on the requirement/discretion
        of the stand-by device.</t>
      
      <t>Upon configuration the active device would announce its capability of
        participating in window sync exchange by sending a VID payload in the
        INIT exchange. This capability is updated at the stand-by device so that 
        is aware that it can participate in WINDOW_SYNC exchange.</t>
      
      <t> The device which has received this VID payload can participate in the
        WINDOW_SYNC exchange.  A device MUST NOT send this exchange if it did
        not receive this VID payload.</t>
      
      <t>  If a device gets this type of exchange even though it did not send
        the VID payload, then it MUST drop this packet with error
        INVALID_SYNTAX.</t>
      
      <t> If responder of this exchange does not reply to this exchange, even
        though responder has announced its capability in VID payload, then
        the initiator SHOULD retransmit. The responder MUST retransmit the
        SET_MESSAGE_ID_INFO notify only for the earlier received GET_MESSAGE_ID_INFO.</t>
                
    </section>
    
    <section title="Notify Types" toc="default">
      
    <t>Below are the two notify types that are newly defined <list style="symbols">
          
    <t>GET_MESSAGE_ID_INFO :  This notify would be similar to that any other simple notify 
      with the notify type being GET_MESSAGE_ID_INFO. The value of SYNC_EXCH_MESSAGE_ID should be 
      sent as data in this. <list style ="symbols" >       
      <t> SYNC_EXCH_MESSAGE_ID : This MUST be started with zero and incremented for 
        every consequent GET_MESSAGE_ID_INFO notify sent over an IKEv2 SA. </t>
      </list>
      
      <figure align="left" title="GET_MESSAGE_ID_INFO">
        <artwork align="left" xml:space="preserve"> 
                          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      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | SYNC_EXCH_MESSAGE_ID                                          |
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


            </artwork>
      </figure>
      </t>
   
      <t> SET_MESSAGE_ID_INFO : This notify would be similar to that of GET_MESSAGE_ID_INFO but with 
          Notify message type being SET_MESSAGE_ID_INFO.Additionally it contains the 
          following data.<list style ="symbols" >   
            <t>SYNC_EXCH_MESSAGE_ID : This value should be filled with the value received in GET_MESSAGE_ID_INFO 
            notify.</t>
            
           <t> EXPECTED_SEND_REQ_MESSAGE_ID : This field is used by the sender of this notify,
           to indicate the message Id it will use in the next request, that it will send to the peer.</t>
            
           <t> EXPECTED_RECV_REQ_MESSAGE_ID : This field is used by the sender of this notify,
            to indicate the message Id it can accept in the next request, received from the peer.</t>
            
         </list>
          
          <figure align="left" title="SET_MESSAGE_ID_INFO">
            <artwork align="left" xml:space="preserve"> 
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Next Payload  |C|  RESERVED   |         Payload Length        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Protocol ID  |   SPI Size    |      Notify Message Type      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | SYNC_EXCH_MESSAGE_ID                                          |
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    | EXPECTED_SEND_REQ_MESSAGE_ID                                  |
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    | EXPECTED_RECV_REQ_MESSAGE_ID                                  |
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    
        </artwork>
          </figure>
        </t>     
     </list>
    </t>
    </section>
    
    <section anchor="Security" title="Security Considerations" toc="default">
      <t> In order to avoid getting replays of the same Notify of
        GET_MESSAGE_ID_INFO and SET_MESSAGE_ID_INFO, SYNC_EXCH_MESSAGE_ID is
        used as payload data. </t>
      
      <t> The window size for this exchange is always 1, which means that the sender cannot send the 
        GET_MESSAGE_ID_INFO with different SYNC_EXCH_MESSAGE_ID value.  This value MUST be started with zero. 
        The number of times responder can retransmit the SET_MESSAGE_ID_INFO can be rate limited to avoid the DOS attacks.</t>
       </section>
    
    <section  title="VID Payload" toc="default">
      <t>  The VID payload is as described in [RFC4306] with a 16-octets data
        field as follows:</t>
      <t>ae3303f2ddd9ced6a903ce8a152429b7</t>
      <t> This value was obtained by hashing the string "sync message Id information" using the MD5 algorithms.</t>
      
    </section>   
  
    <section  title="IANA Considerations" toc="default">    
    
      <t>
        This document defines a new exchange and two new IKEv2 Notification Message types as
        described in Section 5.The new Notify Message Types must be assigned values between 16396 and 40959.
   <list style="symbols">    
   <t>WINDOW_SYNC_EXCHANGE</t>    
   <t> GET_MESSAGE_ID_INFO</t>    
   <t> SET_MESSAGE_ID_INFO</t>
   </list>
    </t>
    </section>    
    
    <section   toc="default" title="Acknowledgements">
      <t>  I would like to thank Pratima Sethi and Frederic Detienne for their valuable reviews and suggestions. </t>
    </section>    
    
  </middle>  
 
  <!-- ====================================================================== -->
  
  <back>     
    <references title="Normative References">
      <reference anchor="RFC2119">
        <front>
          <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement
            Levels</title>
          <author initials="S." surname="Bradner" fullname="Scott Bradner">
            <organization>Harvard University</organization>
            <address>
              <postal>
                <street>1350 Mass. Ave.</street>
                <street>Cambridge</street>
                <street>MA 02138</street>
              </postal>
              <phone>- +1 617 495 3864</phone>
              <email>sob@harvard.edu</email>
            </address>
          </author>
          <date year="1997" month="March"/>
          <area>General</area>
          <keyword>keyword</keyword>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <format type="TXT" octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt"/>
        <format type="HTML" octets="16553"
          target="http://xml.resource.org/public/rfc/html/rfc2119.html"/>
        <format type="XML" octets="5703" target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"
        />
      </reference>
      <reference anchor="RFC4306">
        <front>
          <title>Internet Key Exchange (IKEv2) Protocol</title>
          <author initials="C." surname="Kaufman" fullname="C. Kaufman">
            <organization/>
          </author>
          <date year="2005" month="December"/>
        </front>
        <seriesInfo name="RFC" value="4306"/>
        <format type="TXT" target="http://www.ietf.org/rfc/rfc4306.txt"/>
        <format type="HTML" target="http://xml.resource.org/public/rfc/html/rfc4306.html"/>
        <format type="XML" target="http://xml.resource.org/public/rfc/xml/rfc4306.xml"/>
      </reference>
      
      <reference anchor="RFC4718">
        <front>
          <title>IKEv2 Clarifications and Implementation Guidelines</title>
          <author initials="P." surname="Eronen" fullname="P. Eronen">
            <organization/>
          </author><author initials="P." surname="Hoffman" fullname="P. Hoffman">
            <organization/>
          </author>
          <date year="2006" month="October"/>
        </front>
        <seriesInfo name="RFC" value="4306"/>
        <format type="TXT" target="http://www.ietf.org/rfc/rfc4718.txt"/>
        <format type="HTML" target="http://xml.resource.org/public/rfc/html/rfc4718.html"/>
        <format type="XML" target="http://xml.resource.org/public/rfc/xml/rfc4718.xml"/>
      </reference>

     </references>
     <!-- ====================================================================== -->
  </back>
  
 
  
</rfc>

