<?xml version="1.0" encoding="US-ASCII"?>
<!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' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-xu-mpls-payload-protocol-identifier-01"
     ipr="trust200902">
  <front>
    <title abbrev="MPLS Payload Protocol Identifier">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 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).</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="Terminology" title="Terminology">
      <t>This memo makes use of the terms defined in <xref
      target="RFC3032"/>.</t>
    </section>

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

      <t><figure align="center">
          <preamble/>

          <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                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></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"/>. 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). </t>
        </list> </t>
    </section>

    <section anchor="Encapsulation" 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: <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="4.4. Penultimate Hop LSRs">
        <t>No change is needed at penultimate hop LSRs.</t>
      </section>
    </section>

    <section anchor="Attribute"
             title="5. Signaling for PIL Processing Capability">
      <section anchor="TunnelParameters" title="LDP">
        <t>TBD</t>
      </section>

      <section anchor="EncapsulatedProtocol" title="RSVP-TE">
        <t>TBD</t>
      </section>

      <section anchor="EndPoint" title="BGP">
        <t>TBD</t>
      </section>

      <section title="ISIS">
        <t>TBD</t>
      </section>

      <section title="OSPF">
        <t>TBD</t>
      </section>
    </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>

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

  <back>
    <references title="Normative References">
      &RFC2119;

      <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>

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

      <?rfc include="reference.RFC.3032"?>
    </references>

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

      <?rfc include="reference.RFC.6790"?>
    </references>
  </back>
</rfc>
