| Internet-Draft | YoBGP | November 2026 |
| Pospichal | Expires 5 May 2027 | [Page] |
This document defines YANG over BGP (YoBGP), an extension of BGP for distributing network configuration objects (for example routing policies, prefix sets, community sets, and access control lists) modeled in YANG. Objects are carried in a dedicated Address Family (AFI/SAFI) and spread between routers the way routes do: they are advertised to peers, carry a version, are filtered on receipt, and are optionally re-advertised. Received objects are subject to a per-peer inbound filtering framework, persist in the receiving node's configuration independently of the state of the BGP session, and are removed only by an explicit, versioned tombstone. Its goal is effortless synchronization of selected configuration settings across a large number of BGP speakers. The framework is schema-agnostic: any YANG module, including vendor-specific ones, can be distributed.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 5 May 2027.¶
Copyright (c) 2026 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.¶
The main goal of YoBGP is effortless synchronization of selected configuration settings across a large number of BGP speakers.¶
Operators of large networks need selected configuration objects (routing policies, prefix sets, community sets, AS-path sets, access control lists) to be identical on many routers. This is usually achieved with automation engines (Ansible, NETCONF clients, SSH scripting) that open an administrative session to every router. Such engines hold credentials with elevated privileges for the whole fleet, and managing that access is itself an operational and security burden.¶
This document defines YANG over BGP (YoBGP), which extends BGP [RFC4271] with a new address family for distributing configuration objects modeled in YANG. A YoBGP object is distributed the way a route is: it is originated by one or more routers, optionally propagated through the BGP topology (including through route reflectors), and received by routers that decide locally, per peer, whether and how to apply it. No management session and no additional credentials are introduced; the existing BGP peering is the only channel.¶
YoBGP is a transport framework. It is decoupled from the schemas it distributes, such as [RFC9067], [RFC8519] and the BGP YANG model [I-D.ietf-idr-bgp-model], and is open to any other YANG module, including vendor-specific ones (Section 13).¶
YoBGP distributes configuration objects that routers keep. It is not the first use of BGP to carry policy-related or filter-like information, and this section states how it differs from the closest mechanisms.¶
Routing Policy Distribution (RPD) [I-D.ietf-idr-rpd] also uses a new AFI/SAFI to deliver routing policy from a controller, normally through a route reflector, to routers. The two solve different problems:¶
The two mechanisms can coexist. A deployment can use YoBGP to keep stable sets and policies identical on all routers and RPD for short-lived traffic adjustments. YoBGP does not replace RPD and does not carry the dynamic policy actions that RPD defines. RPD in turn does not provide persistent, versioned, schema-driven objects.¶
YoBGP is also related to Outbound Route Filtering [RFC5291], which sends a filter to a peer to be applied to what that peer advertises, and to Flow Specification [RFC8955], which distributes traffic filtering rules. Neither carries configuration objects that the receiver stores.¶
Finally, YoBGP complements management protocols such as NETCONF [RFC6241] and does not replace them. It suits objects that must be identical on many routers and be distributed along the BGP topology without a management session to each router. It is not a general management interface.¶
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.¶
A YoBGP UPDATE carries exactly one fragment of an object (Section 5.4). A receiving speaker validates and filters each fragment (steps 1 and 2), reassembles the object, and then processes the complete object as it would process a route (steps 3 to 5):¶
The YoBGP-NLRI is carried in MP_REACH_NLRI and MP_UNREACH_NLRI [RFC4760] under AFI=TBA1 and SAFI=TBA2. The NLRI carries the object key and the number of one fragment of the object (Section 5.4). Version and content are carried in the YoBGP attribute (Section 5). As with Flow Specification [RFC8955], the Length of Next Hop Network Address field in MP_REACH_NLRI MUST be 0 and receivers MUST ignore any next hop.¶
An UPDATE for this AFI/SAFI MUST carry exactly one NLRI in MP_REACH_NLRI, because the path attributes that follow describe that one fragment. An UPDATE with more than one NLRI is handled as an attribute error (Section 5.2).¶
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NLRI Type | NLRI Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Fragment Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Object Type Length | Object Type (variable) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Object Name Length | Object Name (variable) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The key is built entirely from identifiers in clear text, so a speaker can filter, store and propagate an object without parsing its payload, and can name an unsupported module in a log message.¶
The YoBGP attribute (type code TBA3) is an optional, non-transitive BGP path attribute (cf. [RFC9552]). It MUST be present in every MP_REACH_NLRI UPDATE for this AFI/SAFI.¶
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version (octets 0-3) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version (octets 4-7) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Router ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Fragment Count | Payload (variable) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
[RFC7606] requires a document that defines new BGP elements to say what is an error and how it is handled. For YoBGP the treatment depends on whether the NLRI field of MP_REACH_NLRI can still be parsed.¶
Treat-as-withdraw. The NLRI field can be parsed, but the YoBGP attribute is missing or malformed (wrong attribute flags, an invalid Version, an attribute shorter than its fixed part of 14 octets, a Fragment Number greater than the Fragment Count, a Fragment Number 0 with a Fragment Count other than 0 or the reverse, or a fragment with an empty payload), the UPDATE carries more than one NLRI, or the inner fields of an NLRI are inconsistent with its NLRI Length. The advertisement is handled as treat-as-withdraw [RFC7606]: it is discarded and SHOULD be logged with the neighbor address and, if known, the object key. Because a withdrawal has no effect on stored state or on the active configuration (Section 6.4), such an advertisement changes nothing. The BGP session is not reset.¶
NLRI field cannot be parsed. An NLRI Length exceeds the data that remains in MP_REACH_NLRI, or the Length of Next Hop Network Address is not 0. The NLRI field cannot then be located reliably, and treat-as-withdraw cannot be used [RFC7606]. The speaker SHOULD use the AFI/SAFI disable approach of [RFC4760] and [RFC7606], that is, ignore all subsequent YoBGP routes received over the session. Session reset is the other approach that [RFC7606] allows, but it is not RECOMMENDED because it also drops every other address family. Objects already applied are not affected by either approach.¶
The payload, which is the byte string that results from reassembly (Section 5.4), is JSON text [RFC7951] in UTF-8. It is a complete data tree that contains exactly one object. It consists of the top-level data node named by the first component of the Object Type and, below it, the chain of descendants on the path to the object. Each list on the path appears with exactly one entry, which holds its keys. The object itself appears with its complete content. The payload contains nothing else.¶
The identity of the object in the payload, that is, the names on the path, including their modules, and the key values, MUST match the Object Type and the Object Name of the NLRI. A mismatch is a configuration payload error (Section 12.2).¶
When the object is applied, the receiver replaces the object in its configuration with the one in the payload as a whole, and creates the ancestors on the path if they do not exist. It MUST NOT change any other data.¶
Every object is transferred in the same way, as a sequence of N fragments. N is 1 for an object that fits in one UPDATE, larger for a bigger object, and 0 for a tombstone. There is no separate encoding for small and large objects.¶
The payload of the object is serialized as one byte string with the structure of Section 5.3 and cut into N pieces of any sizes that fit the peer. Each fragment is one UPDATE. Its NLRI is the object key together with the Fragment Number k, from 1 to N (Section 4). Its attribute has the Version and the Source Router ID of the object, the Fragment Count N and, as its payload, piece k. All fragments of an object carry the same Version, Source Router ID and Fragment Count.¶
A tombstone is a single UPDATE with Fragment Number 0, Fragment Count 0 and an empty payload.¶
Fragmentation applies to each hop separately. A speaker that advertises an object to a peer cuts it for that peer into as many fragments as the maximum BGP message size negotiated with that peer requires, and fragment boundaries are not preserved from one hop to the next. An UPDATE MUST NOT exceed that size. Implementations SHOULD support Extended Message [RFC8654] and SHOULD advertise it, so that fewer fragments are needed. A speaker SHOULD send the fragments in numerical order.¶
The receiver reassembles every object before it enters the YoBGP-RIB. Fragments are not entries of the YoBGP-RIB. For each object it receives, the receiver keeps a reassembly buffer for the session on which the fragments arrive, and never combines fragments received from different peers, because their boundaries can differ.¶
Steps 1 and 2 of Section 3 (validation and import filter) are applied to each fragment as it arrives, using the object key and the Fragment Count, and before any memory is allocated for reassembly, so that a rejected object is never buffered. A state that does not supersede the entry of the object in the YoBGP-RIB (Section 6.3) is discarded without being buffered.¶
When the buffer holds, for every number from 1 to N, a fragment with the same Version, Source Router ID and Fragment Count, the receiver concatenates the pieces in the order of their numbers, takes the result as the payload of the object, and handles the object from step 3 of Section 3 as if it had been received in one UPDATE. The buffer is then released. A tombstone is complete on arrival. Fragments that carry the same Version and Source Router ID but disagree in Fragment Count are discarded together with the buffered fragments of that Version, and the event SHOULD be logged. Until an object is complete, nothing of it is in the YoBGP-RIB and the state that was there before remains in effect.¶
A new version of an object can have fewer or more fragments than the previous one, for example 2 fragments after a version that had 3. Fragments of different states are never combined, because reassembly requires the same Version, Source Router ID and Fragment Count. The receiver MUST discard the reassembly state of an object, so that no orphaned fragment of a lower state remains for its object key, when it receives a newer state of that object from the same peer, when an entry that supersedes the buffered state is installed in the YoBGP-RIB, whichever peer it came from, when the session is lost, and when the limit on memory for reassembly is reached. Late fragments of a lower state are discarded on arrival, as described above. A speaker SHOULD limit the memory for reassembly per peer (Section 15.7).¶
Version is a 64-bit unsigned integer, scoped to one object key. Zero is invalid. Versions are compared as plain unsigned integers; no wraparound arithmetic is used. A 64-bit Version does not wrap in practice: one new Version per microsecond would take more than half a million years to exhaust it. Serial number arithmetic [RFC1982] would not help an originator that restarts with lower Versions either, because it also orders Version 1 before Version 1500. An originator MUST assign strictly increasing versions to successive states of an object (including its tombstone) and MUST NOT advertise two different contents with the same Version and Source Router ID. Implementations SHOULD choose versions that survive a restart of the originator, for example from a persisted counter or from a clock. An originator MUST provide an administrative means to set the version to be used next for an object, to any non-zero value. An originator MAY also provide an administrative setting, a version offset, that adds a configured constant to every Version it assigns. It lets an originator that has lost its Version counter resume above the Versions already in the network. The constant should only be raised, because lowering it can make new Versions lower than those already issued.¶
Each speaker keeps one YoBGP-RIB. It holds at most one entry per object key, the current entry, independent of which peer supplied it and of the state of that peer's session. An entry records the Version, Source Router ID, Payload, the peer from which it was received (or local, for an originated object), and its application status (applied, pending, rejected, or, in no-apply mode, not applied). Tombstones are entries too. The YoBGP-RIB is volatile (Section 8); what has been applied is part of the node's configuration (the YoBGP-CIB).¶
State S1 of an object supersedes state S2 if S1 has a higher Version, or the same Version and a lower Source Router ID. This order is the same on every speaker. The BGP decision process is not used for this AFI/SAFI. For a valid received object that the import filter admits (Section 11):¶
A speaker MAY send MP_UNREACH_NLRI for this AFI/SAFI, for example when its outbound policy changes. Receiving it has no effect on the YoBGP-RIB or on the active configuration. Deleting an object is expressed only by a tombstone (Section 7).¶
A speaker MUST provide an administrative means to discard the YoBGP-RIB entry of an object, or to set the Version of that entry, so that an erroneously high version can be corrected (Section 15.6). Discarding the entry does not remove the applied object from the active configuration; it removes only the ordering state, so that the next received state of the object is accepted whatever its Version. A speaker MAY offer a configurable limit on how far a received Version may exceed the stored one. Appendix A.3 shows hypothetical commands.¶
An object is removed from the managed configuration only by a tombstone: a regular advertisement (MP_REACH_NLRI) with Fragment Count 0 (Section 5.4), the same object key, and a Version higher than that of the state being removed. A tombstone is ordered by Version like any other state, so a delayed older advertisement cannot bring a deleted object back while the tombstone is retained, and a late tombstone can never delete a newer object.¶
Tombstones exist only in the YoBGP-RIB, which is volatile, so a restart discards them. Two things can follow from the expiry or loss of a tombstone. A node that was disconnected for longer than the retention time misses the deletion and keeps the object until it receives a tombstone again or an operator removes it. In transitive mode, a node that still holds an older state of the object can advertise it to peers that no longer hold the tombstone, and so bring the object back. A non-transitive node does not advertise received entries, so this cannot spread from it. Transitive mode therefore needs increased attention (Section 10.1). The retention time should exceed the longest outage after which a node can be expected to rejoin. Peers that still retain the tombstone advertise it when the session is established (Section 10.3).¶
The YoBGP-CIB is persistent: the objects that YoBGP has applied are stored with the node's persistent configuration and MUST survive a restart of the node. Loss of the BGP session, expiry of the Hold Timer and withdrawal by MP_UNREACH_NLRI MUST NOT remove objects from the YoBGP-CIB or from the active configuration. This is a deliberate difference from the treatment of ordinary routes, which are removed with the session.¶
The YoBGP-RIB is not persistent and SHOULD NOT be written to persistent storage. It is empty after a restart and is filled again by the peers (Section 10.3). Entries remain in the YoBGP-RIB when a session is lost, until the router restarts, so that the speaker can still advertise them to other peers. After a restart the ordering of states is rebuilt from the peers: the first state received for an object is accepted, and later states supersede it as usual (Section 6.3).¶
An implementation MAY provide, per peer, a purge-on-session-loss option, disabled by default. When enabled, on loss of the session the entries received from that peer are removed from the YoBGP-RIB, and the objects that those entries applied are removed from the node's configuration, as if by tombstone and subject to Section 12.1. Objects applied before a restart are not tracked by this option, because the YoBGP-RIB is empty after a restart.¶
A speaker originates an object when it places the object into its YoBGP-RIB from its own configuration instead of receiving it from a peer. Origination is configured with an advertise statement, modeled on the way routes are originated. Appendix A.5 shows examples.¶
The operator names an object type and an object name pattern, using the pattern syntax of Section 11.1. Naming one object exactly is a pattern without a wildcard, and "*" covers all objects of the type. The speaker originates every object of that type whose name matches and that is found in its configuration, and follows later additions, changes and removals automatically.¶
A statement configured for the address family applies to all peers. A statement configured for one peer applies only to that peer. An originated object is advertised to the peers that the statements cover, subject to the mode and outbound policy of Section 10. A peer covered by overlapping statements receives the object once.¶
Support for propagating received objects is OPTIONAL. A speaker that supports it MUST allow configuring it per peer. The default is non-transitive.¶
Only entries admitted into the YoBGP-RIB are propagated; an object rejected by the import filter is not. An admitted entry that cannot be applied on this node (status pending or rejected) is still propagated, because its applicability here says nothing about other nodes.¶
A speaker MAY offer a no-apply mode, per AFI/SAFI, in which entries are admitted, stored and propagated but never handed to the configuration parser. It lets a route reflector reflect objects without applying them. In no-apply mode update-only is treated as permit.¶
Transitive mode needs increased attention. A faulty or compromised speaker in transitive mode reaches every speaker downstream of it. Objects persist (Section 8), so a faulty object is removed only by a tombstone, and the retention of tombstones is limited (Section 7). Transitive mode should be enabled only on a small number of well-controlled speakers (Section 14).¶
A speaker that supports transitive mode MUST support outbound filtering. The outbound policy defaults to permit. It matches on the same attributes as the import filter (Section 11.1) and decides only whether an entry is advertised to a peer.¶
When a session for this AFI/SAFI is established, the speaker advertises all entries of its YoBGP-RIB that its mode and outbound policy allow, retained tombstones included, each object as fragments (Section 5.4). The same procedure is followed when a ROUTE-REFRESH message [RFC2918] for this AFI/SAFI is received.¶
Every peer has an import filter that decides which received objects are admitted into the YoBGP-RIB, and thereby applied to the active configuration. It works as inbound policy does for routes: it is evaluated on arrival, before the YoBGP-RIB is updated, and an object it does not admit is discarded. The filter uses the object key and the Fragment Count (0 marks a tombstone), so it does not require parsing the payload.¶
A filter is an ordered list of rules and can be defined once and applied to several peers. A rule matches on an object type and one or more object name patterns, and has one of three actions:¶
The object type is matched against the Object Type of the NLRI. Implementations MUST allow naming the object types of the models they support in their native terminology (for example prefix-list, community-list, as-path-list, route-policy, access-list), MUST at minimum cover prefix sets, community sets, AS-path sets, routing policies and access control lists (Appendix A.4), and MAY support a catch-all token "any". An object name pattern is matched against the whole Object Name as it is encoded in the NLRI (Section 4), case-sensitively, so a "/" inside a key value is matched as %2F. The character "*" matches any sequence of characters, including none, and the character "?" matches exactly one character. Both also match the separators "/" and ",", and a %-escape counts as three characters. No other wildcard is defined, and there is no escape for "*" or "?". For example, "CUST_A_*" matches every name that begins with CUST_A_, "*-V6" every name that ends in -V6, "*XYZ*" every name that contains XYZ, "SRV-???-IN" every name that consists of SRV-, exactly three characters and -IN, and "*" every name. Rules are evaluated in configured order and the first matching rule applies.¶
Because the first match wins, a filter can be structured. It can hold any number of rules for each object type, and a narrow rule (a deny for legacy names, an update-only for one critical policy) placed before a broader permit makes an exception to it. Different peers can use different filters, for example one controller that may create and delete objects and another that may only modify what already exists.¶
| Action | Object absent in active configuration | Object exists in active configuration | Tombstone |
|---|---|---|---|
| permit | instantiate | overwrite | delete |
| update-only | rejected | overwrite | rejected |
| deny | rejected | rejected | rejected |
"Rejected" means the object is discarded on arrival: it is not stored, not propagated and not applied. The speaker SHOULD log a rejection by update-only with the neighbor address, the object key and the reason. "Instantiate", "overwrite" and "delete" describe an admitted object, which is stored, propagated and applied subject to Section 12.¶
If no rule matches an object, the action is deny (implicit deny). A peer with no import filter therefore has no objects admitted.¶
A change of an import filter affects objects received afterwards. It does not remove entries from the YoBGP-RIB or objects from the active configuration: changing a filter never deletes anything that was admitted or applied.¶
Rejected objects are not retained. After a filter has been changed, or after an object has been created locally that an update-only rule is meant to maintain, the speaker requests the objects again with a ROUTE-REFRESH message [RFC2918]. Speakers MUST support Route Refresh for this AFI/SAFI. A speaker MAY instead keep unfiltered copies of received objects, comparable to soft reconfiguration inbound, and re-evaluate them locally; such copies are not part of the YoBGP-RIB and are neither propagated nor applied. They also allow an operator to inspect what a peer has sent before the import filter, which helps when looking for a problem.¶
Objects can reference other objects (a policy references prefix sets and community sets). A sender SHOULD advertise an object only after the objects it references have been advertised, but delivery order is not guaranteed, so the receiver enforces consistency:¶
If an admitted payload has unsupported attributes, unrecognized conditions, an unknown module, syntax errors, or an identity that does not match the object key (Section 5.3), the node:¶
The YoBGP-CIB is the set of objects that YoBGP has applied to the node's configuration. It is a thin, logical layer between the YoBGP-RIB and the configuration, like the FIB between the RIB and the forwarding plane in ordinary routing. An entry of the YoBGP-RIB that the import filter admits and that is applied successfully (Sections 11 and 12) becomes an object of the YoBGP-CIB. An object deleted by a tombstone, or removed by the purge-on-session-loss option (Section 8), ceases to be one.¶
The YoBGP-CIB has no state of its own, and in particular no version or ordering information, which lives in the YoBGP-RIB. Its objects are ordinary configuration: they are stored with the node's persistent configuration (Section 8) and the operator can view and change them with the usual configuration tools. An implementation MAY mark such objects to tell them apart from locally created ones; this document does not require it.¶
YoBGP distributes any YANG data that can be named by an Object Type. A vendor or operator can distribute data from its own module simply by naming it in the Object Type; no registration is needed. A speaker that meets an unsupported module stores, and in transitive mode propagates, the object, and treats it as a payload error when it would otherwise apply it (Section 12.2).¶
New kinds of objects need no extension of the protocol, because they are YANG data. New NLRI types are registered in the registry of Section 16. Objects with far-reaching effects, such as a new BGP neighbor definition for a route reflector taken from the BGP YANG model [I-D.ietf-idr-bgp-model], need no special mechanism. They are distributed as any other object and, being subject to implicit deny, are applied only where an operator permits them explicitly.¶
One possible deployment uses a single server that originates the objects. The server peers with the route reflectors or route servers, where transitive mode is enabled with great care, and from there the objects reach all other routers, which keep the default non-transitive mode. In specific cases transitive mode can also be enabled on a speaker that serves customers, to distribute objects to the customer-edge devices of large customers.¶
YoBGP runs inside an existing BGP session. No automation engine holds credentials for the fleet, no management interface is opened, and the router accepts no inbound configuration connection beyond its BGP peering.¶
The import filter limits what each peer can do, independently of session type: permit, update-only and deny, evaluated with an implicit deny. An operator can restrict a peer to modifying pre-existing objects only, which prevents it from injecting new ones.¶
The filter judges names and types, not content. A peer allowed to update a route policy can change what the policy does. Operators SHOULD grant permit or update-only only to peers they trust to that degree, narrowly by name pattern. Permitting object types that create BGP sessions or change routing policy deserves particular care. Access to the same YANG data through NETCONF is governed by [RFC8341]; YoBGP's filter is a separate mechanism and should be aligned with it in deployment.¶
The BGP session is the only security boundary. Deployments SHOULD protect it with TCP-AO [RFC5925] and, for directly connected peers, GTSM [RFC5082]. This document does not depend on a particular transport; further improvements in the security of BGP sessions, which can be expected, benefit YoBGP directly.¶
In transitive mode, intermediate speakers can alter or inject objects, as in any BGP propagation; there is no object-level signature. Transitive mode SHOULD NOT be used across administrative boundaries, and outbound filters SHOULD be used to limit what a speaker passes on. The non-transitive default prevents leaking configuration beyond the intended peers.¶
A peer permitted to supply an object can send a very high Version, after which lower versions from the legitimate originator are discarded. The administrative override (Section 6.5) restores control, and the optional limit on version jumps can prevent the situation. Equal-version conflicts are settled by Source Router ID, which is not authenticated; see Section 15.5.¶
A peer can fill the YoBGP-RIB with entries that the import filter admits. Because rejected objects are not stored, the implicit deny already limits this to what the operator has permitted. Implementations SHOULD nevertheless support a configurable limit on the number of entries per peer, comparable to a maximum-prefix limit; retained tombstones count toward it until they expire. On reaching the limit the speaker SHOULD log and stop accepting new entries from that peer; it MAY also reset the session. Reassembly buffers (Section 5.4) need a similar limit. A peer cannot make a speaker allocate memory for an object that the import filter rejects, because the filter is applied before a reassembly buffer is created. Memory is allocated as fragments arrive and not in advance from the Fragment Count, which is not trusted.¶
Payloads are parsed only for admitted objects, and transit speakers need not parse them at all. Parsers handling YANG JSON from the network SHOULD enforce limits on size and nesting depth and run with minimal privilege.¶
This document requests the following. Registration policies are named as in [RFC8126].¶
The AFI/SAFI pair is requested as a new pair, and not as a SAFI under AFI 1 or 2, because configuration objects are not addresses and tying the service to an IP address family would be arbitrary. The BGP-LS service [RFC9552] is the precedent: it carries data that is not address information under its own AFI and SAFIs.¶
yobgp-filter CONTROLLER_A_IN ! First matching rule wins; narrow rules go before broad ones. 10 deny prefix-list CUST_A_LEGACY_* 20 permit prefix-list CUST_A_* CUST_B_* 30 permit community-list CUST_* 40 update-only as-path-list TRANSIT_ASNS_* 50 permit route-policy CUST_*_IN CUST_*_OUT 60 update-only route-policy GLOBAL_TRANSIT_POLICY 70 permit access-list EDGE_PROTECT_* ! Anything else: implicit deny. ! yobgp-filter CONTROLLER_B_IN ! This controller may only modify what already exists. 10 update-only prefix-list * 20 update-only community-list * ! router bgp 65000 neighbor 192.0.2.1 address-family yobgp import-filter CONTROLLER_A_IN ! ! neighbor 192.0.2.2 address-family yobgp import-filter CONTROLLER_B_IN ! ! !¶
policy-options {
yobgp-filter CONTROLLER_A_IN {
/* First matching term wins. */
term legacy-block {
from {
object-type prefix-list;
name CUST_A_LEGACY_*;
}
then deny;
}
term customer-sets {
from {
object-type prefix-list;
name [ CUST_A_* CUST_B_* ];
}
then permit;
}
term transit-asns {
from {
object-type as-path;
name TRANSIT_ASNS_*;
}
then update-only;
}
term main-policy {
from {
object-type policy-statement;
name GLOBAL_TRANSIT_POLICY;
}
then update-only;
}
/* Anything else: implicit deny. */
}
}
protocols {
bgp {
group YO-BGP-PEERS {
neighbor 192.0.2.1 {
family yobgp {
import-filter CONTROLLER_A_IN;
}
}
}
}
}¶
The two examples use different native terms for the same object types (route-policy and policy-statement, as-path-list and as-path). The syntax is illustrative only and is not part of the specification; Section 11 defines the semantics. Both show a filter as a structured, reusable policy: ordered rules over several object types, a narrow deny before a broad permit, update-only rules for critical objects, and different filters for different peers.¶
The first block is in the style of IOS XR, the second in the style of Junos. Neither is part of the specification.¶
! Receiver: discard the YoBGP-RIB entry of one object. The ! applied object stays. clear yobgp prefix-list CUST_A_PL1 ! Receiver: set the version of the stored entry of an object. yobgp set-version prefix-list CUST_A_PL1 1000 ! Originator: version to be used for the next change. yobgp set-next-version prefix-list CUST_A_PL1 1000 router bgp 65000 address-family yobgp ! Originator: add a constant to every Version it assigns. adjust-version 1500 ! neighbor 192.0.2.1 address-family yobgp ! Receiver: limit how far a received version may exceed the ! stored one. version-jump-limit 100000 ! ! !¶
user@router> clear yobgp prefix-list CUST_A_PL1
user@router> request yobgp set-version prefix-list CUST_A_PL1
1000
user@router> request yobgp set-next-version prefix-list
CUST_A_PL1 1000
[edit protocols bgp]
user@router# set family yobgp adjust-version 1500
[edit protocols bgp group YO-BGP-PEERS neighbor 192.0.2.1]
user@router# set family yobgp version-jump-limit 100000¶
The minimum object types of Section 11.1 correspond to the following YANG nodes. This mapping is informative and the paths must be checked against the published modules: prefix sets, neighbor sets, tag sets and policy definitions of [RFC9067]; access control lists of [RFC8519]; community sets, AS-path sets and extended community sets of the BGP YANG model [I-D.ietf-idr-bgp-model].¶
The first block is in the style of IOS XR, the second in the style of Junos. Neither is part of the specification. The advertise statement names an object type and a name pattern. It can be configured for all peers or for one peer.¶
router bgp 65000 address-family yobgp ! For all peers: advertise route-policy GLOBAL_TRANSIT_POLICY advertise community-list * advertise as-path-list TRANSIT_ASNS_* ! neighbor 192.0.2.1 address-family yobgp ! Only for this peer: advertise prefix-list CUST_A_* ! ! !¶
protocols {
bgp {
family yobgp {
advertise {
policy-statement GLOBAL_TRANSIT_POLICY;
community *;
as-path TRANSIT_ASNS_*;
}
}
group YO-BGP-PEERS {
neighbor 192.0.2.1 {
family yobgp {
advertise {
prefix-list CUST_A_*;
}
}
}
}
}
}¶
This section is to be removed before publishing as an RFC.¶
This document was written with the assistance of an AI system. Using the keys of [I-D.abaris-aicdh]: mode is ai-originated, because the text of this version was generated by the AI from the design decisions of the author and from an earlier draft supplied by the author, and then revised repeatedly at the author's direction; model is Claude, with several versions used and not recorded; provider is Anthropic; and reviewed-by is the author. The design is the author's. The AI also proposed details of the text and of the protocol, which the author reviewed, changed or accepted, and the author is responsible for the whole document.¶