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