Making BMP fruible offline
Paolo Lucente
NTT
Veemweg 23
Barneveld
3771
MT
NL
paolo@ntt.net
Camilo Cardona
NTT
164-168, Carrer de Numancia
Barcelona
08029
Spain
camilo@ntt.net
Luuk Hendriks
NLnet Labs
Science Park 400
Amsterdam
1098 XH
Netherlands
luuk@nlnetlabs.nl
2024
General
Global Routing Operations
BMP
BMP (BGP Monitoring Protocol) is perfectly suited for real-time consumption but less ideal for off-wire historical purposes. The main issue is the dependence that parsing BGP Update PDUs has on knowing which capabilities have been agreed when establishing the BGP session with the peers, which could have happened long time ago (days, weeks, months).
This document defines a new optional BMP message type, called Peer Summary, that carries a summary of the established BGP sessions along with their capabilities and that is intended to be injected in the BMP feed at configurable time intervals and/or ad-hoc whenever it is felt necessary to improve fruition of BMP data offline.

Introduction
Correctly parsing BGP Update PDUs included in BMP messages (ie. Route Monitoring) does require a stateful approach by keeping track of capabilities exchanged at BGP Open time as reported by BMP Peer Up messages.
The role of Peer Up messages is solely BGP session event logging and the long-lived nature of sessions does pose the problem that a BGP Open message may have been received long time before parsing a BGP Update making challenging a stateful approach based on receipt of Peer Up.
TLV support for BMP Route Monitoring and Peer Down Messages defines a Stateless Parsing TLV aimed at including relevant capabilities that have an impact in BGP Update message parsing as part of optional informational TLV in Route Monitoring messages. While the method is valid, in fact it does allow with minor effort to encapsulate BMP in MRT format for offline consumption as documented by Storing BMP messages in MRT Format, it comes with some drawbacks like extra verbosity and increased correlation effort at a BMP exporter.
This document defines a new optional BMP message type named Peer Summary that carries a list of the established BGP sessions, along with their capabilities. The general idea is that a Peer Summary message is composed by a sequence of one or multiple Peer TLVs with the goal of allowing a consumer to re-build the list of established BGP sessions like if the sequence of Peer Up messages was just being received live by a BMP exporter.

Terminology
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 RFC 8174 when, and only when, they appear in all capitals, as shown here.

Peer Summary message format
The Peer Summary message starts with a BMP Common Header as defined in Section 4.1 of then followed by one or multiple Peer TLVs with code-point .
Each Peer TLV is structured as a plain TLV as defined in Section 3 of. The value part contains the BMP Common Header and Peer Up Notification body as defined in Section 4.10 of.
The Peer Summary message is generated at a BMP station, it MUST encapsulate only actually received Peer Up data from BMP exporters.

  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
  +-+-+-+-+-+-+-+-+
  |    Version    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        Message Length                         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |Msg Type = TBD1|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |      Type = TBD2 (2 octets)   |     Length (2 octets)         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~   Value = Per-Peer Header + Peer Up Notification (variable)   ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |      Type = TBD2 (2 octets)   |     Length (2 octets)         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~   Value = Per-Peer Header + Peer Up Notification (variable)   ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~    			  Peer TLV 3 .. N 			  ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Third party off-wire encoding formats
While this document does define a way to facilitate replay and more in general consumption of raw BMP data offline, similar benefits may be harnessed by third party off-wire formats, in which BMP can be encapsulated into, for example MRT (Multi-Threaded Routing Toolkit) as defined by RFC 6396. As a result of that, this document does not recommend a preferred way to store BMP data offline.

Operational Considerations
The Peer Summary message injection in a BMP feed is done by an online BMP station for consumption by an offline BMP station. The advantage of creating summaries at the online BMP station (for example, as opposed to creating them at a BMP exporter) is that it has awareness of how offline data is being organized, for example if a new file is created every five minutes it may make sense to include the summary at the beginning of each file.
A BMP station receiving multiple Peer Up for the same peer should perform state compression and include in the Peer Summary the last one received, based on timestamp, at the time the summary is being generated. In other words, the summary is not meant, for example if a BGP session is flapping, as event reporting and this is left to BMP Route Event Logging.

Security Considerations
It is not believed that this document adds any additional security considerations.

IANA Considerations
IANA is asked to allocate a new Peer Summary message type in the BMP Message Types registry with value . IANA is also asked to to create a registry within the BMP group, named "BMP Peer Summary Message TLVs".
Registration procedures for this registry are:
Range | Registration Procedures
0-32767 | Standards Action
32768-65530 | First Come, First Served
65531-65534 | Experimental
65535 | Reserved
Initial values for this registry are:
Type | Description | Reference
| Peer | this document

Normative References

Acknowledgements
TBD