BGP Extended Community for Identifying the Target Nodes
Jie Dong
Huawei Technologies
Huawei Campus, No. 156 Beiqing Rd.
Beijing
100095
China
jie.dong@huawei.com
Shunwan Zhuang
Huawei Technologies
Huawei Campus, No. 156 Beiqing Rd.
Beijing
100095
China
zhuangshunwan@huawei.com
Gunter Van de Velde
Nokia
Antwerp
BE
gunter.van_de_velde@nokia.com
Jeff Tantsura
Nvidia
jefftant.ietf@gmail.com
4 March 2024
BGP has been used to distribute different types of routing and policy information. In some cases, the information distributed may be only intended for one or a particular group of BGP nodes in the network. Currently BGP does not have a generic mechanism of designating the target nodes of the routing information. This document defines a new type of BGP Extended Community called "Node Target" for this purpose.

Introduction
BGP [RFC4271] has been used to distribute different types of routing and policy information. In some cases, the information distributed may be only intended for one or a group of receiving BGP nodes in the network. One typical use case is the distribution of BGP Flow Spec [RFC8955] [RFC8956] rules only to a particular group of BGP nodes. Such a targeted distribution mechanism is considered useful as it can save the resources on nodes which do not need that information.
Currently BGP does not have a generic mechanism of designating the set of nodes to which the information is to be distributed. Route Target (RT) as defined in [RFC4364] was designed for the matching of VPN routes into the target VPN Routing and Forwarding tables (VRFs) on the PE nodes. [I-D.ietf-idr-segment-routing-te-policy] introduces the mechanism of steering the SR Policy information to the target head end node based on RT, it is only applicable to the SR Policy Address Family. Although it is possible to reuse RT to control the distribution of non-VPN information to one or a group of receiving nodes, such mechanism is not applicable when the information to be distributed is VPN-specific and is advertised with another set of RTs for the VRF matching, as the matching or any of the VPN RT in the BGP route would result in that route being imported to a local VRF, regardless of whether the receiving node is the target node or not. Thus a general mechanism which is independent from the control of VPN route to VRF import is needed.
Another possible approach is to configure, on each router, a community and the corresponding policies to match the community to determine whether to accept the received routes or not. Such mechanism relies on manual configuration thus is considered error-prone. It is preferable by some operators that an automatic approach can be provided, which would make the operation much easier.
This document defines a new type of BGP Extended Community called "Node Target". It can be used by a receiving BGP node to determine whether it is the target of the BGP routes. The mechanism of using the Node Target extended community to control the BGP route distribution only to particular BGP nodes is out of the scope and will be specified in a separate document.

Requirements Language
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.

Node Target Extended Communities
This section defines a new BGP Extended Community [RFC4360] called "Node Target Extended Community". It can be a transitive extended community with the high-order octet of the type set to 0x01, or a non-transitive extended community with the high-order octet type set to 0x41. The sub-type of the Node Target Extended Community is TBA.
The format of Node Target Extended Community is shown in Figure 1.
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  0x01 or 0x41 | Sub-Type(TBA) |    Target BGP Identifier      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Target BGP Identifier (cont.) |           Reserved            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Figure 1. Node Target extended community

Where:
Target BGP Identifier (4 octets): The BGP Identifier of a target node. It is a 4-octet, unsigned, non-zero integer as defined in [RFC6286].
Reserved field (2 octets): Reserved for future use, MUST be set to zero on transmission and ignored on receipt.
One or more Node Target extended communities MAY be carried in an Update message to designate a group of target BGP nodes.

Procedures
In this section, the mechanism for intra-domain scenario is described, the mechanism for inter-domain scenario is for further study. The domain here refers to an administrative domain, which may consists of one or multiple ASes managed by a single operator.
When a network controller or BGP speaker plans to advertise some BGP routing or policy information only to one or a group of BGP nodes in the network, it MUST put the BGP Identifier of each target node into the Node Target extended communities, and attach the Node Target extended communities to the routes to be advertised.
When a BGP speaker receives a BGP Update which contains one or more Node Target extended communities, it MUST check the target BGP Identifiers carried in the Node Target extended communities of the Update. If the target BGP Identifier in any of the Node Target extended community matches with the local BGP Identifier, this node is one of the target nodes of the Update, the information in the Update is eligible to be kept and installed on this node. If the target BGP Identifier in any of the Node Target extended community does not match with the local BGP Identifier, this node is not the target node of Update, and the information in the Update is not eligible to be installed on this node.
The mechanism of using the Node Target extended community to control the BGP route distribution only to particular BGP nodes is out of the scope and will be specified in a separate document.

Compatibility Considerations
The Node Target extended community introduced in this document can be deployed incrementally in the network. For BGP speakers which understand the Node Target extended community, it is used to determine whether the nodes are the target nodes of the Update. For BGP speakers which do not understand the Node Target extended community, it will be ignored and the information in the Update will be processed and advertised based on normal BGP procedure. Although this could ensure that the target nodes can always obtain the information needed, this may result in unnecessary state maintained on the legacy BGP nodes. If the information advertised with the Node Target extended community is FlowSpec, the legacy BGP speakers may install unnecessary Flowspec rules, this may have impact on traffic which matches such rules, thus may result in unexpected traffic steering or filtering behaviors on such legacy nodes. This may be mitigated by setting appropriate routing policies on the legacy BGP nodes.

IANA Considerations
IANA assigns the sub-type value 0x09 for "Node Target Extended Community" from the "Transitive IPv4-Address-Specific Extended Community Sub-Types" registry of the "BGP Extended Communities" registry.
IANA assigns the sub-type value 0x09 for "Node Target Extended Community" from the "Non-Transitive IPv4-Address-Specific Extended Community Sub-Types" registry of the "BGP Extended Communities" registry.

Security Considerations
The mechanism defined in this document can limit the scope of the receiving nodes of BGP Updates, which make it possible for an attacker to do fine-grained targeting of malicious BGP Updates only to a restricted set of routers. This may make it more difficult for a network administrator to discover an attack. This may be mitigated by filtering the Node Target extended communities at the administrative network boundaries.

Contributors
Haibo Wang
Email: rainsword.wang@huawei.com

Acknowledgements
The authors would like to thank Zhenbin Li, Ercin Torun, Jeff Haas, Robert Raszuk and John Scudder for the review and discussion of this document.

Normative References

Informative References
[RFC4271]
[RFC8955]
[RFC8956]
[RFC4364]
[I-D.ietf-idr-segment-routing-te-policy]
[RFC2119]
[RFC8174]
[RFC4360]
[RFC6286]