<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<rfc ipr="trust200902"
     category="std"
     updates='3032,3038,3209,3811,4182,4928,5331,5586,5921,5960,6391,6478,6790'
     docName="draft-ietf-mpls-special-purpose-labels-02">
  <front>
    <title abbrev='Special Purpose MPLS Labels'>
      Allocating and Retiring Special Purpose MPLS Labels
    </title>

    <author initials="K." surname="Kompella" fullname="Kireeti Kompella">
      <organization>Juniper Networks</organization>
      <address>
	<postal>
	  <street>1194 N. Mathilda Ave</street>
	  <city>Sunnyvale</city>
	  <region>CA</region>
	  <code>94089</code>
	  <country>US</country>
	</postal>
	<email>kireeti.kompella@gmail.com</email>
      </address>
    </author>

    <author initials="L." surname='Andersson' fullname='Loa Andersson'>
      <organization>Huawei</organization>
      <address>
	<email>loa@mail01.huawei.com</email>
      </address>
    </author>

    <author initials="A." surname='Farrel' fullname='Adrian Farrel'>
      <organization>Juniper Networks</organization>
      <address>
	<email>adrian@olddog.co.uk</email>
      </address>
    </author>

    <date year="2013"/>
    <area>Routing</area>
    <keyword>MPLS, reserved label</keyword>

    <abstract>
      <t>
	Some MPLS labels have been allocated for specific purposes.  A
	block of labels (0-15) has been set aside to this end, and are
	commonly called "reserved labels".  They will be called
	"special purpose labels" in this document.  As there are only
	16 of these labels, caution is needed in the allocation of new
	special purpose labels, yet at the same time allow forward
	progress when one is called for.  This memo defines some
	procedures to follow in the allocation and retirement of
	special purpose labels, as well as a method to extend the
	special purpose label space.  Finally, this memo renames the
	IANA registry for these labels to "Special Purpose MPLS Label
	Values", and creates a new one called the "Extended Special
	Purpose MPLS Label Values" registry.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction" anchor='intro'>
      <t>
	The specification of the Label Stack Encoding for
	Multi-Protocol Label Switching (MPLS) <xref target='RFC3032'/>
	defined four special purpose label values (0 to 3), and set
	aside values 4 through 15 for future use.  These labels have
	special significance in both the control and the data plane.
	Since then, three further values have been allocated (values
	7, 13, and 14 in <xref target='RFC6790'/>, <xref
	target='RFC5586'/> and <xref target='RFC3429'/>,
	respectively), leaving nine unassigned values from the
	original space of sixteen.
      </t>
      <t>
	While the allocation of three out of the remaining twelve
	special purpose label values in the space of about 12 years is
	not in itself a cause for concern, the scarcity of special
	purpose labels is.  Furthermore, many of the special purpose
	labels require special processing by forwarding hardware,
	changes to which are often expensive, and sometimes
	impossible.  Thus, documenting a newly allocated special
	purpose label value is important.
      </t>
      <t>
	This memo outlines some of the issues in allocating and
	retiring special purpose label values, and defines mechanisms
	to address these.  This memo also extends the space of special
	purpose labels.
      </t>

      <section anchor="conv" title="Conventions used">
	<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"/>.
	</t>
      </section>
    </section>

    <section title='Questions'>
      <t>
	In re-appraising MPLS special purpose labels, the following
	questions come to mind:
	<list style='numbers'>
	  <t>
	    What allocation policies should be applied by IANA for the
	    allocation of special purpose labels?  Should Early
	    Allocation <xref target='RFC4020'/> be allowed?  Should
	    there be labels for Experimental Use or Private Use <xref
	    target='RFC5226'/>?
	  </t>
	  <t>
	    What documentation is required for special purpose labels
	    allocated henceforth?
	  </t>
	  <t>
	    Should a special purpose label ever be retired?  What
	    criteria are relevant here?  Can a retired special purpose
	    label ever be re-allocated for a different purpose?  What
	    procedures and time frames are appropriate?
	  </t>
	  <t>
	    The special purpose label value of 3 (the "Implicit Null
	    Label", <xref target='RFC3032'/>) is only used in
	    signaling, never in the data plane.  Could it (and should
	    it) be used in the data plane?  If so, how and for what
	    purpose?
	  </t>
	  <t>
	    What is a feasible mechanism to extend the space of
	    special purpose labels, should this become necessary?
	  </t>
	  <t>
	    Should extended special purpose labels be used for load
	    balancing?
	  </t>
	</list>
      </t>
    </section>

    <section title='Answers'>
      <t>
	This section provides answers to the questions posed in the
	previous section.
	<list style='numbers'>
	  <t>
	    <list style='letters'>
	      <t>
		Allocation of special purpose MPLS labels is via
		"Standards Action".
	      </t>
	      <t>
		The IANA registry will be renamed "Special Purpose
		MPLS Labels".
	      </t>
	      <t>
		Early allocation may be allowed on a case-by-case
		basis.
	      </t>
	      <t>
		The current space of 16 special purpose labels is too
		small for setting aside value for experimental or
		private use.  However, the extended special purpose
		labels registry created by this document has enough
		space, and this document defines a range for
		experimental use.
	      </t>
	    </list>
	  </t>
	  <t>
	    A Standards Track RFC must accompany a request for
	    allocation of Standards Action special purpose labels, as
	    per <xref target='RFC5226'/>.
	  </t>
	  <t>
	    The retirement of a special purpose MPLS label value must
	    follow a strict and well-documented process. This is
	    necessary since we must avoid orphaning the use of this
	    label value in existing deployments.  This process is
	    detailed in <xref target='deprecate'/>.
	  </t>
	  <t>
	    For now, the use of the "implicit null label" (label 3) in
	    the data plane will not be allowed.  If this decision is
	    revisited later, an accompanying Standards Track RFC that
	    details the use of the label, a discussion of possible
	    sources of confusion between signaling and data plane, and
	    mitigation thereof shall be required.
	  </t>
	  <t>
	    A special purpose label (the "extension" label, label 15)
	    is to be set aside for the purpose of extending the space
	    of special purpose labels.  Further details are described
	    in <xref target='espml'/>.
	  </t>
	  <t>
	    <xref target='RFC6790'/> says that special purpose labels
	    MUST NOT be used for load balancing.  The same logic
	    applies to extended special purpose labels.  Thus, this
	    document specifies that extended special purpose labels
	    MUST NOT be used for load balancing.  It is noted that
	    existing implementations may violate this, as they do not
	    look for extension labels and thus for extended special
	    purpose labels.  The consequence is that if extended
	    special purpose labels are used in some packets of a flow,
	    these packets may be re-ordered.  However, it is important
	    to specify the correct behavior for future
	    implementations, hence the use of MUST NOT.
	  </t>
	</list>
      </t>
      <t>
	A further question to be settled in this regard is whether a
	"regular" special purpose label retains its meaning if it
	follows the extension label; see <xref target='espml'/>.
      </t>

      <section title='Extended Special Purpose MPLS Label Values'
	       anchor='espml'>
	<t>
	  An extension label MUST be followed by another label L (and
	  thus MUST have the bottom-of-stack bit clear).  L MUST be
	  interpreted as an "extended special purpose label" and
	  interpreted as defined in a new registry created by this
	  document (see <xref target='IANA'/>).  Whether or not L has
	  the bottom-of-stack bit set depends on whether other labels
	  follow L.  The extension label only assigns special meaning
	  to L.  A label after L (if any) is parsed as usual, and thus
	  may be a regular label or a special purpose label; if the
	  latter, it may be an extension label, and thus followed by
	  an extended special purpose label.
	</t>
	<t>
	  IANA is asked to set aside label value 15 as the extension
	  label.
	</t>
	<t>
	  Values 0-6 and 8-15 of the extended special purpose label
	  registry are set aside as reserved; these MUST NOT appear in
	  the data plane.  Label 7 (when received) retains its meaning
	  as ELI whether a regular or an extended special purpose
	  label; this is to simplify the logic for transit LSRs
	  looking for entropy labels.  However, an LSR wishing to
	  insert an entropy label SHOULD insert label 7 as a regular
	  special purpose label, not as an extended special purpose
	  label.
	</t>
      </section>

      <section title='Process for Retiring Special Purpose Labels'
	       anchor='deprecate'>
	<t>
	  While the following process is defined for the sake of
	  completeness, note that retiring special purpose labels is
	  difficult.  It is recommended that this process be used
	  sparingly.
	  <list style='letters'>
	    <t>
	      A label value that has been assigned from the "Special
	      Purpose MPLS Label Values" may be deprecated by IETF
	      consensus with review by the MPLS working group (or
	      designated experts if the working group or a successor
	      does not exist).  An RFC with at least Informational
	      status is required.
	      <vspace blankLines='1' />
	      The RFC will direct the IANA to mark the label value as
	      "deprecated" in the registry, but will not release it at
	      this stage.
	      <vspace blankLines='1' />
	      Deprecating means that no further specifications using
	      the deprecated value will be documented.
	      <vspace blankLines='1' />
	      At the same time this is an indication to vendors not to
	      include deprecated value in new implementations and to
	      operators to avoid including it in new deployments.
	    </t>
	    <t>
	      12 months after the RFC deprecating the label value is
	      published, an IETF-wide survey may be conducted to
	      determine if the deprecated label value is still in use.
	      If the survey indicates that the deprecated label value
	      is in use, the survey may be repeated after a further 6
	      months.
	    </t>
	    <t>
	      24 months after the RFC that deprecated the label value
	      was published and if the survey indicates that
	      deprecated label value is not in use, publication may be
	      requested of an IETF Standards Track Internet-Draft that
	      retires the deprecated the label value.  This document
	      will request IANA to release the label value for for
	      future use and assignment.
	    </t>
	  </list>
	</t>
      </section>
    </section>

    <section title='Updated RFCs'>
      <t>
	The following RFCs contain references to the term "reserved
	labels": <xref target='RFC3032'/> ("MPLS Label Stack
	Encoding"), <xref target='RFC3038'/> ("VCID Notification for
	LDP"), <xref target='RFC3209'/> ("Extensions to RSVP for LSP
	Tunnels"), <xref target='RFC3811'/> ("MPLS TC MIB"), <xref
	target='RFC4182'/> ("Removing a Restriction on the use of
	MPLS"), <xref target='RFC4928'/> ("Avoiding ECMP Treatment in
	MPLS Networks"), <xref target='RFC5331'/>, <xref
	target='RFC5586'/> ("G-ACh and GAL"), <xref target='RFC5921'/>
	("MPLS Transport Profile Framework"), <xref target='RFC5960'/>
	("MPLS-TP Data Plane Architecture"), <xref target='RFC6391'/>
	("FAT-PW"), <xref target='RFC6478'/> ("Pseudowire Status for
	Static Pseudowires") and <xref target='RFC6790'/> ("MPLS
	Entropy Labels").  All such references should be read as
	"special purpose labels".
      </t>
    </section>

    <section title='IANA Considerations'
	     anchor='IANA'>
      <t>
	This document requests IANA to make the following changes and
	additions to its registration of MPLS Labels.
	<list style='numbers'>
	  <t>
	    Change the name of the "Multiprotocol Label Switching
	    Architecture (MPLS) Label Values" registry to the "Special
	    Purpose MPLS Label Values".
	  </t>
	  <t>
	    Change the allocations policy for the "Special Purpose MPLS
	    Label Values" registry to Standards Action.
	  </t>
	  <t>
	    Note: any new allocation from the Special Purpose MPLS
	    Label Values registry MUST also say whether the same value
	    needs to be reserved in the Extended Special Purpose MPLS
	    Label Values registry.
	  </t>
	  <t>
	    Assign label 15 from the "Special Purpose MPLS Label Values"
	    registry, naming it the "extension label", and citing this
	    document as the reference.
	  </t>
	  <t>
	    Create a new registry called the "Extended Special Purpose
	    MPLS Label Values" registry.  The ranges and allocation
	    policies for this registry are as follows (using
	    terminology from <xref target='RFC5226'/>).  Early
	    allocation following the policy defined in <xref
	    target='RFC4020'/> is allowed only for those values
	    assigned by Standards Action.
	  </t>
	</list>
      </t>
      <texttable anchor='alloc-pol'>
        <ttcol align='left' width='30%'>Range</ttcol>
        <ttcol align='left'>Allocation Policy</ttcol>
        <c>0 - 6, 8 - 15</c>
	<c>
	  Reserved.  Not to be allocated.  MUST NOT appear
	  in the data plane.
	</c>
	<c>7</c>
	<c>Allocated; meaning is ELI <xref target='RFC6790'/></c>
        <c>16 - 239</c> <c>Standards Action</c>
	<c>240 - 255</c> <c>Experimental</c>
        <c>256 - 1048575</c> <c>Reserved</c>
      </texttable>
    </section>

  <section title='Security Considerations'>
    <t>
      This document does not make a large change to the operation of
      the MPLS data plane and security considerations are largely
      unchanged from those specified in the MPLS architecture <xref
      target='RFC3031'/> and in the MPLS and GMPLS Security Framework
      <xref target='RFC5920'/>.
    </t>
    <t>
      However, it should be noted that increasing the label stack can
      cause packet fragmentation and may also make packets
      unprocessable by some implementations.  This document provides a
      protocol-legal way to arbitrarily increase the label stack and
      so might provide a way to attack some nodes in a network without
      violating the protocol rules.
    </t>
  </section>
  </middle>

  <back>
    <references title='Normative References'>
      <?rfc include='reference.RFC.2119'?>
      <?rfc include='reference.RFC.3031'?>
      <?rfc include='reference.RFC.3032'?>
      <?rfc include='reference.RFC.3038'?>
      <?rfc include='reference.RFC.3209'?>
      <?rfc include='reference.RFC.3811'?>
      <?rfc include='reference.RFC.4020'?>
      <?rfc include='reference.RFC.4182'?>
      <?rfc include='reference.RFC.4928'?>
      <?rfc include='reference.RFC.5226'?>
      <?rfc include='reference.RFC.5331'?>
      <?rfc include='reference.RFC.5920'?>
      <?rfc include='reference.RFC.5921'?>
      <?rfc include='reference.RFC.5960'?>
      <?rfc include='reference.RFC.6391'?>
      <?rfc include='reference.RFC.6478'?>
      <?rfc include='reference.RFC.6790'?>
    </references>
    <references title='Informational References'>
      <?rfc include='reference.RFC.3429'?>
      <?rfc include='reference.RFC.5586'?>
    </references>
  </back>

</rfc>
