RFC 4360

BGP Extended Communities Attribute

πŸ“… published February 2006, from ietf

RFC 4360: BGP Extended Communities Attribute ✨

Network Working Group, Standards Track, February 2006 πŸŽ€

Authors: S. Sangli (Cisco Systems), D. Tappan (Cisco Systems), and Y. Rekhter (Juniper Networks) πŸ’…

This RFC doesn't list anything it obsoletes or updates in its header, so there's no "replaces" or "patches" drama here πŸ™ˆ


Status of This Memo πŸ“œ

This document specifies an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements 🫢 If you want the current standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited 🌈

Copyright (C) The Internet Society (2006).

Abstract πŸ¦‹

Okay so this document describes the "extended community" BGP-4 attribute πŸ’œ It gives you a way to label information carried in BGP-4, and those labels can control how that information gets distributed, or be used for other things entirely πŸ”₯

1. Introduction 🌸

The Extended Community Attribute is basically a labeling system for information carried in BGP-4 [BGP-4] πŸŽ€ It has two big upgrades over the older BGP Community Attribute [RFC1997] πŸ‘‘

  • An extended range, so communities can be assigned for a plethora of uses without any fear of overlap πŸ’–
  • A Type field, which gives the community space some structure ✨

Structure is the whole glow-up here πŸ’… Once you have it, you can write policy based on the application the community is for. You can filter out every community of a particular type, or allow only certain values for one type. It also tells you whether a community is transitive or non-transitive across an Autonomous System (AS) boundary 🧚 Without that structure, you'd have to explicitly list every community value you want to deny or allow, and then pass them to BGP speakers in neighboring ASes based on the transitive property. Nobody wants that much homework πŸ’€

1.1. Specification of Requirements πŸ“‹

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 RFC 2119 [RFC2119] 🫢

2. BGP Extended Communities Attribute πŸ¦‹

The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16 🌈 It's made up of a set of "extended communities". Every route that carries the Extended Communities attribute belongs to the communities listed in that attribute πŸ’œ

Each Extended Community is encoded as an 8-octet quantity, and it's split up like this πŸ“

  • Type Field: 1 or 2 octets πŸŽ€
  • Value Field: remaining octets ✨
       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Type high    |  Type low(*)  |                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+          Value                |
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(*) Present for Extended types only, used for the Value field otherwise.

Type Field πŸ”₯

Okay so there are two classes of Type Field: Regular type and Extended type πŸ’– A Regular type Type Field is 1 octet, and an Extended type Type Field is 2 octets πŸ¦‹

The high-order octet of the Type Field is what tells you if an extended community is a Regular type or an Extended type 🌸 The class (Regular or Extended) isn't encoded in the type's own structure, though. It's specified in the document that defines the type, and in the IANA registry 🧚

The high-order octet of the Type Field looks like this πŸ‘‘

             0 1 2 3 4 5 6 7
            +-+-+-+-+-+-+-+-+
            |I|T|           |
            +-+-+-+-+-+-+-+-+

I - IANA authority bit πŸŽ€

  • Value 0: IANA-assignable type using the "First Come First Serve" policy ✨
  • Value 1: Part of this Type Field space is for IANA assignable types using either the Standard Action or the Early IANA Allocation policy. The rest of this Type Field space is for Experimental use 🌈

T - Transitive bit πŸ’œ

  • Value 0: The community is transitive across ASes πŸ’…
  • Value 1: The community is non-transitive across ASes πŸ™ˆ

Remaining 6 bits: Indicates the structure of the community πŸ“

Value Field: the encoding of the Value Field depends on the "type" of the community, as set by the Type Field 🫢

Two extended communities are declared equal only when all 8 octets of the community are equal πŸ’– That's the whole comparison, no shortcuts ✨

The two members in the tuple <Type, Value> should be enumerated to specify any community value. The remaining octets of the community are interpreted based on the value of the Type field 🧚

3. Defined BGP Extended Community Types πŸ’…

This section introduces a few extended types and defines the format of the Value Field for each one πŸ¦‹ The types here act as "templates". Each template is identified by the high-order octet of the extended community Type field, and the lower-order octet (the sub-type) says which particular kind of extended community you're looking at 🌸

3.1. Two-Octet AS Specific Extended Community πŸ‘‘

This is an extended type. Its Type Field is 2 octets and its Value Field is 6 octets πŸŽ€

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 0x00 or 0x40  |   Sub-Type    |    Global Administrator       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Local Administrator                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The high-order octet of this extended type is either 0x00 or 0x40 ✨ The low-order octet is used to indicate the sub-type πŸ’–

The Value Field has two sub-fields 🌈

  • Global Administrator sub-field: 2 octets. This sub-field contains an Autonomous System number assigned by IANA 🧚
  • Local Administrator sub-field: 4 octets. The organization identified by the Autonomous System number in the Global Administrator sub-field can encode any information in this sub-field. The format and meaning of the value encoded in this sub-field should be defined by the sub-type of the community πŸ’œ

3.2. IPv4 Address Specific Extended Community πŸ¦‹

This is an extended type. Its Type Field is 2 octets and its Value Field is 6 octets πŸ’…

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 0x01 or 0x41  |   Sub-Type    |    Global Administrator       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Global Administrator (cont.)  |    Local Administrator        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The high-order octet of this extended type is either 0x01 or 0x41 🌸 The low-order octet is used to indicate the sub-type πŸŽ€

The Value field has two sub-fields πŸ‘‘

  • Global Administrator sub-field: 4 octets. This sub-field contains an IPv4 unicast address assigned by one of the Internet registries 🌈
  • Local Administrator sub-field: 2 octets. The organization that has been assigned the IPv4 address in the Global Administrator sub-field can encode any information in this sub-field. The format and meaning of the value encoded in this sub-field should be defined by the sub-type of the community 🧚

3.3. Opaque Extended Community πŸ“

This is an extended type. Its Type Field is 2 octets and its Value Field is 6 octets ✨

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 0x03 or 0x43  |   Sub-Type    |                Value          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Value (cont.)                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The high-order octet of this extended type is either 0x03 or 0x43 πŸ’– The low-order octet is used to indicate the sub-type πŸ¦‹

This is a generic community of extended type 🌸 The sub-type that defines the Value Field is to be assigned by IANA πŸ’œ

6. Operations πŸŽ€

okay so a BGP speaker can use the Extended Communities attribute to control which routing info it accepts or passes along to its peers πŸ’…

the Extended Community attribute MUST NOT be used to modify the BGP best path selection algorithm in a way that leads to forwarding loops. no forwarding loops, bestie!! πŸ”πŸš«

a BGP speaker that gets a route WITHOUT the Extended Communities attribute MAY add this attribute to the route when it passes the route along to its peers ✨

a BGP speaker that gets a route WITH the Extended Communities attribute MAY change this attribute according to its local policy πŸ¦‹

aggregation is a whole thing 🫠 by default, if a bunch of routes get aggregated and the resulting aggregate's path attributes DON'T carry the ATOMIC_AGGREGATE attribute, then the aggregate should have an Extended Communities path attribute that holds the set union of all the Extended Communities from every aggregated route. that's the default vibe! but it can be overridden with local configuration, and then how the Extended Communities attribute gets handled during aggregation is up to the local policy of whichever BGP speaker is doing the aggregating 🧚

if a route has a non-transitive extended community, the community SHOULD be removed from the route before it gets advertised across the Autonomous System boundary 🚧 BUT the community SHOULD NOT be removed when advertising across the BGP Confederation boundary. confederations are different, iykyk πŸ‘‘

a route can carry BOTH the BGP Communities attribute (defined in [RFC1997]) AND the Extended BGP Communities attribute. when that happens, the BGP Communities attribute is handled as specified in [RFC1997], and the Extended BGP Communities attribute is handled as specified in this document. two attributes, two rulebooks, zero drama πŸ’–

7. IANA Considerations πŸ“‹

every BGP Extended Community has a Type field. the IANA has created a registry called "BGP Extended Communities Type" πŸ—‚οΈ and the IANA is the one who keeps it up to date.

the Type can be regular or extended. a regular Type gets an 8-bit value, and an extended Type gets a 16-bit value πŸ”’

the value given to a regular Type MUST NOT be reused as the high-order octet when allocating an extended Type. and the high-order octet given to an extended Type MUST NOT be reused when allocating a regular Type. no double-dipping on those numbers, periodt πŸ™…β€β™€οΈ

the Type field tells you whether the Extended Community is transitive or not. future requests for a Type value must specify whether it's meant to be transitive or non-transitive πŸ¦‹

future assignments get made through either the Standards Action process from [RFC2434], the Early IANA Allocation process from [RFC4020], or the "First Come First Served" policy from [RFC2434] 🌸

here's the table summarizing the ranges for assigning Types πŸ‘€

   Type                        Standard Action         First Come
                               Early IANA Allocation   First Served
   ------------------          ---------------------   ------------

   regular, transitive          0x90-0xbf              0x00-x3f

   regular, non-transitive      0xd0-0xff              0x40-0x7f

   extended, transitive         0x9000-0xbfff          0x0000-0x3fff

   extended, non-transitive     0xd000-0xffff          0x4000-0x7fff

assignments consist of a name and the value 🏷️

the Type values 0x80-0x8f and 0xc0-0xcf for regular Types, and 0x8000-0x8fff and 0xc000-0xcfff for extended Types are reserved for Experimental use, as defined in RFC 3692 πŸ§ͺ

this document defines a class called the two-octet AS specific extended community, and the IANA is supposed to create and maintain a registry called "Two-octet AS Specific Extended Community" for it πŸŽ€ every community in this class is an extended Type. future assignments use the "First Come First Served" policy from [RFC2434]. the transitive ones use Type values 0x0000-0x00ff, and the non-transitive ones use 0x4000-0x40ff. assignments consist of a name and the value.

this document makes these assignments for the two-octet AS specific extended community:

   Name                                     Type Value
   ----                                     ----------
   two-octet AS specific Route Target       0x0002
   two-octet AS specific Route Origin       0x0003

this document also defines a class called the IPv4 address specific extended community, and the IANA is supposed to create and maintain a registry called "IPv4 Address Specific Extended Community" 🌈 every community in this class is an extended Type. future assignments use the "First Come First Served" policy from [RFC2434]. the transitive ones use Type values 0x0100-0x01ff, and the non-transitive ones use 0x4100-0x41ff. assignments consist of a name and the value.

this document makes these assignments for the IPv4 address specific extended community:

   Name                                     Type Value
   ----                                     ----------
   IPv4 address specific Route Target       0x0102
   IPv4 address specific Route Origin       0x0103

then there's the opaque extended community class 🫧 the IANA is supposed to create and maintain a registry called "Opaque Extended Community" for it. every community in this class is an extended Type. future assignments use the "First Come First Served" policy from [RFC2434]. the transitive ones use Type values 0x0300-0x03ff, and the non-transitive ones use 0x4300-0x43ff. assignments consist of a name and the value.

when you request an allocation from more than one of the registries above, you can ask for the same Type value across those registries. if possible, the IANA should accommodate that request πŸ™

8. Security Considerations πŸ”

⚠️ this is the serious part, bestie. please read it fully!

this extension to BGP has similar security implications to BGP Communities [RFC1997] πŸ›‘οΈ

it also does NOT change the underlying security issues. specifically, an operator that relies on the information carried in BGP has to have a transitive trust relationship back to the source of that information. how you set up that relationship is beyond the scope of this document, so that's a whole other mission πŸ•΅οΈβ€β™€οΈπŸ’€

9. Acknowledgements 🫢

the authors would like to thank John Hawkinson, Jeffrey Haas, Bruno Rijsman, Bill Fenner, and Alex Zinin for their suggestions and feedback. literally the best squad πŸ’œ

10. Normative References πŸ“š

   [BGP-4]        Rekhter, Y. and T. Li, "A Border Gateway Protocol 4
                  (BGP-4)", RFC 4271, January 2006.

   [RFC1997]      Chandra, R., Traina, P., and T. Li, "BGP Communities
                  Attribute", RFC 1997, August 1996.

   [RFC2119]      Bradner, S., "Key words for use in RFCs to Indicate
                  Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2434]      Narten, T. and H. Alvestrand, "Guidelines for Writing
                  an IANA Considerations Section in RFCs", BCP 26, RFC
                  2434, October 1998.

   [RFC4020]      Kompella, K. and A. Zinin, "Early IANA Allocation of
                  Standards Track Code Points", BCP 100, RFC 4020,
                  February 2005.

11. Informative References πŸ’‘

   [RFC4364]      Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private
                  Networks (VPNs)", RFC 4364, February 2006.

Authors' Addresses πŸ–ŠοΈ

   Srihari R. Sangli
   Cisco Systems, Inc.

   EMail: rsrihari@cisco.com


   Dan Tappan
   Cisco Systems, Inc.
   250 Apollo Drive
   Chelmsford, MA 01824

   EMail: tappan@cisco.com


   Yakov Rekhter
   Juniper Networks, Inc.
   1194 N. Mathilda Ave
   Sunnyvale, CA 94089

   EMail: yakov@juniper.net

Copyright (C) The Internet Society (2006).

this document is subject to the rights, licenses and restrictions in BCP 78. except as set out there, the authors keep all their rights.

this document and the information in it are provided on an "AS IS" basis. THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property πŸ”

the IETF takes no position on the validity or scope of any Intellectual Property Rights or other rights that might be claimed to apply to the technology in this document, or on whether any license under those rights might be available. it also doesn't say it has made any independent effort to find such rights. info on the procedures for rights in RFC documents is in BCP 78 and BCP 79.

copies of IPR disclosures made to the IETF Secretariat, any assurances of licenses to be made available, or the result of an attempt to get a general license or permission for implementers or users of this specification can be found in the IETF on-line IPR repository at http://www.ietf.org/ipr.

the IETF invites anyone to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology needed to implement this standard. send that info to the IETF at ietf-ipr@ietf.org.

Acknowledgement 🌷

Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).

πŸ“¦ where this page comes from