<?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-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="2024" month="November" day="25"/>

    <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 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="iana-assignments"><name>IANA Assignments</name>

<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>

</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, IANA has registered Route Targets
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 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 derivement 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, 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="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 translaation 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+1aXXcbtxF9x69A5YeKLZem5I/EeklUWUrkJI6PRLvnpKcP
4BIkES136QVWNKPov/fODPZLouS0SftU5+TY3AUwg5k7gzuDTZJEpcXM5Ysj
XYV58qVSwYXMHunTT8HmMzvTJ8VqVeUuOOv1a1u6azybl8VKXxRVsHpiyoUN
XpnptLTXR/piksziqNMTr2ZFmpsV1puVZh4SZyHEzcqkDPWwJI0Ctsn4uUpN
sIui3B5pH2ZKrd2RDkU61L4oQ2nnHv/aruQfNM/mEK3cusSwsvLhcDx+NT5U
prTmSJ/nwZa5DWqD3UGoutocaaWe6Jujo2nhMluuM4jT03R98PxWKVOFZYGV
lNYJ/tfa5f5I/zT6aWnyBT+QreB3saycbp8XJSS8wSbWttRvbdgU5ZXnN3Zl
XHakf/mFxn79swwZkVJ9KW9G3xrjO0Le2PlcN88+K+DnJYY+sv53o3fYatYR
8J3dVqVun7KI47JMq97CVzTsa8PPRzC5UkmSaDP1oTQppEyWzmt4uSJfaL+2
qZsTVIzemC18p8XN2uT3IbVlICnTgxJGzjDJp6WbYh1frKy2n8xqnVldeatT
460fiRorN5tlllwKX5fFrEqDK3KlTorcOwiGFh/evdUbF5b6YKzfnfqRPu5L
2/dQ82JyMNA3N3+6ODt5/uzl+PZWY1Npkc/doirtTM2LUoel5cVIPZNltBgW
xj/cag1w8ruSVvYiD2vC9DAAJroSq5Wl9esip2DTHy7ORnqCFS8mCqJ2G4dV
Oz05GAxl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