Use of BGP for Opaque SignalingFacebook1 Hacker WayMenlo ParkCA94025USpetr@fb.comJuniper Networks1133 Innovation WaySunnyvaleCA94089USexa@juniper.netJuniper Networks1194 N. Mathilda AveSunnyvaleCA94089USroque@juniper.netSalesforce.com IncThe Landmark @ One Market, ST 300San FranciscoCA94105USenkposong@salesforce.com
Routing
Inter-Domain RoutingInternet DraftBGPOpaqueKey-Value
Border Gateway Protocol with multi-protocol extensions (MP-BGP) enables the use of the protocol for dissemination of virtually any information. This document proposes a new Address Family/Subsequent Address Family to be used for distribution of opaque data. This functionality is intended to be used by applications other than BGP for exchange of their own data on top of BGP mesh. The structure of such data SHOULD NOT be interpreted by the regular BGP speakers, rather the goal is to use BGP purely as a convenient and scalable communication system.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Implementation of Multiprotocol Extensions for BGP-4 gives the ability to pass arbitrary data in BGP protocol messages. This capability has been leveraged by many for dissemination of non-routing related information over BGP (e.g. "Dissemination of Flow Specification Rules" as well as "North-Bound Distribution of Link-State and TE Information using BGP"). However, there has been no channel defined explicitly to disseminate data with arbitrary payload. The intended use case is for applications other than BGP to leverage the protocol machinery for distribution (broadcasting) of their own state in the network domain. Publishers and consumers will use BGP UPDATE messages over TCP transport to submit and receive opaque data. It is up to the BGP implementation to provide a custom API for message producers or consumers, if needed.
This document introduces a new AFI known as a "BGP Opaque Data AFI", with the actual code-point value to be assigned by IANA. The purpose of this AFI is to exchange opaque information within a BGP network. The propagation scope of the opaque data is to be controlled by the usual means of BGP policy, except that the policy SHOULD not match on NLRI information in any form other than an opaque string.
This document introduces a new SAFI known as "BGP Key-Value SAFI" with the actual code-point value to be assigned by IANA. The purpose of this SAFI is exchange of opaque information structured as Key-Value associations.
This document introduces a new SAFI known as a "BGP VPN Key-Value SAFI" with the actual code-point value to be assigned by IANA. The purpose of this SAFI is exchange of opaque information structured as a Key-Value association within a Virtual Private Network provided as a service. The defines a method and procedures for implementing VPNs using BGP as a control plane. All the procedures of apply to the BGP VPN Key-Value SAFI. Under this SAFI, the NLRI for the opaque information has the mandatory 8 bytes of Route Distinguisher at the beginning of the NLRI field.
A BGP speaker that wishes to exchange Opaque Data MUST use the Multiprotocol Extensions Capability Code, as defined in , to advertise the corresponding AFI/SAFI pair.
This document proposes a distributed, eventually consistent Key-Value store on top of existing BGP protocol transport mechanism. The "Key" and "Value" portions are to be encoded within the NLRI part of MP_REACH_NLRI attribute.
Publishers advertise keys along with associated values into the routing domain. The BGP network disseminates that state by propagating the encoded data following the usual BGP protocol operations.
Consumers receive the information via BGP protocol UPDATE messages, active as passively listening BGP speakers. Only publishers and consumers of the opaque data are supposed to interpret its contents. The rest of the BGP network acts merely as a dissemination system.
Multiple publishers can advertise the same key bound to different values. Only the "Key" part of MP_REACH_NLRI filed MUST be used to differentiate unique advertisements in such case. It is also possible for the advertised associations to have the same Key-Value pairs, but differ in some other BGP attributes. In that case, the BGP implementation MUST follow the regular best-path selection logic to prevent duplicate information in the network. A consumer will receive the value created by the publisher "closest" in terms of BGP best-path selection logic, based on the policies that exist in the routing domain.
The encoding scheme proposed below follows the semantics of a Key-Value association. The "Key" and "Value" are stored in the NLRI section of the MP_REACH_NLRI attribute, as illustrated on .
The AFI/SAFI values are to be allocated by IANA.
Length of Next Hop Address: must be zero, indicating empty next-hop.
Opaque Key Length: identifies the size of the Key field in octets, an unsigned integer value. The field MUST have a value of at least one octet under the Key-Value SAFI and at least 9 octets under the VPN Key-Value SAFI. Violating this requirement MUST cause the receiver to ignore the advertised Key-Value association.
Opaque Key Data: the byte string representing the opaque key contents.
Opaque Value Data: The length of this field is determined by subtracting the length of all previous fields from the total length of MP_REACH_NLRI attribute. This field MAY be empty.
The maximum size of the Opaque "Key" and "Value" fields together is limited by the BGP UPDATE message size. With the default BGP protocol implementation the mssage may not exceed 4096 octets (see Section 4). However, if is implemented, the UPDATE message size could be as large as 65536 octets.
The removal procedure follows the regular MP-BGP route withdrawal, using the MP_UNREACH_NLRI attribute. This section defines the attribute structure for the new AFI/SAFI.
The specific MP_UNREACH_NLRI format is shown on . This message instructs the receiving BGP speaker to delete the N associations corresponding to Key 1, Key 2 ... Key N if the keys have been previously learned from the withdrawing speaker. If any of the keys could not be found in the LocRIB or the keys have not been previously received from the withdrawing BGP peer, such key removal request MUST be ignored and the event MAY be logged. For the Key-Value SAFI, each "Key Length" field must have the value of at least "1". For the VPN Key-Value SAFI, each "Key Length" must be at least 9 octets long. Violation of of these constraints MUST cause the receiver of the UPDATE message to ignore the corresponding key withdrawal.
It is possible to propagate multiple values associated with the same key using the Add-Path extension defined in . However, this document recommends that instead unique key values SHOULD be used for this purpose. It is up to the consumers and publishers of the opaque data to settle on single unique value using some kind of consensus protocol.
As a recommendation, the originators of key-value pairs may use the origin ASN and the IPv4 or IPv6 address assigned to the originating BGP speaker to create a unique key prefix. Alternatively, UUIDs could be used to generate the unique key names, see
It is possible to leverage mechanics described in and use the route-target extended community attribute to identify "channels" where Key-Value associations are published. The consumers would signal their interest in particular "channel" by advertising the corresponding router-target membership. The publications then need to carry the router-target extended community attribute to restrict information propagation scope.
Ad-doc message filtering could be implemented using BGP standard (see ) or extended community attributes (see ). The semantic of these attributes is to determined by the policy and publishers/consumers. Filtering could be done locally on receiving BGP speaker, or on remote BGP speaker, by using outbound route filtering feature defined in .
For the purpose of this work, IANA would be asked to allocate values for the new AFI and SAFIs.
This document does not introduce any changes in terms of BGP security. The usual set of issues that arise from running multiple AFI/SAFI's over single BGP session would apply in this case. Additional concerns may be raised due to increase of the volume and rate of change of the information distributed by means of opaque signaling.
Keyur Patel provided useful feedback and suggested a practical implementation of unique key semantic and support for VPN Key-Value SAFI.