RFC 4360
BGP Extended Communities Attribute
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 Notice β
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
Full Copyright Statement Β©οΈ
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
- ietf: rfc4360 2006-02
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms