<?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 RFC9251 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9251.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-06" 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="2025" month="November" day="20"/>

    <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 into their corresponding VRF. 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 into their VRF. The route could be of any SAFI/type (it may not need to be a
VPN prefix), but it needs to be associated with the VPN on those 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. Some examples of
the association are given in <xref target="evpn"/> and <xref target="mvpn"/>.</t>

<t>To control the propagation to 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 used for route importation into 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 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 an 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, with a new sub-type
assigned specifically for this purpose (<xref target="iana"/>).</t>

</section>
<section anchor="specification"><name>Specification</name>

<t>While in the above example, an RT-derived EC is used for the purpose of importing
routes to a VRF configured with the corresponding Route Target, 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"/>), as detailed in <xref target="iana"/>.</t>

<t>RT-derived ECs are not used inherently to control the propagation of routes
that carry them.</t>

<t>Any AFI/SAFI or BGP-based protocol/feature that can take advantage of the convenience
of generic derivation may use them, or not use them at its own discretion.
How they are used is outside the scope of this document, but should be specified
in documents for the specific use cases.</t>

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

<t>IANA has assigned 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>This document additionally requests IANA to assign a new sub-type
"RT-derived-EC" with value 0x15 in the following registries:</t>

<t><list style="symbols">
  <t>Transitive Transport Class Extended Community Subt-Types</t>
  <t>Non-Transitive Transport Class Extended Community Subt-Types</t>
</list></t>

</section>
<section anchor="a-note-on-route-target-typesub-type-conventions"><name>A Note on 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, IANA has only registered Route Targets
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 0x43 (Non-Transitive Opaque Extended 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>Noticed that the assignment of sub-type 0x15 (or Type 0x0015 in case of
IPv6 Address Specific EC) for the purpose of derivation described in this
document 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
are only defined for the known types listed above.</t>

<t>When a new type of extended community is defined and registered,
and a sub-type under this new type is registered for Route Target purposes,
it is suggested to also register a sub-type for derivation purposes,
preferably with the same value 0x15.</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"><name>EVPN EVI-RT Extended Community</name>

<t>Section 9.5 "EVI-RT Extended Community" of <xref target="RFC9251"/>
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, an 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="RFC9251"/>, but merely
use it for illustration purposes.</t>

</section>
<section anchor="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 <xref target="I-D.ietf-idr-legacy-rtc"/></name>

<t>Section 3.1 of <xref target="I-D.ietf-idr-legacy-rtc"/> uses the derivation
as quoted below:</t>

<figure><artwork><![CDATA[
"Using the TRTS translated from 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 from 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 low-order
octet of the Type field for the IRT (as specified in
[I-D.ietf-idr-rt-derived-community])."
]]></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="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;


    </references>

    <references title='Informative References'>

&RFC9251;
&I-D.ietf-bess-bgp-multicast-controller;
&I-D.ietf-idr-legacy-rtc;


    </references>



  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA+1a3XPbNhJ/x1+Bsx/OuhMV2flo45fW59it0zbN2Epupjf3
AJGQhJoiFYK0orr53++3CxAEZclpr517unQ6iSRgd7H7208gSRKRlpkp5qey
qWfJl0LUps71qbz4WOsi05k8L5fLpjC10Va+0pW5w3ezqlzK67KptZyoaq5r
K9R0Wum7U3k9STK/6uLciqxMC7UEvaxSszoxGkxMViVV3S5LUs9gk4xfiFTV
el5Wm1Np60yIlTmVdZkOpS2rutIzi39tlu4ftE8XYC3MqsKyqrH1yXj8cnwi
VKXVqbwqal0VuhZrnA5Mxe36VApxKO9PT6elyXW1ysFOTtPV8bNPQqimXpSg
JKRM8L+UprCn8qfRTwtVzPkLdxR8LheNkd33ZQUOr3GIla7kG12vy+rW8i96
qUx+Kn/5hdZ+/bNbMiKh+lxej75VykZMXuvZTIbvPsvg5wWWPkL/u9FbHDWP
GH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