<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>

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

  <front>
    <title abbrev="MS-PW Explicit Routing">Explicit Path Routing for Dynamic
    Multi-Segment Pseudowires</title>

    <author fullname="Pranjal Kumar Dutta" initials="P." surname="Dutta">
      <organization>Alcatel-Lucent</organization>
      <address>
        <postal>
          <street>701 E. Middlefield Road</street>
          <city>Mountain View</city>
          <region>California</region>
          <code>94043</code>
          <country>United States</country>
        </postal>
        <email>pranjal.dutta@alcatel-lucent.com</email>
      </address>
    </author>

    <author fullname="Matthew Bocci" initials="M." surname="Bocci">
      <organization>Alcatel-Lucent</organization>
      <address>
        <postal>
          <street>Voyager Place, Shoppenhangers Road</street>
          <city>Maidenhead</city>
          <region>Berks</region>
          <code>SL6 2PJ</code>
          <country>United Kingdom</country>
        </postal>
        <email>matthew.bocci@alcatel-lucent.com</email>
      </address>
    </author>

    <author fullname="Luca Martini" initials="L." surname="Martini">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>9155 East Nichols Avenue, Suite 400</street>
          <city>Englewood</city>
          <region>Colorado</region>
          <code>80112</code>
          <country>United States</country>
        </postal>
        <email>lmartini@cisco.com</email>
      </address>
    </author>

    <date month="November" year="2014" />

    <abstract>
      <t>When set up through an explicit path, dynamic Multi-Segment
      Pseudowires (MS-PWs) may be required to provide a simple solution for
      1:1 protection with diverse primary and backup MS-PWs for a service,
      or to enable controlled signaling (strict or loose) for special MS-PWs.
      This document specifies the extensions and procedures required to
      enable dynamic MS-PWs to be established along explicit paths.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>Procedures for dynamically establishing Multi-Segment Pseudowires
      (MS-PWs), where their paths are automatically determined using a dynamic
      routing protocol, are defined in <xref target="RFC7267"></xref>. For 1:1
      protection of MS-PWs with primary and backup paths, MS-PWs need to be
      established through a diverse set of Switching Provider Edges (S-PEs) to
      avoid any single points of failure at the PW level. <xref
      target="RFC7267"></xref> allows this through BGP-based mechanisms. This
      document defines an additional mechanism that allows Source Terminating
      Provider Edges (ST-PEs) to explicitly choose the path that a PW would
      take through the intervening S-PEs. Explicit path routing of dynamic
      MS-PWs may also be required for controlled setup of dynamic MS-PWs and
      network resource management.</t>

      <t>Note that in many deployments the ST-PE will not have a view of the
      topology of S-PEs and so the explicit route will need to be supplied
      from a management application. How that management application
      determines the explicit route is outside the scope of this document.</t>

      <t></t>
    </section>

    <section title="Requirements Language and Terminology">

      <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"></xref>.</t>

      <t>This document uses the terminology defined in <xref
      target="RFC7267"></xref>, <xref target="RFC4447"></xref>, and
      <xref target="RFC5036"></xref>.</t>

      <t>The following additional terminology is used:</t>

      <t><list style="hanging">
          <t hangText="Abstract Node:">A group of nodes (S-PEs) representing
          an explicit hop along the path of an MS-PW. An abstract node is
          identified by an IPv4, IPv6, or S-PE address.</t>
        </list></t>
    </section>

    <section title="Explicit Path in MS-PW Signaling">
      <t>This section describes the Label Distribution Protocol (LDP)
      extensions required for signaling explicit paths in dynamic MS-PW setup
      messages. An explicitly routed MS-PW is set up using a Label Mapping
      message that carries an ordered list of the S-PEs that the MS-PW is
      expected to traverse. The ordered list is encoded as a series of
      Explicit Route Hop TLVs (ER-Hop TLVs) encoded in an ER-TLV that is
      carried in a Label Mapping message.</t>

      <section anchor="s-pe-addr" title="S-PE Addressing">
        <t>An S-PE address is used to identify a given S-PE among the set of
        S-PEs belonging to the Packet Switched Networks (PSNs) that may be
        used by an MS-PW. Each S-PE MUST be assigned an address as specified
        in Section 3.2 of <xref target="RFC7267"></xref>. An S-PE that is
	capable of dynamic MS-PW
        signaling, but has not been assigned an S-PE address, and that
        receives a Label Mapping message for a dynamic MS-PW MUST follow
        the procedures in Section 3.2 of <xref target="RFC7267"></xref>.</t>
      </section>

      <section anchor="er-tlv" title="Explicit Route TLV (ER-TLV)">
        <t>The ER-TLV specifies the path to be taken by the MS-PW being
        established. Each hop along the path is represented by an abstract
        node, which is a group of one or more S-PEs, identified by an IPv4,
        IPv6, or S-PE address. The ER-TLV format is as per Section 4.1 of
        <xref target="RFC3212"></xref>.</t>

        <t>The ER-TLV contains one or more ER-Hop TLVs as defined
        in <xref target="hop-tlv"></xref>.</t>
      </section>

      <section anchor="hop-tlv" title="Explicit Route Hop TLV (ER-Hop TLV)">
        <t>The contents of an ER-TLV are a series of variable-length ER-Hop
        TLVs. Each hop contains the identification of an "abstract node"
        that represents the hop to be traversed. The ER-Hop TLV format is
        as specified in Section 4.2 of <xref target="RFC3212"></xref>.</t>

        <t><xref target="RFC3212"></xref> defines four ER-Hop TLV
        Types: IPv4 Prefix, IPv6 Prefix, Autonomous System Number,
        and LSP-ID. This document specifies the following new
        ER&nbhy;Hop TLV Type:</t>

        <t><figure title="ER-Hop TLV">
            <artwork><![CDATA[  
         Value  Type
         ------ --------------------------------
         0x0805 L2 PW Address of Switching Point
]]></artwork>
          </figure></t>

        <t>Details of the ER-Hop semantics are defined in <xref
        target="ERHopSemantics"></xref>.</t>
      </section>

      <section anchor="ERHopSemantics" title="ER-Hop Semantics">
        <t>This section describes the various semantics associated with
        the ER&nbhy;Hop TLV.</t>

        <section title="ER-Hop Type: IPv4 Prefix">
          <t>The semantics of the IPv4 ER-Hop TLV Type are specified in <xref
          target="RFC3212"></xref>, Section 4.7.1.</t>
        </section>

        <section title="ER-Hop Type: IPv6 Prefix">
          <t>The semantics of the IPv6 ER-Hop TLV Type are specified in <xref
          target="RFC3212"></xref>, Section 4.7.2.</t>
        </section>

        <section title="ER-Hop Type: L2 PW Address">
          <t>The semantics of the L2 PW Address ER-Hop TLV Type, which
          contains the L2 PW Address derived from the Generalized PWid 
          Forwarding Equivalence Class (FEC) AII Type 2 structure as
          defined in <xref target="RFC5003"></xref>, are as follows.</t>

          <t><figure>
              <artwork><![CDATA[    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |U|F|      ER-Hop Type          |      Length = 18              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |L|             Reserved                        |    PreLen     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  AII Type=02  |    Length     |        Global ID              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Global ID (contd.)      |        Prefix                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Prefix (contd.)         |        AC ID                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      AC ID                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   U/F
         These bits MUST be set to zero and the procedures of 
         [RFC5036] followed when the TLV is not known to the 
         receiving node.

   Type
         A fourteen-bit field carrying the value of the ER-Hop 3, 
         L2 PW Address, Value = 0x0805.

   Length
         Specifies the length of the value field in bytes = 18.

   L Bit
         Set to indicate a loose hop.
         Cleared to indicate a strict hop.

   Reserved
         Zero on transmission.  Ignored on receipt.

   PreLen
         Prefix Length 1-96 (including the length of the Global ID, 
         Prefix, and AC ID fields).

   All other fields (AII Type, Length, Global ID, Prefix, and AC ID) 
   define the L2 PW Address and are to be set and interpreted as 
   defined in Section 3.2 of [RFC5003].
]]></artwork>
            </figure></t>
        </section>
      </section>
    </section>

    <section title="Explicit Route TLV Processing">
      <t></t>

      <section anchor="nexthopselection" title="Next-Hop Selection">
        <t>A PW Label Mapping message containing an Explicit Route TLV
        specifies the next hop for a given MS-PW path. Selection of this next
        hop by the ST-PE or S-PE inserting the ER&nbhy;Hop TLV may involve a
        selection from a set of possible alternatives. The mechanism for
        making a selection from this set is implementation specific and is
        outside the scope of this document. The mechanism used to select a
        particular path is also outside the scope of this document, but
        each node MUST determine a loop-free path if it is to signal the
        MS-PW. <xref target="RFC6073"></xref>, Section 7.6 provides a mechanism
        by which a node can check that the path taken by an MS-PW does not
        include loops.</t>

        <t>As noted in <xref target="intro"/>, in many deployments the
        ST-PE will not have a view of the topology of S-PEs and so the path
        will need to be supplied from a management application.</t>

        <t>If a loop-free path cannot be found by an ST-PE or S-PE, then a
        node MUST NOT attempt to signal the MS-PW. For an S-PE, if it cannot
        determine a loop-free path, then the received Label Mapping message
        MUST be released with a status code of "PW Loop Detected" as per
        Section 4.2.3 of <xref target="RFC7267"></xref>.</t>

        <t>To determine the next hop for the MS-PW path, a node performs the
        following steps. Note that these procedures assume that a valid S-PE
        address has been assigned to the node, as per <xref
        target="s-pe-addr"></xref>, above.</t>

        <t><list style="numbers">
            <t>The node receiving the Label Mapping message that contains an
            ER&nbhy;TLV MUST evaluate the first ER-Hop. &nbsp;If
            the L bit is not
            set in the first ER-Hop and if the node is not part of the
            abstract node described by the first ER-Hop (i.e., it does not
            lie within the prefix as determined by the prefix length
            specified in the ER-Hop TLV), it has received the message
            in error. Therefore, the node MUST reply with a Label Release
            message with a "Bad Initial ER-Hop Error" (0x04000004) status
            code. If the L bit is set and the local node is not part of the
            abstract node described by the first ER-Hop, the node selects a
            next hop that is along the path to the abstract node described
            by the first ER-Hop. &nbsp;If there is no ER-Hop TLV contained in
            the ER-TLV, the message is also in error, and the node SHOULD
            return a "Bad Explicit Routing TLV Error" (0x04000001) status code
            in a Label Release message sent to the upstream node. Note that
            this statement does not preclude a Label Mapping message with
            no ER-TLV. If a Label Mapping message with no ER-TLV is received,
            then it MUST be processed as per <xref
            target="RFC7267"></xref>.</t>

            <t>If there are no further ER-Hop TLVs following the first ER-Hop
            TLV, this indicates the end of the explicit route. The Explicit
            Route TLV MUST be removed from the Label Mapping message. This
            node may or may not be the end of the PW. Processing continues as
            per <xref target="AddingERHops"></xref>, where a new Explicit
            Route TLV MAY be added to the Label Mapping message.</t>

            <t>If a second ER&nbhy;Hop TLV does exist, and the node is also a
            part of the abstract node described by the second ER-Hop, then
            the node deletes the first ER-Hop and continues processing with
            step 2, above. Note that this makes the second ER-Hop into the
            first ER-Hop for the iteration for the next PW segment.</t>

            <t>The node determines if it is topologically adjacent to the
            abstract node described by the second ER-Hop. &nbsp;That is, it is
            directly connected to the next node by a PW control-plane
            adjacency. If so, the node selects a particular next hop that is
            a member of the abstract node. The node then deletes the first
            ER-Hop and continues processing as per <xref
            target="AddingERHops"></xref>, below.</t>

            <t>Next, the node selects a next hop within the abstract node of
            the first ER-Hop that is along the path to the abstract node of
            the second ER-Hop. &nbsp;If no such path exists, then there are two
            cases:<list style="letters">
                <t>If the second ER-Hop is a strict ER Hop, then there is an
                error, and the node MUST return a Label Release message to the
                upstream node with a "Bad Strict Node Error" (0x04000002)
                status code.</t>

                <t>Otherwise, if the second ER-Hop is a loose ER Hop, then the
                node selects any next hop that is along the path to the next
                abstract node. If no path exists within the MPLS domain, then
                there is an error, and the node MUST return a Label Release
                message to the upstream node with a "Bad Loose Node Error"
                (0x04000003) status code.</t>
              </list></t>

            <t>Finally, the node replaces the first ER-Hop with any ER Hop
            that denotes an abstract node containing the next hop. This is
            necessary so that when the explicit route is received by the next
            hop, it will be accepted.</t>

            <t>Progress the Label Mapping message to the next hop.</t>
          </list></t>
      </section>

      <section anchor="AddingERHops"
               title="Adding ER Hops to the Explicit Route TLV">
        <t>After selecting a next hop, the node MAY alter the explicit route
        in the following ways.</t>

        <t>If, as part of executing the algorithm in <xref
        target="nexthopselection"></xref>, the Explicit Route TLV is removed,
        then the node MAY add a new Explicit Route TLV.</t>

        <t>Otherwise, if the node is a member of the abstract node for the
        first ER-Hop, then a series of ER Hops MAY be inserted before the
        First ER Hop or the first ER-Hop MAY be replaced. Each ER Hop in this
        series MUST denote an abstract node that is a subset of the current
        abstract node.</t>

        <t>Alternately, if the first ER-Hop is a loose ER Hop, an arbitrary
        series of ER Hops MAY be inserted prior to the first ER-Hop.</t>
      </section>
    </section>

    <section title="IANA Considerations">
      <t>RFC 5036 <xref target="RFC5036"></xref> defines the LDP TLV
      name space, which is maintained by IANA, in the LDP "TLV Type Name
      Space" registry. TLV types for the Explicit Route TLV, the
      IPv4 Prefix ER-Hop TLV, and the IPv6 Prefix ER-Hop TLV are
      already defined in this registry.</t>

      <t>IANA has assigned a further code point from the IETF
      consensus portion of this registry as follows:</t>

      <t><figure>
          <artwork><![CDATA[   TLV Type                               Value   Reference
   ------------------------------------   ------  -------------
   L2 PW Address of Switching Point       0x0805  This Document
]]></artwork>
        </figure></t>

      <t></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document introduces no new security considerations
      beyond those discussed in <xref target="RFC5036"></xref>,
      <xref target="RFC4447"></xref>, and <xref target="RFC7267"></xref>.
      The security considerations detailed in those documents
      apply to the protocol extensions described in this RFC.</t>

      <t>As with <xref target="RFC7267"></xref>, it should be noted that the
      path selection mechanisms specified in this document enable the network
      to automatically select the S-PEs that are used to forward packets on
      the MS-PW. Appropriate tools, such as the Virtual Circuit Connectivity
      Verification (VCCV) trace mechanisms specified in <xref
      target="RFC6073"></xref>, can be used by an operator of the network to
      verify the path taken by the MS-PW and therefore be satisfied that the
      path does not represent an additional security risk.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">

<reference anchor='RFC2119' target="http://www.rfc-editor.org/info/rfc2119">
<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
</author>
<date year='1997' month='March' />
</front>
<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
</reference>

<reference anchor='RFC3212' target="http://www.rfc-editor.org/info/rfc3212">
<front>
<title>Constraint-Based LSP Setup using LDP</title>
<author initials='B.' surname='Jamoussi' fullname='B. Jamoussi'>
<organization /></author>
<author initials='L.' surname='Andersson' fullname='L. Andersson'>
<organization /></author>
<author initials='R.' surname='Callon' fullname='R. Callon'>
<organization /></author>
<author initials='R.' surname='Dantu' fullname='R. Dantu'>
<organization /></author>
<author initials='L.' surname='Wu' fullname='L. Wu'>
<organization /></author>
<author initials='P.' surname='Doolan' fullname='P. Doolan'>
<organization /></author>
<author initials='T.' surname='Worster' fullname='T. Worster'>
<organization /></author>
<author initials='N.' surname='Feldman' fullname='N. Feldman'>
<organization /></author>
<author initials='A.' surname='Fredette' fullname='A. Fredette'>
<organization /></author>
<author initials='M.' surname='Girish' fullname='M. Girish'>
<organization /></author>
<author initials='E.' surname='Gray' fullname='E. Gray'>
<organization /></author>
<author initials='J.' surname='Heinanen' fullname='J. Heinanen'>
<organization /></author>
<author initials='T.' surname='Kilty' fullname='T. Kilty'>
<organization /></author>
<author initials='A.' surname='Malis' fullname='A. Malis'>
<organization /></author>
<date year='2002' month='January' />
</front>
<seriesInfo name='RFC' value='3212' />
</reference>

<reference anchor='RFC4447' target="http://www.rfc-editor.org/info/rfc4447">
<front>
<title>Pseudowire Setup and Maintenance Using the Label Distribution Protocol (LDP)</title>
<author initials='L.' surname='Martini' fullname='L. Martini'>
<organization /></author>
<author initials='E.' surname='Rosen' fullname='E. Rosen'>
<organization /></author>
<author initials='N.' surname='El-Aawar' fullname='N. El-Aawar'>
<organization /></author>
<author initials='T.' surname='Smith' fullname='T. Smith'>
<organization /></author>
<author initials='G.' surname='Heron' fullname='G. Heron'>
<organization /></author>
<date year='2006' month='April' />
</front>
<seriesInfo name='RFC' value='4447' />
</reference>

<reference anchor='RFC5003' target="http://www.rfc-editor.org/info/rfc5003">
<front>
<title>Attachment Individual Identifier (AII) Types for Aggregation</title>
<author initials='C.' surname='Metz' fullname='C. Metz'>
<organization /></author>
<author initials='L.' surname='Martini' fullname='L. Martini'>
<organization /></author>
<author initials='F.' surname='Balus' fullname='F. Balus'>
<organization /></author>
<author initials='J.' surname='Sugimoto' fullname='J. Sugimoto'>
<organization /></author>
<date year='2007' month='September' />
</front>
<seriesInfo name='RFC' value='5003' />
</reference>

<reference anchor='RFC5036' target="http://www.rfc-editor.org/info/rfc5036">
<front>
<title>LDP Specification</title>
<author initials='L.' surname='Andersson' fullname='L. Andersson'>
<organization /></author>
<author initials='I.' surname='Minei' fullname='I. Minei'>
<organization /></author>
<author initials='B.' surname='Thomas' fullname='B. Thomas'>
<organization /></author>
<date year='2007' month='October' />
</front>
<seriesInfo name='RFC' value='5036' />
</reference>

<reference anchor='RFC6073' target="http://www.rfc-editor.org/info/rfc6073">
<front>
<title>Segmented Pseudowire</title>
<author initials='L.' surname='Martini' fullname='L. Martini'>
<organization /></author>
<author initials='C.' surname='Metz' fullname='C. Metz'>
<organization /></author>
<author initials='T.' surname='Nadeau' fullname='T. Nadeau'>
<organization /></author>
<author initials='M.' surname='Bocci' fullname='M. Bocci'>
<organization /></author>
<author initials='M.' surname='Aissaoui' fullname='M. Aissaoui'>
<organization /></author>
<date year='2011' month='January' />
</front>
<seriesInfo name='RFC' value='6073' />
</reference>

<reference anchor='RFC7267' target="http://www.rfc-editor.org/info/rfc7267">
<front>
<title>Dynamic Placement of Multi-Segment Pseudowires</title>
<author initials='L.' surname='Martini' fullname='L. Martini'>
<organization /></author>
<author initials='M.' surname='Bocci' fullname='M. Bocci'>
<organization /></author>
<author initials='F.' surname='Balus' fullname='F. Balus'>
<organization /></author>
<date year='2014' month='June' />
</front>
<seriesInfo name='RFC' value='7267' />
</reference>

    </references>

<!-- [rfced] Section title will be corrected during post-xml2rfc
processing. -->

    <section title="Acknowledgements">
      <t>The authors gratefully acknowledge the contribution of the
      RFC 3212 <xref target="RFC3212"></xref> authors for the specification
      of the ER TLV and the ER-Hop TLV, which are reused by this document.
      The authors also gratefully acknowledge the input of Lizhong Jin.</t>
    </section>

  </back>
</rfc>
