<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-li-6man-apn-ipv6-encap-01" ipr="trust200902">
  <front>
    <title abbrev="APN6 Encapsulation">Application-aware IPv6 Networking
    (APN6) Encapsulation</title>

    <author fullname="Zhenbin Li" initials="Z. " surname="Li">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>lizhenbin@huawei.com</email>
      </address>
    </author>

    <author fullname="Chongfeng Xie" initials="C." surname="Xie">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>xiechf@chinatelecom.cn</email>

        <uri/>
      </address>
    </author>
	
	<author fullname="Shuai Zhang" initials="S." surname="Zhang">
      <organization>China Unicom</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>zhangs366@chinaunicom.cn</email>

        <uri/>
      </address>
    </author>

    <author fullname="Nan Geng" initials="N. " surname="Geng">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country>China</country>
        </postal>

        <email>gengnan@huawei.com</email>
      </address>
    </author>


    <date day="10" month="Nov" year="2025"/>

    <abstract>
      <t>Application-aware IPv6 Networking (APN6) makes use of IPv6
      encapsulation to convey the APN Attribute along with data packets and
      make the network aware of data flow requirements at different
      granularity levels. The APN attribute can be encapsulated in the APN
      header. This document defines the APN header and its encapsulation in the IPv6 data plane.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Application-aware Networking (APN) conveys an
      attribute with data packets in the network and makes the network aware of fine-grained requirements at appropriate level.</t>

      <t>Such an attribute is acquired, constructed in a structured value, and
      then encapsulated in the packets. Such a structured value is treated as
      an opaque object in the network, to which the network operator applies
      policies in various nodes/service functions along the path and provides
      corresponding services.</t>

      <t>This structured attribute can be encapsulated in various data planes
      adopted within a Network Operator's controlled and limited domain, e.g.
      MPLS, VXLAN, SR/SRv6 and other tunnel technologies.</t>

      <t>This document defines the application-aware networking (APN) header and its encapsulation in the IPv6 data plane. </t>
    </section>

    <section title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119">RFC 2119</xref> <xref target="RFC8174">RFC
      8174</xref> when, and only when, they appear in all capitals, as shown
      here.</t>
    </section>

    <section title="Terminologies">
      <t>APN: Application-aware Networking</t>

      <t>APN6: Application-aware IPv6 Networking, i.e., the data plane of APN
      is IPv6</t>

      <t>APN Attribute: Application-aware information. It is added at the edge
      devices of an APN domain along with any tunnel encapsulation.</t>

      <t>APN ID: Application-aware Networking ID</t>

      <t>APN Para: Application-aware Networking Parameters</t>

      <t>SRH: Segment Routing Header <xref target="RFC8754">RFC
      8754</xref></t>
    </section>
	
		<section title="Problem statement and Requirements">
<t>In a network operator controlled domain, the ingress edge devices usually have access to rich information, such as VLAN/QinQ, VPN ID, and access interface, which is used to classify the packets into fine granular virtual groups of flows at the edge. </t>

<t>However, after the packets enter the network operators domain, all such information is not immediately visible at transit nodes. It may be hidden inside encapsulation, masked by encryption, mapped to other protocol fields, or stripped from the packets completely. </t>

<t>Furthermore, many mapping schemes, where they are used, lose some level of granularity from the information available at the network edge. For example, when the information is mapped into small fields like DSCP (6 bits) or MPLS EXP (3 bits) the result is that only relatively coarse grained QoS treatment can be provided. MPLS EXP bits are sometimes insufficient to carry what an operator needs, even the DSCP is really too small. </t>

<t>On the other hand, the identification of single application or user is not needed in the network either. Besides the commitment of privacy protection, the traffic running in the network is aggregated and the network does not have such capability nor the necessity of processing such extremely fine granularity. </t>

<t>Therefore, the capability of offering appropriate level of granularity is desired by operators in order to provide fine-grained services. </t>

    </section>
	
	<section title="Usage scenarios">
<t>The packet treatments needed may vary at different parts of the path within the domain, and enough information is needed to determine these treatments such as steering, triggering, and identifying in an efficient way, that is, to efficiently realize a composite network service provisioning along the path. For example, at the headend to steer into corresponding path at the midpoint to collect corresponding performance measurement data at the service function to execute particular policies flexibly.
</t>

<t>Furthermore, when the packet traversing through multiple technology domains of a single operator, where each domain is controlled independently without a hierarchical controller being deployed and each has its own SLA mechanism, in this case, it is difficult to achieve end-to-end consistency in service provisioning (e.g. visualization) due to lack of information to indicate the granularity of traffic flow across multiple domains. The ACL configuration at the following domains edge devices are very complex and dynamic.
</t>

<t>This information can be carried directly in the packet or achieved through a mapping from an opaque tag. Existing protocols such as SFC/NSH, SR/SRv6, MPLS, VXLAN, and IPv6, can be taken as implementation basis, but in each case the protocol may need extensions. This draft focuses on the extensions in the IPv6 data plane. 
</t>

    </section>
	
	   <section title="APN Header">
      <t>A common header, i.e. APN Header, is defined and can be used in different data planes.
      The common header carries the APN attribute that is composed of APN ID
      and APN parameters.</t>

      <t>This document defines three types of APN ID:</t>

      <t>- Type 1 APN ID: it is 32 bits.</t>

      <t>- Type 2 APN ID: it is 64 bits.</t>

      <t>- Type 3 APN ID: it is 128 bits.</t>

      <t>According to the types of APN ID, three types of APN headers are
      defined and follow the same format as follows.</t>

      <t/>

       <t><figure align="center">
          <artwork><![CDATA[ 0                   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 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  APN-ID-Type  |     Flags     |         APN-Para-Type         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             APN-ID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Intent (Optional)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                       APN-Para (Optional)                     |
                             ......                              
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Figure 1. APN Header Format
]]></artwork>
        </figure></t>

      <t>APN-ID-Type: An 8-bit identifier, indicates the type of APN ID.</t>

      <t>Flags: An 8-bit field. The possible flags will be defined in the future
      versions of this document.</t>

      <t>APN-Para-Type: A 16-bit map that specifies which APN parameters are
      specified for the APN ID. The APN-Para-Type value is a bitmap. The
      packing order of the APN parameters follows the bit order as specified
      in the APN-Para-Type bitmap field. The following bits are defined in
      this document, with details on each bit described in Section 8.</t>

      <t>Bit 0 (Most significant bit) When set, indicates the presence of the
      bandwidth requirement.</t>

      <t>Bit 1 When set, indicates the presence of the delay requirement.</t>

      <t>Bit 2 When set, indicates the presence of the jitter requirement.</t>

      <t>Bit 3 When set, indicates the presence of the packet loss rate
      requirement.</t>

      <t>APN-ID: A 32-bit identifier.</t>

      <t>Intent: A 32-bit identifier, represents a set of service requirements
      to the network.</t>

      <t>APN-Para: A variable field including APN parameters. The presence of
      the APN parameters is indicated by the APN-Para-Type.</t>


    </section>

    <section title="APN ID">
      <t>The APN ID is suggested to be divided into three parts:</t>

      <t>APP-Group-ID: Application Group ID</t>

      <t>USER-Group-ID: User Group ID</t>

      <t>Reserved: The reserved field.</t>

      <t><figure align="center">
          <artwork><![CDATA[+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      APP-Group-ID     |    USER-Group-ID    |    Reserved     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Figure 2. Structure of APN-ID]]></artwork>
        </figure></t>

      <t>The lengths of the APP-Group-ID and the USER-Group-ID are variable.
      Their lengths must be configured and consistent within a specific APN
      domain.</t>
	  
	  <t>The APN ID can be configured by using a template <xref target="I-D.peng-apn-yang"/>. </t>
    </section>

    <section title="APN Parameters">
      <t>In the APN Header, the APN-Para-Type is a bit field to indicate the
      presence of corresponding APN parameters. When the bit is set, the
      corresponding APN parameter MUST exist in the APN Header. The length of
      each APN parameter is 32 bits. Thus it is easy to skip over unknown
      requirements.</t>

      <t>Typical APN parameters are the parameters related with the network
      performance requirements as follows:</t>

      <t>1. Bandwidth Requirement</t>

      <t>This Bandwidth Requirement parameter indicates the minimum acceptable
      bandwidth for the APN traffic. The format of this parameter is shown in
      the following diagram:</t>

      <figure>
        <artwork><![CDATA[    0                   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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Bandwidth                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Figure 3. Bandwidth Requirement Parameter
]]></artwork>
      </figure>

      <t>where:</t>

      <t>Bandwidth: This 32-bit unsigned integer field carries the bandwidth
      requirement in Mbps along the path.</t>

      <t>2. Delay Requirement</t>

      <t>This Delay Requirement parameter indicates the maximum acceptable
      delay. The format of this parameter is shown in the following
      diagram:</t>

      <t><figure>
          <artwork><![CDATA[    0                   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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    RESERVED   |                   Delay                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                     
                   Figure 4. Delay Requirement Parameter
]]></artwork>
        </figure></t>

      <t>where:</t>

      <t>RESERVED: This field is reserved for future use. It MUST be set to 0
      when sent and MUST be ignored when received.</t>

      <t>Delay: This 24-bit field carries the delay requirements in
      microseconds, encoded as an unsigned integer value. When set to the
      maximum value 16,777,215 (16.777215 sec), then the delay is not
      constrained. This value is the highest delay that can be tolerated.</t>

      <t>3. Delay Variation Requirement</t>

      <t>This Delay Variation Requirement parameter indicates the maximum
      acceptable delay variation. The format of this parameter is shown in the
      following diagram:</t>

      <t><figure>
          <artwork><![CDATA[    0                   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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  RESERVED     |               Delay Variation                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  
                   Figure 5. Delay Variation Parameter
]]></artwork>
        </figure></t>

      <t>where:</t>

      <t>RESERVED: This field is reserved for future use. It MUST be set to 0
      when sent and MUST be ignored when received.</t>

      <t>Delay Variation: This 24-bit field carries the delay variation
      requirements in microseconds, encoded as an unsigned integer value.</t>

      <t>4. Packet Loss Rate Requirement</t>

      <t>This Packet Loss Rate Requirement parameter indicates the maximum
      acceptable packet loss rate. The format of this parameter is shown in
      the following diagram:</t>

      <figure>
        <artwork><![CDATA[    0                   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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    RESERVED   |                    Packet Loss Rate           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Figure 6. Packet Loss Rate Sub-TLV
]]></artwork>
      </figure>

      <t>where:</t>

      <t>RESERVED: This field is reserved for future use. It MUST be set to 0
      when sent and MUST be ignored when received.</t>

      <t>Packet Loss Rate: This 24-bit field carries packet loss rate
      requirement in packets per second as an unsigned integer. This value is
      the highest packet-loss rate that can be tolerated.</t>
    </section>
	
	

    <section title="The APN Option">
      <t>To support Application-aware IPv6 networking, one IPv6 Header option
      <xref target="RFC8200">RFC 8200</xref>, the APN option, is defined.</t>

      <t>The APN option has the following format:</t>

      <t><figure align="center">
          <artwork><![CDATA[ 0                   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
                                +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                |Opt Type = TBD1|  Opt Data Len | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.                       APN Header (Variable)                   .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Figure 7. The APN Option


]]></artwork>
        </figure></t>

      <t>where:</t>

      <t>o Opt Type: Type value is TBD1 (suggested value 0x13), an 8-bit
      unsigned integer. Identifier of the type of this APN Option.</t>

      <t>o Opt Data Len: An 8-bit unsigned integer. Length of the Option Data
      field of this option, that is, length of the APN header.</t>

      <t>o APN Header: Option-Type-specific data. It carries the APN header.
      Variable-length field as specified in Section 6.</t>
    </section>

    <section title="Locations for the APN Option">
      <t>The APN IPv6 Header option can be placed in two locations in an IPv6
      packet header <xref target="RFC8200">RFC 8200</xref> depend upon the
      scenario and implementation requirements. These are defined in the
      subsections below.</t>

      <section title="IPv6 Hop-by-Hop Options Header (HBH)">
        <t>The APN option can be carried in the IPv6 Hop-by-Hop Options
        Header. By using the HBH Options Header, the information carried can
        be read by every node along the path.</t>
      </section>

      <section title="IPv6 Destination Options Header (DOH)">
        <t>The APN option can be carried in the IPv6 Destination Options
        Header. By using the DOH Options Header, the information carried can
        be read by the destination node but would not normally be seen by
        other nodes along the path.</t>
      </section>
    </section>

    <section title="APN TLV for the SRH">
      <t><xref target="RFC8754"/> defines the segment routing header (SRH) and
      the SRH TLV. The SRH TLV provides meta-data for segment processing. The
      APN header can be placed in the SRH as the value of one type of SRH TLV
      following the Segment List. By using the SRH, the information carried
      can be read by the specified segment destinations along the SRv6
      path.</t>

      <t>The APN TLV is OPTIONAL and has the following format:</t>

      <figure align="center">
        <artwork><![CDATA[ 0                   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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Type = TBD2  |     Length    |D|        RESERVED             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.                       APN Header (Variable)                   .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Figure 8. The APN SRH TLV
]]></artwork>
      </figure>

      <t>where:</t>

      <t>o Type: TBD2 (suggested value 0x13).</t>

      <t>o Length: The length of the variable length data in bytes.</t>

      <t>o D: 1 bit. When it is set, it indicates the Destination Address
      verification is disabled due to use of a reduced segment list.</t>

      <t>o RESERVED: 15 bits. MUST be 0 on transmission and ignored on
      receipt.</t>

      <t>o APN Header: It carries the APN header as specified in Section 6. A variable-length field.</t>
    </section>

    <section title="Implementation Status">
      <t>Huawei: </t>

      <t>Huawei hardware platforms supports APN with current status as
      follows: </t>

      <t>o Huawei ATN with VRPV8 shipping code. </t>

      <t>o Huawei CX600 with VRPV8 shipping code. </t>

      <t>o Huawei NE40E with VRPV8 shipping code. </t>

      <t>o Huawei ME60 with VRPV8 shipping code. </t>

      <t>o Huawei NE5000E with VRPV8 shipping code. </t>

      <t>o Huawei NE9000 with VRPV8 shipping code. </t>

      <t>o Huawei NE8000 with VRPV8 shipping code. </t>

      <t/>

      <t>Tshinghua University:</t>

      <t>o Linux</t>

      <t/>

      <t>BUPT (Beijing University of Posts and Telecommunications):</t>

      <t>o P4</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
	
	
	     <t>These IANA Considerations conform to [RFC8126].</t>

      <t>IANA is requested to create the following new registries on a new
      "Application-Aware Networking (APN)" webpage.</t>

      <section title="APN ID Types">
        <t>IANA is requested to create the following registry on the
        Application-Aware Networking (APN) Attribute webpage:</t>

        <t>Name: APN ID Types</t>

        <t>Registration Procedure: IETF Review</t>

        <t>Reference: [this document]</t>

        <figure>
          <artwork><![CDATA[  
		
   Value    Description     Reference
   -----   -------------   ---------------
       0    reserved
       1    Type 1 APN ID   [this document]
       2    Type 2 APN ID   [this document]
       3    Type 3 APN ID   [this document]
   4-254    unassigned
     255    reserved

]]></artwork>
        </figure>
      </section>

      <section title="APN Parameter Types">
        <t>IANA is requested to create the following registry on the
        Application-Aware Networking (APN) Attribute webpage:</t>

        <t>Name: APN Parameter Types</t>

        <t>Registration Procedure: IETF Review</t>

        <t>Reference: [this document]</t>

        <figure>
          <artwork><![CDATA[      

   Bit    Description               Reference
   ---   -----------------------   ---------------
     0   Bandwidth requirement     [this document]
     1   Delay requirement         [this document]
     2   Jitter requirement        [this document]
     3   Packet loss requirement   [this document]
  4-15   unassigned

]]></artwork>
        </figure>
      </section>
	
      <section title="IPv6 Header Option">
        <t>IANA is requested to assign an IPv6 Header Option as follows:</t>

        <figure align="center">
          <artwork><![CDATA[ 

    Hex     Binary Value
   Value    act chg  rest          Description              Reference
   -----    --- --- -----  ----------------------------  ---------------
    0x13     00   0 10011  Application-aware Networking  [this document]

]]></artwork>
        </figure>
      </section>

      <section title="SRH TLV Type">
        <t>IANA is requested to assign an SRH TLV Type from the range of type
        values for TLVs that do not change en route (2-127) as follows:</t>

        <figure align="center">
          <artwork><![CDATA[ 
 
   Value          Description                 Reference
   -----   ----------------------------   -----------------
    0x13   Application-aware Networking    [this document]

 
]]></artwork>
        </figure>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>In the APN work, in order to reduce the privacy and security issues, the APN attribute MUST be conveyed along with the tunnel information in the APN domain. The APN attribute is encapsulated and removed at the edge of the APN domain. The APN ID MUST be acquired from the existing available information in the packet header without interference into the payload.</t>

<t>According to the above specifications, the APN attribute is only produced and used locally within the APN domain without the involvement of the host/application side.</t>

<t>In order to prevent the malicious attack through the APN attribute, the following policies can be configured at the network devices of the APN domain. If the APN attribute is conveyed without the tunnel information, the packet MUST be dropped. If the APN attributes are not known to the APN domain, it should trigger the alarm information. The packet can be forwarded without being processed or dropped depending on the local policy. If the network service requirements exceed the specification for the specific APN ID, it should trigger the alarm information. The packet should be discarded to prevent abusing of the resources. There should be rate-limiting policy at the edge of the APN domain to prevent the traffic belonging to a specific APN ID from exceeding the preset limit.

</t>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.8754'?>

      <?rfc include='reference.RFC.8200'?>

    </references>
	
	    <references title="Informative References">
  
	  <?rfc include='reference.I-D.peng-apn-yang'?>

    </references>

  </back>
</rfc>
