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

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
    There has to be one entity for each item to be referenced. 
    An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4448 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4448.xml">
<!ENTITY RFC4664 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4664.xml">
<!ENTITY RFC4684 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4684.xml">
<!ENTITY RFC8214 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8214.xml">
<!ENTITY RFC6074 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6074.xml">
<!ENTITY RFC6624 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6624.xml">
<!ENTITY RFC8077 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8077.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-brissette-bess-evpn-vpws-seamless-04" ipr="trust200902">
 <!-- category values: std, bcp, info, exp, and historic
    ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
       or pre5378Trust200902
    you can add the attributes updates="NNNN" and obsoletes="NNNN" 
    they will automatically be output with "(if approved)" -->

 <!-- ***** FRONT MATTER ***** -->

 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the 
        full title is longer than 39 characters -->

   <title abbrev="EVPN-VPWS Seamless Integration">EVPN-VPWS Seamless Integration with L2VPN VPWS</title>

   <!-- add 'role="editor"' below for the editors if appropriate -->

   <!-- Another author who claims to be an editor -->

   <author fullname="Patrice Brissette" initials="P." 
           surname="Brissette">
     <organization>Cisco Systems</organization>
     <address>
       <email>pbrisset@cisco.com</email>
     </address>
   </author>

  <author fullname="Ali Sajassi" initials="A." 
           surname="Sajassi">
     <organization>Cisco Systems</organization>
     <address>
       <email>sajassi@cisco.com</email>
     </address>
   </author>

  <author fullname="Luc Andre Burdet" initials="LA." 
           surname="Burdet">
     <organization>Cisco Systems</organization>
     <address>
       <email>lburdet@cisco.com</email>
     </address>
   </author>

  <author fullname="Wen Lin" initials="W." 
           surname="Lin">
     <organization>Juniper</organization>
     <address>
       <email>wlin@juniper.com</email>
     </address>
   </author>

    <author fullname="J. Rabadan" initials="J." 
           surname="Rabadan">
     <organization>Nokia</organization>
     <address>
       <email>jorge.rabadan@nokia.com</email>
     </address>
   </author>

  <author fullname="James Uttaro" initials="J." 
           surname="Uttaro">
     <organization>ATT</organization>
     <address>
       <email>uttaro@att.com</email>
     </address>
   </author>

  <author fullname="Daniel Voyer" initials="D." 
           surname="Voyer">
     <organization>Bell Canada</organization>
     <address>
       <email>daniel.voyer@bell.ca</email>
     </address>
   </author>

   <author fullname="Iman Ghamari" initials="I." 
           surname="Ghamari">
     <organization>Linkedin</organization>
     <address>
       <email>iman@linkedin.com</email>
     </address>
   </author>
 
    <author fullname="Edward Leyton" initials="E." 
           surname="Leyton">
     <organization>Verizon Wireless</organization>
     <address>
       <email>edward.leyton@verizonwireless.com</email>
     </address>
   </author>

    <author fullname="Bin Wen" initials="B." 
           surname="Wen">
     <organization>Comcast</organization>

     <address>
       <email>bin_wen@comcast.com</email>
     </address>
   </author>

    <author fullname="Voitek Kozak" initials="V." 
           surname="Kozak">
     <organization>Comcast</organization>

     <address>
       <email>voitek_kozak@comcast.com</email>
     </address>
   </author>

   <date year="2021" />

   <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
        in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

   <!-- Meta-data Declarations -->

   <area>Routing</area>

   <workgroup>BESS Working Group</workgroup>

   <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>EVPN-VPWS</keyword>
   <keyword>EVPN</keyword>
   <keyword>VPWS</keyword>
   <keyword>Interoperability</keyword>

   <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. -->

   <abstract>
     <t> This document presents a solution for migrating L2VPN Virtual Private Wire Service (VPWS) to 
     Ethernet VPN Virtual Private Wire Service (EVPN-VPWS) services. The solution allows
     the coexistence of EVPN and L2VPN services under the same point-to-point <!--or multipoint--> 
     VPN instance. By using this seamless integration solution, a service provider can introduce EVPN into their existing
     L2VPN network or migrate from an existing L2VPN based network to
     EVPN. The migration may be done per pseudowire or flexible-crossconnext (FXC) service basis.
     This document specifies control-plane and forwarding behaviors.</t>
     <!-- In addition, this document also extends
   the existing seamless integration for multipoint Ethernet VPN service with all-active multihoming support.-->
   </abstract>
   <note title="Requirements Language">
      <t> The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref target="RFC2119">RFC 2119</xref>
      and <xref target="RFC8174">RFC 8174</xref>.
      </t>
    </note>
 </front>

 <middle>
   <section title="Introduction">
   <t>
   Point-to-point L2VPN solutions are specified in <xref target="RFC8077"/> 
   when LDP-based pseudowire are offered.
   BGP-based L2VPN service may also offer point-to-point service using 
   <xref target="RFC6624"/> or by setting up 
   auto-discovered VPN members using <xref target="RFC6074"/> and then
  the pseudowires using <xref target="RFC8077"/>.
   </t>
   <t>
   EVPN-VPWS leverages the latest EVPN technology and brings extra
   functions to Layer 2 point-to-point Ethernet service, such as all-active redundancy,
   load balancing and mass withdrawal.  All-active
   redundancy also makes it easier to achieve fast convergence on an
   access link or node failure.
   </t>
   <t>
   When expanding an existing L2VPN network with Ethernet encapsulation,
   a service provider may want to deploy EVPN-VPWS to provide additional
   Layer 2 point-to-point Ethernet services, and at the same time some
   of the customer traffic may still need to be terminated on the
   existing L2VPN PEs within the service provider network.
   </t>
   <t>
   This document describes a seamless-integration solution that allows
   the co-existence of L2VPN point-to-point Ethernet services and
   EVPN-VPWS procedure per <xref target="RFC8214"/>
   under the same VPN network and over the same MPLS/IP network.
   Service providers may also use the seamless integration solution to
   migrate traditional L2VPN network to EVPN-VPWS based network.
   </t>

     <figure align="center" anchor="Seamless">
       <artwork align="left"><![CDATA[

                  MPLS/IP Core
               +---------------+
      +---+    |               |   +---+
      |PE1|----|----- PW1 -----|---|PE2| L2VPN VPWS
      |   |----|---+           |   +---+
      +---+    |   |           |
   EVPN-VPWS & |   +--PW2---+  |   +---+
   L2VPN VPWS  |            +--|---|PE3| EVPN-VPWS
   (Composite) |               |   +---+
               +---------------+
           ]]></artwork>
      <postamble>Seamless Integration of EVPN-VPWS.</postamble>
     </figure>

     <t> <xref target="Seamless"/> shows a network where PE1 runs in hybrid mode (EVPN-VPWS and
     legacy L2VPN VPWS). PE1 has established a pseudowire (PW1) with PE2 running L2VPN VPWS. 
     Also, it has initiated another pseudowire (PW2) with PE3 running EVPN-VPWS. In the future,
     PE2 may be upgraded to EVPN-VPWS seamlessly. 

     The seamless integration solution described in this document has the
     following attributes:</t>

     <t>- It is backward compatible with <xref target="RFC8214"/> and EVPN Flexible
     crossconnect service <xref target="I-D.ietf-bess-evpn-vpws-fxc"/> documents.</t>

     <t>- New PEs can leverage the multi-homing mechanisms and provisioning simplifications
     of EVPN Ethernet-Segment framework:</t>
     <t><list style="letters">
      <t>Auto-sensing of MHN / MHD </t>
      <t>Auto-discovery of redundancy groups </t>
      <t>Auto-election of Designated Forwarder and VLAN carving </t>
      <t>Support of various load-balancing modes such as port-active, single-active and all-active</t>
     </list></t>

     <figure align="center" anchor="SeamlessMigration">
       <artwork align="left"><![CDATA[

                  MPLS/IP Core
               +---------------+
      +---+    |               |   +---+
      |PE1|----|----- PW1 -----|---|PE2|
      +---+    |     L2VPN     |   +---+
      L2VPN   |               |   L2VPN
      VPWS     +---------------+   VPWS
                     ...
               +---------------+
      +---+    |               |   +---+
      |PE1|----|----- PW1 -----|---|PE2|
      +---+    |     L2VPN     |   +---+
      L2VPN   |               |    L2VPN VPWS
      VPWS     +---------------+   + EVPN-VPWS
                     ....
               +---------------+
      +---+    |               |   +---+
      |PE1|----|----- PW1 -----|---|PE2|
      +---+    |   EVPN-VPWS   |   +---+
    L2VPN VPWS |               |    L2VPN VPWS
   + EVPN-VPWS +---------------+   + EVPN-VPWS
                     ....
               +---------------+
      +---+    |               |   +---+
      |PE1|----|----- PW1 -----|---|PE2|
      +---+    |   EVPN-VPWS   |   +---+
     EVPN-VPWS |               |   EVPN-VPWS
               +---------------+
           ]]></artwork>
      <postamble>Migration from L2VPN to EVPN-VPWS.</postamble>
     </figure>

     <t> <xref target="SeamlessMigration"/> illustrates the migration of a L2VPN 
     VPWS brownfield network to EVPN-VPWS.
     For example, let say initially PE1 and PE2 have a L2VPN PW established between 
     them. First, a network
     operator may upgrade PE2 to enable EVPN-VPWS. Once upgraded, PE2
     which now has the EVPN-VPWS capability still runs L2VPN PW
     with PE1.  Later on, a network operator may decide to upgrade PE1 to
     support EVPN-VPWS. As soon as the upgrade is completed, PE1 and PE2 
     auto-discover their respective EVPN routes and the corresponding 
     point-to-point service. That EVPN-VPWS service taked higher precedence 
     over existing legacy L2VPN pseudowire. Finally, the network
     operator may safely remove any legacy configurations from PE1 and PE2 nodes while 
     PW remains established using EVPN-VPWS.</t>
   </section>

   <section title="Terms and Abbreviations">
     <t><list style="symbols">
       <t>CE:  A Customer Edge device, e.g., a host, router, or switch.</t>

       <t>DF:  EVPN Ethernet Segment Designated Forwarder.</t>

       <t>NDF: EVPN Ethernet Segment Non-Designated Forwarder.</t>

       <t>Ethernet Segment (ES): Refers to the set of Ethernet links that connects a customer site
       (device or network) to one or more PEs.</t>

       <t>Ethernet Tag: An Ethernet Tag identifies a particular pseudowire, e.g. a PW-ID as
       per <xref target="RFC8214"/>.</t>

       <t>FEC: Forwarding Equivalence Class.</t>

       <t>homogeneous PEs: Refers to PEs that are of the same types.</t>

       <t>LDP-LM: LDP Label Mapping Message.</t>

       <t>LDP-LW: LDP Label Withdraw Message.</t>

       <t>LSP: Label Switched Path.</t>

       <t>MHD: Multi-Homed Device.</t>

       <t>MHN: Multi-Homed Network.</t>

       <t>P2P: Point to Point - a P2P LSP typically refers to a LSP for Layer2 pseudowire.</t>

       <t>PE: Provider Edge device.</t>

       <t>VPWS: Virtual Private Wire Service. It refers to L2VPN VPWS circuit where pseudowires
       are signaled using LDP or BGP-AD protocol. The latter is referred as VPWS A-D.</t>

       <t>EVPN-VPWS: Ethernet-VPN Virtual Private Wire Service. It refers to EVPN-VPWS circuit
       where pseudowires are signaled via BGP-EVPN. It can also refer to <xref target="I-D.ietf-bess-evpn-vpws-fxc"/>.</t>

       <t>EVPN-FXC: Ethernet-VPN Flexible Cross-connect Service <xref target="I-D.ietf-bess-evpn-vpws-fxc"/>. </t>

       <t>Port-Active Redundancy Mode: When only a single PE, among all the PEs attached to an
       Ethernet segment, is allowed to forward traffic to/from that Ethernet segment for a given
       interface, then the Ethernet Segment is defined to be operating in Port-Active redundancy mode.</t>

       <t>Single-Active Redundancy Mode: When only a single PE, among all the PEs attached
       to an Ethernet segment, is allowed to forward traffic to/from that Ethernet segment
       for a given VLAN, then the Ethernet Segment is defined to be operating in Single-Active
       redundancy mode.</t>

       <t>All-Active Redundancy Mode: When all PEs attached to an Ethernet Segment are allowed
       to forward traffic to/from that Ethernet segment for a given VLAN, then the Ethernet segment
       is defined to be operating in All-Active redundancy mode.</t>

       <t>VPWS A-D: Refers to Virtual Private Wire Services with BGP-based Auto Discovery as in
       <xref target="RFC6074"/>.</t>

       <t>PW: Pseudowire</t>
     </list></t>
   </section>

   <section title="L2VPN PE, EVPN-VPWS PE and Composite PE">
   <t>
   There are three types of PEs defined in the seamless integration
   solution: L2VPN PE, EVPN-VPWS PE and composite PE. Under a given Layer 2
   Ethernet VPN, the type of PE is categorized by the technology it is
   provisioned for. For instance, a PE that is provisioned to use L2VPN
   and EVPN-VPWS on the same VPN service is considered a composite PE.
   </t>
   <t>
   Also in this document, in the context of a given Layer 2 Ethernet VPN,
   an EVPN-VPWS PE is a PE that is provisioned to provide only the EVPN
   solution per <xref target="RFC8214"/> or <xref target="I-D.ietf-bess-evpn-vpws-fxc"/> 
   but not a seamless integration solution. It is irrelevant whether an EVPN-VPWS PE is capable
   to support a seamless integration solution.
   </t>
   <t>
   For example, for a non-L2VPN PE, a network administrator may know
   a priori that the PE does not need to establish any P2P Ethernet
   service that involves L2VPN PE under a given Layer 2 Ethernet VPN
   instance. In this case, the PE can be provisioned to act only as an
   EVPN-VPWS PE for that VPN even though it is capable of providing seamless
   integration procedure. If such prior knowledge is unavailable,
   then a PE SHALL be provisioned to act as a composite PE if it is
   capable of. Otherwise, it is unable to establish a P2P Ethernet
   service with a L2VPN PE. 
   </t>
   <t>
   Unless explicitly specified in this specification, a PE's type
   applies to a given Layer 2 Ethernet VPN instance.  A PE may act as an
   EVPN-VPWS PE for one VPN, but as a composite PE for another VPN.
   </t>
   </section>

   <section title="Solution Requirements">
     <t> The seamless integration solution for point-to-point Ethernet VPN
     meets the following requirements: </t>

     <t><list style="symbols">
       <t> It must allow L2VPN, EVPN-VPWS and composite PEs to participate in the
      same Layer 2 Ethernet VPN instance.</t>

       <t>The solution MUST allow for staged migration towards EVPN-VPWS on a site-by-site
       basis - e.g., new EVPN-VPWS sites to be provisioned on EVPN-VPWS Provider
       Edge devices (PEs).  Migration SHOULD be possible on a per-pseudowire basis.</t>

       <t>The solution MUST NOT require any changes to existing L2VPN PEs running Legacy VPWS,
       unless it is to upgrade them to EVPN-VPWS and make them composite PE.</t>

       <t>The solution MUST allow for the co-existence of composite PE devices running
       EVPN-VPWS and L2VPN VPWS for the same single-homed and/or multi-homed
       segments.</t>

       <t>The solution MUST support port-active redundancy of multi-homed
       networks and multi-homed devices for L2VPN, EVPN-VPWS and composite PEs.</t>

       <t>The solution MUST support single-active redundancy of multi-homed
       networks and multi-homed devices for L2VPN, EVPN-VPWS and composite PEs.</t>

       <t>The solution SHOULD support all-active redundancy of multi-homed Ethernet Segments
       for L2VPN, EVPN-VPWS and composite PEs.</t>

       <t>Composite PEs provisioned for all-active multihoming for their
       multihomed CE(s) MAY work with L2VPN PE(s) working in single
       home or active-standby multihoming.</t>
     </list></t>
     <t>These requirements collectively allow for the seamless insertion of
     the EVPN-VPWS technology into brownfield L2VPN VPWS deployments.</t>
   </section>

   <section title="Seamless Integration Solution">
     <t>To support seamless integration, the solution may require L2VPN PEs
     to setup PWs per <xref target="RFC8077"/> or <xref target="RFC6624"/> or may 
     require L2VPN PEs to setup VPWS service by
     auto-discovering VPN members using <xref target="RFC6074"/> and then setting up the PWs
     using <xref target="RFC8077"/>. Furthermore, composite PEs must
     support BGP EVPN routes per <xref target="RFC8214"/> and as per <xref target="I-D.ietf-bess-evpn-vpws-fxc"/> 
     and one of a method of legacy VPWS technologies. All the logic for seamless integration
     SHALL reside on the composite PEs.
     </t>
    <t>
     A PE participating in a point-to-point Ethernet VPN offers P2P
     Ethernet services with different remote PEs.  By nature of point-to-
     point service, there is no requirement for full-mesh among all the
     PEs participating in the same point-to-point Ethernet VPN instance.
    </t>
    <t>
     The seamless integration solution allows the coexistence of composite
     PE, L2VPN PE and EVPN-VPWS PE under the same VPN instance. It allows the
     establishment of P2P Ethernet services over the same MPLS/IP core:
     (a) between two homogenous PEs, or (b) between a composite PE and a
     L2VPN PE, or (c) between a composite PE and a EVPN-VPWS PE.
     </t>
     <t>
     A composite PE can establish a P2P Ethernet service with a L2VPN PE
     and different a P2P service with the same or a different EVPN-VPWS PE. 
     It is the sole responsibility of a composite PE to seamless integrate with L2VPN PEs
     and EVPN-VPWS PEs.
     </t>
     <t>
     There will be no P2P service between an EVPN-VPWS PE and a L2VPN PE in the
     same L2 Ethernet VPN as an EVPN-VPWS PE is provisioned only to provide the
     procedure/function per EVPN-VPWS.
     </t>
   </section>

   <section title="Capability Discovery">
     <t>The EVPN-VPWS PEs MUST advertise both BGP VPWS Auto-Discovery (VPWS A-D) 
     route or LDP-LM message as well as the BGP EVPN Ethernet-AD per EVI 
     route for a given pseudowire. Auto-discovery is only
     meaningful to PEs participating in the same VPN.
     </t>
     <t>
     In the case of L2VPN PEs running VPWS A-D, they may advertise the BGP
     VPWS A-D route, per the procedures specified in <xref target="RFC4664"/>
     and <xref target="RFC6074"/> or <xref target="RFC6624"/>. The operator may 
     decide to use the same BGP Route Target
     (RT) to identify a pseudowire on both EVPN-VPWS and L2VPN networks. In this case,
     when a L2VPN PE receives the EVPN Ethernet-AD per EVI route, it MUST ignore it on the
     basis that it belongs to an unknown SAFI. However, the operator may
     choose to use two RTs - one to identify the pseudowire on L2VPN network and
     another for EVPN-VPWS network and employ RT-constrained <xref target="RFC4684"/> in order
     to prevent BGP EVPN routes from reaching the L2VPN PEs.
     </t>
     <t>
     When an EVPN-VPWS PE receives both a VPWS A-D route or a LDP-LM message as well as
     an EVPN-VPWS Ethernet-AD per EVI route from a given remote PE for the same pseudowire, it MUST
     give preference to the EVPN-VPWS route for discovery. This
     ensures that, at the end of the route exchange, all EVPN-VPWS capable PEs
     discover other EVPN-VPWS capable PEs. 
     </t>
     <t>
     When the discovery phase is completed, the composite PEs have discovered
     the remote PE per pseudowire along with their associated
     capability (EVPN-VPWS or L2VPN), whereas the L2VPN PE have
     discovered the remote PE per pseudowire as if they are L2VPN-only PEs.
     Basically, a L2VPN PE discovers all L2VPN PEs and all composite PEs 
     participating in the same VPN. However, a L2VPN
     cannot distinguish a L2VPN from a composite PE. From a point of
     L2VPN PE, all composite PEs are L2VPN PEs.
     </t>
    <t>
     Also, an EVPN-VPWS PE discovers all EVPN
     PEs and all composite PEs participating in the same VPN.  Similarly,
     an EVPN-VPWS PE cannot distinguish an EVPN-VPWS PE from a composite PE. From a
     point of EVPN-VPWS PE, all composite PEs are EVPN-VPWS PEs.
     </t>
   </section>

   <section title="Data Plane Operations">
   <t>
   When a packet arrives at an ingress composite PE, the composite PE
   adds a VPN service label based on the AC that packet arrives at, and
   it encapsulates the packet and sends it through a pseudowire to the
   egress PE.</t>

   <t><list style="symbols">
   <t>A composite PE will not forward customer traffic to the L2VPN PE
      playing a non-DF role</t>

   <t>If a composite PE detects that two or more EVPN-VPWS PEs are attached
      to the same ES and they are working in all-active mode, it will
      load balance the traffic among the EVPN-VPWS PEs.</t>

   <t>If a composite PE detects that two or more EVPN-VPWS PEs are attached
      to the same ES and they are working in single-active mode, it will
      only forward the traffic to the EVPN-VPWS PE playing a DF role. 
      Similar logic is followed with port-active mode.</t>

   <t>If a set of composites PEs work in all-active multihoming mode for
      the same multihomed CE, then regardless of DF or Non-DF role each
      composite PE plays, it may forward the packet received from its
      multihomed CE to the remote L2VPN DF PE. Detailed 
      description is done in <xref target="all-active-section"/>.</t>

   <t>If a composite PE receives both L2VPN and EVPN A-D routes from a
      remote PE for the same p2p Ethernet service, the composite should
      install forwarding routes in a make-before-break fashion:
      <list style="letters">
      <t>For the traffic coming from the remote PE to its local access
          interface direction, to achieve a fast failover, the composite
          may install forwarding routes based on both L2VPN and EVPN A-D
          routes.  However, to save system resources in a scaled setup,
          the composite may choose to install only the forwarding route
          for the EVPN A-D route and it should do so before it deletes
          the forwarding route for the L2VPN A-D route if it was
          installed beforehand.</t>

      <t>For traffic coming from its local access interface to the
          remote PE direction, only one route can be installed for the
          same local access interface. Forwarding should be based on
          the EVPN A-D route. The composite PE should update the
          forwarding route in a make-before-break fashion if the
          forwarding route for L2VPN A-D route has already been
          installed before the processing of the incoming EVPN A-D
          route.</t>
      </list></t>
   <t>If a composite PE receives both L2VPN and EVPN A-D routes from a
      remote PE for the same p2p Ethernet service, and later on the
      remote PE has reverted back to a L2VPN only PE and withdraws its
      EVPN A-D route, the composite PE should also update the forwarding
      route accordingly in a make-before-break fashion:
      <list style="letters">
      <t>For the traffic coming from the remote PE to its local access
          interface direction, if the forwarding route for the L2VPN A-D
          route is not there, the composite PE should install the
          forwarding route for the L2VPN A-D route before it tears down
          the forwarding route for the EVPN A-D route.</t>

      <t>For the traffic coming from its local access interface to the
          remote PE direction, only one route can be installed for the
          same local access interface.  The composite PE should update
          the forwarding route based on the L2VPN A-D route in a make-
          before-break fashion.</t>
      </list></t>
    </list></t>
   </section>

   <section title="Control Plane Operations">

     <t><xref target="VPWS_SH"/> demonstrates a typical brown-field deployment 
     where PE1 is a composite PE and PE2 is a L2VPN PE.</t>

     <figure align="center" anchor="VPWS_SH">
       <artwork align="left"><![CDATA[

                        MPLS/IP
       Composite PE       Core        L2VPN PE
                   +---------------+
          +---+    |               |   +---+
          |PE1|----|----- PW1 -----|---|PE2| 
          +---+    |               |   +---+
                   +---------------+

   VPWS A-D route  ]  TX       TX  [ VPWS A-D route
        or         ] --->     <--- [      or
 LDP Label Mapping ]               [ LDP Label Mapping

       AND
                      TX
  EVPN per EVI/EAD ] --->
   
           ]]></artwork>
      <postamble>EVPN-VPWS Single-Homed</postamble>
     </figure>

     <t>The control plane procedures of L2VPN PEs are per <xref target="RFC8077"/>, <xref target="RFC4761"/> and
     <xref target="RFC4762"/>. </t>
     
     <t>The EVPN-VPWS PE procedures are as follow:
   
       <list style="symbols"> 
       <t>The composite PE MUST establish a PW to each remote PE from which it has
       received only a VPWS A-D route or a LDP-LM message for the corresponding pseudowire,
       and MUST set up the label stack corresponding to the PW FEC.</t>

       <t>If an composite PE receives a VPWS A-D route or a LDP-LM message from a given PE,
       it sets up a L2VPN VPWS PW to that PE. If it then receives an EVPN Ethernet-AD per EVI route for that PW
       from the same PE, then the composite PE may bring the L2VPN PW operationally down and MUST
       forward traffic using the label information from the EVPN Ethernet-AD per EVI route.</t>

       <t>If an composite PE receives an EVPN Ethernet-AD per EVI route followed by a VPWS A-D
       route or a LDP-LM message from the same PE, then the composite PE will setup the EVPN-VPWS PW. It may
       keep the L2VPN VPWS PW operationally down and MUST forward traffic using the reachability information
       from that EVPN Ethernet-AD per EVI route.</t>

       <t>For L2VPN PEs not using VPWS A-D or LDP signaling, the composite PEs need to
       be provisioned manually with PWs to those remote L2VPN PEs for each
       pseudowire. In that case, if an composite PE receives an EVPN Ethernet-AD per EVI route
       from a PE to which a PW exists,  it may keep VPWS PW operationally down and MUST forward
       traffic using the reachability information from that EVPN Ethernet-AD per EVI route.</t>
     </list>

       In the case where a composite PE receives an EVPN Ethernet-AD per EVI route for an established L2VPN PW
       from a different PE, the result should be directed by a local configuration. This is to avoid any 
       security breach where a malicious user may want to steer an existing connection to a different PE.
     </t>
    </section><!--Forwarding and Control Plane Operations-->
     <section title="Multi-homed Operations">
       <t><xref target="VPWS_MH" /> demonstrates a multi-homing scenario. CE1 is connected to
       PE1 and PE2 where PE1 is the designated forwarder while PE2 is the non-designated forwarder.</t>

       <figure align="center" anchor="VPWS_MH">
	 <artwork align="left"><![CDATA[

                     MPLS/IP
     Composite PE     Core       L2VPN PE
                   +---------+
      DF  +---+    |         |   +---+   +---+
       +--|PE1|----|---------|---|PE3|---|CE2|
 +---+/   +---+    |   PW1  /|   +---+   +---+
 |CE1|             |       / |
 +---+\   +---+    |      /  |
       +--|PE2|----|-----+   |
     NDF  +---+    |         |
                   +---------+

           ]]></artwork>
	 <postamble>EVPN-VPWS Multi-homing Redundancy</postamble>
       </figure>

    <section title="Operations with Port-Active MH PEs">
	 <t>In <xref target="VPWS_MH"/>, PE1 and PE2 are configured in port-active load-balancing mode.
     Both PEs are advertising EVPN Ethernet-AD per ES route with the single-active bit set as described in
	   <xref target="I-D.ietf-bess-evpn-mh-pa"/>. In this example, PE1 is DF elected
         for the shared Ethernet-Segment identifier. </t>
       <t><list style="symbols">
          <t>Only PE1, as DF, advertises the VPWS A-D route or LDP-LM message towards remote PE3.</t>
          <t>PE1 advertises the EVPN Ethernet-AD per EVI route for PW1 towards remote PE3.
          The P-bit in L2 Attributes Extended Community is set for PE1 as per
          <xref target="RFC8214"/>. The purpose is to have all required EVPN-VPWS routes on remote PE.
	        During an upgrade from L2VPN to EVPN-VPWS, those remote nodes are immediately upgraded.</t>
          <t>PE2, as NDF, only advertises its EVPN Ethernet AD per EVI route
          corresponding to that same PW1.
          The B-bit in L2 Attributes Extended Community is set for PE2 as per
          <xref target="RFC8214"/></t>
       </list></t>
       <t>Upon link failure between CE1 and PE1, PE1 and PE2 follows EVPN Ethernet Segment DF Election
       procedures described in <xref target="RFC8214"/> for EVPN-VPWS. Furthermore, PE1 withdraws its VPWS A-D
       route or sends LDP-LW message to remote PE3 to teardown the L2VPN PW. Finally, PE2 advertises
       corresponding VPWS A-D route or LDP-LM message for that PW1 and re-establish L2VPN PW with new PE2
       destination.</t>

       <t>If PE3 is running 2-way pseudowire redundancy and PW-status is enabled, PE2 may leverage the existence
       of standby/backup PW with PE3.
       In this particular scenario, PE2 may advertise VPWS A-D route or LDP-LM
       message along with PW-status message. </t>
	 
       <t>Once PE3 is upgraded and support EVPN-VPWS, seamless integration procedures are applied. Higher
       precedence of EVPN-VPWS over L2VPN VPWS allow all PEs to avoid the usage of legacy circuit. Then, 
       non-preferred L2VPN VPWS protocols and configuration may be removed from all PEs.</t>
    </section> <!--"Operations with Port-Active MH PEs"-->
     
       <section title="Operation with Single-Active MH PEs">
	    <t>Single-active operation is similar to Port-active load-balancing mode described above. The main difference resides in the
        Designated Forwarder election where the carving is performed at the circuit level instead being of at the port/interface level.
        </t>
        <!-- Following is incorrect since DF election apply to the ES, not per VLAN or per specific sub-if-->
        <!--
	    This difference allows for the support of L2VPN PW VC-type 4 vs PW VC-Type 5 mode
	    on the composite PE as per <xref target="RFC4448"/>. While services running in port-active
	    load-balancing mode require raw mode (type-5), services running single-active load-balancing mode
	    use tagged mode (type-4).</t>
      -->
       </section> <!--Operation with Single-Active MH PEs-->
     
       <section anchor="all-active-section" title="Operation with All-Active MH PEs">
	     <t>In EVPN-VPWS all-active load-balancing mode, all PEs participating in a redundancy group
	    forward traffic bidirectionally, reducing the importance of DF and NDF PE. However, L2VPN PEs
	    do NOT support all-active peering PEs as remote endpoints.</t>

	    <section title="Falling back to port-active">
	     <t>Composite PE discovering remote L2VPN PE MAY fallback into port-active load-balancing mode.
       That can be achieved dynamically or by enforcing network operators to 
       configure port-active instead of all-active load-balacing mode. 
       In both cases, port-active multi-homing operations, as described before, apply here </t>
	     </section><!--Falling back to port-active-->

	   <section title="Asymmetric forwarding">

       <t> As per figure <xref target="VPWS_MH"/>, peering PEs run in all-active load-balancing mode 
       while PE3 behaves as single-homed PE. Asymmetric forwarding consists of transmitting traffic in an 
       all-active manner from peering PEs to PE3 while the reverse direction is done in port-active or single-active manner.
       </t>
       <t>
       Traffic from CE1 going to PE1 is forwarded to
	     PE3 using the VPN label learned from VPWS AD route or LDP-LM message received from PE3.
	     Traffic from CE1 going to PE2 is forwarded to PE3 using that same VPN label.
	     Traffic coming from CE2 to PE3 gets forwarded only over the primary PW towards PE1; the DF PE. 
       Supporting asymmetric forwarding with L2VPN PE requires extensions to EVPN-VPWS MH procedures.  
	    </t>
      <t>
       For BGP VPWS, PE1 and PE2 naturally receive the same label from PE3 via BGP. They can use 
       the same label when sending to PE3. There is no direct need for alias label signaling.
       For LDP VPWS, since the LDP sessions are targeted, 
       PE1 and PE2 always receive different labels, hence the alias label procedure is needed.
      </t>
	   <t>Following rules are applied to achieve expected behavior:</t>

	   <t><list style="symbols">
	     <t>Peering PEs advertise EVPN Ethernet-AD per ES route with the single-active bit unset.
	     That is to get the network ready when remote L2VPN PE are upgraded to composite PE.</t>
	     <t>DF PE advertises VPWS AD routes or LDP-LM message and EVPN Ethernet AD per EVI route per PW.</t>
	     <t>NDF PE advertises only EVPN Ethernet AD per EVI route per PW.</t> 
	     <t>If PE3 is running 2-ways pseudowire redundancy, PE2 may leverage the existence of
	     standby/backup PW with PE3. PE2 may advertise VPWS AD route or LDP-LM message with
	     proper PW-status message.</t>

	     <t>The tunnel encapsulation
	     attribute <xref target="RFC9012"/> is used to synchronize alias PW label between peering PEs.
	     The tunnel encapsulation attribute, specifying the alias PW label and tunnel endpoint (nexthop)
	     of the remote PE (PE3), is transmitted along with EVPN Ethernet-AD per EVI route. The NDF PEs
	     uses the same VPN label per L2VPN PW as DF PE when transmitting
	     traffic coming from CE (CE1) towards remote PE(PE3).</t>
       <t>Composite PE1 and PE2 do not need similar mechanism for EVPN-VPWS since the same route advertised 
      by PW is received on both PEs.</t>
	   </list></t>

     <!-- PATRICE -alias label in the tunnel encap attribute is a bit underspecified -->
	   <!-- PATRICE - cover different VLAN procedure -->
	   <!-- PATRICE - cover PWR interop - may open a dawm can of worms -->
	   </section> <!--Asymmetric forwarding-->
     </section> <!--Operation with All-Active MH PEs-->
    </section><!--Multi-homed Operations-->

    <section title="Route Optimization">
    <t>
    With the simplest provisioning model, if a composite PE does not know
    a priori whether the remote PE for a given P2P service is a L2VPN PE
    or an EVPN PE, the composite needs to participate in the auto-discovery 
    and signaling procedures for both L2VPN and EVPN-VPWS. This
    works well as it allows a composite to establish a P2P service with
    different types of PEs composite PE, and to switch from using a L2VPN
    PW to EVPN-VPWS dynamically during the migration process.
    </t>
    <t>
    The simples provisioning model may not be optimal though, in that a
    composite PE originates twice as many A-D routes as they are required
    to establish the number of P2P services it is provisioned to.
    Therefore in some scenario,a composite PE should be
    optimized to perform either L2VPN or EVPN-VPWS procedure for a given
    P2P service, but not both.
    </t>
    <t>
    For a composite PE, if a Service Provider has prior knowledge
    about the types of remote PEs for some or all of its P2P Ethernet
    services, reducing the number of routes a composite PE originates can
    be achieved through the configuration.  Based on the configuration, a
    composite may advertise EVPN route but not L2VPN A-D route for a P2P
    Ethernet service, or vice versa.  It is up to the Service Provider to
    decide based on the network requirement.
    </t>
    </section><!--Route Optimization-->
   
   <!-- Possibly a 'Contributors' section ... -->

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

   <section anchor="Security" title="Security Considerations">
     <t>The same Security Considerations described in <xref target="RFC8214"/> are valid for
   this document.</t>
   </section>

   <section title ="Acknowledgements">
   <t> </t>
   <!--
     <t>The authors would like to acknowledge Sylvain Masse for his feedback and
     contribution to this document.</t> -->
   </section>
 </middle>

 <!--  *****BACK MATTER ***** -->

 <back>
   <!-- References split into informative and normative -->

   <!-- There are 2 ways to insert reference entries from the citation libraries:
    1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
    2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
       (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

    Both are cited textually in the same manner: by using xref elements.
    If you use the PI option, xml2rfc will, by default, try to find included files in the same
    directory as the including file. You can also define the XML_LIBRARY environment variable
    with a value containing a set of directories to search.  These can be either in the local
    filing system or remote ones accessed by http (http://domain/dir/... ).-->

   <references title="Normative References">
     <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
     <?rfc include='reference.RFC.2119.xml'?>
     <?rfc include='reference.RFC.6074.xml'?>
     <?rfc include='reference.RFC.6624.xml'?>
     <?rfc include='reference.RFC.8214.xml'?>
     <?rfc include='reference.RFC.8077.xml'?>
     <!-- 
     <?rfc include='reference.RFC.8560.xml'?>
     -->
     <?rfc include='reference.RFC.8174.xml'?>
   </references>

   <references title="Informative References">

     <?rfc include='reference.I-D.draft-ietf-bess-evpn-vpws-fxc-03.xml'?>
     <?rfc include='reference.I-D.draft-ietf-bess-evpn-mh-pa-03.xml'?>
     <?rfc include='reference.RFC.9012.xml'?>
     <!-- 
     <?rfc include='reference.I-D.draft-sajassi-bess-evpn-vpls-all-active-00.xml'?>
     -->

     <!-- Here we use entities that we defined at the beginning. -->
     <?rfc include='reference.RFC.4664.xml'?>
     <?rfc include='reference.RFC.4684.xml'?>
     <!-- 
     <?rfc include='reference.RFC.4448.xml'?>
     -->
     <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4761.xml"?>
     <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4762.xml"?>

     <!-- A reference written by by an organization not a person. -->

    </references>

<!-- Change Log

v00 2019-10-28  PB   Initial version

-->
 </back>
</rfc>
