<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC8402 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8402.xml">
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3031 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3031.xml">
<!ENTITY RFC3032 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml">
<!ENTITY RFC3443 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3443.xml">
<!ENTITY RFC5462 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5462.xml">
<!ENTITY RFC7274 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7274.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC7855 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7855.xml">
<!ENTITY RFC5036 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5036.xml">
<!ENTITY RFC5331 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5331.xml">
<!ENTITY RFC7510 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7510.xml">
<!ENTITY RFC4817 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4817.xml">
<!ENTITY RFC8287 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8287.xml">
<!ENTITY RFC8403 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8403.xml">
]>

	<?rfc compact="yes"?>
	<?rfc text-list-symbols="o-*+-"?>
	<?rfc subcompact="no"?>
	<?rfc sortrefs="no"?>
	<?rfc symrefs="yes"?>
	<?rfc toc="yes"?>

<rfc submissionType="IETF" consensus="yes" number="8660" category="std" ipr="trust200902">

<!-- Generated by id2xml 1.4.4 on 2019-06-12T17:23:43Z -->
	<front>
	<title>Segment Routing with the MPLS Data Plane</title>
	<author fullname="Ahmed Bashandy" initials="A." role="editor" surname="Bashandy">
	<organization>Arrcus</organization>
	<address><email>abashandy.ietf@gmail.com</email>
	</address>
	</author>

	<author fullname="Clarence Filsfils" initials="C." role="editor" surname="Filsfils">
	<organization>Cisco Systems, Inc.</organization>
	<address><postal><street>Brussels</street>
	<street>Belgium</street>
	</postal>
	<email>cfilsfil@cisco.com</email>
	</address>
	</author>

	<author fullname="Stefano Previdi" initials="S." surname="Previdi">
	<organization>Cisco Systems, Inc.</organization>
	<address><postal><street>Italy</street>
	</postal>
	<email>stefano@previdi.net</email>
	</address>
	</author>

	<author fullname="Bruno Decraene" initials="B." surname="Decraene">
	<organization>Orange</organization>
	<address><postal><street>France</street>
	</postal>
	<email>bruno.decraene@orange.com</email>
	</address>
	</author>

	<author fullname="Stephane Litkowski" initials="S." surname="Litkowski">
	<organization>Orange</organization>
	<address><postal><street>France</street>
	</postal>
	<email>stephane.litkowski@orange.com</email>
	</address>
	</author>

	<author fullname="Rob Shakir" initials="R." surname="Shakir">
	<organization>Google</organization>
	<address><postal><street>United States of America</street>
	</postal>
	<email>robjs@google.com</email>
	</address>
	</author>

	<date  month="September" year="2019"/>

<!-- [rfced] Please insert any keywords (beyond those that appear in
the title) for use on https://www.rfc-editor.org/search. -->

<keyword>example</keyword>

	<abstract><t>
   Segment Routing (SR) leverages the source routing paradigm.  A node
   steers a packet through a controlled set of instructions, called
   segments, by prepending the packet with an SR header.  In the MPLS
   data plane, the SR header is instantiated through a label stack. This
   document specifies the forwarding behavior to allow instantiating SR
   over the MPLS data plane.</t>

	</abstract>
	</front>

	<middle>
	<section title="Introduction" anchor="section-1"><t>
   The Segment Routing architecture (RFC 8402) can be directly applied to
   the MPLS architecture with no change in the MPLS forwarding plane.
   This document specifies forwarding-plane behavior to allow
   Segment Routing to operate on top of the MPLS data plane. This
   document does not address control-plane behavior. Control-plane
   behavior is specified in other documents such as <xref target="RFC8665"/>, <xref target="RFC8666"/>, and <xref target="RFC8667"/>.</t>

	<t>
   The Segment Routing problem statement is described in <xref target="RFC7855"/>.</t>

	<t>
   Coexistence of SR over the MPLS forwarding plane with LDP <xref target="RFC5036"/> is
   specified in <xref target="RFC8661"/>.</t>

	<t>
   Policy routing and traffic engineering using Segment Routing can be
   found in <xref target="ROUTING-POLICY"/>.</t>

	<section title="Requirements Language" anchor="section-1.1"><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&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.</t>

	</section>

	</section>

	<section title="MPLS Instantiation of Segment Routing" anchor="section-2"><t>
   MPLS instantiation of Segment Routing fits in the MPLS architecture
   as defined in <xref target="RFC3031"/> from both a control-plane and forwarding-plane
   perspective:</t>

	<t><list style="symbols"><t>From a control-plane perspective, <xref target="RFC3031"/> does not mandate a
      single signaling protocol.  Segment Routing makes use of various
      control-plane protocols such as link-state IGPs <xref target="RFC8665"/> <xref target="RFC8666"/> <xref target="RFC8667"/>.
      The flooding mechanisms of link-state IGPs fit very well with
      label stacking on the ingress. A future control-layer protocol and/or
      policy/configuration can be used to specify the label stack.</t>

	<t>From a forwarding-plane perspective, Segment Routing does not
      require any change to the forwarding plane because Segment IDs
      (SIDs) are instantiated as MPLS labels, and the Segment Routing
      header is instantiated as a stack of MPLS labels.</t>

	</list>
	</t>

	<t>
   We call the "MPLS Control Plane Client (MCC)" any control-plane entity
   installing forwarding entries in the MPLS data plane. Local
   configuration and policies applied on a router are examples of MCCs.</t>

	<t>
<!--[rfced] Please clarify 'including for TI-LFA' in the following
sentence. Is the node restricted from being used by TI-LFA?

Original:
   Otherwise, the node is not reachable within
   the routing instance, topology or along the 
   routing algorithm, which restrict its ability 
   to be used by a SR policy, including for TI-LFA.

Perhaps:
   Otherwise, the node is not reachable within
   the routing instance, within the topology, 
   or along the routing algorithm, which restricts 
   its ability to be used by an SR Policy and by a 
   Topology Independent Loop-Free Alternate (TI-LFA).
-->
   In order to have a node segment reach the node, a network operator
   SHOULD configure at least one node segment per routing instance,
   topology, or algorithm. Otherwise, the node is not reachable within
   the routing instance, the topology, or along the routing algorithm, which
   restricts its ability to be used by an SR Policy, including for Topology Independent Loop-Free Alternate (TI-LFA).</t>

	<section title="Multiple Forwarding Behaviors for the Same Prefix" anchor="section-2.1"><t>
   The SR architecture does not prohibit having more than one SID for
   the same prefix. In fact, by allowing multiple SIDs for the same
   prefix, it is possible to have different forwarding behaviors (such
   as different paths, different ECMP and Unequal-Cost Multipath (UCMP) behaviors, etc.) for the
   same destination.</t>

	<t>
   Instantiating Segment Routing over the MPLS forwarding plane fits
   seamlessly with this principle. An operator may assign multiple MPLS
   labels or indices to the same prefix and assign different forwarding
   behaviors to each label/SID. The MCC in the network downloads
   different MPLS labels/SIDs to the FIB for different forwarding
   behaviors. The MCC at the entry of an SR domain or at any point in
   the domain can choose to apply a particular forwarding behavior to a
   particular packet by applying the PUSH action to that packet using
   the corresponding SID.</t>

	</section>

	<section title="SID Representation in the MPLS Forwarding Plane" anchor="section-2.2"><t>
   When instantiating SR over the MPLS forwarding plane, a SID is
   represented by an MPLS label or an index <xref target="RFC8402"/>.</t>

<!--[rfced] Please clarify "in its FIB/receiving" in the sentence below.
Does the node or the FIB receive the labeled packet?

Original:
   A global segment is a label, or an index which may be mapped to an
   MPLS label within the Segment Routing Global Block (SRGB) of the node
   installing the global segment in its FIB/receiving the labeled
   packet.

Perhaps:
   A global segment is a label or an index that may be mapped to an
   MPLS label within the Segment Routing Global Block (SRGB) of the node,
   which installs the global segment in its FIB and receives the labeled
   packet.
-->
	<t>
   A global segment is a label or an index that may be mapped to an
   MPLS label within the Segment Routing Global Block (SRGB) of the node
   installing the global segment in its FIB/receiving the labeled
   packet. <xref target="section-2.4"/> specifies the procedure to map a global segment
   represented by an index to an MPLS label within the SRGB.</t>

	<t>
   The MCC MUST ensure that any label value corresponding to any SID it
   installs in the forwarding plane follows the rules below:</t>

	<t><list style="symbols"><t>The label value MUST be unique within the router on which the MCC
      is running, i.e., the label MUST only be used to represent the SID
      and MUST NOT be used to represent more than one SID or for any
      other forwarding purpose on the router.</t>

	<t>The label value MUST NOT come from the range of special-purpose
      labels <xref target="RFC7274"/>.</t>

	</list>
	</t>

	<t>
   Labels allocated in this document are considered per-platform downstream
   allocated labels <xref target="RFC3031"/>.</t>

	</section>

	<section title="Segment Routing Global Block and Local Block" anchor="section-2.3"><t>
   The concepts of SRGB and global SID
   are explained in <xref target="RFC8402"/>. In general, the SRGB need not be a
   contiguous range of labels.</t>

	<figure><artwork><![CDATA[
For the rest of this document, the SRGB is specified by the list of
MPLS label ranges [Ll(1),Lh(1)], [Ll(2),Lh(2)],..., [Ll(k),Lh(k)]
where  Ll(i) =< Lh(i).
]]></artwork>
	</figure>
	<t>
   The following rules apply to the list of MPLS ranges representing the
   SRGB:</t>

	<t><list style="symbols"><t>The list of ranges comprising the SRGB MUST NOT overlap.</t>

	<t>Every range in the list of ranges specifying the SRGB MUST NOT
      cover or overlap with a reserved label value or range <xref target="RFC7274"/>,
      respectively.</t>

	<t>If the SRGB of a node does not conform to the structure specified
      in this section or to the previous two rules, the SRGB MUST
      be completely ignored by all routers in the routing domain, and the
      node MUST be treated as if it does not have an SRGB.</t>

	<t>The list of label ranges MUST only be used to instantiate global
      SIDs into the MPLS forwarding plane.</t>

	</list>
	</t>

	<t>
   A local segment MAY be allocated from the Segment Routing Local Block
   (SRLB) <xref target="RFC8402"/> or from any unused label as long as it does not use
   a special-purpose label. The SRLB consists of the range of local
   labels reserved by the node for certain local segments.  In a
   controller-driven network, some controllers or applications MAY use
   the control plane to discover the available set of local SIDs on a
   particular router <xref target="ROUTING-POLICY"/>. The rules
   applicable to the SRGB are also applicable to the SRLB, except the
   SRGB MUST only be used to instantiate global
   SIDs into the MPLS forwarding plane. The recommended, minimum, or
   maximum size of the SRGB and/or SRLB is a matter of future study.</t>

	</section>

	<section title="Mapping a SID Index to an MPLS Label" anchor="section-2.4"><t>
   This subsection specifies how the MPLS label value is calculated
   given the index of a SID. The value of the index is determined by an
   MCC such as IS-IS <xref target="RFC8667"/> or OSPF
   <xref target="RFC8665"/>. This section only
   specifies how to map the index to an MPLS label. The calculated MPLS
   label is downloaded to the FIB, sent out with a forwarded packet, or
   both.</t>

	<t>
   Consider a SID represented by the index "I". Consider an SRGB as
   specified in <xref target="section-2.3"/>. The total size of the SRGB, represented by
   the variable "Size", is calculated according to the formula:</t>

	<figure><artwork><![CDATA[
size = Lh(1)- Ll(1) + 1 + Lh(2)- Ll(2) + 1 + ... + Lh(k)- Ll(k) + 1
]]></artwork>
	</figure>
	<t>
   The following rules MUST be applied by the MCC when calculating the
   MPLS label value corresponding to the SID index value "I".</t>

   <t>
     <list style="symbols">

     <t>0 =&lt; I &lt; size. If index "I" does not satisfy the previous inequality, then the label cannot be calculated.</t>

	<t>The label value corresponding to the SID index "I" is calculated
	as follows:

<!-- [rfced] The text below may be easier to read without the bullets.  
May we reformat it as follows?

Original:
   o  The label value corresponding to the SID index "I" is calculated
      as follows

       o j = 1 , temp = 0

       o While temp + Lh(j)- Ll(j) < I

            . temp = temp + Lh(j)- Ll(j) + 1

            . j = j+1

       o label = I - temp + Ll(j)

Perhaps:
  o  The label value corresponding to the SID index "I" is calculated
     as follows:

        j = 1 , temp = 0

        While temp + Lh(j)- Ll(j) < I

               temp = temp + Lh(j)- Ll(j) + 1

               j = j+1

        label = I - temp + Ll(j)
-->

	<list style="symbols">
	  <t>j = 1 , temp = 0</t>

	  <t>While temp + Lh(j)- Ll(j) &lt; I

          <list style="symbols">
	  
	
	    <t>temp = temp + Lh(j)- Ll(j) + 1</t>
	    <t>j = j+1</t>
	  </list></t>
	  
	<t>label = I - temp + Ll(j)</t>

	</list>
	</t>

	</list>
	</t>

	<t>
   An example for how a router calculates labels and forwards traffic
   based on the procedure described in this section can be found in
   <xref target="section-a.1"/>.</t>

	</section>

	<section title="Incoming Label Collision" anchor="section-2.5"><t>
   The MPLS Architecture <xref target="RFC3031"/> defines the term Forwarding
   Equivalence Class (FEC) as the set of packets with similar and/or
   identical characteristics that are forwarded the same way and are
   bound to the same MPLS incoming (local) label. In Segment Routing
   MPLS, a local label serves as the SID for a given FEC.</t>

	<t>
   We define SR FEC <xref target="RFC8402"/> as one of the following:</t>

<!--[rfced] We assume that the terms in parentheses are the SR FEC
code points. Thus, may we move the citation out of the
parentheses? Please let us know if this is agreeable or if you
prefer otherwise.

Original:
o  (Prefix, Routing Instance, Topology, Algorithm [RFC8402]), where a
   topology identifies a set of links with metrics.

Perhaps:
o  (Prefix, Routing Instance, Topology, Algorithm) [RFC8402], where a
   topology identifies a set of links with metrics.

-->

	<t><list style="symbols"><t>(Prefix, Routing Instance, Topology, Algorithm <xref target="RFC8402"/>), where a
      topology identifies a set of links with metrics. For the purpose
      of incoming label collision resolution, the same Topology
      numerical value SHOULD be used on all routers to identify the same
      set of links with metrics. For MCCs where the "Topology" and/or
      "Algorithm" fields are not defined, the numerical value of zero
      MUST be used for these two fields. For the purpose of incoming
      label collision resolution, a routing instance is identified by a
      single incoming label downloader to the FIB. Two MCCs running on the
      same router are considered different routing instances if the only
      way the two instances know about each other's incoming labels
      is through redistribution. The numerical value used to identify a
      routing instance MAY be derived from other configuration or MAY be
      explicitly configured. If it is derived from other configuration,
      then the same numerical value SHOULD be derived from the same
      configuration as long as the configuration survives router reload.
      If the derived numerical value varies for the same configuration,
      then an implementation SHOULD make the numerical value used to
      identify a routing instance configurable.</t>

	<t>(next-hop, outgoing interface), where the outgoing interface is
      physical or virtual.</t>

	<t>(number of adjacencies, list of next-hops, list of outgoing
      interfaces IDs in ascending numerical order). This FEC represents
      parallel adjacencies <xref target="RFC8402"/>.</t>

	<t>(Endpoint, Color). This FEC represents an SR Policy <xref target="RFC8402"/>.</t>


<!--[rfced] We note that RFC 8402 uses the term 'Mirror SID' and not
'Mirrored SID'. Please let us know how the following text may be
updated for consistency.

Original:
   o  (Mirrored SID) The Mirrored SID [RFC8402, Section 5.1] is the IP
      address advertised by the advertising node to identify the mirror-
      SID. The IP address is encoded as specified in Section 2.5.1.

Perhaps:
   o  (Mirror SID). The Mirror SID (see [RFC8402], Section 5.1) is the IP
      address advertised by the advertising node that identifies the mirror-
      SID. The IP address is encoded as specified in Section 2.5.1.
-->
	<t>(Mirrored SID). The Mirrored SID (see <xref target="RFC8402"/>, Section 5.1) is the IP
      address advertised by the advertising node to identify the mirror-SID.
      The IP address is encoded as specified in <xref target="section-2.5.1"/>.</t>

	</list>
	</t>

	<t>
   This section covers the RECOMMENDED procedure for handling the scenario
   where, because of an error/misconfiguration, more than one SR FEC as
   defined in this section maps to the same incoming MPLS label.
   Examples illustrating the behavior specified in this section can be
   found in <xref target="section-a.2"/>.</t>

	<t>
   An incoming label collision occurs if the SIDs of the set of FECs
   {FEC1, FEC2,..., FECk} map to the same incoming SR MPLS label "L1".</t>

	<t>
   Suppose an anycast prefix is advertised with a prefix-SID by some,
   but not all, of the nodes that advertise that prefix. If the prefix-
   SID sub-TLVs result in mapping that anycast prefix to the same
   incoming label, then the advertisement of the prefix-SID by some, but
   not all, of the advertising nodes MUST NOT be treated as a label
   collision.</t>

	<t>
   An implementation MUST NOT allow the MCCs belonging to the same
   router to assign the same incoming label to more than one SR FEC.</t>

	<t>
   The objective of the following steps is to deterministically install
   in the MPLS Incoming Label Map, also known as label FIB, a single FEC
   with the incoming label "L1". By "deterministically install", we mean
   if the set of FECs {FEC1, FEC2,..., FECk} map to the same incoming SR
   MPLS label "L1", then the steps below assign the same FEC to the
   label "L1" irrespective of the order by which the mappings of this
   set of FECs to the label "L1" are received. For example, first-
   come, first-served tiebreaking is not allowed. The remaining FECs may
   be installed in the IP FIB without an incoming label.</t>

	<t>
   The procedure in this section relies completely on the local FEC and
   label database within a given router.</t>

	<t>
   The collision resolution procedure is as follows:</t>

	<t><list style="numbers"><t>Given the SIDs of the set of FECs, {FEC1, FEC2,..., FECk} map to
      the same MPLS label "L1".</t>

	<t>Within an MCC, apply tiebreaking rules to select one FEC only, and
      assign the label to it. The losing FECs are handled as if no
      labels are attached to them. The losing FECs with algorithms other
      than the shortest path first <xref target="RFC8402"/> are not installed in the
      FIB.
       <list style="letters"><t>
          If the same set of FECs are attached to the same label "L1",
          then the tiebreaking rules MUST always select the same FEC
          irrespective of the order in which the FECs and the label "L1"
          are received. In other words, the tiebreaking rule MUST be
          deterministic.</t>

	</list>
	</t>

	<t>If there is still collision between the FECs belonging to
      different MCCs, then reapply the tiebreaking rules to the
      remaining FECs to select one FEC only, and assign the label to that
      FEC.</t>

	<t>Install the selected FEC into the IP FIB and its incoming label into
        the label FIB.</t>

	<t>The remaining FECs with the default algorithm (see the
      prefix-SID algorithm specification <xref target="RFC8402"/>) may be installed
      in the FIB natively, such as pure IP entries in case of Prefix
      FEC, without any incoming labels corresponding to their SIDs. The
      remaining FECs with algorithms other than the shortest path first
      <xref target="RFC8402"/> are not installed in the FIB.</t>

	</list>
	</t>

	<section title="Tiebreaking Rules" anchor="section-2.5.1">
	  <t>
   The default tiebreaking rules are specified as follows:</t>

<!-- [rfced] Will "FECi" be clear to the reader or should it
be defined? Perhaps the text could state its relationship to 
{FEC1, FEC2,..., FECk} mentioned in Section 2.5.

Current:
   1.  If FECi has the lowest FEC administrative distance among the
       competing FECs as defined in the section below, filter away all
       the competing FECs with a higher administrative distance.
-->

	<t><list style="numbers"><t>If FECi has the lowest FEC administrative distance among the
      competing FECs as defined in the section below, filter away all
      the competing FECs with a higher administrative distance.</t>

	<t>If more than one competing FEC remains after step 1, select the
      smallest numerical FEC value. The numerical value of the FEC is
      determined according to the FEC encoding described later in this
      section.</t>

	</list>
	</t>

	<t>
   These rules deterministically select which FEC to install in the MPLS
   forwarding plane for the given incoming label.</t>

	<t>
   This document defines the default tiebreaking rules that SHOULD be
   implemented. An implementation MAY choose to support different tiebreaking
   rules and MAY use one of the these instead of the default
   tiebreaking rules. To maximize MPLS forwarding consistency in case
   of a SID configuration error, the network operator MUST deploy, within
   an IGP flooding area, routers implementing the same tiebreaking
   rules.</t>

	<t>
   Each FEC is assigned an administrative distance. The FEC
   administrative distance is encoded as an 8-bit value. The lower the
   value, the better the administrative distance.</t>

	<t>
   The default FEC administrative distance order starting from the
   lowest value SHOULD be:</t>

	<t><list style="symbols"><t>Explicit SID assignment to a FEC that maps to a label outside the
      SRGB irrespective of the owner MCC. An explicit SID assignment is
      a static assignment of a label to a FEC such that the assignment
      survives a router reboot.<list style="symbols"><t>An example of explicit SID allocation is static assignment of
         a specific label to an Adj-SID.</t>

	<t>An implementation of explicit SID assignment MUST guarantee
         collision freeness on the same router.</t>

	</list>
	</t>

	<t>Dynamic SID assignment:<list style="symbols">
        <t>All FEC types, except for the SR Policy, are
         ordered using the default administrative distance ordering
         defined by the implementation.</t>

	<t>The Binding SID <xref target="RFC8402"/> assigned to the SR Policy always has a
         higher default administrative distance than the default
         administrative distance of any other FEC type.</t>

	</list>
	</t>

	</list>
	</t>

	<t>
   To maximize MPLS forwarding consistency, if the same FEC is advertised
   in more than one protocol, a user MUST ensure that the administrative
   distance preference between protocols is the same on all routers of
   the IGP flooding domain. Note that this is not really new as this
   already applies to IP forwarding.</t>

	<t>
   The numerical sort across FECs SHOULD be performed as follows:

     <list style="symbols">

       <t>Each FEC is assigned a FEC type encoded in 8 bits. The type code points 
      for each SR FEC defined at the beginning
      of this section are as follows:
      <list style="empty">

	<t>120: (Prefix, Routing Instance, Topology, Algorithm)</t>

	<t>130: (next-hop, outgoing interface)</t>

	<t>140: Parallel Adjacency <xref target="RFC8402"/></t>

	<t>150: SR Policy <xref target="RFC8402"/></t>

	<t>160: Mirror SID <xref target="RFC8402"/></t>

	<t>The numerical values above are mentioned to guide
         implementation. If other numerical values are used, then the
         numerical values must maintain the same greater-than ordering
         of the numbers mentioned here.</t>

	</list></t>
	

	<t>The fields of each FEC are encoded as follows:
<list style="symbols">

	  
	<t>All fields in all FECs are encoded in big endian order.</t>

	<t>The Routing Instance ID is represented by 16 bits. For routing
         instances that are identified by less than 16 bits, encode the
         Instance ID in the least significant bits while the most
         significant bits are set to zero.</t>

	<t>The address family is represented by 8 bits, where IPv4 is encoded as
         100, and IPv6 is encoded as 110. These numerical values are
         mentioned to guide implementations. If other numerical values
         are used, then the numerical value of IPv4 MUST be less than
         the numerical value for IPv6.</t>

	 <t>All addresses are represented in 128 bits as follows:

	 <list style="symbols">
	 
	<t>The IPv6 address is encoded natively.</t>

	<t>The IPv4 address is encoded in the most significant bits, and
               the remaining bits are set to zero.</t></list>
	</t>

	<t>All prefixes are represented by (8 + 128) bits.

	<list style="symbols">
	<t>A prefix is encoded in the most significant bits, and the
        remaining bits are set to zero.</t>
	

	<t>The prefix length is encoded before the prefix in an 8-bit field.</t></list>
	</t>


	<t>The Topology ID is represented by 16 bits. For routing instances
         that identify topologies using less than 16 bits, encode the
         topology ID in the least significant bits while the most
         significant bits are set to zero.</t>

	<t>The Algorithm is encoded in a 16-bit field.</t>

	<t>The Color ID is encoded using 32 bits.</t>

	</list>
	</t>

	<t>Choose the set of FECs of the smallest FEC type code point.</t>

	<t>Out of these FECs, choose the FECs with the smallest address
      family code point.</t>

      <t>Encode the remaining set of FECs as follows:

      <list style="symbols">
	<t>(Prefix, Routing Instance, Topology, Algorithm) is encoded as
         (Prefix Length, Prefix, routing_instance_id, Topology, SR
         Algorithm).</t>

	<t>(next-hop, outgoing interface) is encoded as (next-hop,
         outgoing_interface_id).</t>

	<t>(number of adjacencies, list of next-hops in ascending
         numerical order, list of outgoing interface IDs in ascending
         numerical order) is used to encode a parallel
         adjacency <xref target="RFC8402"/>.</t>

	<t>(Endpoint, Color) is encoded as (Endpoint_address, Color_id).</t>

	<t>(IP address) is the encoding for a Mirror SID FEC. The IP
         address is encoded as described above in this section.</t>

	</list>
	</t>

	<t>Select the FEC with the smallest numerical value.</t>

     </list></t>

	<t>
   The numerical values mentioned in this section are for guidance only.
   If other numerical values are used, then the other numerical values
   MUST maintain the same numerical ordering among different SR FECs.</t>

	</section>

	<section title="Redistribution between Routing Protocol Instances" anchor="section-2.5.2"><t>
   The following rule SHOULD be applied when redistributing SIDs with
   prefixes between routing protocol instances:</t>

   <t>
     <list style="symbols">
       <t>If the SRGB of the receiving instance is the same as the SRGB of the origin
       instance, then:

       <list style="symbols">

	 <t>the index is redistributed with the route.</t>

	</list>
	</t>

	<t>Else,

	<list style="symbols">

	  <t>the index is not redistributed and if the receiving instance
         decides to advertise an index with the redistributed route, it
         is the duty of the receiving instance to allocate a fresh
         index relative to its own SRGB. Note that in this case, the
         receiving instance MUST compute the local label it assigns to
         the route according to <xref target="section-2.4"/> and install it in FIB.</t>

	</list>
	</t>

	</list>
	</t>

	<t>
   It is outside the scope of this document to define local node
   behaviors that would allow the mapping of the original index into a new index
   in the receiving instance via the addition of an offset or other
   policy means.</t>

   <section title="Illustration" anchor="section-2.5.2.1">

     <figure><artwork><![CDATA[
        A----IS-IS----B---OSPF----C-192.0.2.1/32 (20001)

]]></artwork>

     </figure>

     <t>Consider the simple topology above.</t>
     
     <t>
       <list style="symbols">
	 <t>A and B are in the IS-IS domain with SRGB [16000-17000]</t>

	<t>B and C are in the OSPF domain with SRGB [20000-21000]</t>

	<t>B redistributes 192.0.2.1/32 into the IS-IS domain</t>

<!--[rfced] Should the last two bullet points in this list 
not be bulleted (i.e., be simply paragraphs) because they are 
referring to the first three bulleted items? 

Original:
   Consider the simple topology above.

   o  A and B are in the IS-IS domain with SRGB [16000-17000]

   o  B and C are in OSPF domain with SRGB [20000-21000]

   o  B redistributes 192.0.2.1/32 into IS-IS domain

   o  In that case A learns 192.0.2.1/32 as an IP leaf connected to B as
      usual for IP prefix redistribution

   o  However, according to the redistribution rule above rule, B
      decides not to advertise any index with 192.0.2.1/32 into IS-IS
      because the SRGB is not the same.

Perhaps:
   Consider the simple topology above.

   o  A and B are in the IS-IS domain with SRGB [16000-17000]

   o  B and C are in the OSPF domain with SRGB [20000-21000]

   o  B redistributes 192.0.2.1/32 into IS-IS domain

   In this case, A learns 192.0.2.1/32 as an IP leaf connected to B, which is
   usual for IP prefix redistribution.

   However, according to the redistribution rule above, B
   decides not to advertise any index with 192.0.2.1/32 into IS-IS
   because the SRGB is not the same.
-->

	<t>In that case, A learns 192.0.2.1/32 as an IP leaf connected to B, which is
      usual for IP prefix redistribution</t>

	<t>However, according to the redistribution rule above, B
      decides not to advertise any index with 192.0.2.1/32 into IS-IS
      because the SRGB is not the same.</t>

	</list>
	</t>

	</section>

	<section title="Illustration 2" anchor="section-2.5.2.2"><t>
   Consider the example in the illustration described in <xref target="section-2.5.2.1"/>.</t>

	<t>
   When router B redistributes the prefix 192.0.2.1/32, router B decides
   to allocate and advertise the same index 1 with the prefix
   192.0.2.1/32.</t>

	<t>
   Within the SRGB of the IS-IS domain, index 1 corresponds to the local
   label 16001.</t>

	<t><list style="symbols"><t>Hence, according to the redistribution rule above, router B
      programs the incoming label 16001 in its FIB to match traffic
      arriving from the IS-IS domain destined to the prefix
      192.0.2.1/32.</t>

	</list>
	</t>

	</section>

	</section>

	</section>

	<section title="Effect of Incoming Label Collision on Outgoing Label Programming" anchor="section-2.6"><t>

   When determining what outgoing label to use, the ingress node
   that pushes new segments, and hence a stack of MPLS labels, MUST use, for
   a given FEC, the same label that has been selected by the node
   receiving the packet with that label exposed as the top label. So in case
   of incoming label collision on this receiving node, the ingress node
   MUST resolve this collision by using this same "Incoming Label Collision resolution procedure" and by using the data of the receiving node.</t>

	<t>
   In the general case, the ingress node may not have the exact same
   data as the receiving node, so the result may be different. This is
   under the responsibility of the network operator. But in a typical
   case, e.g., where a centralized node or a distributed link-state IGP
   is used, all nodes would have the same database. However, to minimize
   the chance of misforwarding, a FEC that loses its incoming label to
   the tiebreaking rules specified in <xref target="section-2.5"/> MUST NOT be
   installed in FIB with an outgoing Segment Routing label based on the
   SID corresponding to the lost incoming label.</t>

	<t>
   Examples for the behavior specified in this section can be found in
   <xref target="section-a.3"/>.</t>

	</section>

	<section title="PUSH, CONTINUE, and NEXT" anchor="section-2.7"><t>
   PUSH, NEXT, and CONTINUE are operations applied by the forwarding
   plane. The specifications of these operations can be found in
   <xref target="RFC8402"/>. This subsection specifies how to implement each of these
   operations in the MPLS forwarding plane.</t>

	<section title="PUSH" anchor="section-2.7.1"><t>
   As described in <xref target="RFC8402"/>, PUSH corresponds to pushing one or more
   labels on top of an incoming packet then sending it out of a
   particular physical interface or virtual interface, such as a UDP
   tunnel <xref target="RFC7510"/> or the Layer 2 Tunneling Protocol version 3 (L2TPv3) <xref target="RFC4817"/>, towards a particular
   next-hop.

<!--[rfced] We do not see mention of 'Traffic Class field' in
RFC 3032.  Is an update perhaps needed?

Original:
   When pushing labels onto a packet's label stack, the Time-
   to-Live (TTL) field ([RFC3032], [RFC3443]) and the Traffic Class (TC)
   field ([RFC3032], [RFC5462]) of each label stack entry must, of
   course, be set. 
-->

 When pushing labels onto a packet's label stack, the Time-to-Live
   (TTL) field <xref target="RFC3032"/> <xref target="RFC3443"/> and the Traffic Class (TC)
   field <xref target="RFC3032"/> <xref target="RFC5462"/> of each label stack entry must, of
   course, be set.  This document does not specify any set of rules for
   setting these fields; that is a matter of local policy. Sections <xref target="section-2.10" format="counter" /> and <xref target="section-2.11" format="counter" /> specify additional details about forwarding
   behavior.</t>

	</section>

	<section title="CONTINUE" anchor="section-2.7.2"><t>
   As described in <xref target="RFC8402"/>, the CONTINUE operation corresponds to
   swapping the incoming label with an outgoing label. The value of the
   outgoing label is calculated as specified in Sections <xref target="section-2.10" format="counter"/> and <xref target="section-2.11" format="counter"/>.</t>

	</section>

	<section title="NEXT" anchor="section-2.7.3"><t>
   As described in <xref target="RFC8402"/>, NEXT corresponds to popping the topmost
   label. The action before and/or after the popping depends on the
   instruction associated with the active SID on the received packet
   prior to the popping. For example, suppose the active SID in the
   received packet was an Adj-SID <xref target="RFC8402"/>; on receiving the
   packet, the node applies the NEXT operation, which corresponds to popping
   the topmost label, and then sends the packet out of the physical or
   virtual interface (e.g., the UDP tunnel <xref target="RFC7510"/> or L2TPv3 tunnel
   <xref target="RFC4817"/>) towards the next-hop corresponding to the Adj-SID.</t>

	<section title="Mirror SID" anchor="section-2.7.3.1"><t>
   If the active SID in the received packet was a Mirror SID (see <xref target="RFC8402"/>, Section 5.1) allocated by the receiving router, the receiving
   router applies the NEXT operation, which corresponds to popping the topmost
   label, and then performs a lookup using the contents of the packet
   after popping the outermost label in the mirrored forwarding table. 
   The method by which the lookup is made, and/or the actions applied to
   the packet after the lookup in the mirror table, depends on the
   contents of the packet and the mirror table. Note that the packet
   exposed after popping the topmost label may or may not be an MPLS
   packet. A Mirror SID can be viewed as a generalization of the context
   label in <xref target="RFC5331"/> because a Mirror SID does not make any
   assumptions about the packet underneath the top label.</t>

	</section>

	</section>

	</section>

	<section title="MPLS Label Downloaded to the FIB for Global and Local SIDs" anchor="section-2.8"><t>
   The label corresponding to the global SID "Si", which is represented by the
   global index "I" and downloaded to the FIB, is used to match packets whose
   active segment (and hence topmost label) is "Si". The value of this
   label is calculated as specified in <xref target="section-2.4"/>.</t>

	<t>
   For Local SIDs, the MCC is responsible for downloading the correct
   label value to the FIB. For example, an IGP with SR extensions <xref target="RFC8667"/> <xref target="RFC8665"/> downloads the MPLS label corresponding to an Adj-SID <xref target="RFC8402"/>.</t>

	</section>

	<section title="Active Segment" anchor="section-2.9"><t>
   When instantiated in the MPLS domain, the active segment on a packet
   corresponds to the topmost label and is calculated
   according to the procedure specified in Sections <xref target="section-2.10" format="counter" /> and <xref target="section-2.11" format="counter" />. When
   arriving at a node, the topmost label corresponding to the active SID
   matches the MPLS label downloaded to the FIB as specified in <xref target="section-2.4"/>.</t>

	</section>

	<section title="Forwarding Behavior for Global SIDs" anchor="section-2.10"><t>
   This section specifies the forwarding behavior, including the calculation
   of outgoing labels, that corresponds to a global SID when applying
   the PUSH, CONTINUE, and NEXT operations in the MPLS forwarding plane.</t>

	<t>
   This document covers the calculation of the outgoing label for the
   top label only. The case where the outgoing label is not the top
   label and is part of a stack of labels that instantiates a routing
   policy or a traffic-engineering tunnel is outside the scope of this
   document and may be covered in other documents such as <xref target="ROUTING-POLICY"/>.</t>

	<section title="Forwarding for PUSH and CONTINUE of Global SIDs" anchor="section-2.10.1"><t>

<!--[rfced] The following sentence is difficult to read without
any punctuation. May we offset some of the information with
commas? Please let us know if this is accurate or if you prefer
otherwise.

Original:
   Suppose an MCC on a router "R0" determines that PUSH or CONTINUE
   operation is to be applied to an incoming packet related to the
   global SID "Si" represented by the global index "I" and owned by the
   router Ri before sending the packet towards a neighbor "N" directly
   connected to "R0" through a physical or virtual interface such as UDP
   tunnel [RFC7510] or L2TPv3 tunnel [RFC4817].

Perhaps: 
   Suppose an MCC on router "R0" determines that the PUSH or
   CONTINUE operation is to be applied to an incoming packet related to
   the global SID "Si", which is represented by the global index "I" and
   owned by the router Ri, before sending the packet towards neighbor
   "N", and neighbor "N" is directly connected to "R0" through a physical
   or virtual interface such as a UDP tunnel [RFC7510] or L2TPv3 tunnel
   [RFC4817].
-->

   Suppose an MCC on router "R0" determines that the PUSH or CONTINUE
   operation is to be applied to an incoming packet related to the
   global SID "Si" represented by the global index "I" and owned by the
   router Ri before sending the packet towards a neighbor "N" directly
   connected to "R0" through a physical or virtual interface such as a UDP
   tunnel <xref target="RFC7510"/> or L2TPv3 tunnel <xref target="RFC4817"/>.</t>

	<t>
   The method by which the MCC on router "R0" determines that the PUSH or
   CONTINUE operation must be applied using the SID "Si" is beyond the
   scope of this document.
<!--[rfced] Please clarify 'covered by the prefix P/m'. Is the
destination address 'covered' by the prefix P/m?

Original:
   An example of a method to determine the SID
   "Si" for PUSH operation is the case where IS-IS [I-D.ietf-isis-
   segment-routing-extensions] receives the prefix-SID "Si" sub-TLV
   advertised with prefix "P/m" in TLV 135 and the destination address
   of the incoming IPv4 packet is covered by the prefix "P/m".
-->
   An example of a method used to determine the SID
   "Si" for the PUSH operation is the case where IS-IS <xref target="RFC8667"/> receives the prefix-SID "Si" sub-TLV
   advertised with the prefix "P/m" in TLV 135 and the destination address
   of the incoming IPv4 packet covered by the prefix "P/m".</t>

	<t>
   For the CONTINUE operation, an example of a method used to determine the SID
   "Si" is the case where IS-IS <xref target="RFC8667"/> receives the prefix-SID "Si" sub-TLV advertised with
   prefix "P" in TLV 135, and the top label of the incoming packet
   matches the MPLS label in the FIB corresponding to the SID "Si" on
   router "R0".</t>

	<t>
   The forwarding behavior for PUSH and CONTINUE corresponding to the
   SID "Si" is as follows:</t>

   <t>
     <list style="symbols">
       <t>If neighbor "N" does not support SR or advertises an invalid
       SRGB or a SRGB that is too small for the SID "Si", then:
       <list style="symbols">
	 <t>If it is possible to send the packet towards neighbor "N"
         using standard MPLS forwarding behavior as specified in
         <xref target="RFC3031"/> and <xref target="RFC3032"/>, forward the packet. The method
         by which a router decides whether it is possible to send the
         packet to "N" or not is beyond the scope of this document. For
         example, the router "R0" can use the downstream label
         determined by another MCC, such as LDP <xref target="RFC5036"/>, to send the
         packet.</t>

	<t>Else, if there are other usable next-hops, use them to forward the incoming packet. 
         The method by which the
         router "R0" decides on the possibility of using other next-hops
         is beyond the scope of this document. For example, the
         MCC on "R0" may chose the send an IPv4 packet without pushing
         any label to another next-hop.</t>

	<t>Otherwise, drop the packet.</t>

	</list>
	</t>

	<t>Else,

	<list style="symbols">

	  <t>Calculate the outgoing label as specified in <xref target="section-2.4"/> using
          the SRGB of neighbor "N".

	  <list style="symbols">

<!--[rfced] Are the three bullets below "Calculate the outgoing label"
supposed to be sub-items or at the same level?

Original: 
      o Calculate the outgoing label as specified in Section 2.4 using
        the SRGB of the neighbor "N"

       o If the operation is PUSH

           .  Push the calculated label according to the MPLS label
              pushing rules specified in [RFC3032]

       o Else

           .  swap the incoming label with the calculated label
              according to the label swapping rules in [RFC3032]

       o Send the packet towards the neighbor "N"

Current (as sub-items):
      -  Calculate the outgoing label as specified in Section 2.4 using
         the SRGB of neighbor "N".

         *  If the operation is PUSH:

            +  Push the calculated label according to the MPLS label
               pushing rules specified in [RFC3032].

         *  Else,

            +  swap the incoming label with the calculated label
               according to the label-swapping rules in [RFC3032].

         *  Send the packet towards neighbor "N".
-->
	    
	    <t>If the operation is PUSH:
	   <list style="symbols">
	<t>Push the calculated label according to the MPLS label
              pushing rules specified in <xref target="RFC3032"/>.
	</t>
	   </list></t>
	<t>Else,

       <list style="symbols">

<!--[rfced] We do not see the terms 'swap' or 'swapping rules' in
RFC 3032. Is an update perhaps neeeded? 

Original:
   .  swap the incoming label with the calculated label
      according to the label swapping rules in [RFC3032]

-->
	<t>swap the incoming label with the calculated label
           according to the label-swapping rules in <xref target="RFC3032"/>.
	</t>
       </list>
	</t>

	<t>Send the packet towards neighbor "N".</t>

	</list>
	</t>

	</list>
	</t>

	</list>
	</t>

	</section>

	<section title="Forwarding for the NEXT Operation for Global SIDs" anchor="section-2.10.2"><t>
   As specified in <xref target="section-2.7.3"/>, the NEXT operation corresponds to popping
   the topmost label. The forwarding behavior is as follows:</t>

	<t><list style="symbols"><t>Pop the topmost label</t>

	<t>Apply the instruction associated with the incoming label that has
      been popped</t>

	</list>
	</t>

	<t>
   The action on the packet after popping the topmost label depends on
   the instruction associated with the incoming label as well as the
   contents of the packet right underneath the top label that was
   popped. Examples of the NEXT operation are described in Appendix A.1.</t>

	</section>

	</section>

	<section title="Forwarding Behavior for Local SIDs" anchor="section-2.11"><t>
   This section specifies the forwarding behavior for local SIDs when SR
   is instantiated over the MPLS forwarding plane.</t>

	<section title="Forwarding for the PUSH Operation on Local SIDs" anchor="section-2.11.1"><t>
   Suppose an MCC on router "R0" determines that the PUSH operation is to
   be applied to an incoming packet using the local SID "Si" before
   sending the packet towards neighbor "N", which is directly connected to R0
   through a physical or virtual interface such as a UDP tunnel <xref target="RFC7510"/>
   or L2TPv3 tunnel <xref target="RFC4817"/>.</t>

	<t>
   An example of such a local SID is an Adj-SID allocated and advertised
   by IS-IS <xref target="RFC8667"/>. The method by
   which the MCC on "R0" determines that the PUSH operation is to be applied
   to the incoming packet is beyond the scope of this document. An
   example of such a method is the backup path used to protect against a
   failure using TI-LFA <xref target="FAST-REROUTE"/>.</t>

	<t>
   As mentioned in <xref target="RFC8402"/>, a local SID is specified by an MPLS label.

<!--[rfced] We do not see 'push operation' or 'swap operation'
mentioned in RFC 3032; however, since RFC 3032 focuses on MPLS
labels, we believe the intention is for the reference to follow
'MPLS label'.  We made the update in 2 places; if this is not
correct, please let us know how it should be updated.

Updated:
   Hence, the PUSH operation for a local SID is identical to the label
   push operation using any MPLS label [RFC3032].

Updated:
   In such a scenario, the outgoing label towards next-hop "N" is determined
   by the MCC running on the router "R0", and the forwarding behavior for
   the CONTINUE operation is identical to the swap operation on an
   MPLS label [RFC3032].
-->
   Hence, the PUSH operation for a local SID is identical to the label push
   operation using any MPLS label <xref target="RFC3032"/>. The forwarding action after
   pushing the MPLS label corresponding to the local SID is also
   determined by the MCC. For example, if the PUSH operation was done to
   forward a packet over a backup path calculated using TI-LFA, then the
   forwarding action may be sending the packet to a certain neighbor
   that will in turn continue to forward the packet along the backup
   path.</t>

	</section>

	<section title="Forwarding for the CONTINUE Operation for Local SIDs" anchor="section-2.11.2"><t>
   A local SID on router "R0" corresponds to a local label.
   In such a
   scenario, the outgoing label towards next-hop "N" is determined by
   the MCC running on the router "R0", and the forwarding behavior for the
   CONTINUE operation is identical to the swap operation on an
   MPLS label <xref target="RFC3032"/>.</t>

	</section>

	<section title="Outgoing Label for the NEXT Operation for Local SIDs" anchor="section-2.11.3"><t>
  The  NEXT operation for Local SIDs is identical to the NEXT operation for
   global SIDs as specified in <xref target="section-2.10.2"/>.</t>

	</section>

	</section>

	</section>

	<section title="IANA Considerations" anchor="section-3"><t>
 This document has no IANA actions.</t>

	</section>

	<section title="Manageability Considerations" anchor="section-4"><t>
   This document describes the applicability of Segment Routing over the
   MPLS data plane.  Segment Routing does not introduce any change in
   the MPLS data plane.  Manageability considerations described in
   <xref target="RFC8402"/> apply to the MPLS data plane when used with Segment
   Routing. SR Operations, Administration, and Maintenance (OAM) use cases for the MPLS data plane are defined in
   <xref target="RFC8403"/>.  SR OAM procedures for the MPLS data plane are defined in
   <xref target="RFC8287"/>.</t>

	</section>

	<section title="Security Considerations" anchor="section-5"><t>
   This document does not introduce additional security requirements and
   mechanisms other than the ones described in <xref target="RFC8402"/>.</t>

	</section>

	</middle>

	<back>

<!--[rfced] May we sort the references to be in alphabetical order?-->

	<references title="Normative References">
	&RFC8402;
	&RFC2119;
	&RFC3031;
	&RFC3032;
	&RFC3443;
	&RFC5462;
	&RFC7274;
	&RFC8174;
	</references>
	<references title="Informative References">

<!--draft-ietf-isis-segment-routing-extensions-25; Active - in Edit - part of C340-->
<reference anchor='RFC8667' target='https://www.rfc-editor.org/info/rfc8667'>
<front>
<title>IS-IS Extensions for Segment Routing</title>
<author initials='S' surname='Previdi' fullname='Stefano Previdi' role="editor" >
    <organization />
</author>

<author initials='L' surname='Ginsberg' fullname='Les Ginsberg' role="editor">
    <organization />
</author>

<author initials='C' surname='Filsfils' fullname='Clarence Filsfils'>
    <organization />
</author>

<author initials='A' surname='Bashandy' fullname='Ahmed Bashandy'>
    <organization />
</author>

<author initials='H' surname='Gredler' fullname='Hannes Gredler'>
    <organization />
</author>

<author initials='B' surname='Decraene' fullname='Bruno Decraene'>
    <organization />
</author>

<date month='September' year='2019' />
</front>
<seriesInfo name='RFC' value='8667' />
<seriesInfo name='DOI' value='10.17487/RFC8667' />
</reference>


<!--draft-ietf-ospf-ospfv3-segment-routing-extensions; Active - in REF*R - part of C340-->
<reference anchor='RFC8666' target='https://www.rfc-editor.org/info/rfc8666'>
<front>
<title>OSPFv3 Extensions for Segment Routing</title>
<author initials='P' surname='Psenak' fullname='Peter Psenak' role="editor" >
    <organization />
</author>
<author initials='S' surname='Previdi' fullname='Stefano Previdi' role="editor">
    <organization />
</author>
<date month='September' year='2019' />
</front>
<seriesInfo name='RFC' value='8666' />
<seriesInfo name='DOI' value='10.17487/RFC8666' />
</reference>


<!--draft-ietf-ospf-segment-routing-extensions; Active - in REF*R - Part of C340-->
<reference anchor='RFC8665' target='https://www.rfc-editor.org/info/rfc8665'>
<front>
<title>OSPF Extensions for Segment Routing</title>
<author initials='P' surname='Psenak' fullname='Peter Psenak' role="editor">
    <organization />
</author>

<author initials='S' surname='Previdi' fullname='Stefano Previdi' role="editor">
    <organization />
</author>

<author initials='C' surname='Filsfils' fullname='Clarence Filsfils'>
    <organization />
</author>

<author initials='H' surname='Gredler' fullname='Hannes Gredler'>
    <organization />
</author>

<author initials='R' surname='Shakir' fullname='Rob Shakir'>
    <organization />
</author>

<author initials='W' surname='Henderickx' fullname='Wim Henderickx'>
    <organization />
</author>

<author initials='J' surname='Tantsura' fullname='Jeff Tantsura'>
    <organization />
</author>

<date month='September' year='2019' />
</front>
<seriesInfo name='RFC' value='8665' />
<seriesInfo name='DOI' value='10.17487/RFC8665' />
</reference>


<!--draft-ietf-spring-segment-routing-ldp-interop; Active - in REF*R - Part of C340-->
<reference anchor='RFC8661' target='https://www.rfc-editor.org/info/rfC8661'>
<front>
<title>Segment Routing Interworking with LDP</title>
<author initials='A' surname='Bashandy' fullname='Ahmed Bashandy' role="editor">
    <organization />
</author>

<author initials='C' surname='Filsfils' fullname='Clarence Filsfils' role="editor">
    <organization />
</author>

<author initials='S' surname='Previdi' fullname='Stefano Previdi'>
    <organization />
</author>

<author initials='B' surname='Decraene' fullname='Bruno Decraene'>
    <organization />
</author>

<author initials='S' surname='Litkowski' fullname='Stephane Litkowski'>
    <organization />
</author>

<date month='September' year='2019' />
</front>

<seriesInfo name='RFC' value='8661' />
<seriesInfo name='DOI' value='10.17487/RFC8661' />
</reference>


<!-- &I-D.bashandy-rtgwg-segment-routing-ti-lfa; Replaced by draft-ietf-rtgwg-segment-routing-ti-lfa; I-D Exists -->
<reference anchor='FAST-REROUTE'>
<front>
<title>Topology Independent Fast Reroute using Segment Routing</title>
<author initials='S' surname='Litkowski' fullname='Stephane Litkowski'>
    <organization />
</author>

<author initials='A' surname='Bashandy' fullname='Ahmed Bashandy'>
    <organization />
</author>

<author initials='C' surname='Filsfils' fullname='Clarence Filsfils'>
    <organization />
</author>

<author initials='B' surname='Decraene' fullname='Bruno Decraene'>
    <organization />
</author>

<author initials='P' surname='Francois' fullname='Pierre Francois'>
    <organization />
</author>

<author initials='D' surname='Voyer' fullname='Daniel Voyera'>
    <organization />
</author>

<author initials='F' surname='Clad' fullname='Francois Clad'>
    <organization />
</author>

<author initials='P' surname='Camarillo' fullname='Pablo Camarillo'>
    <organization />
</author>

<date month='March' year='2019' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-rtgwg-segment-routing-ti-lfa-01' />
</reference>

	&RFC7855;
	&RFC5036;
	&RFC5331;
	&RFC7510;
	&RFC4817;
	&RFC8287;
	&RFC8403;

<!--draft-ietf-spring-segment-routing-policy; Active - I-D Exists-->
<reference anchor='ROUTING-POLICY'>
<front>
<title>Segment Routing Policy Architecture</title>

<author initials='C' surname='Filsfils' fullname='Clarence Filsfils'>
    <organization />
</author>

<author initials='S' surname='Sivabalan' fullname='Siva Sivabalan' role="editor">
    <organization />
</author>

<author initials='D' surname='Voyer' fullname='Daniel Voyer'>
    <organization />
</author>

<author initials='B' surname='Bogdanov' fullname='Alex Bogdanov'>
    <organization />
</author>

<author initials='P' surname='Mattes' fullname='Paul Mattes'>
    <organization />
</author>

<date month='May' year='2019' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-spring-segment-routing-policy-03' />
</reference>
	</references>


<!--[rfced] In the appendix, the format of the FEC examples vary.  The text is
in bulleted form in Appendices A.2.1, A.2.2, and A.3.2 and in paragraph
form in Appendices A.2.3-A.3.1. Please let us know if/how we may make
these formats consistent.

For example:
  FEC1:

   o  OSPF prefix SID advertisement from node B for 198.51.100.5/32 with
      index=5

   o  OSPF SRGB on node A = [1000,1999]

   o  Incoming label=1005

   FEC2:

   o  ISIS prefix SID advertisement from node C for 203.0.113.105/32
      with index=5

   o  ISIS SRGB on node A = [1000,1999]

   o  Incoming label=1005

vs.

  FEC1:

   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.111/32 with index 11.  Assuming that the ISIS SRGB on node
   A is [1000,1999], the incoming label on node A for 203.0.113.111/32
   is 1011.

   FEC2:

   ISIS on node A prefix SID advertisement from node C for
   2001:DB8:1000::11/128 with index=11.  Assuming that the ISIS SRGB on
   node A is [1000,1999], the incoming label on node A for
   2001:DB8:1000::11/128 is 1011.
-->


	<section title="Examples" anchor="section-a"><section title="IGP Segment Examples" anchor="section-a.1"><t>
   Consider the network diagram of <xref target="fig1"/> and the IP address and IGP
   segment allocation of <xref target="fig2"/>. Assume that the network is running
   IS-IS with SR extensions <xref target="RFC8667"/>,
   and all links have the same metric. The following examples can be
   constructed.</t>


   

   <figure title="IGP Segments -- Illustration" anchor="fig1">
     <artwork><![CDATA[
                             +--------+
                            /          \
             R0-----R1-----R2----------R3-----R8
                           | \        / |
                           |  +--R4--+  |
                           |            |
                           +-----R5-----+
                           ]]>
     </artwork>
   </figure>

      <figure title="IGP Address and Segment Allocation -- Illustration" anchor="fig2">
        <artwork><![CDATA[
       +-----------------------------------------------------------+
       | IP address allocated by the operator:                     |
       |                      192.0.2.1/32 as a loopback of R1     |
       |                      192.0.2.2/32 as a loopback of R2     |
       |                      192.0.2.3/32 as a loopback of R3     |
       |                      192.0.2.4/32 as a loopback of R4     |
       |                      192.0.2.5/32 as a loopback of R5     |
       |                      192.0.2.8/32 as a loopback of R8     |
       |              198.51.100.9/32 as an anycast loopback of R4 |
       |              198.51.100.9/32 as an anycast loopback of R5 |
       |                                                           |
       | SRGB defined by the operator as 1000-5000                 |
       |                                                           |
       | Global IGP SID indices allocated by the operator:         |
       |                      1 allocated to 192.0.2.1/32          |
       |                      2 allocated to 192.0.2.2/32          |
       |                      3 allocated to 192.0.2.3/32          |
       |                      4 allocated to 192.0.2.4/32          |
       |                      8 allocated to 192.0.2.8/32          |
       |                   1009 allocated to 198.51.100.9/32       |
       |                                                           |
       | Local IGP SID allocated dynamically by R2                 |
       |                     for its "north" adjacency to R3: 9001 |
       |                     for its "east" adjacency to R3 : 9002 |
       |                     for its "south" adjacency to R3: 9003 |
       |                     for its only adjacency to R4   : 9004 |
       |                     for its only adjacency to R1   : 9005 |
       +-----------------------------------------------------------+
                           ]]>
     </artwork>
   </figure>


	<t>
   Suppose R1 wants to send IPv4 packet P1 to R8. In this case, R1
   needs to apply the PUSH operation to the IPv4 packet.</t>

	<t>
   Remember that the SID index "8" is a global IGP segment attached to
   the IP prefix 192.0.2.8/32. Its semantic is global within the IGP
   domain: any router forwards a packet received with active segment 8
   to the next-hop along the ECMP-aware shortest path to the related
   prefix.</t>

	<t>
   R2 is the next-hop along the shortest path towards R8. By applying
   the steps in <xref target="section-2.8"/>, the outgoing label downloaded to R1's FIB
   corresponding to the global SID index 8 is 1008 because the SRGB of
   R2 is [1000,5000] as shown in Figure 2.</t>

	<t>
   Because the packet is IPv4, R1 applies the PUSH operation using the
   label value 1008 as specified in <xref target="section-2.10.1"/>. The resulting MPLS
   header will have the "S" bit <xref target="RFC3032"/> set because it is followed
   directly by an IPv4 packet.</t>

	<t>
   The packet arrives at router R2.
<!--[rfced] May we update the instruction in quote marks?
Specifically, is the intended meaning 'one or multiple ECMP/UCMP
next-hops'? If so, see A below. If it should be 'all ECMP/UCMP
next-hops', see B below. Please let us know which option you
prefer.

A) "and an ECMP/UCMP next-hop(s)..." 
or 
B) "and all ECMP/UCMP next-hops..."

Original:
   Because the top label 1008
   corresponds to the IGP SID "8", which is the prefix-SID attached to
   the prefix 192.0.2.8/32 owned by the node R8, then the instruction
   associated with the SID is "forward the packet using all ECMP/UCMP
   interfaces and all ECMP/UCMP next-hop(s) along the shortest/useable
   path(s) towards R8".
-->
 Because top label 1008
   corresponds to the IGP SID "8", which is the prefix-SID attached to
   the prefix 192.0.2.8/32 owned by node R8, the instruction
   associated with the SID is "forward the packet using all ECMP/UCMP interfaces and all ECMP/UCMP next-hop(s) along the shortest/usable path(s) towards R8". Because R2 is not the penultimate hop, R2
   applies the CONTINUE operation to the packet and sends it to R3 using
   one of the two links connected to R3 with top label 1008 as specified
   in <xref target="section-2.10.1"/>.</t>

	<t>
<!--[rfced] May we update the instruction in quote marks?
Specifically, is the intended meaning 'one or multiple
next-hops'? If so, see A below. If it should be 'all next-hops',
see B below. Please let us know which option you prefer.

A) "and a next-hop(s) along..." 
or 
B) "and all next-hops along..."

Original:
   Because the top label
   1008 corresponds to the IGP SID "8", which is the prefix-SID attached
   to the prefix 192.0.2.8/32 owned by the node R8, then the instruction
   associated with the SID is "send the packet using all ECMP interfaces
   and all next-hop(s) along the shortest path towards R8".
-->
   R3 receives the packet with top label 1008. Because top label
   1008 corresponds to the IGP SID "8", which is the prefix-SID attached
   to the prefix 192.0.2.8/32 owned by node R8, the instruction
   associated with the SID is "send the packet using all ECMP interfaces and all next-hop(s) along the shortest path towards R8". Because R3
   is the penultimate hop, we assume that R3 performs penultimate hop
   popping, which corresponds to the NEXT operation; the packet is then sent to 
   R8. The NEXT operation results in popping the outer label
   and sending the packet as a pure IPv4 packet to R8.</t>

	<t>
   In conclusion, the path followed by P1 is R1-R2--R3-R8.  The ECMP
   awareness ensures that the traffic is load-shared between any ECMP
   path; in this case, it's the two links between R2 and R3.</t>

	</section>

	<section title="Incoming Label Collision Examples" anchor="section-a.2"><t>

<!--[rfced] May we update this sentence for clarity? Since there are
more than a few examples, we suggest using 'several' examples.

Original:
   This section describes few examples to illustrate the handling of
   label collision described in Section 2.5.

Perhaps:
   This section outlines several examples that illustrate the handling of
   label collision, as described in Section 2.5.
-->
   This section describes few examples to illustrate the handling of
   label collision described in <xref target="section-2.5"/>.</t>

	<t>
   For the examples in this section, we assume that node A has the
   following:</t>

	<t><list style="symbols"><t>OSPF default admin distance for implementation=50</t>

	<t>ISIS default admin distance for implementation=60</t>

	</list>
	</t>

	<section title="Example 1" anchor="section-a.2.1"><t>
   Illustration of incoming label collision resolution for the same FEC
   type using MCC administrative distance.</t>

	<t>
   FEC1:</t>

	<t><list style="symbols">
<t> OSPF prefix SID advertisement from node B for 198.51.100.5/32 with index=5</t>

<t>OSPF SRGB on node A = [1000,1999]</t>

<t>Incoming label=1005</t>

	</list>
	</t>

	<t>
   FEC2:</t>

	<t><list style="symbols"><t>ISIS prefix SID advertisement from node C for 203.0.113.105/32
      with index=5</t>

	<t>ISIS SRGB on node A = [1000,1999]</t>

	<t>Incoming label=1005</t>

	</list>
	</t>

	<t>
   FEC1 and FEC2 both use dynamic SID assignment. 

<!--[rfced] Please clarify "neither of the FEC types is SR Policy". Is
the intended meaning that the FEC types are not a part of the SR
Policy? Note that there are two instances in the text.

Original:
   FEC1 and FEC2 both use dynamic SID assignment.  Since neither ofthe
   FEC types is SR Policy, we use the default admin distances of 50 and
   60 to break the tie.

Perhaps:
   FEC1 and FEC2 both use dynamic SID assignment.  Since neither of the
   FEC types are a part of the SR Policy, we use the default admin distances 
   of 50 and 60 to break the tie.
-->

   Since neither of the
   FEC types is SR Policy, we use the default admin distances of 50 and
   60 to break the tie.  So FEC1 wins.</t>

	</section>

	<section title="Example 2" anchor="section-a.2.2"><t>

<!--[rfced] In Examples 2-14 in Appendices A.2.2-A.2.14 and Examples
1-2 in Appendices A.3.1-A.3.2, may we update the lead-in
sentences to be complete sentences? Please let us know if this is
agreeable or if you prefer otherwise.

Original:
   Illustration of incoming label collision resolution for different FEC
   types using the MCC administrative distance.

Perhaps:
   The following example illustrates incoming label collision resolution 
   for different FEC types using the MCC administrative distance.
-->
   Illustration of incoming label collision resolution for different FEC
   types using the MCC administrative distance.</t>

	<t>
   FEC1:</t>

	<t><list style="symbols"><t>Node A receives an OSPF prefix SID advertisement from node B for
      198.51.100.6/32 with index=6</t>

	<t>OSPF SRGB on node A = [1000,1999]</t>

	<t>Hence, the incoming label on node A corresponding to
      198.51.100.6/32 is 1006</t>

	</list>
	</t>

	<t>
   FEC2:</t>


<!--[rfced] Please clarify the meaning of "towards one of its
neighbors".  Note that there are 2 more instances in the text.

Original:
   ISIS on node A assigns the label 1006 to the globally significant
   adj-SID (I.e. when advertised the "L" flag is clear in the adj-SID
   sub-TLV as described in [I-D.ietf-isis-segment-routing-extensions])
   towards one of its neighbors.
-->
	<t>
   ISIS on node A assigns label 1006 to the globally significant
   Adj-SID (i.e., when advertised, the "L" flag is clear in the Adj-SID
   sub-TLV as described in <xref target="RFC8667"/>)
   towards one of its neighbors. Hence, the incoming label corresponding
   to this Adj-SID is 1006. Assume node A allocates this Adj-SID
   dynamically, and it may differ across router reboots.</t>

	<t>
   FEC1 and FEC2 both use dynamic SID assignment.  Since neither of the
   FEC types is SR Policy, we use the default admin distances of 50 and
   60 to break the tie.  So FEC1 wins.</t>

	</section>

	<section title="Example 3" anchor="section-a.2.3"><t>
   Illustration of incoming label collision resolution based on
   preferring static over dynamic SID assignment.</t>

	<t>
   FEC1:</t>

	<t>
   OSPF on node A receives a prefix SID advertisement from node B for
   198.51.100.7/32 with index=7. Assuming that the OSPF SRGB on node A
   is [1000,1999], the incoming label corresponding to 198.51.100.7/32
   is 1007.</t>

	<t>
   FEC2:</t>

	<t>
   The operator on node A configures ISIS on node A to assign label
   1007 to the globally significant Adj-SID (i.e., when advertised, the
   "L" flag is clear in the Adj-SID sub-TLV as described in <xref target="RFC8667"/>) 
   towards one of its neighbor
   advertisements from node A with label=1007.</t>

	<t>
   Node A assigns this Adj-SID explicitly via configuration, so the Adj&nbhy;SID
   survives router reboots.</t>

	<t>
   FEC1 uses dynamic SID assignment, while FEC2 uses explicit SID
   assignment. So FEC2 wins.</t>

	</section>

	<section title="Example 4" anchor="section-a.2.4"><t>
   Illustration of incoming label collision resolution using FEC type
   default administrative distance.</t>

	<t>
   FEC1:</t>

	<t>
   OSPF on node A receives a prefix SID advertisement from node B for
   198.51.100.8/32 with index=8. Assuming that OSPF SRGB on node A =
   [1000,1999], the incoming label corresponding to 198.51.100.8/32  is
   1008.</t>

	<t>
   FEC2:</t>

	<t>
   Suppose the SR Policy advertisement from the controller to node A for the
   policy identified by (Endpoint = 192.0.2.208, color = 100) that
   consists of SID-List=&lt;S1, S2&gt; assigns the globally significant
   Binding-SID label 1008.</t>

	<t>
   From the point of view of node A, FEC1 and FEC2 both use dynamic SID
   assignment. Based on the default administrative distance outlined in
   <xref target="section-2.5.1"/>, the Binding SID has a higher administrative distance
   than the prefix-SID; hence, FEC1 wins.</t>

	</section>

	<section title="Example 5" anchor="section-a.2.5"><t>
   Illustration of incoming label collision resolution based on FEC type
   preference.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.110/32 with index=10. Assuming that the ISIS SRGB on node A
   is [1000,1999], the incoming label corresponding to 203.0.113.110/32
   is 1010.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A assigns label 1010 to the globally significant
   Adj-SID (i.e., when advertised, the "L" flag is clear in the Adj-SID
   sub-TLV as described in <xref target="RFC8667"/>)
   towards one of its neighbors.</t>

	<t>
   Node A allocates this Adj-SID dynamically, and it may differ across
   router reboots. Hence, both FEC1 and FEC2 both use dynamic SID
   assignment.</t>

	<t>
   Since both FECs are from the same MCC, they have the same default
   admin distance. So we compare the FEC type code points. FEC1 has FEC type
   code-point=120, while FEC2 has FEC type code-point=130. Therefore,
   FEC1 wins.</t>

	</section>

	<section title="Example 6" anchor="section-a.2.6"><t>
   Illustration of incoming label collision resolution based on address
   family preference.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.111/32 with index 11. Assuming that the ISIS SRGB on node A
   is [1000,1999], the incoming label on node A for 203.0.113.111/32 is
   1011.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node C for
   2001:DB8:1000::11/128 with index=11. Assuming that the ISIS SRGB on
   node A is [1000,1999], the incoming label on node A for
   2001:DB8:1000::11/128 is 1011.</t>

	<t>
   FEC1 and FEC2 both use dynamic SID assignment. Since both FECs are
   from the same MCC, they have the same default admin distance. So we
   compare the FEC type code points. Both FECs have FEC type code&nbhy;point=120.
   So we compare the address family. Since IPv4 is preferred over IPv6, FEC1
   wins.</t>

	</section>

	<section title="Example 7" anchor="section-a.2.7"><t>
   Illustration incoming label collision resolution based on prefix
   length.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.112/32 with index 12. Assuming that ISIS SRGB on node A is
   [1000,1999], the incoming label for 203.0.113.112/32 on node A is
   1012.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node C for
   203.0.113.128/30 with index 12. Assuming that the ISIS SRGB on node A
   is [1000,1999], the incoming label for 203.0.113.128/30 on node A is
   1012.</t>

	<t>
   FEC1 and FEC2 both use dynamic SID assignment. Since both FECs are
   from the same MCC, they have the same default admin distance. So we
   compare the FEC type code points.  Both FECs have FEC type code&nbhy;point=120.
   So we compare the address family.  Both are a part of the IPv4 address family, so we
   compare the prefix length.  FEC1 has prefix length=32, and FEC2 has
   prefix length=30, so FEC2 wins.</t>

	</section>

	<section title="Example 8" anchor="section-a.2.8"><t>
   Illustration of incoming label collision resolution based on the
   numerical value of the FECs.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.113/32 with index 13. Assuming that ISIS SRGB on node A is
   [1000,1999], the incoming label for 203.0.113.113/32 on node A
   is 1013.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node C for
   203.0.113.213/32 with index 13. Assuming that ISIS SRGB on node A is
   [1000,1999], the incoming label for 203.0.113.213/32 on node A
   is 1013.</t>

	<t>
   FEC1 and FEC2 both use dynamic SID assignment. Since both FECs are
   from the same MCC, they have the same default admin distance. So we
   compare the FEC type code points.  Both FECs have FEC type code&nbhy;point=120.
   So we compare the address family.  Both are a part of the IPv4 address family, so we
   compare the prefix length.  Prefix lengths are the same, so we compare
   the prefix. FEC1 has the lower prefix, so FEC1 wins.</t>

	</section>

	<section title="Example 9" anchor="section-a.2.9"><t>
   Illustration of incoming label collision resolution based on the routing
   instance ID.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.114/32 with index 14. Assume that this ISIS instance on
   node A has Routing Instance ID 1000 and SRGB [1000,1999]. Hence,
   the incoming label for 203.0.113.114/32 on node A is 1014.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node C for
   203.0.113.114/32 with index=14. Assume that this is another instance
   of ISIS on node A but routing Instance ID 2000 is different and
   SRGB [1000,1999] is the same. Hence, the incoming label for 203.0.113.114/32 on
   node A is 1014.</t>

	<t>
   These two FECs match all the way through the prefix length and
   prefix. So the Routing Instance ID breaks the tie, and FEC1 wins.</t>

	</section>

	<section title="Example 10" anchor="section-a.2.10"><t>
   Illustration of incoming label collision resolution based on the topology
   ID.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.115/32 with index=15. Assume that this ISIS instance on
   node A has Routing Instance ID 1000. Assume that the prefix
   advertisement of 203.0.113.115/32 was received in the ISIS Multi-topology
   advertisement with ID = 50. If the ISIS SRGB for this routing
   instance on node A is [1000,1999], then the incoming label of
   203.0.113.115/32 for topology 50 on node A is 1015.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node C for
   203.0.113.115/32 with index 15. Assume that it has the same routing
   Instance ID = 1000, but 203.0.113.115/32 was advertised with
   ISIS Multi-topology ID = 40, which is different. If the ISIS SRGB on node A is
   [1000,1999], then the incoming label of 203.0.113.115/32 for topology 40
   on node A is also 1015.</t>

	<t>
   Since these two FECs match all the way through the prefix length, prefix,
   and Routing Instance ID, we compare the ISIS Multi-topology ID, so FEC2
   wins.</t>

	</section>

	<section title="Example 11" anchor="section-a.2.11"><t>
   Illustration of incoming label collision for resolution based on
   the algorithm ID.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.116/32 with index=16. Assume that ISIS on node A has Routing
   Instance ID = 1000. Assume that node B advertised 203.0.113.116/32
   with ISIS Multi-topology ID = 50 and SR algorithm = 0. Assume that
   the ISIS SRGB on node A = [1000,1999]. Hence, the incoming label
   corresponding to this advertisement of 203.0.113.116/32 is 1016.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node C for
   203.0.113.116/32 with index=16. Assume that it is the same ISIS
   instance on node A with Routing Instance ID = 1000. Also assume that
   node C advertised 203.0.113.116/32 with ISIS Multi-topology ID = 50
   but with SR algorithm = 22. Since it is the same routing instance,
   the SRGB on node A = [1000,1999]. Hence, the incoming label
   corresponding to this advertisement of 203.0.113.116/32 by node C is
   also 1016.</t>

	<t>
   Since these two FECs match all the way through in terms of the prefix length, prefix,
   Routing Instance ID, and Multi-topology ID, we compare the SR
   algorithm IDs, so FEC1 wins.</t>

	</section>

	<section title="Example 12" anchor="section-a.2.12"><t>
   Illustration of incoming label collision resolution based on the FEC
   numerical value, independent of how the SID is assigned to the
   colliding FECs.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.117/32 with index 17. Assume that the ISIS SRGB on node A
   is [1000,1999]; thus, the incoming label is 1017.</t>

	<t>
   FEC2:</t>

	<t>
   Suppose there is an ISIS mapping server advertisement (SID / Label
   Binding TLV) from node D that has range = 100 and prefix = 203.0.113.1/32.
   Suppose this mapping server advertisement generates 100 mappings, one
   of which maps 203.0.113.17/32 to index 17.
   Assuming that it is the
   same ISIS instance, the SRGB is [1000,1999] and hence the
   incoming label for 1017.</t>

	<t>
   Even though FEC1 comes from a normal prefix SID advertisement and
   FEC2 is generated from a mapping server advertisement, it is not used as
   a tiebreaking parameter. Both FECs use dynamic SID assignment, are
   from the same MCC, and have the same FEC type code&nbhy;point=120. Their
   prefix lengths are the same as well.  FEC2 wins based on its lower
   numerical prefix value, since 203.0.113.17 is less than
   203.0.113.117.</t>

	</section>

	<section title="Example 13" anchor="section-a.2.13"><t>
   Illustration of incoming label collision resolution based on address
   family preference.</t>

	<t>
   FEC1:</t>

	<t>
   SR Policy advertisement from the controller to node A. Endpoint
   address=2001:DB8:3000::100, color=100, SID-List=&lt;S1, S2&gt;, and the
   Binding-SID label=1020.</t>

	<t>
   FEC2:</t>

<t>
SR Policy advertisement from controller to node A. Endpoint
address=192.0.2.60, color=100, SID-List=&lt;S3, S4&gt;, and the Binding-SID
label=1020.</t>

<t>The FEC tiebreakers match, and they have the
same FEC type code-point=140. Thus, FEC2 wins based on the IPv4 address family
being preferred over IPv6.</t>

	</section>

	<section title="Example 14" anchor="section-a.2.14"><t>
   Illustration of incoming label resolution based on the numerical value of
   the policy endpoint.</t>

	<t>
   FEC1:</t>

	<t>
   SR Policy advertisement from the controller to node A. Endpoint
   address=192.0.2.70, color=100, SID-List=&lt;S1, S2&gt;, and Binding-SID
   label=1021.</t>

	<t>
   FEC2:</t>

	<t>
   SR Policy advertisement from the controller to node A. Endpoint
   address=192.0.2.71, color=100, SID-List=&lt;S3, S4&gt;, and Binding-SID
   label=1021.</t>

	<t>
   The FEC tiebreakers match, and they have the
   same address family. Thus, FEC1 wins by having the lower numerical endpoint
   address value.</t>

	</section>

	</section>

	<section title="Examples for the Effect of Incoming Label Collision on an Outgoing Label" anchor="section-a.3"><t>
   This section presents examples to illustrate the effect of incoming
   label collision on the selection of the outgoing label as described in
   <xref target="section-2.6"/>.</t>

	<section title="Example 1" anchor="section-a.3.1"><t>
   Illustration of the effect of incoming label resolution on the
   outgoing label.</t>

	<t>
   FEC1:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node B for
   203.0.113.122/32 with index 22. Assuming that the ISIS SRGB on node A
   is [1000,1999], the corresponding incoming label is 1022.</t>

	<t>
   FEC2:</t>

	<t>
   ISIS on node A receives a prefix SID advertisement from node C for
   203.0.113.222/32 with index=22. Assuming that the ISIS SRGB on node A
   is [1000,1999], the corresponding incoming label is 1022.</t>

	<t>
<!-- [rfced] Please clarify the all-caps usage of "SWAP". 
Is it for emphasis or does it have a specific meaning,  
referring to an MPLS operation or otherwise?  If the latter, 
should it be defined in this document?

Current:
... installs a transit MPLS forwarding entry to SWAP incoming label 1022 ...

... installs a transit MPLS forwarding entry to SWAP incoming label=1023 ...
-->
   FEC1 wins based on the lowest numerical prefix value.  This means that
   node A installs a transit MPLS forwarding entry to SWAP incoming
   label 1022 with outgoing label N and to use outgoing interface I. N is
   determined by the index associated with FEC1 (index 22) and the SRGB
   advertised by the next-hop node on the shortest path to reach
   203.0.113.122/32.</t>

	<t>
   Node A will generally also install an imposition MPLS forwarding
   entry corresponding to FEC1 for incoming prefix=203.0.113.122/32
   pushing outgoing label N, and using outgoing interface I.</t>

	<t>
   The rule in <xref target="section-2.6"/> means node A MUST NOT install an ingress
   MPLS forwarding entry corresponding to FEC2 (the losing FEC, which
   would be for prefix 203.0.113.222/32).</t>

	</section>

	<section title="Example 2" anchor="section-a.3.2"><t>
   Illustration of the effect of incoming label collision resolution on
   outgoing label programming on node A.</t>

	<t>
   FEC1:</t>

	<t><list style="symbols"><t>SR Policy advertisement from the controller to node A</t>

	<t>Endpoint address=192.0.2.80, color=100, SID-List=&lt;S1, S2&gt;</t>

	<t>Binding-SID label=1023</t>

	</list>
	</t>

	<t>
   FEC2:</t>

	<t><list style="symbols"><t>SR Policy advertisement from controller to node A</t>

	<t>Endpoint address=192.0.2.81, color=100, SID-List=&lt;S3, S4&gt;</t>

	<t>Binding-SID label=1023</t>

	</list>
	</t>

	<t>
   FEC1 wins by having the lower numerical endpoint address value. This
   means that node A installs a transit MPLS forwarding entry to SWAP
   incoming label=1023 with outgoing labels, and the outgoing interface
   is determined by the SID-List for FEC1.</t>

	<t>
   In this example, we assume that node A receives two BGP/VPN routes:</t>

<!--[rfced] Please review whether the commas following 'color=100' are
necessary or if they should be removed.

Orignal:
   o  R1 with VPN label=V1, BGP next-hop = 192.0.2.80, and color=100,

   o  R2 with VPN label=V2, BGP next-hop = 192.0.2.81, and color=100,
-->

	<t><list style="symbols"><t>R1 with VPN label=V1, BGP next-hop = 192.0.2.80, and color=100,</t>

	<t>R2 with VPN label=V2, BGP next-hop = 192.0.2.81, and color=100,</t>

	</list>
	</t>

	<t>
   We also assume that node A has a BGP policy that matches color=100
   and allows its usage as Service Level Agreement (SLA) steering information. In this case,
   node A will install a VPN route with label stack = &lt;S1,S2,V1&gt;
   (corresponding to FEC1).</t>

	<t>
   The rule described in <xref target="section-2.6"/> means that node A MUST NOT install
   a VPN route with label stack = &lt;S3,S4,V1&gt; (corresponding to FEC2.)</t>

	</section>

	</section>

	</section>

	<section title="Acknowledgements" anchor="section-7" numbered='no'><t>
   The authors would like to thank Les Ginsberg, Chris Bowers, Himanshu
   Shah, Adrian Farrel, Alexander Vainshtein, Przemyslaw Krol, Darren
   Dukes, Zafar Ali, and Martin Vigoureux for their valuable comments on
   this document.</t>

	</section>

	<section title="Contributors" anchor="section-6" numbered='no'><t>
   The following contributors have substantially helped the definition
   and editing of the content of this document:</t>

	<figure><artwork><![CDATA[
Martin Horneffer
Deutsche Telekom
Email: Martin.Horneffer@telekom.de

Wim Henderickx
Nokia
Email: wim.henderickx@nokia.com

Jeff Tantsura
Email: jefftant@gmail.com

Edward Crabbe
Email: edward.crabbe@gmail.com

Igor Milojevic
Email: milojevicigor@gmail.com

Saku Ytti
Email: saku@ytti.fi]]></artwork>
	</figure>
	</section>

<!-- [rfced] Throughout the text, the following terminology appears to be used 
inconsistently. Please review these occurrences and let us know if/how they
may be made consistent.  

A is [1000,1999] vs. A = [1000,1999]

index=X vs. index X vs. index "X"

label=X vs. label = X

  (where X is the value)

routing Instance ID = 1000 vs. Routing Instance ID 1000

SID "8" vs. SID index "8" vs.  SID index 8 vs. IGP SID "8"

SRGB is [1000,1999] vs. SRGB [1000,1999] 
-->



	</back>

	</rfc>
	
