idnits 2.17.1 draft-ietf-spring-segment-routing-mpls-20.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 : ---------------------------------------------------------------------------- ** There are 11 instances of too long lines in the document, the longest one being 6 characters in excess of 72. == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 16, 2019) is 1809 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) == Missing Reference: '16000-17000' is mentioned on line 577, but not defined == Missing Reference: '20000-21000' is mentioned on line 579, but not defined -- Looks like a reference, but probably isn't: '1000' on line 1504 -- Looks like a reference, but probably isn't: '5000' on line 1108 -- Looks like a reference, but probably isn't: '1999' on line 1504 == Outdated reference: A later version (-25) exists of draft-ietf-isis-segment-routing-extensions-13 == Outdated reference: A later version (-23) exists of draft-ietf-ospf-ospfv3-segment-routing-extensions-09 == Outdated reference: A later version (-27) exists of draft-ietf-ospf-segment-routing-extensions-16 == Outdated reference: A later version (-15) exists of draft-ietf-spring-segment-routing-ldp-interop-08 == Outdated reference: A later version (-22) exists of draft-ietf-spring-segment-routing-policy-01 Summary: 1 error (**), 0 flaws (~~), 9 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group A. Bashandy, Ed. 2 Internet Draft Arrcus 3 Intended status: Standards Track C. Filsfils, Ed. 4 Expires: October 2019 S. Previdi, 5 Cisco Systems, Inc. 6 B. Decraene 7 S. Litkowski 8 Orange 9 R. Shakir 10 Google 11 April 16, 2019 13 Segment Routing with MPLS data plane 14 draft-ietf-spring-segment-routing-mpls-20 16 Abstract 18 Segment Routing (SR) leverages the source routing paradigm. A node 19 steers a packet through a controlled set of instructions, called 20 segments, by prepending the packet with an SR header. In the MPLS 21 dataplane, the SR header is instantiated through a label stack. This 22 document specifies the forwarding behavior to allow instantiating SR 23 over the MPLS dataplane. 25 Status of this Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on October 16, 2019. 42 Copyright Notice 44 Copyright (c) 2019 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction...................................................3 60 1.1. Requirements Language.....................................4 61 2. MPLS Instantiation of Segment Routing..........................4 62 2.1. Multiple Forwarding Behaviors for the Same Prefix.........5 63 2.2. SID Representation in the MPLS Forwarding Plane...........5 64 2.3. Segment Routing Global Block and Local Block..............6 65 2.4. Mapping a SID Index to an MPLS label......................6 66 2.5. Incoming Label Collision..................................7 67 2.5.1. Tie-breaking Rules..................................10 68 2.5.2. Redistribution between Routing Protocol Instances...13 69 2.5.2.1. Illustration...................................13 70 2.5.2.2. Illustration 2.................................14 71 2.6. Effect of Incoming Label Collision on Outgoing Label 72 Programming...................................................14 73 2.7. PUSH, CONTINUE, and NEXT.................................15 74 2.7.1. PUSH................................................15 75 2.7.2. CONTINUE............................................15 76 2.7.3. NEXT................................................15 77 2.7.3.1. Mirror SID.....................................15 78 2.8. MPLS Label Downloaded to FIB for Global and Local SIDs...16 79 2.9. Active Segment...........................................16 80 2.10. Forwarding behavior for Global SIDs.....................16 81 2.10.1. Forwarding for PUSH and CONTINUE of Global SIDs....16 82 2.10.2. Forwarding for NEXT Operation for Global SIDs......18 83 2.11. Forwarding Behavior for Local SIDs......................18 84 2.11.1. Forwarding for PUSH Operation on Local SIDs........18 85 2.11.2. Forwarding for CONTINUE Operation for Local SIDs...19 86 2.11.3. Outgoing label for NEXT Operation for Local SIDs...19 87 3. IANA Considerations...........................................19 88 4. Manageability Considerations..................................19 89 5. Security Considerations.......................................19 90 6. Contributors..................................................20 91 7. Acknowledgements..............................................20 92 8. References....................................................20 93 8.1. Normative References.....................................20 94 8.2. Informative References...................................21 95 9. Authors' Addresses............................................24 96 Appendix A. Examples.............................................26 97 A.1. IGP Segments Example.....................................26 98 A.2. Incoming Label Collision Examples........................28 99 A.2.1. Example 1...........................................28 100 A.2.2. Example 2...........................................29 101 A.2.3. Example 3...........................................30 102 A.2.4. Example 4...........................................30 103 A.2.5. Example 5...........................................31 104 A.2.6. Example 6...........................................31 105 A.2.7. Example 7...........................................32 106 A.2.8. Example 8...........................................32 107 A.2.9. Example 9...........................................33 108 A.2.10. Example 10.........................................33 109 A.2.11. Example 11.........................................34 110 A.2.12. Example 12.........................................35 111 A.2.13. Example 13.........................................35 112 A.2.14. Example 14.........................................36 113 A.3. Examples for the Effect of Incoming Label Collision on 114 Outgoing Label................................................36 115 A.3.1. Example 1...........................................36 116 A.3.2. Example 2...........................................37 118 1. Introduction 120 The Segment Routing architecture RFC8402 can be directly applied to 121 the MPLS architecture with no change in the MPLS forwarding plane. 122 This document specifies the forwarding plane behavior to allow 123 Segment Routing to operate on top of the MPLS data plane. This 124 document does not address the control plane behavior. Control plane 125 behavior is specified in other documents such as [I-D.ietf-isis- 126 segment-routing-extensions], [I-D.ietf-ospf-segment-routing- 127 extensions], and [I-D.ietf-ospf-ospfv3-segment-routing-extensions]. 129 The Segment Routing problem statement is described in [RFC7855]. 131 Co-existence of SR over MPLS forwarding plane with LDP [RFC5036] is 132 specified in [I-D.ietf-spring-segment-routing-ldp-interop]. 134 Policy routing and traffic engineering using segment routing can be 135 found in [I-D.ietf-spring-segment-routing-policy] 137 1.1. Requirements Language 139 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 140 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 141 "OPTIONAL" in this document are to be interpreted as described in BCP 142 14 [RFC2119] [RFC8174] when, and only when, they appear in all 143 capitals, as shown here. 145 2. MPLS Instantiation of Segment Routing 147 MPLS instantiation of Segment Routing fits in the MPLS architecture 148 as defined in [RFC3031] both from a control plane and forwarding 149 plane perspective: 151 o From a control plane perspective, [RFC3031] does not mandate a 152 single signaling protocol. Segment Routing makes use of various 153 control plane protocols such as link state IGPs [I-D.ietf-isis- 154 segment-routing-extensions], [I-D.ietf-ospf-segment-routing- 155 extensions] and [I-D.ietf-ospf-ospfv3-segment-routing-extensions]. 156 The flooding mechanisms of link state IGPs fit very well with 157 label stacking on ingress. Future control layer protocol and/or 158 policy/configuration can be used to specify the label stack. 160 o From a forwarding plane perspective, Segment Routing does not 161 require any change to the forwarding plane because Segment IDs 162 (SIDs) are instantiated as MPLS labels and the Segment routing 163 header instantiated as a stack of MPLS labels. 165 We call "MPLS Control Plane Client (MCC)" any control plane entity 166 installing forwarding entries in the MPLS data plane. IGPs with SR 167 extensions [I-D.ietf-isis-segment-routing-extensions], [I-D.ietf- 168 ospf-segment-routing-extensions], [I-D.ietf-ospf-ospfv3-segment- 169 routing-extensions] and LDP [RFC5036] are examples of MCCs. Local 170 configuration and policies applied on a router are also examples of 171 MCCs. 173 In order to have a node segment reach the node, a network operator 174 SHOULD configure at least one node segment per routing instance, 175 topology, or algorithm. Otherwise, the node is not reachable within 176 the routing instance, topology or along the routing algorithm, which 177 restrict its ability to be used by a SR policy, including for TI-LFA. 179 2.1. Multiple Forwarding Behaviors for the Same Prefix 181 The SR architecture does not prohibit having more than one SID for 182 the same prefix. In fact, by allowing multiple SIDs for the same 183 prefix, it is possible to have different forwarding behaviors (such 184 as different paths, different ECMP/UCMP behaviors,...,etc) for the 185 same destination. 187 Instantiating Segment routing over the MPLS forwarding plane fits 188 seamlessly with this principle. An operator may assign multiple MPLS 189 labels or indices to the same prefix and assign different forwarding 190 behaviors to each label/SID. The MCC in the network downloads 191 different MPLS labels/SIDs to the FIB for different forwarding 192 behaviors. The MCC at the entry of an SR domain or at any point in 193 the domain can choose to apply a particular forwarding behavior to a 194 particular packet by applying the PUSH action to that packet using 195 the corresponding SID. 197 2.2. SID Representation in the MPLS Forwarding Plane 199 When instantiating SR over the MPLS forwarding plane, a SID is 200 represented by an MPLS label or an index [RFC8402]. 202 A global segment is a label, or an index which may be mapped to an 203 MPLS label within the Segment Routing Global Block (SRGB) of the node 204 installing the global segment in its FIB/receiving the labeled 205 packet. Section 2.4 specifies the procedure to map a global segment 206 represented by an index to an MPLS label within the SRGB. 208 The MCC MUST ensure that any label value corresponding to any SID it 209 installs in the forwarding plane follows the following rules: 211 o The label value MUST be unique within the router on which the MCC 212 is running. i.e. the label MUST only be used to represent the SID 213 and MUST NOT be used to represent more than one SID or for any 214 other forwarding purpose on the router. 216 o The label value MUST NOT come from the range of special purpose 217 labels [RFC7274]. 219 Labels allocated in this document are considered per platform down- 220 stream allocated labels [RFC3031]. 222 2.3. Segment Routing Global Block and Local Block 224 The concepts of Segment Routing Global Block (SRGB) and global SID 225 are explained in [RFC8402]. In general, the SRGB need not be a 226 contiguous range of labels. 228 For the rest of this document, the SRGB is specified by the list of 229 MPLS Label ranges [Ll(1),Lh(1)], [Ll(2),Lh(2)],..., [Ll(k),Lh(k)] 230 where Ll(i) =< Lh(i). 232 The following rules apply to the list of MPLS ranges representing the 233 SRGB 235 o The list of ranges comprising the SRGB MUST NOT overlap. 237 o Every range in the list of ranges specifying the SRGB MUST NOT 238 cover or overlap with a reserved label value or range [RFC7274], 239 respectively. 241 o If the SRGB of a node does not conform to the structure specified 242 in this section or to the previous two rules, then this SRGB MUST 243 be completely ignored by all routers in the routing domain and the 244 node MUST be treated as if it does not have an SRGB. 246 o The list of label ranges MUST only be used to instantiate global 247 SIDs into the MPLS forwarding plane 249 A Local segment MAY be allocated from the Segment Routing Local Block 250 (SRLB) [RFC8402] or from any unused label as long as it does not use 251 a special purpose label. The SRLB consists of the range of local 252 labels reserved by the node for certain local segments. In a 253 controller-driven network, some controllers or applications MAY use 254 the control plane to discover the available set of local SIDs on a 255 particular router [I-D.ietf-spring-segment-routing-policy]. The rules 256 applicable to the SRGB are also applicable to the SRLB, except the 257 rule that says that the SRGB MUST only be used to instantiate global 258 SIDs into the MPLS forwarding plane. The recommended, minimum, or 259 maximum size of the SRGB and/or SRLB is a matter of future study 261 2.4. Mapping a SID Index to an MPLS label 263 This sub-section specifies how the MPLS label value is calculated 264 given the index of a SID. The value of the index is determined by an 265 MCC such as IS-IS [I-D.ietf-isis-segment-routing-extensions] or OSPF 266 [I-D.ietf-ospf-segment-routing-extensions]. This section only 267 specifies how to map the index to an MPLS label. The calculated MPLS 268 label is downloaded to the FIB, sent out with a forwarded packet, or 269 both. 271 Consider a SID represented by the index "I". Consider an SRGB as 272 specified in Section 2.3. The total size of the SRGB, represented by 273 the variable "Size", is calculated according to the formula: 275 size = Lh(1)- Ll(1) + 1 + Lh(2)- Ll(2) + 1 + ... + Lh(k)- Ll(k) + 1 277 The following rules MUST be applied by the MCC when calculating the 278 MPLS label value corresponding the SID index value "I". 280 o 0 =< I < size. If the index "I" does not satisfy the previous 281 inequality, then the label cannot be calculated. 283 o The label value corresponding to the SID index "I" is calculated 284 as follows 286 o j = 1 , temp = 0 288 o While temp + Lh(j)- Ll(j) < I 290 . temp = temp + Lh(j)- Ll(j) + 1 292 . j = j+1 294 o label = I - temp + Ll(j) 296 An example for how a router calculates labels and forwards traffic 297 based on the procedure described in this section can be found in 298 Appendix A.1. 300 2.5. Incoming Label Collision 302 The MPLS Architecture [RFC3031] defines the term Forwarding 303 Equivalence Class (FEC) as the set of packets with similar and / or 304 identical characteristics which are forwarded the same way and are 305 bound to the same MPLS incoming (local) label. In Segment-Routing 306 MPLS, a local label serves as the SID for given FEC. 308 We define Segment Routing (SR) FEC as one of the following [RFC8402]: 310 o (Prefix, Routing Instance, Topology, Algorithm [RFC8402]), where a 311 topology identifies a set of links with metrics. For the purpose 312 of incoming label collision resolution, the same Topology 313 numerical value SHOULD be used on all routers to identify the same 314 set of links with metrics. For MCCs where the "Topology" and/or 315 "Algorithm" fields are not defined, the numerical value of zero 316 MUST be used for these two fields. For the purpose of incoming 317 label collision resolution, a routing instance is identified by a 318 single incoming label downloader to FIB. Two MCCs running on the 319 same router are considered different routing instances if the only 320 way the two instances can know about the other's incoming labels 321 is through redistribution. The numerical value used to identify a 322 routing instance MAY be derived from other configuration or MAY be 323 explicitly configured. If it is derived from other configuration, 324 then the same numerical value SHOULD be derived from the same 325 configuration as long as the configuration survives router reload. 326 If the derived numerical value varies for the same configuration, 327 then an implementation SHOULD make numerical value used to 328 identify a routing instance configurable. 330 o (next-hop, outgoing interface), where the outgoing interface is 331 physical or virtual. 333 o (number of adjacencies, list of next-hops, list of outgoing 334 interfaces IDs in ascending numerical order). This FEC represents 335 parallel adjacencies [RFC8402] 337 o (Endpoint, Color) representing an SR policy [RFC8402] 339 o (Mirrored SID) The Mirrored SID [RFC8402, Section 5.1] is the IP 340 address advertised by the advertising node to identify the mirror- 341 SID. The IP address is encoded as specified in Section 2.5.1. 343 This section covers the RECOMMENDED procedure to handle the scenario 344 where, because of an error/misconfiguration, more than one SR FEC as 345 defined in this section, map to the same incoming MPLS label. 346 Examples illustrating the behavior specified in this section can be 347 found in Appendix A.2. 349 An incoming label collision occurs if the SIDs of the set of FECs 350 {FEC1, FEC2,..., FECk} map to the same incoming SR MPLS label "L1". 352 Suppose an anycast prefix is advertised with a prefix-SID by some, 353 but not all, of the nodes that advertise that prefix. If the prefix- 354 SID sub-TLVs result in mapping that anycast prefix to the same 355 incoming label, then the advertisement of the prefix-SID by some, but 356 not all, of advertising nodes MUST NOT be treated as a label 357 collision. 359 An implementation MUST NOT allow the MCCs belonging to the same 360 router to assign the same incoming label to more than one SR FEC. 362 The objective of the following steps is to deterministically install 363 in the MPLS Incoming Label Map, also known as label FIB, a single FEC 364 with the incoming label "L1". By "deterministically install" we mean 365 if the set of FECs {FEC1, FEC2,..., FECk} map to the same incoming SR 366 MPLS label "L1", then the steps below assign the same FEC to the 367 label "L1" irrespective of the order by which the mappings of this 368 set of FECs to the label "L1" are received. For example, a first- 369 come-first-serve tie-breaking is not allowed. The remaining FECs may 370 be installed in the IP FIB without incoming label. 372 The procedure in this section relies completely on the local FEC and 373 label database within a given router. 375 The collision resolution procedure is as follows 377 1. Given the SIDs of the set of FECs, {FEC1, FEC2,..., FECk} map to 378 the same MPLS label "L1". 380 2. Within an MCC, apply tie-breaking rules to select one FEC only and 381 assign the label to it. The losing FECs are handled as if no 382 labels are attached to them. The losing FECs with algorithm other 383 than the shortest path first [RFC8402] are not installed in the FIB. 385 a. If the same set of FECs are attached to the same label "L1", 386 then the tie-breaking rules MUST always select the same FEC 387 irrespective of the order in which the FECs and the label "L1" 388 are received. In other words, the tie-breaking rule MUST be 389 deterministic. 391 3. If there is still collision between the FECs belonging to 392 different MCCs, then re-apply the tie-breaking rules to the 393 remaining FECs to select one FEC only and assign the label to that 394 FEC 396 4. Install into the IP FIB the selected FEC and its incoming label in 397 the label FIB. 399 5. The remaining FECs with the default algorithm (see the 400 specification of prefix-SID algorithm [RFC8402]) may be installed 401 in the FIB natively, such as pure IP entries in case of Prefix 402 FEC, without any incoming labels corresponding to their SIDs. The 403 remaining FECs with algorithm other than the shortest path first 404 are not installed in the FIB. 406 2.5.1. Tie-breaking Rules 408 The default tie-breaking rules are specified as follows: 410 1. if FECi has the lowest FEC administrative distance among the 411 competing FECs as defined in this section below, filter away all 412 the competing FECs with higher administrative distance. 414 2. if more than one competing FEC remains after step 1, select the 415 smallest numerical FEC value. The numerical value of the FEC is 416 determined according to the FEC encoding described later in this 417 section 419 These rules deterministically select the FEC to install in the MPLS 420 forwarding plane for the given incoming label. 422 This document defines the default tie breaking rules that SHOULD be 423 implemented. An implementation MAY choose to support different tie- 424 breaking rules and MAY use one of the these instead of the default 425 tie-breaking rules. All routers in a routing domain SHOULD use the 426 same tie-breaking rules to maximize forwarding consistency. 428 Each FEC is assigned an administrative distance. The FEC 429 administrative distance is encoded as an 8-bit value. The lower the 430 value, the better the administrative distance. 432 The default FEC administrative distance order starting from the 433 lowest value SHOULD be: 435 o Explicit SID assignment to a FEC that maps to a label outside the 436 SRGB irrespective of the owner MCC. An explicit SID assignment is 437 a static assignment of a label to a FEC such that the assignment 438 survives router reboot. 440 o An example of explicit SID allocation is static assignment of 441 a specific label to an adj-SID. 443 o An implementation of explicit SID assignment MUST guarantee 444 collision freeness on the same router 446 o Dynamic SID assignment: 448 o For all FEC types except for SR policy, the FEC types are 449 ordered using the default administrative distance ordering 450 defined by the implementation. 452 o Binding SID [RFC8402] assigned to SR Policy always has a 453 higher default administrative distance than the default 454 administrative distance of any other FEC type 456 A user SHOULD ensure that the same administrative distance preference 457 is used on all routers to maximize forwarding consistency. 459 The numerical sort across FECs SHOULD be performed as follows: 461 o Each FEC is assigned a FEC type encoded in 8 bits. The following 462 are the type code point for each SR FEC defined at the beginning 463 of this Section: 465 o 120: (Prefix, Routing Instance, Topology, Algorithm) 467 o 130: (next-hop, outgoing interface) 469 o 140: Parallel Adjacency [RFC8402] 471 o 150: an SR policy [RFC8402]. 473 o 160: Mirror SID [RFC8402] 475 o The numerical values above are mentioned to guide 476 implementation. If other numerical values are used, then the 477 numerical values must maintain the same greater-than ordering 478 of the numbers mentioned here. 480 o The fields of each FEC are encoded as follows 482 o Routing Instance ID represented by 16 bits. For routing 483 instances that are identified by less than 16 bits, encode the 484 Instance ID in the least significant bits while the most 485 significant bits are set to zero 487 o Address Family represented by 8 bits, where IPv4 encoded as 488 100 and IPv6 is encoded as 110. These numerical values are 489 mentioned to guide implementations. If other numerical values 490 are used, then the numerical value of IPv4 MUST be less than 491 the numerical value for IPv6 493 o All addresses are represented in 128 bits as follows 495 . IPv6 address is encoded natively 497 . IPv4 address is encoded in the most significant bits and 498 the remaining bits are set to zero 500 o All prefixes are represented by (8 + 128) bits. 502 . A prefix is encoded in the most significant bits and the 503 remaining bits are set to zero. 505 . The prefix length is encoded before the prefix in a field 506 of size 8 bits. 508 o Topology ID is represented by 16 bits. For routing instances 509 that identify topologies using less than 16 bits, encode the 510 topology ID in the least significant bits while the most 511 significant bits are set to zero 513 o Algorithm is encoded in a 16 bits field. 515 o The Color ID is encoded using 32 bits 517 o Choose the set of FECs of the smallest FEC type code point 519 o Out of these FECs, choose the FECs with the smallest address 520 family code point 522 o Encode the remaining set of FECs as follows 524 o (Prefix, Routing Instance, Topology, Algorithm) is encoded as 525 (Prefix Length, Prefix, routing_instance_id, Topology, SR 526 Algorithm) 528 o (next-hop, outgoing interface) is encoded as (next-hop, 529 outgoing_interface_id) 531 o (number of adjacencies, list of next-hops in ascending 532 numerical order, list of outgoing interface IDs in ascending 533 numerical order). This encoding is used to encode a parallel 534 adjacency [RFC8402] 536 o (Endpoint, Color) is encoded as (Endpoint_address, Color_id) 538 o (IP address): This is the encoding for a mirror SID FEC. The IP 539 address is encoded as described above in this section 541 o Select the FEC with the smallest numerical value 543 The numerical values mentioned in this section are for guidance only. 544 If other numerical values are used then the other numerical values 545 MUST maintain the same numerical ordering among different SR FECs. 547 2.5.2. Redistribution between Routing Protocol Instances 549 The following rule SHOULD be applied when redistributing SIDs with 550 prefixes between routing protocol instances: 552 o If the receiving instance's SRGB is the same as the SRGB of origin 553 instance, then 555 o the index is redistributed with the route 557 o Else 559 o the index is not redistributed and if the receiving instance 560 decides to advertise an index with the redistributed route, it 561 is the duty of the receiving instance to allocate a fresh 562 index relative to its own SRGB. Note that in this case the 563 receiving instance MUST compute the local label it assignes to 564 the route according to section 2.4 and install it in FIB. 566 It is outside the scope of this document to define local node 567 behaviors that would allow to map the original index into a new index 568 in the receiving instance via the addition of an offset or other 569 policy means. 571 2.5.2.1. Illustration 573 A----IS-IS----B---OSPF----C-192.0.2.1/32 (20001) 575 Consider the simple topology above. 577 o A and B are in the IS-IS domain with SRGB [16000-17000] 579 o B and C are in OSPF domain with SRGB [20000-21000] 581 o B redistributes 192.0.2.1/32 into IS-IS domain 583 o In that case A learns 192.0.2.1/32 as an IP leaf connected to B as 584 usual for IP prefix redistribution 586 o However, according to the redistribution rule above rule, B 587 decides not to advertise any index with 192.0.2.1/32 into IS-IS 588 because the SRGB is not the same. 590 2.5.2.2. Illustration 2 592 Consider the example in the illustration described in Section 593 2.5.2.1. 595 When router B redistributes the prefix 192.0.2.1/32, router B decides 596 to allocate and advertise the same index 1 with the prefix 597 192.0.2.1/32 599 Within the SRGB of the IS-IS domain, index 1 corresponds to the local 600 label 16001 602 o Hence according to the redistribution rule above, router B 603 programs the incoming label 16001 in its FIB to match traffic 604 arriving from the IS-IS domain destined to the prefix 605 192.0.2.1/32. 607 2.6. Effect of Incoming Label Collision on Outgoing Label Programming 609 For the determination of the outgoing label to use, the ingress node 610 pushing new segments, and hence a stack of MPLS labels, MUST use, for 611 a given FEC, the same label that has been selected by the node 612 receiving the packet with that label exposed as top label. So in case 613 of incoming label collision on this receiving node, the ingress node 614 MUST resolve this collision using this same "Incoming Label Collision 615 resolution procedure", using the data of the receiving node. 617 In the general case, the ingress node may not have exactly the same 618 data of the receiving node, so the result may be different. This is 619 under the responsibility of the network operator. But in typical 620 case, e.g. where a centralized node or a distributed link state IGP 621 is used, all nodes would have the same database. However to minimize 622 the chance of misforwarding, a FEC that loses its incoming label to 623 the tie-breaking rules specified in Section 2.5 MUST NOT be 624 installed in FIB with an outgoing segment routing label based on the 625 SID corresponding to the lost incoming label. 627 Examples for the behavior specified in this section can be found in 628 Appendix A.3. 630 2.7. PUSH, CONTINUE, and NEXT 632 PUSH, NEXT, and CONTINUE are operations applied by the forwarding 633 plane. The specifications of these operations can be found in 634 [RFC8402]. This sub-section specifies how to implement each of these 635 operations in the MPLS forwarding plane. 637 2.7.1. PUSH 639 As described in [RFC8402], PUSH corresponds to pushing one or more labels 640 on top of an incoming packet then sending it out of a particular physical 641 interface or virtual interface, such as UDP tunnel [RFC7510] or L2TPv3 642 tunnel [RFC4817], towards a particular next-hop. When pushing labels onto a 643 packet's label stack, the Time-to-Live (TTL) field ([RFC3032], [RFC3443]) 644 and the Traffic Class (TC) field ([RFC3032], [RFC5462]) of each label stack 645 entry must, of course, be set. This document does not specify any set of 646 rules for setting these fields; that is a matter of local policy. Sections 647 2.10 and 2.11 specify additional details about forwarding behavior. 649 2.7.2. CONTINUE 651 As described in [RFC8402], the CONTINUE operation corresponds to swapping 652 the incoming label with an outgoing label. The value of the outgoing label 653 is calculated as specified in Sections 2.10 and 2.11. 655 2.7.3. NEXT 657 As described in [RFC8402], NEXT corresponds to popping the topmost 658 label. The action before and/or after the popping depends on the 659 instruction associated with the active SID on the received packet 660 prior to the popping. For example suppose the active SID in the 661 received packet was an Adj-SID [RFC8402], then on receiving the 662 packet, the node applies NEXT operation, which corresponds to popping 663 the top most label, and then sends the packet out of the physical or 664 virtual interface (e.g. UDP tunnel [RFC7510] or L2TPv3 tunnel 665 [RFC4817]) towards the next-hop corresponding to the adj-SID. 667 2.7.3.1. Mirror SID 669 If the active SID in the received packet was a Mirror SID [RFC8402, 670 Section 5.1] allocated by the receiving router, then the receiving 671 router applies NEXT operation, which corresponds to popping the top 672 most label, then performs a lookup using the contents of the packet 673 after popping the outer most label in the mirrored forwarding table. 674 The method by which the lookup is made, and/or the actions applied to 675 the packet after the lookup in the mirror table depends on the 676 contents of the packet and the mirror table. Note that the packet 677 exposed after popping the top most label may or may not be an MPLS 678 packet. A mirror SID can be viewed as a generalization of the context 679 label in [RFC5331] because a mirror SID does not make any 680 assumptions about the packet underneath the top label. 682 2.8. MPLS Label Downloaded to FIB for Global and Local SIDs 684 The label corresponding to the global SID "Si" represented by the 685 global index "I" downloaded to FIB is used to match packets whose 686 active segment (and hence topmost label) is "Si". The value of this 687 label is calculated as specified in Section 2.4. 689 For Local SIDs, the MCC is responsible for downloading the correct 690 label value to FIB. For example, an IGP with SR extensions [I-D.ietf- 691 isis-segment-routing-extensions, I-D.ietf-ospf-segment-routing- 692 extensions] downloads the MPLS label corresponding to an Adj-SID 693 [RFC8402]. 695 2.9. Active Segment 697 When instantiated in the MPLS domain, the active segment on a packet 698 corresponds to the topmost label on the packet that is calculated 699 according to the procedure specified in Sections 2.10 and 2.11. When 700 arriving at a node, the topmost label corresponding to the active SID 701 matches the MPLS label downloaded to FIB as specified in Section 2.4. 703 2.10. Forwarding behavior for Global SIDs 705 This section specifies forwarding behavior, including the calculation 706 of outgoing labels, that corresponds to a global SID when applying 707 PUSH, CONTINUE, and NEXT operations in the MPLS forwarding plane. 709 This document covers the calculation of the outgoing label for the 710 top label only. The case where the outgoing label is not the top 711 label and is part of a stack of labels that instantiates a routing 712 policy or a traffic engineering tunnel is outside the scope of this 713 document and may be covered in other documents such as [I-D.ietf- 714 spring-segment-routing-policy]. 716 2.10.1. Forwarding for PUSH and CONTINUE of Global SIDs 718 Suppose an MCC on a router "R0" determines that PUSH or CONTINUE 719 operation is to be applied to an incoming packet related to the 720 global SID "Si" represented by the global index "I" and owned by the 721 router Ri before sending the packet towards a neighbor "N" directly 722 connected to "R0" through a physical or virtual interface such as UDP 723 tunnel [RFC7510] or L2TPv3 tunnel [RFC4817]. 725 The method by which the MCC on router "R0" determines that PUSH or 726 CONTINUE operation must be applied using the SID "Si" is beyond the 727 scope of this document. An example of a method to determine the SID 728 "Si" for PUSH operation is the case where IS-IS [I-D.ietf-isis- 729 segment-routing-extensions] receives the prefix-SID "Si" sub-TLV 730 advertised with prefix "P/m" in TLV 135 and the destination address 731 of the incoming IPv4 packet is covered by the prefix "P/m". 733 For CONTINUE operation, an example of a method to determine the SID 734 "Si" is the case where IS-IS [I-D.ietf-isis-segment-routing- 735 extensions] receives the prefix-SID "Si" sub-TLV advertised with 736 prefix "P" in TLV 135 and the top label of the incoming packet 737 matches the MPLS label in FIB corresponding to the SID "Si" on the 738 router "R0". 740 The forwarding behavior for PUSH and CONTINUE corresponding to the 741 SID "Si" 743 o If the neighbor "N" does not support SR or advertises an invalid 744 SRGB or a SRGB that is too small for the SID "Si" 746 o If it is possible to send the packet towards the neighbor "N" 747 using standard MPLS forwarding behavior as specified in 748 [RFC3031] and [RFC3032], then forward the packet. The method 749 by which a router decides whether it is possible to send the 750 packet to "N" or not is beyond the scope of this document. For 751 example, the router "R0" can use the downstream label 752 determined by another MCC, such as LDP [RFC5036], to send the 753 packet. 755 o Else if there are other useable next-hops, then use other next- 756 hops to forward the incoming packet. The method by which the 757 router "R0" decides on the possibility of using other next- 758 hops is beyond the scope of this document. For example, the 759 MCC on "R0" may chose the send an IPv4 packet without pushing 760 any label to another next-hop. 762 o Otherwise drop the packet. 764 o Else 766 o Calculate the outgoing label as specified in Section 2.4 using 767 the SRGB of the neighbor "N" 769 o If the operation is PUSH 771 . Push the calculated label according to the MPLS label 772 pushing rules specified in [RFC3032] 774 o Else 776 . swap the incoming label with the calculated label 777 according to the label swapping rules in [RFC3032] 779 o Send the packet towards the neighbor "N" 781 2.10.2. Forwarding for NEXT Operation for Global SIDs 783 As specified in Section 2.7.3 NEXT operation corresponds to popping 784 the top most label. The forwarding behavior is as follows 786 o Pop the topmost label 788 o Apply the instruction associated with the incoming label that has 789 been popped 791 The action on the packet after popping the topmost label depends on 792 the instruction associated with the incoming label as well as the 793 contents of the packet right underneath the top label that got 794 popped. Examples of NEXT operation are described in Appendix A.1. 796 2.11. Forwarding Behavior for Local SIDs 798 This section specifies the forwarding behavior for local SIDs when SR 799 is instantiated over the MPLS forwarding plane. 801 2.11.1. Forwarding for PUSH Operation on Local SIDs 803 Suppose an MCC on a router "R0" determines that PUSH operation is to 804 be applied to an incoming packet using the local SID "Si" before 805 sending the packet towards a neighbor "N" directly connected to R0 806 through a physical or virtual interface such as UDP tunnel [RFC7510] 807 or L2TPv3 tunnel [RFC4817]. 809 An example of such local SID is an Adj-SID allocated and advertised 810 by IS-IS [I-D.ietf-isis-segment-routing-extensions]. The method by 811 which the MCC on "R0" determines that PUSH operation is to be applied 812 to the incoming packet is beyond the scope of this document. An 813 example of such method is backup path used to protect against a 814 failure using TI-LFA [I-D.bashandy-rtgwg-segment-routing-ti-lfa]. 816 As mentioned in [RFC8402], a local SID is specified by an MPLS label. 817 Hence the PUSH operation for a local SID is identical to label push 818 operation [RFC3032] using any MPLS label. The forwarding action after 819 pushing the MPLS label corresponding to the local SID is also 820 determined by the MCC. For example, if the PUSH operation was done to 821 forward a packet over a backup path calculated using TI-LFA, then the 822 forwarding action may be sending the packet to a certain neighbor 823 that will in turn continue to forward the packet along the backup 824 path 826 2.11.2. Forwarding for CONTINUE Operation for Local SIDs 828 A local SID on a router "R0" corresponds to a local label. In such 829 scenario, the outgoing label towards a next-hop "N" is determined by 830 the MCC running on the router "R0"and the forwarding behavior for 831 CONTINUE operation is identical to swap operation [RFC3032] on an 832 MPLS label. 834 2.11.3. Outgoing label for NEXT Operation for Local SIDs 836 NEXT operation for Local SIDs is identical to NEXT operation for 837 global SIDs specified in Section 2.10.2. 839 3. IANA Considerations 841 This document does not make any request to IANA. 843 4. Manageability Considerations 845 This document describes the applicability of Segment Routing over the 846 MPLS data plane. Segment Routing does not introduce any change in 847 the MPLS data plane. Manageability considerations described in 848 [RFC8402] applies to the MPLS data plane when used with Segment 849 Routing. SR OAM use cases for the MPLS data plane are defined in 850 [RFC8403]. SR OAM procedures for the MPLS data plane are defined in 851 [RFC8287]. 853 5. Security Considerations 855 This document does not introduce additional security requirements and 856 mechanisms other than the ones described in [RFC8402]. 858 6. Contributors 860 The following contributors have substantially helped the definition 861 and editing of the content of this document: 863 Martin Horneffer 864 Deutsche Telekom 865 Email: Martin.Horneffer@telekom.de 867 Wim Henderickx 868 Nokia 869 Email: wim.henderickx@nokia.com 871 Jeff Tantsura 872 Email: jefftant@gmail.com 873 Edward Crabbe 874 Email: edward.crabbe@gmail.com 876 Igor Milojevic 877 Email: milojevicigor@gmail.com 879 Saku Ytti 880 Email: saku@ytti.fi 882 7. Acknowledgements 884 The authors would like to thank Les Ginsberg, Chris Bowers, Himanshu 885 Shah, Adrian Farrel, Alexander Vainshtein, Przemyslaw Krol, Darren 886 Dukes, Zafar Ali, and Martin Vigoureux for their valuable comments on 887 this document. 889 This document was prepared using 2-Word-v2.0.template.dot. 891 8. References 893 8.1. Normative References 895 [RFC8402] Filsfils, C., Previdi, S., Decraene, B., Litkowski, S., and 896 R. Shakir, "Segment Routing Architecture", RFC 8402, DOI 897 10.17487/RFC8402 July 2018, . 900 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 901 Requirement Levels", BCP 14, RFC 2119, DOI 902 0.17487/RFC2119, March 1997, . 905 [RFC3031] Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol 906 Label Switching Architecture", RFC 3031, DOI 907 10.17487/RFC3031, January 2001, . 910 [RFC3032] Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y., 911 Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack 912 Encoding", RFC 3032, DOI 10.17487/RFC3032, January 2001, 913 . 915 [RFC3443] P. Agarwal, P. and Akyol, B. "Time To Live (TTL) Processing 916 in Multi-Protocol Label Switching (MPLS) Networks", RFC 917 3443, DOI 10.17487/RFC3443, January 2003, . 920 [RFC5462] Andersson, L., and Asati, R., " Multiprotocol Label 921 Switching (MPLS) Label Stack Entry: "EXP" Field Renamed to 922 "Traffic Class" Field", RFC 5462, DOI 10.17487/RFC5462, 923 February 2009, . 925 [RFC7274] K. Kompella, L. Andersson, and A. Farrel, "Allocating and 926 Retiring Special-Purpose MPLS Labels", RFC7274 DOI 927 10.17487/RFC7274, May 2014 930 [RFC8174] B. Leiba, " Ambiguity of Uppercase vs Lowercase in RFC 2119 931 Key Words", RFC8174 DOI 10.17487/RFC8174, May 2017 932 934 8.2. Informative References 936 [I-D.ietf-isis-segment-routing-extensions] Previdi, S., Filsfils, C., 937 Bashandy, A., Gredler, H., Litkowski, S., Decraene, B., and 938 j. jefftant@gmail.com, "IS-IS Extensions for Segment 939 Routing", draft-ietf-isis-segment-routing-extensions-13 940 (work in progress), June 2017. 942 [I-D.ietf-ospf-ospfv3-segment-routing-extensions] Psenak, P., 943 Previdi, S., Filsfils, C., Gredler, H., Shakir, R., 944 Henderickx, W., and J. Tantsura, "OSPFv3 Extensions for 945 Segment Routing", draft-ietf-ospf-ospfv3-segment-routing- 946 extensions-09 (work in progress), March 2017. 948 [I-D.ietf-ospf-segment-routing-extensions] Psenak, P., Previdi, S., 949 Filsfils, C., Gredler, H., Shakir, R., Henderickx, W., and 950 J. Tantsura, "OSPF Extensions for Segment Routing", draft- 951 ietf-ospf-segment-routing-extensions-16 (work in progress), 952 May 2017. 954 [I-D.ietf-spring-segment-routing-ldp-interop] Filsfils, C., Previdi, 955 S., Bashandy, A., Decraene, B., and S. Litkowski, "Segment 956 Routing interworking with LDP", draft-ietf-spring-segment- 957 routing-ldp-interop-08 (work in progress), June 2017. 959 [I-D.bashandy-rtgwg-segment-routing-ti-lfa], Bashandy, A., Filsfils, 960 C., Decraene, B., Litkowski, S., Francois, P., Voyer, P. 961 Clad, F., and Camarillo, P., "Topology Independent Fast 962 Reroute using Segment Routing", draft-bashandy-rtgwg- 963 segment-routing-ti-lfa-05 (work in progress), October 2018, 965 [RFC7855] Previdi, S., Ed., Filsfils, C., Ed., Decraene, B., 966 Litkowski, S., Horneffer, M., and R. Shakir, "Source Packet 967 Routing in Networking (SPRING) Problem Statement and 968 Requirements", RFC 7855, DOI 10.17487/RFC7855, May 2016, 969 . 971 [RFC5036] Andersson, L., Acreo, AB, Minei, I., Thomas, B., " LDP 972 Specification", RFC5036, DOI 10.17487/RFC5036, October 973 2007, 975 [RFC5331] Aggarwal, R., Rekhter, Y., Rosen, E., " MPLS Upstream Label 976 Assignment and Context-Specific Label Space", RFC5331 DOI 977 10.17487/RFC5331, August 2008, . 980 [RFC7510] Xu, X., Sheth, N., Yong, L., Callon, R., and D. Black, 981 "Encapsulating MPLS in UDP", RFC 7510, DOI 982 10.17487/RFC7510, April 2015, . 985 [RFC4817] Townsley, M., Pignataro, C., Wainner, S., Seely, T., Young, 986 T., "Encapsulation of MPLS over Layer 2 Tunneling Protocol 987 Version 3", RFC4817, DOI 10.17487/RFC4817, March 2007, 988 990 [RFC8287] N. Kumar, C. Pignataro, G. Swallow, N. Akiya, S. Kini, and 991 M. Chen " Label Switched Path (LSP) Ping/Traceroute for 992 Segment Routing (SR) IGP-Prefix and IGP-Adjacency Segment 993 Identifiers (SIDs) with MPLS Data Planes" RFC8287, DOI 994 10.17487/RFC8287, December 2017, https://www.rfc- 995 editor.org/info/rfc8287 997 [RFC8403] R. Geib, C. Filsfils, C. Pignataro, N. Kumar, "A Scalable 998 and Topology-Aware MPLS Data-Plane Monitoring System", 999 RFC8403, DOI 10.17487/RFC8403, July 2018, 1002 [I-D.ietf-spring-segment-routing-policy] Filsfils, C., Sivabalan, 1003 S., Raza, K., Liste, J. , Clad, F., Voyer, D., Bogdanov, A., 1004 Mattes, P., " Segment Routing Policy for Traffic Engineering", 1005 draft-ietf-spring-segment-routing-policy-01 (work in progress), June 1006 2018 1008 9. Authors' Addresses 1010 Ahmed Bashandy (editor) 1011 Arrcus 1013 Email: abashandy.ietf@gmail.com 1015 Clarence Filsfils (editor) 1016 Cisco Systems, Inc. 1017 Brussels 1018 BE 1020 Email: cfilsfil@cisco.com 1022 Stefano Previdi 1023 Cisco Systems, Inc. 1024 Italy 1026 Email: stefano@previdi.net 1028 Bruno Decraene 1029 Orange 1030 FR 1032 Email: bruno.decraene@orange.com 1033 Stephane Litkowski 1034 Orange 1035 FR 1037 Email: stephane.litkowski@orange.com 1039 Rob Shakir 1040 Google 1041 US 1043 Email: robjs@google.com 1045 Appendix A. Examples 1047 A.1. IGP Segments Example 1049 Consider the network diagram of Figure 1 and the IP address and IGP 1050 Segment allocation of Figure 2. Assume that the network is running 1051 IS-IS with SR extensions [I-D.ietf-isis-segment-routing-extensions] 1052 and all links have the same metric. The following examples can be 1053 constructed. 1055 +--------+ 1056 / \ 1057 R0-----R1-----R2----------R3-----R8 1058 | \ / | 1059 | +--R4--+ | 1060 | | 1061 +-----R5-----+ 1063 Figure 1: IGP Segments - Illustration 1065 +-----------------------------------------------------------+ 1066 | IP address allocated by the operator: | 1067 | 192.0.2.1/32 as a loopback of R1 | 1068 | 192.0.2.2/32 as a loopback of R2 | 1069 | 192.0.2.3/32 as a loopback of R3 | 1070 | 192.0.2.4/32 as a loopback of R4 | 1071 | 192.0.2.5/32 as a loopback of R5 | 1072 | 192.0.2.8/32 as a loopback of R8 | 1073 | 198.51.100.9/32 as an anycast loopback of R4 | 1074 | 198.51.100.9/32 as an anycast loopback of R5 | 1075 | | 1076 | SRGB defined by the operator as 1000-5000 | 1077 | | 1078 | Global IGP SID indices allocated by the operator: | 1079 | 1 allocated to 192.0.2.1/32 | 1080 | 2 allocated to 192.0.2.2/32 | 1081 | 3 allocated to 192.0.2.3/32 | 1082 | 4 allocated to 192.0.2.4/32 | 1083 | 8 allocated to 192.0.2.8/32 | 1084 | 1009 allocated to 198.51.100.9/32 | 1085 | | 1086 | Local IGP SID allocated dynamically by R2 | 1087 | for its "north" adjacency to R3: 9001 | 1088 | for its "east" adjacency to R3 : 9002 | 1089 | for its "south" adjacency to R3: 9003 | 1090 | for its only adjacency to R4 : 9004 | 1091 | for its only adjacency to R1 : 9005 | 1092 +-----------------------------------------------------------+ 1094 Figure 2: IGP Address and Segment Allocation - Illustration 1096 Suppose R1 wants to send an IPv4 packet P1 to R8. In this case, R1 1097 needs to apply PUSH operation to the IPv4 packet. 1099 Remember that the SID index "8" is a global IGP segment attached to 1100 the IP prefix 192.0.2.8/32. Its semantic is global within the IGP 1101 domain: any router forwards a packet received with active segment 8 1102 to the next-hop along the ECMP-aware shortest-path to the related 1103 prefix. 1105 R2 is the next-hop along the shortest path towards R8. By applying 1106 the steps in Section 2.8 the outgoing label downloaded to R1's FIB 1107 corresponding to the global SID index 8 is 1008 because the SRGB of 1108 R2 is [1000,5000] as shown in Figure 2. 1110 Because the packet is IPv4, R1 applies the PUSH operation using the 1111 label value 1008 as specified in Section 2.10.1. The resulting MPLS 1112 header will have the "S" bit [RFC3032] set because it is followed 1113 directly by an IPv4 packet. 1115 The packet arrives at router R2. Because the top label 1008 1116 corresponds to the IGP SID "8", which is the prefix-SID attached to 1117 the prefix 192.0.2.8/32 owned by the node R8, then the instruction 1118 associated with the SID is "forward the packet using all ECMP/UCMP 1119 interfaces and all ECMP/UCMP next-hop(s) along the shortest/useable 1120 path(s) towards R8". Because R2 is not the penultimate hop, R2 1121 applies the CONTINUE operation to the packet and sends it to R3 using 1122 one of the two links connected to R3 with top label 1008 as specified 1123 in Section 2.10.1. 1125 R3 receives the packet with top label 1008. Because the top label 1126 1008 corresponds to the IGP SID "8", which is the prefix-SID attached 1127 to the prefix 192.0.2.8/32 owned by the node R8, then the instruction 1128 associated with the SID is "send the packet using all ECMP interfaces 1129 and all next-hop(s) along the shortest path towards R8". Because R3 1130 is the penultimate hop, we assume that R3 performs penumtimate hop 1131 popping, which corresponds to the NEXT operation, then sends the 1132 packet to R8. The NEXT operation results in popping the outer label 1133 and sending the packet as a pure IPv4 packet to R8. 1135 In conclusion, the path followed by P1 is R1-R2--R3-R8. The ECMP- 1136 awareness ensures that the traffic be load-shared between any ECMP 1137 path, in this case the two links between R2 and R3. 1139 A.2. Incoming Label Collision Examples 1141 This section describes few examples to illustrate the handling of 1142 label collision described in Section 2.5. 1144 For the examples in this section, we assume that Node A has the 1145 following: 1147 o OSPF default admin distance for implementation=50 1149 o ISIS default admin distance for implementation=60 1151 A.2.1. Example 1 1153 Illustration of incoming label collision resolution for the same FEC 1154 type using MCC administrative distance. 1156 FEC1: 1157 o OSPF prefix SID advertisement from node B for 198.51.100.5/32 with 1158 index=5 1160 o OSPF SRGB on node A = [1000,1999] 1162 o Incoming label=1005 1164 FEC2: 1165 o ISIS prefix SID advertisement from node C for 203.0.113.105/32 1166 with index=5 1168 o ISIS SRGB on node A = [1000,1999] 1170 o Incoming label=1005 1172 FEC1 and FEC2 both use dynamic SID assignment. Since neither ofthe 1173 FEC types is SR Policy, we use the default admin distances of 50 and 1174 60 to break the tie. So FEC1 wins. 1176 A.2.2. Example 2 1178 Illustration of incoming label collision resolution for different FEC 1179 types using the MCC administrative distance. 1181 FEC1: 1182 o Node A receives an OSPF prefix sid advertisement from node B for 1183 198.51.100.6/32 with index=6 1185 o OSPF SRGB on node A = [1000,1999] 1187 o Hence the incoming label on node A corresponding to 1188 198.51.100.6/32 is 1006 1190 FEC2: 1191 ISIS on node A assigns the label 1006 to the globally significant 1192 adj-SID (I.e. when advertised the "L" flag is clear in the adj-SID 1193 sub-TLV as described in [I-D.ietf-isis-segment-routing-extensions]) 1194 towards one of its neighbors. Hence the incoming label corresponding 1195 to this adj-SID 1006. Assume Node A allocates this adj-SID 1196 dynamically, and it may differ across router reboots. 1198 FEC1 and FEC2 both use dynamic SID assignment. Since neither of the 1199 FEC types is SR Policy, we use the default admin distances of 50 and 1200 60 to break the tie. So FEC1 wins. 1202 A.2.3. Example 3 1204 Illustration of incoming label collision resolution based on 1205 preferring static over dynamic SID assignment 1207 FEC1: 1208 OSPF on node A receives a prefix SID advertisement from node B for 1209 198.51.100.7/32 with index=7. Assuming that the OSPF SRGB on node A 1210 is [1000,1999], then incoming label corresponding to 198.51.100.7/32 1211 is 1007 1213 FEC2: 1214 The operator on node A configures ISIS on node A to assign the label 1215 1007 to the globally significant adj-SID (I.e. when advertised the 1216 "L" flag is clear in the adj-SID sub-TLV as described in [I-D.ietf- 1217 isis-segment-routing-extensions]) towards one of its neighbor 1218 advertisement from node A with label=1007 1220 Node A assigns this adj-SID explicitly via configuration, so the adj- 1221 SID survives router reboots. 1223 FEC1 uses dynamic SID assignment, while FEC2 uses explicit SID 1224 assignment. So FEC2 wins. 1226 A.2.4. Example 4 1228 Illustration of incoming label collision resolution using FEC type 1229 default administrative distance 1231 FEC1: 1232 OSPF on node A receives a prefix SID advertisement from node B for 1233 198.51.100.8/32 with index=8. Assuming that OSPF SRGB on node A = 1234 [1000,1999], the incoming label corresponding to 198.51.100.8/32 is 1235 1008. 1237 FEC2: 1238 Suppose the SR Policy advertisement from controller to node A for the 1239 policy identified by (Endpoint = 192.0.2.208, color = 100) and 1240 consisting of SID-List = assigns the globally significant 1241 Binding-SID label 1008 1243 From the point of view of node A, FEC1 and FEC2 both use dynamic SID 1244 assignment. Based on the default administrative distance outlined in 1245 Section 2.5.1, the binding SID has a higher administrative distance 1246 than the prefix-SID and hence FEC1 wins. 1248 A.2.5. Example 5 1250 Illustration of incoming label collision resolution based on FEC type 1251 preference 1253 FEC1: 1254 ISIS on node A receives a prefix SID advertisement from node B for 1255 203.0.113.110/32 with index=10. Assuming that the ISIS SRGB on node A 1256 is [1000,1999], then incoming label corresponding to 203.0.113.110/32 1257 is 1010. 1259 FEC2: 1260 ISIS on node A assigns the label 1010 to the globally significant 1261 adj-SID (I.e. when advertised the "L" flag is clear in the adj-SID 1262 sub-TLV as described in [I-D.ietf-isis-segment-routing-extensions]) 1263 towards one of its neighbors). 1265 Node A allocates this adj-SID dynamically, and it may differ across 1266 router reboots. Hence both FEC1 and FEC2 both use dynamic SID 1267 assignment. 1269 Since both FECs are from the same MCC, they have the same default 1270 admin distance. So we compare FEC type code-point. FEC1 has FEC type 1271 code-point=120, while FEC2 has FEC type code-point=130. Therefore, 1272 FEC1 wins. 1274 A.2.6. Example 6 1276 Illustration of incoming label collision resolution based on address 1277 family preference. 1279 FEC1: 1280 ISIS on node A receives prefix SID advertisement from node B for 1281 203.0.113.111/32 with index 11. Assuming that the ISIS SRGB on node A 1282 is [1000,1999], the incoming label on node A for 203.0.113.111/32 is 1283 1011. 1285 FEC2: 1286 ISIS on node A prefix SID advertisement from node C for 1287 2001:DB8:1000::11/128 with index=11. Assuming that the ISIS SRGB on 1288 node A is [1000,1999], the incoming label on node A for 1289 2001:DB8:1000::11/128 is 1011 1291 FEC1 and FEC2 both use dynamic SID assignment. Since both FECs are 1292 from the same MCC, they have the same default admin distance. So we 1293 compare FEC type code-point. Both FECs have FEC type code-point=120. 1294 So we compare address family. Since IPv4 is preferred over IPv6, FEC1 1295 wins. 1297 A.2.7. Example 7 1299 Illustration incoming label collision resolution based on prefix 1300 length. 1302 FEC1: 1303 ISIS on node A receives a prefix SID advertisement from node B for 1304 203.0.113.112/32 with index 12. Assuming that ISIS SRGB on node A is 1305 [1000,1999], the incoming label for 203.0.113.112/32 on node A is 1306 1012. 1308 FEC2: 1309 ISIS on node A receives a prefix SID advertisement from node C for 1310 203.0.113.128/30 with index 12. Assuming that the ISIS SRGB on node A 1311 is [1000,1999], then incoming label for 203.0.113.128/30 on node A is 1312 1012 1314 FEC1 and FEC2 both use dynamic SID assignment. Since both FECs are 1315 from the same MCC, they have the same default admin distance. So we 1316 compare FEC type code-point. Both FECs have FEC type code-point=120. 1317 So we compare address family. Both are IPv4 address family, so we 1318 compare prefix length. FEC1 has prefix length=32, and FEC2 has 1319 prefix length=30, so FEC2 wins. 1321 A.2.8. Example 8 1323 Illustration of incoming label collision resolution based on the 1324 numerical value of the FECs. 1326 FEC1: 1327 ISIS on node A receives a prefix SID advertisement from node B for 1328 203.0.113.113/32 with index 13. Assuming that ISIS SRGB on node A is 1330 [1000,1999], then the incoming label for 203.0.113.113/32 on node A 1331 is 1013 1333 FEC2: 1334 ISIS on node A receives a prefix SID advertisement from node C for 1335 203.0.113.213/32 with index 13. Assuming that ISIS SRGB on node A is 1336 [1000,1999], then the incoming label for 203.0.113.213/32 on node A 1337 is 1013 1339 FEC1 and FEC2 both use dynamic SID assignment. Since both FECs are 1340 from the same MCC, they have the same default admin distance. So we 1341 compare FEC type code-point. Both FECs have FEC type code-point=120. 1342 So we compare address family. Both are IPv4 address family, so we 1343 compare prefix length. Prefix lengths are the same, so we compare 1344 prefix. FEC1 has the lower prefix, so FEC1 wins. 1346 A.2.9. Example 9 1348 Illustration of incoming label collision resolution based on routing 1349 instance ID. 1351 FEC1: 1352 ISIS on node A receives a prefix SID advertisement from node B for 1353 203.0.113.114/32 with index 14. Assume that this ISIS instance on 1354 node A has the Routing Instance ID 1000 and SRGB [1000,1999]. Hence 1355 the incoming label for 203.0.113.114/32 on node A is 1014 1357 FEC2: 1358 ISIS on node A receives a prefix SID advertisement from node C for 1359 203.0.113.114/32 with index=14. Assume that this is another instance 1360 of ISIS on node A with a different routing Instance ID 2000 but the 1361 same SRGB [1000,1999]. Hence incoming label for 203.0.113.114/32 on 1362 node A 1014 1364 These two FECs match all the way through the prefix length and 1365 prefix. So Routing Instance ID breaks the tie, with FEC1 winning. 1367 A.2.10. Example 10 1369 Illustration of incoming label collision resolution based on topology 1370 ID. 1372 FEC1: 1373 ISIS on node A receives a prefix SID advertisement from node B for 1374 203.0.113.115/32 with index=15. Assume that this ISIS instance on 1375 node A has Routing Instance ID 1000. Assume that the prefix 1376 advertisement of 203.0.113.115/32 was received in ISIS Multi-topology 1377 advertisement with ID = 50. If the ISIS SRGB for this routing 1378 instance on node A is [1000,1999], then incoming label of 1379 203.0.113.115/32 for topology 50 on node A is 1015 1381 FEC2: 1382 ISIS on node A receives a prefix SID advertisement from node C for 1383 203.0.113.115/32 with index 15. Assume that it is the same routing 1384 Instance ID = 1000 but 203.0.113.115/32 was advertised with a 1385 different ISIS Multi-topology ID = 40. If the ISIS SRGB on node A is 1386 [1000,1999], then incoming label of 203.0.113.115/32 for topology 40 1387 on node A is also 1015 1389 These two FECs match all the way through the prefix length, prefix, 1390 and Routing Instance ID. We compare ISIS Multi-topology ID, so FEC2 1391 wins. 1393 A.2.11. Example 11 1395 Illustration of incoming label collision for resolution based on 1396 algorithm ID. 1398 FEC1: 1399 ISIS on node A receives a prefix SID advertisement from node B for 1400 203.0.113.116/32 with index=16 Assume that ISIS on node A has Routing 1401 Instance ID = 1000. Assume that node B advertised 203.0.113.116/32 1402 with ISIS Multi-topology ID = 50 and SR algorithm = 0. Assume that 1403 the ISIS SRGB on node A = [1000,1999]. Hence the incoming label 1404 corresponding to this advertisement of 203.0.113.116/32 is 1016. 1406 FEC2: 1407 ISIS on node A receives a prefix SID advertisement from node C for 1408 203.0.113.116/32 with index=16. Assume that it is the same ISIS 1409 instance on node A with Routing Instance ID = 1000. Also assume that 1410 node C advertised 203.0.113.116/32 with ISIS Multi-topology ID = 50 1411 but with SR algorithm = 22. Since it is the same routing instance, 1412 the SRGB on node A = [1000,1999]. Hence the incoming label 1413 corresponding to this advertisement of 203.0.113.116/32 by node C is 1414 also 1016. 1416 These two FECs match all the way through the prefix length, prefix, 1417 and Routing Instance ID, and Multi-topology ID. We compare SR 1418 algorithm ID, so FEC1 wins. 1420 A.2.12. Example 12 1422 Illustration of incoming label collision resolution based on FEC 1423 numerical value and independent of how the SID assigned to the 1424 colliding FECs. 1426 FEC1: 1427 ISIS on node A receives a prefix SID advertisement from node B for 1428 203.0.113.117/32 with index 17. Assume that the ISIS SRGB on node A 1429 is [1000,1999], then the incoming label is 1017 1431 FEC2: 1432 Suppose there is an ISIS mapping server advertisement (SID/Label 1433 Binding TLV) from node D has Range 100 and Prefix = 203.0.113.1/32. 1434 Suppose this mapping server advertisement generates 100 mappings, one 1435 of which maps 203.0.113.17/32 to index 17. Assuming that it is the 1436 same ISIS instance, then the SRGB is [1000,1999] and hence the 1437 incoming label for 1017. 1439 The fact that FEC1 comes from a normal prefix SID advertisement and 1440 FEC2 is generated from a mapping server advertisement is not used as 1441 a tie-breaking parameter. Both FECs use dynamic SID assignment, are 1442 from the same MCC, have the same FEC type code-point=120. Their 1443 prefix lengths are the same as well. FEC2 wins based on lower 1444 numerical prefix value, since 203.0.113.17 is less than 1445 203.0.113.117. 1447 A.2.13. Example 13 1449 Illustration of incoming label collision resolution based on address 1450 family preference 1452 FEC1: 1453 SR Policy advertisement from controller to node A. Endpoint 1454 address=2001:DB8:3000::100, color=100, SID-List= and the 1455 Binding-SID label=1020 1457 FEC2: 1458 SR Policy advertisement from controller to node A. Endpoint 1459 address=192.0.2.60, color=100, SID-List= and the Binding-SID 1460 label=1020 1461 The FECs match through the tie-breaks up to and including having the 1462 same FEC type code-point=140. FEC2 wins based on IPv4 address family 1463 being preferred over IPv6. 1465 A.2.14. Example 14 1467 Illustration of incoming label resolution based on numerical value of 1468 the policy endpoint. 1470 FEC1: 1471 SR Policy advertisement from controller to node A. Endpoint 1472 address=192.0.2.70, color=100, SID-List= and Binding-SID 1473 label=1021 1475 FEC2: 1476 SR Policy advertisement from controller to node A Endpoint 1477 address=192.0.2.71, color=100, SID-List= and Binding-SID 1478 label=1021 1480 The FECs match through the tie-breaks up to and including having the 1481 same address family. FEC1 wins by having the lower numerical endpoint 1482 address value. 1484 A.3. Examples for the Effect of Incoming Label Collision on Outgoing 1485 Label 1487 This section presents examples to illustrate the effect of incoming 1488 label collision on the selection of the outgoing label described in 1489 Section 2.6. 1491 A.3.1. Example 1 1493 Illustration of the effect of incoming label resolution on the 1494 outgoing label 1496 FEC1: 1497 ISIS on node A receives a prefix SID advertisement from node B for 1498 203.0.113.122/32 with index 22. Assuming that the ISIS SRGB on node A 1499 is [1000,1999] the corresponding incoming label is 1022. 1501 FEC2: 1502 ISIS on node A receives a prefix SID advertisement from node C for 1503 203.0.113.222/32 with index=22 Assuming that the ISIS SRGB on node A 1504 is [1000,1999] the corresponding incoming label is 1022. 1506 FEC1 wins based on lowest numerical prefix value. This means that 1507 node A installs a transit MPLS forwarding entry to SWAP incoming 1508 label 1022, with outgoing label N and use outgoing interface I. N is 1509 determined by the index associated with FEC1 (index 22) and the SRGB 1510 advertised by the next-hop node on the shortest path to reach 1511 203.0.113.122/32. 1513 Node A will generally also install an imposition MPLS forwarding 1514 entry corresponding to FEC1 for incoming prefix=203.0.113.122/32 1515 pushing outgoing label N, and using outgoing interface I. 1517 The rule in Section 2.6 means node A MUST NOT install an ingress 1518 MPLS forwarding entry corresponding to FEC2 (the losing FEC, which 1519 would be for prefix 203.0.113.222/32). 1521 A.3.2. Example 2 1523 Illustration of the effect of incoming label collision resolution on 1524 outgoing label programming on node A 1526 FEC1: 1527 o SR Policy advertisement from controller to node A 1529 o Endpoint address=192.0.2.80, color=100, SID-List= 1531 o Binding-SID label=1023 1533 FEC2: 1534 o SR Policy advertisement from controller to node A 1536 o Endpoint address=192.0.2.81, color=100, SID-List= 1538 o Binding-SID label=1023 1540 FEC1 wins by having the lower numerical endpoint address value. This 1541 means that node A installs a transit MPLS forwarding entry to SWAP 1542 incoming label=1023, with outgoing labels and outgoing interface 1543 determined by the SID-List for FEC1. 1545 In this example, we assume that node A receives two BGP/VPN routes: 1547 o R1 with VPN label=V1, BGP next-hop = 192.0.2.80, and color=100, 1549 o R2 with VPN label=V2, BGP next-hop = 192.0.2.81, and color=100, 1550 We also assume that A has a BGP policy which matches on color=100 1551 that allows that its usage as SLA steering information. In this case, 1552 node A will install a VPN route with label stack = 1553 (corresponding to FEC1). 1555 The rule described in section 2.6 means that node A MUST NOT install 1556 a VPN route with label stack = (corresponding to FEC2.)