RFC 4384

BGP Communities for Data Collection

Network Working Group D. Meyer
Request for Comments: 4384 February 2006
BCP: 114
Category: Best Current Practice
BGP Communities for Data Collection
Status of This Memo
This document specifies an Internet Best Current Practices for the
Internet Community, and requests discussion and suggestions for
improvements. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
BGP communities (RFC 1997) are used by service providers for many
purposes, including tagging of customer, peer, and geographically
originated routes. Such tagging is typically used to control the
scope of redistribution of routes within a provider's network and to
its peers and customers. With the advent of large-scale BGP data
collection (and associated research), it has become clear that the
information carried in such communities is essential for a deeper
understanding of the global routing system. This memo defines
standard (outbound) communities and their encodings for export to BGP
route collectors.

Table of Contents
1. Introduction ....................................................22. Definitions .....................................................32.1. Peers and Peering ..........................................32.2. Customer Routes ............................................32.3. Peer Routes ................................................32.4. Internal Routes ............................................42.5. Internal More Specific Routes ..............................42.6. Special Purpose Routes .....................................42.7. Upstream Routes ............................................42.8. National Routes ............................................42.9. Regional Routes ............................................43. RFC 1997 Community Encoding and Values ..........................54. Community Values for BGP Data Collection ........................54.1. Extended Communities .......................................74.2. Four-Octet AS Specific Extended Communities ................95. Note on BGP UPDATE Packing ......................................96. Acknowledgements ................................................97. Security Considerations ........................................107.1. Total Path Attribute Length ...............................108. IANA Considerations ............................................109. References .....................................................119.1. Normative References ......................................119.2. Informative References ....................................111. Introduction
BGP communities [RFC1997] are used by service providers for many
purposes, including tagging of customer, peer, and geographically
originated routes. Such tagging is typically used to control the
scope of redistribution of routes within a provider's network and to
its customers and peers. Communities are also used for a wide
variety of other applications, such as allowing customers to set
attributes such as LOCAL_PREF [RFC1771] by sending appropriate
communities to their service provider. Other applications include
signaling various types of Virtual Private Networks (VPNs) (e.g.,
Virtual Private LAN Service (VPLS) [VPLS]), and carrying link
bandwidth for traffic engineering applications [RFC4360].
With the advent of large-scale BGP data collection [RV] [RIS] (and
associated research), it has become clear that the geographical and
topological information, as well as the relationship the provider has
to the source of a route (e.g., transit, peer, or customer), carried
in such communities is essential for a deeper understanding of the
global routing system. This memo defines standard communities for
export to BGP route collectors. These communities represent a
significant part of information carried by service providers as of

this writing, and as such could be useful for internal use by service
providers. However, such use is beyond the scope of this memo.
Finally, those involved in BGP data analysis are encouraged to verify
with their data sources as to which peers implement this scheme (as
there is a large amount of existing data as well as many legacy
peerings).
The remainder of this memo is organized as follows. Section 2
provides the definition of terms used as well as the semantics of the
communities used for BGP data collection, and Section 3 defines the
corresponding encodings for RFC 1997 [RFC1997] communities. Finally,
Section 4 defines the encodings for use with extended communities
[RFC4360].
2. Definitions
In this section, we define the terms used and the categories of
routes that may be tagged with communities. This tagging is often
referred to as coloring, and we refer to a route's "color" as its
community value. The categories defined here are loosely modeled on
those described in [WANG] and [HUSTON].
2.1. Peers and Peering
Consider two network service providers, A and B. Service providers A
and B are defined to be peers when (i) A and B exchange routes via
BGP, and (ii) traffic exchange between A and B is settlement-free.
This arrangement is also typically known as "peering". Peers
typically exchange only their respective customer routes (see
"Customer Routes" below), and hence exchange only their respective
customer traffic. See [HUSTON] for a more in-depth discussion of the
business models surrounding peers and peering.
2.2. Customer Routes
Customer routes are those routes that are heard from a customer via
BGP and are propagated to peers and other customers. Note that a
customer can be an enterprise or another network service provider.
These routes are sometimes called client routes [HUSTON].
2.3. Peer Routes
Peer routes are those routes heard from peers via BGP, and not
propagated to other peers. In particular, these routes are only
propagated to the service provider's customers.

2.4. Internal Routes
Internal routes are those routes that a service provider originates
and passes to its peers and customers. These routes are frequently
taken out of the address space allocated to a provider.
2.5. Internal More Specific Routes
Internal more specific routes are those routes that are frequently
used for circuit load balancing purposes and Interior Gateway
Protocol (IGP) route reduction. They also may correspond to customer
services that are not visible outside the service provider's network.
Internal more specific routes are not exported to any external peer.
2.6. Special Purpose Routes
Special purpose routes are those routes that do not fall into any of
the other classes described here. In those cases in which such
routes need to be distinguished, a service provider may color such
routes with a unique value. Examples of special purpose routes
include anycast routes and routes for overlay networks.
2.7. Upstream Routes
Upstream routes are typically learned from an upstream service
provider as part of a transit service contract executed with the
upstream provider.
2.8. National Routes
These are route sets that are sourced from and/or received within a
particular country.
2.9. Regional Routes
Several global backbones implement regional policy based on their
deployed footprint and on strategic and business imperatives.
Service providers often have settlement-free interconnections with an
Autonomous System (AS) in one region, and that same AS is a customer
in another region. This mandates use of regional routing, including
community attributes set by the network in question to allow easy
discrimination among regional routes. For example, service providers
may treat a route set received from another service provider in
Europe differently than the same route set received in North America,
as it is common practice to sell transit in one region while peering
in the other.

3. RFC 1997 Community Encoding and Values
In this section, we provide RFC 1997 [RFC1997] community values for
the categories described above. RFC 1997 communities are encoded as
BGP Type Code 8, and are treated as 32-bit values ranging from
0x0000000 through 0xFFFFFFF. The values 0x0000000 through 0x0000FFFF
and 0xFFFF0000 through 0xFFFFFFFF are reserved.
The best current practice among service providers is to use the
high-order two octets to represent the provider's AS number, and the
low-order two octets to represent the classification of the route, as
depicted below:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| <AS> | <Value> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where <AS> is the 16-bit AS number. For example, the encoding
0x2A7C029A would represent the AS 10876 with value 666.
4. Community Values for BGP Data Collection
In this section, we define the RFC 1997 community encoding for the
route types described above for use in BGP data collection. It is
anticipated that a service provider's internal community values will
be converted to these standard values for output to a route
collector.
This memo follows the best current practice of using the basic format
<AS>:<Value>. The values for the route categories are described in
the following table:

4.2. Four-Octet AS Specific Extended Communities
The four-octet AS specific extended community is encoded as follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0x02 | 0x0008 | Global Administrator |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Global Administrator (cont.) | 0x10F2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
In this case, the four-octet Global Administrator sub-field contains
a four-octet Autonomous System number assigned by the IANA.
5. Note on BGP UPDATE Packing
Note that data collection communities have the potential of making
the attribute set of a specific route more unique than it would be
otherwise (since each route collects data that is specific to its
path inside one or more ASes). This, in turn, can affect whether
multiple routes can be grouped in the same BGP update message, and it
may lead to increased use of bandwidth, router CPU cycles, and
memory.
6. Acknowledgements
The community encoding described in this memo germinated from an
interesting suggestion from Akira Kato at WIDE. In particular, the
idea would be to use the collection community values to select paths
that would result in (hopefully) more efficient access to various
services. For example, in the case of RFC 3258 [RFC3258] based DNS
anycast service, BGP routers may see multiple paths to the same
prefix, and others might be coming from the same origin with
different paths, but others might be from different region/country
(with the same origin AS).
Joe Abley, Randy Bush, Sean Donelan, Xenofontas Dimitropoulos, Vijay
Gill, John Heasley, Geoff Huston, Steve Huter, Michael Patton,
Olivier Marce, Ryan McDowell, Rob Rockell, Rob Thomas, Pekka Savola,
Patrick Verkaik, and Alex Zinin all made many insightful comments on
early versions of this document. Henk Uijterwaal suggested the use
of the ISO-3166-2 country codes.

7. Security Considerations
While this memo introduces no additional security considerations into
the BGP protocol, the information contained in the communities
defined in this memo may in some cases reveal network structure that
was not previously visible outside the provider's network. As a
result, care should be taken when exporting such communities to route
collectors. Finally, routes exported to a route collector should
also be tagged with the NO_EXPORT community (0xFFFFFF01).
7.1. Total Path Attribute Length
The communities described in this memo are intended for use on egress
to a route collector. Hence an operator may choose to overwrite its
internal communities with the values specified in this memo when
exporting routes to a route collector. However, operators should in
general ensure that the behavior of their BGP implementation is
well-defined when the addition of an attribute causes a PDU to exceed
4096 octets. For example, since it is common practice to use
community attributes to implement policy (among other functionality
such as allowing customers to set attributes such as LOCAL_PREF), the
behavior of an implementation when the attribute space overflows is
crucial. Among other behaviors, an implementation might usurp the
intended attribute data or otherwise cause indeterminate failures.
These behaviors can result in unanticipated community attribute sets,
and hence result in unintended policy implications.
8. IANA Considerations
This memo assigns a new Sub-Type for the AS specific extended
community type in the First Come First Served extended transitive
category. The IANA has assigned Sub-Type 0x0008 as defined in
Section 4.1.
In addition, the IANA has created two registries for BGP Data
Collection Communities, one for standard communities and one for
extended communities. Both of these registries will initially be
populated by the values described in Section 4. IETF Consensus, as
described in [RFC2434], usually through the Global Routing Operations
Working Group (grow), is required for the assignment of new values in
these registries (in particular, for <Value> or <R> in the table of
values for the route categories in Section 4).

Full Copyright Statement
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and 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 regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).