Configuring IKEv2 Fragmentation

The IKE Fragmentation adhering to RFC feature implements fragmentation of Internet Key Exchange Version 2 (IKEv2) packets as proposed in the IETF draft-ietf-ipsecme-ikev2-fragmentation-10 document.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

Information About Configuring IKEv2 Fragmentation

IKEv2 Fragmentation

The Internet Key Exchange Version 2 (IKEv2) fragmentation protocol splits large IKEv2 message into a set of smaller ones, called IKE Fragment Messages. The IKEv2 fragmentation methodology, implemented on Cisco IOS software through the IKEv2 Remote Access Headend feature, is a Cisco proprietary method, which restricts interoperability with non-Cisco peers. The fragmentation is performed only on an encrypted IKEv2 packet, and hence, a peer cannot decrypt or authenticate the message until the peer receives all fragments. The IKE Fragmentation adhering to RFC feature implements the IETF draft-ietf-ipsecme-ikev2-fragmentation-10 document by encrypting packets after fragmentation, enabling interoperability with non-Cisco peers while continuing to support the Cisco proprietary fragmentation method.

Negotiation Between Peers

Effective with the IKE Fragmentation adhering to RFC feature, the support for the IETF standard fragmentation method is added the IKE_SA_INIT message as a notify payload, while Cisco proprietary Fragmentation method continues to be indicated using the Vendor ID payload in the same IKE_SA_INIT message. When fragmentation is enabled, support for both methodologies is displayed as appropriate in the show crypto ikev2 sa detail command. The maximum transmission unit (MTU) is configured locally and is not negotiated or exchanged along with the messages. After the INIT exchange, the peers in a network configured with either methodology are aware of the authentication method that must be used and whether the AUTH message can be fragmented.

The following is a sample output from device when debug is enabled showing capability negotiation in INIT request message.

*Oct 14 08:45:24.732: IKEv2:(SESSION ID = 0,SA ID = 1):Next payload: SA, version: 2.0 Exchange type: IKE_SA_INIT, flags: INITIATOR Message id: 0, length: 524
Payload contents:
SA Next payload: KE, reserved: 0x0, length: 144
…
Security protocol id: IKE, spi size: 0, type: NAT_DETECTION_DESTINATION_IP
NOTIFY(IKEV2_FRAGMENTATION_SUPPORTED) Next payload: VID, reserved: 0x0, length: 8
Security protocol id: Unknown - 0, spi size: 0, type: IKEV2_FRAGMENTATION_SUPPORTED
VID Next payload: NONE, reserved: 0x0, length: 20

In the above output, the INIT request contains the intiator’s message to a responder indicating support for both IETF standard fragmentation method and Cisco proprietary fragmentation method through the IKEV2_FRAGMENTATION_SUPPORTED and VID values in the message.

The following is a sample output from device when debug is enabled showing capability negotiation in INIT response message.

*Oct 14 08:45:24.732: IKEv2:(SESSION ID = 0,SA ID = 1):Next payload: SA, version: 2.0 Exchange type: IKE_SA_INIT, flags: INITIATOR Message id: 0, length: 524
Payload contents:
SA Next payload: KE, reserved: 0x0, length: 144
last proposal: 0x0, reserved: 0x0, length: 140
…
NOTIFY(IKEV2_FRAGMENTATION_SUPPORTED) Next payload: VID, reserved: 0x0, length: 8
Security protocol id: Unknown - 0, spi size: 0, type: IKEV2_FRAGMENTATION_SUPPORTED <-------- Response, supporting both
VID Next payload: NONE, reserved: 0x0, length: 20 <-------- Response, supporting both

In the above output, the response request contains the responder’s message to the initiator indicating support for both IETF standard fragmentation method and Cisco proprietary fragmentation method through the IKEV2_FRAGMENTATION_SUPPORTED and VID values in the message.

Fragmentation Support for Older Releases

To ensure fragmentation support for older releases having Cisco proprietary fragmentation method, IKEv2 continues to use the Vendor ID along with the IKEv2 notification payload type for the IETF standard fragmentation method. If both fragmentation methods are supported, IKEv2 prefers the IETF standard fragmentation method.

The following table indicates how the fragmentation type is determined based on the capability of peers. CISCO refers to Cisco proprietary fragmentation method and STD refers to the IETF standard fragmentation method.

Peer 1 Capability

Peer 2 Capability

Active Fragmentation Type on the Security Association

STD + CISCO

STD + CISCO

STD

STD

STD

STD

CISCO

CISCO

CISCO

CISCO

STD + CISCO

CISCO

STD

STD + CISCO

STD

STD

CISCO

None

None

None or STD + CISCO or STD or CISCO

None

Encryption, Decryption, and Retransmission of Fragments

Fragmentation and Encryption

A packet is fragmented either based on the maximum transmission unit (MTU) value specified in the crypto ikev2 fragmentation command or the default MTU value. IKE messages that only contain the encrypted payload are fragmented. A new payload type—Encrypted and Authenticated Fragment—in the announcement message indicates the fragment number out of the total fragments. This payload is annotated as SKF and the value is 53.

Before the outgoing packet is encrypted, the packet length is checked. The security association established is also verified if the SA is enabled with the IETF standard fragmentation method. The following is a sample output from device displaying the transmission of fragmented packets.

*Oct 16 10:31:22.221: IKEv2:(SESSION ID = 0,SA ID = 3):Next payload: SKF, version: 2.0 Exchange type: INFORMATIONAL, flags: INITIATOR Message id: 1, length: 244
Payload contents:
SKF Next payload: COOP, reserved: 0x90, length: 216 
SKF Fragment number: 1 OF Total Fragments: 3
*Oct 16 10:31:22.222: IKEv2:(SESSION ID = 0,SA ID = 3):Next payload: SKF, version: 2.0 Exchange type: INFORMATIONAL, flags: INITIATOR Message id: 1, length: 244
Payload contents:
SKF Next payload: COOP, reserved: 0x90, length: 216
SKF Fragment number: 2 OF Total Fragments: 3 
*Oct 16 10:31:22.222: IKEv2:(SESSION ID = 0,SA ID = 3):Next payload: SKF, version: 2.0 Exchange type: INFORMATIONAL, flags: INITIATOR Message id: 1, length: 244
Payload contents:
SKF Next payload: COOP, reserved: 0x90, length: 216
SKF Fragment number: 3 OF Total Fragments: 3

The line “SKF Next payload: COOP, reserved: 0x90, length: 216” and “SKF Fragment number: 1 OF Total Fragments: 3” indicate that the message is a Cooperative key server announcement (ANN) packet fragmented into three fragments.

Decryption and Defragmentation

When incoming fragments are received on a responder, each fragment is decrypted and stored temporarily. During defragmentation (assembling the fragments to the original pack), duplicate fragments, fragment numbers outside of total fragment number, and fragments having an entirely different fragment number are dropped. The fragments are added in ascending order of fragment number and not according to the received order), that way, packet assembly is faster. However, out of order fragments are allowed and processed. Each fragment is verified to ensure that all fragments that pertain to a message are received. If all fragments are received, the packet is assembled from the fragments and processed as a newly received message. Acknowledgment (ACK) message is sent when the original packet is assembled, and not for each fragment.

Retransmissions

IKEv2 retransmissions happen as prompted by IKEv2 retransmission timers. The fragments once constructed and sent out for the first time, are held in a list, ready to be resent when the retransmission timers are triggered. When a retransmitted request is received, IKEv2 resends the response. The response is resent when the first fragment (#1) retransmission is received. The remaining fragment numbers are ignored, thereby allowing faster processing of the response.

Enabling Fragmentation

Use the crypto ikev2 fragmentation command to globally enable fragmentation per security association (SA). Fragmentation is enabled on SA when both peers indicate support for fragmentation after INIT exchange on each peers, to be used for IKE_AUTH exchange.


Note


This command was introduced through IKEv2 Remote Access Headend feature and has not changed.


You can specify the maximum transmission unit (MTU), in bytes, using the mtu mtu-size keyword-argument pair. The MTU size refers to the IP or UDP encapsulated IKEv2 packets. The MTU range is from 68 to 1500 bytes. The default MTU size is 576 for IPv4 packets and 1280 bytes for IPv6 packets.

Effective with the IKE Fragmentation adhering to RFC feature, the crypto ikev2 fragmentation command:

  • Affects future SAs only and does not affect the existing, old SAs.

  • Supports Cisco proprietary fragmentation method and the IETF standard fragmentation method.

The show crypto ikev2 sa detail command displays the following information:

  • The fragmentation method enabled on the peer. If the enabled fragmentation method is IETF standard fragmentation, the output displays the MTU, which is in use.

  • Whether fragmentation is enabled on both peers or enabled on the local peer only.

IPv6 Support

The IKE Fragmentation adhering to RFC feature adds support for fragmenting IPv6 packets in IPv6 IKE endpoints when the IETF standard fragmentation method is used. The default MTU value is 1280 bytes and is used when the MTU is not specified in the crypto ikev2 fragmentation command. The MTU used in fragmentation is displayed in the output of the show crypto ikev2 sa detail command.

How to Configure Configuring IKEv2 Fragmentation

Configuring IKEv2 Fragmentation

Perform this task to enable automatic fragmentation of large IKEv2 packets.

SUMMARY STEPS

    1.    enable

    2.    configure terminal

    3.    crypto ikev2 fragmentation [mtu mtu-size]

    4.    end


DETAILED STEPS
     Command or ActionPurpose
    Step 1 enable


    Example:
    Device> enable
     

    Enables privileged EXEC mode.

    • Enter your password if prompted.

     
    Step 2 configure terminal


    Example:
    Device# configure terminal
     

    Enters global configuration mode.

     
    Step 3 crypto ikev2 fragmentation [mtu mtu-size]


    Example:
    Device(config)# crypto ikev2 fragmentation mtu 100
     

    Configures IKEv2 fragmentation.

    • The MTU range is from 68 to 1500 bytes. The default MTU size is 576 for IPv4 packets and 1280 bytes for IPv6 packets.

    Note   

    The MTU size refers to the IP or UDP encapsulated IKEv2 packets.

     
    Step 4 end


    Example:
    Device(config)# end
     

    Exits global configuration mode and returns to privileged EXEC mode.

     

    Configuration Examples for Configuring IKEv2 Fragmentation

    Example: IETF Fragmentation Enabled Displaying Configured MTU

    The following is a sample output stating IETF standard fragmentation method is enabled. This statement is displayed when the responder supports IETF standard fragmentation method also. The output also displays the MTU in use.

    Device# show crypto ikev2 sa detail
    
    IPv4 Crypto IKEv2 SA
    
    Tunnel-id Local Remote fvrf/ivrf Status
    1 10.0.8.3/848 10.0.9.4/848 none/none IN-NEG
    Encr: Unknown - 0, PRF: Unknown - 0, Hash: None, DH Grp:0, Auth sign: Unknown - 0, Auth verify: Unknown - 0
    Life/Active Time: 86400/0 sec
    CE id: 0, Session-id: 0
    Status Description: Initiator waiting for INIT response
    Local spi: 2CD1BEADB7C20854 Remote spi: 0000000000000000
    Local id: 10.0.8.3
    Remote id:
    Local req msg id: 0 Remote req msg id: 0
    Local next msg id: 1 Remote next msg id: 0
    Local req queued: 0 Remote req queued: 0
    Local window: 1 Remote window: 1
    DPD configured for 0 seconds, retry 0
    IETF Std Fragmentation enabled. 
    IETF Std Fragmentation MTU in use: 272 bytes. 
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : Yes
    
    IPv6 Crypto IKEv2 SA
    

    Example: IETF Standard Fragmentation Method Configured on the Initiator

    The following is a sample output displaying IETF standard fragmentation method configured on the initiator, and the responder supports Cisco proprietary fragmentation method.

    Device# show crypto ikev2 sa detail
    
    IPv4 Crypto IKEv2 SA
    
    Tunnel-id Local Remote fvrf/ivrf Status
    1 10.0.8.3/848 10.0.9.4/848 none/none READY
    Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:5, Auth sign: PSK, Auth verify: PSK
    Life/Active Time: 86400/59 sec
    CE id: 1001, Session-id: 1
    Status Description: Negotiation done
    Local spi: 84350219051DB9E3 Remote spi: 52A8BB3898E8B5CF
    Local id: 10.0.8.3
    Remote id: 10.0.9.4
    Local req msg id: 4 Remote req msg id: 0
    Local next msg id: 4 Remote next msg id: 0
    Local req queued: 4 Remote req queued: 0
    Local window: 5 Remote window: 5
    DPD configured for 0 seconds, retry 0
    IETF Std Fragmentation configured.
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : Yes
    
    IPv6 Crypto IKEv2 SA

    The following is a sample output displaying the responder’s configuration. Note that the output displays Cisco proprietary fragmentation method as configured, not enabled.

    Device# show crypto ikev2 sa detail
     
    IPv4 Crypto IKEv2 SA
    
    Tunnel-id Local Remote fvrf/ivrf Status
    1 10.0.9.4/848 10.0.8.3/848 none/none READY
    Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:5, Auth sign: PSK, Auth verify: PSK
    Life/Active Time: 86400/52 sec
    CE id: 1001, Session-id: 1
    Status Description: Negotiation done
    Local spi: 52A8BB3898E8B5CF Remote spi: 84350219051DB9E3
    Local id: 10.0.9.4
    Remote id: 10.0.8.3
    Local req msg id: 0 Remote req msg id: 4
    Local next msg id: 0 Remote next msg id: 4
    Local req queued: 0 Remote req queued: 4
    Local window: 5 Remote window: 5
    DPD configured for 0 seconds, retry 0
    Fragmentation configured. 
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : No
    
    IPv6 Crypto IKEv2 SA

    The following example displays that the initiator supports IETF standard fragmentation method, whereas the responder does not support fragmentation. Note that the output states IETF standard fragmentation method is configured and not enabled.

    Device# show crypto ikev2 sa detail
    IPv4 Crypto IKEv2 SA
    
    Tunnel-id Local Remote fvrf/ivrf Status
    1 10.0.8.3/848 10.0.9.4/848 none/none READY
    Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:5, Auth sign: PSK, Auth verify: PSK
    Life/Active Time: 86400/44 sec
    CE id: 1004, Session-id: 2
    Status Description: Negotiation done
    Local spi: 03534703287D9CA1 Remote spi: 146E1CFA68008A92
    Local id: 10.0.8.3
    Remote id: 10.0.9.4
    Local req msg id: 4 Remote req msg id: 0
    Local next msg id: 4 Remote next msg id: 0
    Local req queued: 4 Remote req queued: 0
    Local window: 5 Remote window: 5
    DPD configured for 0 seconds, retry 0
    IETF Std Fragmentation configured.
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : Yes

    The following is a sample output displaying the responder’s configuration. Note the statement “Fragmentation not configured.”

    Device# show crypto ikev2 sa detail
    IPv4 Crypto IKEv2 SA
    
    Tunnel-id Local Remote fvrf/ivrf Status
    1 10.0.9.4/848 10.0.8.3/848 none/none READY
    Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:5, Auth sign: PSK, Auth verify: PSK
    Life/Active Time: 86400/23 sec
    CE id: 1004, Session-id: 4
    Status Description: Negotiation done
    Local spi: 146E1CFA68008A92 Remote spi: 03534703287D9CA1
    Local id: 10.0.9.4
    Remote id: 10.0.8.3
    Local req msg id: 0 Remote req msg id: 3
    Local next msg id: 0 Remote next msg id: 3
    Local req queued: 0 Remote req queued: 3
    Local window: 5 Remote window: 5
    DPD configured for 0 seconds, retry 0
    Fragmentation not configured.
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : No

    Example: IETF Standard Fragmentation Method not Configured on the Initiator

    The following is a sample output displaying no fragmentation method configured on the initiator.

    Device# show crypto ikev2 sa detail
    
    IPv4 Crypto IKEv2 SA
    
    Tunnel-id Local Remote fvrf/ivrf Status
    2 10.0.8.3/848 10.0.9.4/848 none/none DELETE
    Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:5, Auth sign: PSK, Auth verify: PSK
    Life/Active Time: 86400/28 sec
    CE id: 1001, Session-id: 1
    Status Description: Deleting IKE SA
    Local spi: 1A375C00C1D157CF Remote spi: DB50F1BC58814FFA
    Local id: 10.0.8.3
    Remote id: 10.0.9.4
    Local req msg id: 2 Remote req msg id: 4
    Local next msg id: 4 Remote next msg id: 5
    Local req queued: 2 Remote req queued: 4
    Local window: 5 Remote window: 5
    DPD configured for 0 seconds, retry 0
    Fragmentation not configured.
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : No
    
    IPv6 Crypto IKEv2 SA

    Example: IPv6 Support for Fragmentation

    This following example shows fragmentation on FlexVPN endpoints—hub and spoke. The following configuration pertains to the hub, which is configured with a maximum transmission unit (MTU) of 1300 for fragmenting the packets.

    Device# show crypto ikev2 sa detail
    
    IPv4 Crypto IKEv2 SA
    
    IPv6 Crypto IKEv2 SA
    
    Tunnel-id fvrf/ivrf Status
    1 none/none READY
    Local 4001::2000:3/500
    Remote 4001::2000:1/500
    Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:5, Auth sign: PSK, Auth verify: PSK
    Life/Active Time: 86400/64 sec
    CE id: 1001, Session-id: 1
    Status Description: Negotiation done
    Local spi: 45BA0D30D0EB5FFF Remote spi: 8D7B5A8389CEB8B3
    Local id: R2.cisco.com
    Remote id: R1.cisco.com
    Local req msg id: 3 Remote req msg id: 0
    Local next msg id: 3 Remote next msg id: 0
    Local req queued: 3 Remote req queued: 0
    Local window: 5 Remote window: 5
    DPD configured for 0 seconds, retry 0
    IETF Std Fragmentation enabled.
    IETF Std Fragmentation MTU in use: 1272 bytes.
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : Yes
    Remote subnets:
    10.0.0.251 255.255.255.255
    IPv6 Remote subnets:
    3001::/112
    5001::/64

    The following configuration pertains to the spoke, which is configured with the default MTU.

    Device# show crypto ikev2 sa detail
    
    IPv4 Crypto IKEv2 SA
    
    IPv6 Crypto IKEv2 SA
    
    Tunnel-id fvrf/ivrf Status
    1 none/none READY
    Local 4001::2000:1/500
    Remote 4001::2000:3/500
    Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:5, Auth sign: PSK, Auth verify: PSK
    Life/Active Time: 86400/58 sec
    CE id: 1001, Session-id: 1
    Status Description: Negotiation done
    Local spi: 8D7B5A8389CEB8B3 Remote spi: 45BA0D30D0EB5FFF
    Local id: R1.cisco.com
    Remote id: R2.cisco.com
    Local req msg id: 0 Remote req msg id: 3
    Local next msg id: 0 Remote next msg id: 3
    Local req queued: 0 Remote req queued: 3
    Local window: 5 Remote window: 5
    DPD configured for 0 seconds, retry 0
    IETF Std Fragmentation enabled.
    IETF Std Fragmentation MTU in use: 1232 bytes.
    Extended Authentication not configured.
    NAT-T is not detected
    Cisco Trust Security SGT is disabled
    Initiator of SA : No
    Remote subnets:
    10.0.0.3 255.255.255.255

    Additional References for Configuring IKEv2 Fragmentation

    Related Documents

    Related Topic

    Document Title

    Cisco IOS commands

    Cisco IOS Master Command List, All Releases

    Security Commands

    Standards and RFCs

    Standard/RFC

    Title

    IKEv2 Fragmentation

    draft-ietf-ipsecme-ikev2-fragmentation-10

    Technical Assistance

    Description

    Link

    The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

    http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

    Feature Information for Configuring IKEv2 Fragmentation

    The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.
    Table 1 Feature Information for Configuring IKEv2 Fragmentation

    Feature Name

    Releases

    Feature Information

    IKEv2 Fragmentation adhering to RFC

    Cisco IOS XE Release 3.15S

    The IKE Fragmentation adhering to RFC feature implements fragmentation of Internet Key Exchange Version 2 (IKEv2) packets as proposed in the IETF draft-ietf-ipsecme-ikev2-fragmentation-10 document.

    The following command was modified: show crypto ikev2 sa.