RFC 8549
Export of BGP Community Information in IP Flow Information Export (IPFIX)
RFC 8549: Export of BGP Community Information in IP Flow Information Export (IPFIX) π¦
okay bestie, this one is a Standards Track doc from the IETF, ISSN 2070-1721, dated April 2019 π
. The authors are Z. Li and R. Gu from China Mobile, plus J. Dong from Huawei Technologies π«Ά. The title block doesn't list anything it obsoletes or updates, but the body says it does not update the IPFIX spec [RFC7011] or the information model [RFC7012] π
.
Abstract π
so basically, this doc adds new Information Elements (IEs) that extend the existing BGP-related ones, so IPFIX can export BGP community info β¨. That covers the BGP Standard Communities from RFC 1997, the BGP Extended Communities from RFC 4360, and the BGP Large Communities from RFC 8092 π. With the operator's BGP community planning, traffic info can get piled up and analyzed at the community level, which means you can see traffic from different kinds of customers, services, or geographical regions π. Traffic info at that granularity is super useful for traffic analysis and engineering, obsessed π.
Status of This Memo π
this is an Internet Standards Track document π₯.
it's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community π«Ά. it got public review and was approved for publication by the Internet Engineering Steering Group (IESG) β . for more on Internet Standards, check Section 2 of RFC 7841 π.
for the current status, any errata, and how to send feedback, go to https://www.rfc-editor.org/info/rfc8549 πΈ.
Copyright Notice βοΈ
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. π
this document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as in effect on the date of publication. please read these carefully, because they spell out your rights and restrictions for this document π§Ύ. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License π.
Table of Contents ποΈ
1. Introduction ....................................................3
2. Terminology .....................................................5
3. Traffic Collection Based on BGP Community .......................6
4. IEs for BGP Standard Community ..................................7
5. IEs for BGP Extended Community ..................................8
6. IEs for BGP Large Community .....................................8
7. Operational Considerations ......................................9
8. Security Considerations ........................................10
9. IANA Considerations ............................................11
10. References ....................................................13
10.1. Normative References .....................................13
10.2. Informative References ...................................14
Appendix A. Encoding Example .....................................16
A.1. Template Record ...........................................16
A.2. Data Set ..................................................17
Acknowledgements ..................................................18
Authors' Addresses ................................................18
1. Introduction β¨
okay so IPFIX [RFC7011] gives network admins traffic flow info using the IEs defined in the "IPFIX Information Elements" registry [IANA-IPFIX] π. with that flow info, admins can tell how much traffic there is and which direction it's going, and then tune the network when needed π§. for example, the collected info can be used for traffic monitoring and, optionally, for traffic optimization based on the operator's policy π
.
the "IPFIX Information Elements" registry [IANA-IPFIX] defines these IEs for flow info at different granularities: sourceIPv4Address, sourceIPv4Prefix, destinationIPv4Address, destinationIPv4Prefix, bgpSourceAsNumber, bgpDestinationAsNumber, bgpNextHopIPv4Address, etc. π. but ngl, flow info built on those might not be totally suitable or enough, especially when traffic engineering and optimization happen in Tier 1 or Tier 2 operators' backbone networks π. like, IP address or IP prefix can be way too fine-grained for a big network π, while flow info based on the Autonomous System Number (ASN) can be too coarse π₯².
BGP community is a BGP path attribute that covers Standard Communities [RFC1997], Extended Communities [RFC4360], and Large Communities [RFC8092] π. it has a bunch of use cases, and one of the big ones is using BGP community with planned specific values to represent groups of customers, services, and geographical or topological regions, which operators do in their networks πΊοΈ. you can find detailed examples in [RFC4384], [RFC8195], and Section 3 of this document π. to understand the traffic generated 1) by different kinds of customers, 2) from different geographical or topological regions, or 3) by different kinds of customers from different regions, we need the community info that matches the traffic flow info exported by IPFIX π§©. network traffic stats at the BGP community granularity aren't just good for traffic analysis, they're also useful for other apps, like traffic optimization apps living in an IPFIX Collector, a Software-Defined Networking (SDN) controller, or a PCE π§. [COMMUNITY-TE] also says analyzing traffic at the BGP community granularity is preferred for inbound traffic engineering π. the problem is that the "IPFIX Information Elements" registry [IANA-IPFIX] didn't have any IEs for the BGP community attribute π.
flow info based on the BGP community attribute can be collected by an IPFIX Mediator (defined in [RFC6183]) π¦. the Mediator is responsible for correlating flow info with the BGP community attribute π. but no IEs are defined in [RFC6183] for exporting BGP community info in IPFIX π. and to correlate the BGP community attribute with the flow info, the Mediator has to learn BGP routes and do lookups in the BGP routing table to find the matching entry for a specific flow π« . BGP route learning and routing table lookup are not trivial for an IPFIX Mediator π. the Mediator was mainly introduced to reduce the performance requirement for the Exporter [RFC5982] πΈ. but honestly, to get info for the already-defined BGP-related IEs, like bgpSourceAsNumber, bgpDestinationAsNumber, and bgpNextHopIPv4Address, etc., the Exporter already has to hold an up-to-date BGP routing table and do lookups in it π§ . so the Exporter can get the BGP community info in that same procedure, which means the extra load from exporting community info is minimal if the Exporter is already exporting the existing BGP-related IEs β¨. It is RECOMMENDED that the BGP community information be exported by the Exporter directly using IPFIX. π
by running BGP [RFC4271] or the BGP Monitoring Protocol (BMP) [RFC7854], and doing routing table lookups to match a specific flow, IPFIX Collectors and other apps (like an SDN controller or PCE) can figure out network traffic at the BGP community granularity π. however, running BGP or BMP and doing routing table lookups aren't trivial for IPFIX Collectors and other apps either π©. plus, correlating IPFIX flow info with the BGP RIB on the Exporter (such as a router) is more accurate than doing it on a Collector, since the BGP routing table might get updated while the Collectors and other apps are receiving the IPFIX flow info β±οΈ. the Exporter can grab the BGP community info during the same procedure where it grabs other BGP-related info, so exporting the BGP community info straight from the Exporter to the Collector is both efficient and accurate π―. if Collectors and other apps only want traffic at the BGP community granularity, they don't need to run full BGP or BMP protocols when IPFIX can provide the BGP community info π. BMP does have its own application scenario though, and the mechanism in this document is not meant to replace it π«Ά.
by introducing new IEs, this document extends the existing BGP-related IEs so that IPFIX [RFC7011] can export BGP community info, including the BGP Standard Communities [RFC1997], BGP Extended Communities [RFC4360], and BGP Large Communities [RFC8092] π. flow info (including packetDeltaCount [RFC7011] [RFC7012], octetDeltaCount [RFC7011] [RFC7012], etc.) can then be accumulated and analyzed by the Collector or other apps, like an SDN controller or PCE [RFC4655], at the BGP community granularity π. this is useful for measuring the traffic generated 1) by different kinds of customers or 2) from different geographical or topological regions, according to the operator's BGP community plan πΊοΈ. the flow info can then be used by traffic engineering or traffic optimization apps, especially in the backbone network π.
the IEs introduced here apply to both IPv4 and IPv6 traffic π. both the Exporter and the IPFIX Mediator can use these IEs to export BGP community info in IPFIX π¦. when needed, the IPFIX Mediator or Collector can use these IEs to report BGP community-related flow info it gets either from Exporters or through local correlation with other IPFIX devices π.
as mentioned above, the method in this document is not the sole, definitive way to get BGP community info related to a specific traffic flow. it is, however, possible, efficient, and accurate π .
no new BGP community attributes are defined in this document π«.
note that this document does not update the IPFIX specification [RFC7011] or information model [RFC7012] π
. instead, the "IPFIX Information Elements" registry [IANA-IPFIX] holds the current complete reference for IPFIX Information Elements, per Section 1 of [RFC7012] π.
please refer to the "IPFIX Information Elements" registry [IANA-IPFIX] for the complete list of BGP-related IEs ποΈ.
please refer to Appendix A of this document for the encoding example, and Section 3 for a detailed use case π.
2. Terminology β¨
okay bestie, let's get the vocab sorted first π the big requirement words are MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL π they only count as BCP 14 key words [RFC2119] [RFC8174] when they show up in ALL CAPS, exactly like that π₯ lowercase "should" is just vibes, not a rule π
the IPFIX-specific terms are defined in Section 2 of [RFC7011] and Section 2 of [RFC6183] π¦ go read those if you want the official definitions π
and this doc uses "BGP Standard Community" to mean the BGP community attribute from [RFC1997] π we call it that so nobody mixes it up with BGP Extended Community [RFC4360] or Large Community [RFC8092] π«Ά three different things, no cap π
3. Traffic Collection Based on BGP Community π
okay so [RFC4384] introduced the idea of using BGP Standard and Extended Communities to collect geographical and topological info in the BGP routing system πΊοΈ and [RFC8195] gives examples of BGP Large Communities representing geographic regions πΈ it's giving organized π
why does any of this matter? well, traffic measured at the BGP community level shows you either 1) which kinds of customers are generating it, or 2) which geographic regions it's coming from, based on the operator's community plan π so operators can analyze and optimize traffic between different customers and regions β¨ this section shows a use case where the operator uses BGP-community traffic data to adjust network paths for different flows π¦
here's the setup π Autonomous System (AS) C provides a transit connection between ASes A and B π£οΈ the operator tags routes with different BGP communities, sorting AS A and AS B routes into groups π·οΈ communities A:X and A:Y are used for routes that started in different geographic regions inside AS A π and B:M and B:N represent different kinds of customers in AS B (B:M is mobile customers, B:N is fixed line customers) π±
by default, all traffic from AS A going to AS B (that's traffic A-B) takes path C1-C2-C3 (Path-1) through AS C π€οΈ but when the link between C1 and C2 gets congested, we can't just move all of traffic A-B onto Path C1-C4-C3 (Path-2) π¬ because then Path-2 gets congested π
+----------+
| PCE/SDN |
+-------|Controller|-------+
| +----------+ |
| |
| AS C |
| | +----------+ | |
| | +---|Router C2 |---+ | |
| | | +----------+ | | |
AS A | | |100 50| | | AS B
+--------+ | +---------+ +---------+ | +--------+
|Router A|--|--|Router C1| |Router C3|--|--|Router B|
+--------+ | +---------+ +---------+ | +--------+
Community: | |100 100| | Community:
A:X | | +----------+ | | B:M
A:Y | +---|Router C4 |---+ | B:N
+----------+
Figure 1: Traffic Collection Based on BGP Community
so if the PCE/SDN controller in AS C can get traffic info at the BGP community level, it can steer some traffic tied to certain communities (just the source or destination) or certain community pairs (source AND destination) from Path-1 to Path-2 π― based on how busy each path is π for example, it can move the traffic from community A:X off Path-1 by setting a route policy at Router C1 π or move traffic from A:Y to B:M from Path-1 to Path-2 π¦
the IEs defined in this doc let IPFIX export the BGP community info for a specific flow along with the rest of the flow info π¦ then that traffic info gets added up at the BGP community level and the PCE/SDN controller uses it to steer the right traffic from Path-1 to Path-2 π slay π
4. IEs for BGP Standard Community π
[RFC1997] defines the BGP community attribute (called "BGP Standard Community" in this doc) π it describes a group of routes that share some common properties πΈ and per [RFC1997], BGP Standard Community is treated as a 32-bit value π’
so to export BGP Standard Community info alongside the other flow info IPFIX defines, this doc introduces three new IEs π§
bgpCommunityπ used to identify that the value in this IE is a BGP Standard CommunitybgpSourceCommunityListπ a basicList [RFC6313] of bgpCommunity, used to export BGP Standard Community info corresponding to a specific flow's source IP addressbgpDestinationCommunityListπ¦ a basicList [RFC6313] of bgpCommunity, used to export BGP Standard Community info corresponding to a specific flow's destination IP address
see Section 9 ("IANA Considerations") for the full details on these three new IEs π
5. IEs for BGP Extended Community π«§
[RFC4360] defines the BGP Extended Communities attribute, which gives you a way to label the info carried in BGP π·οΈ each Extended Community is encoded as an 8-octet quantity in the format defined in [RFC4360] π’
to export BGP Extended Community info with the other flow info via IPFIX, this doc introduces three new IEs π
bgpExtendedCommunityπ used to identify that the value in this IE is a BGP Extended CommunitybgpSourceExtendedCommunityListπΈ a basicList [RFC6313] of bgpExtendedCommunity, used to export the BGP Extended Community info corresponding to a specific flow's source IP addressbgpDestinationExtendedCommunityListπ¦ a basicList [RFC6313] of bgpExtendedCommunity, used to export the BGP Extended Community info corresponding to a specific flow's destination IP address
see Section 9 ("IANA Considerations") for the full details on these three new IEs β¨
6. IEs for BGP Large Community π
[RFC8092] defines the BGP Large Communities attribute, and it's suitable for use with all Autonomous System Numbers (ASNs), including 4-octet ASNs π each BGP Large Community is encoded as a 12-octet quantity in the format defined in [RFC8092] π’ big energy π
to export BGP Large Community info with the other flow info via IPFIX, this doc introduces three new IEs π
bgpLargeCommunityπ used to identify that the value in this IE is a BGP Large CommunitybgpSourceLargeCommunityListπΈ a basicList [RFC6313] of bgpLargeCommunity, used to export the BGP Large Community info corresponding to a specific flow's source IP addressbgpDestinationLargeCommunityListπ¦ a basicList [RFC6313] of bgpLargeCommunity, used to export the BGP Large Community info corresponding to a specific flow's destination IP address
see Section 9 ("IANA Considerations") for the full details on these three new IEs π«Ά
7. Operational Considerations π§
okay this part is the practical stuff, so pay attention bestie π
the max length of an IPFIX message is 65535 bytes per [RFC7011] π and the max length of a normal BGP message is 4096 bytes per [RFC4271] π BGP communities (Standard, Extended, and Large) are BGP path attributes carried in BGP Update messages, so all of those attributes together cannot exceed the length of a BGP message, which is 4096 bytes π’ that means one IPFIX message with a max length of 65535 bytes has enough room to fit all the communities for a specific flow's source and destination IP addresses π it's giving plenty of space π
now, [EXT-MSG] extends the max size of a BGP Update message to 65535 bytes π in that case, the BGP community info for one flow could theoretically go over the length of one IPFIX message π³ but according to real network info from the field, the number of BGP communities in one BGP route is usually no more than ten π still, BGP speakers that support the extended message SHOULD only convey as many communities as they can without going over the 65535-byte IPFIX limit π«§ and the Collector, which gets an IPFIX message at max length with BGP communities in its data set, SHOULD generate a warning or log message to say the BGP communities may have been truncated because of limited message space π¨ in this case, it is recommended that the export policy of BGP communities be configured to limit them by including or excluding specific communities π
if needed, the IPFIX message length can be extended from 16 bits to 32 bits to fully solve this problem π§ but details on increasing the IPFIX message length are out of scope for this doc π ββοΈ
to line up with the sizes of the BGP Extended Community and Large Community attributes, bgpExtendedCommunity and bgpLargeCommunity are 8 octets and 12 octets respectively π if the bgpExtendedCommunity or bgpLargeCommunity IE isn't the expected size, the IPFIX Collector SHOULD ignore it π this is meant to protect implementations that use BGP logic from calling their parsing routines with invalid lengths π‘οΈ
last one! to properly process the Exporter when it receives the template asking it to report BGP community info (see Appendix A for an example) π the Exporter SHOULD get the matching BGP community info through a BGP lookup using the matching source or destination IP address of the specific traffic flow π and when it exports the IPFIX info to the Collector, the Exporter SHOULD include the corresponding BGP communities in the IPFIX message π¦ bestie you did it ππ«Ά
8. Security Considerations πβ¨
okay so bestie, this section is SERIOUS but make it cute π. This document defines new IEs for IPFIX π¦. The exact same security considerations as the IPFIX protocol specification [RFC7011] and information model [RFC7012] apply, so go read those too π .
Okay now the spicy part πΆοΈ. Systems that process BGP community information collected by IPFIX Collectors need to be aware that communities can be used as an attack vector [WEAPONIZING-BGP] π. So they should only use the community info in decisions where they're confident it's valid π. Basically, we cannot assume all BGP community information collected by IPFIX Collectors is credible and accurate. It is RECOMMENDED to only use the IPFIX-collected BGP community information that the processing system can trust π«Ά. For example, the BGP communities generated by the consecutive neighboring ASes inside the same trust domain as the processing system, meaning the consecutive neighboring ASes and the processing system are operated by one carrier π.
Next up, privacy π. [RFC7011] notes that the storage of information collected by IPFIX must be protected, and its visibility must be confined to authorized users through both technical and policy means, so the privacy of the information stays safe πΈ. [RFC7011] also gives you mechanisms to keep IPFIX data confidential and integral as it moves from an Exporting Process to a Collecting Process π. It also covers how to authenticate IPFIX Collecting and Exporting Processes β¨. If the community information contains sensitive information, the above recommendations and mechanisms are recommended π. Good news though: this document doesn't introduce any additional privacy risks π§.
9. IANA Considerations π¦
This document specifies IPFIX IEs so that BGP community information can be exported along with other flow information π. IANA has assigned the following ElementIDs for these IEs in the "IPFIX Information Elements" registry [IANA-IPFIX] π:
----------------------------------------------------------------------
|ElementID| Name |Abstract | Data Type |
| | |Data Type | Semantics |
|--------------------------------------------------------------------|
| 483 | bgpCommunity |unsigned32 | identifier |
|--------------------------------------------------------------------|
| 484 | bgpSourceCommunityList | basicList | list |
|--------------------------------------------------------------------|
| 485 |bgpDestinationCommunityList| basicList | list |
|--------------------------------------------------------------------|
| 486 | bgpExtendedCommunity |octetArray | default |
|--------------------------------------------------------------------|
| 487 | bgpSourceExtended | | |
| | CommunityList | basicList | list |
|--------------------------------------------------------------------|
| 488 | bgpDestinationExtended | | |
| | CommunityList | basicList | list |
|--------------------------------------------------------------------|
| 489 | bgpLargeCommunity |octetArray | default |
|--------------------------------------------------------------------|
| 490 |bgpSourceLargeCommunityList| basicList | list |
|--------------------------------------------------------------------|
| 491 | bgpDestinationLarge | | |
| | CommunityList | basicList | list |
|--------------------------------------------------------------------|
----------------------------------------------------------
|ElementID| Description |
|---------------------------------------------------------
| 483 | BGP community as defined in [RFC1997] |
|---------------------------------------------------------
| | basicList of zero or more bgpCommunity IEs, |
| 484 | containing the BGP communities corresponding|
| | with source IP address of a specific flow |
|---------------------------------------------------------
| | basicList of zero or more bgpCommunity IEs, |
| 485 |containing the BGP communities corresponding |
| |with destination IP address of a specific flow|
|---------------------------------------------------------
| 486 |BGP Extended Community as defined in RFC 4360;|
| |the size of this IE MUST be 8 octets |
|---------------------------------------------------------
| |basicList of zero or more bgpExtendedCommunity|
| 487 |IEs, containing the BGP Extended Communities |
| |corresponding with source IP address of |
| | a specific flow |
|---------------------------------------------------------
| |basicList of zero or more bgpExtendedCommunity|
| 488 |IEs, containing the BGP Extended Communities |
| | corresponding with destination IP address |
| | of a specific flow |
|---------------------------------------------------------
| 489 | BGP Large Community as defined in [RFC8092]; |
| | the size of this IE MUST be 12 octets |
|---------------------------------------------------------
| | basicList of zero or more bgpLargeCommunity |
| | IEs, containing the BGP Large Communities |
| 490 | corresponding with source IP address |
| | of a specific flow |
|---------------------------------------------------------
| | basicList of zero or more bgpLargeCommunity |
| | IEs, containing the BGP Large Communities |
| 491 | corresponding with destination IP address |
| | of a specific flow |
|---------------------------------------------------------
----------------------------------------------------------
|ElementID| References | Requester | Revision |
|---------------------------------------------------------
| 483 | RFC 1997 | RFC 8549 | 0 |
|---------------------------------------------------------
| 484 | RFC 6313, RFC 1997 | RFC 8549 | 0 |
|---------------------------------------------------------
| 485 | RFC 6313, RFC 1997 | RFC 8549 | 0 |
|---------------------------------------------------------
| 486 | RFC 4360 | RFC 8549 | 0 |
|---------------------------------------------------------
| 487 | RFC 6313, RFC 4360 | RFC 8549 | 0 |
|---------------------------------------------------------
| 488 | RFC 6313, RFC 4360 | RFC 8549 | 0 |
|---------------------------------------------------------
| 489 | RFC 8092 | RFC 8549 | 0 |
|---------------------------------------------------------
| 490 | RFC 6313, RFC 8092 | RFC 8549 | 0 |
|---------------------------------------------------------
| 491 | RFC 6313, RFC 8092 | RFC 8549 | 0 |
|---------------------------------------------------------
Figure 2: Updates to "IPFIX Information Elements" Registry π
10. References π
10.1. Normative References π
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC6313] Claise, B., Dhandapani, G., Aitken, P., and S. Yates,
"Export of Structured Data in IP Flow Information Export
(IPFIX)", RFC 6313, DOI 10.17487/RFC6313, July 2011,
<https://www.rfc-editor.org/info/rfc6313>.
[RFC7011] Claise, B., Ed., Trammell, B., Ed., and P. Aitken,
"Specification of the IP Flow Information Export (IPFIX)
Protocol for the Exchange of Flow Information", STD 77,
RFC 7011, DOI 10.17487/RFC7011, September 2013,
<https://www.rfc-editor.org/info/rfc7011>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
10.2. Informative References π
okay so these are the extra reads that aren't required to implement this, but they're the receipts behind the ideas π
- [COMMUNITY-TE] Shao, W., Devienne, F., Iannone, L., and J. Rougier, "On the use of BGP communities for fine-grained inbound traffic engineering", Computer Science: Networking and Internet Architecture, November 2015, <https://arxiv.org/abs/1511.08336>.
- [EXT-MSG] Bush, R., Patel, K., and D. Ward, "Extended Message support for BGP", Work in Progress, draft-ietf-idr-bgp-extended-messages-30, March 2019.
- [IANA-IPFIX] IANA, "IP Flow Information Export (IPFIX) Entities", <http://www.iana.org/assignments/ipfix/>.
- [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, <https://www.rfc-editor.org/info/rfc1997>.
- [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006, <https://www.rfc-editor.org/info/rfc4271>.
- [RFC4360] Sangli, S., Tappan, D., and Y. Rekhter, "BGP Extended Communities Attribute", RFC 4360, DOI 10.17487/RFC4360, February 2006, <https://www.rfc-editor.org/info/rfc4360>.
- [RFC4384] Meyer, D., "BGP Communities for Data Collection", BCP 114, RFC 4384, DOI 10.17487/RFC4384, February 2006, <https://www.rfc-editor.org/info/rfc4384>.
- [RFC4655] Farrel, A., Vasseur, J., and J. Ash, "A Path Computation Element (PCE)-Based Architecture", RFC 4655, DOI 10.17487/RFC4655, August 2006, <https://www.rfc-editor.org/info/rfc4655>.
- [RFC5982] Kobayashi, A., Ed. and B. Claise, Ed., "IP Flow Information Export (IPFIX) Mediation: Problem Statement", RFC 5982, DOI 10.17487/RFC5982, August 2010, <https://www.rfc-editor.org/info/rfc5982>.
- [RFC6183] Kobayashi, A., Claise, B., Muenz, G., and K. Ishibashi, "IP Flow Information Export (IPFIX) Mediation: Framework", RFC 6183, DOI 10.17487/RFC6183, April 2011, <https://www.rfc-editor.org/info/rfc6183>.
- [RFC7012] Claise, B., Ed. and B. Trammell, Ed., "Information Model for IP Flow Information Export (IPFIX)", RFC 7012, DOI 10.17487/RFC7012, September 2013, <https://www.rfc-editor.org/info/rfc7012>.
- [RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP Monitoring Protocol (BMP)", RFC 7854, DOI 10.17487/RFC7854, June 2016, <https://www.rfc-editor.org/info/rfc7854>.
- [RFC8092] Heitz, J., Ed., Snijders, J., Ed., Patel, K., Bagdonas, I., and N. Hilliard, "BGP Large Communities Attribute", RFC 8092, DOI 10.17487/RFC8092, February 2017, <https://www.rfc-editor.org/info/rfc8092>.
- [RFC8195] Snijders, J., Heasley, J., and M. Schmidt, "Use of BGP Large Communities", RFC 8195, DOI 10.17487/RFC8195, June 2017, <https://www.rfc-editor.org/info/rfc8195>.
- [WEAPONIZING-BGP] Streibelt, F., Lichtblau, F., Beverly, R., Pelsser, C., Smaragdakis, G., Bush, R., and A. Feldmann, "Weaponizing BGP Using Communities", November 2018, <https://datatracker.ietf.org/meeting/103/materials/slides-103-grow-bgp-communities-spread-their-wings-01>.
Appendix A. Encoding Example π§
okay bestie, this is the worked example π It shows exactly how the newly introduced IEs get encoded, so you can see the whole thing in action.
Here's the flow info, BGP communities included, in the table below. Every field in this example gets reported by IPFIX β¨
----------------------------------------------------------------------
| Source |Destination| BGP community | BGP community |
| IP | IP | corresponding with | corresponding with |
| | | Source IP | Destination IP |
----------------------------------------------------------------------
| 1.1.1.1 | 2.2.2.2 | 1:1001, 1:1002, 8:1001 | 2:1002, 8:1001 |
----------------------------------------------------------------------
| 3.3.3.3 | 4.4.4.4 | 3:1001, 3:1002, 8:1001 | 4:1001, 8:1001 |
----------------------------------------------------------------------
Figure 3: Flow Information Including BGP Communities
A.1. Template Record πΈ
here's the template record, the blueprint that the data records will follow π
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SET ID = 2 | Length = 24 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Template ID = 256 | Field Count = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| SourceIPv4Address = 8 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| DestinationIPv4Address = 12 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| bgpSourceCommunityList=484 | Field Length = 0xFFFF |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| bgpDestinationCommunityList | Field Length = 0xFFFF |
| | = 485 | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: Template Record Encoding Format
In this example, the Template ID is 256, and that's the number the Data Record will use. The field length for bgpSourceCommunityList and bgpDestinationCommunityList is 0xFFFF, which means the length of each of these IEs is variable. The actual length gets carried in the List Length field of the basicList format, as per [RFC6313] β¨
A.2. Data Set π
and now the data set itself, all filled in π¦
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SET ID = 256 | Length = 92 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SourceIPv4Address = 1.1.1.1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DestinationIPv4Address = 2.2.2.2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 255 | List Length = 17 |semantic=allof |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| bgpCommunity = 483 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Source Community Value 1 = 1:1001 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Source Community Value 2 = 1:1002 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Source Community Value 3 = 8:1001 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 255 | List Length = 13 |semantic=allof |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| bgpCommunity = 483 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Destination Community Value 1 = 2:1002 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Destination Community Value 2 = 8:1001 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SourceIPv4Address = 3.3.3.3 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DestinationIPv4Address = 4.4.4.4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 255 | List Length = 17 | semantic=allof|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| bgpCommunity = 483 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Source Community Value 1 = 3:1001 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Source Community Value 2 = 3:1002 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Source Community Value 3 = 8:1001 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 255 | List Length = 13 | semantic=allof|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| bgpCommunity = 483 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Destination Community Value 1 = 4:1001 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Destination Community Value 2 = 8:1001 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 5: Data Set Encoding Format
Acknowledgements π«Ά
the authors want to give a huge thank you to Benoit Claise and Paul Aitken for their comments and suggestions that helped get this document going π they also want to thank Tianran Zhou, Warren Kumari, Jeffrey Haas, Ignas Bagdonas, Stewart Bryant, Paolo Lucente, Job Snijders, Jared Mauch, Rudiger Volk, and Andrew Malis for their discussion, comments, and suggestions that made this document better β¨
Authors' Addresses π
Zhenqiang Li
China Mobile
32 Xuanwumen West Ave, Xicheng District
Beijing 100053
China
Email: li_zhenqiang@hotmail.com
Rong Gu
China Mobile
32 Xuanwumen West Ave, Xicheng District
Beijing 100053
China
Email: gurong_cmcc@outlook.com
Jie Dong
Huawei Technologies
Huawei Campus, No. 156 Beiqing Rd.
Beijing 100095
China
Email: jie.dong@huawei.com
π¦ where this page comes from
- ietf: rfc8549 2019-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms