<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.21 (Ruby 3.0.2) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

<!ENTITY RFC4301 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4301.xml">
<!ENTITY RFC7296 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7296.xml">
<!ENTITY I-D.ietf-ipsecme-labeled-ipsec SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ipsecme-labeled-ipsec.xml">
]>


<rfc ipr="trust200902" docName="draft-mglt-ipsecme-ts-dscp-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="TS_DSCP">Traffic Selector for Internet Key Exchange version 2 to add support Differentiated Services Field Codepoints (DSCP)</title>

    <author initials="D." surname="Migault" fullname="Daniel Migault">
      <organization>Ericsson</organization>
      <address>
        <email>daniel.migault@ericsson.com</email>
      </address>
    </author>
    <author initials="J." surname="Halpern" fullname="Joel Halpern">
      <organization>Ericsson</organization>
      <address>
        <email>joel.halpern@ericsson.com</email>
      </address>
    </author>
    <author initials="U." surname="Parkholm" fullname="U. Parkholm">
      <organization>Ericsson</organization>
      <address>
        <email>ulf.x.parkholm@ericsson.com</email>
      </address>
    </author>

    <date year="2023" month="March" day="10"/>

    <area>Security</area>
    <workgroup>IPsecme</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document defines a new Traffic Selector for Internet Key Exchange version 2 to add support Differentiated Services Field Codepoints (DSCP) as  a traffic selector of the  Security Policy Database (SPD).
The new Traffic Selector type TS_DSCP consists of DSCP values associated to the negotiated SA.</t>



    </abstract>



  </front>

  <middle>


<section anchor="introduction"><name>Introduction</name>

<t><xref target="RFC4301"/> does not include Differentiated Services Field Codepoints (DSCP) as Traffic Selectors (TS). 
<xref section="4.1" sectionFormat="comma" target="RFC4301"/> acknowledges that aggregating traffic with mutliple DSCP over the same SA may result in inappropriate discarding of lower priority packets due to the windowing mechanism used by this feature. 
However, to address such concern, <xref section="4.1" sectionFormat="comma" target="RFC4301"/> recommends the sender implements a "classifier" mechanism which dispatches the traffic over multiple SAs.</t>

<t>Such "classifier" results in inbound and outbound traffic may take SA negotiated via different IKEv2 sessions and thus makes SA management more complex with an unnecessary SAs.
This causes both a resource issue - especially with hardware implementation that are designed with a limited number of SAa - as well operational and management issues.</t>

<t>This document specifies a new Traffic Selector Type TS_DSCP for IKEv2 that can be used to negotiate DSCP as additional selectors for the Security Policy Database (SPD) to further restrict the type of traffic allowed to be sent and received over the IPsec SA.</t>

<t>This document follows the clarification between Traffic Selector and Traffic Selector payload (TS) described in <xref section="1.2" sectionFormat="comma" target="I-D.ietf-ipsecme-labeled-ipsec"/> and uses TS only to designate the TSi/TSr payload. 
This document uses TS_DSCP to designates the TS_TYPE value of the Traffic Selector payload with a specific TS_TYPE set to TS_DSCP.</t>

</section>
<section anchor="tsdscp-traffic-selector-type"><name>TS_DSCP Traffic Selector Type</name>

<t>This document defines a new TS_TYPE, TS_DSCP that contains a list of opaque DSCP value.</t>

<section anchor="tsdscp-payload-format"><name>TS_DSCP payload format</name>

<t><spanx style="verb">bash
                     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
+---------------+---------------+-------------------------------+
|   TS Type     |    Reserved   |       Selector Length         |
+---------------+---------------+-------------------------------+
|                                                               |
~                      List of DSCP Values                      ~
|                                                               |
+---------------------------------------------------------------+
</spanx></t>

<t>As mentioned in <xref section="3.13.1" sectionFormat="comma" target="RFC7296"/>, All fields other than TS Type and Selector Length depend on the TS Type.</t>

<t><list style="symbols">
  <t>TS Type (one octet) - Set to TBD1 for TS_DSCP</t>
  <t>Selector Length (2 octets, unsigned integer) - Specifies the length of this Traffic Selector substructure including the header.</t>
  <t>Reserved (one octet): MUST be set to zero by the sender and MUST be ignored by the receiver.</t>
  <t>List of DSCP Values: The concatenation of the DSCP values associated to the SA. Each value is coded over one octet and considered as opaque value by the SAD.</t>
</list></t>

</section>
<section anchor="tsdscp-properties"><name>TS_DSCP properties</name>

<t>A TS MUST NOT contain more than one TS_DSCP. 
Upon receiving more than one TS_DSCP, an TS_UNACCEPTABLE Error Notify message MUST be returned.</t>

<t>The absence of the TS_DSCP indicates that all DSCP values will match the SA. 
A TS_DSCP MUST explicitly contain all DSCP values that a valid IP packet MUST match.</t>

<t>The DSCP values contents are opaque to the IKE implementation.
That is, the IKE implementation might not have any knowledge of the meaning of this selector, other than as a type and opaque value to pass to the SPD.</t>

<t>A zero length list of DSCP Values indicates that no DSCP values are associated to the SA. In other words, no traffic qualifies.
Upon receiving such a TS_DSCP a TS_UNACCEPTABLE Error Notify message MUST be returned by the IKEv2 responder.
A responder that does not accept any of the proposed DSCP values SHOULD return a zero length list of DSCP Values. 
This clearly indicates the issue is related to the proposed DSCP values as opposed to the presence of the TS_TYPE TS_DSCP. 
The responder MAY also send a TS_UNACCEPTABLE Error Notify message.</t>

<t>Upon receiving a list of DSCP values, the responder MAY accept the full list or MAY narrow down the list.
The responder MUST NOT add new DSCP values and the initiator MUST NOT create the Child SA.</t>

<t>When a TS_DSCP is included in the TSi/TSr Payloads.<br />
If the responder replies with TSi/TSr that include the TS_DSCP, than the Child SA MUST be created including the negotiated DSCP values.<br />
If the responder did not include a TS_DSCP in its response, then the initiator will install the Child SA without including any DSCP values.
If the initiator required the TS_DSCP, it MUST not install the Child SA and it MUST send a Delete notification for the Child SA so the responder can uninstall its Child SA.</t>

</section>
</section>
<section anchor="traffic-selector-negotiation"><name>Traffic Selector negotiation</name>

<t>If the TS contains a TS_DSCP along with another TS_TYPE, the responder MUST create each TS response for the Traffic Selector of TS_TYPE TS_IPV4_ADDR_RANGE  or  TS_IPV6_ADDR_RANGE, using its normal rules specifed for each of those TS_TYPE. 
The responder includes the acceptable DSCP values. These values will apply to all Traffic Selectors mentioned in the resulting TS - including an empty list of DSCP values.
If this is not possible, it MUST return a TS_UNACCEPTABLE Error Notify payload.</t>

<t>As TS_DSCP MAY NOT be supported, the initiator SHOULD first try
to negotiate the Child SA with the TS payload including the optional
TS_DSCP.
If such a negotiation results in receiving a TS_UNACCEPTABLE Error Notify, it SHOULD attempt a new Child SA negotiation using the same TS but without TS_DSCP.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<t>IANA is requested to allocate two values in the "IKEv2 Traffic Selector Types" registry
(available at https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xhtml#ikev2-parameters-16) with the following definition:</t>

<figure><artwork><![CDATA[
+=======+======================+
| Value | TS Type  | REFERENCE |
+=======+ =====================+
| TBD1  | TS_DSCP  | This-RFC  |
+-------+----------------------+
]]></artwork></figure>

</section>
<section anchor="security-considerations"><name>Security Considerations</name>

<t>A packet that matches an SPD entry for all components except the DSCP values would be treated as "not matching".
If no other SPD entries match, the traffic might end up being transmitted in the clear.</t>

<t>It is not different from ensuring that IP traffic is not sent in clear text and it is presumed that the IPsec subsystem itself would install a REJECT/DISCARD rule in the SPD to prevent that traffic from being transmitted without IPsec protection.</t>

</section>
<section anchor="acknowledgements"><name>Acknowledgements</name>

</section>


  </middle>

  <back>


    <references title='Normative References'>

&RFC4301;
&RFC7296;


    </references>

    <references title='Informative References'>

&I-D.ietf-ipsecme-labeled-ipsec;


    </references>


<section anchor="illustrative-example"><name>Illustrative Example</name>

<t>```
Initiator                         Responder
-------------------------------------------------------------------
HDR, SK {N(REKEY_SA), SA, Ni, [KEi,]
    TSi, TSr}   --&gt;
    with:
      TSi = ( TS_IPV6_ADDR_RANGE, TS_DSCP_LIST1 )
      TSr = ( TS_IPV6_ADDR_RANGE )</t>

<figure><artwork><![CDATA[
                            <--  HDR, SK {SA, Nr, [KEr,]
                                     TSi, TSr}
with:
  TSi = ( TS_IPV6_ADDR_RANGE, TS_DSCP_LIST1 )
  TSr = ( TS_IPV6_ADDR_RANGE ) ```
]]></artwork></figure>

</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA8VZa3MbtxX9zhn+B9T+IsUkLcmu02iatoxI14odRSPS6WQ6
HQXcBUnU+wqAFcU68W/vuRfAcvmQnaaZdm2PtVg8zr333BfU7/e7Haddps7F
1Mj5XCdiojKVuNKIOf5dFk6ZQjnxWq3F+D5ZymKhxJ0yVpeFOBOuFDJNha2r
qjROjPR8rowqnJZOpdjK3OlEWfFSqywVF2WqqlIXzoqj0eTi+lh0O3I2M+oO
p09uaajbScukkDnwpMDj+vkic31dWZXkqu9sP7VJ1T856XZ0Zc6FM7V1Zycn
X5ycYSuj5DnOTGqj3brbWS3OxeU1r+x23q3OG2H6I9q620mkOxfWpd2OdVib
Y8Z4+rLb6XYqfd7tCEiXnIu1svSzhXxGze1mYJ233nF87Zal4XX09OMPQugC
s0YD8Y1eyDpzmw9e0JEsoJ79r6WBAGOjE2vLYjOscqkzqIdXDXK/6i8qzBsk
Zf4QhK8H4pXMKuhgF8LXJQDsffs4gH9izWDp1/yi498OxLU075Zllu+ef/DT
x4+vs/ngflCFVTsA6E+/3xdyBsvKxNH7dKmtALvqHPwUqZrrAsyUolCr/wv3
pRU43YWTbTy5nAu3VKLhsbguM52swRInZ9IqcTS5Hh0PSB51GLtbVyr6k0jK
wmqLU7EvD9zJrCa5oazEI4UcjvdalBH7cBA1mOs0zRS9PSaFmDKtE6fJHt3O
+/e/u3l58fzZyenPP0Oz2LUoHWydZHWqfo0+dkXBt+nkeCDaR/VIM4RAPB/Q
uTJ5V5SrTKUL7O2W0gm5WBi1kE4Xi0a9K+2WIq9dpqtMeUWUsCQLbkFBiCxy
uRZGWXgTZMBfWVWmrAzBF6m2iTQpbQlFZuUKa/GpZAtVwKAgSFqrqMyVLtJy
RdNzRcTRNhe1hRpma3wHEedKut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