<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
    There has to be one entity for each item to be referenced. 
    An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-xu-mpls-payload-protocol-identifier-02"
     ipr="trust200902">
  <front>
    <title abbrev="MPLS Payload Protocol ID">MPLS Payload Protocol
    Identifier</title>

    <author fullname="Xiaohu Xu" initials="X.X." surname="Xu">
      <organization>Huawei</organization>

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

    <!--

-->

    <date day="" month="" year="2016"/>

    <abstract>
      <t>The MPLS label stack has no explicit protocol identifier field to
      indicate the protocol type of the MPLS payload. This document proposes a
      mechanism for containing a protocol identifier field within the MPLS
      packet, which is useful for any new encapsulation header which may need
      to be encapsulated with an MPLS header.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The MPLS label stack has no explicit protocol identifier field to
      indicate the protocol type of the MPLS payload. This document proposes a
      mechanism for containing a protocol identifier field within the MPLS
      packet, which is useful for any new encapsulation header which may need
      to be encapsulated with an MPLS header. With this explicit protocol
      identifier field, there is no need any more for each new encapsulation
      header to deal with the notorious first nibble issue associated with
      MPLS individually. More specifically, there is no need to intentionally
      avoid the first nibble of each new encapsulation header from being 0100
      (IPv4) or 0110 (IPv6). Furthermore, there is no need to insert one
      additional label indicating the MPLS payloads when transporting any new
      encapsulation header over MPLS LSPs (e.g., transporting Network Service
      Header (NSH) <xref target="I-D.ietf-sfc-nsh"/> over MPLS LSPs ).</t>

      <section title="Requirements Language">
        <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">RFC 2119</xref>.</t>
      </section>
    </section>

    <section anchor="Abbreviations_Terminology" title="Terminology">
      <t>This memo makes use of the terms defined in <xref
      target="RFC3032"/>.</t>
    </section>

    <section title="Protocol Type Field">
      <t>The encapsulation format for Protocol Type field is depicted as
      below:</t>

      <t><figure>
          <artwork align="center"><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                 PIL                   | EXP |1|      TTL      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0|       Reserved          |        Protocol Type        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                              Payload                          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                              Figure 1
]]></artwork>
        </figure></t>

      <t><list style="empty">
          <t>Protocol Identifier Label (PIL): This field contains a special
          purpose label with value of &lt;TBD&gt; or an extended special
          purpose label <xref target="RFC7274"/> with value of &lt;TBD&gt;
          which indicates that a Protocol Type field appears immediately after
          the bottom of the label stack.</t>

          <t>EXP: The usage of this field is in accordance with the current
          MPLS specification <xref target="RFC3032"/>.</t>

          <t>S: The Bottom of Stack (BoS) field is set since the PIL MUST
          always appear at the bottom of the label stack.</t>

          <t>TTL: The usage of this field is in accordance with the current
          MPLS specification <xref target="RFC3032"/>.</t>

          <t>Reserved MUST be set to 0 and ignored on reception.</t>

          <t>Protocol Type: This field indicates the protocol type of the MPLS
          payload as per <xref target="ETYPES"/>.</t>

          <t>Payload: This field contains the MPLS payload which can be an IP
          packet, an Ethernet frame, or any other type of payload, e.g.,
          Network Service Header (NSH) <xref target="I-D.ietf-sfc-nsh"/>.</t>
        </list></t>
    </section>

    <section title="Data Plane Processing of PIL">
      <t/>

      <section title="Egress LSRs">
        <t>Suppose egress LSR Y is capable of processing the Protocol Type
        field contained in MPLS packets. LSR Y indicates this to all ingress
        LSRs via signaling (see Section 5). LSR Y MUST be prepared to deal
        with both packets with an imposed Protocol Type field and those
        without; the PIL will distinguish these cases. If a particular ingress
        LSR chooses not to impose a Protocol Type field, LSR Y's processing of
        the received label stack (which might be empty) is as if LSR Y chose
        not to accept Protocol Type field. If an ingress LSR X chooses to
        impose the Protocol Type field, then LSR Y will receive an MPLS packet
        constructed as follows: &lt;Top Label (TL), Application Label (AL),
        PIL&gt; &lt;Protocol Type field&gt; &lt;remaining MPLS payload&gt;.
        Note that here the TL could be replaced with an IP-based tunnel <xref
        target="RFC4023"/> and the AL is optional. LSR Y recognizes TL as the
        label it distributed to its upstream LSR and pops the TL (note that
        the TL may be an implicit null label, in which case it doesn't appear
        in the label stack and LSR Y MUST process the packet starting with the
        AL label (if present) and/or the PIL.) LSR Y recognizes the PIL with S
        bit set. LSR Y then processes the Protocol Type field, which will
        determine how LSR Y processes the MPLS payload.</t>
      </section>

      <section title="Ingress LSRs">
        <t>If an egress LSR Y indicates via signaling that it can process the
        Protocol Type field, an ingress LSR X can choose whether or not to
        insert it into the MPLS packet destined for LSR Y. The ingress LSR X
        MUST NOT insert the Protocol Type field into that MPLS packet unless
        the egress LSR X has explicitly announced that it could process it.
        The steps that ingress LSR X performs to insert the Protocol Type
        field are as follows:</t>

        <t><list style="numbers">
            <t>On an incoming packet, identify the application to which the
            packet belongs and determine whether the Protocol Type field needs
            to be added to the incoming packet.</t>

            <t>For packets requiring the insertion of the Protocol Type field,
            prepend the Protocol Type field to the existing MPLS payload;
            then, push the PIL on to the label stack with the S bit set.</t>

            <t>Push the application label (AL) label (if required) on to the
            label stack.</t>

            <t>Push the EL and the ELI labels <xref target="RFC6790"/> on to
            the label stack (if required).</t>

            <t>Determine the top label (TL) and push it on to the label
            stack.</t>

            <t>Determine the output interface and send the packet out.</t>
          </list></t>
      </section>

      <section title="Transit LSRs">
        <t>Transit LSRs MAY operate with no change in forwarding behavior. If
        a transit LSR recognizes the PIL and the subsequent Protocol Type
        field, it MAY be allowed to do some additional value-added processing,
        such as MPLS payload inspection, on the received MPLS packet
        containing the PIL and the Protocol Type field.</t>
      </section>

      <section title="Penultimate Hop LSRs">
        <t>No change is needed at penultimate hop LSRs.</t>
      </section>
    </section>

    <section title="Signaling for PIL Processing Capability">
      <t>TBD.</t>
    </section>

    <section title="Alternative Approaches">
      <t>As illustrated in Section 3 and Section 4, the existence of the
      Protocol Type field immediately after the MPLS label stack is indicated
      by inserting the PIL into an MPLS packet. Alternatively, by setting the
      first nibble of the 4-octet entry containing the Protocol Type field to
      a dedicated value (e.g., 1111), the existence of the Protocol Type field
      could be indicated as well (see Figure 2). In this way, there is no need
      to insert additional label(s) (i.e., the PIL) into an MPLS packet.</t>

      <t><figure>
          <artwork align="center"><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |             Bottom Label              | EXP |1|      TTL      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |1 1 1 1|       Reserved          |        Protocol Type        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                              Payload                          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                              Figure 2
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>TBD.</t>

      <!---->
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>A special purpose label with value of &lt;TBD&gt; or an extended
      special purpose label with value of &lt;TBD&gt; for the PIL needs to be
      assigned by the IANA</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>TBD.</t>

      <!---->
    </section>
  </middle>

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

      <reference anchor="ETYPES">
        <front>
          <title>IEEE 802 Numbers</title>

          <author>
            <organization>The IEEE Registration Authority</organization>
          </author>

          <date year="2012"/>

          <note title="">
            <t>&lt;http://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xml&gt;.</t>
          </note>
        </front>
      </reference>

      <!---->
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.3032"?>

      <?rfc include="reference.RFC.6790"?>

      <?rfc include="reference.RFC.4023"?>

      <?rfc include="reference.RFC.7274"?>

      <?rfc include="reference.I-D.ietf-sfc-nsh"?>

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