idnits 2.17.1 draft-raza-spring-srv6-yang-02.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: ---------------------------------------------------------------------------- == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 63 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 33 instances of too long lines in the document, the longest one being 36 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 260 has weird spacing: '...address ine...' == Line 309 has weird spacing: '...pported boo...' == Line 312 has weird spacing: '...pported boo...' == Line 321 has weird spacing: '...pported boo...' == Line 324 has weird spacing: '...pported boo...' == (17 more instances...) == The document doesn't use any RFC 2119 keywords, yet has text resembling RFC 2119 boilerplate text. -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC6536' is defined on line 2884, but no explicit reference was found in the text == Outdated reference: A later version (-07) exists of draft-filsfils-spring-srv6-network-programming-05 ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) == Outdated reference: A later version (-26) exists of draft-ietf-6man-segment-routing-header-14 == Outdated reference: A later version (-24) exists of draft-ietf-dmm-srv6-mobile-uplane-02 == Outdated reference: A later version (-30) exists of draft-ietf-spring-sr-yang-09 Summary: 2 errors (**), 0 flaws (~~), 14 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 SPRING Working Group K. Raza 2 Internet-Draft J. Rajamanickam 3 Intended status: Standards Track Cisco Systems, Inc. 4 Expires: April 25, 2019 6 X. Liu 7 Volta Networks 9 Z. Hu 10 Huawei Technologies 12 I. Hussain 13 Infinera Corporation 15 H. Shah 16 Ciena Corporation 18 D. Voyer 19 Bell Canada 21 H. Elmalky 22 Ericsson 24 S. Matsushima 25 K. Horiba 26 SoftBank 28 A. AbdelSalam 29 Gran Sasso Science Institute, Italy 31 October 22, 2018 33 YANG Data Model for SRv6 Base and Static 34 draft-raza-spring-srv6-yang-02 36 Abstract 38 This document describes a YANG data model for Segment Routing IPv6 39 (SRv6) base. The model serves as a base framework for configuring 40 and managing an SRv6 subsystem and expected to be augmented by other 41 SRv6 technology models accordingly. Additionally, this document also 42 specifies the model for the SRv6 Static application. 44 The YANG modules in this document conform to the Network Management 45 Datastore Architecture (NMDA). 47 Status of This Memo 49 This Internet-Draft is submitted in full conformance with the 50 provisions of BCP 78 and BCP 79. 52 Internet-Drafts are working documents of the Internet Engineering 53 Task Force (IETF). Note that other groups may also distribute 54 working documents as Internet-Drafts. The list of current Internet- 55 Drafts is at https://datatracker.ietf.org/drafts/current/. 57 Internet-Drafts are draft documents valid for a maximum of six months 58 and may be updated, replaced, or obsoleted by other documents at any 59 time. It is inappropriate to use Internet-Drafts as reference 60 material or to cite them other than as "work in progress." 62 This Internet-Draft will expire on April 25, 2019. 64 Copyright Notice 66 Copyright (c) 2018 IETF Trust and the persons identified as the 67 document authors. All rights reserved. 69 This document is subject to BCP 78 and the IETF Trust's Legal 70 Provisions Relating to IETF Documents 71 (https://trustee.ietf.org/license-info) in effect on the date of 72 publication of this document. Please review these documents 73 carefully, as they describe your rights and restrictions with respect 74 to this document. Code Components extracted from this document must 75 include Simplified BSD License text as described in Section 4.e of 76 the Trust Legal Provisions and are provided without warranty as 77 described in the Simplified BSD License. 79 Table of Contents 81 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 82 2. Specification of Requirements . . . . . . . . . . . . . . . . 3 83 3. YANG Model . . . . . . . . . . . . . . . . . . . . . . . . . 4 84 3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4 85 3.2. SRv6 Types . . . . . . . . . . . . . . . . . . . . . . . 4 86 3.3. SRv6 Base . . . . . . . . . . . . . . . . . . . . . . . . 5 87 3.3.1. Configuration . . . . . . . . . . . . . . . . . . . . 5 88 3.3.2. State . . . . . . . . . . . . . . . . . . . . . . . . 6 89 3.3.3. Notification . . . . . . . . . . . . . . . . . . . . 8 90 3.4. SRv6 Static . . . . . . . . . . . . . . . . . . . . . . . 9 91 3.4.1. Configuration . . . . . . . . . . . . . . . . . . . . 9 92 3.4.2. State . . . . . . . . . . . . . . . . . . . . . . . . 13 93 3.4.3. Notification . . . . . . . . . . . . . . . . . . . . 13 94 4. Pending Items . . . . . . . . . . . . . . . . . . . . . . . . 14 95 5. YANG Specification . . . . . . . . . . . . . . . . . . . . . 14 96 5.1. SRv6 Types . . . . . . . . . . . . . . . . . . . . . . . 14 97 5.2. SRv6 Base . . . . . . . . . . . . . . . . . . . . . . . . 27 98 5.3. SRv6 Static . . . . . . . . . . . . . . . . . . . . . . . 41 99 6. Security Considerations . . . . . . . . . . . . . . . . . . . 58 100 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 59 101 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 60 102 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 60 103 9.1. Normative References . . . . . . . . . . . . . . . . . . 60 104 9.2. Informative References . . . . . . . . . . . . . . . . . 62 106 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 63 108 1. Introduction 110 The Network Configuration Protocol (NETCONF) [RFC6241] is one of the 111 network management protocols that defines mechanisms to manage 112 network devices. YANG [RFC6020] is a modular language that 113 represents data structures in an XML tree format, and is used as a 114 data modeling language for the NETCONF. 116 Segment Routing (SR), as defined in 117 [I-D.ietf-spring-segment-routing], leverages the source routing 118 paradigm where a node steers a packet through an ordered list of 119 instructions, called segments. SR, thus, allows enforcing a flow 120 through any topological path and/or service chain while maintaining 121 per-flow state only at the ingress nodes to the SR domain. When 122 applied to ipv6 data-plane (i.e. SRv6), SR requires a type of 123 routing header (SRH) in an IPv6 packet that is used to encode an 124 ordered list of IPv6 addresses (SIDs). The active segment is 125 indicated by the Destination Address of the packet, and the next 126 segment is indicated by a pointer in the SRH 127 [I-D.ietf-6man-segment-routing-header]. The various functions and 128 behaviors corresponding to network programming using SRv6 are 129 specified in [I-D.filsfils-spring-srv6-network-programming]. 131 This document introduces a YANG data model for base SRv6 that would 132 serve as a base framework for configuring and managing an SRv6 133 subsystem. As needed, other SRv6 technology models (e.g. ISIS, 134 OSPFv3, BGP, EVPN, Service Chaining) may augment this model. 135 Furthermore, to illustrate basic behaviors as captured in 136 [I-D.filsfils-spring-srv6-network-programming], this document also 137 specifies a YANG model for the SRv6-Static application. 139 The model currently defines the following constructs that are used 140 for managing SRv6: 142 o Configuration 144 o Operational State 146 o Notifications 148 2. Specification of Requirements 150 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 151 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 152 document are to be interpreted as described in BCP 14 [RFC2119] 154 [RFC8174] when, and only when, they appear in all capitals, as shown 155 here. 157 3. YANG Model 159 3.1. Overview 161 This document defines following three new YANG modules: 163 o ietf-srv6-types: defines common and basic types related to SRv6 165 o ietf-srv6-base: specifies management model for SRv6 base 166 constructs (locator, SIDs, etc.) 168 o ietf-srv6-static: specifies management model for SRv6-static 169 application 171 The modeling in this document complies with the Network Management 172 Datastore Architecture (NMDA) defined in [RFC8342]. The operational 173 state data is combined with the associated configuration data in the 174 same hierarchy [I-D.ietf-netmod-rfc6087bis]. When protocol states 175 are retrieved from the NMDA operational state datastore, the returned 176 states cover all "config true" (rw) and "config false" (ro) nodes 177 defined in the schema. 179 In this document, when a simplified graphical representation of YANG 180 model is presented in a tree diagram, the meaning of the symbols in 181 these tree diagrams is defined in [RFC8340]. 183 3.2. SRv6 Types 185 SRv6 common types and definitions are defined in the new module 186 "ietf-srv6-types". The main types defined in this module include: 188 o srv6-sid: SRv6 SID 190 o srv6-func-opcode: Typedef for FUNC opcode in an SRv6 SID 192 o srv6-func-opcode-reserved: Typedef for "reserved" FUNC opcode 194 o srv6-func-opcode-unreserved: Typedef for "unreserved" 195 (allocatable) FUNC opcode 197 o srv6-func-opcode-reserved-type: Enum (list) of "reserved" FUNC 198 opcode 200 o srv6-endpoint-type: SRv6 Endpoint behaviors 201 [I-D.filsfils-spring-srv6-network-programming] identity type 203 o srv6-transit-type: SRv6 Transit behavior types 204 [I-D.filsfils-spring-srv6-network-programming] enumeration 206 o srv6-security-rule-type: SRv6 Security rule type 207 [I-D.filsfils-spring-srv6-network-programming] enumeration 209 o srv6-counter-type: SRv6 Counter type 210 [I-D.filsfils-spring-srv6-network-programming] enumeration 212 The corresponding YANG specification for this module is captured in 213 Section 5.1. 215 3.3. SRv6 Base 217 The base SRv6 model is specified in ietf-srv6-base module. This 218 module augments "/rt:routing" and specifies the configuration, 219 operational state, and notification events that are required to 220 manage the base SRv6. 222 The corresponding YANG specification for this module is captured in 223 Section 5.2. 225 3.3.1. Configuration 227 The module defines some fundamental items required to configure an 228 SRv6 network: 230 o SRv6 Enablement: Enable Segment-Routing SRv6 feature 232 o Encapsulation Parameters: Provide encapsulation related 233 parameters, such as source-address and ip-ttl-propagation, to be 234 used when performing T.Encap* 236 o Locator(s) Specification: SRv6 locator is a fundamental construct 237 for an SRv6 network. This is the construct from which SID 238 (function opcodes) are allocated that on the local box, and 239 advertised to and used by remote nodes for reachability. A 240 locator is identified by a name and has associated prefix. It is 241 possible to have more than one locator per node. In case of more 242 than one locator, there is one and only one locator designated as 243 the default locator. 245 Following is a simplified graphical tree representation of the data 246 model for SRv6 base configuration 247 module: ietf-srv6-base 248 augment /rt:routing: 249 +--rw srv6 250 +--rw enable? boolean 251 +--rw encapsulation 252 | +--rw source-address? inet:ipv6-address 253 | +--rw ip-ttl-propagation? boolean 254 +--rw locators 255 +--rw locator* [name] 256 +--rw name string 257 +--rw enable? boolean 258 +--rw is-default boolean 259 +--rw prefix 260 +--rw address inet:ipv6-address 261 +--rw length srv6-types:srv6-locator-len 263 Figure 1: SRv6 Base - Config Tree 265 3.3.2. State 267 As per NMDA model, the state related to configuration items specified 268 in above section Section 3.3.1 can be retrieved from the same tree. 269 This section defines other operational state items related to SRv6 270 base. 272 The operational state corresponding to the SRv6 base includes: 274 o node capabilities: provides information on the node (hardware) 275 capabilities and support regarding various SRv6 aspects and 276 features including end behaviors, transit behaviors, security 277 rules, counter/stats support, and other SRv6 parameters that need 278 to be signaled in an SRv6 network by the protocols. 280 o locator: provides information related to a locator. The 281 information includes locator operational state, and state of 282 address conflict with any ipv6 address configured on local 283 interfaces etc. 285 o local-sid: provides information related to local-SIDs allocated 286 and/or installed on the node. This includes two types of 287 information: 289 1. aggregate across all local-SIDs such as aggregate counters 291 2. per local-SID information such as allocation type (dynamic or 292 explicit), SID owner protocol(s)/client(s), forwarding [paths] 293 information, and stats/counters. 295 Following is a simplified graphical tree representation of the data 296 model for the SRv6 operational state: 298 module: ietf-srv6-base 299 augment /rt:routing: 300 +--rw srv6 301 +--rw locators 302 | +--rw locator* [name] 303 | +--rw name string 304 | +--ro operational-status? srv6-types:srv6-status-type 305 | +--ro is-in-address-conflict? boolean 306 +--ro node-capabilities 307 | +--ro end-behavior* [type] 308 | | +--ro type identityref 309 | | +--ro supported boolean 310 | +--ro transit-behavior* [type] 311 | | +--ro type srv6-types:srv6-transit-type 312 | | +--ro supported boolean 313 | +--ro signaled-parameters 314 | | +--ro max-sl? uint8 315 | | +--ro max-end-pop-srh? uint8 316 | | +--ro max-t_insert? uint8 317 | | +--ro max-t_encap? uint8 318 | | +--ro max-end_d? uint8 319 | +--ro security-rule* [type] 320 | | +--ro type srv6-types:srv6-security-rule-type 321 | | +--ro supported boolean 322 | +--ro counters* [type] 323 | +--ro type srv6-types:srv6-counter-type 324 | +--ro supported boolean 325 +--ro local-sids 326 +--ro counters 327 | +--ro cnt3 328 | +--ro in-pkts? yang:counter64 329 | +--ro in-octets? yang:counter64 330 +--ro local-sid* [sid] 331 +--ro sid srv6-types:srv6-sid 332 +--ro locator-ref? -> /rt:routing/srv6:srv6/locators/locator/name 333 +--ro is-reserved? boolean 334 +--ro end-behavior-type? identityref 335 +--ro alloc-type? srv6-types:sid-alloc-type 336 +--ro owner* [type instance] 337 | +--ro type identityref 338 | +--ro instance string 339 | +--ro is-winner? boolean 340 +--ro forwarding 341 | +--ro is-installed? boolean 342 | +--ro next-hop-type? srv6-types:srv6-nexthop-type 343 | +--ro paths 344 | +--ro path* [path-index] 345 | +--ro path-index uint8 346 | +--ro l2 347 | | +--ro interface? if:interface-ref 348 | +--ro l3 349 | | +--ro interface? if:interface-ref 350 | | +--ro next-hop? inet:ip-address 351 | | +--ro weight? uint32 352 | | +--ro role? enumeration 353 | | +--ro backup-path-index? uint8 354 | +--ro (encap-type)? 355 | +--:(srv6) 356 | | +--ro out-sid* [sid] 357 | | +--ro sid srv6-types:srv6-sid 358 | +--:(mpls) 359 | +--ro out-label* [label] 360 | +--ro label rt-types:mpls-label 361 +--ro counters 362 +--ro cnt1 363 +--ro in-pkts? yang:counter64 364 +--ro in-octets? yang:counter64 366 Figure 2: SRv6 Base - State Tree 368 3.3.3. Notification 370 This model defines a list of notifications to inform an operator of 371 important events detected during the SRv6 operation. These events 372 include events related to: 374 o locator operational state changes 376 o local-SID collision event 378 Following is a simplified graphical tree representation of the data 379 model for SRv6 notifications: 381 module: ietf-srv6-base 383 notifications: 385 +---n srv6-locator-status-event 386 | +--ro operational-status? srv6-types:srv6-status-type 387 | +--ro locator-ref? -> /rt:routing/srv6:srv6/locators/locator/name 388 +---n srv6-sid-collision-event 389 +--ro sid? srv6-types:srv6-sid 390 +--ro existing 391 | +--ro end-behavior-type? identityref 392 +--ro requested 393 +--ro end-behavior-type? identityref 395 Figure 3: SRv6 Base - Notification Tree 397 3.4. SRv6 Static 399 SRv6-Static application allows a user to specify SRv6 local SIDs and 400 program them in the forwarding plane. The SRv6-Static model is 401 captured in the ietf-srv6-static module. 403 The associated YANG specification for this module is captured in 404 Section 5.3. 406 3.4.1. Configuration 408 The SRv6-Static configuration augments the SRv6-base locator tree 409 "/rt:routing/srv6:srv6/srv6:locators/srv6:locator" 411 Following are salient features of the SRv6-Static config model: 413 o Allows static (explicit) configuration for local-SIDs under a 414 given locator 416 o Given that entry is scoped under a locator, the key for each entry 417 is function "opcode" 419 o A user must also specify end-behavior type (End* function) 420 associated with the entry 422 o A user must also specify behavior-specific data with each entry. 423 For example, for any end behavior requiring a table lookup, a 424 lookup-table need be provided. Similarly, for any end behavior 425 with forwarding next-hops need to specify next-hop information. 426 The example of former include End, End.T, End.DT4, End.DT6, and 427 End.DT46, whereas example of later include End.X, End.DX4, 428 End.DX6, End.B6, End.BM etc. 430 o Each local-SID entry has zero or more forwarding paths specified. 432 o A forwarding path has next-hop type that depends on the end 433 behavior, and could be either ipv6, or ipv4, or mpls, or l2 type. 434 For example, End.X, End.DX4, End.DX6, End.B6, End.BM, and End.DX2 435 will have ipv6, ipv4, ipv6, ipv6, mpls, and l2 next-hop types 436 respectively 438 o For each forwarding next-hop type, the appropriate path attributes 439 are to be specified as well. For L2 type, the only other 440 information required is the L2 interface name. Whereas for L3 441 (ipv6, ipv4, mpls) types, the information includes L3 interface 442 name, next-hop IP address, weight, and protection information. 444 o Depending on the end behavior type, a forwarding path may have 445 either MPLS or SRv6 encapsulation -- i.e., Stack of out-labels or 446 Stack of SRv6 out-SIDs. The example of former is End.BM and 447 example of later include the rest (End.X, End.DX4/DX6, End.B6 448 etc.). 450 Following is a simplified graphical tree representation of the data 451 model for SRv6 Static configuration 453 module: ietf-srv6-static 454 augment /rt:routing/srv6:srv6/srv6:locators/srv6:locator: 455 +--rw static 456 +--rw local-sids 457 +--rw sid* [opcode] 458 +--rw opcode srv6-types:srv6-func-opcode-unreserved 459 +--rw end-behavior-type identityref 460 +--rw end 461 +--rw end_psp 462 +--rw end_usp 463 +--rw end_psp_usp 464 +--rw end-t 465 | +--rw lookup-table-ipv6 srv6-types:table-id 466 +--rw end-t_psp 467 | +--rw lookup-table-ipv6 srv6-types:table-id 468 +--rw end-t_usp 469 | +--rw lookup-table-ipv6 srv6-types:table-id 470 +--rw end-t_psp_usp 471 | +--rw lookup-table-ipv6 srv6-types:table-id 472 +--rw end-x 473 | +--rw protected? boolean 474 | +--rw paths 475 | +--rw path* [path-index] 476 | +--rw path-index uint8 477 | +--rw interface? if:interface-ref 478 | +--rw next-hop? inet:ipv6-address 479 | +--rw weight? uint32 480 | +--rw role? enumeration 481 | +--rw backup-path-index? uint8 482 | +--rw encap 483 | +--rw out-sid* [sid] 484 | +--rw sid srv6-types:srv6-sid 485 +--rw end-x_psp 486 | +--rw protected? boolean 487 | +--rw paths 488 | +--rw path* [path-index] 489 | +--rw path-index uint8 490 | +--rw interface? if:interface-ref 491 | +--rw next-hop? inet:ipv6-address 492 | +--rw weight? uint32 493 | +--rw role? enumeration 494 | +--rw backup-path-index? uint8 495 | +--rw encap 496 | +--rw out-sid* [sid] 497 | +--rw sid srv6-types:srv6-sid 498 +--rw end-x_usp 499 | +--rw protected? boolean 500 | +--rw paths 501 | +--rw path* [path-index] 502 | +--rw path-index uint8 503 | +--rw interface? if:interface-ref 504 | +--rw next-hop? inet:ipv6-address 505 | +--rw weight? uint32 506 | +--rw role? enumeration 507 | +--rw backup-path-index? uint8 508 | +--rw encap 509 | +--rw out-sid* [sid] 510 | +--rw sid srv6-types:srv6-sid 511 +--rw end-x_psp_usp 512 | +--rw protected? boolean 513 | +--rw paths 514 | +--rw path* [path-index] 515 | +--rw path-index uint8 516 | +--rw interface? if:interface-ref 517 | +--rw next-hop? inet:ipv6-address 518 | +--rw weight? uint32 519 | +--rw role? enumeration 520 | +--rw backup-path-index? uint8 521 | +--rw encap 522 | +--rw out-sid* [sid] 523 | +--rw sid srv6-types:srv6-sid 524 +--rw end-b6 525 | +--rw policy-name string 526 | +--rw paths 527 | +--rw path* [path-index] 528 | +--rw path-index uint8 529 | +--rw interface? if:interface-ref 530 | +--rw next-hop? inet:ipv6-address 531 | +--rw weight? uint32 532 | +--rw role? enumeration 533 | +--rw backup-path-index? uint8 534 | +--rw encap 535 | +--rw out-sid* [sid] 536 | +--rw sid srv6-types:srv6-sid 537 +--rw end-b6-encaps 538 | +--rw policy-name string 539 | +--rw source-address inet:ipv6-address 540 | +--rw paths 541 | +--rw path* [path-index] 542 | +--rw path-index uint8 543 | +--rw interface? if:interface-ref 544 | +--rw next-hop? inet:ipv6-address 545 | +--rw weight? uint32 546 | +--rw role? enumeration 547 | +--rw backup-path-index? uint8 548 | +--rw encap 549 | +--rw out-sid* [sid] 550 | +--rw sid srv6-types:srv6-sid 551 +--rw end-bm 552 | +--rw policy-name string 553 | +--rw paths 554 | +--rw path* [path-index] 555 | +--rw path-index uint8 556 | +--rw interface? if:interface-ref 557 | +--rw next-hop? inet:ip-address 558 | +--rw weight? uint32 559 | +--rw role? enumeration 560 | +--rw backup-path-index? uint8 561 | +--rw encap 562 | +--rw out-label* [label] 563 | +--rw label rt-types:mpls-label 564 +--rw end-dx6 565 | +--rw paths 566 | +--rw path* [path-index] 567 | +--rw path-index uint8 568 | +--rw interface? if:interface-ref 569 | +--rw next-hop? inet:ipv6-address 570 | +--rw weight? uint32 571 | +--rw role? enumeration 572 | +--rw backup-path-index? uint8 573 | +--rw encap 574 | +--rw out-sid* [sid] 575 | +--rw sid srv6-types:srv6-sid 576 +--rw end-dx4 577 | +--rw paths 578 | +--rw path* [path-index] 579 | +--rw path-index uint8 580 | +--rw interface? if:interface-ref 581 | +--rw next-hop? inet:ipv4-address 582 | +--rw weight? uint32 583 | +--rw role? enumeration 584 | +--rw backup-path-index? uint8 585 | +--rw encap 586 | +--rw out-sid* [sid] 587 | +--rw sid srv6-types:srv6-sid 588 +--rw end-dt6 589 | +--rw lookup-table-ipv6 srv6-types:table-id 590 +--rw end-dt4 591 | +--rw lookup-table-ipv4 srv6-types:table-id 592 +--rw end-dt46 593 | +--rw lookup-table-ipv4 srv6-types:table-id 594 | +--rw lookup-table-ipv6 srv6-types:table-id 595 +--rw end-dx2 596 | +--rw paths 597 | +--rw interface if:interface-ref 598 +--rw end-otp 600 Figure 4: SRv6 Static - Config Tree 602 3.4.2. State 604 As per NMDA model, the state related to configuration items specified 605 in above section Section 3.4.1 can be retrieved from the same tree. 606 The state regarding the local-SIDs created by SRv6-static model can 607 be obtained using the state model of SRv6-base. Hence, there is no 608 additional state identified at this time for SRv6-static. 610 3.4.3. Notification 612 None. 614 4. Pending Items 616 Following are the items that will be addressed in next revisions: 618 o Align SRv6 base with SR (MPLS) model [I-D.ietf-spring-sr-yang]. 620 o Extend local-SID collision event/notification in SRv6-base model. 622 o Add RPC support in the SRv6-base model. 624 o Add EVPN End functions in the SRv6-Static model. 626 o Add Service Chaining End functions in the SRv6-Static model. 628 o Add ARGS support in the SRv6-Static model. 630 o QoS support 632 5. YANG Specification 634 Following are actual YANG definition for SRv6 modules defined earlier 635 in the document. 637 5.1. SRv6 Types 639 This YANG module imports types defined in [RFC6991]. 641 Moreover, the module models behaviors defined in 642 [I-D.filsfils-spring-srv6-network-programming], 643 [I-D.xuclad-spring-sr-service-chaining], and 644 [I-D.ietf-dmm-srv6-mobile-uplane]. 646 file "ietf-srv6-types@2018-10-22.yang" --> 648 // RFC Editor: replace the above date with the date of 649 // publication and remove this note. 651 module ietf-srv6-types { 652 yang-version 1.1; 654 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-types"; 655 prefix srv6-types; 657 import ietf-inet-types { 658 prefix inet; 659 reference "RFC 6991: Common YANG Data Types"; 660 } 661 organization 662 "IETF SPRING Working Group"; 663 contact 664 "WG Web: 665 WG List: 667 Editor: Kamran Raza 668 670 Editor: Jaganbabu Rajamanickam 671 673 Editor: Xufeng Liu 674 676 Editor: Zhibo Hu 677 679 Editor: Iftekhar Hussain 680 682 Editor: Himanshu Shah 683 685 Editor: Daniel Voyer 686 688 Editor: Hani Elmalky 689 691 Editor: Satoru Matsushima 692 694 Editor: Katsuhiro Horiba 695 697 Editor: Ahmed AbdelSalam 698 700 "; 702 description 703 "This YANG module defines the essential types for the 704 management of Segment-Routing with IPv6 dataplane (SRv6). 706 Copyright (c) 2018 IETF Trust and the persons identified as 707 authors of the code. All rights reserved. 709 Redistribution and use in source and binary forms, with or 710 without modification, is permitted pursuant to, and subject 711 to the license terms contained in, the Simplified BSD License 712 set forth in Section 4.c of the IETF Trust's Legal Provisions 713 Relating to IETF Documents 714 (http://trustee.ietf.org/license-info)."; 716 reference "RFC XXXX"; 717 // RFC Editor: replace XXXX with actual RFC number and remove 718 // this note 720 revision 2018-10-22 { 721 description 722 "Initial revision."; 723 reference 724 "RFC XXXX: YANG Data Model for SRv6"; 725 // RFC Editor: replace XXXX with actual RFC number and remove 726 // this note 727 } 729 identity srv6-endpoint-type { 730 description 731 "Base identity from which specific SRv6 Endpoint types are derived."; 732 } 734 /* Endpoints defined under draft-filsfils-spring-srv6-network-programming */ 736 identity End { 737 base srv6-endpoint-type; 738 description 739 "End function (variant: no PSP, no USP)."; 740 reference 741 "draft-filsfils-spring-srv6-network-programming-04"; 742 // RFC Editor: replace with actual RFC number and remove this note 743 } 745 identity End_PSP { 746 base srv6-endpoint-type; 747 description 748 "End function (variant: PSP only)."; 749 reference 750 "draft-filsfils-spring-srv6-network-programming-04"; 751 // RFC Editor: replace with actual RFC number and remove this note 752 } 754 identity End_USP { 755 base srv6-endpoint-type; 756 description 757 "End function (variant: USP only)."; 758 reference 759 "draft-filsfils-spring-srv6-network-programming-04"; 760 // RFC Editor: replace with actual RFC number and remove this note 761 } 763 identity End_PSP_USP { 764 base srv6-endpoint-type; 765 description 766 "End function (variant: PSP and USP)."; 767 reference 768 "draft-filsfils-spring-srv6-network-programming-04"; 769 // RFC Editor: replace with actual RFC number and remove this note 770 } 772 identity End.X { 773 base srv6-endpoint-type; 774 description 775 "Endpoint with cross-connect to an array 776 of layer-3 adjacencies (variant: no PSP, no USP)."; 777 reference 778 "draft-filsfils-spring-srv6-network-programming-04"; 779 // RFC Editor: replace with actual RFC number and remove this note 780 } 782 identity End.X_PSP { 783 base srv6-endpoint-type; 784 description 785 "Endpoint with cross-connect to an array 786 of layer-3 adjacencies (variant: PSP only)."; 787 reference 788 "draft-filsfils-spring-srv6-network-programming-04"; 789 // RFC Editor: replace with actual RFC number and remove this note 790 } 792 identity End.X_USP { 793 base srv6-endpoint-type; 794 description 795 "Endpoint with cross-connect to an array 796 of layer-3 adjacencies (variant: USP only)."; 797 reference 798 "draft-filsfils-spring-srv6-network-programming-04"; 799 // RFC Editor: replace with actual RFC number and remove this note 800 } 802 identity End.X_PSP_USP { 803 base srv6-endpoint-type; 804 description 805 "Endpoint with cross-connect to an array 806 of layer-3 adjacencies (variant: PSP and USP)."; 807 reference 808 "draft-filsfils-spring-srv6-network-programming-04"; 809 // RFC Editor: replace with actual RFC number and remove this note 810 } 812 identity End.T { 813 base srv6-endpoint-type; 814 description 815 "Endpoint with specific IPv6 table lookup 816 (variant: no PSP, no USP)."; 817 reference 818 "draft-filsfils-spring-srv6-network-programming-04"; 819 // RFC Editor: replace with actual RFC number and remove this note 820 } 822 identity End.T_PSP { 823 base srv6-endpoint-type; 824 description 825 "Endpoint with specific IPv6 table lookup 826 (variant: PSP only)."; 827 reference 828 "draft-filsfils-spring-srv6-network-programming-04"; 829 // RFC Editor: replace with actual RFC number and remove this note 830 } 832 identity End.T_USP { 833 base srv6-endpoint-type; 834 description 835 "Endpoint with specific IPv6 table lookup 836 (variant: USP only)."; 837 reference 838 "draft-filsfils-spring-srv6-network-programming-04"; 839 // RFC Editor: replace with actual RFC number and remove this note 840 } 842 identity End.T_PSP_USP { 843 base srv6-endpoint-type; 844 description 845 "Endpoint with specific IPv6 table lookup 846 (variant: PSP and USP)."; 847 reference 848 "draft-filsfils-spring-srv6-network-programming-04"; 849 // RFC Editor: replace with actual RFC number and remove this note 850 } 852 identity End.B6 { 853 base srv6-endpoint-type; 854 description 855 "Endpoint bound to an SRv6 Policy"; 856 reference 857 "draft-filsfils-spring-srv6-network-programming-04"; 858 // RFC Editor: replace with actual RFC number and remove this note 859 } 861 identity End.B6.Encaps { 862 base srv6-endpoint-type; 863 description 864 "This is a variation of the End.B6 behavior 865 where the SRv6 Policy also includes an 866 IPv6 Source Address A."; 867 reference 868 "draft-filsfils-spring-srv6-network-programming-04"; 869 // RFC Editor: replace with actual RFC number and remove this note 870 } 872 identity End.BM { 873 base srv6-endpoint-type; 874 description 875 "Endpoint bound to an SR-MPLS Policy"; 876 reference 877 "draft-filsfils-spring-srv6-network-programming-04"; 878 // RFC Editor: replace with actual RFC number and remove this note 879 } 881 identity End.DX6 { 882 base srv6-endpoint-type; 883 description 884 "Endpoint with decapsulation and cross-connect 885 to an array of IPv6 adjacencies"; 886 reference 887 "draft-filsfils-spring-srv6-network-programming-04"; 888 // RFC Editor: replace with actual RFC number and remove this note 889 } 891 identity End.DX4 { 892 base srv6-endpoint-type; 893 description 894 "Endpoint with decapsulation and cross-connect 895 to an array of IPv4 adjacencies"; 896 reference 897 "draft-filsfils-spring-srv6-network-programming-04"; 898 // RFC Editor: replace with actual RFC number and remove this note 899 } 900 identity End.DT6 { 901 base srv6-endpoint-type; 902 description 903 "Endpoint with decapsulation and specific 904 IPv6 table lookup"; 905 reference 906 "draft-filsfils-spring-srv6-network-programming-04"; 907 // RFC Editor: replace with actual RFC number and remove this note 908 } 910 identity End.DT4 { 911 base srv6-endpoint-type; 912 description 913 "Endpoint with decapsulation and specific 914 IPv4 table lookup"; 915 reference 916 "draft-filsfils-spring-srv6-network-programming-04"; 917 // RFC Editor: replace with actual RFC number and remove this note 918 } 920 identity End.DT46 { 921 base srv6-endpoint-type; 922 description 923 "Endpoint with decapsulation and specific IP 924 (IPv4 or IPv6) table lookup"; 925 reference 926 "draft-filsfils-spring-srv6-network-programming-04"; 927 // RFC Editor: replace with actual RFC number and remove this note 928 } 930 identity End.DX2 { 931 base srv6-endpoint-type; 932 description 933 "Endpoint with decapsulation and Layer-2 934 cross-connect to an L2 interface"; 935 reference 936 "draft-filsfils-spring-srv6-network-programming-04"; 937 // RFC Editor: replace with actual RFC number and remove this note 938 } 940 identity End.DX2V { 941 base srv6-endpoint-type; 942 description 943 "Endpoint with decapsulation and specific 944 VLAN L2 table lookup"; 945 reference 946 "draft-filsfils-spring-srv6-network-programming-04"; 947 // RFC Editor: replace with actual RFC number and remove this note 949 } 951 identity End.DT2U { 952 base srv6-endpoint-type; 953 description 954 "Endpoint with decapsulation and specific 955 unicast MAC L2 table lookup"; 956 reference 957 "draft-filsfils-spring-srv6-network-programming-04"; 958 // RFC Editor: replace with actual RFC number and remove this note 959 } 961 identity End.DT2M { 962 base srv6-endpoint-type; 963 description 964 "Endpoint with decapsulation and specific L2 table 965 flooding"; 966 reference 967 "draft-filsfils-spring-srv6-network-programming-04"; 968 // RFC Editor: replace with actual RFC number and remove this note 969 } 971 identity End.OTP { 972 base srv6-endpoint-type; 973 description 974 "Endpoint for OAM operation of timestamp and punt"; 975 reference 976 "draft-filsfils-spring-srv6-network-programming-04"; 977 // RFC Editor: replace with actual RFC number and remove this note 978 } 980 identity End.S { 981 base srv6-endpoint-type; 982 description 983 "Endpoint in search of a target in table TE"; 984 reference 985 "draft-filsfils-spring-srv6-network-programming-04"; 986 // RFC Editor: replace with actual RFC number and remove this note 987 } 989 /* Endpoints defined under draft-xuclad-spring-sr-service-chaining */ 991 identity End.AS { 992 base srv6-endpoint-type; 993 description 994 "Service-Chaining Static proxy for inner type (Ethernet, 995 IPv4 or IPv6)"; 996 reference 997 "draft-xuclad-spring-sr-service-chaining-01"; 998 // RFC Editor: replace with actual RFC number and remove this note 999 } 1001 identity End.AD { 1002 base srv6-endpoint-type; 1003 description 1004 "Service-Chaining Dynamic proxy for inner type (Ethernet, 1005 IPv4 or IPv6)"; 1006 reference 1007 "draft-xuclad-spring-sr-service-chaining-01"; 1008 // RFC Editor: replace with actual RFC number and remove this note 1009 } 1011 identity End.ASM { 1012 base srv6-endpoint-type; 1013 description 1014 "Service-Chaining Shared memory SR proxy for inner type 1015 (Ethernet, IPv4 or IPv6)"; 1016 reference 1017 "draft-xuclad-spring-sr-service-chaining-01"; 1018 // RFC Editor: replace with actual RFC number and remove this note 1019 } 1021 identity End.AM { 1022 base srv6-endpoint-type; 1023 description 1024 "Service-Chaining Masquerading SR proxy"; 1025 reference 1026 "draft-xuclad-spring-sr-service-chaining-01"; 1027 // RFC Editor: replace with actual RFC number and remove this note 1028 } 1030 /* Endpoints defined under draft-ietf-dmm-srv6-mobile-uplane */ 1032 identity End.MAP { 1033 base srv6-endpoint-type; 1034 description 1035 "DMM End.MAP"; 1036 reference 1037 "draft-ietf-dmm-srv6-mobile-uplane-01"; 1038 // RFC Editor: replace with actual RFC number and remove this note 1039 } 1041 identity End.M.GTP6.UP { 1042 base srv6-endpoint-type; 1043 description 1044 "DMM End.M.GTP6.UP"; 1046 reference 1047 "draft-ietf-dmm-srv6-mobile-uplane-01"; 1048 // RFC Editor: replace with actual RFC number and remove this note 1049 } 1051 identity End.M.GTP6.DN { 1052 base srv6-endpoint-type; 1053 description 1054 "DMM End.M.GTP6.DN"; 1055 reference 1056 "draft-ietf-dmm-srv6-mobile-uplane-01"; 1057 // RFC Editor: replace with actual RFC number and remove this note 1058 } 1060 identity End.M.GTP4.DN { 1061 base srv6-endpoint-type; 1062 description 1063 "DMM End.M.GTP4.DN"; 1064 reference 1065 "draft-ietf-dmm-srv6-mobile-uplane-01"; 1066 // RFC Editor: replace with actual RFC number and remove this note 1067 } 1069 identity End.Limit { 1070 base srv6-endpoint-type; 1071 description 1072 "DMM End.Limit"; 1073 reference 1074 "draft-ietf-dmm-srv6-mobile-uplane-01"; 1075 // RFC Editor: replace with actual RFC number and remove this note 1076 } 1078 typedef srv6-transit-type { 1080 type enumeration { 1081 /* draft-filsfils-spring-srv6-network-programming-04 */ 1082 enum T { value 1; description "Transit behavior"; } 1083 enum T.Insert { 1084 description "Transit behavior with insertion of an SRv6 policy"; 1085 } 1086 enum T.Insert.Red { 1087 description "Transit behavior with reduced insertion of an SRv6 policy"; 1088 } 1089 enum T.Encaps { 1090 description "Transit behavior with encap of an SRv6 policy"; 1091 } 1092 enum T.Encaps.Red { 1093 description "Transit behavior with reduced encap of an SRv6 policy"; 1095 } 1096 enum T.Encaps.L2 { 1097 description "T.Encaps behavior on the received L2 frame"; 1098 } 1099 enum T.Encaps.L2.Red { 1100 description "T.Encaps.Red behavior on the received L2 frame"; 1101 } 1102 } 1104 description "SRv6 Transit behavior types"; 1105 } 1107 typedef srv6-security-rule-type { 1108 type enumeration { 1109 /* draft-filsfils-spring-srv6-network-programming-04 */ 1110 enum SEC1 { value 1; description "Security rule SEC1"; } 1111 enum SEC2 { description "Security rule SEC2"; } 1112 enum SEC3 { description "Security rule SEC3"; } 1113 enum SEC4 { description "Security rule SEC4"; } 1114 } 1116 description "SRv6 Security rule types"; 1117 } 1119 typedef srv6-counter-type { 1120 type enumeration { 1121 /* draft-filsfils-spring-srv6-network-programming-04 */ 1122 enum CNT1 { value 1; description "CNT1"; } 1123 enum CNT2 { description "CNT2"; } 1124 enum CNT3 { description "CNT3"; } 1125 } 1127 description "SRv6 counter types"; 1128 } 1130 typedef srv6-sid { 1131 type inet:ipv6-prefix; 1132 description 1133 "This type defines a SID value in SRv6"; 1134 } 1136 typedef srv6-func-opcode { 1137 type uint32; 1138 description 1139 "This is a typedef for SID FUNC's opcode type"; 1140 } 1142 typedef srv6-func-opcode-reserved { 1143 type uint32 { 1144 range "1 .. 63"; 1145 } 1147 description 1148 "This is a typedef for SID FUNC's reserved opcode type"; 1149 } 1151 typedef srv6-func-opcode-unreserved { 1152 type uint32 { 1153 range "64 .. max"; 1154 } 1156 description 1157 "This is a typedef for SID FUNC's allocatable (unreserved) opcode type"; 1158 } 1160 typedef srv6-func-opcode-reserved-type { 1161 type enumeration { 1162 enum invalid { value 0; description "Invalid opcode"; } 1163 } 1165 description "SRv6 SID FUNC Reserved Opcodes"; 1166 } 1168 typedef srv6-locator-len { 1169 type uint8 { 1170 range "32 .. 96"; 1171 } 1172 description 1173 "This type defines an SRv6 locator len with range constraints"; 1174 } 1176 typedef srv6-sid-pfxlen { 1177 type uint8 { 1178 range "33 .. 128"; 1179 } 1180 default 128; 1181 description 1182 "This type defines a SID prefixlen with range constraints"; 1183 } 1185 typedef sid-alloc-type { 1186 type enumeration { 1187 enum Dynamic { 1188 description 1189 "SID allocated dynamically."; 1190 } 1191 enum Explicit { 1192 description 1193 "SID allocated with explicit (static) value"; 1194 } 1195 } 1196 description 1197 "Types of sid allocation used."; 1198 } 1200 identity srv6-sid-owner-type { 1201 description 1202 "Base identity from which SID owner types are derived."; 1203 } 1205 identity isis { 1206 base srv6-sid-owner-type; 1207 description "ISIS"; 1208 } 1210 identity ospfv3 { 1211 base srv6-sid-owner-type; 1212 description "OSPFv3"; 1213 } 1215 identity bgp { 1216 base srv6-sid-owner-type; 1217 description "BGP"; 1218 } 1220 identity evpn { 1221 base srv6-sid-owner-type; 1222 description "EVPN"; 1223 } 1225 identity sr-policy { 1226 base srv6-sid-owner-type; 1227 description "SR Policy"; 1228 } 1230 identity service-function { 1231 base srv6-sid-owner-type; 1232 description "SF"; 1233 } 1235 // TODO: Rtg module ? 1236 typedef table-id { 1237 type uint32; 1238 description 1239 "Routing Table Id"; 1240 } 1242 typedef srv6-status-type { 1243 type enumeration { 1244 enum up { value 1; description "State is Up"; } 1245 enum down { description "State is Down"; } 1246 } 1247 description 1248 "Status type"; 1249 } 1251 typedef srv6-nexthop-type { 1252 type enumeration { 1253 enum ipv4 { value 1; description "IPv4 next-hop"; } 1254 enum ipv6 { description "IPv6 next-hop"; } 1255 enum mpls { description "MPLS next-hop"; } 1256 enum l2 { description "L2 next-hop"; } 1257 } 1258 description 1259 "Forwarding Next-hop type"; 1260 } 1262 } // module 1264 1266 Figure 5: ietf-srv6-types.yang 1268 5.2. SRv6 Base 1270 This YANG module imports types defined in [RFC6991], [RFC8294], 1271 [RFC8343], and [RFC8349]. 1273 file "ietf-srv6-base@2018-10-22.yang" --> 1275 // RFC Editor: replace the above date with the date of 1276 // publication and remove this note. 1278 module ietf-srv6-base { 1279 yang-version 1.1; 1281 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-base"; 1282 prefix srv6; 1283 import ietf-interfaces { 1284 prefix "if"; 1285 reference "RFC 8343: A YANG Data Model for Interface Management"; 1286 } 1288 import ietf-inet-types { 1289 prefix inet; 1290 reference "RFC 6991: Common YANG Data Types"; 1291 } 1293 import ietf-yang-types { 1294 prefix "yang"; 1295 reference "RFC 6991: Common YANG Data Types"; 1296 } 1298 import ietf-routing-types { 1299 prefix "rt-types"; 1300 reference "RFC 8294: Common YANG Data Types for the Routing Area"; 1301 } 1303 import ietf-routing { 1304 prefix "rt"; 1305 reference 1306 "RFC 8349: A YANG Data Model for Routing Management (NMDA version)"; 1307 } 1309 import ietf-srv6-types { 1310 prefix srv6-types; 1311 reference "RFC XXXX: YANG Data Model for SRv6"; 1312 // RFC Editor: replace XXXX with actual RFC number and remove 1313 // this note 1314 } 1316 organization 1317 "IETF SPRING Working Group"; 1318 contact 1319 "WG Web: 1320 WG List: 1322 Editor: Kamran Raza 1323 1325 Editor: Jaganbabu Rajamanickam 1326 1328 Editor: Xufeng Liu 1329 1331 Editor: Zhibo Hu 1332 1334 Editor: Iftekhar Hussain 1335 1337 Editor: Himanshu Shah 1338 1340 Editor: Daniel Voyer 1341 1343 Editor: Hani Elmalky 1344 1346 Editor: Satoru Matsushima 1347 1349 Editor: Katsuhiro Horiba 1350 1352 Editor: Ahmed AbdelSalam 1353 1355 "; 1357 description 1358 "This YANG module defines the essential elements for the 1359 management of Segment-Routing with IPv6 dataplane (SRv6). 1361 Copyright (c) 2017 IETF Trust and the persons identified as 1362 authors of the code. All rights reserved. 1364 Redistribution and use in source and binary forms, with or 1365 without modification, is permitted pursuant to, and subject 1366 to the license terms contained in, the Simplified BSD License 1367 set forth in Section 4.c of the IETF Trust's Legal Provisions 1368 Relating to IETF Documents 1369 (http://trustee.ietf.org/license-info)."; 1371 reference "RFC XXXX"; 1373 revision 2018-10-22 { 1374 description 1375 "Initial revision."; 1376 reference 1377 "RFC XXXX: YANG Data Model for SRv6"; 1378 // RFC Editor: replace XXXX with actual RFC number and remove 1379 // this note 1380 } 1382 /* 1383 * Common 1384 */ 1386 grouping path-attrs-cmn { 1387 description 1388 "Path properties -common for v4/v6"; 1390 leaf weight { 1391 type uint32; 1392 description 1393 "This value is used to compute a loadshare to perform un-equal 1394 load balancing when multiple outgoing path(s) are specified. A 1395 share is computed as a ratio of this number to the total under 1396 all configured path(s)."; 1397 } 1399 leaf role { 1400 type enumeration { 1401 enum PRIMARY { description "Path as primary traffic carrying"; } 1402 enum BACKUP { description "Path acts as a backup"; } 1403 enum PRIMARY_AND_BACKUP { description 1404 "Path acts as primary and backup simultaneously"; } 1405 } 1406 description "The path role"; 1407 } 1409 leaf backup-path-index { 1410 type uint8; 1411 description "Index of the protecting (backup) path"; 1412 } 1413 } 1415 grouping path-out-sids { 1416 description "Grouping for path's SID stack"; 1418 list out-sid { 1419 key "sid"; 1420 description "Out SID"; 1422 leaf sid { 1423 type srv6-types:srv6-sid; 1424 description "SID value"; 1425 } 1426 } 1428 } 1430 grouping path-out-labels { 1431 description "Grouping for path's label stack"; 1433 list out-label { 1434 key "label"; 1435 description "Out label"; 1437 leaf label { 1438 type rt-types:mpls-label; 1439 description "Label value"; 1440 } 1441 } 1443 } 1445 /* 1446 * Config and State 1447 */ 1448 grouping srv6-encap { 1449 description "Grouping for encap param config."; 1451 container encapsulation { 1452 description "Configure encapsulation related parameters"; 1453 leaf source-address { 1454 type inet:ipv6-address; 1455 description "Specify a source address (for T.Encap). The address must locally exists 1456 and be routable"; 1457 } 1458 leaf ip-ttl-propagation { 1459 type boolean; 1460 default false; 1461 description "IP TTL propagation from encapsulated packet to encapsulating outer 1462 IPv6 header. When configured on decapsulation side, this refers to 1463 propagating IP TTL from outer IPv6 header to inner header after decap"; 1464 } 1466 } 1467 } 1469 grouping srv6-locator-state { 1470 description "SRv6 grouping Locastateor "; 1472 leaf operational-status { 1473 type srv6-types:srv6-status-type; 1474 config false; 1475 description "Indicates whether locator state is UP"; 1477 } 1479 leaf is-in-address-conflict { 1480 type boolean; 1481 config false; 1482 description "Indicates whether locator address conflicts with 1483 some other IPv6 address on the box"; 1484 } 1485 } 1487 grouping srv6-locators { 1488 description "SRv6 locator grouping"; 1490 container locators { 1491 description "SRv6 locators"; 1493 list locator { 1494 key "name"; 1495 description "Configure a SRv6 locator"; 1497 leaf name { 1498 type string; 1499 description "Locator name"; 1500 } 1502 leaf enable { 1503 type boolean; 1504 default false; 1505 description "Enable a SRv6 locator"; 1506 } 1507 leaf is-default { 1508 type boolean; 1509 mandatory true; 1510 description "Indicates if the locator is a default locator"; 1511 } 1513 container prefix { 1514 description "Specify locator prefix value"; 1515 leaf address { 1516 type inet:ipv6-address; 1517 mandatory true; 1518 description "IPv6 address"; 1519 } 1520 leaf length { 1521 type srv6-types:srv6-locator-len; 1522 mandatory true; 1523 description "Locator (prefix) length"; 1524 } 1526 } 1527 uses srv6-locator-state; 1528 } 1529 } 1530 } 1532 grouping srv6-stats-in { 1533 description "Grouping for inbound stats"; 1535 leaf in-pkts { 1536 type yang:counter64; 1537 description 1538 "A cumulative counter of the total number of packets received"; 1539 } 1541 leaf in-octets { 1542 type yang:counter64; 1543 description 1544 "A cumulative counter of the total bytes received."; 1545 } 1546 } 1548 grouping srv6-stats-out { 1549 description "Grouping for inbound stats"; 1551 leaf out-pkts { 1552 type yang:counter64; 1553 description 1554 "A cumulative counter of the total number of packets transmitted"; 1555 } 1557 leaf out-octets { 1558 type yang:counter64; 1559 description 1560 "A cumulative counter of the total bytes transmitted."; 1561 } 1562 } 1564 grouping path-out-sids-choice { 1565 description "Grouping for Out-SID choices"; 1566 choice encap-type { 1567 description "Out-SID encap-based choice"; 1568 case srv6 { 1569 uses path-out-sids; 1570 } 1571 case mpls { 1572 uses path-out-labels; 1573 } 1575 } 1576 } 1578 grouping local-sid-fwd-state { 1579 description "SRv6 local-SID forwarding state grouping"; 1581 container forwarding { 1582 description "SRv6 local-SID forwarding state"; 1584 leaf is-installed { 1585 type boolean; 1586 description "Indicates whether SID is installed in forwarding"; 1587 } 1589 leaf next-hop-type { 1590 type srv6-types:srv6-nexthop-type; 1591 description "Forwarding next-hop types"; 1592 } 1594 container paths { 1595 when "../is-installed = 'true'" { 1596 description "This container is valid only when the local-SID is installed 1597 in forwarding"; 1598 } 1600 list path { 1601 key path-index; 1602 description "The list of paths associated with the SID"; 1604 leaf path-index { 1605 type uint8; 1606 description "Index of the path"; 1607 } 1609 container l2 { 1610 when "../../../next-hop-type = 'l2'" { 1611 description "This container is valid only for L2 type of NHs"; 1612 } 1614 leaf interface { 1615 type if:interface-ref; 1616 description "The outgoing Layer2 interface"; 1617 } 1619 description "L2 information"; 1620 } 1622 container l3 { 1623 when "../../../next-hop-type != 'l2'" { 1624 description "This container is valid only for L3 type of NHs"; 1625 } 1627 leaf interface { 1628 type if:interface-ref; 1629 description "The outgoing Layer3 interface"; 1630 } 1632 leaf next-hop { 1633 type inet:ip-address; 1634 description "The IP address of the next-hop"; 1635 } 1637 uses path-attrs-cmn; 1639 description "L3 information"; 1640 } 1641 uses path-out-sids-choice; 1642 } 1644 description "Forwarding paths"; 1645 } 1646 } 1647 } 1649 grouping srv6-state-sid { 1650 description "SRv6 SID state grouping"; 1652 container local-sids { 1653 config false; 1654 description "Local-SID state"; 1656 container counters { 1657 description "SRv6 counters"; 1659 container cnt3 { 1660 description "Counts SRv6 traffic received/dropped on local prefix not instantiated as local-SID"; 1661 uses srv6-stats-in; 1662 } 1663 } 1665 list local-sid { 1666 key "sid"; 1667 description "Per-localSID Counters"; 1669 leaf sid { 1670 type srv6-types:srv6-sid; 1671 description "Local SID value"; 1672 } 1674 uses srv6-locator-ref; 1676 leaf is-reserved { 1677 type boolean; 1678 description "Set to true if SID comes from reserved pool"; 1679 } 1681 leaf end-behavior-type { 1682 type identityref { 1683 base srv6-types:srv6-endpoint-type; 1684 } 1685 description "Type of SRv6 end behavior."; 1686 } 1688 leaf alloc-type { 1689 type srv6-types:sid-alloc-type; 1690 description 1691 "Type of sid allocation."; 1692 } 1694 list owner { 1695 key "type instance"; 1696 description "SID Owner clients"; 1697 leaf type { 1698 type identityref { 1699 base srv6-types:srv6-sid-owner-type; 1700 } 1701 description "SID owner/client type"; 1702 } 1703 leaf instance { 1704 type string; 1705 description "Client instance"; 1706 } 1707 leaf is-winner { 1708 type boolean; 1709 description "Is this client/owner the winning in terms of forwarding"; 1710 } 1711 } 1713 uses local-sid-fwd-state; 1715 container counters { 1716 description "SRv6 per local-SID counters"; 1718 container cnt1 { 1719 description "Counts SRv6 traffic received on local-SID prefix and processed successfully"; 1720 uses srv6-stats-in; 1721 } 1722 } 1723 } 1724 } 1725 } 1727 grouping srv6-support-ends { 1728 description "SRv6 End behavior support grouping"; 1730 list end-behavior { 1731 key "type"; 1732 description "End behavior support"; 1734 leaf type { 1735 type identityref { 1736 base srv6-types:srv6-endpoint-type; 1737 } 1738 description "End behavior (End*) type"; 1739 } 1740 leaf supported { 1741 type boolean; 1742 mandatory true; 1743 description "True if supported"; 1744 } 1745 } 1746 } 1748 grouping srv6-support-transits { 1749 description "SRv6 Transit behavior support grouping"; 1751 list transit-behavior { 1752 key "type"; 1753 description "Transit behavior support"; 1755 leaf type { 1756 type srv6-types:srv6-transit-type; 1757 description "Transit behavior (T*) type"; 1758 } 1759 leaf supported { 1760 type boolean; 1761 mandatory true; 1762 description "True if supported"; 1763 } 1764 } 1765 } 1767 grouping srv6-support-signaled { 1768 description "SRv6 signaled parameter support grouping"; 1770 container signaled-parameters { 1771 description "SRv6 signaled parameter support"; 1773 leaf max-sl { 1774 type uint8; 1775 //mandatory true; 1776 description "Maximum value of the SL field in the SRH of 1777 a received packet before applying the function 1778 associated with a SID"; 1779 } 1780 leaf max-end-pop-srh { 1781 type uint8; 1782 //mandatory true; 1783 description "Maximum number of SIDs in the top SRH in an 1784 SRH stack to which the router can apply 1785 PSP or USP flavors"; 1786 } 1787 leaf max-t_insert { 1788 type uint8; 1789 //mandatory true; 1790 description "Maximum number of SIDs that can be inserted as 1791 part of the T.insert behavior"; 1792 } 1793 leaf max-t_encap { 1794 type uint8; 1795 //mandatory true; 1796 description "Maximum number of SIDs that can be inserted as 1797 part of the T.Encap behavior"; 1798 } 1799 leaf max-end_d { 1800 type uint8; 1801 //mandatory true; 1802 description "Maximum number of SIDs in an SRH when applying 1803 End.DX6 and End.DT6 functions"; 1804 } 1805 } 1806 } 1808 grouping srv6-support-security-rules { 1809 description "SRv6 Security rules grouping"; 1811 list security-rule { 1812 key "type"; 1813 description "Security rule support"; 1814 leaf type { 1815 type srv6-types:srv6-security-rule-type; 1816 description "Security rule type"; 1817 } 1818 leaf supported { 1819 type boolean; 1820 mandatory true; 1821 description "True if supported"; 1822 } 1823 } 1824 } 1826 grouping srv6-support-counters { 1827 description "SRv6 Counters grouping"; 1829 list counters { 1830 key "type"; 1831 description "SRv6 counter support"; 1833 leaf type { 1834 type srv6-types:srv6-counter-type; 1835 description "Counter type"; 1836 } 1837 leaf supported { 1838 type boolean; 1839 mandatory true; 1840 description "True if supported"; 1841 } 1842 } 1843 } 1845 grouping srv6-state-capabilities { 1846 description "SRv6 node capabilities grouping"; 1847 container node-capabilities { 1848 config false; 1849 description "Node's SRv6 capabilities"; 1851 uses srv6-support-ends; 1852 uses srv6-support-transits; 1853 uses srv6-support-signaled; 1854 uses srv6-support-security-rules; 1855 uses srv6-support-counters; 1856 } 1857 } 1859 augment "/rt:routing" { 1860 description 1861 "This augments routing-instance configuration with segment-routing SRv6."; 1863 container srv6 { 1864 description "Segment Routing with IPv6 dataplane"; 1866 /* config */ 1867 leaf enable { 1868 type boolean; 1869 default false; 1870 description "Enable SRv6"; 1871 } 1873 uses srv6-encap; 1874 uses srv6-locators; 1875 uses srv6-state-capabilities; 1876 uses srv6-state-sid; 1877 } 1878 } 1880 /* Notifications */ 1882 grouping srv6-locator-ref { 1883 description 1884 "An absolute reference to an SRv6 locator"; 1885 leaf locator-ref { 1886 type leafref { 1887 path "/rt:routing/srv6:srv6/srv6:locators/srv6:locator/srv6:name"; 1888 } 1889 description 1890 "Reference to a SRv6 locator."; 1891 } 1892 } 1894 notification srv6-locator-status-event { 1895 description 1896 "Notification event for a change of SRv6 locator operational status."; 1897 leaf operational-status { 1898 type srv6-types:srv6-status-type; 1899 description "Operational status"; 1900 } 1901 uses srv6-locator-ref; 1902 } 1904 notification srv6-sid-collision-event { 1905 description 1906 "Notification event for an SRv6 SID collision - i.e., attempt to bind an already 1907 bound SID to a new context"; 1908 leaf sid { 1909 type srv6-types:srv6-sid; 1910 description "SRv6 SID"; 1912 } 1913 container existing { 1914 description "Current assignment / bind"; 1915 leaf end-behavior-type { 1916 type identityref { 1917 base srv6-types:srv6-endpoint-type; 1918 } 1919 description "End type"; 1920 } 1921 // TODO: More 1922 } 1923 container requested { 1924 description "Requested assignment / bind"; 1926 leaf end-behavior-type { 1927 type identityref { 1928 base srv6-types:srv6-endpoint-type; 1929 } 1930 description "End type"; 1931 } 1932 } 1934 } 1936 } // module 1938 1940 Figure 6: ietf-srv6-base.yang 1942 5.3. SRv6 Static 1944 This YANG module imports types defined in [RFC6991], [RFC8343], and 1945 [RFC8349]. 1947 file "ietf-srv6-static@2018-10-22.yang" --> 1949 // RFC Editor: replace the above date with the date of 1950 // publication and remove this note. 1952 module ietf-srv6-static { 1953 yang-version 1.1; 1955 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-static"; 1956 prefix srv6-static; 1957 import ietf-interfaces { 1958 prefix "if"; 1959 reference "RFC 8343: A YANG Data Model for Interface Management"; 1960 } 1962 import ietf-inet-types { 1963 prefix inet; 1964 reference "RFC 6991: Common YANG Data Types"; 1965 } 1967 import ietf-routing { 1968 prefix "rt"; 1969 reference 1970 "RFC 8349: A YANG Data Model for Routing Management (NMDA 1971 version)"; 1972 } 1974 import ietf-srv6-types { 1975 prefix srv6-types; 1976 reference "RFC XXXX: YANG Data Model for SRv6"; 1977 // RFC Editor: replace XXXX with actual RFC number and remove 1978 // this note 1979 } 1981 import ietf-srv6-base { 1982 prefix srv6; 1983 reference "RFC XXXX: YANG Data Model for SRv6"; 1984 // RFC Editor: replace XXXX with actual RFC number and remove 1985 // this note 1986 } 1988 organization 1989 "IETF SPRING Working Group"; 1990 contact 1991 "WG Web: 1992 WG List: 1994 Editor: Kamran Raza 1995 1997 Editor: Jaganbabu Rajamanickam 1998 2000 Editor: Xufeng Liu 2001 2003 Editor: Zhibo Hu 2004 2006 Editor: Iftekhar Hussain 2007 2009 Editor: Himanshu Shah 2010 2012 Editor: Daniel Voyer 2013 2015 Editor: Hani Elmalky 2016 2018 Editor: Satoru Matsushima 2019 2021 Editor: Katsuhiro Horiba 2022 2024 Editor: Ahmed AbdelSalam 2025 2027 "; 2029 description 2030 "This YANG module defines the essential elements for the 2031 management of Static application for Segment-Routing with 2032 IPv6 dataplane (SRv6). 2034 Copyright (c) 2018 IETF Trust and the persons identified as 2035 authors of the code. All rights reserved. 2037 Redistribution and use in source and binary forms, with or 2038 without modification, is permitted pursuant to, and subject 2039 to the license terms contained in, the Simplified BSD License 2040 set forth in Section 4.c of the IETF Trust's Legal Provisions 2041 Relating to IETF Documents 2042 (http://trustee.ietf.org/license-info)."; 2044 reference "RFC XXXX"; 2045 // RFC Editor: replace XXXX with actual RFC number and remove 2046 // this note 2048 revision 2018-10-22 { 2049 description 2050 "Initial revision."; 2051 reference 2052 "RFC XXXX: YANG Data Model for SRv6"; 2053 // RFC Editor: replace XXXX with actual RFC number and remove 2054 // this note 2055 } 2057 /* 2058 * Config and State 2059 */ 2061 grouping path-attrs-v6 { 2062 description 2063 "IPv6 Path properties"; 2065 leaf interface { 2066 type if:interface-ref; 2067 description "The outgoing interface"; 2068 } 2070 leaf next-hop { 2071 type inet:ipv6-address; 2072 description "The IP address of the next-hop"; 2073 } 2075 uses srv6:path-attrs-cmn; 2076 } 2078 grouping path-attrs-v4 { 2079 description 2080 "IPv4 Path properties"; 2082 leaf interface { 2083 type if:interface-ref; 2084 description "The outgoing interface"; 2085 } 2087 leaf next-hop { 2088 type inet:ipv4-address; 2089 description "The IP address of the next-hop"; 2090 } 2092 uses srv6:path-attrs-cmn; 2093 } 2095 grouping path-attrs-mpls { 2096 description 2097 "MPLS Path properties"; 2099 leaf interface { 2100 type if:interface-ref; 2101 description "The outgoing interface"; 2102 } 2104 leaf next-hop { 2105 type inet:ip-address; 2106 description "The IP address of the next-hop"; 2107 } 2109 uses srv6:path-attrs-cmn; 2110 } 2112 grouping multi-paths-v6 { 2113 description "Multipath grouping"; 2115 container paths { 2116 description "List of outgoing paths"; 2117 list path { 2118 key path-index; 2119 description "The list of paths associated with the SID"; 2121 leaf path-index { 2122 type uint8; 2123 description "Index of the path"; 2124 } 2126 uses path-attrs-v6; 2127 container encap { 2128 description "Encapsulation on path"; 2129 uses srv6:path-out-sids; 2130 } 2131 } 2132 } 2133 } 2135 grouping multi-paths-v4 { 2136 description "Multipath grouping"; 2138 container paths { 2139 description "List of outgoing paths"; 2140 list path { 2141 key path-index; 2142 description "The list of paths associated with the SID"; 2144 leaf path-index { 2145 type uint8; 2146 description "Index of the path"; 2147 } 2148 uses path-attrs-v4; 2149 container encap { 2150 description "Encapsulation on path"; 2151 uses srv6:path-out-sids; 2152 } 2153 } 2154 } 2155 } 2157 grouping multi-paths-mpls { 2158 description "Multipath grouping"; 2160 container paths { 2161 description "List of outgoing paths"; 2162 list path { 2163 key path-index; 2164 description "The list of paths associated with the SID"; 2166 leaf path-index { 2167 type uint8; 2168 description "Index of the path"; 2169 } 2171 uses path-attrs-mpls; 2172 container encap { 2173 description "Encapsulation on path"; 2174 uses srv6:path-out-labels; 2175 } 2176 } 2177 } 2178 } 2180 grouping srv6-sid-config { 2181 description 2182 "Configuration parameters relating to SRv6 sid."; 2184 leaf opcode { 2185 type srv6-types:srv6-func-opcode-unreserved; 2186 description 2187 "SRv6 function opcode."; 2188 } 2189 leaf end-behavior-type { 2190 type identityref { 2191 base srv6-types:srv6-endpoint-type; 2192 } 2193 mandatory true; 2194 description 2195 "Type of SRv6 end behavior."; 2197 } 2199 container end { 2200 when "../end-behavior-type = 'End'" { 2201 description 2202 "This container is valid only when the user chooses End 2203 behavior (variant: no PSP, no USP)."; 2204 } 2205 description 2206 "The Endpoint function is the most basic function. 2207 FIB lookup on updated DA and forward accordingly 2208 to the matched entry. 2209 This is the SRv6 instantiation of a Prefix SID 2210 (variant: no PSP, no USP)"; 2212 } 2214 container end_psp { 2215 when "../end-behavior-type = 'End_PSP'" { 2216 description 2217 "This container is valid only when the user chooses End 2218 behavior (variant: PSP only)."; 2219 } 2220 description 2221 "The Endpoint function is the most basic function. 2222 FIB lookup on updated DA and forward accordingly 2223 to the matched entry. 2224 This is the SRv6 instantiation of a Prefix SID 2225 (variant: PSP only)"; 2227 } 2229 container end_usp { 2230 when "../end-behavior-type = 'End_USP'" { 2231 description 2232 "This container is valid only when the user chooses End 2233 behavior (variant: USP only)."; 2234 } 2235 description 2236 "The Endpoint function is the most basic function. 2237 FIB lookup on updated DA and forward accordingly 2238 to the matched entry. 2239 This is the SRv6 instantiation of a Prefix SID 2240 (variant: USP only)"; 2242 } 2244 container end_psp_usp { 2245 when "../end-behavior-type = 'End_PSP_USP'" { 2246 description 2247 "This container is valid only when the user chooses End 2248 behavior (variant: PSP/USP)."; 2249 } 2250 description 2251 "The Endpoint function is the most basic function. 2252 FIB lookup on updated DA and forward accordingly 2253 to the matched entry. 2254 This is the SRv6 instantiation of a Prefix SID 2255 (variant: PSP/USP)"; 2257 } 2259 container end-t { 2260 when "../end-behavior-type = 'End.T'" { 2261 description 2262 "This container is valid only when the user chooses 2263 End.T behavior (variant: no PSP, no USP)."; 2264 } 2265 description 2266 "Endpoint with specific IPv6 table lookup (variant: no PSP, no USP). 2267 Lookup the next segment in IPv6 table T 2268 associated with the SID and forward via 2269 the matched table entry. 2270 The End.T is used for multi-table operation 2271 in the core."; 2273 // TODO presence "Mandatory child only if container is present"; 2274 leaf lookup-table-ipv6 { 2275 type srv6-types:table-id; 2276 mandatory true; 2277 description 2278 "Table Id for lookup on updated DA (next segment)"; 2279 } 2280 } 2282 container end-t_psp { 2283 when "../end-behavior-type = 'End.T_PSP'" { 2284 description 2285 "This container is valid only when the user chooses 2286 End.T behavior (variant: PSP only)."; 2287 } 2288 description 2289 "Endpoint with specific IPv6 table lookup (variant: PSP only). 2290 Lookup the next segment in IPv6 table T 2291 associated with the SID and forward via 2292 the matched table entry. 2294 The End.T is used for multi-table operation 2295 in the core."; 2297 // TODO presence "Mandatory child only if container is present"; 2299 leaf lookup-table-ipv6 { 2300 type srv6-types:table-id; 2301 mandatory true; 2302 description 2303 "Table Id for lookup on updated DA (next segment)"; 2304 } 2305 } 2307 container end-t_usp { 2308 when "../end-behavior-type = 'End.T_USP'" { 2309 description 2310 "This container is valid only when the user chooses 2311 End.T behavior (variant: USP only)."; 2312 } 2313 description 2314 "Endpoint with specific IPv6 table lookup (variant: USP only). 2315 Lookup the next segment in IPv6 table T 2316 associated with the SID and forward via 2317 the matched table entry. 2318 The End.T is used for multi-table operation 2319 in the core."; 2321 // TODO presence "Mandatory child only if container is present"; 2323 leaf lookup-table-ipv6 { 2324 type srv6-types:table-id; 2325 mandatory true; 2326 description 2327 "Table Id for lookup on updated DA (next segment)"; 2328 } 2329 } 2331 container end-t_psp_usp { 2332 when "../end-behavior-type = 'End.T_PSP_USP'" { 2333 description 2334 "This container is valid only when the user chooses 2335 End.T behavior (variant: USP/PSP)."; 2336 } 2337 description 2338 "Endpoint with specific IPv6 table lookup (variant: USP/PSP). 2339 Lookup the next segment in IPv6 table T 2340 associated with the SID and forward via 2341 the matched table entry. 2342 The End.T is used for multi-table operation 2343 in the core."; 2345 // TODO presence "Mandatory child only if container is present"; 2347 leaf lookup-table-ipv6 { 2348 type srv6-types:table-id; 2349 mandatory true; 2350 description 2351 "Table Id for lookup on updated DA (next segment)"; 2352 } 2353 } 2355 container end-x { 2356 when "../end-behavior-type = 'End.X'" { 2357 description 2358 "This container is valid only when the user chooses 2359 End.X behavior (variant: no USP/PSP)"; 2360 } 2361 description 2362 "Endpoint with cross-connect to an array of 2363 layer-3 adjacencies (variant: no USP/PSP). 2364 Forward to layer-3 adjacency bound to the SID S. 2365 The End.X function is required to express any 2366 traffic-engineering policy."; 2368 leaf protected { 2369 type boolean; 2370 default false; 2371 description "Is Adj-SID protected?"; 2372 } 2374 uses multi-paths-v6; 2375 } 2377 container end-x_psp { 2378 when "../end-behavior-type = 'End.X_PSP'" { 2379 description 2380 "This container is valid only when the user chooses 2381 End.X behavior (variant: PSP only)"; 2382 } 2383 description 2384 "Endpoint with cross-connect to an array of 2385 layer-3 adjacencies (variant: PSP only). 2386 Forward to layer-3 adjacency bound to the SID S. 2387 The End.X function is required to express any 2388 traffic-engineering policy."; 2390 leaf protected { 2391 type boolean; 2392 default false; 2393 description "Is Adj-SID protected?"; 2394 } 2396 uses multi-paths-v6; 2397 } 2399 container end-x_usp { 2400 when "../end-behavior-type = 'End.X_USP'" { 2401 description 2402 "This container is valid only when the user chooses 2403 End.X behavior (variant: USP only)"; 2404 } 2405 description 2406 "Endpoint with cross-connect to an array of 2407 layer-3 adjacencies (variant: USP only). 2408 Forward to layer-3 adjacency bound to the SID S. 2409 The End.X function is required to express any 2410 traffic-engineering policy."; 2412 leaf protected { 2413 type boolean; 2414 default false; 2415 description "Is Adj-SID protected?"; 2416 } 2418 uses multi-paths-v6; 2419 } 2421 container end-x_psp_usp { 2422 when "../end-behavior-type = 'End.X_PSP_USP'" { 2423 description 2424 "This container is valid only when the user chooses 2425 End.X behavior (variant: PSP/USP)"; 2426 } 2427 description 2428 "Endpoint with cross-connect to an array of 2429 layer-3 adjacencies (variant: PSP/USP). 2430 Forward to layer-3 adjacency bound to the SID S. 2431 The End.X function is required to express any 2432 traffic-engineering policy."; 2434 leaf protected { 2435 type boolean; 2436 default false; 2437 description "Is Adj-SID protected?"; 2439 } 2441 uses multi-paths-v6; 2442 } 2444 container end-b6 { 2445 when "../end-behavior-type = 'End.B6'" { 2446 description 2447 "This container is valid only when the user chooses 2448 End.B6 behavior."; 2449 } 2450 description 2451 "Endpoint bound to an SRv6 Policy. 2452 Insert SRH based on the policy and forward the 2453 packet toward the first hop configured in the policy. 2454 This is the SRv6 instantiation of a Binding SID."; 2456 // TODO presence "Mandatory child only if container is present"; 2458 leaf policy-name { 2459 type string; 2460 mandatory true; 2461 description "SRv6 policy name."; 2462 } 2464 uses multi-paths-v6; 2465 } 2467 container end-b6-encaps { 2468 when "../end-behavior-type = 'End.B6.Encaps'" { 2469 description 2470 "This container is valid only when the user chooses 2471 End_B6_Encaps behavior."; 2472 } 2473 description 2474 "This is a variation of the End.B6 behavior where 2475 the SRv6 Policy also includes an IPv6 Source 2476 Address. 2477 Insert SRH based on the policy and update the 2478 source IP and forward the packet toward the 2479 first hop configured in the policy. 2480 Instead of simply inserting an SRH with the 2481 policy (End.B6), this behavior also adds an 2482 outer IPv6 header."; 2484 // TODO presence "Mandatory child only if container is present"; 2485 leaf policy-name { 2486 type string; 2487 mandatory true; 2488 description "SRv6 policy name."; 2489 } 2490 leaf source-address { 2491 type inet:ipv6-address; 2492 mandatory true; 2493 description 2494 "IPv6 source address for Encap."; 2495 } 2497 uses multi-paths-v6; 2498 } 2500 container end-bm { 2501 when "../end-behavior-type = 'End.BM'" { 2502 description 2503 "This container is valid only when the user chooses 2504 End.BM behavior."; 2505 } 2506 description 2507 "Endpoint bound to an SR-MPLS Policy. 2508 push an MPLS label stack on the 2509 received packet and forward the according to 2510 Lable L1. 2511 This is an SRv6 instantiation of an SR-MPLS Binding SID."; 2513 // TODO presence "Mandatory child only if container is present"; 2515 leaf policy-name { 2516 type string; 2517 mandatory true; 2518 description "SRv6 policy name"; 2519 } 2520 uses multi-paths-mpls; 2521 } 2523 container end-dx6 { 2524 when "../end-behavior-type = 'End.DX6'" { 2525 description 2526 "This container is valid only when the user chooses 2527 End.DX6 behavior."; 2528 } 2529 description 2530 "Endpoint with decapsulation and cross-connect to 2531 an array of IPv6 adjacencies. Pop the (outer) 2532 IPv6 header and its extension headers and forward 2533 to layer-3 adjacency bound to the SID S. 2534 The End.DX6 used in the L3VPN use-case."; 2536 uses multi-paths-v6; 2537 } 2538 container end-dx4 { 2539 when "../end-behavior-type = 'End.DX4'" { 2540 description 2541 "This container is valid only when the user chooses 2542 End.DX4 behavior."; 2543 } 2544 description 2545 "Endpoint with decapsulation and cross-connect to 2546 an array of IPv4 adjacencies. 2547 Pop the (outer) IPv6 header and its extension 2548 header and forward to layer-3 adjacency bound 2549 to the SID S. 2550 This would be equivalent to the per-CE VPN 2551 label in MPLS."; 2553 uses multi-paths-v4; 2554 } 2555 container end-dt6 { 2556 when "../end-behavior-type = 'End.DT6'" { 2557 description 2558 "This container is valid only when the user chooses 2559 End.DT6 behavior."; 2560 } 2561 description 2562 "Endpoint with decapsulation and specific IPv6 table 2563 lookup. 2564 Pop the (outer) IPv6 header and its extension 2565 headers. 2566 Lookup the exposed inner IPv6 DA in IPv6 2567 table T and forward via the matched table entry. 2568 End.DT6 function is used in L3VPN use-case."; 2570 // TODO presence "Mandatory child only if container is present"; 2572 leaf lookup-table-ipv6 { 2573 type srv6-types:table-id; 2574 mandatory true; 2575 description "IPv6 table"; 2576 } 2577 } 2578 container end-dt4 { 2579 when "../end-behavior-type = 'End.DT4'" { 2580 description 2581 "This container is valid only when the user chooses 2582 End.DT4 behavior."; 2583 } 2584 description 2585 "Endpoint with decapsulation and specific 2586 IPv4 table lookup. 2587 Pop the (outer) IPv6 header and its extension 2588 headers. 2589 Lookup the exposed inner IPv4 DA in IPv4 2590 table T and forward via the matched table entry. 2591 This would be equivalent to the per-VRF VPN label 2592 in MPLS."; 2594 // TODO presence "Mandatory child only if container is present"; 2596 leaf lookup-table-ipv4 { 2597 type srv6-types:table-id; 2598 mandatory true; 2599 description "IPv4 table"; 2600 } 2601 } 2602 container end-dt46 { 2603 when "../end-behavior-type = 'End.DT46'" { 2604 description 2605 "This container is valid only when the user chooses 2606 End.DT46 behavior."; 2607 } 2608 description 2609 "Endpoint with decapsulation and specific 2610 IP table lookup. 2611 Depending on the protocol type (IPv4 or IPv6) 2612 of the inner ip packet and the specific VRF name 2613 forward the packet. 2614 This would be equivalent to the per-VRF VPN 2615 label in MPLS."; 2617 // TODO presence "Mandatory child only if container is present"; 2619 leaf lookup-table-ipv4 { 2620 type srv6-types:table-id; 2621 mandatory true; 2622 description "IPv4 table"; 2623 } 2624 leaf lookup-table-ipv6 { 2625 type srv6-types:table-id; 2626 mandatory true; 2627 description "IPv6 table"; 2628 } 2630 } 2632 container end-dx2 { 2633 when "../end-behavior-type = 'End.DX2'" { 2634 description 2635 "This container is valid only when the user chooses 2636 End.DX2 behavior."; 2637 } 2638 description 2639 "This is an Endpoint with decapsulation and Layer-2 2640 cross-connect to OIF. 2641 Pop the (outer) IPv6 header and its extension headers. 2642 Forward the resulting frame via OIF associated to the SID. 2643 The End.DX2 function is the L2VPN use-case"; 2645 container paths { 2646 description "List of outgoing paths"; 2648 leaf interface { 2649 type if:interface-ref; 2650 mandatory true; 2651 description "Layer-2 cross-connect to Out interface."; 2652 } 2653 } 2654 } 2655 /* TODO 2656 container end-dx2v { 2657 when "../end-behavior-type = 'End.DX2V'" { 2658 description 2659 "This container is valid only when the user chooses 2660 End.DX2V behavior."; 2661 } 2662 description 2663 "Endpoint with decapsulation and specific VLAN 2664 L2 table lookup. 2665 Pop the (outer) IPv6 header 2666 and its extension headers lookup the exposed 2667 inner VLANs in L2 table T forward via the 2668 matched table entry. 2669 The End.DX2V is used for EVPN Flexible cross-connect 2670 use-cases"; 2671 leaf end-dx2v { 2672 type empty; 2673 description 2674 "End_DX2V behavior"; 2675 } 2676 } 2677 container end-dt2u { 2678 when "../end-behavior-type = 'End.DT2U'" { 2679 description 2680 "This container is valid only when the user chooses 2681 End.DT2U behavior."; 2682 } 2683 description 2684 "Endpoint with decapsulation and specific 2685 unicast MAC L2 table lookup. 2686 Pop the (outer) IPv6 header and its extension headers. 2687 Learn the exposed inner MAC SA in L2 table T. 2688 Lookup the exposed inner MAC DA in L2 table T. 2689 Forward via the matched T entry else to all L2OIF in T. 2690 The End.DT2U is used for EVPN Bridging unicast use cases"; 2691 leaf end-dt2u { 2692 type empty; 2693 description 2694 "End_DT2U behavior"; 2695 } 2696 } 2697 container end-dt2m { 2698 when "../end-behavior-type = 'End.DT2M'" { 2699 description 2700 "This container is valid only when the user chooses 2701 End.DT2M behavior."; 2702 } 2703 description 2704 "Endpoint with decapsulation and specific L2 table flooding. 2705 Pop the (outer) IPv6 header and its extension headers. 2706 Learn the exposed inner MAC SA in L2 table T. 2707 Forward on all L2OIF excluding the one specified in Arg.FE2. 2708 The End.DT2M is used for EVPN Bridging BUM use case with 2709 ESI filtering capability."; 2710 leaf end-dt2m { 2711 type empty; 2712 description 2713 "End_DT2M behavior"; 2714 } 2715 } 2716 */ 2718 container end-otp { 2719 when "../end-behavior-type = 'End.OTP'" { 2720 description 2721 "This container is valid only when the user chooses 2722 End.OTP behavior."; 2723 } 2724 description 2725 "Endpoint for OAM with timestamp and punt behavior"; 2727 } 2728 } 2730 grouping srv6-static-cfg { 2731 description 2732 "Grouping configuration and operation for SRv6 sid."; 2734 list sid { 2735 key "opcode"; 2736 description "Local SID list"; 2738 uses srv6-sid-config; 2739 } 2740 } 2742 augment "/rt:routing/srv6:srv6/srv6:locators/srv6:locator" { 2743 description 2744 "This augments locator leaf withing SRv6."; 2746 container static { 2747 description "Static SRv6"; 2749 /* Local SIDs */ 2750 container local-sids { 2751 description 2752 "SRv6-static local-SIDs"; 2754 uses srv6-static-cfg; 2755 /* no state for now; SID state accessible through base model */ 2756 } 2758 } 2759 } 2760 } // module 2762 2764 Figure 7: ietf-srv6-static.yang 2766 6. Security Considerations 2768 The YANG module specified in this document defines a schema for data 2769 that is designed to be accessed via network management protocols such 2770 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 2771 is the secure transport layer, and the mandatory-to-implement secure 2772 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 2773 is HTTPS, and the mandatory-to-implement secure transport is TLS 2774 [RFC8446]. 2776 The Network Configuration Access Control Model (NACM) [RFC8341] 2777 provides the means to restrict access for particular NETCONF or 2778 RESTCONF users to a preconfigured subset of all available NETCONF or 2779 RESTCONF protocol operations and content. 2781 There are a number of data nodes defined in this YANG module that are 2782 writable/creatable/ deletable (i.e., config true, which is the 2783 default). These data nodes may be considered sensitive or vulnerable 2784 in some network environments. Write operations (e.g., edit-config) 2785 to these data nodes without proper protection can have a negative 2786 effect on network operations. 2788 Some of the readable data nodes in this YANG module may be considered 2789 sensitive or vulnerable in some network environments. It is thus 2790 important to control read access (e.g., via get, get-config, or 2791 notification) to these data nodes. 2793 It goes without saying that this specification also inherits the 2794 security considerations captured in the SRv6 specification document 2795 [I-D.filsfils-spring-srv6-network-programming]. 2797 7. IANA Considerations 2799 This document requests the registration of the following URIs in the 2800 IETF "XML registry" [RFC3688]: 2802 +-----------------------------------------------+------------+------+ 2803 | URI | Registrant | XML | 2804 +-----------------------------------------------+------------+------+ 2805 | urn:ietf:params:xml:ns:yang:ietf-srv6-types | The IESG | N/A | 2806 | | | | 2807 | urn:ietf:params:xml:ns:yang:ietf-srv6-base | The IESG | N/A | 2808 | urn:ietf:params:xml:ns:yang:ietf-srv6-static | The IESG | N/A | 2809 +-----------------------------------------------+------------+------+ 2811 This document requests the registration of the following YANG modules 2812 in the "YANG Module Names" registry [RFC6020]: 2814 +-------------+--------------------------------+----------+---------+ 2815 | Name | Namespace | Prefix | Referen | 2816 | | | | ce | 2817 +-------------+--------------------------------+----------+---------+ 2818 | ietf- | urn:ietf:params:xml:ns:yang | srv6-typ | This do | 2819 | srv6-types | :ietf-srv6-types | es | cument | 2820 | | | | | 2821 | ietf- | urn:ietf:params:xml:ns:yang | srv6 | This do | 2822 | srv6-base | :ietf-srv6-base | | cument | 2823 | | | | | 2824 | ietf- | urn:ietf:params:xml:ns:yang | srv6-sta | This do | 2825 | srv6-static | :ietf-srv6-static | tic | cument | 2826 +-------------+--------------------------------+----------+---------+ 2828 -- RFC Editor: Replace "This document" with the document RFC number 2829 at time of publication, and remove this note. 2831 8. Acknowledgments 2833 This draft is defining the similar YANG data model as 2834 [I-D.hu-spring-srv6-yang]. The authors of that draft have agreed to 2835 join this draft. 2837 The authors would like to acknowledge Darren Dukes, Les Ginsberge, 2838 and Ahmed Bashandy for their input and review. 2840 9. References 2842 9.1. Normative References 2844 [I-D.filsfils-spring-srv6-network-programming] 2845 Filsfils, C., Camarillo, P., Leddy, J., 2846 daniel.voyer@bell.ca, d., Matsushima, S., and Z. Li, "SRv6 2847 Network Programming", draft-filsfils-spring-srv6-network- 2848 programming-05 (work in progress), July 2018. 2850 [I-D.ietf-netmod-rfc6087bis] 2851 Bierman, A., "Guidelines for Authors and Reviewers of YANG 2852 Data Model Documents", draft-ietf-netmod-rfc6087bis-20 2853 (work in progress), March 2018. 2855 [I-D.ietf-spring-segment-routing] 2856 Filsfils, C., Previdi, S., Ginsberg, L., Decraene, B., 2857 Litkowski, S., and R. Shakir, "Segment Routing 2858 Architecture", draft-ietf-spring-segment-routing-15 (work 2859 in progress), January 2018. 2861 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2862 Requirement Levels", BCP 14, RFC 2119, 2863 DOI 10.17487/RFC2119, March 1997, 2864 . 2866 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2867 DOI 10.17487/RFC3688, January 2004, 2868 . 2870 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2871 the Network Configuration Protocol (NETCONF)", RFC 6020, 2872 DOI 10.17487/RFC6020, October 2010, 2873 . 2875 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2876 and A. Bierman, Ed., "Network Configuration Protocol 2877 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2878 . 2880 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 2881 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 2882 . 2884 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 2885 Protocol (NETCONF) Access Control Model", RFC 6536, 2886 DOI 10.17487/RFC6536, March 2012, 2887 . 2889 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2890 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2891 . 2893 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 2894 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 2895 . 2897 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2898 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2899 May 2017, . 2901 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 2902 "Common YANG Data Types for the Routing Area", RFC 8294, 2903 DOI 10.17487/RFC8294, December 2017, 2904 . 2906 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 2907 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 2908 . 2910 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 2911 Access Control Model", STD 91, RFC 8341, 2912 DOI 10.17487/RFC8341, March 2018, 2913 . 2915 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 2916 and R. Wilton, "Network Management Datastore Architecture 2917 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 2918 . 2920 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 2921 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 2922 . 2924 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 2925 Routing Management (NMDA Version)", RFC 8349, 2926 DOI 10.17487/RFC8349, March 2018, 2927 . 2929 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 2930 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 2931 . 2933 9.2. Informative References 2935 [I-D.hu-spring-srv6-yang] 2936 Li, Z., Matsushima, S., and K. Horiba, "YANG Data Model 2937 for SRv6", draft-hu-spring-srv6-yang-00 (work in 2938 progress), October 2017. 2940 [I-D.ietf-6man-segment-routing-header] 2941 Filsfils, C., Previdi, S., Leddy, J., Matsushima, S., and 2942 d. daniel.voyer@bell.ca, "IPv6 Segment Routing Header 2943 (SRH)", draft-ietf-6man-segment-routing-header-14 (work in 2944 progress), June 2018. 2946 [I-D.ietf-dmm-srv6-mobile-uplane] 2947 Matsushima, S., Filsfils, C., Kohno, M., Camarillo, P., 2948 daniel.voyer@bell.ca, d., and C. Perkins, "Segment Routing 2949 IPv6 for Mobile User Plane", draft-ietf-dmm-srv6-mobile- 2950 uplane-02 (work in progress), July 2018. 2952 [I-D.ietf-spring-sr-yang] 2953 Litkowski, S., Qu, Y., Sarkar, P., and J. Tantsura, "YANG 2954 Data Model for Segment Routing", draft-ietf-spring-sr- 2955 yang-09 (work in progress), June 2018. 2957 [I-D.xuclad-spring-sr-service-chaining] 2958 Clad, F., Xu, X., Filsfils, C., daniel.bernier@bell.ca, 2959 d., Li, C., Decraene, B., Ma, S., Yadlapalli, C., 2960 Henderickx, W., and S. Salsano, "Segment Routing for 2961 Service Chaining", draft-xuclad-spring-sr-service- 2962 chaining-01 (work in progress), March 2018. 2964 Authors' Addresses 2966 Kamran Raza 2967 Cisco Systems, Inc. 2968 2000 Innovation Drive 2969 Kanata, ON K2K-3E8 2970 CA 2972 Email: skraza@cisco.com 2974 Jaganbabu Rajamanickam 2975 Cisco Systems, Inc. 2976 2000 Innovation Drive 2977 Kanata, ON K2K-3E8 2978 CA 2980 Email: jrajaman@cisco.com 2982 Xufeng Liu 2983 Volta Networks 2985 Email: xufeng.liu.ietf@gmail.com 2987 Zhibo Hu 2988 Huawei Technologies 2990 Email: huzhibo@huawei.com 2992 Iftekhar Hussain 2993 Infinera Corporation 2995 Email: IHussain@infinera.com 2996 Himanshu Shah 2997 Ciena Corporation 2999 Email: hshah@ciena.com 3001 Daniel Voyer 3002 Bell Canada 3004 Email: daniel.voyer@bell.ca 3006 Hani Elmalky 3007 Ericsson 3009 Email: hani.elmalky@ericsson.com 3011 Satoru Matsushima 3012 SoftBank 3014 Email: satoru.matsushima@g.softbank.co.jp 3016 Katsuhiro Horiba 3017 SoftBank 3019 Email: katsuhiro.horiba@g.softbank.co.jp 3021 Ahmed AbdelSalam 3022 Gran Sasso Science Institute, Italy 3024 Email: ahmed.abdelsalam@gssi.it