RFC 9069 | BMP Loc-RIB | February 2022 |
Evens, et al. | Standards Track | [Page] |
The BGP Monitoring Protocol (BMP) defines access to local Routing Information Bases (RIBs). This document updates BMP (RFC 7854) by adding access to the Local Routing Information Base (Loc-RIB), as defined in RFC 4271. The Loc-RIB contains the routes that have been selected by the local BGP speaker's Decision Process.¶
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/rfc9069.¶
Copyright (c) 2022 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document defines a mechanism to monitor the BGP Loc-RIB state of remote BGP instances without the need to establish BGP peering sessions. BMP [RFC7854] does not define a method to send the BGP instance Loc-RIB. It does define locally originated routes in Section 8.2 of [RFC7854], but these routes are defined as the routes that originated into BGP (e.g., Section 9.4 of [RFC4271]). Loc-RIB includes all selected received routes from BGP peers in addition to locally originated routes.¶
Figure 1 shows the flow of received routes from one or more BGP peers into the Loc-RIB.¶
The following are some use cases for Loc-RIB access:¶
The Adj-RIB-In for a given peer post-policy may contain hundreds of thousands of routes, with only a handful of routes selected and installed in the Loc-RIB after best-path selection. Some monitoring applications, such as those that need only to correlate flow records to Loc-RIB entries, only need to collect and monitor the routes that are actually selected and used.¶
Requiring the applications to collect all Adj-RIB-In post-policy data forces the applications to receive a potentially large unwanted data set and to perform the BGP decision process selection, which includes having access to the interior gateway protocol (IGP) next-hop metrics. While it is possible to obtain the IGP topology information using BGP - Link State (BGP-LS), it requires the application to implement Shortest Path First (SPF) and possibly Constrained Shortest Path First (CSPF) based on additional policies. This is overly complex for such a simple application that only needs to have access to the Loc-RIB.¶
This document adds Loc-RIB to the BGP Monitoring Protocol and replaces Section 8.2 of [RFC7854] ("Locally Originated Routes").¶
Loc-RIB is used to build Adj-RIB-Out when advertising routes to a peer. It is therefore possible to derive the Loc-RIB of a router by monitoring the Adj-RIB-In pre-policy from another router. This becomes overly complex and error prone when considering the number of peers being monitored per router.¶
The setup needed to monitor the Loc-RIB of a router requires another router with a peering session to the target router that is to be monitored. As shown in Figure 2, the target router Loc-RIB is advertised via the Adj-RIB-Out to the BMP router over a standard BGP peering session. The BMP router then forwards the Adj-RIB-In pre-policy to the BMP receiver.¶
A BMP lacking access to Loc-RIB introduces the need for additional resources:¶
Many complexities are introduced when using a received Adj-RIB-In to infer a router Loc-RIB:¶
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 RFC 2119 [RFC2119] RFC 8174 [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
A new peer type is defined for Loc-RIB to indicate that it represents the router Loc-RIB, which may have a route distinguisher (RD). Section 4.2 of [RFC7854] defines a Local Instance Peer type, which is for the case of non-RD peers that have an instance identifier.¶
This document defines the following new peer type:¶
If locally sourced routes are communicated using BMP, they MUST be conveyed using the Loc-RIB Instance Peer Type.¶
The per-peer header flags for the Loc-RIB Instance Peer Type are defined as follows:¶
0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |F| | | | | | | | +-+-+-+-+-+-+-+-+¶
The Loc-RIB contains all routes selected by the BGP Decision Process as described in Section 9.1 of [RFC4271]. These routes include those learned from BGP peers via its Adj-RIBs-In post-policy, as well as routes learned by other means as per Section 9.4 of [RFC4271]. Examples of these include redistribution of routes from other protocols into BGP or those otherwise locally originated (i.e., aggregate routes).¶
As described in Section 6.1.2, a subset of Loc-RIB routes MAY be sent to a BMP collector by setting the F flag.¶
All peer messages that include a per-peer header as defined in Section 4.2 of [RFC7854] MUST use the following values:¶
Peer Up notifications follow Section 4.10 of [RFC7854] with the following clarifications:¶
The following Peer Up Information TLV type is added:¶
Type = 3: VRF/Table Name. The Information field contains a UTF-8 string whose value MUST be equal to the value of the VRF or table name (e.g., RD instance name) being conveyed. The string size MUST be within the range of 1 to 255 bytes.¶
The VRF/Table Name TLV is optionally included to support implementations that may not have defined a name. If a name is configured, it MUST be included. The default value of "global" MUST be used for the default Loc-RIB instance with a zero-filled distinguisher. If the TLV is included, then it MUST also be included in the Peer Down notification.¶
The Information field contains a UTF-8 string whose value MUST be equal to the value of the VRF or table name (e.g., RD instance name) being conveyed. The string size MUST be within the range of 1 to 255 bytes.¶
The VRF/Table Name TLV is optionally included to support implementations that may not have defined a name. If a name is configured, it MUST be included. The default value of "global" MUST be used for the default Loc-RIB instance with a zero-filled distinguisher. If the TLV is included, then it MUST also be included in the Peer Down notification.¶
Multiple TLVs of the same type can be repeated as part of the same message, for example, to convey a filtered view of a VRF. A BMP receiver should append multiple TLVs of the same type to a set in order to support alternate or additional names for the same peer. If multiple strings are included, their ordering MUST be preserved when they are reported.¶
The Peer Down notification MUST use reason code 6. Following the reason is data in TLV format. The following Peer Down Information TLV type is defined:¶
Route Monitoring messages are used for initial synchronization of the Loc-RIB. They are also used to convey incremental Loc-RIB changes.¶
As described in Section 4.6 of [RFC7854], "Following the common BMP header and per-peer header is a BGP Update PDU."¶
Loc-RIB Route Monitoring messages MUST use a 4-byte ASN encoding as indicated in the Peer Up sent OPEN message (Section 5.2) capability.¶
State compression and throttling SHOULD be used by a BMP sender to reduce the amount of Route Monitoring messages that are transmitted to BMP receivers. With state compression, only the final resultant updates are sent.¶
For example, prefix 192.0.2.0/24 is updated in the Loc-RIB 5 times within 1 second. State compression of BMP Route Monitoring messages results in only the final change being transmitted. The other 4 changes are suppressed because they fall within the compression interval. If no compression was being used, all 5 updates would have been transmitted.¶
A BMP receiver should expect that the granularity of Loc-RIB Route Monitoring can vary depending on the BMP sender implementation.¶
Section 4.7 of [RFC7854] defines Route Mirroring for verbatim duplication of messages received. This is not applicable to Loc-RIB as PDUs are originated by the router. Any received Route Mirroring messages SHOULD be ignored.¶
Not all Stat Types are relevant to Loc-RIB. The Stat Types that are relevant are listed below:¶
There are several methods for a BGP speaker to implement Loc-RIB efficiently. In all methods, the implementation emulates a peer with Peer Up and Down messages to convey capabilities as well as Route Monitor messages to convey Loc-RIB. In this sense, the peer that conveys the Loc-RIB is a locally emulated peer.¶
There MUST be at least one emulated peer for each Loc-RIB instance, such as with VRFs. The BMP receiver identifies the Loc-RIB by the peer header distinguisher and BGP ID. The BMP receiver uses the VRF/Table Name from the Peer Up information to associate a name with the Loc-RIB.¶
In some implementations, it might be required to have more than one emulated peer for Loc-RIB to convey different address families for the same Loc-RIB. In this case, the peer distinguisher and BGP ID should be the same since they represent the same Loc-RIB instance. Each emulated peer instance MUST send a Peer Up with the OPEN message indicating the address family capabilities. A BMP receiver MUST process these capabilities to know which peer belongs to which address family.¶
There may be use cases where BMP receivers should only receive specific routes from Loc-RIB. For example, IPv4 unicast routes may include internal BGP (IBGP), external BGP (EBGP), and IGP, but only routes from EBGP should be sent to the BMP receiver. Alternatively, it may be that only IBGP and EBGP should be sent and IGP redistributed routes excluded. In these cases where the Loc-RIB is filtered, the F flag is set to 1 to indicate to the BMP receiver that the Loc-RIB is filtered. If multiple filters are associated with the same Loc-RIB, a table name MUST be used in order to allow a BMP receiver to make the right associations.¶
In case of any change that results in the alteration of behavior of an existing BMP session, i.e., changes to filtering and table names, the session MUST be bounced with a Peer Down / Peer Up sequence.¶
The same considerations as in Section 11 of [RFC7854] apply to this document. Implementations of this protocol SHOULD require that sessions only be established with authorized and trusted monitoring devices. It is also believed that this document does not introduce any additional security considerations.¶
IANA has assigned new parameters to the "BGP Monitoring Protocol (BMP) Parameters" registry.¶
IANA has registered the following new peer type (Section 4.1):¶
Peer Type | Description |
---|---|
3 | Loc-RIB Instance Peer |
IANA has renamed "BMP Peer Flags" to "BMP Peer Flags for Peer Types 0 through 2" and created a new registry named "BMP Peer Flags for Loc-RIB Instance Peer Type 3".¶
This document defines peer flags that are specific to the Loc-RIB Instance Peer Type. IANA has registered the following in the "BMP Peer Flags for Loc-RIB Instance Peer Type 3" registry:¶
Flag | Description |
---|---|
0 | F flag |
As noted in Section 4.2, the F flag indicates that the Loc-RIB is filtered. This indicates that the Loc-RIB does not represent the complete routing table.¶
Flags 1 through 7 are unassigned. The registration procedure for the registry is Standards Action.¶
IANA has renamed the "BMP Initiation Message TLVs" registry to "BMP Initiation and Peer Up Information TLVs". Section 4.4 of [RFC7854] indicates that both Initiation and Peer Up share the same information TLVs. This document defines the following new BMP Peer Up Information TLV type (Section 5.2.1):¶
Type | Description |
---|---|
3 | VRF/Table Name |
The Information field contains a UTF-8 string whose value MUST be equal to the value of the VRF or table name (e.g., RD instance name) being conveyed. The string size MUST be within the range of 1 to 255 bytes.¶
IANA has registered the following new BMP Peer Down reason code (Section 5.3):¶
Type | Description |
---|---|
6 | Local system closed, TLV data follows |
Per this document, IANA has marked the F Flag entry in the "BMP Peer Flags for Peer Types 0 through 2" registry as "deprecated".¶
The authors would like to thank John Scudder, Jeff Haas, and Mukul Srivastava for their valuable input.¶