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

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "reference.RFC.2119">
<!ENTITY RFC4761 SYSTEM "reference.RFC.4761">
<!ENTITY RFC4385 SYSTEM "reference.RFC.4385">
<!ENTITY RFC8174 SYSTEM "reference.RFC.8174">
<!ENTITY RFC3985 SYSTEM "reference.RFC.3985">
]>

<rfc submissionType="IETF" number="8614" category="std" updates="4761"
     consensus="yes" ipr="trust200902">

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

<front>

<title abbrev="Control Flags for BGP VPLS">Updated Processing of Control Flags
for BGP Virtual&nbsp;Private&nbsp;LAN&nbsp;Service&nbsp;(VPLS)</title>

<author fullname="Ravi Singh" initials="R." surname="Singh">
<organization>Juniper Networks</organization>
<address>
<postal>
<street>1133 Innovation Way</street>
<city>Sunnyvale</city>
<region>CA</region>
<code>94089</code>
<country>United States of America</country>
</postal>
<email>ravis@juniper.net</email>
</address>
</author>

<author fullname="Kireeti Kompella" initials="K." surname="Kompella">
<organization>Juniper Networks</organization>
<address>
<postal>
<street>1133 Innovation Way</street>
<city>Sunnyvale</city>
<region>CA</region>
<code>94089</code>
<country>United States of America</country>
</postal>
<email>kireeti@juniper.net</email>
</address>
</author>

<author fullname="Senad Palislamovic" initials="S." surname="Palislamovic">
<organization>Nokia</organization>
<address>
<postal>
<street>600 Mountain Avenue</street>
<city>Murray Hill</city>
<region>NJ</region>
<code>07974-0636</code>
<country>United States of America</country>
</postal>
<email>Senad.palislamovic@nokia.com</email>
</address>
</author>

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

<abstract>
<t>
   This document updates the meaning of the Control Flags field in the
   "Layer2 Info Extended Community" used for BGP Virtual Private LAN Service
   (VPLS) Network Layer Reachability Information (NLRI) as defined in
   RFC 4761. This document updates RFC 4761.</t>
</abstract>
</front>

<middle>
<section title="Introduction" anchor="section-1"><t>
   "Virtual Private LAN Service (VPLS) Using BGP for Auto-Discovery and
   Signaling" <xref target="RFC4761"/> describes the concepts and signaling
   for using the Border Gateway Protocol (BGP) to set&nbsp;up a VPLS. It
   specifies the BGP VPLS Network Layer Reachability Information (NLRI) by
   which a Provider Edge (PE) router may require other PEs in the same VPLS to
   include (or not) the Control Word (CW) and sequencing information in VPLS
   frames sent to this PE.</t>

<t>
   The use of the CW helps prevent the misordering of IPv4 or IPv6
   Pseudowire (PW) traffic over Equal-Cost Multipath (ECMP)
   paths or Link Aggregation Group (LAG) bundles. <xref target="RFC4385"/>
   describes the format for the CW that may be used over point-to-point PWs
   and over a VPLS. Along with <xref target="RFC3985"/>,
   <xref target="RFC4385"/> also describes sequence number usage for
   VPLS frames.
</t>

<t>
   However, <xref target="RFC4761"/> does not specify the behavior of PEs in a
   mixed environment where some PEs support CW/sequencing and others
   do not.</t>

<section title="Terminology" anchor="section-1.1">

    <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
    "SHALL&nbsp;NOT", "SHOULD", "SHOULD&nbsp;NOT", "RECOMMENDED",
    "NOT&nbsp;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="Problem Description" anchor="section-2"><t>
   <xref target="RFC4761"/> specifies the VPLS BGP NLRI by which a given PE
   advertises the behavior expected by the multiple PEs participating in the
   same VPLS. The NLRI indicates the VPLS label that the various PE routers,
   which are referred to in the NLRI, should use when forwarding VPLS
   traffic to this PE. Additionally, by using the Control Flags, this PE
   specifies whether the other PEs (in the same VPLS) should use the CW or
   sequenced delivery for frames forwarded to this PE. These are
   indicated by the C-bits and the S-bits, respectively, in the Control Flags,
   as specified in Section&nbsp;3.2.4 in <xref target="RFC4761"/>.</t>

<t>
   <xref target="RFC4761"/> requires that if the advertising PE sets the
   C&nbhy;bits and S&nbhy;bits, the receiving PE MUST, respectively, insert a
   CW and include sequence numbers when forwarding VPLS traffic to the
   advertising PE.</t>

<t>
   However, in a BGP VPLS deployment, there would often be cases where a
   PE receiving the VPLS BGP NLRI may not have the ability to insert a
   CW or include sequencing information inside PW frames. Thus, the
   behavior of CW processing and sequencing needs to be
   further specified.</t>

<t>
   This document updates the meaning of the Control Flags in the
   Layer2 Info Extended Community in the BGP VPLS NLRI. It also specifies the
   forwarding behavior for a mixed-mode environment where not every PE
   in a VPLS has the ability or the configuration to honor the
   Control Flags received from the PE advertising the BGP NLRI.</t>
</section>

<section title="Updated Meaning of Control Flags in the Layer2 Info Extended Community" anchor="section-3"><t>
   <xref target="RFC4761"/> does not allow for the CW setting to be
   negotiated. In a typical implementation, if a PE sets the C-bit, it
   expects to receive VPLS frames with a CW and will send frames the same
   way. If the PEs at the two ends of a PW do not agree on the setting of the
   C-bit, the PW does not come up.  The behavior is similar for the S-bit.</t>

<t>
   This memo updates the meaning of the C-bit and the S-bit in the
   Control Flags.</t>

<section title="Control Word (C-Bit)" anchor="section-3.1"><t>
   If a PE sets the C-bit in its NLRI, it means that the PE has the ability
   to send and receive frames with a CW.</t>

<t><list style="symbols">
  <t>If the PEs at both ends of a PW set the C-bit, CWs MUST be used in both
   directions of the PW.</t>
  <t>If both PEs send a C-bit of 0, CWs MUST NOT be used on the PW.</t>
</list></t>

<t>These two cases behave as before.</t>

<t>
   However, if the PEs at both ends of the PW do not agree on the
   setting of the C-bit, CWs MUST NOT be used in either direction
   on that PW, but the PW MUST NOT be prevented from coming up due to
   this mismatch. So, the PW will still come up but will not use the CW
   in either direction. This behavior is changed from the behavior described
   in <xref target="RFC4761"/> where the PW does not come up.</t>

</section>

<section title="Sequence Flag (S-Bit)" anchor="section-3.2">
<t>
   If a PE sets the S-bit in its NLRI, it means that the PE has the ability
   to set sequence numbers as described in Section&nbsp;4.1 in <xref
   target="RFC4385"/> and process sequence numbers as described in
   Section&nbsp;4.2 in <xref target="RFC4385"/>.</t>

<t><list style="symbols">
  <t>If the PEs at both ends of a PW set the S-bit, non&nbhy;zero sequence
  numbers MUST be used in both directions of the PW.</t>
  <t>If both PEs send an S-bit of 0, sequence numbers MUST NOT be used on the
  PW.</t>
</list></t>

<t>These two cases behave as before.</t>

<t>
   <xref target="RFC4761"/> does not allow for the S-bit setting to be
   negotiated either.  In a typical implementation, if the PE sets the
   S-bit in the advertised NLRI, it expects to receive VPLS frames with
   non&nbhy;zero sequence numbers and will send outgoing frames over the PW
   with non&nbhy;zero sequence numbers.</t>

<t>
   This memo further specifies the expected behavior when the PEs at the
   ends of the PW advertise differing S-bit values. If the PEs at both
   ends of the PW do not agree on the setting of the S-bit, then the PW
   SHOULD NOT come up. This is to avoid running into out-of-sequence
   ordering scenarios when the multiple PEs that are enabling
   multihoming for a site have differing S-bit advertisements as described in
   Section&nbsp;4.2 in <xref target="RFC4385"/>. However, if a deployment is
   known to not utilize multihoming, a user-configurable way to override this
   recommendation MAY be provided by an implementation whereby the PW is
   allowed to come up. In that case, the PE advertising the S-bit as 0 should
   set sequence numbers in the frames as 0, and the PW receiving the
   frames should not expect to receive non&nbhy;zero sequence
   numbers.</t>
</section>
</section>

<section title="Using Point-to-Multipoint (P2MP) LSPs as Transport for BGP VPLS" anchor="section-4"><t>
   BGP VPLS can be used over point-to-point Label Switched Paths (LSPs)
   acting as transport between the VPLS PEs. Alternately, BGP VPLS may also be
   used over Point-to-Multipoint (P2MP) LSPs with the source of the P2MP LSP
   rooted at the PE advertising the VPLS BGP NLRI.</t>

<t>In a network that uses P2MP LSPs as transport for a VPLS, there may
   be some PEs that support the CW while others may not. The behavior is
   similar for the sequencing of VPLS frames.</t>

<t>In such a setup, a source PE that supports CW should set&nbsp;up two
   different P2MP LSPs such that:</t>

<t><list style="symbols">
<t>One P2MP LSP will transport CW-marked frames to those PEs
   that advertised the C-bit as 1.</t>
<t>The other P2MP LSP will transport frames without the CW to those
   PEs that advertised the C-bit as 0.</t>
</list></t>

<t>Using two different P2MP LSPs to deliver frames with and without
   the CW to different PEs ensures that a P2MP root PE honors the
   C-bit advertised by the other P2MP PEs.</t>

<t>However, the set of leaves on the two P2MP LSPs (rooted at the
   given PE) MUST NOT contain any PEs that advertised a value for the
   S-bit different from what the root PE itself is advertising. PEs
   that advertised their S-bit values differently (from what the P2MP
   root PE advertised) will not be on either of the P2MP LSPs. This
   ensures that the P2MP root PE is sending VPLS frames only to those
   PEs that agree on the setting of the S-bit.</t>

<t>The ingress router for the P2MP LSP should send separate NLRIs for
   the cases of using the CW and for not using the CW.</t>

</section>

<section title="Illustrative Diagram" anchor="section-5">
<figure title="Example of a VPLS" anchor="ref-example-of-a-vpls"><artwork><![CDATA[
                                                       -----
                                                      /  A1 \
        ----                                     ____CE1     |
       /    \          --------       --------  /    |       |
      |  A2 CE2-      /        \     /        PE1     \     /
       \    /   \    /          \___/          | \     -----
        ----     ---PE2                        |  \
                    |                          |   \   -----
                    | Service Provider Network |    \ /     \
                    |                          |     CE5  A5
                    |            ___           |   /  \     /
                     \          /   \         PE4_/    -----
                     PE3       /     \       /
             |------/  \-------       -------
      ----  /   |    ----
     /    \/    \   /    \               CE = Customer Edge Device
    |  A3 CE3    --CE4 A4 |              PE = Provider Edge Router
     \    /         \    /
      ----           ----                A<n> = Customer site n
]]></artwork>
</figure>
<t>
   In the above topology, let there be a VPLS configured with the PEs as
   displayed. Let PE1 be the PE under consideration that is CW enabled
   and sequencing enabled. Let PE2 and PE3 also be CW enabled and
   sequencing enabled. Let PE4 not be CW enabled or have the ability to
   include sequence numbers. PE1 will advertise a VPLS BGP NLRI,
   containing the C/S&nbhy;bits marked as 1. PE2 and PE3, on learning of the
   NLRI from PE1, will include the CW and non&nbhy;zero sequence numbers in the
   VPLS frames being forwarded to PE1 as described in Section&nbsp;4 in
   <xref target="RFC4385"/>. However, PE4, which does not have the ability to
   include a CW or include non&nbhy;zero sequence numbers, will not.</t>

<t>
   As per <xref target="RFC4761"/>, PE1 would expect all other PEs to
   forward CW&nbhy;containing frames that have non&nbhy;zero sequence numbers.
   That expectation cannot be met by PE4 in this example. Thus, as per
   <xref target="RFC4761"/>, the PW between PE1 and PE4 does not come up.</t>

<t>
   However, this document addresses how an implementation should support
   BGP&nbsp;VPLS in a network where a subset of the BGP VPLS PEs support
   the CW and&wj;/or frame sequencing. PE1 will not bring up the PW
   with PE4 due to the S-bit mismatch, unless overridden by
   local configuration on PE1 and PE4 as specified in
   <xref target="section-3.2"/>. If PE4 instead was to advertise a C-bit of 0
   and an S-bit of 1, then the PW between PE1 and PE4
   would come up despite the CW mismatch. Additionally, PE1 would set&nbsp;up
   its data&nbsp;plane such
   that it will strip the CW only for those VPLS frames that are received from
   PEs that have indicated their desire to receive CW-marked frames. So, PE1
   will set&nbsp;up its data plane to strip the CW only for VPLS frames
   received from PE2 and PE3, and it will expect to process PW frames
   containing non&nbhy;zero sequence numbers as described in
   Section&nbsp;4.2 in <xref target="RFC4385"/>. PE1 will set&nbsp;up its
   data&nbsp;plane to not strip the CW from frames received from PE4, and it 
   would expect PE4 to send frames with non&nbhy;zero sequence numbers. All
   frames sent by PE4 to PE1 over the PW would have a non&nbhy;zero sequence
   number.</t>
</section>

<section title="Treatment of C-Bits and S-Bits in Multihoming Scenarios"
   anchor="section-6">
  <section title="Control Word (C-Bit)" anchor="section-6.1"><t>
   In a multihomed environment, different PEs may effectively represent
   the same service destination endpoint.  It could be assumed that the
   end-to-end PW establishment process should follow the same rules when
   it comes to CW requirements, meaning that setting the C-bit would
   be enforced equally toward both primary and backup designated
   forwarders.</t>

<t>
   However, in the multihoming case, each PW SHOULD be evaluated
   independently. Assuming the network topology specified in
   <xref target="section-5"/>, there could be the case where the PW between PE2
   and PE1 could have the CW signaled via the extended community and would be
   used in the VPLS frame, while the PE2-to-PE4 PW would not insert the CW in
   the VPLS frame due to a C-bit mismatch.  The multihoming behavior of the
   rest of the PEs should simply follow the rules specified in <xref
   target="VPLS-MULTIHOMING"/>.</t>
</section>

<section title="Sequence Flag (S-Bit)" anchor="section-6.2"><t>
   In a multihomed environment, different PEs may effectively represent
   the same service destination endpoint. In this case, the rules for
   end-to-end PW establishment SHOULD follow the same behavior as that
   described in <xref target="section-3.2"/> when it comes to S&nbhy;bit
   requirements. Consider the case described in <xref target="section-5"/>
   with CE5 having a connection to multiple PEs (multihomed) to PE4 and PE1.
   The PW's behavior is similar to that for the CW scenario such that
   the S-bit evaluation SHOULD be independent per PW.
   So, in the case where PE4 does not set the S&nbhy;bit in its
   advertised NLRI, there is an S&nbhy;bit mismatch between PE1 and PE4.
   This mismatch prevents the PW establishment between PE1 and PE4. So,
   only one PW -- between PE1 and PE2 -- would be established
   for the multihomed site shown. Thus, even though
   CE5 is physically multihomed, due to PE4's lack of support for
   sending frames with non&nbhy;zero sequence numbers, there would be no PW
   between PE2 and PE4. CE5 would effectively not be multihomed.</t>
</section>
</section>

<section title="Security Considerations" anchor="section-7">
<t>
   This document updates the behavior specified in <xref
   target="RFC4761"/>. The security considerations discussed in <xref
   target="RFC4761"/> apply. This document essentially addresses BGP VPLS
   behavior for PEs when the C-bit value, the S-bit value, or both values
   advertised by a given PE are different from what another PE in the VPLS is
   advertising. Any bit&nbhy;flipping media errors leading to causing this
   mismatch of C&wj;/S&nbhy;bits between PEs do not adversely affect the
   availability of the PWs. Rather, they cause CWs to not be used or cause the
   NLRI&nbhy;advertising PE to not expect non&nbhy;zero sequenced frames, for
   the C-bit and the S-bit, respectively, being mismatched across PEs. This is
   no worse than the previous behavior where any bit-flipping media errors
   leading to a mismatch of the C/S&nbhy;bits between PEs would cause the PW to not
   come up.</t>

</section>

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

</section>

</middle>

<back>
<references title="Normative References">
&RFC2119;
&RFC4761;
&RFC4385;
&RFC8174;
</references>

<references title="Informative References">

&RFC3985;

<!-- draft-ietf-bess-vpls-multihoming (I-D Exists) -->
<reference anchor='VPLS-MULTIHOMING'>
<front>
<title>BGP based Multi-homing in Virtual Private LAN Service</title>
<author initials='B' surname='Kothari' fullname='Bhupesh Kothari'>
    <organization />
</author>
<author initials='K' surname='Kompella' fullname='Kireeti Kompella'>
    <organization />
</author>
<author initials='W' surname='Henderickx' fullname='Wim Henderickx'>
    <organization />
</author>
<author initials='F' surname='Balus' fullname='Florin Balus'>
    <organization />
</author>
<author initials='J' surname='Uttaro' fullname='Jim Uttaro'>
    <organization />
</author>
<date month='March' year='2019' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-bess-vpls-multihoming-03' />
</reference>

</references>
</back>
</rfc>
