Internet-Draft | BGP SR Policy Extensions for template | September 2023 |
Zhang, et al. | Expires 26 March 2024 | [Page] |
Segment Routing(SR) Policies can be advertised using BGP. An SR Policy may has lots of attributes, and as the application and features evolve, the SR Policy may need have more and more attribute attributes. To avoid modifying BGP when attributes are added to an SR Policy, we can define a template. The identifier and content of the template are defined by the receiver of the SR Policy. The advertiser of an SR policy only needs to know the ID of the template. When advertising SR policy, the advertiser carries the template ID in the tunnel encapsulation information of the SR policy. After receiving the SR Policy information, the receiver obtains the corresponding template and content according to the template ID, thereby obtaining abundant constraint configuration information.¶
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 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
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 26 March 2024.¶
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.¶
[I-D.ietf-idr-segment-routing-te-policy]defines some attributes encoding of the SR Policy path. However, in actual applications, there are many other attributes of SR Policy path. These attributes are valid only on the device where the SR Policy path is installed. Such attributes may include backup protection, Bidirectional Forwarding Detection information, traffic statistics collection, or in-situ Flow Information Telemetry detection information, etc. If these attributes are directly delivered through BGP, the BGP SR Policy protocol may change frequently. This document defines a general method to carry the path attributes of SR Policies.¶
SR Policy: An ordered list of segments.¶
Candidate Path: the unit for signaling of an SR Policy to a headend via protocol extensions like Path Computation Element (PCE) Communication Protocol (PCEP) [RFC8664] [I-D.ietf-pce-segment-routing-policy-cp] or BGP SR Policy [I-D.ietf-idr-segment-routing-te-policy].¶
SRPM: SR Policy Module.¶
Template: A collection of attributes sets.¶
Template ID: The identifier of a template.¶
To support the attributes extension of SR Policies, this document defines a constraint template identifier. The constraint template ID is valid only for the recipient. The SR policy publisher only needs to carry the template ID when publishing the SR policy. The receiver of the SR Policy may create a template corresponding to the template identifier in advance before receiving the SR Policy, or may define a corresponding template after receiving the template definition of the SR Policy. The template can contain any attributes on the SR Policy path, including but not limited to backup protection, Bidirectional Forwarding Detection information, traffic statistics collection, or in-situ Flow Information Telemetry detection information, etc. After receiving the SR Policy information, the receiver matches the template information based on the template ID and adds attributes to the SR Policy based on the attributes defined in the template.¶
Template ID is an local identifier, just to use on the headend of the SR Policy. And it is a local configured identifier, need to be unique only on the headend device. We need no further process to coordinate the template ID between multiple routers.¶
As the template ID is defined, the tunnel attribute encapsulation of the BGP SR Policy needs to be updated.¶
The SR Policy Encoding structure is as follows:¶
SR Policy SAFI NLRI: <Distinguisher, Policy-Color, Endpoint>¶
Attributes: Tunnel Encaps Attribute (23) Tunnel Type: SR Policy Binding SID Preference Priority Policy Name Policy Candidate Path Name Explicit NULL Label Policy (ENLP) Template ID Segment List Weight Segment Segment .... ....¶
Where Tempate ID indicates the template ID for the SR Policy candidate path.¶
A new sub-TLV called Template ID sub-TLV is defined. Template ID sub-TLV specifies the template ID of an SR policy candidate path. Each sub-TLV is encoded as shown in Figure 1.¶
Type: Template ID, 1 octet, TBD.¶
Length: 6.¶
Flags: 1 octet of flags.¶
Where: N-Flag: This flag, when set, indicates the presence of the Template Name encoding.¶
RESERVED: 1 octet of reserved bits. SHOULD be set to zero on transmission and MUST be ignored on receipt.¶
Template ID: a 4-octet value.¶
Template Name: Template MAY also be assigned with a template name, such template name MUST NOT be considered as identifiers for a template. The size of the tempalte name for the template is limited to 255 bytes.¶
When BGP advertises an SR Policy, different candidate paths of the same SR Policy may have different template IDs or the same template ID, depending on the attributes required by the candidate paths of the SR Policy.¶
Reflectors just need to advertise the route of SR, no need to process it.¶
SR Policy is only to be processed on the SR Policy headend, reflectors just need to reflect the route of SR Policy, no need to process it. To make this possible, an attribute needs to be attached to the advertisement that enables a BGP speaker to determine whether it is intended to be a headend for the advertised policy. This is done by attaching one or more Route Target Extended Communities to the advertisement [RFC4360]. This process is defined in [I-D.ietf-idr-segment-routing-te-policy]. This draft does not add any extra process in this process.¶
Once BGP on the receiving node has determined that the SR Policy NLRI is usable, it passes the SR Policy candidate path to the SRPM. The SRPM then determine how to use the template ID in SR Policy. The SRPM find the local configured template by template ID, and get all the attributes that is configured in the template, and then process the candidate path with these attributes. For example, if the template configure seamless bfd, then the SRPM can create sbfd sessions for each Segment List in the candidate path. If there is no template find, the SRPM should ignore the template ID and use the candidate path as there is no template ID.¶
TBD.¶
This document requests that IANA allocates a new sub-TLV type as defined in Section 4.1 from the "Sub-TLVs for SR Policy" registry as specified.¶
These extensions to BGP SR Policy do not add any new security issues to the existing protocol.¶