<?xml version="1.0" encoding="utf-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 3.1.2) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

<!ENTITY RFC4360 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4360.xml">
<!ENTITY RFC5701 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5701.xml">
<!ENTITY RFC7153 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7153.xml">
<!ENTITY RFC7432 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7432.xml">
<!ENTITY I-D.ietf-bess-evpn-igmp-mld-proxy SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-evpn-igmp-mld-proxy.xml">
<!ENTITY I-D.ietf-bess-bgp-multicast-controller SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-bgp-multicast-controller.xml">
<!ENTITY I-D.ietf-idr-legacy-rtc SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-legacy-rtc.xml">
]>

<?rfc toc, sortrefs, symrefs, comments="yes"?>

<rfc ipr="trust200902" docName="draft-zzhang-idr-rt-derived-community-04" category="std" consensus="true">
  <front>
    <title abbrev="RT-derived ECs">Extended Communities Derived from Route Targets</title>

    <author initials="Z." surname="Zhang" fullname="Zhaohui Zhang">
      <organization>Juniper Networks</organization>
      <address>
        <email>zzhang@juniper.net</email>
      </address>
    </author>
    <author initials="J." surname="Haas" fullname="Jeff Haas">
      <organization>Juniper Networks</organization>
      <address>
        <email>jhaas@juniper.net</email>
      </address>
    </author>
    <author initials="K." surname="Patel" fullname="Keyur Patel">
      <organization>Arrcus</organization>
      <address>
        <email>keyur@arrcus.com</email>
      </address>
    </author>

    <date year="2023" month="February" day="07"/>

    <area>Internet</area>
    <workgroup>idr</workgroup>
    

    <abstract>


<t>This document specifies a way to derive an Extended Community from
a Route Target and describes some example use cases.</t>



    </abstract>



  </front>

  <middle>


<section anchor="introduction"><name>Introduction</name>

<t>Consider a VPN with 10 PEs. A Route Target (say RT1) <xref target="RFC4360"/> is configured
for the VPN and all PEs will import VPN routes with RT1 attached. The RT
is an Extended Community (say EC1), with its sub-type being 0x02. While RT1
and EC1 have the same encoding, typically when we mention a Route Target,
its property of being able to control the route propagation and importation
is implied. When we just mention an Extended Community, that property is not
implied.</t>

<t>Now consider that another BGP route needs to be imported by some but not all
those PEs. The route could be of any SAFI/type (does not need to be a
VPN prefix), but it needs to be associated with the VPN on those importing PEs.
The exact meaning of "association" here does not matter, but the key is that
those PEs need to know that the route is related to that VPN.</t>

<t>To control the propagation to and importation by those PEs, a different
Route Target (say RT3) is attached to the route. For those PE to associate the
route with the VPN, an Extended Community (say EC2) is attached. Even though
RT1/EC1 is already associated with the VPN, EC2 needs to be different from RT1/EC1,
because if EC1 was used, the route would be propagated to and imported by all
the 10 PEs. EC2 cannot be the same as RT3 either, because there could be other
routes to be propagated to and imported by those same set of PEs yet those
other routes are not related to the VPN.</t>

<t>While EC2 can be any Extended Community (that is not a RT) configured on the
originating and receiving PEs to map it to the VPN, it is convenient if EC2
is derived from the RT1/EC1, e.g. the sub-type of RT1/EC1 is changed to a
new known value while everything else remains the same. We call this a
Route Target derived Extended Community, or RT-derived EC. A new sub-type is
assigned specifically for this purpose (see IANA considerations).</t>

<t>This document only specifies a way to derive an Extended Community from a
Route Target Extended Community using IANA-assigned Extended Community
sub-types (or Extended Community Type in case of IPv6-Address-Specific
Extended Community <xref target="RFC5701"/>). Any protocol/feature that can take
advantages of the convenience of generic derivation may use them,
or not use them at its own discretion, and how they are used is outside
the scope of this document.</t>

</section>
<section anchor="route-target-typesub-type-conventions"><name>Route Target Type/sub-type Conventions</name>

<t>It may be expected by some people that Route Targets are Extended
Communities with sub-type 0x02 (or with Type 0x0002 in case of IPv6 Address
Specific Extended Community). However, the only official specification are in
<xref target="RFC7153"/> <xref target="RFC7432"/> and are only for the following types:</t>

<t><list style="symbols">
  <t>Type 0x00 (Transitive Two-Octet AS-Specific EC)</t>
  <t>Type 0x01 (Transitive IPv4-Address-Specific EC)</t>
  <t>Type 0x02 (Transitive Four-Octet AS-Specific EC)</t>
  <t>Type 0x06 (EVPN AS-Specific EC)</t>
  <t>Type 0x0002 (Transitive IPv6-Address-Specific Route Target)</t>
  <t>Type 0x0011 (Transitive IPv6-Address-Specific EC, UUID-based Route Target))</t>
</list></t>

<t>While it may be desired to follow the unwritten convention and assign sub-type
0x02 for future Route Targets of future types of ECs, there is no guarantee
of that. For example, Type 0x0011 is assigned for UUID-based Route Target
that imposes as an IPv6 Address Specific EC (even though UUID is not an
IPv6 address).</t>

<t>IANA has assigned sub-type 0x15 (or Type 0x0015 in case of IPv6 Address
Specific EC) to indicate an EC is derived from a Route Target that has
sub-type 0x02 (or type 0x0002 in case of IPv6 Address Specific EC),
and this document will further request another Type TBD
(say, 0x0016) to derive from the UUID-based Route Target.</t>

<t>All those can only be registered with the known types listed above. When
a new type is defined and registered, the corresponding 0x02 sub-type
may be registered for Route Target purpose or for something else, and
there is no guarantee that the 0x15 sub-type will not be registered for
something else as well (than for RT derivation). As a result,
the mapping between sub-type 0x02 and 0x15, type 0x0002 and 0x0015,
type 0x0011 and TBD are only defined for the known types listed above.</t>

<t>Of course, when a new type is defined and registered, it is desired to
proactively register sub-type 0x02 and 0x15 at the very beginning for
Route Target and Route Target Derivation purposes, should the review
process catch it.</t>


</section>
<section anchor="use-cases"><name>Use Cases</name>

<t>The following are a few examples of use cases. To reiterate, these are example
scenarios where generic RT-derived ECs could be used (when the routes to which
they are attached provide enough context). It is not the intention of this
document to mandate that it must be used.</t>

<section anchor="evpn-evi-rt-extended-community"><name>EVPN EVI-RT Extended Community</name>

<t>Section 9.5 "EVI-RT Extended Community" of
<xref target="I-D.ietf-bess-evpn-igmp-mld-proxy"/>
describes a situation similar to the above. As a solution, four EVPN specific
EVI-RT ECs are defined, each mapping to a type of Route Target for the
corresponding EVPN instance.</t>

<t>As a theoretical alternative, a RT-derived EC described in this
document could be used instead - just derive a generic EC from the EVI RT.
Note that this document does not attempt to change
the existing procedures in <xref target="I-D.ietf-bess-evpn-igmp-mld-proxy"/>, but merely
use it for illustration purposes.</t>

</section>
<section anchor="leaf-discovery-with-controller-signaled-bgp-mvpn"><name>Leaf Discovery with Controller Signaled BGP-MVPN</name>

<t>In Section 2 "Alternative to BGP-MVPN" of
<xref target="I-D.ietf-bess-bgp-multicast-controller"/>, BGP MCAST-TREE SAFI signaling
can be used for a controller to program multicast forwarding state in VRFs
of ingress/egress PEs, instead of relying on distributed BGP-MVPN signaling.
For the controller to learn egress PEs of a VPN customer multicast tree
(so that it can build/find a corresponding provider tunnel), egress PEs
signal leaf information to the controller via Leaf Auto-Discovery routes.
The routes carry a Route Target for the controller (so that only the controller
receives them), and an EC derived from the VPN's Route Target (so that the
controller knows which VPN they are for).</t>

</section>
<section anchor="translated-route-target-extended-communities-in-i-dietf-idr-legacy-rtc"><name>Translated Route-target Extended Communities in [I-D.ietf-idr-legacy-rtc]</name>

<t>In Section 3.1 of <xref target="I-D.ietf-idr-legacy-rtc"/>, a similar mechanism is described,
as quoted below:</t>

<figure><artwork><![CDATA[
  "The translation of the IRTs is necessary in order to refrain from
  importing "route-filter" VRF routes into VPN VRFs that would
  import the same route-targets.  The translation of the IRTS is
  done as follows.  For a given IRT, the equivalent translated RT
  (TRT) is constructed by means of swapping the value of the high-
  order octet of the Type field for the IRT (as defined in
  [RFC4360])."
]]></artwork></figure>

</section>
</section>
<section anchor="security-considerations"><name>Security Considerations</name>

<t>This document specifies a way to derive an Extended Community from
a Route Target Extended Community and does not specify how
derived Extended Communities are used. As a result, this document
does not need security considerations. Any potential security
concerns need be addressed by documents that specify the actual
usage.</t>

</section>
<section anchor="iana-assignments"><name>IANA Assignments</name>

<t>This document requests IANA to assign a new Type value (0x0016
suggested) for "UUID-RT-derived-EC".</t>

<t>IANA has assign a new sub-type "RT-derived-EC" with value 0x15
in the following registries:</t>

<t><list style="symbols">
  <t>Transitive Two-Octet AS-Specific Extended Community Sub-Types</t>
  <t>Transitive Four-Octet AS-Specific Extended Community Sub-Types</t>
  <t>Transitive IPv4-Address-Specific Extended Community Sub-Types</t>
  <t>Non-Transitive Opaque Extended Community Sub-Types</t>
  <t>EVPN Extended Community Sub-Types</t>
</list></t>

<t>IANA has also assigned a new type "RT-derived-EC" with value 0x0015
in the following registry:</t>

<t><list style="symbols">
  <t>Transitive IPv6-Address-Specific Extended Community Types</t>
</list></t>

<t>If and when additional Extended Community types are defined with a
Route Target sub-type, the "RT-derived-EC" sub-type may also be
registered for those new types, preferably with the same value.</t>

</section>
<section anchor="acknowledgements"><name>Acknowledgements</name>

<t>The authors thank Robert Raszuk for his valuable comments and suggestions.</t>

</section>


  </middle>

  <back>


    <references title='Normative References'>

&RFC4360;
&RFC5701;
&RFC7153;
&RFC7432;


    </references>

    <references title='Informative References'>

&I-D.ietf-bess-evpn-igmp-mld-proxy;
&I-D.ietf-bess-bgp-multicast-controller;
&I-D.ietf-idr-legacy-rtc;


    </references>



  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA+1aW3fbxhF+31+xlR8qtgQtyZckfGkUWkrkJI6PxCTn5PKw
BJbkRiBAYwFRjKP/3m9mFjeJlN027VPl4yMR2J2Znes3s4yiSMV54rLFWFfl
PPpUqdKVqR3rs9vSZolN9CRfrarMlc56/coW7gbP5kW+0pd5VVo9NcXCll6Z
2aywN2N9OY2SsOps4lWSx5lZgV5SmHkZ/f770mSLyCVFVJT1wigOLLbR0XMV
m9Iu8mI71r5MlFq7sS7zeKh9XpSFnXv8tV3JH7TPZmCu3LrAsqLy5cnR0WdH
J8oU1oz1RVbaIrOl2uB8YKquN2Ot1BP9fjye5S61xToFOz2L18fP75QyVbn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