idnits 2.17.1 draft-ietf-spring-sr-yang-22.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 158 has weird spacing: '...terface if:...' == Line 188 has weird spacing: '...r-bound uin...' == Line 189 has weird spacing: '...r-bound uin...' == Line 192 has weird spacing: '...r-bound uin...' == Line 193 has weird spacing: '...r-bound uin...' == (1 more instance...) -- The document date (August 26, 2020) is 1337 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: February 27, 2021 Futurewei 6 A. Lindem 7 Cisco Systems 8 P. Sarkar 9 Individual 10 J. Tantsura 11 Apstra 12 August 26, 2020 14 YANG Data Model for Segment Routing 15 draft-ietf-spring-sr-yang-22 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 February 27, 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 . . . . . . . . . . . . . . . . . . . . . . 28 80 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 81 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 82 12.1. Normative References . . . . . . . . . . . . . . . . . . 29 83 12.2. Informative References . . . . . . . . . . . . . . . . . 32 84 Appendix A. Configuration example . . . . . . . . . . . . . . . 32 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 87 1. Introduction 89 This document defines a YANG data model [RFC7950] for segment routing 90 [RFC8402] configuration and operation. The document also defines a 91 YANG model that is intended to be used on network elements to 92 configure or operate segment routing MPLS data plane [RFC8660]. This 93 document does not define the IGP extensions to support segment 94 routing but defines generic groupings that SHOULD be reused by IGP 95 extension modules. The reason of this design choice is to not 96 require implementations to support all IGP extensions. For example, 97 an implementation may support IS-IS extension but not OSPF. 99 The YANG modules in this document conform to the Network Management 100 Datastore Architecture (NMDA) [RFC8342]. 102 2. Terminology and Notation 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 106 "OPTIONAL" in this document are to be interpreted as described in BCP 107 14 [RFC2119] [RFC8174] when, and only when, they appear in all 108 capitals, as shown here. 110 2.1. Tree diagram 112 Tree diagrams used in this document follow the notation defined in 113 [RFC8340]. 115 2.2. Prefixes in Data Node Names 117 In this document, names of data nodes, actions, and other data model 118 objects are often used without a prefix, as long as it is clear from 119 the context in which YANG module each name is defined. Otherwise, 120 names are prefixed using the standard prefix associated with the 121 corresponding YANG module, as shown in Table 1. 123 +----------+--------------------+-----------+ 124 | Prefix | YANG module | Reference | 125 +----------+--------------------+-----------+ 126 | if | ietf-interfaces | [RFC8343] | 127 | rt | ietf-routing | [RFC8349] | 128 | rt-types | ietf-routing-types | [RFC8294] | 129 | yang | ietf-yang-types | [RFC6991] | 130 | inet | ietf-inet-types | [RFC6991] | 131 +----------+--------------------+-----------+ 133 Table 1: Prefixes and Corresponding YANG Modules 135 3. Design of the Data Model 137 Module ietf-segment-routing augments the routing container in the 138 ietf-routing model [RFC8349], and defines generic segment routing 139 configuration and operational state. This module is augmented by 140 modules supporting different data planes. 142 Module ietf-segment-routing-mpls augments ietf-segment-routing, and 143 supports SR MPLS data plane configuration and operational state. 145 module: ietf-segment-routing 146 augment /rt:routing: 147 +--rw segment-routing 149 module: ietf-segment-routing-mpls 150 augment /rt:routing/sr:segment-routing: 151 +--rw sr-mpls 152 +--ro node-capabilities 153 | +--ro entropy-readable-label-depth? uint8 154 +--rw msd {max-sid-depth}? 155 | +--rw node-msd? uint8 156 | +--rw link-msd 157 | +--rw link-msds* [interface] 158 | +--rw interface if:interface-ref 159 | +--rw msd? uint8 160 +--rw bindings 161 | +--rw mapping-server {mapping-server}? 162 | | +--rw policy* [name] 163 | | +--rw name string 164 | | +--rw entries 165 | | +--rw mapping-entry* [prefix algorithm] 166 | | +--rw prefix inet:ip-prefix 167 | | +--rw value-type? enumeration 168 | | +--rw start-sid uint32 169 | | +--rw range? uint32 170 | | +--rw algorithm identityref 171 | +--rw connected-prefix-sid-map 172 | | +--rw connected-prefix-sid* [prefix algorithm] 173 | | +--rw prefix inet:ip-prefix 174 | | +--rw value-type? enumeration 175 | | +--rw start-sid uint32 176 | | +--rw range? uint32 177 | | +--rw algorithm identityref 178 | | +--rw last-hop-behavior? enumeration 179 | +--rw local-prefix-sid 180 | +--rw local-prefix-sid* [prefix algorithm] 181 | +--rw prefix inet:ip-prefix 182 | +--rw value-type? enumeration 183 | +--rw start-sid uint32 184 | +--rw range? uint32 185 | +--rw algorithm identityref 186 +--rw global-srgb 187 | +--rw srgb* [lower-bound upper-bound] 188 | +--rw lower-bound uint32 189 | +--rw upper-bound uint32 190 +--rw srlb 191 | +--rw srlb* [lower-bound upper-bound] 192 | +--rw lower-bound uint32 193 | +--rw upper-bound uint32 194 +--ro label-blocks* [] 195 | +--ro lower-bound? uint32 196 | +--ro upper-bound? uint32 197 | +--ro size? uint32 198 | +--ro free? uint32 199 | +--ro used? uint32 200 | +--ro scope? enumeration 201 +--ro sid-db 202 +--ro sid* [target sid source source-protocol binding-type] 203 +--ro target string 204 +--ro sid uint32 205 +--ro algorithm? uint8 206 +--ro source inet:ip-address 207 +--ro used? boolean 208 +--ro source-protocol -> /rt:routing 209 /control-plane-protocols 210 /control-plane-protocol/name 211 +--ro binding-type enumeration 212 +--ro scope? enumeration 214 notifications: 215 +---n segment-routing-global-srgb-collision 216 | +--ro srgb-collisions* [] 217 | +--ro lower-bound? uint32 218 | +--ro upper-bound? uint32 219 | +--ro routing-protocol? -> /rt:routing 220 | /control-plane-protocols 221 | /control-plane-protocol/name 222 | +--ro originating-rtr-id? router-id 223 +---n segment-routing-global-sid-collision 224 | +--ro received-target? string 225 | +--ro new-sid-rtr-id? router-id 226 | +--ro original-target? string 227 | +--ro original-sid-rtr-id? router-id 228 | +--ro index? uint32 229 | +--ro routing-protocol? -> /rt:routing 230 | /control-plane-protocols 231 | /control-plane-protocol/name 232 +---n segment-routing-index-out-of-range 233 +--ro received-target? string 234 +--ro received-index? uint32 235 +--ro routing-protocol? -> /rt:routing 236 /control-plane-protocols 237 /control-plane-protocol/name 239 4. Configuration 241 The module ietf-segment-routing-mpls augments the "/rt:routing/ 242 sr:segment-routing:" with a sr-mpls container. This container 243 defines all the configuration parameters related to segment-routing 244 MPLS data plane. 246 The sr-mpls configuration is split in global configuration and 247 interface configuration. 249 The global configuration includes : 251 o bindings : Defines prefix to SID mappings. The operator can 252 control advertisement of Prefix-SID independently for IPv4 and 253 IPv6. Two types of mappings are available: 255 * Mapping-server : maps non local prefixes to a segment ID. 256 Configuration of bindings does not automatically allow 257 advertisement of those bindings. Advertisement must be 258 controlled by each routing-protocol instance (see Section 5). 259 Multiple mapping policies may be defined. 261 * Connected prefixes : maps connected prefixes to a segment ID. 262 Advertisement of the mapping will be done by IGP when enabled 263 for segment routing (see Section 5). The SID value can be 264 expressed as an index (default), or an absolute value. The 265 "last-hop-behavior" configuration dictates the PHP behavior: 266 "explicit-null", "php", or "non-php". 268 o SRGB (Segment Routing Global Block): Defines a list of label 269 blocks represented by a pair of lower-bound/upper-bound labels. 270 The SRGB is also agnostic to the control plane used. So all 271 routing-protocol instance will have to advertise the same SRGB. 273 o SRLB (Segment Routing Local Block): Defines a list of label blocks 274 represented by a pair of lower-bound/upper-bound labels, reserved 275 for lcoal SIDs. 277 5. IGP Control plane configuration 279 Support of segment-routing extensions for a particular IGP control 280 plane is done by augmenting routing-protocol configuration with 281 segment-routing extensions. This augmentation SHOULD be part of 282 separate YANG modules in order to not create any dependency for 283 implementations to support all protocol extensions. 285 This module defines groupings that SHOULD be used by IGP segment 286 routing modules. 288 The "controlplane-cfg" grouping defines the generic global 289 configuration for the IGP. 291 The "enabled" leaf enables segment-routing extensions for the 292 routing-protocol instance. 294 The "bindings" container controls the routing-protocol instance's 295 advertisement of local bindings and the processing of received 296 bindings. 298 5.1. IGP interface configuration 300 The interface configuration is part of the "igp-interface-cfg" 301 grouping and includes Adjacency SID properties. 303 5.1.1. Adjacency SID properties 305 5.1.1.1. Bundling 307 In case of parallel IP links between routers, an additional Adjacency 308 SID [RFC8402] may be advertised representing more than one adjacency 309 (i.e., a bundle of adjacencies). The "advertise-adj-group-sid" 310 configuration controls whether or not an additional adjacency SID is 311 advertised. 313 The "advertise-adj-group-sid" is a list of "group-id". The "group- 314 id" will identify interfaces that are bundled together. 316 +-------+ +------+ 317 | | ------- L1 ---- | | 318 | R1 | ------- L2 ---- | R2 | 319 | | ------- L3 ---- | | 320 | | ------- L4 ---- | | 321 +-------+ +------+ 323 In the figure above, R1 and R2 are interconnected by four links. A 324 routing protocol adjacency is established on each link. Operator 325 would like to create segment-routing Adj-SID that represent some 326 bundles of links. We can imagine two different bundles : L1/L2 and 327 L3/L4. To achieve this behavior, the service provider will configure 328 a "group-id" X for both interfaces L1 and L2 and a "group-id" Y for 329 both interfaces L3 and L4. This will result in R1 advertising an 330 additional Adj-SID for each adjacency, for example a Adj-SID with S 331 flag set and value of 400 will be added to L1 and L2. A Adj-SID with 332 S flag set and value of 500 will be added to L3 and L4. As L1/L2 and 333 L3/L4 does not share the same "group-id", a different SID value will 334 be allocated. 336 5.1.1.2. Protection 338 The "advertise-protection" defines how protection for an interface is 339 advertised. It does not control the activation or deactivation of 340 protection. If the "single" option is used, a single Adj-SID will be 341 advertised for the interface. If the interface is protected, the 342 B-Flag for the Adj-SID advertisement will be set. If the "dual" 343 option is used and if the interface is protected, two Adj-SIDs will 344 be advertised for the interface adjacencies. One Adj-SID will always 345 have the B-Flag set and the other will have the B-Flag clear. This 346 option is intended to be used in the case of traffic engineering 347 where a path must use either protected segments or non-protected 348 segments. 350 6. State Data 352 The operational states contains information reflecting the usage of 353 allocated SRGB labels. 355 It also includes a list of all global SIDs, their associated 356 bindings, and other information such as the source protocol and 357 algorithm. 359 7. Notifications 361 The model defines the following notifications for segment-routing. 363 o segment-routing-global-srgb-collision: Raised when a control plane 364 advertised SRGB blocks have conflicts. 366 o segment-routing-global-sid-collision: Raised when a control plane 367 advertised index is already associated with another target (in 368 this version, the only defined targets are IPv4 and IPv6 369 prefixes). 371 o segment-routing-index-out-of-range: Raised when a control plane 372 advertised index fall outside the range of SRGBs configured for 373 the network device. 375 8. YANG Modules 377 There are three YANG modules included in this document. 379 The following RFCs and drafts are not referenced in the document text 380 but are referenced in the ietf-segment-routing-common.yang and/or 381 ietf-segment-routing.yang module: [RFC6991], [RFC8294], [RFC8476], 382 [RFC8491], [RFC8665], and [RFC8667]. 384 8.1. YANG Module for Segment Routing 386 ietf-segment-routing.yang: This module defines a generic framework 387 for Segment Routing, and it is to be augmented by models for 388 different SR data planes. 390 file "ietf-segment-routing@2020-08-17.yang" 391 module ietf-segment-routing { 392 yang-version 1.1; 393 namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing"; 394 prefix sr; 396 import ietf-routing { 397 prefix rt; 398 reference "RFC 8349: A YANG Data Model for Routing 399 Management (NMDA Version)"; 400 } 402 organization 403 "IETF SPRING - SPRING Working Group"; 404 contact 405 "WG Web: 406 WG List: 408 Author: Stephane Litkowski 409 410 Author: Yingzhen Qu 411 412 Author: Acee Lindem 413 414 Author: Pushpasis Sarkar 415 416 Author: Jeff Tantsura 417 419 "; 420 description 421 "The YANG module defines a generic framework for Segment 422 Routing. It is to be augmented by models for different 423 SR data planes. 425 This YANG model conforms to the Network Management 426 Datastore Architecture (NMDA) as described in RFC 8242. 428 Copyright (c) 2020 IETF Trust and the persons identified as 429 authors of the code. All rights reserved. 431 Redistribution and use in source and binary forms, with or 432 without modification, is permitted pursuant to, and subject 433 to the license terms contained in, the Simplified BSD License 434 set forth in Section 4.c of the IETF Trust's Legal Provisions 435 Relating to IETF Documents 436 (http://trustee.ietf.org/license-info). 438 This version of this YANG module is part of RFC XXXX; 439 see the RFC itself for full legal notices. 441 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 442 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 443 'MAY', and 'OPTIONAL' in this document are to be interpreted as 444 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 445 they appear in all capitals, as shown here."; 447 reference "RFC XXXX"; 449 revision 2020-08-17 { 450 description 451 "Initial Version"; 452 reference "RFC XXXX: YANG Data Model for Segment Routing."; 453 } 455 augment "/rt:routing" { 456 description 457 "This module augments routing data model (RFC 8349) 458 with Segment Routing (SR)."; 459 container segment-routing { 460 description 461 "Segment Routing configuration. This container 462 is to be augmented by models for different SR 463 data planes."; 464 reference "RFC 8402: Segment Routing Architecture."; 465 } 466 } 467 } 468 470 8.2. YANG Module for Segment Routing Common Types 472 ietf-segment-routing-common.yang: This module defines a collection of 473 generic types and groupings for SR as defined in [RFC8402]. 475 file "ietf-segment-routing-common@2020-08-17.yang" 476 module ietf-segment-routing-common { 477 yang-version 1.1; 478 namespace 479 "urn:ietf:params:xml:ns:yang:ietf-segment-routing-common"; 480 prefix sr-cmn; 482 import ietf-inet-types { 483 prefix inet; 484 reference "RFC 6991: Common YANG Data Types"; 485 } 487 organization 488 "IETF SPRING - SPRING Working Group"; 490 contact 491 "WG Web: 492 WG List: 494 Author: Stephane Litkowski 495 496 Author: Yingzhen Qu 497 498 Author: Acee Lindem 499 500 Author: Pushpasis Sarkar 501 502 Author: Jeff Tantsura 503 505 "; 506 description 507 "The YANG module defines a collection of generic types and 508 groupings for Segment Routing (SR) as described in RFC 8402. 510 This YANG model conforms to the Network Management 511 Datastore Architecture (NMDA) as described in RFC 8242. 513 Copyright (c) 2020 IETF Trust and the persons identified as 514 authors of the code. All rights reserved. 516 Redistribution and use in source and binary forms, with or 517 without modification, is permitted pursuant to, and subject 518 to the license terms contained in, the Simplified BSD License 519 set forth in Section 4.c of the IETF Trust's Legal Provisions 520 Relating to IETF Documents 521 (http://trustee.ietf.org/license-info). 523 This version of this YANG module is part of RFC XXXX; 524 see the RFC itself for full legal notices. 526 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 527 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 528 'MAY', and 'OPTIONAL' in this document are to be interpreted as 529 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 530 they appear in all capitals, as shown here."; 532 reference "RFC XXXX"; 534 revision 2020-08-17 { 535 description 536 "Initial version"; 537 reference "RFC XXXX: YANG Data Model for Segment Routing."; 538 } 540 feature sid-last-hop-behavior { 541 description 542 "Configurable last hop behavior."; 543 reference "RFC 8660: Segment Routing with the MPLS Data Plane"; 544 } 546 identity prefix-sid-algorithm { 547 description 548 "Base identity for prefix-sid algorithm."; 549 reference "RFC 8402: Segment Routing Architecture"; 550 } 552 identity prefix-sid-algorithm-shortest-path { 553 base prefix-sid-algorithm; 554 description 555 "Shortest Path First (SPF) prefix-sid algorithm. This 556 is the default algorithm."; 557 } 559 identity prefix-sid-algorithm-strict-spf { 560 base prefix-sid-algorithm; 561 description 562 "This algorithm mandates that the packet is forwarded 563 according to ECMP-aware SPF algorithm."; 564 } 566 grouping srlr { 567 description 568 "Grouping for SR Label Range configuration."; 569 leaf lower-bound { 570 type uint32; 571 description 572 "Lower value in the label range."; 573 } 574 leaf upper-bound { 575 type uint32; 576 must "../lower-bound < ../upper-bound" { 577 error-message 578 "The upper-bound must be larger than the lower-bound."; 579 description 580 "The value must be greater than 'lower-bound'."; 581 } 582 description 583 "Upper value in the label range."; 584 } 585 } 587 grouping srgb { 588 description 589 "Grouping for SR Global Label range."; 590 list srgb { 591 key "lower-bound upper-bound"; 592 ordered-by user; 593 description 594 "List of global blocks to be advertised."; 595 uses srlr; 596 } 597 } 599 grouping srlb { 600 description 601 "Grouping for SR Local Block range."; 602 list srlb { 603 key "lower-bound upper-bound"; 604 ordered-by user; 605 description 606 "List of SRLBs."; 607 uses srlr; 608 } 609 } 611 grouping sid-value-type { 612 description 613 "Defines how the SID value is expressed."; 614 leaf value-type { 615 type enumeration { 616 enum "index" { 617 description 618 "The value will be interpreted as an index."; 619 } 620 enum "absolute" { 621 description 622 "The value will become interpreted as an absolute 623 value."; 624 } 625 } 626 default "index"; 627 description 628 "This leaf defines how value must be interpreted."; 629 } 630 } 632 grouping prefix-sid { 633 description 634 "This grouping defines cfg of prefix SID."; 635 leaf prefix { 636 type inet:ip-prefix; 637 description 638 "connected prefix sid."; 639 } 640 uses prefix-sid-attributes; 641 } 643 grouping ipv4-sid { 644 description 645 "Grouping for an IPv4 prefix SID."; 646 leaf prefix { 647 type inet:ipv4-prefix; 648 description 649 "Connected IPv4 prefix sid."; 650 } 651 uses prefix-sid-attributes; 652 } 653 grouping ipv6-sid { 654 description 655 "Grouping for an IPv6 prefix SID."; 656 leaf prefix { 657 type inet:ipv6-prefix; 658 description 659 "Connected ipv6 prefix sid."; 660 } 661 uses prefix-sid-attributes; 662 } 664 grouping last-hop-behavior { 665 description 666 "Defines last hop behavior"; 667 leaf last-hop-behavior { 668 if-feature "sid-last-hop-behavior"; 669 type enumeration { 670 enum "explicit-null" { 671 description 672 "Use explicit-null for the SID."; 673 } 674 enum "no-php" { 675 description 676 "Do not use Penultimate Hop Popping (PHP) 677 for the SID."; 678 } 679 enum "php" { 680 description 681 "Use PHP for the SID."; 682 } 683 } 684 description 685 "Configure last hop behavior."; 686 } 687 } 689 grouping node-capabilities { 690 description 691 "Containing SR node capabilities."; 692 container node-capabilities { 693 config false; 694 description 695 "Shows the SR capability of the node."; 696 leaf entropy-readable-label-depth { 697 type uint8; 698 description 699 "Maximum label stack depth that a router can read."; 700 } 701 } 702 } 704 grouping prefix-sid-attributes { 705 description 706 "Grouping for Segment Routing (SR) prefix attributes."; 707 uses sid-value-type; 708 leaf start-sid { 709 type uint32; 710 mandatory true; 711 description 712 "Value associated with prefix. The value must be 713 interpreted in the context of value-type."; 714 } 715 leaf range { 716 type uint32; 717 description 718 "Indicates how many SIDs can be allocated."; 720 } 721 leaf algorithm { 722 type identityref { 723 base prefix-sid-algorithm; 724 } 725 description 726 "Prefix-sid algorithm."; 727 } 728 } 729 } 730 732 8.3. YANG Module for Segment Routing MPLS 734 ietf-segment-routing-mpls.yang: This module defines the configuration 735 and operation states for Segment Routing MPLS data plane. 737 file "ietf-segment-routing-mpls@2020-08-17.yang" 738 module ietf-segment-routing-mpls { 739 yang-version 1.1; 740 namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls"; 741 prefix sr-mpls; 743 import ietf-inet-types { 744 prefix inet; 745 reference "RFC 6991: Common YANG Data Types"; 746 } 747 import ietf-routing { 748 prefix rt; 749 reference "RFC 8349: A YANG Data Model for Routing 750 Management (NMDA Version)"; 751 } 752 import ietf-interfaces { 753 prefix if; 754 reference "RFC 8343: A YANG Data Model for Interface 755 Management (NMDA Version)"; 756 } 757 import ietf-routing-types { 758 prefix rt-types; 759 reference "RFC 8294: Common YANG Data Types for the 760 Routing Area"; 761 } 762 import ietf-segment-routing { 763 prefix sr; 764 } 765 import ietf-segment-routing-common { 766 prefix sr-cmn; 767 } 768 organization 769 "IETF SPRING - SPRING Working Group"; 770 contact 771 "WG Web: 772 WG List: 774 Author: Stephane Litkowski 775 776 Author: Yingzhen Qu 777 778 Author: Acee Lindem 779 780 Author: Pushpasis Sarkar 781 782 Author: Jeff Tantsura 783 785 "; 786 description 787 "The YANG module defines a generic configuration model for 788 Segment Routing MPLS data plane. 790 This YANG model conforms to the Network Management 791 Datastore Architecture (NMDA) as described in RFC 8242. 793 Copyright (c) 2020 IETF Trust and the persons identified as 794 authors of the code. All rights reserved. 796 Redistribution and use in source and binary forms, with or 797 without modification, is permitted pursuant to, and subject 798 to the license terms contained in, the Simplified BSD License 799 set forth in Section 4.c of the IETF Trust's Legal Provisions 800 Relating to IETF Documents 801 (http://trustee.ietf.org/license-info). 803 This version of this YANG module is part of RFC XXXX; 804 see the RFC itself for full legal notices. 806 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 807 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 808 'MAY', and 'OPTIONAL' in this document are to be interpreted as 809 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 810 they appear in all capitals, as shown here."; 812 reference "RFC XXXX"; 814 revision 2020-08-17 { 815 description 816 "Initial Version"; 817 reference "RFC XXXX: YANG Data Model for Segment Routing."; 818 } 820 feature mapping-server { 821 description 822 "Support for Segment Routing Mapping Server (SRMS)."; 823 reference "RFC 8661: Segment Routing MPLS Interworking with LDP"; 824 } 826 feature protocol-srgb { 827 description 828 "Support for per-protocol Segment Routing Global Block 829 (SRGB) configuration."; 830 reference "RFC 8660: Segment Routing with the MPLS Data Plane"; 831 } 833 feature max-sid-depth { 834 description 835 "Support for signaling MSD (Maximum SID Depth) in IGP."; 836 reference "RFC 8476: Signaling Maximum SID Depth (MSD) 837 Using OSPF 838 RFC 8491: Signaling Maximum SID Depth (MSD) 839 Using IS-IS"; 840 } 842 typedef system-id { 843 type string { 844 pattern 845 '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}'; 846 } 847 description 848 "This type defines IS-IS system-id using pattern, 849 An example system-id is 0143.0438.AEF0"; 850 } 852 typedef router-id { 853 type union { 854 type system-id; 855 type rt-types:router-id; 856 } 857 description 858 "OSPF/BGP router-id or ISIS system ID."; 859 } 861 grouping sr-controlplane { 862 description 863 "Defines protocol configuration."; 865 container segment-routing { 866 description 867 "Segment Routing global configuration."; 868 leaf enabled { 869 type boolean; 870 default "false"; 871 description 872 "Enables segment-routing protocol extensions."; 873 } 874 container bindings { 875 if-feature mapping-server; 876 description 877 "Control of binding advertisement and reception."; 878 container advertise { 879 description 880 "Control advertisement of local mappings 881 in binding TLVs."; 882 leaf-list policies { 883 type leafref { 884 path "/rt:routing/sr:segment-routing/sr-mpls:sr-mpls" 885 + "/sr-mpls:bindings/sr-mpls:mapping-server" 886 + "/sr-mpls:policy/sr-mpls:name"; 887 } 888 description 889 "List of binding advertisement policies."; 890 } 891 } 892 leaf receive { 893 type boolean; 894 default "true"; 895 description 896 "Allow the reception and usage of binding TLVs."; 897 } 898 } 899 } 900 } 902 grouping igp-interface { 903 description 904 "Grouping for IGP interface configuration."; 905 container segment-routing { 906 description 907 "Container for SR interface configuration."; 908 container adjacency-sid { 909 description 910 "Adjacency SID configuration."; 911 reference "RFC 8660: Segment Routing with the MPLS 912 Data Plane"; 914 list adj-sids { 915 key "value"; 916 uses sr-cmn:sid-value-type; 917 leaf value { 918 type uint32; 919 description 920 "Value of the Adj-SID."; 921 } 922 leaf protected { 923 type boolean; 924 default false; 925 description 926 "It is used to protect the manual adj-SID."; 927 } 928 leaf weight { 929 type uint8; 930 description 931 "The load-balancing factor over parallel adjacencies."; 932 reference "RFC 8402: Segment Routing Architecture 933 RFC 8665: OSPF Extensions for Segment Routing 934 RFC 8667: IS-IS Extensions for Segment Routing"; 935 } 936 description 937 "List of adj-sid configuration."; 938 } 939 list advertise-adj-group-sid { 940 key "group-id"; 941 description 942 "Control advertisement of S flag. Enable advertisement 943 of a common Adj-SID for parallel links."; 944 leaf group-id { 945 type uint32; 946 description 947 "The value is an internal value to identify a 948 group-ID. Interfaces with the same group-ID will be 949 bundled together."; 950 } 951 } 952 leaf advertise-protection { 953 type enumeration { 954 enum "single" { 955 description 956 "A single Adj-SID is associated with the adjacency 957 and reflects the protection configuration."; 958 } 959 enum "dual" { 960 description 961 "Two Adj-SIDs will be associated with the adjacency 962 if the interface is protected. In this case, will 963 be advertised with backup flag set, the other will 964 be advertised with the backup flag clear. In case 965 protection is not configured, single Adj-SID will 966 be advertised with the backup flag clear."; 967 } 968 } 969 description 970 "If set, the Adj-SID refers to a protected adjacency."; 971 } 972 } 973 } 974 } 976 grouping max-sid-depth { 977 description 978 "Maximum SID Depth (MSD)D configuration grouping."; 979 leaf node-msd { 980 type uint8; 981 description 982 "Node MSD is the lowest MSD supported by the node."; 983 } 984 container link-msd { 985 description 986 "MSD supported by an individual interface."; 987 list link-msds { 988 key "interface"; 989 description 990 "List of link MSDs."; 991 leaf interface { 992 type if:interface-ref; 993 description 994 "Reference to device interface."; 995 } 996 leaf msd { 997 type uint8; 998 description 999 "MSD supported by the interface."; 1000 } 1001 } 1002 } 1003 } 1005 augment "/rt:routing/sr:segment-routing" { 1006 description 1007 "This augments routing data model (RFC 8349) 1008 with Segment Routing (SR)."; 1009 container sr-mpls { 1010 description 1011 "Segment Routing global configuration."; 1012 uses sr-cmn:node-capabilities; 1013 container msd { 1014 if-feature "max-sid-depth"; 1015 description 1016 "MSD configuration."; 1017 uses max-sid-depth; 1018 } 1019 container bindings { 1020 description 1021 "List of bindings."; 1022 container mapping-server { 1023 if-feature "mapping-server"; 1024 description 1025 "Configuration of mapping-server local entries."; 1026 list policy { 1027 key "name"; 1028 description 1029 "List mapping-server policies."; 1030 leaf name { 1031 type string; 1032 description 1033 "Name of the mapping policy."; 1034 } 1035 container entries { 1036 description 1037 "IPv4/IPv6 mapping entries."; 1038 list mapping-entry { 1039 key "prefix algorithm"; 1040 description 1041 "Mapping entries."; 1042 uses sr-cmn:prefix-sid; 1043 } 1044 } 1045 } 1046 } 1047 container connected-prefix-sid-map { 1048 description 1049 "Prefix SID configuration."; 1050 list connected-prefix-sid { 1051 key "prefix algorithm"; 1052 description 1053 "List of prefix SID mapped to IPv4/IPv6 1054 local prefixes."; 1055 uses sr-cmn:prefix-sid; 1056 uses sr-cmn:last-hop-behavior; 1057 } 1059 } 1060 container local-prefix-sid { 1061 description 1062 "Local sid configuration."; 1063 list local-prefix-sid { 1064 key "prefix algorithm"; 1065 description 1066 "List of local IPv4/IPv6 prefix-sids."; 1067 uses sr-cmn:prefix-sid; 1068 } 1069 } 1070 } 1071 container global-srgb { 1072 description 1073 "Global SRGB configuration."; 1074 uses sr-cmn:srgb; 1075 } 1076 container srlb { 1077 description 1078 "Segment Routing Local Block (SRLB) configuration."; 1079 uses sr-cmn:srlb; 1080 } 1082 list label-blocks { 1083 config false; 1084 description 1085 "List of label blocks currently in use."; 1086 leaf lower-bound { 1087 type uint32; 1088 description 1089 "Lower bound of the label block."; 1090 } 1091 leaf upper-bound { 1092 type uint32; 1093 description 1094 "Upper bound of the label block."; 1095 } 1096 leaf size { 1097 type uint32; 1098 description 1099 "Number of indexes in the block."; 1100 } 1101 leaf free { 1102 type uint32; 1103 description 1104 "Number of free indexes in the block."; 1105 } 1106 leaf used { 1107 type uint32; 1108 description 1109 "Number of indexes in use in the block."; 1110 } 1111 leaf scope { 1112 type enumeration { 1113 enum "global" { 1114 description 1115 "Global SID."; 1116 } 1117 enum "local" { 1118 description 1119 "Local SID."; 1120 } 1121 } 1122 description 1123 "Scope of this label block."; 1124 } 1125 } 1126 container sid-db { 1127 config false; 1128 description 1129 "List of prefix and SID associations."; 1130 list sid { 1131 key "target sid source source-protocol binding-type"; 1132 ordered-by system; 1133 description 1134 "SID Binding."; 1135 leaf target { 1136 type string; 1137 description 1138 "Defines the target of the binding. It can be a 1139 prefix or something else."; 1140 } 1141 leaf sid { 1142 type uint32; 1143 description 1144 "Index associated with the prefix."; 1145 } 1146 leaf algorithm { 1147 type uint8; 1148 description 1149 "Algorithm to be used for the prefix SID."; 1150 reference "RFC 8665: OSPF Extensions for Segment Routing 1151 RFC 8667: IS-IS Extensions for Segment Routing"; 1152 } 1153 leaf source { 1154 type inet:ip-address; 1155 description 1156 "IP address of the router that owns the binding."; 1157 } 1158 leaf used { 1159 type boolean; 1160 description 1161 "Indicates if the binding is install in the 1162 forwarding plane."; 1163 } 1164 leaf source-protocol { 1165 type leafref { 1166 path "/rt:routing/rt:control-plane-protocols/" 1167 + "rt:control-plane-protocol/rt:name"; 1168 } 1169 description 1170 "Routing protocol that owns the binding"; 1171 } 1172 leaf binding-type { 1173 type enumeration { 1174 enum "prefix-sid" { 1175 description 1176 "Binding is learned from a prefix SID."; 1177 } 1178 enum "binding-tlv" { 1179 description 1180 "Binding is learned from a binding TLV."; 1181 } 1182 } 1183 description 1184 "Type of binding."; 1185 } 1186 leaf scope { 1187 type enumeration { 1188 enum "global" { 1189 description 1190 "Global SID."; 1191 } 1192 enum "local" { 1193 description 1194 "Local SID."; 1195 } 1196 } 1197 description 1198 "SID scoping."; 1199 } 1200 } 1201 } 1202 } 1204 } 1206 notification segment-routing-global-srgb-collision { 1207 description 1208 "This notification is sent when SRGB blocks received from 1209 routers conflict."; 1210 list srgb-collisions { 1211 description 1212 "List of SRGB blocks that conflict."; 1213 leaf lower-bound { 1214 type uint32; 1215 description 1216 "Lower value in the block."; 1217 } 1218 leaf upper-bound { 1219 type uint32; 1220 description 1221 "Upper value in the block."; 1222 } 1223 leaf routing-protocol { 1224 type leafref { 1225 path "/rt:routing/rt:control-plane-protocols/" 1226 + "rt:control-plane-protocol/rt:name"; 1227 } 1228 description 1229 "Routing protocol reference for SRGB collision."; 1230 } 1231 leaf originating-rtr-id { 1232 type router-id; 1233 description 1234 "Originating Router ID of this SRGB block."; 1235 } 1236 } 1237 } 1238 notification segment-routing-global-sid-collision { 1239 description 1240 "This notification is sent when a new mapping is learned 1241 containing s mapping where the SID is already used. 1242 The notification generation must be throttled with at least 1243 a 5 second gap between notifications."; 1244 leaf received-target { 1245 type string; 1246 description 1247 "Target received in the router advertisement that caused 1248 the SID collision."; 1249 } 1250 leaf new-sid-rtr-id { 1251 type router-id; 1252 description 1253 "Router ID that advertised the conflicting SID."; 1254 } 1255 leaf original-target { 1256 type string; 1257 description 1258 "Target already available in the database with the same SID 1259 as the received target."; 1260 } 1261 leaf original-sid-rtr-id { 1262 type router-id; 1263 description 1264 "Router-ID for the router that originally advertised the 1265 conflicting SID, i.e., the instance in the database."; 1266 } 1267 leaf index { 1268 type uint32; 1269 description 1270 "Value of the index used by two different prefixes."; 1271 } 1272 leaf routing-protocol { 1273 type leafref { 1274 path "/rt:routing/rt:control-plane-protocols/" 1275 + "rt:control-plane-protocol/rt:name"; 1276 } 1277 description 1278 "Routing protocol reference for conflicting SID."; 1279 } 1280 } 1281 notification segment-routing-index-out-of-range { 1282 description 1283 "This notification is sent when a binding is received 1284 containing a segment index which is out of the local 1285 configured ranges. The notification generation must be 1286 throttled with at least a 5 second gap between 1287 notifications."; 1288 leaf received-target { 1289 type string; 1290 description 1291 "Target received in the router advertisement with 1292 the out-of-range index."; 1293 } 1294 leaf received-index { 1295 type uint32; 1296 description 1297 "Value of the index received."; 1298 } 1299 leaf routing-protocol { 1300 type leafref { 1301 path "/rt:routing/rt:control-plane-protocols/" 1302 + "rt:control-plane-protocol/rt:name"; 1303 } 1304 description 1305 "Routing protocol reference for out-of-range indexd."; 1306 } 1307 } 1308 } 1309 1311 9. Security Considerations 1313 The YANG modules specified in this document define a schema for data 1314 that is designed to be accessed via network management protocols such 1315 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 1316 is the secure transport layer, and the mandatory-to-implement secure 1317 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 1318 is HTTPS, and the mandatory-to-implement secure transport is TLS 1319 [RFC5246]. 1321 The NETCONF access control model [RFC6536] provides the means to 1322 restrict access for particular NETCONF or RESTCONF users to a pre- 1323 configured subset of all available NETCONF or RESTCONF protocol 1324 operations and content. 1326 There are a number of data nodes defined in the modules that are 1327 writable/creatable/deletable (i.e., config true, which is the 1328 default). These data nodes may be considered sensitive or vulnerable 1329 in some network environments. Write operations (e.g., edit-config) 1330 to these data nodes without proper protection can have a negative 1331 effect on network operations. 1333 Some of the readable data nodes in the modules may be considered 1334 sensitive or vulnerable in some network environments. It is thus 1335 important to control read access (e.g., via get, get-config, or 1336 notification) to these data nodes. 1338 10. Acknowledgements 1340 Authors would like to thank Derek Yeung, Greg Hankins, Hannes 1341 Gredler, Uma Chunduri, Jeffrey Zhang, Shradda Hedge, Les Ginsberg for 1342 their contributions. 1344 Thanks to Ladislav Lhotka for his thorough reviews and helpful 1345 comments. 1347 11. IANA Considerations 1349 This document registers a URI in the IETF XML registry [RFC3688]. 1350 Following the format in [RFC3688], the following registration is 1351 requested to be made: 1353 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing-commmon 1354 Registrant Contact: The IESG. 1355 XML: N/A, the requested URI is an XML namespace. 1357 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing 1358 Registrant Contact: The IESG. 1359 XML: N/A, the requested URI is an XML namespace. 1361 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls 1362 Registrant Contact: The IESG. 1363 XML: N/A, the requested URI is an XML namespace. 1365 This document registers a YANG module in the YANG Module Names 1366 registry [RFC6020]. 1368 name: ietf-segment-routing-common 1369 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing-common 1370 prefix: sr-cmn 1371 reference: RFC XXXX 1373 name: ietf-segment-routing 1374 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing 1375 prefix: sr 1376 reference: RFC XXXX 1378 name: ietf-segment-routing 1379 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls 1380 prefix: sr-mpls 1381 reference: RFC XXXX 1383 12. References 1385 12.1. Normative References 1387 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1388 Requirement Levels", BCP 14, RFC 2119, 1389 DOI 10.17487/RFC2119, March 1997, 1390 . 1392 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1393 DOI 10.17487/RFC3688, January 2004, 1394 . 1396 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1397 (TLS) Protocol Version 1.2", RFC 5246, 1398 DOI 10.17487/RFC5246, August 2008, 1399 . 1401 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1402 the Network Configuration Protocol (NETCONF)", RFC 6020, 1403 DOI 10.17487/RFC6020, October 2010, 1404 . 1406 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1407 and A. Bierman, Ed., "Network Configuration Protocol 1408 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1409 . 1411 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 1412 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 1413 . 1415 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 1416 Protocol (NETCONF) Access Control Model", RFC 6536, 1417 DOI 10.17487/RFC6536, March 2012, 1418 . 1420 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1421 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1422 . 1424 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1425 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1426 . 1428 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 1429 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 1430 . 1432 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1433 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1434 May 2017, . 1436 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 1437 "Common YANG Data Types for the Routing Area", RFC 8294, 1438 DOI 10.17487/RFC8294, December 2017, 1439 . 1441 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 1442 and R. Wilton, "Network Management Datastore Architecture 1443 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 1444 . 1446 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 1447 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 1448 . 1450 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 1451 Routing Management (NMDA Version)", RFC 8349, 1452 DOI 10.17487/RFC8349, March 2018, 1453 . 1455 [RFC8402] Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., 1456 Decraene, B., Litkowski, S., and R. Shakir, "Segment 1457 Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, 1458 July 2018, . 1460 [RFC8476] Tantsura, J., Chunduri, U., Aldrin, S., and P. Psenak, 1461 "Signaling Maximum SID Depth (MSD) Using OSPF", RFC 8476, 1462 DOI 10.17487/RFC8476, December 2018, 1463 . 1465 [RFC8491] Tantsura, J., Chunduri, U., Aldrin, S., and L. Ginsberg, 1466 "Signaling Maximum SID Depth (MSD) Using IS-IS", RFC 8491, 1467 DOI 10.17487/RFC8491, November 2018, 1468 . 1470 [RFC8660] Bashandy, A., Ed., Filsfils, C., Ed., Previdi, S., 1471 Decraene, B., Litkowski, S., and R. Shakir, "Segment 1472 Routing with the MPLS Data Plane", RFC 8660, 1473 DOI 10.17487/RFC8660, December 2019, 1474 . 1476 [RFC8665] Psenak, P., Ed., Previdi, S., Ed., Filsfils, C., Gredler, 1477 H., Shakir, R., Henderickx, W., and J. Tantsura, "OSPF 1478 Extensions for Segment Routing", RFC 8665, 1479 DOI 10.17487/RFC8665, December 2019, 1480 . 1482 [RFC8667] Previdi, S., Ed., Ginsberg, L., Ed., Filsfils, C., 1483 Bashandy, A., Gredler, H., and B. Decraene, "IS-IS 1484 Extensions for Segment Routing", RFC 8667, 1485 DOI 10.17487/RFC8667, December 2019, 1486 . 1488 12.2. Informative References 1490 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 1491 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 1492 . 1494 [RFC8792] Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, 1495 "Handling Long Lines in Content of Internet-Drafts and 1496 RFCs", RFC 8792, DOI 10.17487/RFC8792, June 2020, 1497 . 1499 Appendix A. Configuration example 1501 Note: '\' line wrapping per [RFC8792]. 1503 The following is an XML example using the SR MPLS YANG modules. 1505 1506 1508 1510 1511 5 1512 1513 1514 1515 1516 mapping 1 1517 1518 1519 198.51.100.0/24 1520 \ 1522 sr-cmn:prefix-sid-algorithm-shortest-path\ 1523 1524 200 1525 100 1526 1527 1528 1529 1530 1531 1532 192.0.2.0/24 1533 \ 1535 sr-cmn:prefix-sid-algorithm-strict-spf 1536 100 1537 1 1538 php 1539 1540 1541 1542 1543 1544 45000 1545 55000 1546 1547 1548 1549 1550 1551 The following is the same example using JSON format. 1553 { 1554 "ietf-routing:routing": { 1555 "ietf-segment-routing:segment-routing": { 1556 "ietf-segment-routing-mpls:sr-mpls": { 1557 "msd": { 1558 "node-msd": 5 1559 }, 1560 "bindings": { 1561 "mapping-server": { 1562 "policy": [ 1563 { 1564 "name": "mapping 1", 1565 "entries": { 1566 "mapping-entry": [ 1567 { 1568 "prefix": "198.51.100.0/24", 1569 "algorithm": "ietf-segment-routing-common:\ 1570 prefix-sid-algorithm-shortest-path", 1571 "start-sid": 200, 1572 "range": 100 1573 } 1574 ] 1575 } 1576 } 1577 ] 1578 }, 1579 "connected-prefix-sid-map": { 1580 "connected-prefix-sid": [ 1581 { 1582 "prefix": "192.0.2.0/24", 1583 "algorithm": "ietf-segment-routing-common:\ 1584 prefix-sid-algorithm-strict-spf", 1585 "start-sid": 100, 1586 "range": 1, 1587 "last-hop-behavior": "php" 1588 } 1589 ] 1590 } 1591 }, 1592 "global-srgb": { 1593 "srgb": [ 1594 { 1595 "lower-bound": 45000, 1596 "upper-bound": 55000 1597 } 1598 ] 1600 } 1601 } 1602 } 1603 } 1604 } 1606 Authors' Addresses 1608 Stephane Litkowski 1609 Cisco Systems 1611 Email: slitkows.ietf@gmail.com 1613 Yingzhen Qu 1614 Futurewei 1616 Email: yingzhen.qu@futurewei.com 1618 Acee Lindem 1619 Cisco Systems 1620 301 Mindenhall Way 1621 Cary, NC 27513 1622 US 1624 Email: acee@cisco.com 1626 Pushpasis Sarkar 1627 Individual 1629 Email: pushpasis.ietf@gmail.com 1631 Jeff Tantsura 1632 Apstra 1634 Email: jefftant.ietf@gmail.com