<?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-05" 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="September" day="12"/>

    <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 protocol/feature or AFI/SAFI 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>

</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+1a33PbNhJ+x1+Bsx/OuhMV2YnTxi89n2u3Tts0Yyu5md7c
A0RCEmqKVAjSiurmf79vFyAIypLTu3bu6dLpJCKB3cXutz/BJElEWmammJ/J
pp4lXwpRmzrXZ/LyY62LTGfyolwum8LURlv5ta7MPZ7NqnIpb8qm1nKiqrmu
rVDTaaXvz+TNJMn8qssLK7IyLdQS9LJKzerEaDAxWZVUdbssST2DTTI+Famq
9bysNmfS1pkQK3Mm6zIdSltWdaVnFv/aLN0/aJ8uwFqYVYVlVWPrk/H41fhE
qEqrM3ld1LoqdC3WOB2Yirv1mRTiUD6cnU1Lk+tqlYOdnKar4xefhFBNvShB
SUiZ4H8pTWHP5E+jnxaqmPMDdxT8LheNkd3zsgKH1zjESlfyja7XZXVn+Y1e
KpOfyV9+obV/+9ktGZFQfS6vR98qZSMmr/VsJsOzzzL4eYGlT9D/bvQWR80j
Bt/pTVPJ7imzOK+qtOkRvqNlf1P8fASVC5EkiVRTW1cqBZfJwlgJKzdkC2lX
OjUzgoqSa7WB7aQzs1TFY0htGEhC9aCElRk22bQyU9Cx5VJL/VEtV7mWjdU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