Internet-Draft | RTC for BGP Flowspec & SR-Policy | March 2023 |
Ding, et al. | Expires 12 September 2023 | [Page] |
This document introduces an extension to the application scenarios of Route Target Constraints (RTC). By using the global administrator field of the IPv4 Address Specific Extended Community to represent a network node and exchanging BGP Route-Target routes, a BGP speaker could generate an egress policy for filtering one or a group of network nodes, which could implement precise control and distribution of services such as BGP Flow Spec and BGP Segment Routing Policies.¶
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 [RFC2119].¶
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 12 September 2023.¶
Copyright (c) 2023 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.¶
BGP [RFC4271] has been used to distribute different types of routing and policy information. In some scenarios, the distributed routing information is specific for certain services, such as BGP/MPLS IP VPNs.¶
Route Target Constraints (RTC) [RFC4684], extends Outbound Route Filtering (ORF), describes how route targets are exchanged through the BGP RTC address family on a BGP/MPLS IP VPN network to generate egress policies. This feature enables the BGP/MPLS IP VPN network to control the advertisement of VPN routing information in a more refined manner.¶
This document introduces an extension to the application scenarios of Route Target Constraints (RTC) [RFC4684] to control the distribution of routing information to one or a group of network nodes, which could implement precise control of services such as BGP Flow Spec [RFC8955] and BGP Segment Routing Policies [I-D.ietf-idr-segment-routing-te-policy].¶
This document introduces the following terms:¶
The encapsulation of Route Target membership NLRI is defined in Route Target Constraints (RTC) [RFC4684], the NLRI is advertised in BGP UPDATE messages using the MP_REACH_NLRI and MP_UNREACH_NLRI attributes. The (AFI, SAFI) value pair used to identify this NLRI is (AFI=1, SAFI=132).¶
The route-target field in the NLRI indicates a network node and is encoded as a IPv4 Address Specific Extended Community [RFC4360], as shown blow:¶
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | origin as | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0x01 or 0x41 | Sub-Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Global Administrator | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Local Administrator | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
While encoding these fields:¶
This section describes a few use-case scenarios.¶
+----------------------------------------------+ | +----------+ | | |Controller| | | +----------+ | | | | | | | | +---------+ | | | | | | | RR | | | | | | | +---------+ | | / \ | | / \ | | +---------+ +---------+ | | | PE1 | | PE2 | | | +---------+ +---------+ | | Flow speaker 1 Flow speaker 2 | | rt-id 1.1.1.1 rt-id 2.2.2.2 | | AS 100 | +----------------------------------------------+
In the topology above, the Controller, PE1, and PE2 establish IBGP peer relationships with the RR respectively. PE1 and PE2 are clients of the RR. The Controller distributes Flowspec rules through the RR, and the RR reflects the Flowspec rules to PE1 and PE2.¶
PE1 sends route target membership NLRI{100, 1.1.1.1:0} to the RR, and PE2 sends route target membership NLRI{100, 2.2.2.2:0} to the RR. After receiveing the UPDATE messages with Route Target Membership NLRI, the RR will trigger the RIB-OUTS of the Flowspec route to match the egress policies and update the route to PEs.¶
If hierarchical RRs are deployed, the RRs need to advertise all received route target membership NLRI routes to the upper-layer RRs.¶
+----------------------------------------------+ | +----------+ | | |Controller| | | +----------+ | | | | | | | | +---------+ | | | | | | | RR | | | | | | | +---------+ | | / \ | | / \ | | +---------+ +---------+ | | | PE1 | | PE2 | | | +---------+ +---------+ | | Policy 1 Policy 2 | | rt-id 1.1.1.1 rt-id 2.2.2.2 | | AS 100 | +----------------------------------------------+
It is described in BGP Segment Routing Policies [I-D.ietf-idr-segment-routing-te-policy] that one or more route targets SHOULD be attached to the advertisement, where each route target identifies one or more intended headends for the advertised SR Policy update. In the topology above, when the controller needs to deliver SR policies to PE1 and PE2, it will advertises SR policies with route target extended communities, SR Policy1 with {1.1.1.1:0} and SR Policy2 with {2.2.2.2:0}, to RR. The RR will reflect SR Policies to both PE1 and PE2. PEs need to do an ingress filtering, by matching route target extended community with its own router-id. In this case, PE1 will keep SR Policy1 and drop SR Policy2, as well as PE2 will keep SR Policy2 and drop SR Policy1. During this process, even though SR policies are correctly provisioned, the RR advertises all routes to all peers, which may cause network congestion.¶
The ORF operations described in this document work as an egress filter on RR. PE1 sends route target membership NLRI{100, 1.1.1.1:0} to the RR, and PE2 sends route target membership NLRI{100, 2.2.2.2:0} to the RR. After receiving the Route Target Membership NLRI from the PE, the RR generates a PE-specific egress filter. Before advertising routes to PEs, the RR matches routes with egress policies, and will only deliver SR policy1 to PE1 and SR policy1 to PE2 respectively. In this way, services could be correctly deployed and network bandwidth could be saved.¶