idnits 2.17.1 draft-ietf-spring-sr-yang-23.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 (November 16, 2020) is 1257 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SPRING Working Group S. Litkowski 3 Internet-Draft Cisco Systems 4 Intended status: Standards Track Y. Qu 5 Expires: May 20, 2021 Futurewei 6 A. Lindem 7 Cisco Systems 8 P. Sarkar 9 Individual 10 J. Tantsura 11 Apstra 12 November 16, 2020 14 YANG Data Model for Segment Routing 15 draft-ietf-spring-sr-yang-23 17 Abstract 19 This document defines a YANG data model for segment routing 20 configuration and operation, which is to be augmented by different 21 segment routing data planes. The document also defines a YANG model 22 that is intended to be used on network elements to configure or 23 operate segment routing MPLS data plane, as well as some generic 24 containers to be reused by IGP protocol modules to support segment 25 routing. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on May 20, 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 local 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 "sr-control-plane" 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" grouping 301 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 contain 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 falls 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-11-16.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-11-16 { 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-11-16 { 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-11-16.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-11-16 { 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 824 with LDP"; 825 } 827 feature protocol-srgb { 828 description 829 "Support for per-protocol Segment Routing Global Block 830 (SRGB) configuration."; 831 reference "RFC 8660: Segment Routing with the MPLS 832 Data Plane"; 833 } 835 feature max-sid-depth { 836 description 837 "Support for signaling MSD (Maximum SID Depth) in IGP."; 838 reference "RFC 8476: Signaling Maximum SID Depth (MSD) 839 Using OSPF 840 RFC 8491: Signaling Maximum SID Depth (MSD) 841 Using IS-IS"; 842 } 844 typedef system-id { 845 type string { 846 pattern 847 '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}'; 848 } 849 description 850 "This type defines IS-IS system-id using pattern, 851 An example system-id is 0143.0438.AEF0"; 852 } 854 typedef router-id { 855 type union { 856 type system-id; 857 type rt-types:router-id; 858 } 859 description 860 "OSPF/BGP router-id or ISIS system ID."; 861 } 863 grouping sr-control-plane { 864 description 865 "Defines protocol configuration."; 866 container segment-routing { 867 description 868 "Segment Routing global configuration."; 869 leaf enabled { 870 type boolean; 871 default "false"; 872 description 873 "Enables segment-routing protocol extensions."; 874 } 875 container bindings { 876 if-feature mapping-server; 877 description 878 "Control of binding advertisement and reception."; 879 container advertise { 880 description 881 "Control advertisement of local mappings 882 in binding TLVs."; 883 leaf-list policies { 884 type leafref { 885 path "/rt:routing/sr:segment-routing/sr-mpls:sr-mpls" 886 + "/sr-mpls:bindings/sr-mpls:mapping-server" 887 + "/sr-mpls:policy/sr-mpls:name"; 888 } 889 description 890 "List of binding advertisement policies."; 891 } 892 } 893 leaf receive { 894 type boolean; 895 default "true"; 896 description 897 "Allow the reception and usage of binding TLVs."; 898 } 899 } 900 } 901 } 903 grouping igp-interface { 904 description 905 "Grouping for IGP interface configuration."; 906 container segment-routing { 907 description 908 "Container for SR interface configuration."; 909 container adjacency-sid { 910 description 911 "Adjacency SID configuration."; 912 reference "RFC 8660: Segment Routing with the MPLS 913 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 935 Routing"; 936 } 937 description 938 "List of adj-sid configuration."; 939 } 940 list advertise-adj-group-sid { 941 key "group-id"; 942 description 943 "Control advertisement of S flag. Enable advertisement 944 of a common Adj-SID for parallel links."; 945 leaf group-id { 946 type uint32; 947 description 948 "The value is an internal value to identify a 949 group-ID. Interfaces with the same group-ID will be 950 bundled together."; 951 } 952 } 953 leaf advertise-protection { 954 type enumeration { 955 enum "single" { 956 description 957 "A single Adj-SID is associated with the adjacency 958 and reflects the protection configuration."; 959 } 960 enum "dual" { 961 description 962 "Two Adj-SIDs will be associated with the adjacency 963 if the interface is protected. In this case, will 964 be advertised with backup flag set, the other will 965 be advertised with the backup flag clear. In case 966 protection is not configured, single Adj-SID will 967 be advertised with the backup flag clear."; 968 } 969 } 970 description 971 "If set, the Adj-SID refers to a protected adjacency."; 972 } 973 } 974 } 975 } 977 grouping max-sid-depth { 978 description 979 "Maximum SID Depth (MSD)D configuration grouping."; 980 leaf node-msd { 981 type uint8; 982 description 983 "Node MSD is the lowest MSD supported by the node."; 984 } 985 container link-msd { 986 description 987 "MSD supported by an individual interface."; 988 list link-msds { 989 key "interface"; 990 description 991 "List of link MSDs."; 992 leaf interface { 993 type if:interface-ref; 994 description 995 "Reference to device interface."; 996 } 997 leaf msd { 998 type uint8; 999 description 1000 "MSD supported by the interface."; 1001 } 1002 } 1003 } 1004 } 1006 augment "/rt:routing/sr:segment-routing" { 1007 description 1008 "This augments routing data model (RFC 8349) 1009 with Segment Routing (SR)."; 1010 container sr-mpls { 1011 description 1012 "Segment Routing global configuration."; 1013 uses sr-cmn:node-capabilities; 1014 container msd { 1015 if-feature "max-sid-depth"; 1016 description 1017 "MSD configuration."; 1018 uses max-sid-depth; 1019 } 1020 container bindings { 1021 description 1022 "List of bindings."; 1023 container mapping-server { 1024 if-feature "mapping-server"; 1025 description 1026 "Configuration of mapping-server local entries."; 1027 list policy { 1028 key "name"; 1029 description 1030 "List mapping-server policies."; 1031 leaf name { 1032 type string; 1033 description 1034 "Name of the mapping policy."; 1035 } 1036 container entries { 1037 description 1038 "IPv4/IPv6 mapping entries."; 1039 list mapping-entry { 1040 key "prefix algorithm"; 1041 description 1042 "Mapping entries."; 1043 uses sr-cmn:prefix-sid; 1044 } 1045 } 1046 } 1047 } 1048 container connected-prefix-sid-map { 1049 description 1050 "Prefix SID configuration."; 1051 list connected-prefix-sid { 1052 key "prefix algorithm"; 1053 description 1054 "List of prefix SID mapped to IPv4/IPv6 1055 local prefixes."; 1057 uses sr-cmn:prefix-sid; 1058 uses sr-cmn:last-hop-behavior; 1059 } 1060 } 1061 container local-prefix-sid { 1062 description 1063 "Local sid configuration."; 1064 list local-prefix-sid { 1065 key "prefix algorithm"; 1066 description 1067 "List of local IPv4/IPv6 prefix-sids."; 1068 uses sr-cmn:prefix-sid; 1069 } 1070 } 1071 } 1072 container global-srgb { 1073 description 1074 "Global SRGB configuration."; 1075 uses sr-cmn:srgb; 1076 } 1077 container srlb { 1078 description 1079 "Segment Routing Local Block (SRLB) configuration."; 1080 uses sr-cmn:srlb; 1081 } 1083 list label-blocks { 1084 config false; 1085 description 1086 "List of label blocks currently in use."; 1087 leaf lower-bound { 1088 type uint32; 1089 description 1090 "Lower bound of the label block."; 1091 } 1092 leaf upper-bound { 1093 type uint32; 1094 description 1095 "Upper bound of the label block."; 1096 } 1097 leaf size { 1098 type uint32; 1099 description 1100 "Number of indexes in the block."; 1101 } 1102 leaf free { 1103 type uint32; 1104 description 1105 "Number of free indexes in the block."; 1106 } 1107 leaf used { 1108 type uint32; 1109 description 1110 "Number of indexes in use in the block."; 1111 } 1112 leaf scope { 1113 type enumeration { 1114 enum "global" { 1115 description 1116 "Global SID."; 1117 } 1118 enum "local" { 1119 description 1120 "Local SID."; 1121 } 1122 } 1123 description 1124 "Scope of this label block."; 1125 } 1126 } 1127 container sid-db { 1128 config false; 1129 description 1130 "List of prefix and SID associations."; 1131 list sid { 1132 key "target sid source source-protocol binding-type"; 1133 ordered-by system; 1134 description 1135 "SID Binding."; 1136 leaf target { 1137 type string; 1138 description 1139 "Defines the target of the binding. It can be a 1140 prefix or something else."; 1141 } 1142 leaf sid { 1143 type uint32; 1144 description 1145 "Index associated with the prefix."; 1146 } 1147 leaf algorithm { 1148 type uint8; 1149 description 1150 "Algorithm to be used for the prefix SID."; 1151 reference "RFC 8665: OSPF Extensions for Segment Routing 1152 RFC 8667: IS-IS Extensions for Segment 1153 Routing"; 1154 } 1155 leaf source { 1156 type inet:ip-address; 1157 description 1158 "IP address of the router that owns the binding."; 1159 } 1160 leaf used { 1161 type boolean; 1162 description 1163 "Indicates if the binding is install in the 1164 forwarding plane."; 1165 } 1166 leaf source-protocol { 1167 type leafref { 1168 path "/rt:routing/rt:control-plane-protocols/" 1169 + "rt:control-plane-protocol/rt:name"; 1170 } 1171 description 1172 "Routing protocol that owns the binding"; 1173 } 1174 leaf binding-type { 1175 type enumeration { 1176 enum "prefix-sid" { 1177 description 1178 "Binding is learned from a prefix SID."; 1179 } 1180 enum "binding-tlv" { 1181 description 1182 "Binding is learned from a binding TLV."; 1183 } 1184 } 1185 description 1186 "Type of binding."; 1187 } 1188 leaf scope { 1189 type enumeration { 1190 enum "global" { 1191 description 1192 "Global SID."; 1193 } 1194 enum "local" { 1195 description 1196 "Local SID."; 1197 } 1198 } 1199 description 1200 "SID scoping."; 1202 } 1203 } 1204 } 1205 } 1206 } 1208 notification segment-routing-global-srgb-collision { 1209 description 1210 "This notification is sent when SRGB blocks received from 1211 routers conflict."; 1212 list srgb-collisions { 1213 description 1214 "List of SRGB blocks that conflict."; 1215 leaf lower-bound { 1216 type uint32; 1217 description 1218 "Lower value in the block."; 1219 } 1220 leaf upper-bound { 1221 type uint32; 1222 description 1223 "Upper value in the block."; 1224 } 1225 leaf routing-protocol { 1226 type leafref { 1227 path "/rt:routing/rt:control-plane-protocols/" 1228 + "rt:control-plane-protocol/rt:name"; 1229 } 1230 description 1231 "Routing protocol reference for SRGB collision."; 1232 } 1233 leaf originating-rtr-id { 1234 type router-id; 1235 description 1236 "Originating Router ID of this SRGB block."; 1237 } 1238 } 1239 } 1240 notification segment-routing-global-sid-collision { 1241 description 1242 "This notification is sent when a new mapping is learned 1243 containing s mapping where the SID is already used. 1244 The notification generation must be throttled with at least 1245 a 5 second gap between notifications."; 1246 leaf received-target { 1247 type string; 1248 description 1249 "Target received in the router advertisement that caused 1250 the SID collision."; 1251 } 1252 leaf new-sid-rtr-id { 1253 type router-id; 1254 description 1255 "Router ID that advertised the conflicting SID."; 1256 } 1257 leaf original-target { 1258 type string; 1259 description 1260 "Target already available in the database with the same SID 1261 as the received target."; 1262 } 1263 leaf original-sid-rtr-id { 1264 type router-id; 1265 description 1266 "Router-ID for the router that originally advertised the 1267 conflicting SID, i.e., the instance in the database."; 1268 } 1269 leaf index { 1270 type uint32; 1271 description 1272 "Value of the index used by two different prefixes."; 1273 } 1274 leaf routing-protocol { 1275 type leafref { 1276 path "/rt:routing/rt:control-plane-protocols/" 1277 + "rt:control-plane-protocol/rt:name"; 1278 } 1279 description 1280 "Routing protocol reference for conflicting SID."; 1281 } 1282 } 1283 notification segment-routing-index-out-of-range { 1284 description 1285 "This notification is sent when a binding is received 1286 containing a segment index which is out of the local 1287 configured ranges. The notification generation must be 1288 throttled with at least a 5 second gap between 1289 notifications."; 1290 leaf received-target { 1291 type string; 1292 description 1293 "Target received in the router advertisement with 1294 the out-of-range index."; 1295 } 1296 leaf received-index { 1297 type uint32; 1298 description 1299 "Value of the index received."; 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 out-of-range indexd."; 1308 } 1309 } 1310 } 1311 1313 9. Security Considerations 1315 The YANG modules specified in this document define a schema for data 1316 that is designed to be accessed via network management protocols such 1317 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 1318 is the secure transport layer, and the mandatory-to-implement secure 1319 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 1320 is HTTPS, and the mandatory-to-implement secure transport is TLS 1321 [RFC5246]. 1323 The NETCONF access control model [RFC6536] provides the means to 1324 restrict access for particular NETCONF or RESTCONF users to a pre- 1325 configured subset of all available NETCONF or RESTCONF protocol 1326 operations and content. 1328 There are a number of data nodes defined in the modules that are 1329 writable/creatable/deletable (i.e., config true, which is the 1330 default). These data nodes may be considered sensitive or vulnerable 1331 in some network environments. Write operations (e.g., edit-config) 1332 to these data nodes without proper protection can have a negative 1333 effect on network operations. 1335 Some of the readable data nodes in the modules may be considered 1336 sensitive or vulnerable in some network environments. It is thus 1337 important to control read access (e.g., via get, get-config, or 1338 notification) to these data nodes. 1340 10. Acknowledgements 1342 Authors would like to thank Derek Yeung, Greg Hankins, Hannes 1343 Gredler, Uma Chunduri, Jeffrey Zhang, Shradda Hedge, Les Ginsberg for 1344 their contributions. 1346 Thanks to Ladislav Lhotka for his thorough reviews and helpful 1347 comments. 1349 11. IANA Considerations 1351 This document registers a URI in the IETF XML registry [RFC3688]. 1352 Following the format in [RFC3688], the following registration is 1353 requested to be made: 1355 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing-commmon 1356 Registrant Contact: The IESG. 1357 XML: N/A, the requested URI is an XML namespace. 1359 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing 1360 Registrant Contact: The IESG. 1361 XML: N/A, the requested URI is an XML namespace. 1363 URI: urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls 1364 Registrant Contact: The IESG. 1365 XML: N/A, the requested URI is an XML namespace. 1367 This document registers a YANG module in the YANG Module Names 1368 registry [RFC6020]. 1370 name: ietf-segment-routing-common 1371 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing-common 1372 prefix: sr-cmn 1373 reference: RFC XXXX 1375 name: ietf-segment-routing 1376 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing 1377 prefix: sr 1378 reference: RFC XXXX 1380 name: ietf-segment-routing 1381 namespace: urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls 1382 prefix: sr-mpls 1383 reference: RFC XXXX 1385 12. References 1387 12.1. Normative References 1389 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1390 Requirement Levels", BCP 14, RFC 2119, 1391 DOI 10.17487/RFC2119, March 1997, 1392 . 1394 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1395 DOI 10.17487/RFC3688, January 2004, 1396 . 1398 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1399 (TLS) Protocol Version 1.2", RFC 5246, 1400 DOI 10.17487/RFC5246, August 2008, 1401 . 1403 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1404 the Network Configuration Protocol (NETCONF)", RFC 6020, 1405 DOI 10.17487/RFC6020, October 2010, 1406 . 1408 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1409 and A. Bierman, Ed., "Network Configuration Protocol 1410 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1411 . 1413 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 1414 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 1415 . 1417 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 1418 Protocol (NETCONF) Access Control Model", RFC 6536, 1419 DOI 10.17487/RFC6536, March 2012, 1420 . 1422 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1423 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1424 . 1426 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1427 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1428 . 1430 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 1431 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 1432 . 1434 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1435 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1436 May 2017, . 1438 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 1439 "Common YANG Data Types for the Routing Area", RFC 8294, 1440 DOI 10.17487/RFC8294, December 2017, 1441 . 1443 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 1444 and R. Wilton, "Network Management Datastore Architecture 1445 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 1446 . 1448 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 1449 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 1450 . 1452 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 1453 Routing Management (NMDA Version)", RFC 8349, 1454 DOI 10.17487/RFC8349, March 2018, 1455 . 1457 [RFC8402] Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., 1458 Decraene, B., Litkowski, S., and R. Shakir, "Segment 1459 Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, 1460 July 2018, . 1462 [RFC8476] Tantsura, J., Chunduri, U., Aldrin, S., and P. Psenak, 1463 "Signaling Maximum SID Depth (MSD) Using OSPF", RFC 8476, 1464 DOI 10.17487/RFC8476, December 2018, 1465 . 1467 [RFC8491] Tantsura, J., Chunduri, U., Aldrin, S., and L. Ginsberg, 1468 "Signaling Maximum SID Depth (MSD) Using IS-IS", RFC 8491, 1469 DOI 10.17487/RFC8491, November 2018, 1470 . 1472 [RFC8660] Bashandy, A., Ed., Filsfils, C., Ed., Previdi, S., 1473 Decraene, B., Litkowski, S., and R. Shakir, "Segment 1474 Routing with the MPLS Data Plane", RFC 8660, 1475 DOI 10.17487/RFC8660, December 2019, 1476 . 1478 [RFC8665] Psenak, P., Ed., Previdi, S., Ed., Filsfils, C., Gredler, 1479 H., Shakir, R., Henderickx, W., and J. Tantsura, "OSPF 1480 Extensions for Segment Routing", RFC 8665, 1481 DOI 10.17487/RFC8665, December 2019, 1482 . 1484 [RFC8667] Previdi, S., Ed., Ginsberg, L., Ed., Filsfils, C., 1485 Bashandy, A., Gredler, H., and B. Decraene, "IS-IS 1486 Extensions for Segment Routing", RFC 8667, 1487 DOI 10.17487/RFC8667, December 2019, 1488 . 1490 12.2. Informative References 1492 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 1493 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 1494 . 1496 [RFC8792] Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, 1497 "Handling Long Lines in Content of Internet-Drafts and 1498 RFCs", RFC 8792, DOI 10.17487/RFC8792, June 2020, 1499 . 1501 Appendix A. Configuration example 1503 Note: '\' line wrapping per [RFC8792]. 1505 The following is an XML example using the SR MPLS YANG modules. 1507 1508 1510 1512 1513 5 1514 1515 1516 1517 1518 mapping 1 1519 1520 1521 198.51.100.0/24 1522 \ 1524 sr-cmn:prefix-sid-algorithm-shortest-path\ 1525 1526 200 1527 100 1528 1529 1530 1531 1532 1533 1534 192.0.2.0/24 1535 \ 1537 sr-cmn:prefix-sid-algorithm-strict-spf 1538 100 1539 1 1540 php 1541 1542 1543 1544 1545 1546 45000 1547 55000 1548 1549 1550 1551 1552 1553 The following is the same example using JSON format. 1555 { 1556 "ietf-routing:routing": { 1557 "ietf-segment-routing:segment-routing": { 1558 "ietf-segment-routing-mpls:sr-mpls": { 1559 "msd": { 1560 "node-msd": 5 1561 }, 1562 "bindings": { 1563 "mapping-server": { 1564 "policy": [ 1565 { 1566 "name": "mapping 1", 1567 "entries": { 1568 "mapping-entry": [ 1569 { 1570 "prefix": "198.51.100.0/24", 1571 "algorithm": "ietf-segment-routing-common:\ 1572 prefix-sid-algorithm-shortest-path", 1573 "start-sid": 200, 1574 "range": 100 1575 } 1576 ] 1577 } 1578 } 1579 ] 1580 }, 1581 "connected-prefix-sid-map": { 1582 "connected-prefix-sid": [ 1583 { 1584 "prefix": "192.0.2.0/24", 1585 "algorithm": "ietf-segment-routing-common:\ 1586 prefix-sid-algorithm-strict-spf", 1587 "start-sid": 100, 1588 "range": 1, 1589 "last-hop-behavior": "php" 1590 } 1591 ] 1592 } 1593 }, 1594 "global-srgb": { 1595 "srgb": [ 1596 { 1597 "lower-bound": 45000, 1598 "upper-bound": 55000 1599 } 1600 ] 1602 } 1603 } 1604 } 1605 } 1606 } 1608 Authors' Addresses 1610 Stephane Litkowski 1611 Cisco Systems 1613 Email: slitkows.ietf@gmail.com 1615 Yingzhen Qu 1616 Futurewei 1618 Email: yingzhen.qu@futurewei.com 1620 Acee Lindem 1621 Cisco Systems 1622 301 Mindenhall Way 1623 Cary, NC 27513 1624 US 1626 Email: acee@cisco.com 1628 Pushpasis Sarkar 1629 Individual 1631 Email: pushpasis.ietf@gmail.com 1633 Jeff Tantsura 1634 Apstra 1636 Email: jefftant.ietf@gmail.com