<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-heitz-idr-wklc-04" ipr="trust200902">
  <front>
    <title abbrev="Well Known Large Community">BGP Well Known Large Community</title>

    <author fullname="Jakob Heitz" initials="J. " surname="Heitz">
      <organization>Cisco</organization>
      <address>
        <postal>
          <street>170 West Tasman Drive</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>USA</country>
        </postal>
        <email>jheitz@cisco.com</email>
      </address>
    </author>

    <author fullname="Kotikalapudi Sriram" initials="K. " surname="Sriram">
      <organization abbrev='NIST'>USA National Institute of Standards and Technology</organization>
      <address>
        <postal>
          <street>100 Bureau Drive</street>
          <city>Gaithersburg</city>
          <region>MD</region>
          <code>20899</code>
          <country>USA</country>
        </postal>
        <email>kotikalapudi.sriram@nist.gov</email>
      </address>
    </author>

    <author fullname="Brian Dickson" initials="B. " surname="Dickson">
      <address>
        <email>brian.peter.dickson@gmail.com</email>
      </address>
    </author>

    <author fullname="John Heasly" initials="J. " surname="Heasly">
      <address>
        <email>heas@shrubbery.net</email>
      </address>
    </author>


    <date/>

    <area>Routing</area>
    <workgroup>IDR</workgroup>
    <keyword>BGP</keyword>
    <keyword>communities</keyword>

    <abstract>
      <t>
	A range of BGP Autonomous System Numbers is reserved to create a set of BGP Well Known Large Communities.
      </t>
    </abstract>

    <note title="Requirements Language">
      <t>
	The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119"/>.
      </t>
    </note>

  </front>

  <middle>
    <section anchor="Intro" title="Introduction">
      <t>
	The Global Administrator field of the BGP Large community <xref target="RFC8092"/> is an Autonomous System Number (ASN). To create a set of Well Known Large Communities, a set of ASNs must be reserved for them, such that a real ASN in the Global Administrator field cannot be mistaken for a Well Known Large Community.
      </t>
    </section>
    
    <section anchor="Encoding" title="Encoding">
      <t>
        Each BGP Well Known Large Community value is encoded as a 12-octet quantity, as follows:
<figure align="center"><artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |1 1 1 1 0 1| T |    WKLC ID    |          Data 1               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                             Data 2                            |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                             Data 3                            |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>
      </t><t>
        The fields are as shown below:
	<list style='hanging' hangIndent='18'>
	  <t hangText="     T          -">
	    Transitivity field (2 bits). This is further described below.
	  </t>
	  <t hangText="     WKLC ID    -">
	    Well Known Large Community Identifier (1 octet). See <xref target="IANA" format="title"/>. If an experimental type is used, then it MUST NOT be hard coded in the BGP speaker software; it MUST be configurable. Different experiments can then run in the same network without having to coordinate identifier assignment during the coding stage.
	  </t>
	  <t hangText="     Data 1,2,3 -">
	    A 10 octet value specific to the WKLC. Data 1 is 16 bits long and Data 2 and Data 3 are 32 bits long each. The data portion is divided into the three fields only to encourage a canonical representation that follows <xref target="RFC8092"/>. If any WKLC cannot make use of this data division, it is free to define another division.
	  </t>
	</list>
      </t>
    </section>

    <section title="Transitivity">
      <t>
	The Large Community path attribute is a transitive attribute. Thus, BGP speakers that do not implement the transitivity described here will transit the WKLC regardless. If such a speaker wishes not to receive a particular large community, it MUST filter it out using local policy. The transitivity field determines how BGP speakers transfer the WKLC across real Autonomous System (AS) boundaries. The values are:
	<list style='hanging' hangIndent='9'>
	  <t hangText="     0 -">
	    Transitive: The WKLC is transitive across ASes. 
	  </t>
	  <t hangText="     1 -">
	    Non-transitive: The WKLC is not transitive across ASes. 
	  </t>
	  <t hangText="     2 -">
	    Administration Transitive: The WKLC is transitive across ASes under the same administration only. By default, every AS boundary is also an administration boundary. If an external BGP session is configured as a non-administrative boundary, then it will send and receive WKLCs with transitivity 2, else it will discard the WKLC from the UPDATE message.
	  </t>
	  <t hangText="     3 -">
	    One-time Transitive: The WKLC is transitive across ASes under the same administration and into an AS under the neighboring administration, but not into an AS under a further administration. A BGP speaker that receives a WKLC with transitivity 3 on an external BGP session on an administrative boundary SHOULD change the transitivity to 2.
	  </t>
	</list>
      </t>
    </section>
    
    <section anchor="discussion" title="Discussion">
      <t>
	A criterion considered important is the number of data octets available for any WKLC type. This is maximized to 10 at the expense of ASN space and type space.
      </t>
      <t>
	8 bits for the type is considered to be plenty. 255 types are more than enough for WKLC, considering how many extended community types have been used so far (22 at time of this publication). If a large set of types, each of which requires less than 10 octets of data, is required, then they can all be specified under a single type code and further distinguished by using the Data 1 field as a sub-type. An equivalent example is the EVPN Extended Community type, which defines further sub types.
      </t>
      <t>
	The range of AS numbers currently unallocated by IANA is 399,261 to 4,199,999,999. The WKLC reserves 67,108,864 AS numbers. That still leaves 4,132,491,874 unallocated AS numbers. For comparison, there are 94,968,317 AS numbers reserved for private use. Thus, the number of ASNs reserved for WKLCs is considered insignificant.
      </t>
    </section>
    
    <section anchor="Security" title="Security Considerations">
      <t>
	The BGP Large Community Path attribute is transitive. Thus, a BGP speaker that does not recognize the transitivity field may transmit the WKLC contrary to the advisement of the transitivity field. If a BGP speaker wishes not to receive any Large Community, it must continue to filter it in the same way it was doing before the transitivity field was introduced.
      </t>
      <t>
<!-- If an AS number from the range assigned to WKLC appears in the AS_PATH, then the receiving BGP speaker MUST treat the AS_PATH attribute as malformed and SHALL handle the BGP update message using the approach of "treat-as-withdraw" <xref target="RFC7606"/>. -->
In some cases, a received route that contains an AS number from the range assigned to WKLC in its AS_PATH may be considered unusual. A receiving BGP speaker MAY drop such a received route in route-policy.
      </t>

    </section>
    
    <section anchor="IANA" title="IANA Considerations">
      <t>
	IANA is requested to assign the range 4093640704 (0xF4000000) to 4160749567 (0xF7FFFFFF) from the BGP ASN registry for BGP Well Known Large Communities.
      </t><t>
	IANA is requested to create a registry of Well Known Large Communities in the range 0 to 255. Numbers from this registry are to be assigned in accordance with the policies defined in <xref target="RFC8126"/>. The policies for the following number ranges are:
	<list style='hanging' hangIndent='15'>
	  <t hangText="     0-63    -">
	    RFC Required
	  </t>
	  <t hangText="     64-223  -">
	    First Come First Served
	  </t>
	  <t hangText="     224-255 -">
	    Experimental
	  </t>
	</list>
      </t>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <!-- <?rfc include="reference.RFC.7606"?> -->
      <?rfc include="reference.RFC.8092"?>
      <?rfc include="reference.RFC.8126"?>
    </references>

  </back>
</rfc>
