RFC 8671

Support for Adj-RIB-Out in the BGP Monitoring Protocol (BMP)

๐Ÿ“… published November 2019, from ietf

RFC 8671: Support for Adj-RIB-Out in the BGP Monitoring Protocol (BMP) ๐Ÿ’–

Okay so this is RFC 8671 ๐ŸŽ€, and it's all about giving BMP access to the Adj-RIB-Out. It's a Standards Track doc, published in November 2019 under ISSN 2070-1721. It updates RFC 7854 (that's BMP itself) and doesn't obsolete anything. The authors are T. Evens and S. Bayraktar from Cisco Systems, P. Lucente from NTT Communications, P. Mi from Tencent, and S. Zhuang from Huawei. Iconic team ๐Ÿ‘‘


Abstract โœจ

The BGP Monitoring Protocol (BMP) only defines access to the Adj-RIB-In Routing Information Bases (RIBs). This document updates BMP (RFC 7854) by adding access to the Adj-RIB-Out RIBs. It also adds a new flag to the peer header to distinguish between Adj-RIB-In and Adj-RIB-Out. ๐Ÿฆ‹

Status of This Memo ๐Ÿ“œ

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8671.

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) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to 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 are provided without warranty as described in the Simplified BSD License.

Table of Contents ๐Ÿ“

   1.  Introduction
   2.  Terminology
   3.  Definitions
   4.  Per-Peer Header
   5.  Adj-RIB-Out
     5.1.  Post-policy
     5.2.  Pre-policy
   6.  BMP Messages
     6.1.  Route Monitoring and Route Mirroring
     6.2.  Statistics Report
     6.3.  Peer Up and Down Notifications
       6.3.1.  Peer Up Information
   7.  Other Considerations
     7.1.  Peer and Update Groups
     7.2.  Changes to Existing BMP Session
   8.  Security Considerations
   9.  IANA Considerations
     9.1.  Addition to BMP Peer Flags Registry
     9.2.  Additions to BMP Statistics Types Registry
     9.3.  Addition to BMP Initiation Message TLVs Registry
   10. Normative References
   Acknowledgements
   Contributors
   Authors' Addresses

1. Introduction ๐Ÿ’…

Okay so BMP (the BGP Monitoring Protocol ๐Ÿ‘€) defines monitoring of the received (e.g., Adj-RIB-In) Routing Information Bases (RIBs) per peer. The pre-policy Adj-RIB-In gives a BMP receiver all the RIB data before any policy has been applied. The post-policy Adj-RIB-In gives a BMP receiver all the RIB data after policy filters and/or modifications have been applied. For example, when an inbound policy changes attributes or filters stuff, pre-policy has the info from before those changes, and post-policy has the changed data or just doesn't have the filtered data. It's giving before-and-after ๐Ÿซถ

Watching the received updates the router got before any policy touched them is the main level of monitoring for most use cases. Inbound policy validation and auditing are the big reasons to turn on post-policy monitoring. โœจ

For a BMP receiver to get any BGP data at all, the BMP sender (e.g., router) needs an established BGP peering session and needs to be actively receiving updates for an Adj-RIB-In. No session, no data, periodt ๐Ÿ’€

Only being able to monitor the Adj-RIB-In is kind of limiting for what BMP receivers can see through BMP senders (e.g., routers). It's a problem when the receiving end of the BGP peer isn't enabled for BMP or isn't reachable for administrative reasons. Like, a service provider advertises prefixes to a customer, but the service provider can't see what it advertises via BMP. And asking the customer to turn on BMP and monitor the Adj-RIB-In isn't realistic ๐Ÿ˜ญ

BMP [RFC7854] only defines Adj-RIB-In being sent to BMP receivers. This document updates the per-peer header defined in Section 4.2 of [RFC7854] by adding a new flag to tell Adj-RIB-In and Adj-RIB-Out apart. BMP senders use the new flag to send either Adj-RIB-In or Adj-RIB-Out. ๐Ÿฆ‹

Adding Adj-RIB-Out lets a BMP sender show BMP receivers what it advertises to BGP peers. That's super handy for outbound policy validation and for keeping an eye on the routes that were advertised ๐ŸŒธ

2. Terminology ๐Ÿ“–

Here's the fine print, bestie. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. Lowercase is just regular vibes ๐Ÿ™ˆ

3. Definitions ๐Ÿงš

  • Adj-RIB-Out: As defined in [RFC4271], "The Adj-RIBs-Out contains the routes for advertisement to specific peers by means of the local speaker's UPDATE messages."
  • Pre-policy Adj-RIB-Out: The result before applying the outbound policy to an Adj-RIB-Out. This normally would match what is in the local RIB.
  • Post-policy Adj-RIB-Out: The result of applying outbound policy to an Adj-RIB-Out. This MUST convey to the BMP receiver what is actually transmitted to the peer. ๐Ÿ’œ

4. Per-Peer Header ๐ŸŽ€

The per-peer header has the same structure and flags as defined in Section 4.2 of [RFC7854] with the addition of the O flag as shown here:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |V|L|A|O| Resv  |
   +-+-+-+-+-+-+-+-+
  • The O flag indicates Adj-RIB-In if set to 0 and Adj-RIB-Out if set to 1.

The existing flags are defined in Section 4.2 of [RFC7854], and the remaining bits are reserved for future use. They MUST be transmitted as 0, and their values MUST be ignored on receipt. Watch those reserved bits, they're not your problem ๐Ÿ™ƒ

When the O flag is set to 1, the following fields in the per-peer header are redefined:

  • Peer Address: The remote IP address associated with the TCP session over which the encapsulated Protocol Data Unit (PDU) is sent.
  • Peer AS: The Autonomous System number of the peer to which the encapsulated PDU is sent.
  • Peer BGP ID: The BGP Identifier of the peer to which the encapsulated PDU is sent.
  • Timestamp: The time when the encapsulated routes were advertised (one may also think of this as the time when they were installed in the Adj-RIB-Out), expressed in seconds and microseconds since midnight (zero hour), January 1, 1970 (UTC). If zero, the time is unavailable. Precision of the timestamp is implementation-dependent. โญ

5. Adj-RIB-Out ๐ŸŒท

5.1. Post-policy

The primary use case in monitoring Adj-RIB-Out is to monitor the updates transmitted to a BGP peer after outbound policy has been applied. These updates reflect the result after modifications and filters have been applied (e.g., post-policy Adj-RIB-Out). Some attributes are set when the BGP message is transmitted, such as next hop. Post-policy Adj-RIB-Out MUST convey to the BMP receiver what is actually transmitted to the peer. So the receiver sees the real deal, no cap ๐Ÿ’…

The L flag MUST be set to 1 to indicate post-policy.

5.2. Pre-policy

Similar to Adj-RIB-In policy validation, pre-policy Adj-RIB-Out can be used to validate and audit outbound policies. For example, a comparison between pre-policy and post-policy can be used to validate the outbound policy. Compare and contrast, it's the whole point ๐Ÿ”ฅ

Depending on the BGP peering session type -- Internal BGP (IBGP), IBGP route reflector client, External BGP (EBGP), BGP confederations, route server client -- the candidate routes that make up the pre-policy Adj-RIB-Out do not contain all local RIB routes. Pre-policy Adj-RIB-Out conveys only routes that are available based on the peering type. Post-policy represents the filtered/changed routes from the available routes.

Some attributes are set only during transmission of the BGP message, i.e., post-policy. It is common that the next hop may be null, loopback, or similar during the pre-policy phase. All mandatory attributes, such as next hop, MUST be either zero or have an empty length if they are unknown at the pre-policy phase completion. The BMP receiver will treat zero or empty mandatory attributes as self-originated. It's giving "I did this myself" energy ๐Ÿฆ‹

The L flag MUST be set to 0 to indicate pre-policy.

6. BMP Messages ๐Ÿซง

Many BMP messages have a per-peer header, but some are not applicable to Adj-RIB-In or Adj-RIB-Out monitoring, such as Peer Up and Down Notifications. Unless otherwise defined, the O flag should be set to 0 in the per-peer header in BMP messages.

6.1. Route Monitoring and Route Mirroring

The O flag MUST be set accordingly to indicate if the route monitor or route mirroring message conveys Adj-RIB-In or Adj-RIB-Out. Match the flag to what the message is actually carrying, iykyk ๐ŸŒˆ

6.2. Statistics Report

The Statistics Report message has a Stat Type field to indicate the statistic carried in the Stat Data field. Statistics report messages are not specific to Adj-RIB-In or Adj-RIB-Out and MUST have the O flag set to zero. The O flag SHOULD be ignored by the BMP receiver.

This document defines the following new statistics types:

  • Stat Type = 14: Number of routes in pre-policy Adj-RIB-Out. This statistics type is 64-bit Gauge. ๐Ÿ“
  • Stat Type = 15: Number of routes in post-policy Adj-RIB-Out. This statistics type is 64-bit Gauge.
  • Stat Type = 16: Number of routes in per-AFI/SAFI pre-policy Adj-RIB-Out. The value is structured as: 2-byte Address Family Identifier (AFI), 1-byte Subsequent Address Family Identifier (SAFI), followed by a 64-bit Gauge.
  • Stat Type = 17: Number of routes in per-AFI/SAFI post-policy Adj-RIB-Out. The value is structured as: 2-byte Address Family Identifier (AFI), 1-byte Subsequent Address Family Identifier (SAFI), followed by a 64-bit Gauge. ๐Ÿ‘‘

6.3. Peer Up and Down Notifications

Peer Up and Down Notifications convey BGP peering session state to BMP receivers. The state is independent of whether or not route monitoring or route mirroring messages will be sent for Adj-RIB-In, Adj-RIB-Out, or both. BMP receiver implementations SHOULD ignore the O flag in Peer Up and Down Notifications. Session state and route data are separate vibes ๐Ÿงš

6.3.1. Peer Up Information

This document defines the following Peer Up Information TLV type:

  • Type = 4: Admin Label. The Information field contains a free-form UTF-8 string whose byte length is given by the Information Length field. The value is administratively assigned. There is no requirement to terminate the string with null or any other character.

Multiple Admin Labels can be included in the Peer Up Notification. When multiple Admin Labels are included, the BMP receiver MUST preserve their order. Order matters, don't scramble it ๐Ÿ’–

The Admin Label is optional.

To be continued in part 2, where we get into Section 7 (Other Considerations) and everything after it โœจ

7.1. Peer and Update Groups โœจ

okay so peer and update groups are how implementations bundle up updates that get shared by lots of peers ๐Ÿซถ it's an efficiency thing inside the implementation, and it is NOT a true picture of what actually goes out to a peer, whether that's pre-policy or post-policy ๐Ÿ’…

the reason you'd even monitor post-policy Adj-RIB-Out is to double-check that the egress updates are exactly what you expect ๐Ÿ‘€ like, wholesale peers should NEVER have routes tagged with community X:Y sent to them ๐Ÿ™…โ€โ™€๏ธ and here's the thing: there could be hundreds of wholesale peers, but honestly just one peer can represent the whole group ๐ŸŽ€

now, BMP-wise, you'd think putting a group name in the Peer Up would be simple, right? ๐Ÿฅบ it's lowkey more complicated than that ๐Ÿ˜ญ BGP implementations have gotten SO structured with their policy grouping, like session-based, AFI/SAFI-based, and template-based group policy inheritance ๐ŸŒˆ

and that level of structure and inheritance doesn't boil down to a simple peer group name or ID, like "wholesale peer" ๐Ÿ’€

so this document defines a brand new Admin Label type for Peer Up Information TLVs (Section 6.3.1) that you can use instead of needing a group name โœจ these labels have administrative scope relevance ๐Ÿ’œ for example, the labels type=wholesale and region=west could be used to monitor the expected policies ๐Ÿฆ‹

and configuring those labels and assigning them to peers is totally BGP implementation-specific ๐Ÿ“

7.2. Changes to Existing BMP Session ๐Ÿงš

bestie, if anything changes that alters how an existing BMP session behaves (like changing filtering or table names), the session MUST be bounced with a Peer Down/Peer Up sequence ๐Ÿ” no exceptions, no cap ๐Ÿšซ

8. Security Considerations ๐Ÿ’€๐Ÿ”’

the considerations in Section 11 of [RFC7854] apply to this document ๐Ÿ“– implementations of this protocol SHOULD require establishing sessions with authorized and trusted monitoring devices ๐Ÿ›ก๏ธ it's also believed that this document does not add any additional security considerations ๐Ÿคž (but still, lock those sessions down, periodt ๐Ÿ”)

9. IANA Considerations ๐Ÿ“‹๐ŸŽ€

IANA has assigned the following new parameters to the "BGP Monitoring Protocol (BMP) Parameters" registry (https://www.iana.org/assignments/bmp-parameters/) ๐ŸŒธ

9.1. Addition to BMP Peer Flags Registry ๐Ÿณ๏ธโ€๐ŸŒˆ

IANA made this assignment for the per-peer header flag defined in Section 4 of this document โœจ

+------+-------------+-----------+
| Flag | Description | Reference |
+======+=============+===========+
| 3    | O flag      | RFC 8671  |
+------+-------------+-----------+

  Table 1: Addition to the "BMP
       Peer Flags" Registry

9.2. Additions to BMP Statistics Types Registry ๐Ÿ“Š

IANA made the following assignment for the four statistics types defined in Section 6.2 of this document ๐Ÿ’–

+-----------+------------------------------+-----------+
| Stat Type | Description                  | Reference |
+===========+==============================+===========+
| 14        | Number of routes in pre-     | RFC 8671  |
|           | policy Adj-RIB-Out           |           |
+-----------+------------------------------+-----------+
| 15        | Number of routes in post-    | RFC 8671  |
|           | policy Adj-RIB-Out           |           |
+-----------+------------------------------+-----------+
| 16        | Number of routes in per-AFI/ | RFC 8671  |
|           | SAFI pre-policy Adj-RIB-Out  |           |
+-----------+------------------------------+-----------+
| 17        | Number of routes in per-AFI/ | RFC 8671  |
|           | SAFI post-policy Adj-RIB-Out |           |
+-----------+------------------------------+-----------+

     Table 2: Additions to the "BMP Statistics Types"
                         Registry

9.3. Addition to BMP Initiation Message TLVs Registry ๐ŸŒˆ

IANA made the following assignment per Section 6.3.1 of this document ๐Ÿฆ‹

+------+-------------+-----------+
| Type | Description | Reference |
+======+=============+===========+
| 4    | Admin Label | RFC 8671  |
+------+-------------+-----------+

  Table 3: Addition to the "BMP
      Initiation Message TLVs"
              Registry

10. 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>.

[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>.

[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>.

[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>.

Acknowledgements ๐Ÿ™

the authors would like to thank John Scudder and Mukul Srivastava for their valuable input ๐Ÿซถ

Contributors ๐ŸŒŸ

the following individuals contributed to this document ๐Ÿ’œ

  • Manish Bhardwaj, Cisco Systems
  • Xianyu Zheng, Tencent
  • Wei Guo, Tencent
  • Shugang Cheng, H3C

Authors' Addresses ๐Ÿ“ฎ

Tim Evens Cisco Systems 2901 Third Avenue, Suite 600 Seattle, WA 98121 United States of America

Email: tievens@cisco.com

Serpil Bayraktar Cisco Systems 3700 Cisco Way San Jose, CA 95134 United States of America

Email: serpil@cisco.com

Paolo Lucente NTT Communications Siriusdreef 70-72 2132 Hoofddorp Netherlands

Email: paolo@ntt.net

Penghui Mi China 200233 Shanghai Tengyun Building, Tower A, No. 397 Tianlin Road Tencent

Email: Penghui.Mi@gmail.com

Shunwan Zhuang China 100095 Beijing Huawei Building, No.156 Beiqing Rd. Huawei

Email: zhuangshunwan@huawei.com

๐Ÿ“ฆ where this page comes from