<?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-ietf-idr-rt-derived-community-00" 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="March" 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+xlR8qtgRNyZckemkUWkrkJI6PxCTn5PKw
BJbkRiBAYwFRjKP/3m9mFjeJlN027VPl4yMR2J2Znes3s4yiSMV54rLFia7K
efSpUqUrU3uiz25LmyU20ZN8taoyVzrr9StbuBs8mxf5Sl/mVWn11BQLW3pl
ZrPC3pzoy2mUhFVnE6+SPM7MCvSSwszLyFkwcUkRFWW9LIoDg200HqvYlHaR
F9sT7ctEqbU70WUeD7XPi7Kwc4+/tiv5g/bZDKyVWxdYVlS+PB6PPxsfK1NY
c6IvstIWmS3VBqcDU3W9OdFKPdHvT05muUttsU7BTs/i9dHzO6VMVS5zUFJ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