idnits 2.17.1 draft-ietf-spring-sr-yang-26.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 == Line 160 has weird spacing: '...terface if:...' == Line 190 has weird spacing: '...r-bound uin...' == Line 191 has weird spacing: '...r-bound uin...' == Line 194 has weird spacing: '...r-bound uin...' == Line 195 has weird spacing: '...r-bound uin...' == (1 more instance...) -- The document date (November 25, 2020) is 1246 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) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SPRING Working Group S. Litkowski 3 Internet-Draft Cisco Systems 4 Intended status: Standards Track Y. Qu 5 Expires: May 29, 2021 Futurewei 6 A. Lindem 7 Cisco Systems 8 P. Sarkar 9 Individual 10 J. Tantsura 11 Apstra 12 November 25, 2020 14 YANG Data Model for Segment Routing 15 draft-ietf-spring-sr-yang-26 17 Abstract 19 This document defines a YANG data model for segment routing 20 configuration and operation, which is to be augmented by different 21 segment routing data planes. The document also defines a YANG model 22 that is intended to be used on network elements to configure or 23 operate segment routing MPLS data plane, as well as some generic 24 containers to be reused by IGP protocol modules to support segment 25 routing. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on May 29, 2021. 44 Copyright Notice 46 Copyright (c) 2020 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (https://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 62 2. Terminology and Notation . . . . . . . . . . . . . . . . . . 3 63 2.1. Tree diagram . . . . . . . . . . . . . . . . . . . . . . 3 64 2.2. Prefixes in Data Node Names . . . . . . . . . . . . . . . 3 65 3. Design of the Data Model . . . . . . . . . . . . . . . . . . 3 66 4. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 6 67 5. IGP Control plane configuration . . . . . . . . . . . . . . . 6 68 5.1. IGP interface configuration . . . . . . . . . . . . . . . 7 69 5.1.1. Adjacency SID properties . . . . . . . . . . . . . . 7 70 5.1.1.1. Bundling . . . . . . . . . . . . . . . . . . . . 7 71 5.1.1.2. Protection . . . . . . . . . . . . . . . . . . . 8 72 6. State Data . . . . . . . . . . . . . . . . . . . . . . . . . 8 73 7. Notifications . . . . . . . . . . . . . . . . . . . . . . . . 8 74 8. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 8 75 8.1. YANG Module for Segment Routing . . . . . . . . . . . . . 9 76 8.2. YANG Module for Segment Routing Common Types . . . . . . 10 77 8.3. YANG Module for Segment Routing MPLS . . . . . . . . . . 16 78 9. Security Considerations . . . . . . . . . . . . . . . . . . . 28 79 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 29 80 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 81 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 82 12.1. Normative References . . . . . . . . . . . . . . . . . . 30 83 12.2. Informative References . . . . . . . . . . . . . . . . . 33 84 Appendix A. Configuration examples . . . . . . . . . . . . . . . 33 85 A.1. SR MPLS with IPv4 . . . . . . . . . . . . . . . . . . . . 33 86 A.2. SR MPLS with IPv6 . . . . . . . . . . . . . . . . . . . . 36 87 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 39 89 1. Introduction 91 This document defines a YANG data model [RFC7950] for segment routing 92 [RFC8402] configuration and operation. The document also defines a 93 YANG model that is intended to be used on network elements to 94 configure or operate segment routing MPLS data plane [RFC8660]. This 95 document does not define the IGP extensions to support segment 96 routing but defines generic groupings that SHOULD be reused by IGP 97 extension modules. The reason of this design choice is to not 98 require implementations to support all IGP extensions. For example, 99 an implementation may support IS-IS extension but not OSPF. 101 The YANG modules in this document conform to the Network Management 102 Datastore Architecture (NMDA) [RFC8342]. 104 2. Terminology and Notation 106 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 107 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 108 "OPTIONAL" in this document are to be interpreted as described in BCP 109 14 [RFC2119] [RFC8174] when, and only when, they appear in all 110 capitals, as shown here. 112 2.1. Tree diagram 114 Tree diagrams used in this document follow the notation defined in 115 [RFC8340]. 117 2.2. Prefixes in Data Node Names 119 In this document, names of data nodes, actions, and other data model 120 objects are often used without a prefix, as long as it is clear from 121 the context in which YANG module each name is defined. Otherwise, 122 names are prefixed using the standard prefix associated with the 123 corresponding YANG module, as shown in Table 1. 125 +----------+--------------------+-----------+ 126 | Prefix | YANG module | Reference | 127 +----------+--------------------+-----------+ 128 | if | ietf-interfaces | [RFC8343] | 129 | rt | ietf-routing | [RFC8349] | 130 | rt-types | ietf-routing-types | [RFC8294] | 131 | yang | ietf-yang-types | [RFC6991] | 132 | inet | ietf-inet-types | [RFC6991] | 133 +----------+--------------------+-----------+ 135 Table 1: Prefixes and Corresponding YANG Modules 137 3. Design of the Data Model 139 Module ietf-segment-routing augments the routing container in the 140 ietf-routing model [RFC8349], and defines generic segment routing 141 configuration and operational state. This module is augmented by 142 modules supporting different data planes. 144 Module ietf-segment-routing-mpls augments ietf-segment-routing, and 145 supports SR MPLS data plane configuration and operational state. 147 module: ietf-segment-routing 148 augment /rt:routing: 149 +--rw segment-routing 151 module: ietf-segment-routing-mpls 152 augment /rt:routing/sr:segment-routing: 153 +--rw sr-mpls 154 +--ro node-capabilities 155 | +--ro entropy-readable-label-depth? uint8 156 +--rw msd {max-sid-depth}? 157 | +--rw node-msd? uint8 158 | +--rw link-msds 159 | +--rw link-msds* [interface] 160 | +--rw interface if:interface-ref 161 | +--rw msd? uint8 162 +--rw bindings 163 | +--rw mapping-server {mapping-server}? 164 | | +--rw policy* [name] 165 | | +--rw name string 166 | | +--rw entries 167 | | +--rw mapping-entry* [prefix algorithm] 168 | | +--rw prefix inet:ip-prefix 169 | | +--rw value-type? enumeration 170 | | +--rw start-sid uint32 171 | | +--rw range? uint32 172 | | +--rw algorithm identityref 173 | +--rw connected-prefix-sid-map 174 | | +--rw connected-prefix-sid* [prefix algorithm] 175 | | +--rw prefix inet:ip-prefix 176 | | +--rw value-type? enumeration 177 | | +--rw start-sid uint32 178 | | +--rw range? uint32 179 | | +--rw algorithm identityref 180 | | +--rw last-hop-behavior? enumeration 181 | +--rw local-prefix-sid 182 | +--rw local-prefix-sid* [prefix algorithm] 183 | +--rw prefix inet:ip-prefix 184 | +--rw value-type? enumeration 185 | +--rw start-sid uint32 186 | +--rw range? uint32 187 | +--rw algorithm identityref 188 +--rw global-srgb 189 | +--rw srgb* [lower-bound upper-bound] 190 | +--rw lower-bound uint32 191 | +--rw upper-bound uint32 192 +--rw srlb 193 | +--rw srlb* [lower-bound upper-bound] 194 | +--rw lower-bound uint32 195 | +--rw upper-bound uint32 196 +--ro label-blocks* [] 197 | +--ro lower-bound? uint32 198 | +--ro upper-bound? uint32 199 | +--ro size? uint32 200 | +--ro free? uint32 201 | +--ro used? uint32 202 | +--ro scope? enumeration 203 +--ro sid-db 204 +--ro sid* [target sid source source-protocol binding-type] 205 +--ro target string 206 +--ro sid uint32 207 +--ro algorithm? uint8 208 +--ro source inet:ip-address 209 +--ro used? boolean 210 +--ro source-protocol -> /rt:routing 211 /control-plane-protocols 212 /control-plane-protocol/name 213 +--ro binding-type enumeration 214 +--ro scope? enumeration 216 notifications: 217 +---n segment-routing-global-srgb-collision 218 | +--ro srgb-collisions* [] 219 | +--ro lower-bound? uint32 220 | +--ro upper-bound? uint32 221 | +--ro routing-protocol? -> /rt:routing 222 | /control-plane-protocols 223 | /control-plane-protocol/name 224 | +--ro originating-rtr-id? router-or-system-id 225 +---n segment-routing-global-sid-collision 226 | +--ro received-target? string 227 | +--ro new-sid-rtr-id? router-or-system-id 228 | +--ro original-target? string 229 | +--ro original-sid-rtr-id? router-or-system-id 230 | +--ro index? uint32 231 | +--ro routing-protocol? -> /rt:routing 232 | /control-plane-protocols 233 | /control-plane-protocol/name 234 +---n segment-routing-index-out-of-range 235 +--ro received-target? string 236 +--ro received-index? uint32 237 +--ro routing-protocol? -> /rt:routing 238 /control-plane-protocols 239 /control-plane-protocol/name 241 4. Configuration 243 The module ietf-segment-routing-mpls augments the "/rt:routing/ 244 sr:segment-routing:" with a sr-mpls container. This container 245 defines all the configuration parameters related to segment-routing 246 MPLS data plane. 248 The sr-mpls configuration is split in global configuration and 249 interface configuration. 251 The global configuration includes : 253 o bindings : Defines prefix to SID mappings. The operator can 254 control advertisement of Prefix-SID independently for IPv4 and 255 IPv6. Two types of mappings are available: 257 * Mapping-server : maps non local prefixes to a segment ID. 258 Configuration of bindings does not automatically allow 259 advertisement of those bindings. Advertisement must be 260 controlled by each routing-protocol instance (see Section 5). 261 Multiple mapping policies may be defined. 263 * Connected prefixes : maps connected prefixes to a segment ID. 264 Advertisement of the mapping will be done by IGP when enabled 265 for segment routing (see Section 5). The SID value can be 266 expressed as an index (default), or an absolute value. The 267 "last-hop-behavior" configuration dictates the PHP behavior: 268 "explicit-null", "php", or "non-php". 270 o SRGB (Segment Routing Global Block): Defines a list of label 271 blocks represented by a pair of lower-bound/upper-bound labels. 272 The SRGB is also agnostic to the control plane used. So all 273 routing-protocol instance will have to advertise the same SRGB. 275 o SRLB (Segment Routing Local Block): Defines a list of label blocks 276 represented by a pair of lower-bound/upper-bound labels, reserved 277 for local SIDs. 279 5. IGP Control plane configuration 281 Support of segment-routing extensions for a particular IGP control 282 plane is done by augmenting routing-protocol configuration with 283 segment-routing extensions. This augmentation SHOULD be part of 284 separate YANG modules in order to not create any dependency for 285 implementations to support all protocol extensions. 287 This module defines groupings that SHOULD be used by IGP segment 288 routing modules. 290 The "sr-control-plane" grouping defines the generic global 291 configuration for the IGP. 293 The "enabled" leaf enables segment-routing extensions for the 294 routing-protocol instance. 296 The "bindings" container controls the routing-protocol instance's 297 advertisement of local bindings and the processing of received 298 bindings. 300 5.1. IGP interface configuration 302 The interface configuration is part of the "igp-interface" grouping 303 and includes Adjacency SID properties. 305 5.1.1. Adjacency SID properties 307 5.1.1.1. Bundling 309 In case of parallel IP links between routers, an additional Adjacency 310 SID [RFC8402] may be advertised representing more than one adjacency 311 (i.e., a bundle of adjacencies). The "advertise-adj-group-sid" 312 configuration controls whether or not an additional adjacency SID is 313 advertised. 315 The "advertise-adj-group-sid" is a list of "group-id". The "group- 316 id" will identify interfaces that are bundled together. 318 +-------+ +------+ 319 | | ------- L1 ---- | | 320 | R1 | ------- L2 ---- | R2 | 321 | | ------- L3 ---- | | 322 | | ------- L4 ---- | | 323 +-------+ +------+ 325 In the figure above, R1 and R2 are interconnected by four links. A 326 routing protocol adjacency is established on each link. Operator 327 would like to create segment-routing Adj-SID that represent some 328 bundles of links. We can imagine two different bundles : L1/L2 and 329 L3/L4. To achieve this behavior, the service provider will configure 330 a "group-id" X for both interfaces L1 and L2 and a "group-id" Y for 331 both interfaces L3 and L4. This will result in R1 advertising an 332 additional Adj-SID for each adjacency, for example a Adj-SID with S 333 flag set and value of 400 will be added to L1 and L2. A Adj-SID with 334 S flag set and value of 500 will be added to L3 and L4. As L1/L2 and 335 L3/L4 does not share the same "group-id", a different SID value will 336 be allocated. 338 5.1.1.2. Protection 340 The "advertise-protection" defines how protection for an interface is 341 advertised. It does not control the activation or deactivation of 342 protection. If the "single" option is used, a single Adj-SID will be 343 advertised for the interface. If the interface is protected, the 344 B-Flag for the Adj-SID advertisement will be set. If the "dual" 345 option is used and if the interface is protected, two Adj-SIDs will 346 be advertised for the interface adjacencies. One Adj-SID will always 347 have the B-Flag set and the other will have the B-Flag clear. This 348 option is intended to be used in the case of traffic engineering 349 where a path must use either protected segments or non-protected 350 segments. 352 6. State Data 354 The operational states contain information reflecting the usage of 355 allocated SRGB labels. 357 It also includes a list of all global SIDs, their associated 358 bindings, and other information such as the source protocol and 359 algorithm. 361 7. Notifications 363 The model defines the following notifications for segment-routing. 365 o segment-routing-global-srgb-collision: Raised when a control plane 366 advertised SRGB blocks have conflicts. 368 o segment-routing-global-sid-collision: Raised when a control plane 369 advertised index is already associated with another target (in 370 this version, the only defined targets are IPv4 and IPv6 371 prefixes). 373 o segment-routing-index-out-of-range: Raised when a control plane 374 advertised index falls outside the range of SRGBs configured for 375 the network device. 377 8. YANG Modules 379 There are three YANG modules included in this document. 381 The following RFCs and drafts are not referenced in the document text 382 but are referenced in the ietf-segment-routing-common.yang and/or 383 ietf-segment-routing.yang module: [RFC6991], [RFC8294], [RFC8476], 384 [RFC8491], [RFC8665], and [RFC8667]. 386 8.1. YANG Module for Segment Routing 388 ietf-segment-routing.yang: This module defines a generic framework 389 for Segment Routing, and it is to be augmented by models for 390 different SR data planes. 392 file "ietf-segment-routing@2020-11-25.yang" 393 module ietf-segment-routing { 394 yang-version 1.1; 395 namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing"; 396 prefix sr; 398 import ietf-routing { 399 prefix rt; 400 reference "RFC 8349: A YANG Data Model for Routing 401 Management (NMDA Version)"; 402 } 404 organization 405 "IETF SPRING - SPRING Working Group"; 406 contact 407 "WG Web: 408 WG List: 410 Author: Stephane Litkowski 411 412 Author: Yingzhen Qu 413 414 Author: Acee Lindem 415 416 Author: Pushpasis Sarkar 417 418 Author: Jeff Tantsura 419 421 "; 422 description 423 "The YANG module defines a generic framework for Segment 424 Routing. It is to be augmented by models for different 425 SR data planes. 427 This YANG model conforms to the Network Management 428 Datastore Architecture (NMDA) as described in RFC 8242. 430 Copyright (c) 2020 IETF Trust and the persons identified as 431 authors of the code. All rights reserved. 433 Redistribution and use in source and binary forms, with or 434 without modification, is permitted pursuant to, and subject 435 to the license terms contained in, the Simplified BSD License 436 set forth in Section 4.c of the IETF Trust's Legal Provisions 437 Relating to IETF Documents 438 (http://trustee.ietf.org/license-info). 440 This version of this YANG module is part of RFC XXXX; 441 see the RFC itself for full legal notices. 443 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 444 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 445 'MAY', and 'OPTIONAL' in this document are to be interpreted as 446 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 447 they appear in all capitals, as shown here."; 449 reference "RFC XXXX: YANG Data Model for Segment Routing."; 451 revision 2020-11-25 { 452 description 453 "Initial Version"; 454 reference "RFC XXXX: YANG Data Model for Segment Routing."; 455 } 457 augment "/rt:routing" { 458 description 459 "This module augments routing data model (RFC 8349) 460 with Segment Routing (SR)."; 461 container segment-routing { 462 description 463 "Segment Routing configuration. This container 464 is to be augmented by models for different SR 465 data planes."; 466 reference "RFC 8402: Segment Routing Architecture."; 467 } 468 } 469 } 470 472 8.2. YANG Module for Segment Routing Common Types 474 ietf-segment-routing-common.yang: This module defines a collection of 475 generic types and groupings for SR as defined in [RFC8402]. 477 file "ietf-segment-routing-common@2020-11-25.yang" 478 module ietf-segment-routing-common { 479 yang-version 1.1; 480 namespace 481 "urn:ietf:params:xml:ns:yang:ietf-segment-routing-common"; 482 prefix sr-cmn; 484 import ietf-inet-types { 485 prefix inet; 486 reference "RFC 6991: Common YANG Data Types"; 487 } 489 organization 490 "IETF SPRING - SPRING Working Group"; 492 contact 493 "WG Web: 494 WG List: 496 Author: Stephane Litkowski 497 498 Author: Yingzhen Qu 499 500 Author: Acee Lindem 501 502 Author: Pushpasis Sarkar 503 504 Author: Jeff Tantsura 505 507 "; 508 description 509 "The YANG module defines a collection of generic types and 510 groupings for Segment Routing (SR) as described in RFC 8402. 512 This YANG model conforms to the Network Management 513 Datastore Architecture (NMDA) as described in RFC 8242. 515 Copyright (c) 2020 IETF Trust and the persons identified as 516 authors of the code. All rights reserved. 518 Redistribution and use in source and binary forms, with or 519 without modification, is permitted pursuant to, and subject 520 to the license terms contained in, the Simplified BSD License 521 set forth in Section 4.c of the IETF Trust's Legal Provisions 522 Relating to IETF Documents 523 (http://trustee.ietf.org/license-info). 525 This version of this YANG module is part of RFC XXXX; 526 see the RFC itself for full legal notices. 528 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 529 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 530 'MAY', and 'OPTIONAL' in this document are to be interpreted as 531 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 532 they appear in all capitals, as shown here."; 534 reference "RFC XXXX: YANG Data Model for Segment Routing."; 536 revision 2020-11-25 { 537 description 538 "Initial version"; 539 reference "RFC XXXX: YANG Data Model for Segment Routing."; 540 } 542 feature sid-last-hop-behavior { 543 description 544 "Configurable last hop behavior."; 545 reference "RFC 8660: Segment Routing with the MPLS Data Plane"; 546 } 548 identity prefix-sid-algorithm { 549 description 550 "Base identity for prefix-sid algorithm."; 551 reference "RFC 8402: Segment Routing Architecture"; 552 } 554 identity prefix-sid-algorithm-shortest-path { 555 base prefix-sid-algorithm; 556 description 557 "Shortest Path First (SPF) prefix-sid algorithm. This 558 is the default algorithm."; 559 } 561 identity prefix-sid-algorithm-strict-spf { 562 base prefix-sid-algorithm; 563 description 564 "This algorithm mandates that the packet is forwarded 565 according to ECMP-aware SPF algorithm."; 566 } 568 grouping srlr { 569 description 570 "Grouping for SR Label Range configuration."; 571 leaf lower-bound { 572 type uint32; 573 description 574 "Lower value in the label range."; 575 } 576 leaf upper-bound { 577 type uint32; 578 must "../lower-bound < ../upper-bound" { 579 error-message 580 "The upper-bound must be greater than the lower-bound."; 581 description 582 "The value must be greater than 'lower-bound'."; 583 } 584 description 585 "Upper value in the label range."; 586 } 587 } 589 grouping srgb { 590 description 591 "Grouping for SR Global Label range."; 592 list srgb { 593 key "lower-bound upper-bound"; 594 ordered-by user; 595 description 596 "List of global blocks to be advertised."; 597 uses srlr; 598 } 599 } 601 grouping srlb { 602 description 603 "Grouping for SR Local Block range."; 604 list srlb { 605 key "lower-bound upper-bound"; 606 ordered-by user; 607 description 608 "List of SRLBs."; 609 uses srlr; 610 } 611 } 613 grouping sid-value-type { 614 description 615 "Defines how the SID value is expressed."; 616 leaf value-type { 617 type enumeration { 618 enum "index" { 619 description 620 "The value will be interpreted as an index."; 621 } 622 enum "absolute" { 623 description 624 "The value will become interpreted as an absolute 625 value."; 626 } 627 } 628 default "index"; 629 description 630 "This leaf defines how value must be interpreted."; 631 } 632 } 634 grouping prefix-sid { 635 description 636 "This grouping defines cfg of prefix SID."; 637 leaf prefix { 638 type inet:ip-prefix; 639 description 640 "connected prefix sid."; 641 } 642 uses prefix-sid-attributes; 643 } 645 grouping ipv4-sid { 646 description 647 "Grouping for an IPv4 prefix SID."; 648 leaf prefix { 649 type inet:ipv4-prefix; 650 description 651 "Connected IPv4 prefix sid."; 652 } 653 uses prefix-sid-attributes; 654 } 655 grouping ipv6-sid { 656 description 657 "Grouping for an IPv6 prefix SID."; 658 leaf prefix { 659 type inet:ipv6-prefix; 660 description 661 "Connected ipv6 prefix sid."; 662 } 663 uses prefix-sid-attributes; 664 } 666 grouping last-hop-behavior { 667 description 668 "Defines last hop behavior"; 669 leaf last-hop-behavior { 670 if-feature "sid-last-hop-behavior"; 671 type enumeration { 672 enum "explicit-null" { 673 description 674 "Use explicit-null for the SID."; 675 } 676 enum "no-php" { 677 description 678 "Do not use Penultimate Hop Popping (PHP) 679 for the SID."; 680 } 681 enum "php" { 682 description 683 "Use PHP for the SID."; 684 } 685 } 686 description 687 "Configure last hop behavior."; 688 } 689 } 691 grouping node-capabilities { 692 description 693 "Containing SR node capabilities."; 694 container node-capabilities { 695 config false; 696 description 697 "Shows the SR capability of the node."; 698 leaf entropy-readable-label-depth { 699 type uint8; 700 description 701 "Maximum label stack depth that a router can read."; 702 } 703 } 704 } 706 grouping prefix-sid-attributes { 707 description 708 "Grouping for Segment Routing (SR) prefix attributes."; 709 uses sid-value-type; 710 leaf start-sid { 711 type uint32; 712 mandatory true; 713 description 714 "Value associated with prefix. The value must be 715 interpreted in the context of value-type."; 716 } 717 leaf range { 718 type uint32; 719 description 720 "Indicates how many SIDs can be allocated."; 722 } 723 leaf algorithm { 724 type identityref { 725 base prefix-sid-algorithm; 726 } 727 description 728 "Prefix-sid algorithm."; 729 } 730 } 731 } 732 734 8.3. YANG Module for Segment Routing MPLS 736 ietf-segment-routing-mpls.yang: This module defines the configuration 737 and operational states for Segment Routing MPLS data plane. 739 file "ietf-segment-routing-mpls@2020-11-25.yang" 740 module ietf-segment-routing-mpls { 741 yang-version 1.1; 742 namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls"; 743 prefix sr-mpls; 745 import ietf-inet-types { 746 prefix inet; 747 reference "RFC 6991: Common YANG Data Types"; 748 } 749 import ietf-routing { 750 prefix rt; 751 reference "RFC 8349: A YANG Data Model for Routing 752 Management (NMDA Version)"; 753 } 754 import ietf-interfaces { 755 prefix if; 756 reference "RFC 8343: A YANG Data Model for Interface 757 Management (NMDA Version)"; 758 } 759 import ietf-routing-types { 760 prefix rt-types; 761 reference "RFC 8294: Common YANG Data Types for the 762 Routing Area"; 763 } 764 import ietf-segment-routing { 765 prefix sr; 766 reference "RFC XXXX: YANG Data Model for Segment Routing."; 767 } 768 import ietf-segment-routing-common { 769 prefix sr-cmn; 770 reference "RFC XXXX: YANG Data Model for Segment Routing."; 771 } 773 organization 774 "IETF SPRING - SPRING Working Group"; 775 contact 776 "WG Web: 777 WG List: 779 Author: Stephane Litkowski 780 781 Author: Yingzhen Qu 782 783 Author: Acee Lindem 784 785 Author: Pushpasis Sarkar 786 787 Author: Jeff Tantsura 788 790 "; 791 description 792 "The YANG module defines a generic configuration model for 793 Segment Routing MPLS data plane. 795 This YANG model conforms to the Network Management 796 Datastore Architecture (NMDA) as described in RFC 8242. 798 Copyright (c) 2020 IETF Trust and the persons identified as 799 authors of the code. All rights reserved. 801 Redistribution and use in source and binary forms, with or 802 without modification, is permitted pursuant to, and subject 803 to the license terms contained in, the Simplified BSD License 804 set forth in Section 4.c of the IETF Trust's Legal Provisions 805 Relating to IETF Documents 806 (http://trustee.ietf.org/license-info). 808 This version of this YANG module is part of RFC XXXX; 809 see the RFC itself for full legal notices. 811 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 812 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 813 'MAY', and 'OPTIONAL' in this document are to be interpreted as 814 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 815 they appear in all capitals, as shown here."; 817 reference "RFC XXXX: YANG Data Model for Segment Routing."; 818 revision 2020-11-25 { 819 description 820 "Initial Version"; 821 reference "RFC XXXX: YANG Data Model for Segment Routing."; 822 } 824 feature mapping-server { 825 description 826 "Support for Segment Routing Mapping Server (SRMS)."; 827 reference "RFC 8661: Segment Routing MPLS Interworking 828 with LDP"; 829 } 831 feature protocol-srgb { 832 description 833 "Support for per-protocol Segment Routing Global Block 834 (SRGB) configuration."; 835 reference "RFC 8660: Segment Routing with the MPLS 836 Data Plane"; 837 } 839 feature max-sid-depth { 840 description 841 "Support for signaling MSD (Maximum SID Depth) in IGP."; 842 reference "RFC 8476: Signaling Maximum SID Depth (MSD) 843 Using OSPF 844 RFC 8491: Signaling Maximum SID Depth (MSD) 845 Using IS-IS"; 846 } 848 typedef system-id { 849 type string { 850 pattern 851 '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}'; 852 } 853 description 854 "This type defines IS-IS system-id using pattern, 855 An example system-id is 0143.0438.AEF0"; 856 } 858 typedef router-or-system-id { 859 type union { 860 type rt-types:router-id; 861 type system-id; 862 } 863 description 864 "OSPF/BGP router-id or ISIS system ID."; 865 } 866 grouping sr-control-plane { 867 description 868 "Defines protocol configuration."; 869 container segment-routing { 870 description 871 "Segment Routing global configuration."; 872 leaf enabled { 873 type boolean; 874 default "false"; 875 description 876 "Enables segment-routing control-plane protocol 877 extensions."; 878 } 879 container bindings { 880 if-feature mapping-server; 881 description 882 "Control of binding advertisement and reception."; 883 container advertise { 884 description 885 "Control advertisement of local mappings 886 in binding TLVs."; 887 leaf-list policies { 888 type leafref { 889 path "/rt:routing/sr:segment-routing/sr-mpls:sr-mpls" 890 + "/sr-mpls:bindings/sr-mpls:mapping-server" 891 + "/sr-mpls:policy/sr-mpls:name"; 892 } 893 description 894 "List of binding advertisement policies."; 895 } 896 } 897 leaf receive { 898 type boolean; 899 default "true"; 900 description 901 "Allow the reception and usage of binding TLVs."; 902 } 903 } 904 } 905 } 907 grouping igp-interface { 908 description 909 "Grouping for IGP interface configuration."; 910 container segment-routing { 911 description 912 "Container for SR interface configuration."; 913 container adjacency-sid { 914 description 915 "Adjacency SID configuration."; 916 reference "RFC 8660: Segment Routing with the MPLS 917 Data Plane"; 918 list adj-sids { 919 key "value"; 920 uses sr-cmn:sid-value-type; 921 leaf value { 922 type uint32; 923 description 924 "Value of the Adj-SID."; 925 } 926 leaf protected { 927 type boolean; 928 default false; 929 description 930 "It is used to protect the manual adj-SID, e.g. using 931 IPFRR or MPLS-FRR."; 932 } 933 leaf weight { 934 type uint8; 935 description 936 "The load-balancing factor over parallel adjacencies."; 937 reference "RFC 8402: Segment Routing Architecture 938 RFC 8665: OSPF Extensions for Segment Routing 939 RFC 8667: IS-IS Extensions for Segment 940 Routing"; 941 } 942 description 943 "List of adj-sid configuration."; 944 } 945 list advertise-adj-group-sid { 946 key "group-id"; 947 description 948 "Control advertisement of S or G flag. Enable 949 advertisement of a common Adj-SID for parallel 950 links."; 951 reference "RFC 8665: OSPF Extensions for Segment Routing 952 Section 6.1 953 RFC 8667: IS-IS Extensions for Segment 954 Routing Section 2.2.1"; 955 leaf group-id { 956 type uint32; 957 description 958 "The value is an internal value to identify a 959 group-ID. Interfaces with the same group-ID 960 will be bundled together."; 961 } 963 } 964 leaf advertise-protection { 965 type enumeration { 966 enum "single" { 967 description 968 "A single Adj-SID is associated with the adjacency 969 and reflects the protection configuration."; 970 } 971 enum "dual" { 972 description 973 "Two Adj-SIDs will be associated with the adjacency 974 if the interface is protected. In this case, will 975 be advertised with backup flag set, the other will 976 be advertised with the backup flag clear. In case 977 protection is not configured, single Adj-SID will 978 be advertised with the backup flag clear."; 979 } 980 } 981 description 982 "If set, the Adj-SID refers to a protected adjacency."; 983 reference "RFC 8665: OSPF Extensions for Segment Routing 984 Section 6.1 985 RFC 8667: IS-IS Extensions for Segment 986 Routing Section 2.2.1"; 987 } 988 } 989 } 990 } 992 grouping max-sid-depth { 993 description 994 "Maximum SID Depth (MSD)D configuration grouping."; 995 leaf node-msd { 996 type uint8; 997 description 998 "Node MSD is the lowest MSD supported by the node."; 999 } 1000 container link-msds { 1001 description 1002 "MSD supported by an individual interface."; 1003 list link-msds { 1004 key "interface"; 1005 description 1006 "List of link MSDs."; 1007 leaf interface { 1008 type if:interface-ref; 1009 description 1010 "Reference to device interface."; 1012 } 1013 leaf msd { 1014 type uint8; 1015 description 1016 "MSD supported by the interface."; 1017 } 1018 } 1019 } 1020 } 1022 augment "/rt:routing/sr:segment-routing" { 1023 description 1024 "This augments routing data model (RFC 8349) 1025 with Segment Routing (SR)."; 1026 container sr-mpls { 1027 description 1028 "Segment Routing global configuration."; 1029 uses sr-cmn:node-capabilities; 1030 container msd { 1031 if-feature "max-sid-depth"; 1032 description 1033 "MSD configuration."; 1034 uses max-sid-depth; 1035 } 1036 container bindings { 1037 description 1038 "List of bindings."; 1039 container mapping-server { 1040 if-feature "mapping-server"; 1041 description 1042 "Configuration of mapping-server local entries."; 1043 list policy { 1044 key "name"; 1045 description 1046 "List mapping-server policies."; 1047 leaf name { 1048 type string; 1049 description 1050 "Name of the mapping policy."; 1051 } 1052 container entries { 1053 description 1054 "IPv4/IPv6 mapping entries."; 1055 list mapping-entry { 1056 key "prefix algorithm"; 1057 description 1058 "Mapping entries."; 1059 uses sr-cmn:prefix-sid; 1061 } 1062 } 1063 } 1064 } 1065 container connected-prefix-sid-map { 1066 description 1067 "Prefix SID configuration."; 1068 list connected-prefix-sid { 1069 key "prefix algorithm"; 1070 description 1071 "List of prefix SID mapped to IPv4/IPv6 1072 local prefixes."; 1073 uses sr-cmn:prefix-sid; 1074 uses sr-cmn:last-hop-behavior; 1075 } 1076 } 1077 container local-prefix-sid { 1078 description 1079 "Local sid configuration."; 1080 list local-prefix-sid { 1081 key "prefix algorithm"; 1082 description 1083 "List of local IPv4/IPv6 prefix-sids."; 1084 uses sr-cmn:prefix-sid; 1085 } 1086 } 1087 } 1088 container global-srgb { 1089 description 1090 "Global SRGB configuration."; 1091 uses sr-cmn:srgb; 1092 } 1093 container srlb { 1094 description 1095 "Segment Routing Local Block (SRLB) configuration."; 1096 uses sr-cmn:srlb; 1097 } 1099 list label-blocks { 1100 config false; 1101 description 1102 "List of label blocks currently in use."; 1103 leaf lower-bound { 1104 type uint32; 1105 description 1106 "Lower bound of the label block."; 1107 } 1108 leaf upper-bound { 1109 type uint32; 1110 description 1111 "Upper bound of the label block."; 1112 } 1113 leaf size { 1114 type uint32; 1115 description 1116 "Number of indexes in the block."; 1117 } 1118 leaf free { 1119 type uint32; 1120 description 1121 "Number of free indexes in the block."; 1122 } 1123 leaf used { 1124 type uint32; 1125 description 1126 "Number of indexes in use in the block."; 1127 } 1128 leaf scope { 1129 type enumeration { 1130 enum "global" { 1131 description 1132 "Global SID."; 1133 } 1134 enum "local" { 1135 description 1136 "Local SID."; 1137 } 1138 } 1139 description 1140 "Scope of this label block."; 1141 } 1142 } 1143 container sid-db { 1144 config false; 1145 description 1146 "List of prefix and SID associations."; 1147 list sid { 1148 key "target sid source source-protocol binding-type"; 1149 ordered-by system; 1150 description 1151 "SID Binding."; 1152 leaf target { 1153 type string; 1154 description 1155 "Defines the target of the binding. It can be a 1156 prefix or something else."; 1158 } 1159 leaf sid { 1160 type uint32; 1161 description 1162 "Index associated with the prefix."; 1163 } 1164 leaf algorithm { 1165 type uint8; 1166 description 1167 "Algorithm to be used for the prefix SID."; 1168 reference "RFC 8665: OSPF Extensions for Segment Routing 1169 RFC 8667: IS-IS Extensions for Segment 1170 Routing"; 1171 } 1172 leaf source { 1173 type inet:ip-address; 1174 description 1175 "IP address of the router that owns the binding."; 1176 } 1177 leaf used { 1178 type boolean; 1179 description 1180 "Indicates if the binding is installed in the 1181 forwarding plane."; 1182 } 1183 leaf source-protocol { 1184 type leafref { 1185 path "/rt:routing/rt:control-plane-protocols/" 1186 + "rt:control-plane-protocol/rt:name"; 1187 } 1188 description 1189 "Routing protocol that owns the binding"; 1190 } 1191 leaf binding-type { 1192 type enumeration { 1193 enum "prefix-sid" { 1194 description 1195 "Binding is learned from a prefix SID."; 1196 } 1197 enum "binding-tlv" { 1198 description 1199 "Binding is learned from a binding TLV."; 1200 } 1201 } 1202 description 1203 "Type of binding."; 1204 } 1205 leaf scope { 1206 type enumeration { 1207 enum "global" { 1208 description 1209 "Global SID."; 1210 } 1211 enum "local" { 1212 description 1213 "Local SID."; 1214 } 1215 } 1216 description 1217 "SID scoping."; 1218 } 1219 } 1220 } 1221 } 1222 } 1224 notification segment-routing-global-srgb-collision { 1225 description 1226 "This notification is sent when SRGB blocks received from 1227 routers collide."; 1228 list srgb-collisions { 1229 description 1230 "List of SRGB blocks that collide."; 1231 leaf lower-bound { 1232 type uint32; 1233 description 1234 "Lower value in the block."; 1235 } 1236 leaf upper-bound { 1237 type uint32; 1238 description 1239 "Upper value in the block."; 1240 } 1241 leaf routing-protocol { 1242 type leafref { 1243 path "/rt:routing/rt:control-plane-protocols/" 1244 + "rt:control-plane-protocol/rt:name"; 1245 } 1246 description 1247 "Routing protocol reference for SRGB collision."; 1248 } 1249 leaf originating-rtr-id { 1250 type router-or-system-id; 1251 description 1252 "Originating Router ID of this SRGB block."; 1253 } 1255 } 1256 } 1257 notification segment-routing-global-sid-collision { 1258 description 1259 "This notification is sent when a new mapping is learned 1260 containing a mapping where the SID is already used. 1261 The notification generation must be throttled with at least 1262 a 5 second gap between notifications."; 1263 leaf received-target { 1264 type string; 1265 description 1266 "Target received in the router advertisement that caused 1267 the SID collision."; 1268 } 1269 leaf new-sid-rtr-id { 1270 type router-or-system-id; 1271 description 1272 "Router ID that advertised the colliding SID."; 1273 } 1274 leaf original-target { 1275 type string; 1276 description 1277 "Target already available in the database with the same SID 1278 as the received target."; 1279 } 1280 leaf original-sid-rtr-id { 1281 type router-or-system-id; 1282 description 1283 "Router-ID for the router that originally advertised the 1284 conlliding SID, i.e., the instance in the database."; 1285 } 1286 leaf index { 1287 type uint32; 1288 description 1289 "Value of the index used by two different prefixes."; 1290 } 1291 leaf routing-protocol { 1292 type leafref { 1293 path "/rt:routing/rt:control-plane-protocols/" 1294 + "rt:control-plane-protocol/rt:name"; 1295 } 1296 description 1297 "Routing protocol reference for colliding SID."; 1298 } 1299 } 1300 notification segment-routing-index-out-of-range { 1301 description 1302 "This notification is sent when a binding is received 1303 containing a segment index which is out of the local 1304 configured ranges. The notification generation must be 1305 throttled with at least a 5 second gap between 1306 notifications."; 1307 leaf received-target { 1308 type string; 1309 description 1310 "Target received in the router advertisement with 1311 the out-of-range index."; 1312 } 1313 leaf received-index { 1314 type uint32; 1315 description 1316 "Value of the index received."; 1317 } 1318 leaf routing-protocol { 1319 type leafref { 1320 path "/rt:routing/rt:control-plane-protocols/" 1321 + "rt:control-plane-protocol/rt:name"; 1322 } 1323 description 1324 "Routing protocol reference for out-of-range indexd."; 1325 } 1326 } 1327 } 1328 1330 9. Security Considerations 1332 The YANG modules specified in this document define a schema for data 1333 that is designed to be accessed via network management protocols such 1334 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 1335 is the secure transport layer, and the mandatory-to-implement secure 1336 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 1337 is HTTPS, and the mandatory-to-implement secure transport is TLS 1338 [RFC5246]. 1340 The NETCONF access control model [RFC6536] provides the means to 1341 restrict access for particular NETCONF or RESTCONF users to a pre- 1342 configured subset of all available NETCONF or RESTCONF protocol 1343 operations and content. 1345 There are a number of data nodes defined in the modules that are 1346 writable/creatable/deletable (i.e., config true, which is the 1347 default). These data nodes may be considered sensitive or vulnerable 1348 in some network environments. Write operations (e.g., edit-config) 1349 to these data nodes without proper protection can have a negative 1350 effect on network operations. Writable data node represent 1351 configuration of the router's MSD, Bindings, and the global and local 1352 label blocks. These correspond to the following schema nodes: 1354 /segment-routing 1356 /segment-routing/mpls 1358 /segment-routing/mpls/bindings - Modification to the local 1359 bindings could result in a Denial of Service (DoS) attack. 1360 Additionally, the addition of bindings could result in traffic 1361 being redirected to the router. 1363 /segment-routing/mpls/global-srgb - Modification of the Segment 1364 Routing Global Block (SRGB) could be used to mount a DoS attack. 1366 /segment-routing/mpls/srlb - Modification of the Segment Routing 1367 Local Block (SRLB) could be used to mount a DoS attack. 1369 /segment-routing/mpls/label-blocks - Modification of the Segment 1370 Routing label blocks could be used to mount a DoS attack. 1372 Some of the readable data nodes in the modules may be considered 1373 sensitive or vulnerable in some network environments. It is thus 1374 important to control read access (e.g., via get, get-config, or 1375 notification) to these data nodes. The exposure of both local 1376 bindings and SID database will exposure segment routing paths that 1377 may be attacked. These correspond to the following schema nodes: 1379 /segment-routing/mpls/bindings - Knowledge of these data nodes can 1380 be used to attack the local router with either a a Denial of 1381 Service (DoS) attack or rediection of traffic destined to the 1382 local router. 1384 /segment-routing/mpls/sid-db - Knowledge of these data nodes can 1385 be used to attack the other routers in the segment routing domain 1386 with either a a Denial of Service (DoS) attack or rediection 1387 traffic destined for those routers. 1389 10. Acknowledgements 1391 The authors would like to thank Derek Yeung, Greg Hankins, Hannes 1392 Gredler, Uma Chunduri, Jeffrey Zhang, Shradda Hedge, Les Ginsberg for 1393 their contributions. 1395 Thanks to Ladislav Lhotka and Tom Petch for their thorough reviews 1396 and helpful comments. 1398 11. IANA Considerations 1400 This document registers a URI in the IETF XML registry [RFC3688]. 1401 Following the format in [RFC3688], the following registration is 1402 requested to be made: 1404 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing-commmon 1405 Registrant Contact: The IESG. 1406 XML: N/A, the requested URI is an XML namespace. 1408 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing 1409 Registrant Contact: The IESG. 1410 XML: N/A, the requested URI is an XML namespace. 1412 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls 1413 Registrant Contact: The IESG. 1414 XML: N/A, the requested URI is an XML namespace. 1416 This document registers a YANG module in the YANG Module Names 1417 registry [RFC6020]. 1419 name: ietf-segment-routing-common 1420 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing-common 1421 prefix: sr-cmn 1422 reference: RFC XXXX 1424 name: ietf-segment-routing 1425 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing 1426 prefix: sr 1427 reference: RFC XXXX 1429 name: ietf-segment-routing-mpls 1430 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls 1431 prefix: sr-mpls 1432 reference: RFC XXXX 1434 12. References 1436 12.1. Normative References 1438 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1439 Requirement Levels", BCP 14, RFC 2119, 1440 DOI 10.17487/RFC2119, March 1997, 1441 . 1443 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1444 DOI 10.17487/RFC3688, January 2004, 1445 . 1447 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1448 (TLS) Protocol Version 1.2", RFC 5246, 1449 DOI 10.17487/RFC5246, August 2008, 1450 . 1452 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1453 the Network Configuration Protocol (NETCONF)", RFC 6020, 1454 DOI 10.17487/RFC6020, October 2010, 1455 . 1457 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1458 and A. Bierman, Ed., "Network Configuration Protocol 1459 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1460 . 1462 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 1463 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 1464 . 1466 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 1467 Protocol (NETCONF) Access Control Model", RFC 6536, 1468 DOI 10.17487/RFC6536, March 2012, 1469 . 1471 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1472 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1473 . 1475 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1476 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1477 . 1479 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 1480 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 1481 . 1483 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1484 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1485 May 2017, . 1487 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 1488 "Common YANG Data Types for the Routing Area", RFC 8294, 1489 DOI 10.17487/RFC8294, December 2017, 1490 . 1492 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 1493 and R. Wilton, "Network Management Datastore Architecture 1494 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 1495 . 1497 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 1498 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 1499 . 1501 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 1502 Routing Management (NMDA Version)", RFC 8349, 1503 DOI 10.17487/RFC8349, March 2018, 1504 . 1506 [RFC8402] Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., 1507 Decraene, B., Litkowski, S., and R. Shakir, "Segment 1508 Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, 1509 July 2018, . 1511 [RFC8476] Tantsura, J., Chunduri, U., Aldrin, S., and P. Psenak, 1512 "Signaling Maximum SID Depth (MSD) Using OSPF", RFC 8476, 1513 DOI 10.17487/RFC8476, December 2018, 1514 . 1516 [RFC8491] Tantsura, J., Chunduri, U., Aldrin, S., and L. Ginsberg, 1517 "Signaling Maximum SID Depth (MSD) Using IS-IS", RFC 8491, 1518 DOI 10.17487/RFC8491, November 2018, 1519 . 1521 [RFC8660] Bashandy, A., Ed., Filsfils, C., Ed., Previdi, S., 1522 Decraene, B., Litkowski, S., and R. Shakir, "Segment 1523 Routing with the MPLS Data Plane", RFC 8660, 1524 DOI 10.17487/RFC8660, December 2019, 1525 . 1527 [RFC8665] Psenak, P., Ed., Previdi, S., Ed., Filsfils, C., Gredler, 1528 H., Shakir, R., Henderickx, W., and J. Tantsura, "OSPF 1529 Extensions for Segment Routing", RFC 8665, 1530 DOI 10.17487/RFC8665, December 2019, 1531 . 1533 [RFC8667] Previdi, S., Ed., Ginsberg, L., Ed., Filsfils, C., 1534 Bashandy, A., Gredler, H., and B. Decraene, "IS-IS 1535 Extensions for Segment Routing", RFC 8667, 1536 DOI 10.17487/RFC8667, December 2019, 1537 . 1539 12.2. Informative References 1541 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 1542 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 1543 . 1545 [RFC8792] Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, 1546 "Handling Long Lines in Content of Internet-Drafts and 1547 RFCs", RFC 8792, DOI 10.17487/RFC8792, June 2020, 1548 . 1550 Appendix A. Configuration examples 1552 Note: '\' line wrapping per [RFC8792]. 1554 A.1. SR MPLS with IPv4 1556 The following is an XML example using the SR MPLS YANG modules with 1557 IPv4 addresses. 1559 1560 1562 1564 1565 5 1566 1567 1568 1569 1570 mapping 1 1571 1572 1573 198.51.100.0/24 1574 \ 1576 sr-cmn:prefix-sid-algorithm-shortest-path\ 1577 1578 200 1579 100 1580 1581 1582 1583 1584 1585 1586 192.0.2.0/24 1587 \ 1589 sr-cmn:prefix-sid-algorithm-strict-spf 1590 100 1591 1 1592 php 1593 1594 1595 1596 1597 1598 45000 1599 55000 1600 1601 1602 1603 1604 1605 The following is the same example using JSON format. 1607 { 1608 "ietf-routing:routing": { 1609 "ietf-segment-routing:segment-routing": { 1610 "ietf-segment-routing-mpls:sr-mpls": { 1611 "msd": { 1612 "node-msd": 5 1613 }, 1614 "bindings": { 1615 "mapping-server": { 1616 "policy": [ 1617 { 1618 "name": "mapping 1", 1619 "entries": { 1620 "mapping-entry": [ 1621 { 1622 "prefix": "198.51.100.0/24", 1623 "algorithm": "ietf-segment-routing-common:\ 1624 prefix-sid-algorithm-shortest-path", 1625 "start-sid": 200, 1626 "range": 100 1627 } 1628 ] 1629 } 1630 } 1631 ] 1632 }, 1633 "connected-prefix-sid-map": { 1634 "connected-prefix-sid": [ 1635 { 1636 "prefix": "192.0.2.0/24", 1637 "algorithm": "ietf-segment-routing-common:\ 1638 prefix-sid-algorithm-strict-spf", 1639 "start-sid": 100, 1640 "range": 1, 1641 "last-hop-behavior": "php" 1642 } 1643 ] 1644 } 1645 }, 1646 "global-srgb": { 1647 "srgb": [ 1648 { 1649 "lower-bound": 45000, 1650 "upper-bound": 55000 1651 } 1652 ] 1654 } 1655 } 1656 } 1657 } 1658 } 1660 A.2. SR MPLS with IPv6 1662 The following is an XML example using the SR MPLS YANG modules with 1663 IPv6 addresses. 1665 1666 1668 1670 1671 5 1672 1673 1674 1675 1676 mapping 1 1677 1678 1679 2001:db8:aaaa:bbbb::/64 1680 \ 1682 sr-cmn:prefix-sid-algorithm-shortest-path\ 1683 1684 200 1685 100 1686 1687 1688 1689 1690 1691 1692 2001:db8:aaaa:cccc::/64 1693 \ 1695 sr-cmn:prefix-sid-algorithm-strict-spf 1696 100 1697 1 1698 php 1699 1700 1701 1702 1703 1704 45000 1705 55000 1706 1707 1708 1709 1710 1711 The following is the same example using JSON format. 1713 { 1714 "ietf-routing:routing": { 1715 "ietf-segment-routing:segment-routing": { 1716 "ietf-segment-routing-mpls:sr-mpls": { 1717 "msd": { 1718 "node-msd": 5 1719 }, 1720 "bindings": { 1721 "mapping-server": { 1722 "policy": [ 1723 { 1724 "name": "mapping 1", 1725 "entries": { 1726 "mapping-entry": [ 1727 { 1728 "prefix": "2001:db8:aaaa:bbbb::/64", 1729 "algorithm": "ietf-segment-routing-common:\ 1730 prefix-sid-algorithm-shortest-path", 1731 "start-sid": 200, 1732 "range": 100 1733 } 1734 ] 1735 } 1736 } 1737 ] 1738 }, 1739 "connected-prefix-sid-map": { 1740 "connected-prefix-sid": [ 1741 { 1742 "prefix": "2001:db8:aaaa:cccc::/64", 1743 "algorithm": "ietf-segment-routing-common:\ 1744 prefix-sid-algorithm-strict-spf", 1745 "start-sid": 100, 1746 "range": 1, 1747 "last-hop-behavior": "php" 1748 } 1749 ] 1750 } 1751 }, 1752 "global-srgb": { 1753 "srgb": [ 1754 { 1755 "lower-bound": 45000, 1756 "upper-bound": 55000 1757 } 1758 ] 1760 } 1761 } 1762 } 1763 } 1764 } 1766 Authors' Addresses 1768 Stephane Litkowski 1769 Cisco Systems 1771 Email: slitkows.ietf@gmail.com 1773 Yingzhen Qu 1774 Futurewei 1776 Email: yingzhen.qu@futurewei.com 1778 Acee Lindem 1779 Cisco Systems 1780 301 Mindenhall Way 1781 Cary, NC 27513 1782 US 1784 Email: acee@cisco.com 1786 Pushpasis Sarkar 1787 Individual 1789 Email: pushpasis.ietf@gmail.com 1791 Jeff Tantsura 1792 Apstra 1794 Email: jefftant.ietf@gmail.com