idnits 2.17.00 (12 Aug 2021) /tmp/idnits46798/draft-ietf-lsvr-bgp-spf-13.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: The protocol identifier specified in the Protocol-ID field [RFC7752] will represent the origin of the advertised NLRI. For Node NLRI and Link NLRI, this MUST be the direct protocol (4). Node or Link NLRI with a Protocol-ID other than direct will be considered malformed. For Prefix NLRI, the specified Protocol-ID MUST be the origin of the prefix. The local and remote node descriptors for all NLRI MUST include the BGP Identifier (TLV 516) and the AS Number (TLV 512) [RFC7752]. The BGP Confederation Member (TLV 517) [RFC7752] is not appliable and SHOULD not be included. If TLV 517 is included, it will be ignored. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: If the SPF Status TLV is received and the corresponding Node NLRI has not been received, then the SPF Status TLV is ignored and not used in SPF computation but is still announced to other BGP speakers. An implementation MAY log an error for further analysis. If a BGP speaker received the Node NLRI but the SPF Status TLV is not received, then any previously received information is considered as implicitly withdrawn and the update is propagated to other BGP speakers. A BGP speaker receiving a BGP Update containing a SPF Status TLV in the BGP-LS attribute [RFC7752] with a value that is outside the range of defined values SHOULD be processed and announced to other BGP speakers. However, a BGP speaker MUST not use the Status TLV in its SPF computation. An implementation MAY log this condition for further analysis. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: If the SPF Status TLV is received and the corresponding Link NLRI has not been received, then the SPF Status TLV is ignored and not used in SPF computation but is still announced to other BGP speakers. An implementation MAY log an error for further analysis. If a BGP speaker received the Link NLRI but the SPF Status TLV is not received, then any previously received information is considered as implicitly withdrawn and the update is propagated to other BGP speakers. A BGP speaker receiving a BGP Update containing an SPF Status TLV in the BGP-LS attribute [RFC7752] with a value that is outside the range of defined values SHOULD be processed and announced to other BGP speakers. However, a BGP speaker MUST not use the Status TLV in its SPF computation. An implementation MAY log this information for further analysis. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: If the SPF Status TLV is received and the corresponding Prefix NLRI has not been received, then the SPF Status TLV is ignored and not used in SPF computation but is still announced to other BGP speakers. An implementation MAY log an error for further analysis. If a BGP speaker received the Prefix NLRI but the SPF Status TLV is not received, then any previously received information is considered as implicitly withdrawn and the update is propagated to other BGP speakers. A BGP speaker receiving a BGP Update containing an SPF Status TLV in the BGP-LS attribute [RFC7752] with a value that is outside the range of defined values SHOULD be processed and announced to other BGP speakers. However, a BGP speaker MUST not use the Status TLV in its SPF computation. An implementation MAY log this information for further analysis. -- The document date (February 22, 2021) is 453 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 4272 ** Downref: Normative reference to an Informational RFC: RFC 4593 == Outdated reference: A later version (-08) exists of draft-ietf-lsvr-applicability-05 Summary: 2 errors (**), 0 flaws (~~), 6 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group K. Patel 3 Internet-Draft Arrcus, Inc. 4 Intended status: Standards Track A. Lindem 5 Expires: August 26, 2021 Cisco Systems 6 S. Zandi 7 LinkedIn 8 W. Henderickx 9 Nokia 10 February 22, 2021 12 BGP Link-State Shortest Path First (SPF) Routing 13 draft-ietf-lsvr-bgp-spf-13 15 Abstract 17 Many Massively Scaled Data Centers (MSDCs) have converged on 18 simplified layer 3 routing. Furthermore, requirements for 19 operational simplicity have led many of these MSDCs to converge on 20 BGP as their single routing protocol for both their fabric routing 21 and their Data Center Interconnect (DCI) routing. This document 22 describes extensions to BGP to use BGP Link-State distribution and 23 the Shortest Path First (SPF) algorithm used by Internal Gateway 24 Protocols (IGPs) such as OSPF. In doing this, it allows BGP to be 25 efficiently used as both the underlay protocol and the overlay 26 protocol in MSDCs. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at https://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on August 26, 2021. 45 Copyright Notice 47 Copyright (c) 2021 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (https://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 63 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 64 1.2. BGP Shortest Path First (SPF) Motivation . . . . . . . . 4 65 1.3. Document Overview . . . . . . . . . . . . . . . . . . . . 6 66 1.4. Requirements Language . . . . . . . . . . . . . . . . . . 6 67 2. Base BGP Protocol Relationship . . . . . . . . . . . . . . . 6 68 3. BGP Link-State (BGP-LS) Relationship . . . . . . . . . . . . 7 69 4. BGP Peering Models . . . . . . . . . . . . . . . . . . . . . 8 70 4.1. BGP Single-Hop Peering on Network Node Connections . . . 8 71 4.2. BGP Peering Between Directly-Connected Nodes . . . . . . 8 72 4.3. BGP Peering in Route-Reflector or Controller Topology . . 9 73 5. BGP Shortest Path Routing (SPF) Protocol Extensions . . . . . 9 74 5.1. BGP-LS Shortest Path Routing (SPF) SAFI . . . . . . . . . 9 75 5.1.1. BGP-LS-SPF NLRI TLVs . . . . . . . . . . . . . . . . 9 76 5.1.2. BGP-LS Attribute . . . . . . . . . . . . . . . . . . 10 77 5.2. Extensions to BGP-LS . . . . . . . . . . . . . . . . . . 11 78 5.2.1. Node NLRI Usage . . . . . . . . . . . . . . . . . . . 11 79 5.2.1.1. Node NLRI Attribute SPF Capability TLV . . . . . 11 80 5.2.1.2. BGP-LS-SPF Node NLRI Attribute SPF Status TLV . . 12 81 5.2.2. Link NLRI Usage . . . . . . . . . . . . . . . . . . . 13 82 5.2.2.1. BGP-LS-SPF Link NLRI Attribute Prefix-Length TLVs 14 83 5.2.2.2. BGP-LS-SPF Link NLRI Attribute SPF Status TLV . . 14 84 5.2.3. IPv4/IPv6 Prefix NLRI Usage . . . . . . . . . . . . . 15 85 5.2.3.1. BGP-LS-SPF Prefix NLRI Attribute SPF Status TLV . 16 86 5.2.4. BGP-LS Attribute Sequence-Number TLV . . . . . . . . 16 87 5.3. NEXT_HOP Manipulation . . . . . . . . . . . . . . . . . . 17 88 6. Decision Process with SPF Algorithm . . . . . . . . . . . . . 18 89 6.1. BGP NLRI Selection . . . . . . . . . . . . . . . . . . . 19 90 6.1.1. BGP Self-Originated NLRI . . . . . . . . . . . . . . 20 91 6.2. Dual Stack Support . . . . . . . . . . . . . . . . . . . 20 92 6.3. SPF Calculation based on BGP-LS-SPF NLRI . . . . . . . . 20 93 6.4. IPv4/IPv6 Unicast Address Family Interaction . . . . . . 25 94 6.5. NLRI Advertisement . . . . . . . . . . . . . . . . . . . 25 95 6.5.1. Link/Prefix Failure Convergence . . . . . . . . . . . 25 96 6.5.2. Node Failure Convergence . . . . . . . . . . . . . . 26 97 7. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 26 98 7.1. Processing of BGP-LS-SPF TLVs . . . . . . . . . . . . . . 26 99 7.2. Processing of BGP-LS-SPF NLRIs . . . . . . . . . . . . . 27 100 7.3. Processing of BGP-LS Attribute . . . . . . . . . . . . . 28 101 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 102 9. Security Considerations . . . . . . . . . . . . . . . . . . . 30 103 10. Management Considerations . . . . . . . . . . . . . . . . . . 31 104 10.1. Configuration . . . . . . . . . . . . . . . . . . . . . 31 105 10.1.1. Link Metric Configuration . . . . . . . . . . . . . 31 106 10.1.2. backoff-config . . . . . . . . . . . . . . . . . . . 31 107 10.2. Operational Data . . . . . . . . . . . . . . . . . . . . 31 108 11. Implementation Status . . . . . . . . . . . . . . . . . . . . 32 109 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 32 110 13. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 32 111 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 112 14.1. Normative References . . . . . . . . . . . . . . . . . . 33 113 14.2. Informational References . . . . . . . . . . . . . . . . 35 114 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 36 116 1. Introduction 118 Many Massively Scaled Data Centers (MSDCs) have converged on 119 simplified layer 3 routing. Furthermore, requirements for 120 operational simplicity have led many of these MSDCs to converge on 121 BGP [RFC4271] as their single routing protocol for both their fabric 122 routing and their Data Center Interconnect (DCI) routing [RFC7938]. 123 This document describes an alternative solution which leverages BGP- 124 LS [RFC7752] and the Shortest Path First algorithm used by Internal 125 Gateway Protocols (IGPs) such as OSPF [RFC2328]. 127 This document leverages both the BGP protocol [RFC4271] and the BGP- 128 LS [RFC7752] protocols. The relationship, as well as the scope of 129 changes are described respectively in Section 2 and Section 3. The 130 modifications to [RFC4271] for BGP SPF described herein only apply to 131 IPv4 and IPv6 as underlay unicast Subsequent Address Families 132 Identifiers (SAFIs). Operations for any other BGP SAFIs are outside 133 the scope of this document. 135 This solution avails the benefits of both BGP and SPF-based IGPs. 136 These include TCP based flow-control, no periodic link-state refresh, 137 and completely incremental NLRI advertisement. These advantages can 138 reduce the overhead in MSDCs where there is a high degree of Equal 139 Cost Multi-Path (ECMPs) and the topology is very stable. 140 Additionally, using an SPF-based computation can support fast 141 convergence and the computation of Loop-Free Alternatives (LFAs). 142 The SPF LFA extensions defined in [RFC5286] can be similarly applied 143 to BGP SPF calculations. However, the details are a matter of 144 implementation detail. Furthermore, a BGP-based solution lends 145 itself to multiple peering models including those incorporating 146 route-reflectors [RFC4456] or controllers. 148 1.1. Terminology 150 This specification reuses terms defined in section 1.1 of [RFC4271] 151 including BGP speaker, NLRI, and Route. 153 Additionally, this document introduces the following terms: 155 BGP SPF Routing Domain: A set of BGP routers that are under a single 156 administrative domain and exchange link-state information using 157 the BGP-LS-SPF SAFI and compute routes using BGP SPF as described 158 herein. 160 BGP-LS-SPF NLRI: This refers to BGP-LS Network Layer Reachability 161 Information (NLRI) that is being advertised in the BGP-LS-SPF SAFI 162 (Section 5.1) and is being used for BGP SPF route computation. 164 Dijkstra Algorithm: An algorithm for computing the shortest path 165 from a given node in a graph to every other node in the graph. At 166 each iteration of the algorithm, there is a list of candidate 167 vertices. Paths from the root to these vertices have been found, 168 but not necessarily the shortest ones. However, the paths to the 169 candidate vertex that is closest to the root are guaranteed to be 170 shortest; this vertex is added to the shortest-path tree, removed 171 from the candidate list, and its adjacent vertices are examined 172 for possible addition to/modification of the candidate list. The 173 algorithm then iterates again. It terminates when the candidate 174 list becomes empty. [RFC2328] 176 1.2. BGP Shortest Path First (SPF) Motivation 178 Given that [RFC7938] already describes how BGP could be used as the 179 sole routing protocol in an MSDC, one might question the motivation 180 for defining an alternate BGP deployment model when a mature solution 181 exists. For both alternatives, BGP offers the operational benefits 182 of a single routing protocol as opposed to the combination of an IGP 183 for the underlay and BGP as an overlay. However, BGP SPF offers some 184 unique advantages above and beyond standard BGP distance-vector 185 routing. With BGP SPF, the standard hop-by-hop peering model is 186 relaxed. 188 A primary advantage is that all BGP-LS-SPF speakers in the BGP SPF 189 routing domain will have a complete view of the topology. This will 190 allow support for ECMP, IP fast-reroute (e.g., Loop-Free 191 Alternatives), Shared Risk Link Groups (SRLGs), and other routing 192 enhancements without advertisement of additional BGP paths [RFC7911] 193 or other extensions. In short, the advantages of an IGP such as OSPF 194 [RFC2328] are availed in BGP. 196 With the simplified BGP decision process as defined in Section 6, 197 NLRI changes can be disseminated throughout the BGP routing domain 198 much more rapidly (equivalent to IGPs with the proper 199 implementation). The added advantage of BGP using TCP for reliable 200 transport leverages TCP's inherent flow-control and guaranteed in- 201 order delivery. 203 Another primary advantage is a potential reduction in NLRI 204 advertisement. With standard BGP distance-vector routing, a single 205 link failure may impact 100s or 1000s prefixes and result in the 206 withdrawal or re-advertisement of the attendant NLRI. With BGP SPF, 207 only the BGP speakers corresponding to the link NLRI need to withdraw 208 the corresponding BGP-LS-SPF Link NLRI. Additionally, the changed 209 NLRI will be advertised immediately as opposed to normal BGP where it 210 is only advertised after the best route selection. These advantages 211 will afford NLRI dissemination throughout the BGP SPF routing domain 212 with efficiencies similar to link-state protocols. 214 With controller and route-reflector peering models, BGP SPF 215 advertisement and distributed computation require a minimal number of 216 sessions and copies of the NLRI since only the latest version of the 217 NLRI from the originator is required. Given that verification of the 218 adjacencies is done outside of BGP (see Section 4), each BGP speaker 219 will only need as many sessions and copies of the NLRI as required 220 for redundancy (see Section 4). Additionally, a controller could 221 inject topology that is learned outside the BGP SPF routing domain. 223 Given that controllers are already consuming BGP-LS NLRI [RFC7752], 224 this functionality can be reused for BGP-LS-SPF NLRI. 226 Another potential advantage of BGP SPF is that both IPv6 and IPv4 can 227 both be supported using the BGP-LS-SPF SAFI with the same BGP-LS-SPF 228 NLRIs. In many MSDC fabrics, the IPv4 and IPv6 topologies are 229 congruent, refer to Section 5.2.2 and Section 5.2.3. Although beyond 230 the scope of this document, multi-topology extensions could be used 231 to support separate IPv4, IPv6, unicast, and multicast topologies 232 while sharing the same NLRI. 234 Finally, the BGP SPF topology can be used as an underlay for other 235 BGP SAFIs (using the existing model) and realize all the above 236 advantages. 238 1.3. Document Overview 240 The document begins with sections defining the precise relationship 241 that BGP SPF has with both the base BGP protocol [RFC4271] 242 (Section 2) and the BGP Link-State (BGP-LS) extensions [RFC7752] 243 (Section 3). This is required to dispel the notion that BGP SPF is 244 an independent protocol. The BGP peering models, as well as the 245 their respective trade-offs are then discussed in Section 4. The 246 remaining sections, which make up the bulk of the document, define 247 the protocol enhancements necessary to support BGP SPF. The BGP-LS 248 extensions to support BGP SPF are defined in Section 5. The 249 replacement of the base BGP decision process with the SPF computation 250 is specified in Section 6. Finally, BGP SPF error handling is 251 defined in Section 7 253 1.4. Requirements Language 255 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 256 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 257 "OPTIONAL" in this document are to be interpreted as described in BCP 258 14 [RFC2119] [RFC8174] when, and only when, they appear in all 259 capitals, as shown here. 261 2. Base BGP Protocol Relationship 263 With the exception of the decision process, the BGP SPF extensions 264 leverage the BGP protocol [RFC4271] without change. This includes 265 the BGP protocol Finite State Machine, BGP messages and their 266 encodings, processing of BGP messages, BGP attributes and path 267 attributes, BGP NLRI encodings, and any error handling defined in the 268 [RFC4271] and [RFC7606]. 270 Due to the changes to the decision process, there are mechanisms and 271 encodings that are no longer applicable. While not necessarily 272 required for computation, the ORIGIN, AS_PATH, MULTI_EXIT_DISC, 273 LOCAL_PREF, and NEXT_HOP path attributes are mandatory and will be 274 validated. The ATOMIC_AGGEGATE, and AGGREGATOR are not applicable 275 within the context of BGP SPF and SHOULD NOT be advertised. However, 276 if they are advertised, they will be accepted, validated, and 277 propagated consistent with the BGP protocol. 279 Section 9 of [RFC4271] defines the decision process that is used to 280 select routes for subsequent advertisement by applying the policies 281 in the local Policy Information Base (PIB) to the routes stored in 282 its Adj-RIBs-In. The output of the Decision Process is the set of 283 routes that are announced by a BGP speaker to its peers. These 284 selected routes are stored by a BGP speaker in the speaker's Adj- 285 RIBs-Out according to policy. 287 The BGP SPF extension fundamentally changes the decision process, as 288 described herein, to be more like a link-state protocol (e.g., OSPF 289 [RFC2328]). Specifically: 291 1. BGP advertisements are readvertised to neighbors immediately 292 without waiting or dependence on the route computation as 293 specified in phase 3 of the base BGP decision process. Multiple 294 peering models are supported as specified in Section 4. 296 2. Determining the degree of preference for BGP routes for the SPF 297 calculation as described in phase 1 of the base BGP decision 298 process is replaced with the mechanisms in Section 6.1. 300 3. Phase 2 of the base BGP protocol decision process is replaced 301 with the Shortest Path First (SPF) algorithm, also known as the 302 Dijkstra algorithm Section 1.1. 304 3. BGP Link-State (BGP-LS) Relationship 306 [RFC7752] describes a mechanism by which link-state and TE 307 information can be collected from networks and shared with external 308 entities using BGP. This is achieved by defining NLRI advertised 309 using the BGP-LS AFI. The BGP-LS extensions defined in [RFC7752] 310 make use of the decision process defined in [RFC4271]. This document 311 reuses NLRI and TLVs defined in [RFC7752]. Rather than reusing the 312 BGP-LS SAFI, the BGP-LS-SPF SAFI Section 5.1 is introduced to insure 313 backward compatibility for the BGP-LS SAFI usage. 315 The BGP SPF extensions reuse the Node, Link, and Prefix NLRI defined 316 in [RFC7752]. The usage of the BGP-LS NLRI, metric attributes, and 317 attribute extensions is described in Section 5.2.1. The usage of 318 others BGP-LS attributes is not precluded and is, in fact, expected. 319 However, the details are beyond the scope of this document and will 320 be specified in future documents. 322 Support for Multiple Topology Routing (MTR) similar to the OSPF MTR 323 computation described in [RFC4915] is beyond the scope of this 324 document. Consequently, the usage of the Multi-Topology TLV as 325 described in section 3.2.1.5 of [RFC7752] is not specified. 327 The rules for setting the NLRI next-hop path attribute for the BGP- 328 LS-SPF SAFI will follow the BGP-LS SAFI as specified in section 3.4 329 of [RFC7752]. 331 4. BGP Peering Models 333 Depending on the topology, scaling, capabilities of the BGP-LS-SPF 334 speakers, and redundancy requirements, various peering models are 335 supported. The only requirements are that all BGP SPF speakers in 336 the BGP SPF routing domain exchange BGP-LS-SPF NLRI, run an SPF 337 calculation, and update their routing table appropriately. 339 4.1. BGP Single-Hop Peering on Network Node Connections 341 The simplest peering model is the one where EBGP single-hop sessions 342 are established over direct point-to-point links interconnecting the 343 nodes in the BGP SPF routing domain. Once the single-hop BGP session 344 has been established and the BGP-LS-SPF AFI/SAFI capability has been 345 exchanged [RFC4760] for the corresponding session, then the link is 346 considered up from a BGP SPF perspective and the corresponding BGP- 347 LS-SPF Link NLRI is advertised. If the session goes down, the 348 corresponding Link NLRI will be withdrawn. Topologically, this would 349 be equivalent to the peering model in [RFC7938] where there is a BGP 350 session on every link in the data center switch fabric. The content 351 of the Link NLRI is described in Section 5.2.2. 353 4.2. BGP Peering Between Directly-Connected Nodes 355 In this model, BGP-LS-SPF speakers peer with all directly-connected 356 nodes but the sessions may be between loopback addresses (i.e., two- 357 hop sessions) and the direct connection discovery and liveliness 358 detection for the interconnecting links are independent of the BGP 359 protocol. the scope of this document. For example, liveliness 360 detection could be done using the BFD protocol [RFC5880]. Precisely 361 how discovery and liveliness detection is accomplished is outside the 362 scope of this document. Consequently, there will be a single BGP 363 session even if there are multiple direct connections between BGP-LS- 364 SPF speakers. BGP-LS-SPF Link NLRI is advertised as long as a BGP 365 session has been established, the BGP-LS-SPF AFI/SAFI capability has 366 been exchanged [RFC4760], and the link is operational as determined 367 using liveliness detection mechanisms outside the scope of this 368 document. This is much like the previous peering model only peering 369 is between loopback addresses and the interconnecting links can be 370 unnumbered. However, since there are BGP sessions between every 371 directly-connected node in the BGP SPF routing domain, there is only 372 a reduction in BGP sessions when there are parallel links between 373 nodes. 375 4.3. BGP Peering in Route-Reflector or Controller Topology 377 In this model, BGP-LS-SPF speakers peer solely with one or more Route 378 Reflectors [RFC4456] or controllers. As in the previous model, 379 direct connection discovery and liveliness detection for those links 380 in the BGP SPF routing domain are done outside of the BGP protocol. 381 BGP-LS-SPF Link NLRI is advertised as long as the corresponding link 382 is considered up as per the chosen liveness detection mechanism. 384 This peering model, known as sparse peering, allows for fewer BGP 385 sessions and, consequently, fewer instances of the same NLRI received 386 from multiple peers. Normally, the route-reflectors or controller 387 BGP sessions would be on directly-connected links to avoid dependence 388 on another routing protocol for session connectivity. However, 389 multi-hop peering is not precluded. The number of BGP sessions is 390 dependent on the redundancy requirements and the stability of the BGP 391 sessions. This is discussed in greater detail in 392 [I-D.ietf-lsvr-applicability]. 394 5. BGP Shortest Path Routing (SPF) Protocol Extensions 396 5.1. BGP-LS Shortest Path Routing (SPF) SAFI 398 In order to replace the existing BGP decision process with an SPF- 399 based decision process in a backward compatible manner by not 400 impacting the BGP-LS SAFI, this document introduces the BGP-LS-SPF 401 SAFI. The BGP-LS-SPF (AFI 16388 / SAFI 80) [RFC4760] is allocated by 402 IANA as specified in the Section 8. In order for two BGP-LS-SPF 403 speakers to exchange BGP SPF NLRI, they MUST exchange the 404 Multiprotocol Extensions Capability [RFC5492] [RFC4760] to ensure 405 that they are both capable of properly processing such NLRI. This is 406 done with AFI 16388 / SAFI 80 for BGP-LS-SPF advertised within the 407 BGP SPF Routing Domain. The BGP-LS-SPF SAFI is used to carry IPv4 408 and IPv6 prefix information in a format facilitating an SPF-based 409 decision process. 411 5.1.1. BGP-LS-SPF NLRI TLVs 413 The NLRI format of BGP-LS-SPF SAFI uses exactly same format as the 414 BGP-LS AFI [RFC7752]. In other words, all the TLVs used in BGP-LS 415 AFI are applicable and used for the BGP-LS-SPF SAFI. These TLVs 416 within BGP-LS-SPF NLRI advertise information that describes links, 417 nodes, and prefixes comprising IGP link-state information. 419 In order to compare the NLRI efficiently, it is REQUIRED that all the 420 TLVs within the given NLRI must be ordered in ascending order by the 421 TLV type. For multiple TLVs of same type within a single NLRI, it is 422 REQUIRED that these TLVs are ordered in ascending order by the TLV 423 value field. Comparison of the value fields is performed by treating 424 the entire value field as a hexadecimal string. NLRIs having TLVs 425 which do not follow the ordering rules MUST be considered as 426 malformed and discarded with appropriate error logging. 428 [RFC7752] defines certain NLRI TLVs as a mandatory TLVs. These TLVs 429 are considered mandatory for the BGP-LS-SPF SAFI as well. All the 430 other TLVs are considered as an optional TLVs. 432 5.1.2. BGP-LS Attribute 434 The BGP-LS attribute of the BGP-LS-SPF SAFI uses exactly same format 435 of the BGP-LS AFI [RFC7752]. In other words, all the TLVs used in 436 BGP-LS attribute of the BGP-LS AFI are applicable and used for the 437 BGP-LS attribute of the BGP-LS-SPF SAFI. This attribute is an 438 optional, non-transitive BGP attribute that is used to carry link, 439 node, and prefix properties and attributes. The BGP-LS attribute is 440 a set of TLVs. 442 The BGP-LS attribute may potentially grow large in size depending on 443 the amount of link-state information associated with a single Link- 444 State NLRI. The BGP specification [RFC4271] mandates a maximum BGP 445 message size of 4096 octets. It is RECOMMENDED that an 446 implementation support [RFC8654] in order to accommodate larger size 447 of information within the BGP-LS Attribute. BGP-LS-SPF speakers MUST 448 ensure that they limit the TLVs included in the BGP-LS Attribute to 449 ensure that a BGP update message for a single Link-State NLRI does 450 not cross the maximum limit for a BGP message. The determination of 451 the types of TLVs to be included by the BGP-LS-SPF speaker 452 originating the attribute is outside the scope of this document. 453 When a BGP-LS-SPF speaker finds that it is exceeding the maximum BGP 454 message size due to addition or update of some other BGP Attribute 455 (e.g., AS_PATH), it MUST consider the BGP-LS Attribute to be 456 malformed and the attribute discard handling of [RFC7606] applies. 458 In order to compare the BGP-LS attribute efficiently, it is REQUIRED 459 that all the TLVs within the given attribute must be ordered in 460 ascending order by the TLV type. For multiple TLVs of same type 461 within a single attribute, it is REQUIRED that these TLVs are ordered 462 in ascending order by the TLV value field. Comparison of the value 463 fields is performed by treating the entire value field as a 464 hexadecimal string. Attributes having TLVs which do not follow the 465 ordering rules MUST NOT be considered as malformed. 467 All TLVs within the BGP-LS Attribute are considered optional unless 468 specified otherwise. 470 5.2. Extensions to BGP-LS 472 [RFC7752] describes a mechanism by which link-state and TE 473 information can be collected from IGPs and shared with external 474 components using the BGP protocol. It describes both the definition 475 of the BGP-LS-SPF NLRI that advertise links, nodes, and prefixes 476 comprising IGP link-state information and the definition of a BGP 477 path attribute (BGP-LS attribute) that carries link, node, and prefix 478 properties and attributes, such as the link and prefix metric or 479 auxiliary Router-IDs of nodes, etc. This document extends the usage 480 of BGP-LS NLRI for the purpose of BGP SPF calculation via 481 advertisement in the BGP-LS-SPF SAFI. 483 The protocol identifier specified in the Protocol-ID field [RFC7752] 484 will represent the origin of the advertised NLRI. For Node NLRI and 485 Link NLRI, this MUST be the direct protocol (4). Node or Link NLRI 486 with a Protocol-ID other than direct will be considered malformed. 487 For Prefix NLRI, the specified Protocol-ID MUST be the origin of the 488 prefix. The local and remote node descriptors for all NLRI MUST 489 include the BGP Identifier (TLV 516) and the AS Number (TLV 512) 490 [RFC7752]. The BGP Confederation Member (TLV 517) [RFC7752] is not 491 appliable and SHOULD not be included. If TLV 517 is included, it 492 will be ignored. 494 5.2.1. Node NLRI Usage 496 The Node NLRI MUST be advertised unconditionally by all routers in 497 the BGP SPF routing domain. 499 5.2.1.1. Node NLRI Attribute SPF Capability TLV 501 The SPF capability is an additional Node Attribute TLV. This 502 attribute TLV MUST be included with the BGP-LS-SPF SAFI and SHOULD 503 NOT be used for other SAFIs. The TLV type 1180 will be assigned by 504 IANA. The Node Attribute TLV will contain a single-octet SPF 505 algorithm as defined in [RFC8665]. 507 0 1 2 3 508 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 509 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 510 | Type (1180) | Length - (1 Octet) | 511 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 512 | SPF Algorithm | 513 +-+-+-+-+-+-+-+-+ 515 The SPF algorithm inherits the values from the IGP Algorithm Types 516 registry [RFC8665]. Algorithm 0, (Shortest Path Algorithm (SPF) 517 based on link metric, is supported and described in Section 6.3. 518 Support for other algorithm types is beyond the scope of this 519 specification. 521 When computing the SPF for a given BGP routing domain, only BGP nodes 522 advertising the SPF capability TLV with same SPF algorithm will be 523 included in the Shortest Path Tree (SPT) Section 6.3. An 524 implementation MAY optionally log detection of a BGP node that has 525 either not advertised the SPF capability TLV or is advertising the 526 SPF capability TLV with an algorithm type other than 0. 528 5.2.1.2. BGP-LS-SPF Node NLRI Attribute SPF Status TLV 530 A BGP-LS Attribute TLV of the BGP-LS-SPF Node NLRI is defined to 531 indicate the status of the node with respect to the BGP SPF 532 calculation. This will be used to rapidly take a node out of service 533 Section 6.5.2 or to indicate the node is not to be used for transit 534 (i.e., non-local) traffic Section 6.3. If the SPF Status TLV is not 535 included with the Node NLRI, the node is considered to be up and is 536 available for transit traffic. The SPF status is acted upon with the 537 execution of the next SPF calculation Section 6.3. A single TLV type 538 will be shared by the BGP-LS-SPF Node, Link, and Prefix NLRI. The 539 TLV type 1184 will be assigned by IANA. 541 0 1 2 3 542 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 543 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 544 | Type (1184) | Length (1 Octet) | 545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 546 | SPF Status | 547 +-+-+-+-+-+-+-+-+ 549 BGP Status Values: 0 - Reserved 550 1 - Node Unreachable with respect to BGP SPF 551 2 - Node does not support transit with respect 552 to BGP SPF 553 3-254 - Undefined 554 255 - Reserved 556 If the SPF Status TLV is received and the corresponding Node NLRI has 557 not been received, then the SPF Status TLV is ignored and not used in 558 SPF computation but is still announced to other BGP speakers. An 559 implementation MAY log an error for further analysis. If a BGP 560 speaker received the Node NLRI but the SPF Status TLV is not 561 received, then any previously received information is considered as 562 implicitly withdrawn and the update is propagated to other BGP 563 speakers. A BGP speaker receiving a BGP Update containing a SPF 564 Status TLV in the BGP-LS attribute [RFC7752] with a value that is 565 outside the range of defined values SHOULD be processed and announced 566 to other BGP speakers. However, a BGP speaker MUST not use the 567 Status TLV in its SPF computation. An implementation MAY log this 568 condition for further analysis. 570 5.2.2. Link NLRI Usage 572 The criteria for advertisement of Link NLRI are discussed in 573 Section 4. 575 Link NLRI is advertised with unique local and remote node descriptors 576 dependent on the IP addressing. For IPv4 links, the link's local 577 IPv4 (TLV 259) and remote IPv4 (TLV 260) addresses will be used. For 578 IPv6 links, the local IPv6 (TLV 261) and remote IPv6 (TLV 262) 579 addresses will be used. For unnumbered links, the link local/remote 580 identifiers (TLV 258) will be used. For links supporting having both 581 IPv4 and IPv6 addresses, both sets of descriptors MAY be included in 582 the same Link NLRI. The link identifiers are described in table 5 of 583 [RFC7752]. 585 For a link to be used in Shortest Path Tree (SPT) for a given address 586 family, i.e., IPv4 or IPv6, both routers connecting the link MUST 587 have an address in the same subnet for that address family. However, 588 an IPv4 or IPv6 prefix associated with the link MAY be installed 589 without the corresponding address on the other side of link. 591 The link IGP metric attribute TLV (TLV 1095) MUST be advertised. If 592 a BGP speaker receives a Link NLRI without an IGP metric attribute 593 TLV, then it SHOULD consider the received NLRI as a malformed and the 594 receiving BGP speaker MUST handle such malformed NLRI as 'Treat-as- 595 withdraw' [RFC7606]. The BGP SPF metric length is 4 octets. Like 596 OSPF [RFC2328], a cost is associated with the output side of each 597 router interface. This cost is configurable by the system 598 administrator. The lower the cost, the more likely the interface is 599 to be used to forward data traffic. One possible default for metric 600 would be to give each interface a cost of 1 making it effectively a 601 hop count. Algorithms such as setting the metric inversely to the 602 link speed as supported in the OSPF MIB [RFC4750] MAY be supported. 603 However, this is beyond the scope of this document. Refer to 604 Section 10.1.1 for operational guidance. 606 The usage of other link attribute TLVs is beyond the scope of this 607 document. 609 5.2.2.1. BGP-LS-SPF Link NLRI Attribute Prefix-Length TLVs 611 Two BGP-LS Attribute TLVs of the BGP-LS-SPF Link NLRI are defined to 612 advertise the prefix length associated with the IPv4 and IPv6 link 613 prefixes derived from the link descriptor addresses. The prefix 614 length is used for the optional installation of prefixes 615 corresponding to Link NLRI as defined in Section 6.3. 617 0 1 2 3 618 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 619 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 620 |IPv4 (1182) or IPv6 Type (1183)| Length (1 Octet) | 621 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 622 | Prefix-Length | 623 +-+-+-+-+-+-+-+-+ 625 Prefix-length - A one-octet length restricted to 1-32 for IPv4 626 Link NLRI endpoint prefixes and 1-128 for IPv6 627 Link NLRI endpoint prefixes. 629 The Prefix-Length TLV is only relevant to Link NLRIs. The Prefix- 630 Length TLVs MUST be discarded as an error and not passed to other BGP 631 peers as specified in [RFC7606] when received with any NLRIs other 632 than Link NRLIs. An implementation MAY log an error for further 633 analysis. 635 The maximum prefix-length for IPv4 Prefix-Length TLV is 32 bits. A 636 prefix-length field indicating a larger value than 32 bits MUST be 637 discarded as an error and the received TLV is not passed to other BGP 638 peers as specified in [RFC7606]. The corresponding Link NLRI is 639 considered as malformed and MUST be handled as 'Treat-as-withdraw'. 640 An implementation MAY log an error for further analysis. 642 The maximum prefix-length for IPv6 Prefix-Length Type is 128 bits. A 643 prefix-length field indicating a larger value than 128 bits MUST be 644 discarded as an error and the received TLV is not passed to other BGP 645 peers as specified in [RFC7606]. The corresponding Link NLRI is 646 considered as malformed and MUST be handled as 'Treat-as-withdraw'. 647 An implementation MAY log an error for further analysis. 649 5.2.2.2. BGP-LS-SPF Link NLRI Attribute SPF Status TLV 651 A BGP-LS Attribute TLV of the BGP-LS-SPF Link NLRI is defined to 652 indicate the status of the link with respect to the BGP SPF 653 calculation. This will be used to expedite convergence for link 654 failures as discussed in Section 6.5.1. If the SPF Status TLV is not 655 included with the Link NLRI, the link is considered up and available. 656 The SPF status is acted upon with the execution of the next SPF 657 calculation Section 6.3. A single TLV type will be shared by the 658 Node, Link, and Prefix NLRI. The TLV type 1184 will be assigned by 659 IANA. 661 0 1 2 3 662 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 663 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 664 | Type (1184) | Length (1 Octet) | 665 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 666 | SPF Status | 667 +-+-+-+-+-+-+-+-+ 669 BGP Status Values: 0 - Reserved 670 1 - Link Unreachable with respect to BGP SPF 671 2-254 - Undefined 672 255 - Reserved 674 If the SPF Status TLV is received and the corresponding Link NLRI has 675 not been received, then the SPF Status TLV is ignored and not used in 676 SPF computation but is still announced to other BGP speakers. An 677 implementation MAY log an error for further analysis. If a BGP 678 speaker received the Link NLRI but the SPF Status TLV is not 679 received, then any previously received information is considered as 680 implicitly withdrawn and the update is propagated to other BGP 681 speakers. A BGP speaker receiving a BGP Update containing an SPF 682 Status TLV in the BGP-LS attribute [RFC7752] with a value that is 683 outside the range of defined values SHOULD be processed and announced 684 to other BGP speakers. However, a BGP speaker MUST not use the 685 Status TLV in its SPF computation. An implementation MAY log this 686 information for further analysis. 688 5.2.3. IPv4/IPv6 Prefix NLRI Usage 690 IPv4/IPv6 Prefix NLRI is advertised with a Local Node Descriptor and 691 the prefix and length. The Prefix Descriptors field includes the IP 692 Reachability Information TLV (TLV 265) as described in [RFC7752]. 693 The Prefix Metric attribute TLV (TLV 1155) MUST be advertised. The 694 IGP Route Tag TLV (TLV 1153) MAY be advertised. The usage of other 695 attribute TLVs is beyond the scope of this document. For loopback 696 prefixes, the metric should be 0. For non-loopback prefixes, the 697 setting of the metric is a local matter and beyond the scope of this 698 document. 700 5.2.3.1. BGP-LS-SPF Prefix NLRI Attribute SPF Status TLV 702 A BGP-LS Attribute TLV to BGP-LS-SPF Prefix NLRI is defined to 703 indicate the status of the prefix with respect to the BGP SPF 704 calculation. This will be used to expedite convergence for prefix 705 unreachability as discussed in Section 6.5.1. If the SPF Status TLV 706 is not included with the Prefix NLRI, the prefix is considered 707 reachable. A single TLV type will be shared by the Node, Link, and 708 Prefix NLRI. The TLV type 1184 will be assigned by IANA. 710 0 1 2 3 711 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 712 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 713 | Type (1184) | Length (1 Octet) | 714 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 715 | SPF Status | 716 +-+-+-+-+-+-+-+-+ 718 BGP Status Values: 0 - Reserved 719 1 - Prefix Unreachable with respect to SPF 720 2-254 - Undefined 721 255 - Reserved 723 If the SPF Status TLV is received and the corresponding Prefix NLRI 724 has not been received, then the SPF Status TLV is ignored and not 725 used in SPF computation but is still announced to other BGP speakers. 726 An implementation MAY log an error for further analysis. If a BGP 727 speaker received the Prefix NLRI but the SPF Status TLV is not 728 received, then any previously received information is considered as 729 implicitly withdrawn and the update is propagated to other BGP 730 speakers. A BGP speaker receiving a BGP Update containing an SPF 731 Status TLV in the BGP-LS attribute [RFC7752] with a value that is 732 outside the range of defined values SHOULD be processed and announced 733 to other BGP speakers. However, a BGP speaker MUST not use the 734 Status TLV in its SPF computation. An implementation MAY log this 735 information for further analysis. 737 5.2.4. BGP-LS Attribute Sequence-Number TLV 739 A BGP-LS Attribute TLV of the BGP-LS-SPF NLRI types is defined to 740 assure the most recent version of a given NLRI is used in the SPF 741 computation. The Sequence-Number TLV is mandatory for BGP-LS-SPF 742 NLRI. The TLV type 1181 has been assigned by IANA. The BGP-LS 743 Attribute TLV will contain an 8-octet sequence number. The usage of 744 the Sequence Number TLV is described in Section 6.1. 746 0 1 2 3 747 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 748 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 749 | Type (1181) | Length (8 Octets) | 750 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 751 | Sequence Number (High-Order 32 Bits) | 752 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 753 | Sequence Number (Low-Order 32 Bits) | 754 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 756 Sequence Number 758 The 64-bit strictly-increasing sequence number MUST be incremented 759 for every self-originated version of BGP-LS-SPF NLRI. BGP speakers 760 implementing this specification MUST use available mechanisms to 761 preserve the sequence number's strictly increasing property for the 762 deployed life of the BGP speaker (including cold restarts). One 763 mechanism for accomplishing this would be to use the high-order 32 764 bits of the sequence number as a wrap/boot count that is incremented 765 any time the BGP router loses its sequence number state or the low- 766 order 32 bits wrap. 768 When incrementing the sequence number for each self-originated NLRI, 769 the sequence number should be treated as an unsigned 64-bit value. 770 If the lower-order 32-bit value wraps, the higher-order 32-bit value 771 should be incremented and saved in non-volatile storage. If a BGP- 772 LS-SPF speaker completely loses its sequence number state (e.g., the 773 BGP speaker hardware is replaced or experiences a cold-start), the 774 BGP NLRI selection rules (see Section 6.1) will insure convergence, 775 albeit not immediately. 777 The Sequence-Number TLV is mandatory for BGP-LS-SPF NLRI. If the 778 Sequence-Number TLV is not received then the corresponding Link NLRI 779 is considered as malformed and MUST be handled as 'Treat-as- 780 withdraw'. An implementation MAY log an error for further analysis. 782 5.3. NEXT_HOP Manipulation 784 All BGP peers that support SPF extensions would locally compute the 785 Loc-RIB Next-Hop as a result of the SPF process. Consequently, the 786 Next-Hop is always ignored on receipt. The Next-Hop address MUST be 787 encoded as described in [RFC4760]. BGP speakers MUST interpret the 788 Next-Hop address of MP_REACH_NLRI attribute as an IPv4 address 789 whenever the length of the Next-Hop address is 4 octets, and as a 790 IPv6 address whenever the length of the Next-Hop address is 16 791 octets. 793 [RFC4760] modifies the rules of NEXT_HOP attribute whenever the 794 multiprotocol extensions for BGP-4 are enabled. BGP speakers MUST 795 set the NEXT_HOP attribute according to the rules specified in 796 [RFC4760] as the BGP-LS-SPF routing information is carried within the 797 multiprotocol extensions for BGP-4. 799 6. Decision Process with SPF Algorithm 801 The Decision Process described in [RFC4271] takes place in three 802 distinct phases. The Phase 1 decision function of the Decision 803 Process is responsible for calculating the degree of preference for 804 each route received from a BGP speaker's peer. The Phase 2 decision 805 function is invoked on completion of the Phase 1 decision function 806 and is responsible for choosing the best route out of all those 807 available for each distinct destination, and for installing each 808 chosen route into the Loc-RIB. The combination of the Phase 1 and 2 809 decision functions is characterized as a Path Vector algorithm. 811 The SPF based Decision process replaces the BGP Decision process 812 described in [RFC4271]. This process starts with selecting only 813 those Node NLRI whose SPF capability TLV matches with the local BGP- 814 LS-SPF speaker's SPF capability TLV value. Since Link-State NLRI 815 always contains the local node descriptor Section 5.2.1, each NLRI is 816 uniquely originated by a single BGP-LS-SPF speaker in the BGP SPF 817 routing domain (the BGP node matching the NLRI's Node Descriptors). 818 Instances of the same NLRI originated by multiple BGP speakers would 819 be indicative of a configuration error or a masquerading attack 820 (Section 9). These selected Node NLRI and their Link/Prefix NLRI are 821 used to build a directed graph during the SPF computation as 822 described below. The best routes for BGP prefixes are installed in 823 the RIB as a result of the SPF process. 825 When BGP-LS-SPF NLRI is received, all that is required is to 826 determine whether it is the most recent by examining the Node-ID and 827 sequence number as described in Section 6.1. If the received NLRI 828 has changed, it will be advertised to other BGP-LS-SPF peers. If the 829 attributes have changed (other than the sequence number), a BGP SPF 830 calculation will be triggered. However, a changed NLRI MAY be 831 advertised immediately to other peers and prior to any SPF 832 calculation. Note that the BGP MinRouteAdvertisementIntervalTimer 833 and MinASOriginationIntervalTimer [RFC4271] timers are not applicable 834 to the BGP-LS-SPF SAFI. The scheduling of the SPF calculation, as 835 described in Section 6.3, is an implementation issue. Scheduling MAY 836 be dampened consistent with the SPF back-off algorithm specified in 837 [RFC8405]. 839 The Phase 3 decision function of the Decision Process [RFC4271] is 840 also simplified since under normal SPF operation, a BGP speaker MUST 841 advertise the changed NLRIs to all BGP peers with the BGP-LS-SPF AFI/ 842 SAFI and install the changed routes in the Global RIB. The only 843 exception are unchanged NLRIs or stale NLRIs, i.e., NLRI received 844 with a less recent (numerically smaller) sequence number. 846 6.1. BGP NLRI Selection 848 The rules for all BGP-LS-SPF NLRIs selection for phase 1 of the BGP 849 decision process, section 9.1.1 [RFC4271], no longer apply. 851 1. Routes originated by directly connected BGP SPF peers are 852 preferred. This condition can be determined by comparing the BGP 853 Identifiers in the received Local Node Descriptor and OPEN 854 message. This rule will assure that stale NLRI is updated even 855 if a BGP-LS router loses its sequence number state due to a cold- 856 start. 858 2. The NLRI with the most recent Sequence Number TLV, i.e., highest 859 sequence number is selected. 861 3. The route received from the BGP SPF speaker with the numerically 862 larger BGP Identifier is preferred. 864 When a BGP SPF speaker completely loses its sequence number state, 865 i.e., due to a cold start, or in the unlikely possibility that that 866 64-bit sequence number wraps, the BGP routing domain will still 867 converge. This is due to the fact that BGP speakers adjacent to the 868 router will always accept self-originated NLRI from the associated 869 speaker as more recent (rule # 1). When a BGP speaker reestablishes 870 a connection with its peers, any existing session will be taken down 871 and stale NLRI will be replaced. The adjacent BGP speaker will 872 update their NLRI advertisements, hop by hop, until the BGP routing 873 domain has converged. 875 The modified SPF Decision Process performs an SPF calculation rooted 876 at the BGP speaker using the metrics from the Link Attribute IGP 877 Metric TLV (1095) and the Prefix Attribute Prefix Metric TLV (1155) 878 [RFC7752]. As a result, any other BGP attributes that would 879 influence the BGP decision process defined in [RFC4271] including 880 ORIGIN, MULTI_EXIT_DISC, and LOCAL_PREF attributes are ignored by the 881 SPF algorithm. The NEXT_HOP attribute is discussed in Section 5.3. 882 The AS_PATH and AS4_PATH [RFC6793] attributes are preserved and used 883 for loop detection [RFC4271]. They are ignored during the SPF 884 computation for BGP-LS-SPF NRLIs. 886 6.1.1. BGP Self-Originated NLRI 888 Node, Link, or Prefix NLRI with Node Descriptors matching the local 889 BGP speaker are considered self-originated. When self-originated 890 NLRI is received and it doesn't match the local node's NLRI content 891 (including sequence number), special processing is required. 893 o If a self-originated NLRI is received and the sequence number is 894 more recent (i.e., greater than the local node's sequence number 895 for the NLRI), the NLRI sequence number will be advanced to one 896 greater than the received sequence number and the NLRI will be 897 readvertised to all peers. 899 o If self-originated NLRI is received and the sequence number is the 900 same as the local node's sequence number but the attributes 901 differ, the NLRI sequence number will be advanced to one greater 902 than the received sequence number and the NLRI will be 903 readvertised to all peers. 905 o If self-originated Link or Prefix NLRI is received and the Link or 906 Prefix NLRI is no longer being advertised by the local node, the 907 NLRI will be withdrawn. 909 The above actions are performed immediately when the first instance 910 of a newer self-originated NLRI is received. In this case, the newer 911 instance is considered to be a stale instance that was advertised by 912 the local node prior to a restart where the NLRI state is lost. 913 However, if subsequent newer self-originated NLRI is received for the 914 same Node, Link, or Prefix NLRI, the readvertisement or withdrawal is 915 delayed by 5 seconds since it is likely being advertised by a 916 misconfigured or rogue BGP-LS-SPF speaker Section 9. 918 6.2. Dual Stack Support 920 The SPF-based decision process operates on Node, Link, and Prefix 921 NLRIs that support both IPv4 and IPv6 addresses. Whether to run a 922 single SPF computation or multiple SPF computations for separate AFs 923 is an implementation matter. Normally, IPv4 next-hops are calculated 924 for IPv4 prefixes and IPv6 next-hops are calculated for IPv6 925 prefixes. 927 6.3. SPF Calculation based on BGP-LS-SPF NLRI 929 This section details the BGP-LS-SPF local routing information base 930 (RIB) calculation. The router will use BGP-LS-SPF Node, Link, and 931 Prefix NLRI to compute routes using the following algorithm. This 932 calculation yields the set of routes associated with the BGP SPF 933 Routing Domain. A router calculates the shortest-path tree using 934 itself as the root. Optimizations to the BGP-LS-SPF algorithm are 935 possible but MUST yield the same set of routes. The algorithm below 936 supports Equal Cost Multi-Path (ECMP) routes. Weighted Unequal Cost 937 Multi-Path routes are out of scope. The organization of this section 938 owes heavily to section 16 of [RFC2328]. 940 The following abstract data structures are defined in order to 941 specify the algorithm. 943 o Local Route Information Base (LOC-RIB) - This routing table 944 contains reachability information (i.e., next hops) for all 945 prefixes (both IPv4 and IPv6) as well as BGP-LS-SPF node 946 reachability. Implementations may choose to implement this with 947 separate RIBs for each address family and/or Prefix versus Node 948 reachability. It is synonymous with the Loc-RIB specified in 949 [RFC4271]. 951 o Global Routing Information Base (GLOBAL-RIB) - This is Routing 952 Information Base (RIB) containing the current routes that are 953 installed in the router's forwarding plane. This is commonly 954 referred to in networking parlance as "the RIB". 956 o Link State NLRI Database (LSNDB) - Database of BGP-LS-SPF NLRI 957 that facilitates access to all Node, Link, and Prefix NLRI. 959 o Candidate List (CAN-LIST) - This is a list of candidate Node NLRIs 960 used during the BGP SPF calculation Section 6.3. The list is 961 sorted by the cost to reach the Node NLRI with the Node NLRI with 962 the lowest reachability cost at the head of the list. This 963 facilitates execution of the Dijkstra algorithm Section 1.1 where 964 the shortest paths between the local node and other nodes in graph 965 area computed. The CAN-LIST is typically implemented as a heap 966 but other data structures have been used. 968 The algorithm is comprised of the steps below: 970 1. The current LOC-RIB is invalidated, and the CAN-LIST is 971 initialized to empty. The LOC-RIB is rebuilt during the course 972 of the SPF computation. The existing routing entries are 973 preserved for comparison to determine changes that need to be 974 made to the GLOBAL-RIB in step 6. 976 2. The computing router's Node NLRI is updated in the LOC-RIB with a 977 cost of 0 and the Node NLRI is also added to the CAN-LIST. The 978 next-hop list is set to the internal loopback next-hop. 980 3. The Node NLRI with the lowest cost is removed from the candidate 981 list for processing. If the BGP-LS Node attribute doesn't 982 include an SPF Capability TLV (Section 5.2.1.1, the Node NLRI is 983 ignored and the next lowest cost Node NLRI is selected from 984 candidate list. The If the BGP-LS Node attribute includes an SPF 985 Status TLV (Section 5.2.1.1) indicating the node is unreachable, 986 the Node NLRI is ignored and the next lowest cost Node NLRI is 987 selected from candidate list. The Node corresponding to this 988 NLRI will be referred to as the Current-Node. If the candidate 989 list is empty, the SPF calculation has completed and the 990 algorithm proceeds to step 6. 992 4. All the Prefix NLRI with the same Node Identifiers as the 993 Current-Node will be considered for installation. The next- 994 hop(s) for these Prefix NLRI are inherited from the Current-Node. 995 The cost for each prefix is the metric advertised in the Prefix 996 Attribute Prefix Metric TLV (1155) added to the cost to reach the 997 Current-Node. The following will be done for each Prefix NLRI 998 (referred to as the Current-Prefix): 1000 * If the BGP-LS Prefix attribute includes an SPF Status TLV 1001 indicating the prefix is unreachable, the Current-Prefix is 1002 considered unreachable and the next Prefix NLRI is examined in 1003 Step 4. 1005 * If the Current-Prefix's corresponding prefix is in the LOC-RIB 1006 and the cost is less than the Current-Prefix's metric, the 1007 Current-Prefix does not contribute to the route and the next 1008 Prefix NLRI is examined in Step 4. 1010 * If the Current-Prefix's corresponding prefix is not in the 1011 LOC-RIB, the prefix is installed with the Current-Node's next- 1012 hops installed as the LOC-RIB route's next-hops and the metric 1013 being updated. If the IGP Route Tag TLV (1153) is included in 1014 the Current-Prefix's NLRI Attribute, the tag(s) are installed 1015 in the current LOC-RIB route's tag(s). 1017 * If the Current-Prefix's corresponding prefix is in the LOC-RIB 1018 and the cost is less than the current route's metric, the 1019 prefix is installed with the Current-Node's next-hops 1020 replacing the LOC-RIB route's next-hops and the metric being 1021 updated and any route tags removed. If the IGP Route Tag TLV 1022 (1153) is included in the Current-Prefix's NLRI Attribute, the 1023 tag(s) are installed in the current LOC-RIB route's tag(s). 1025 * If the Current-Prefix's corresponding prefix is in the LOC-RIB 1026 and the cost is the same as the current route's metric, the 1027 Current-Node's next-hops will be merged with LOC-RIB route's 1028 next-hops. If the IGP Route Tag TLV (1153) is included in the 1029 Current-Prefix's NLRI Attribute, the tag(s) are merged into 1030 the LOC-RIB route's current tags. 1032 5. All the Link NLRI with the same Node Identifiers as the Current- 1033 Node will be considered for installation. Each link will be 1034 examined and will be referred to in the following text as the 1035 Current-Link. The cost of the Current-Link is the advertised IGP 1036 Metric TLV (1095) from the Link NLRI BGP-LS attribute added to 1037 the cost to reach the Current-Node. If the Current-Node is for 1038 the local BGP Router, the next-hop for the link will be a direct 1039 next-hop pointing to the corresponding local interface. For any 1040 other Current-Node, the next-hop(s) for the Current-Link will be 1041 inherited from the Current-Node. The following will be done for 1042 each link: 1044 A. The prefix(es) associated with the Current-Link are installed 1045 into the LOC-RIB using the same rules as were used for Prefix 1046 NLRI in the previous steps. Optionally, in deployments where 1047 BGP-SPF routers have limited routing table capacity, 1048 installation of these subnets can be suppressed. Suppression 1049 will have an operational impact as the IPv4/IPv6 link 1050 endpoint addresses will not be reachable and tools such as 1051 traceroute will display addresses that are not reachable. 1053 B. If the Current-Node NLRI attributes includes the SPF status 1054 TLV (Section 5.2.1.2) and the status indicates that the Node 1055 doesn't support transit, the next link for the Current-Node 1056 is processed in Step 5. 1058 C. If the Current-Link's NLRI attribute includes an SPF Status 1059 TLV indicating the link is down, the BGP-LS-SPF Link NLRI is 1060 considered down and the next link for the Current-Node is 1061 examined in Step 5. 1063 D. The Current-Link's Remote Node NLRI is accessed (i.e., the 1064 Node NLRI with the same Node identifiers as the Current- 1065 Link's Remote Node Descriptors). If it exists, it will be 1066 referred to as the Remote-Node and the algorithm will proceed 1067 as follows: 1069 + If the Remote-Node's NLRI attribute includes an SPF Status 1070 TLV indicating the node is unreachable, the next link for 1071 the Current-Node is examined in Step 5. 1073 + All the Link NLRI corresponding the Remote-Node will be 1074 searched for a Link NLRI pointing to the Current-Node. 1075 Each Link NLRI is examined for Remote Node Descriptors 1076 matching the Current-Node and Link Descriptors matching 1077 the Current-Link (e.g., sharing a common IPv4 or IPv6 1078 subnet). If both these conditions are satisfied for one 1079 of the Remote-Node's links, the bi-directional 1080 connectivity check succeeds and the Remote-Node may be 1081 processed further. The Remote-Node's Link NLRI providing 1082 bi-directional connectivity will be referred to as the 1083 Remote-Link. If no Remote-Link is found, the next link 1084 for the Current-Node is examined in Step 5. 1086 + If the Remote-Link NLRI attribute includes an SPF Status 1087 TLV indicating the link is down, the Remote-Link NLRI is 1088 considered down and the next link for the Current-Node is 1089 examined in Step 5. 1091 + If the Remote-Node is not on the CAN-LIST, it is inserted 1092 based on the cost. The Remote Node's cost is the cost of 1093 Current-Node added the Current-Link's IGP Metric TLV 1094 (1095). The next-hop(s) for the Remote-Node are inherited 1095 from the Current-Link. 1097 + If the Remote-Node NLRI is already on the CAN-LIST with a 1098 higher cost, it must be removed and reinserted with the 1099 Remote-Node cost based on the Current-Link (as calculated 1100 in the previous step). The next-hop(s) for the Remote- 1101 Node are inherited from the Current-Link. 1103 + If the Remote-Node NLRI is already on the CAN-LIST with 1104 the same cost, it need not be reinserted on the CAN-LIST. 1105 However, the Current-Link's next-hop(s) must be merged 1106 into the current set of next-hops for the Remote-Node. 1108 + If the Remote-Node NLRI is already on the CAN-LIST with a 1109 lower cost, it need not be reinserted on the CAN-LIST. 1111 E. Return to step 3 to process the next lowest cost Node NLRI on 1112 the CAN-LIST. 1114 6. The LOC-RIB is examined and changes (adds, deletes, 1115 modifications) are installed into the GLOBAL-RIB. For each route 1116 in the LOC-RIB: 1118 * If the route was added during the current BGP SPF computation, 1119 install the route into the GLOBAL-RIB. 1121 * If the route modified during the current BGP SPF computation 1122 (e.g., metric, tags, or next-hops), update the route in the 1123 GLOBAL-RIB. 1125 * If the route was not installed during the current BGP SPF 1126 computation, remove the route from both the GLOBAL-RIB and the 1127 LOC-RIB. 1129 6.4. IPv4/IPv6 Unicast Address Family Interaction 1131 While the BGP-LS-SPF address family and the IPv4/IPv6 unicast address 1132 families MAY install routes into the same device routing tables, they 1133 will operate independently much the same as OSPF and IS-IS would 1134 operate today (i.e., "Ships-in-the-Night" mode). There is no 1135 implicit route redistribution between the BGP address families. 1137 It is RECOMMENDED that BGP-LS-SPF IPv4/IPv6 route computation and 1138 installation be given scheduling priority by default over other BGP 1139 address families as these address families are considered as underlay 1140 SAFIs. Similarly, it is RECOMMENDED that the route preference or 1141 administrative distance give active route installation preference to 1142 BGP-LS-SPF IPv4/IPv6 routes over BGP routes from other AFI/SAFIs. 1143 However, this preference MAY be overridden by an operator-configured 1144 policy. 1146 6.5. NLRI Advertisement 1148 6.5.1. Link/Prefix Failure Convergence 1150 A local failure will prevent a link from being used in the SPF 1151 calculation due to the IGP bi-directional connectivity requirement. 1152 Consequently, local link failures SHOULD always be given priority 1153 over updates (e.g., withdrawing all routes learned on a session) in 1154 order to ensure the highest priority propagation and optimal 1155 convergence. 1157 An IGP such as OSPF [RFC2328] will stop using the link as soon as the 1158 Router-LSA for one side of the link is received. With a BGP 1159 advertisement, the link would continue to be used until the last copy 1160 of the BGP-LS-SPF Link NLRI is withdrawn. In order to avoid this 1161 delay, the originator of the Link NLRI SHOULD advertise a more recent 1162 version with an increased Sequence Number TLV for the BGP-LS-SPF Link 1163 NLRI including the SPF Status TLV (Section 5.2.2.2) indicating the 1164 link is down with respect to BGP SPF. The configurable 1165 LinkStatusDownAdvertise timer controls the interval that the BGP-LS- 1166 LINK NLRI is advertised with SPF Status indicating the link is down 1167 prior to withdrawal. If the link becomes available in that period, 1168 the originator of the BGP-LS-SPF LINK NLRI SHOULD advertise a more 1169 recent version of the BGP-LS-SPF Link NLRI without the SPF Status TLV 1170 in the BGP-LS Link Attributes. The suggested default value for the 1171 LinkStatusDownAdvertise timer is 2 seconds. 1173 Similarly, when a prefix becomes unreachable, a more recent version 1174 of the BGP-LS-SPF Prefix NLRI SHOULD be advertised with the SPF 1175 Status TLV (Section 5.2.3.1) indicating the prefix is unreachable in 1176 the BGP-LS Prefix Attributes and the prefix will be considered 1177 unreachable with respect to BGP SPF. The configurable 1178 PrefixStatusDownAdvertise timer controls the interval that the BGP- 1179 LS-Prefix NLRI is advertised with SPF Status indicating the prefix is 1180 unreachable prior to withdrawal. If the prefix becomes reachable in 1181 that period, the originator of the BGP-LS-SPF Prefix NLRI SHOULD 1182 advertise a more recent version of the BGP-LS-SPF Prefix NLRI without 1183 the SPF Status TLV in the BGP-LS Prefix Attributes. The suggested 1184 default value for the PrefixStatusDownAdvertise timer is 2 seconds. 1186 6.5.2. Node Failure Convergence 1188 With BGP without graceful restart [RFC4724], all the NLRI advertised 1189 by a node are implicitly withdrawn when a session failure is 1190 detected. If fast failure detection such as BFD is utilized, and the 1191 node is on the fastest converging path, the most recent versions of 1192 BGP-LS-SPF NLRI may be withdrawn. This will result into an older 1193 version of the NLRI being used until the new versions arrive and, 1194 potentially, unnecessary route flaps. For the BGP-LS-SPF SAFI, NLRI 1195 SHOULD NOT be implicitly withdrawn immediately to prevent such 1196 unnecessary route flaps. The configurable 1197 NLRIImplicitWithdrawalDelay timer controls the interval that NLRI is 1198 retained prior to implicit withdrawal after a BGP SPF speaker has 1199 transitioned out of Established state. This will not delay 1200 convergence since the adjacent nodes will detect the link failure and 1201 advertise a more recent NLRI indicating the link is down with respect 1202 to BGP SPF (Section 6.5.1) and the BGP SPF calculation will fail the 1203 bi-directional connectivity check Section 6.3. The suggested default 1204 value for the NLRIImplicitWithdrawalDelay timer is 2 seconds. 1206 7. Error Handling 1208 This section describes the Error Handling actions, as described in 1209 [RFC7606], that are specific to SAFI BGP-LS-SPF BGP Update message 1210 processing. 1212 7.1. Processing of BGP-LS-SPF TLVs 1214 When a BGP speaker receives a BGP Update containing a malformed Node 1215 NLRI SPF Status TLV in the BGP-LS Attribute [RFC7752], it MUST ignore 1216 the received TLV and MUST NOT pass it to other BGP peers as specified 1217 in [RFC7606]. When discarding an associated Node NLRI with a 1218 malformed TLV, a BGP speaker SHOULD log an error for further 1219 analysis. 1221 When a BGP speaker receives a BGP Update containing a malformed Link 1222 NLRI SPF Status TLV in the BGP-LS Attribute [RFC7752], it MUST ignore 1223 the received TLV and MUST NOT pass it to other BGP peers as specified 1224 in [RFC7606]. When discarding an associated Link NLRI with a 1225 malformed TLV, a BGP speaker SHOULD log an error for further 1226 analysis. 1228 When a BGP speaker receives a BGP Update containing a malformed 1229 Prefix NLRI SPF Status TLV in the BGP-LS Attribute [RFC7752], it MUST 1230 ignore the received TLV and MUST NOT pass it to other BGP peers as 1231 specified in [RFC7606]. When discarding an associated Prefix NLRI 1232 with a malformed TLV, a BGP speaker SHOULD log an error for further 1233 analysis. 1235 When a BGP speaker receives a BGP Update containing a malformed SPF 1236 Capability TLV in the Node NLRI BGP-LS Attribute [RFC7752], it MUST 1237 ignore the received TLV and the Node NLRI and MUST NOT pass it to 1238 other BGP peers as specified in [RFC7606]. When discarding a Node 1239 NLRI with a malformed TLV, a BGP speaker SHOULD log an error for 1240 further analysis. 1242 When a BGP speaker receives a BGP Update containing a malformed IPv4 1243 Prefix-Length TLV in the Link NLRI BGP-LS Attribute [RFC7752], it 1244 MUST ignore the received TLV and the Node NLRI and MUST NOT pass it 1245 to other BGP peers as specified in [RFC7606]. The corresponding Link 1246 NLRI is considered as malformed and MUST be handled as 'Treat-as- 1247 withdraw'. An implementation MAY log an error for further analysis. 1249 When a BGP speaker receives a BGP Update containing a malformed IPv6 1250 Prefix-Length TLV in the Link NLRI BGP-LS Attribute [RFC7752], it 1251 MUST ignore the received TLV and the Node NLRI and MUST NOT pass it 1252 to other BGP peers as specified in [RFC7606]. The corresponding Link 1253 NLRI is considered as malformed and MUST be handled as 'Treat-as- 1254 withdraw'. An implementation MAY log an error for further analysis. 1256 7.2. Processing of BGP-LS-SPF NLRIs 1258 A Link-State NLRI MUST NOT be considered as malformed or invalid 1259 based on the inclusion/exclusion of TLVs or contents of the TLV 1260 fields (i.e., semantic errors), as described in Section 5.1 and 1261 Section 5.1.1. 1263 A BGP-LS-SPF Speaker MUST perform the following syntactic validation 1264 of the BGP-LS-SPF NLRI to determine if it is malformed. 1266 1. Does the sum of all TLVs found in the BGP MP_REACH_NLRI attribute 1267 correspond to the BGP MP_REACH_NLRI length? 1269 2. Does the sum of all TLVs found in the BGP MP_UNREACH_NLRI 1270 attribute correspond to the BGP MP_UNREACH_NLRI length? 1272 3. Does the sum of all TLVs found in a BGP-LS-SPF NLRI correspond to 1273 the Total NLRI Length field of all its Descriptors? 1275 4. When an NLRI TLV is recognized, is the length of the TLV and its 1276 sub-TLVs valid? 1278 5. Has the syntactic correctness of the NLRI fields been verified as 1279 per [RFC7606]? 1281 6. Has the rule regarding ordering of TLVs been followed as 1282 described in Section 5.1.1? 1284 When the error determined allows for the router to skip the malformed 1285 NLRI(s) and continue processing of the rest of the update message 1286 (e.g., when the TLV ordering rule is violated), then it MUST handle 1287 such malformed NLRIs as 'Treat-as-withdraw'. In other cases, where 1288 the error in the NLRI encoding results in the inability to process 1289 the BGP update message (e.g., length related encoding errors), then 1290 the router SHOULD handle such malformed NLRIs as 'AFI/SAFI disable' 1291 when other AFI/SAFI besides BGP-LS are being advertised over the same 1292 session. Alternately, the router MUST perform 'session reset' when 1293 the session is only being used for BGP-LS-SPF or when its 'AFI/SAFI 1294 disable' action is not possible. 1296 7.3. Processing of BGP-LS Attribute 1298 A BGP-LS Attribute MUST NOT be considered as malformed or invalid 1299 based on the inclusion/exclusion of TLVs or contents of the TLV 1300 fields (i.e., semantic errors), as described in Section 5.1 and 1301 Section 5.1.1. 1303 A BGP-LS-SPF Speaker MUST perform the following syntactic validation 1304 of the BGP-LS Attribute to determine if it is malformed. 1306 1. Does the sum of all TLVs found in the BGP-LS-SPF Attribute 1307 correspond to the BGP-LS Attribute length? 1309 2. Has the syntactic correctness of the Attributes (including BGP-LS 1310 Attribute) been verified as per [RFC7606]? 1312 3. Is the length of each TLV and, when the TLV is recognized then, 1313 its sub-TLVs in the BGP-LS Attribute valid? 1315 When the detected error allows for the router to skip the malformed 1316 BGP-LS Attribute and continue processing of the rest of the update 1317 message (e.g., when the BGP-LS Attribute length and the total Path 1318 Attribute Length are correct but some TLV/sub-TLV length within the 1319 BGP-LS Attribute is invalid), then it MUST handle such malformed BGP- 1320 LS Attribute as 'Attribute Discard'. In other cases, when the error 1321 in the BGP-LS Attribute encoding results in the inability to process 1322 the BGP update message, then the handling is the same as described 1323 above for malformed NLRI. 1325 Note that the 'Attribute Discard' action results in the loss of all 1326 TLVs in the BGP-LS Attribute and not the removal of a specific 1327 malformed TLV. The removal of specific malformed TLVs may give a 1328 wrong indication to a BGP-LS-SPF speaker that the specific 1329 information is being deleted or is not available. 1331 When a BGP-LS-SPF speaker receives an update message with Link-State 1332 NLRI(s) in the MP_REACH_NLRI but without the BGP-LS-SPF Attribute, it 1333 is most likely an indication that a BGP-LS-SPF speaker preceding it 1334 has performed the 'Attribute Discard' fault handling. An 1335 implementation SHOULD preserve and propagate the Link-State NLRIs in 1336 such an update message so that the BGP-LS-SPF speaker can detect the 1337 loss of link-state information for that object and not assume its 1338 deletion/withdrawal. This also makes it possible for a network 1339 operator to trace back to the BGP-LS-SPF speaker which actually 1340 detected a problem with the BGP-LS Attribute. 1342 An implementation SHOULD log an error for further analysis for 1343 problems detected during syntax validation. 1345 When a BGP speaker receives a BGP Update containing a malformed IGP 1346 metric TLV in the Link NLRI BGP-LS Attribute [RFC7752], it MUST 1347 ignore the received TLV and the Link NLRI and MUST NOT pass it to 1348 other BGP peers as specified in [RFC7606]. When discarding a Link 1349 NLRI with a malformed TLV, a BGP speaker SHOULD log an error for 1350 further analysis. 1352 8. IANA Considerations 1354 This document defines the use of SAFI (80) for BGP SPF operation 1355 Section 5.1, and requests IANA to assign the value from the First 1356 Come First Serve (FCFS) range in the Subsequent Address Family 1357 Identifiers (SAFI) Parameters registry. 1359 This document also defines five attribute TLVs of BGP-LS-SPF NLRI. 1360 We request IANA to assign types for the SPF capability TLV, Sequence 1361 Number TLV, IPv4 Link Prefix-Length TLV, IPv6 Link Prefix-Length TLV, 1362 and SPF Status TLV from the "BGP-LS Node Descriptor, Link Descriptor, 1363 Prefix Descriptor, and Attribute TLVs" Registry. 1365 +-------------------------+-----------------+--------------------+ 1366 | Attribute TLV | Suggested Value | NLRI Applicability | 1367 +-------------------------+-----------------+--------------------+ 1368 | SPF Capability | 1180 | Node | 1369 | SPF Status | 1184 | Node, Link, Prefix | 1370 | IPv4 Link Prefix Length | 1182 | Link | 1371 | IPv6 Link Prefix Length | 1183 | Link | 1372 | Sequence Number | 1181 | Node, Link, Prefix | 1373 +-------------------------+-----------------+--------------------+ 1375 Table 1: NLRI Attribute TLVs 1377 9. Security Considerations 1379 This document defines a BGP SAFI, i.e., the BGP-LS-SPF SAFI. This 1380 document does not change the underlying security issues inherent in 1381 the BGP protocol [RFC4271]. The Security Considerations discussed in 1382 [RFC4271] apply to the BGP SPF functionality as well. The analysis 1383 of the security issues for BGP mentioned in [RFC4272] and [RFC6952] 1384 also applies to this document. The analysis of Generic Threats to 1385 Routing Protocols done in [RFC4593] is also worth noting. As the 1386 modifications described in this document for BGP SPF apply to IPv4 1387 Unicast and IPv6 Unicast as undelay SAFIs in a single BGP SPF Routing 1388 Domain, the BGP security solutions described in [RFC6811] and 1389 [RFC8205] are somewhat constricted as they are meant to apply for 1390 inter-domain BGP where multiple BGP Routing Domains are typically 1391 involved. The BGP-LS-SPF SAFI NLRI described in this document are 1392 typically advertised between EBGP or IBGP speakers under a single 1393 administrative domain. 1395 In the context of the BGP peering associated with this document, a 1396 BGP speaker MUST NOT accept updates from a peer that is not within 1397 any administrative control of an operator. That is, a participating 1398 BGP speaker SHOULD be aware of the nature of its peering 1399 relationships. Such protection can be achieved by manual 1400 configuration of peers at the BGP speaker. 1402 In order to mitigate the risk of peering with BGP speakers 1403 masquerading as legitimate authorized BGP speakers, it is recommended 1404 that the TCP Authentication Option (TCP-AO) [RFC5925] be used to 1405 authenticate BGP sessions. If an authorized BGP peer is compromised, 1406 that BGP peer could advertise modified Node, Link, or Prefix NLRI 1407 will result in misrouting, repeating origination of NLRI, and/or 1408 excessive SPF calculations. When a BGP speaker detects that its 1409 self-originated NLRI is being originated by another BGP speaker, an 1410 appropriate error should be logged so that the operator can take 1411 corrective action. 1413 10. Management Considerations 1415 This section includes unique management considerations for the BGP- 1416 LS-SPF address family. 1418 10.1. Configuration 1420 All routers in BGP SPF Routing Domain are under a single 1421 administrative domain allowing for consistent configuration. 1423 10.1.1. Link Metric Configuration 1425 Within a BGP SPF Routing Domain, the IGP metrics for all advertised 1426 links SHOULD be configured or defaulted consistently. For example, 1427 if a default metric is used for one router's links, then a similar 1428 metric should be used for all router's links. Similarly, if the link 1429 cost is derived from using the inverse of the link bandwidth on one 1430 router, then this SHOULD be done for all routers and the same 1431 reference bandwidth should be used to derive the inversely 1432 proportional metric. Failure to do so will not result in correct 1433 routing based on link metric. 1435 10.1.2. backoff-config 1437 In addition to configuration of the BGP-LS-SPF address family, 1438 implementations SHOULD support the "Shortest Path First (SPF) Back- 1439 Off Delay Algorithm for Link-State IGPs" [RFC8405]. If supported, 1440 configuration of the INITIAL_SPF_DELAY, SHORT_SPF_DELAY, 1441 LONG_SPF_DELAY, TIME_TO_LEARN, and HOLDDOWN_INTERVAL MUST be 1442 supported [RFC8405]. Section 6 of [RFC8405] recommends consistent 1443 configuration of these values throughout the IGP routing domain and 1444 this also applies to the BGP SPF Routing Domain. 1446 10.2. Operational Data 1448 In order to troubleshoot SPF issues, implementations SHOULD support 1449 an SPF log including entries for previous SPF computations. Each SPF 1450 log entry would include the BGP-LS-SPF NLRI SPF triggering the SPF, 1451 SPF scheduled time, SPF start time, SPF end time, and SPF type if 1452 different types of SPF are supported. Since the size of the log will 1453 be finite, implementations SHOULD also maintain counters for the 1454 total number of SPF computations and the total number of SPF 1455 triggering events. Additionally, to troubleshoot SPF scheduling and 1456 back-off [RFC8405], the current SPF back-off state, remaining time- 1457 to-learn, remaining holddown, last trigger event time, last SPF time, 1458 and next SPF time should be available. 1460 11. Implementation Status 1462 Note RFC Editor: Please remove this section and the associated 1463 references prior to publication. 1465 This section records the status of known implementations of the 1466 protocol defined by this specification at the time of posting of this 1467 Internet-Draft and is based on a proposal described in [RFC7942]. 1468 The description of implementations in this section is intended to 1469 assist the IETF in its decision processes in progressing drafts to 1470 RFCs. Please note that the listing of any individual implementation 1471 here does not imply endorsement by the IETF. Furthermore, no effort 1472 has been spent to verify the information presented here that was 1473 supplied by IETF contributors. This is not intended as, and must not 1474 be construed to be, a catalog of available implementations or their 1475 features. Readers are advised to note that other implementations may 1476 exist. 1478 According to RFC 7942, "this will allow reviewers and working groups 1479 to assign due consideration to documents that have the benefit of 1480 running code, which may serve as evidence of valuable experimentation 1481 and feedback that have made the implemented protocols more mature. 1482 It is up to the individual working groups to use this information as 1483 they see fit". 1485 The BGP-LS-SPF implementation status is documented in 1486 [I-D.psarkar-lsvr-bgp-spf-impl]. 1488 12. Acknowledgements 1490 The authors would like to thank Sue Hares, Jorge Rabadan, Boris 1491 Hassanov, Dan Frost, Matt Anderson, Fred Baker, and Lukas Krattiger 1492 for their review and comments. Thanks to Pushpasis Sarkar for 1493 discussions on preventing a BGP SPF Router from being used for non- 1494 local traffic (i.e., transit traffic). 1496 The authors extend special thanks to Eric Rosen for fruitful 1497 discussions on BGP-LS-SPF convergence as compared to IGPs. 1499 13. Contributors 1501 In addition to the authors listed on the front page, the following 1502 co-authors have contributed to the document. 1504 Derek Yeung 1505 Arrcus, Inc. 1506 derek@arrcus.com 1508 Gunter Van De Velde 1509 Nokia 1510 gunter.van_de_velde@nokia.com 1512 Abhay Roy 1513 Arrcus, Inc. 1514 abhay@arrcus.com 1516 Venu Venugopal 1517 Cisco Systems 1518 venuv@cisco.com 1520 Chaitanya Yadlapalli 1521 AT&T 1522 cy098d@att.com 1524 14. References 1526 14.1. Normative References 1528 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1529 Requirement Levels", BCP 14, RFC 2119, 1530 DOI 10.17487/RFC2119, March 1997, 1531 . 1533 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 1534 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 1535 DOI 10.17487/RFC4271, January 2006, 1536 . 1538 [RFC4272] Murphy, S., "BGP Security Vulnerabilities Analysis", 1539 RFC 4272, DOI 10.17487/RFC4272, January 2006, 1540 . 1542 [RFC4593] Barbir, A., Murphy, S., and Y. Yang, "Generic Threats to 1543 Routing Protocols", RFC 4593, DOI 10.17487/RFC4593, 1544 October 2006, . 1546 [RFC4750] Joyal, D., Ed., Galecki, P., Ed., Giacalone, S., Ed., 1547 Coltun, R., and F. Baker, "OSPF Version 2 Management 1548 Information Base", RFC 4750, DOI 10.17487/RFC4750, 1549 December 2006, . 1551 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 1552 "Multiprotocol Extensions for BGP-4", RFC 4760, 1553 DOI 10.17487/RFC4760, January 2007, 1554 . 1556 [RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement 1557 with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 1558 2009, . 1560 [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP 1561 Authentication Option", RFC 5925, DOI 10.17487/RFC5925, 1562 June 2010, . 1564 [RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet 1565 Autonomous System (AS) Number Space", RFC 6793, 1566 DOI 10.17487/RFC6793, December 2012, 1567 . 1569 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 1570 Austein, "BGP Prefix Origin Validation", RFC 6811, 1571 DOI 10.17487/RFC6811, January 2013, 1572 . 1574 [RFC7606] Chen, E., Ed., Scudder, J., Ed., Mohapatra, P., and K. 1575 Patel, "Revised Error Handling for BGP UPDATE Messages", 1576 RFC 7606, DOI 10.17487/RFC7606, August 2015, 1577 . 1579 [RFC7752] Gredler, H., Ed., Medved, J., Previdi, S., Farrel, A., and 1580 S. Ray, "North-Bound Distribution of Link-State and 1581 Traffic Engineering (TE) Information Using BGP", RFC 7752, 1582 DOI 10.17487/RFC7752, March 2016, 1583 . 1585 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1586 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1587 May 2017, . 1589 [RFC8205] Lepinski, M., Ed. and K. Sriram, Ed., "BGPsec Protocol 1590 Specification", RFC 8205, DOI 10.17487/RFC8205, September 1591 2017, . 1593 [RFC8405] Decraene, B., Litkowski, S., Gredler, H., Lindem, A., 1594 Francois, P., and C. Bowers, "Shortest Path First (SPF) 1595 Back-Off Delay Algorithm for Link-State IGPs", RFC 8405, 1596 DOI 10.17487/RFC8405, June 2018, 1597 . 1599 [RFC8654] Bush, R., Patel, K., and D. Ward, "Extended Message 1600 Support for BGP", RFC 8654, DOI 10.17487/RFC8654, October 1601 2019, . 1603 [RFC8665] Psenak, P., Ed., Previdi, S., Ed., Filsfils, C., Gredler, 1604 H., Shakir, R., Henderickx, W., and J. Tantsura, "OSPF 1605 Extensions for Segment Routing", RFC 8665, 1606 DOI 10.17487/RFC8665, December 2019, 1607 . 1609 14.2. Informational References 1611 [I-D.ietf-lsvr-applicability] 1612 Patel, K., Lindem, A., Zandi, S., and G. Dawra, "Usage and 1613 Applicability of Link State Vector Routing in Data 1614 Centers", draft-ietf-lsvr-applicability-05 (work in 1615 progress), March 2020. 1617 [I-D.psarkar-lsvr-bgp-spf-impl] 1618 Sarkar, P., Patel, K., Pallagatti, S., and s. 1619 sajibasil@gmail.com, "BGP Shortest Path Routing Extension 1620 Implementation Report", draft-psarkar-lsvr-bgp-spf-impl-00 1621 (work in progress), June 2020. 1623 [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, 1624 DOI 10.17487/RFC2328, April 1998, 1625 . 1627 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 1628 Reflection: An Alternative to Full Mesh Internal BGP 1629 (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, 1630 . 1632 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 1633 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 1634 DOI 10.17487/RFC4724, January 2007, 1635 . 1637 [RFC4915] Psenak, P., Mirtorabi, S., Roy, A., Nguyen, L., and P. 1638 Pillay-Esnault, "Multi-Topology (MT) Routing in OSPF", 1639 RFC 4915, DOI 10.17487/RFC4915, June 2007, 1640 . 1642 [RFC5286] Atlas, A., Ed. and A. Zinin, Ed., "Basic Specification for 1643 IP Fast Reroute: Loop-Free Alternates", RFC 5286, 1644 DOI 10.17487/RFC5286, September 2008, 1645 . 1647 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 1648 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 1649 . 1651 [RFC6952] Jethanandani, M., Patel, K., and L. Zheng, "Analysis of 1652 BGP, LDP, PCEP, and MSDP Issues According to the Keying 1653 and Authentication for Routing Protocols (KARP) Design 1654 Guide", RFC 6952, DOI 10.17487/RFC6952, May 2013, 1655 . 1657 [RFC7911] Walton, D., Retana, A., Chen, E., and J. Scudder, 1658 "Advertisement of Multiple Paths in BGP", RFC 7911, 1659 DOI 10.17487/RFC7911, July 2016, 1660 . 1662 [RFC7938] Lapukhov, P., Premji, A., and J. Mitchell, Ed., "Use of 1663 BGP for Routing in Large-Scale Data Centers", RFC 7938, 1664 DOI 10.17487/RFC7938, August 2016, 1665 . 1667 [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 1668 Code: The Implementation Status Section", BCP 205, 1669 RFC 7942, DOI 10.17487/RFC7942, July 2016, 1670 . 1672 Authors' Addresses 1674 Keyur Patel 1675 Arrcus, Inc. 1677 Email: keyur@arrcus.com 1679 Acee Lindem 1680 Cisco Systems 1681 301 Midenhall Way 1682 Cary, NC 27513 1683 USA 1685 Email: acee@cisco.com 1686 Shawn Zandi 1687 LinkedIn 1688 222 2nd Street 1689 San Francisco, CA 94105 1690 USA 1692 Email: szandi@linkedin.com 1694 Wim Henderickx 1695 Nokia 1696 Antwerp 1697 Belgium 1699 Email: wim.henderickx@nokia.com