idnits 2.17.1 draft-raza-spring-srv6-yang-04.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 60 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 42 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 255 has weird spacing: '...address ine...' == Line 302 has weird spacing: '...address ine...' == Line 310 has weird spacing: '...pported boo...' == Line 313 has weird spacing: '...pported boo...' == Line 322 has weird spacing: '...pported boo...' == (22 more instances...) == The document doesn't use any RFC 2119 keywords, yet has text resembling RFC 2119 boilerplate text. -- The document date (July 8, 2019) is 1748 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) == Outdated reference: A later version (-28) exists of draft-ietf-spring-srv6-network-programming-01 == Outdated reference: A later version (-26) exists of draft-ietf-6man-segment-routing-header-21 == Outdated reference: A later version (-24) exists of draft-ietf-dmm-srv6-mobile-uplane-05 == Outdated reference: A later version (-30) exists of draft-ietf-spring-sr-yang-13 Summary: 1 error (**), 0 flaws (~~), 13 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 4 Expires: January 9, 2020 5 X. Liu 6 Volta Networks 8 Z. Hu 9 Huawei Technologies 11 I. Hussain 12 Infinera Corporation 14 H. Shah 15 Ciena Corporation 17 D. Voyer 18 Bell Canada 20 H. Elmalky 22 S. Matsushima 23 K. Horiba 24 SoftBank 26 A. AbdelSalam 27 Cisco Systems 29 July 8, 2019 31 YANG Data Model for SRv6 Base and Static 32 draft-raza-spring-srv6-yang-04 34 Abstract 36 This document describes a YANG data model for Segment Routing IPv6 37 (SRv6) base. The model serves as a base framework for configuring 38 and managing an SRv6 subsystem and expected to be augmented by other 39 SRv6 technology models accordingly. Additionally, this document also 40 specifies the model for the SRv6 Static application. 42 The YANG modules in this document conform to the Network Management 43 Datastore Architecture (NMDA). 45 Status of This Memo 47 This Internet-Draft is submitted in full conformance with the 48 provisions of BCP 78 and BCP 79. 50 Internet-Drafts are working documents of the Internet Engineering 51 Task Force (IETF). Note that other groups may also distribute 52 working documents as Internet-Drafts. The list of current Internet- 53 Drafts is at https://datatracker.ietf.org/drafts/current/. 55 Internet-Drafts are draft documents valid for a maximum of six months 56 and may be updated, replaced, or obsoleted by other documents at any 57 time. It is inappropriate to use Internet-Drafts as reference 58 material or to cite them other than as "work in progress." 60 This Internet-Draft will expire on January 9, 2020. 62 Copyright Notice 64 Copyright (c) 2019 IETF Trust and the persons identified as the 65 document authors. All rights reserved. 67 This document is subject to BCP 78 and the IETF Trust's Legal 68 Provisions Relating to IETF Documents 69 (https://trustee.ietf.org/license-info) in effect on the date of 70 publication of this document. Please review these documents 71 carefully, as they describe your rights and restrictions with respect 72 to this document. Code Components extracted from this document must 73 include Simplified BSD License text as described in Section 4.e of 74 the Trust Legal Provisions and are provided without warranty as 75 described in the Simplified BSD License. 77 Table of Contents 79 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 80 2. Specification of Requirements . . . . . . . . . . . . . . . . 3 81 3. YANG Model . . . . . . . . . . . . . . . . . . . . . . . . . 4 82 3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4 83 3.2. SRv6 Types . . . . . . . . . . . . . . . . . . . . . . . 4 84 3.3. SRv6 Base . . . . . . . . . . . . . . . . . . . . . . . . 5 85 3.3.1. Configuration . . . . . . . . . . . . . . . . . . . . 5 86 3.3.2. State . . . . . . . . . . . . . . . . . . . . . . . . 6 87 3.3.3. Notification . . . . . . . . . . . . . . . . . . . . 8 88 3.4. SRv6 Static . . . . . . . . . . . . . . . . . . . . . . . 9 89 3.4.1. Configuration . . . . . . . . . . . . . . . . . . . . 9 90 3.4.2. State . . . . . . . . . . . . . . . . . . . . . . . . 15 91 3.4.3. Notification . . . . . . . . . . . . . . . . . . . . 15 92 4. Pending Items . . . . . . . . . . . . . . . . . . . . . . . . 15 93 5. YANG Specification . . . . . . . . . . . . . . . . . . . . . 15 94 5.1. SRv6 Types . . . . . . . . . . . . . . . . . . . . . . . 15 95 5.2. SRv6 Base . . . . . . . . . . . . . . . . . . . . . . . . 33 96 5.3. SRv6 Static . . . . . . . . . . . . . . . . . . . . . . . 48 97 6. Security Considerations . . . . . . . . . . . . . . . . . . . 70 98 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 71 99 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 71 100 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 72 101 9.1. Normative References . . . . . . . . . . . . . . . . . . 72 102 9.2. Informative References . . . . . . . . . . . . . . . . . 73 104 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 74 106 1. Introduction 108 The Network Configuration Protocol (NETCONF) [RFC6241] is one of the 109 network management protocols that defines mechanisms to manage 110 network devices. YANG [RFC6020] is a modular language that 111 represents data structures in an XML tree format, and is used as a 112 data modeling language for the NETCONF. 114 Segment Routing (SR), as defined in [RFC8402], leverages the source 115 routing paradigm where a node steers a packet through an ordered list 116 of instructions, called segments. SR, thus, allows enforcing a flow 117 through any topological path and/or service chain while maintaining 118 per-flow state only at the ingress nodes to the SR domain. When 119 applied to ipv6 data-plane (i.e. SRv6), SR requires a type of 120 routing header (SRH) in an IPv6 packet that is used to encode an 121 ordered list of IPv6 addresses (SIDs). The active segment is 122 indicated by the Destination Address of the packet, and the next 123 segment is indicated by a pointer in the SRH 124 [I-D.ietf-6man-segment-routing-header]. The various functions and 125 behaviors corresponding to network programming using SRv6 are 126 specified in [I-D.ietf-spring-srv6-network-programming]. 128 This document introduces a YANG data model for base SRv6 that would 129 serve as a base framework for configuring and managing an SRv6 130 subsystem. As needed, other SRv6 technology models (e.g. ISIS, 131 OSPFv3, BGP, EVPN, Service Chaining) may augment this model. 132 Furthermore, to illustrate basic behaviors as captured in 133 [I-D.ietf-spring-srv6-network-programming], this document also 134 specifies a YANG model for the SRv6-Static application. 136 The model currently defines the following constructs that are used 137 for managing SRv6: 139 o Configuration 141 o Operational State 143 o Notifications 145 2. Specification of Requirements 147 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 148 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 149 document are to be interpreted as described in BCP 14 [RFC2119] 150 [RFC8174] when, and only when, they appear in all capitals, as shown 151 here. 153 3. YANG Model 155 3.1. Overview 157 This document defines following three new YANG modules: 159 o ietf-srv6-types: defines common and basic types related to SRv6 161 o ietf-srv6-base: specifies management model for SRv6 base 162 constructs (locator, SIDs, etc.) 164 o ietf-srv6-static: specifies management model for SRv6-static 165 application 167 The modeling in this document complies with the Network Management 168 Datastore Architecture (NMDA) defined in [RFC8342]. The operational 169 state data is combined with the associated configuration data in the 170 same hierarchy [RFC8407]. When protocol states are retrieved from 171 the NMDA operational state datastore, the returned states cover all 172 "config true" (rw) and "config false" (ro) nodes defined in the 173 schema. 175 In this document, when a simplified graphical representation of YANG 176 model is presented in a tree diagram, the meaning of the symbols in 177 these tree diagrams is defined in [RFC8340]. 179 3.2. SRv6 Types 181 SRv6 common types and definitions are defined in the new module 182 "ietf-srv6-types". The main types defined in this module include: 184 o srv6-sid: SRv6 SID 186 o srv6-func-opcode: Typedef for FUNC opcode in an SRv6 SID 188 o srv6-func-opcode-reserved: Typedef for "reserved" FUNC opcode 190 o srv6-func-opcode-unreserved: Typedef for "unreserved" 191 (allocatable) FUNC opcode 193 o srv6-func-opcode-reserved-type: Enum (list) of "reserved" FUNC 194 opcode 196 o srv6-endpoint-type: SRv6 Endpoint behaviors 197 [I-D.ietf-spring-srv6-network-programming] identity type 199 o srv6-transit-type: SRv6 Transit behavior types 200 [I-D.ietf-spring-srv6-network-programming] identity type 202 o srv6-security-type: SRv6 Security rule type 203 [I-D.ietf-spring-srv6-network-programming] identity type 205 o srv6-counter-type: SRv6 Counter type 206 [I-D.ietf-spring-srv6-network-programming] identity type 208 The corresponding YANG specification for this module is captured in 209 Section 5.1. 211 3.3. SRv6 Base 213 The base SRv6 model is specified in ietf-srv6-base module. This 214 module augments "/rt:routing" and specifies the configuration, 215 operational state, and notification events that are required to 216 manage the base SRv6. 218 The corresponding YANG specification for this module is captured in 219 Section 5.2. 221 3.3.1. Configuration 223 The module defines some fundamental items required to configure an 224 SRv6 network: 226 o SRv6 Enablement: Enable Segment-Routing SRv6 feature 228 o Encapsulation Parameters: Provide encapsulation related 229 parameters, such as source-address and ip-ttl-propagation, to be 230 used when performing T.Encap* 232 o Locator(s) Specification: SRv6 locator is a fundamental construct 233 for an SRv6 network. This is the construct from which SID 234 (function opcodes) are allocated that on the local box, and 235 advertised to and used by remote nodes for reachability. A 236 locator is identified by a name and has associated prefix. It is 237 possible to have more than one locator per node. In case of more 238 than one locator, there is one and only one locator designated as 239 the default locator. 241 Following is a simplified graphical tree representation of the data 242 model for SRv6 base configuration 243 module: ietf-srv6-base 244 augment /rt:routing: 245 +--rw srv6 246 +--rw enable? boolean 247 +--rw encapsulation 248 | +--rw source-address? inet:ipv6-address 249 | +--rw ip-ttl-propagation? boolean 250 +--rw locators 251 +--rw locator* [name] 252 +--rw name string 253 +--rw enable? boolean 254 +--rw prefix 255 | +--rw address inet:ipv6-address 256 | +--rw length srv6-types:srv6-locator-len 257 +--rw algorithm? uint32 259 Figure 1: SRv6 Base - Config Tree 261 3.3.2. State 263 As per NMDA model, the state related to configuration items specified 264 in above section Section 3.3.1 can be retrieved from the same tree. 265 This section defines other operational state items related to SRv6 266 base. 268 The operational state corresponding to the SRv6 base includes: 270 o node capabilities: provides information on the node (hardware) 271 capabilities and support regarding various SRv6 aspects and 272 features including end behaviors, transit behaviors, security 273 rules, counter/stats support, and other SRv6 parameters that need 274 to be signaled in an SRv6 network by the protocols. 276 o locator: provides information related to a locator. The 277 information includes locator operational state, and state of 278 address conflict with any ipv6 address configured on local 279 interfaces etc. 281 o local-sid: provides information related to local-SIDs allocated 282 and/or installed on the node. This includes two types of 283 information: 285 1. aggregate across all local-SIDs such as aggregate counters 287 2. per local-SID information such as allocation type (dynamic or 288 explicit), SID owner protocol(s)/client(s), forwarding [paths] 289 information, and stats/counters. 291 Following is a simplified graphical tree representation of the data 292 model for the SRv6 operational state: 294 module: ietf-srv6-base 295 augment /rt:routing: 296 +--rw srv6 297 +--rw locators 298 | +--rw locator* [name] 299 | +--rw name string 300 | +--rw enable? boolean 301 | +--rw prefix 302 | | +--rw address inet:ipv6-address 303 | | +--rw length srv6-types:srv6-locator-len 304 | +--rw algorithm? uint32 305 | +--ro operational-status? srv6-types:srv6-status-type 306 | +--ro is-in-address-conflict? boolean 307 +--ro node-capabilities 308 | +--ro end-behavior* [type] 309 | | +--ro type identityref 310 | | +--ro supported boolean 311 | +--ro transit-behavior* [type] 312 | | +--ro type identityref 313 | | +--ro supported boolean 314 | +--ro signaled-parameters 315 | | +--ro max-sl? uint8 316 | | +--ro max-end-pop-srh? uint8 317 | | +--ro max-t_insert? uint8 318 | | +--ro max-t_encap? uint8 319 | | +--ro max-end_d? uint8 320 | +--ro security-rule* [type] 321 | | +--ro type identityref 322 | | +--ro supported boolean 323 | +--ro counters* [type] 324 | +--ro type identityref 325 | +--ro supported boolean 326 +--ro local-sids 327 +--ro counters 328 | +--ro cnt-3 329 | +--ro in-pkts? yang:counter64 330 | +--ro in-octets? yang:counter64 331 +--ro local-sid* [sid] 332 +--ro sid srv6-types:srv6-sid 333 +--ro locator? -> /rt:routing/srv6:srv6/locators/locator/name 334 +--ro is-reserved? boolean 335 +--ro end-behavior-type? identityref 336 +--ro alloc-type? srv6-types:sid-alloc-type 337 +--ro owner* [type instance] 338 | +--ro type identityref 339 | +--ro instance string 340 | +--ro is-winner? boolean 341 +--ro forwarding 342 | +--ro is-installed? boolean 343 | +--ro next-hop-type? srv6-types:srv6-nexthop-type 344 | +--ro paths 345 | +--ro path* [path-index] 346 | +--ro path-index uint8 347 | +--ro l2 348 | | +--ro interface? if:interface-ref 349 | +--ro l3 350 | | +--ro interface? if:interface-ref 351 | | +--ro next-hop? inet:ip-address 352 | | +--ro weight? uint32 353 | | +--ro role? enumeration 354 | | +--ro backup-path-index? uint8 355 | +--ro (encap-type)? 356 | +--:(srv6) 357 | | +--ro out-sid* [sid] 358 | | +--ro sid srv6-types:srv6-sid 359 | +--:(mpls) 360 | +--ro out-label* [label] 361 | +--ro label rt-types:mpls-label 362 +--ro counters 363 +--ro cnt-1 364 +--ro in-pkts? yang:counter64 365 +--ro in-octets? yang:counter64 367 Figure 2: SRv6 Base - State Tree 369 3.3.3. Notification 371 This model defines a list of notifications to inform an operator of 372 important events detected during the SRv6 operation. These events 373 include events related to: 375 o locator operational state changes 377 o local-SID collision event 379 Following is a simplified graphical tree representation of the data 380 model for SRv6 notifications: 382 notifications: 383 +---n srv6-locator-status-event 384 | +--ro operational-status? srv6-types:srv6-status-type 385 | +--ro locator? -> /rt:routing/srv6:srv6/locators/locator/name 386 +---n srv6-sid-collision-event 387 +--ro sid? srv6-types:srv6-sid 388 +--ro existing 389 | +--ro end-behavior-type? identityref 390 +--ro requested 391 +--ro end-behavior-type? identityref 393 Figure 3: SRv6 Base - Notification Tree 395 3.4. SRv6 Static 397 SRv6-Static application allows a user to specify SRv6 local SIDs and 398 program them in the forwarding plane. The SRv6-Static model is 399 captured in the ietf-srv6-static module. 401 The associated YANG specification for this module is captured in 402 Section 5.3. 404 3.4.1. Configuration 406 The SRv6-Static configuration augments the SRv6-base locator tree 407 "/rt:routing/srv6:srv6/srv6:locators/srv6:locator" 409 Following are salient features of the SRv6-Static config model: 411 o Allows static (explicit) configuration for local-SIDs under a 412 given locator 414 o Given that entry is scoped under a locator, the key for each entry 415 is function "opcode" 417 o A user must also specify end-behavior type (End* function) 418 associated with the entry 420 o A user must also specify behavior-specific data with each entry. 421 For example, for any end behavior requiring a table lookup, a 422 lookup-table need be provided. Similarly, for any end behavior 423 with forwarding next-hops need to specify next-hop information. 424 The example of former include End, End.T, End.DT4, End.DT6, and 425 End.DT46, whereas example of later include End.X, End.DX4, 426 End.DX6, End.B6, End.BM etc. 428 o Each local-SID entry has zero or more forwarding paths specified. 430 o A forwarding path has next-hop type that depends on the end 431 behavior, and could be either ipv6, or ipv4, or mpls, or l2 type. 432 For example, End.X, End.DX4, End.DX6, End.B6, End.BM, and End.DX2 433 will have ipv6, ipv4, ipv6, ipv6, mpls, and l2 next-hop types 434 respectively 436 o For each forwarding next-hop type, the appropriate path attributes 437 are to be specified as well. For L2 type, the only other 438 information required is the L2 interface name. Whereas for L3 439 (ipv6, ipv4, mpls) types, the information includes L3 interface 440 name, next-hop IP address, weight, and protection information. 442 o Depending on the end behavior type, a forwarding path may have 443 either MPLS or SRv6 encapsulation -- i.e., Stack of out-labels or 444 Stack of SRv6 out-SIDs. The example of former is End.BM and 445 example of later include the rest (End.X, End.DX4/DX6, End.B6 446 etc.). 448 Following is a simplified graphical tree representation of the data 449 model for SRv6 Static configuration 451 module: ietf-srv6-static 452 augment /rt:routing/srv6:srv6/srv6:locators/srv6:locator: 453 +--rw static 454 +--rw local-sids 455 +--rw sid* [opcode] 456 +--rw opcode srv6-types:srv6-func-opcode-unreserved 457 +--rw end-behavior-type identityref 458 +--rw end 459 +--rw end_psp 460 +--rw end_usp 461 +--rw end_psp_usp 462 +--rw end_usd 463 +--rw end_psp_usd 464 +--rw end_usp_usd 465 +--rw end_psp_usp_usd 466 +--rw end-t 467 | +--rw lookup-table-ipv6 srv6-types:table-id 468 +--rw end-t_psp 469 | +--rw lookup-table-ipv6 srv6-types:table-id 470 +--rw end-t_usp 471 | +--rw lookup-table-ipv6 srv6-types:table-id 472 +--rw end-t_psp_usp 473 | +--rw lookup-table-ipv6 srv6-types:table-id 474 +--rw end-t_usd 475 | +--rw lookup-table-ipv6 srv6-types:table-id 476 +--rw end-t_psp_usd 477 | +--rw lookup-table-ipv6 srv6-types:table-id 478 +--rw end-t_usp_usd 479 | +--rw lookup-table-ipv6 srv6-types:table-id 480 +--rw end-t_psp_usp_usd 481 | +--rw lookup-table-ipv6 srv6-types:table-id 482 +--rw end-x 483 | +--rw protected? boolean 484 | +--rw paths 485 | +--rw path* [path-index] 486 | +--rw path-index uint8 487 | +--rw interface? if:interface-ref 488 | +--rw next-hop? inet:ipv6-address 489 | +--rw weight? uint32 490 | +--rw role? enumeration 491 | +--rw backup-path-index? uint8 492 | +--rw encap 493 | +--rw out-sid* [sid] 494 | +--rw sid srv6-types:srv6-sid 495 +--rw end-x_psp 496 | +--rw protected? boolean 497 | +--rw paths 498 | +--rw path* [path-index] 499 | +--rw path-index uint8 500 | +--rw interface? if:interface-ref 501 | +--rw next-hop? inet:ipv6-address 502 | +--rw weight? uint32 503 | +--rw role? enumeration 504 | +--rw backup-path-index? uint8 505 | +--rw encap 506 | +--rw out-sid* [sid] 507 | +--rw sid srv6-types:srv6-sid 508 +--rw end-x_usp 509 | +--rw protected? boolean 510 | +--rw paths 511 | +--rw path* [path-index] 512 | +--rw path-index uint8 513 | +--rw interface? if:interface-ref 514 | +--rw next-hop? inet:ipv6-address 515 | +--rw weight? uint32 516 | +--rw role? enumeration 517 | +--rw backup-path-index? uint8 518 | +--rw encap 519 | +--rw out-sid* [sid] 520 | +--rw sid srv6-types:srv6-sid 521 +--rw end-x_psp_usp 522 | +--rw protected? boolean 523 | +--rw paths 524 | +--rw path* [path-index] 525 | +--rw path-index uint8 526 | +--rw interface? if:interface-ref 527 | +--rw next-hop? inet:ipv6-address 528 | +--rw weight? uint32 529 | +--rw role? enumeration 530 | +--rw backup-path-index? uint8 531 | +--rw encap 532 | +--rw out-sid* [sid] 533 | +--rw sid srv6-types:srv6-sid 534 +--rw end-x_usd 535 | +--rw protected? boolean 536 | +--rw paths 537 | +--rw path* [path-index] 538 | +--rw path-index uint8 539 | +--rw interface? if:interface-ref 540 | +--rw next-hop? inet:ipv6-address 541 | +--rw weight? uint32 542 | +--rw role? enumeration 543 | +--rw backup-path-index? uint8 544 | +--rw encap 545 | +--rw out-sid* [sid] 546 | +--rw sid srv6-types:srv6-sid 547 +--rw end-x_psp_usd 548 | +--rw protected? boolean 549 | +--rw paths 550 | +--rw path* [path-index] 551 | +--rw path-index uint8 552 | +--rw interface? if:interface-ref 553 | +--rw next-hop? inet:ipv6-address 554 | +--rw weight? uint32 555 | +--rw role? enumeration 556 | +--rw backup-path-index? uint8 557 | +--rw encap 558 | +--rw out-sid* [sid] 559 | +--rw sid srv6-types:srv6-sid 560 +--rw end-x_usp_usd 561 | +--rw protected? boolean 562 | +--rw paths 563 | +--rw path* [path-index] 564 | +--rw path-index uint8 565 | +--rw interface? if:interface-ref 566 | +--rw next-hop? inet:ipv6-address 567 | +--rw weight? uint32 568 | +--rw role? enumeration 569 | +--rw backup-path-index? uint8 570 | +--rw encap 571 | +--rw out-sid* [sid] 572 | +--rw sid srv6-types:srv6-sid 573 +--rw end-x_psp_usp_usd 574 | +--rw protected? boolean 575 | +--rw paths 576 | +--rw path* [path-index] 577 | +--rw path-index uint8 578 | +--rw interface? if:interface-ref 579 | +--rw next-hop? inet:ipv6-address 580 | +--rw weight? uint32 581 | +--rw role? enumeration 582 | +--rw backup-path-index? uint8 583 | +--rw encap 584 | +--rw out-sid* [sid] 585 | +--rw sid srv6-types:srv6-sid 586 +--rw end-b6-insert 587 | +--rw policy-name string 588 | +--rw paths 589 | +--rw path* [path-index] 590 | +--rw path-index uint8 591 | +--rw interface? if:interface-ref 592 | +--rw next-hop? inet:ipv6-address 593 | +--rw weight? uint32 594 | +--rw role? enumeration 595 | +--rw backup-path-index? uint8 596 | +--rw encap 597 | +--rw out-sid* [sid] 598 | +--rw sid srv6-types:srv6-sid 599 +--rw end-b6-encaps 600 | +--rw policy-name string 601 | +--rw source-address inet:ipv6-address 602 | +--rw paths 603 | +--rw path* [path-index] 604 | +--rw path-index uint8 605 | +--rw interface? if:interface-ref 606 | +--rw next-hop? inet:ipv6-address 607 | +--rw weight? uint32 608 | +--rw role? enumeration 609 | +--rw backup-path-index? uint8 610 | +--rw encap 611 | +--rw out-sid* [sid] 612 | +--rw sid srv6-types:srv6-sid 613 +--rw end-bm 614 | +--rw policy-name string 615 | +--rw paths 616 | +--rw path* [path-index] 617 | +--rw path-index uint8 618 | +--rw interface? if:interface-ref 619 | +--rw next-hop? inet:ip-address 620 | +--rw weight? uint32 621 | +--rw role? enumeration 622 | +--rw backup-path-index? uint8 623 | +--rw encap 624 | +--rw out-label* [label] 625 | +--rw label rt-types:mpls-label 626 +--rw end-dx6 627 | +--rw paths 628 | +--rw path* [path-index] 629 | +--rw path-index uint8 630 | +--rw interface? if:interface-ref 631 | +--rw next-hop? inet:ipv6-address 632 | +--rw weight? uint32 633 | +--rw role? enumeration 634 | +--rw backup-path-index? uint8 635 | +--rw encap 636 | +--rw out-sid* [sid] 637 | +--rw sid srv6-types:srv6-sid 638 +--rw end-dx4 639 | +--rw paths 640 | +--rw path* [path-index] 641 | +--rw path-index uint8 642 | +--rw interface? if:interface-ref 643 | +--rw next-hop? inet:ipv4-address 644 | +--rw weight? uint32 645 | +--rw role? enumeration 646 | +--rw backup-path-index? uint8 647 | +--rw encap 648 | +--rw out-sid* [sid] 649 | +--rw sid srv6-types:srv6-sid 650 +--rw end-dt6 651 | +--rw lookup-table-ipv6 srv6-types:table-id 652 +--rw end-dt4 653 | +--rw lookup-table-ipv4 srv6-types:table-id 654 +--rw end-dt46 655 | +--rw lookup-table-ipv4 srv6-types:table-id 656 | +--rw lookup-table-ipv6 srv6-types:table-id 657 +--rw end-dx2 658 | +--rw paths 659 | +--rw interface if:interface-ref 660 +--rw end-otp 662 Figure 4: SRv6 Static - Config Tree 664 3.4.2. State 666 As per NMDA model, the state related to configuration items specified 667 in above section Section 3.4.1 can be retrieved from the same tree. 668 The state regarding the local-SIDs created by SRv6-static model can 669 be obtained using the state model of SRv6-base. Hence, there is no 670 additional state identified at this time for SRv6-static. 672 3.4.3. Notification 674 None. 676 4. Pending Items 678 Following are the items that will be addressed in next revisions: 680 o Align SRv6 base with SR (MPLS) model [I-D.ietf-spring-sr-yang]. 682 o Extend local-SID collision event/notification in SRv6-base model. 684 o Add RPC support in the SRv6-base model. 686 o Add EVPN End functions in the SRv6-Static model. 688 o Add Service Chaining End functions in the SRv6-Static model. 690 o Add ARGS support in the SRv6-Static model. 692 o QoS support 694 5. YANG Specification 696 Following are actual YANG definition for SRv6 modules defined earlier 697 in the document. 699 5.1. SRv6 Types 701 This YANG module imports types defined in [RFC6991]. 703 Moreover, the module models behaviors defined in 704 [I-D.ietf-spring-srv6-network-programming], 705 [I-D.xuclad-spring-sr-service-chaining], and 706 [I-D.ietf-dmm-srv6-mobile-uplane]. 708 file "ietf-srv6-types@2019-07-08.yang" --> 710 module ietf-srv6-types { 711 yang-version 1.1; 713 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-types"; 714 prefix srv6-types; 716 import ietf-inet-types { 717 prefix inet; 718 reference "RFC 6991: Common YANG Data Types"; 719 } 721 organization 722 "IETF SPRING Working Group"; 723 contact 724 "WG Web: 725 WG List: 727 Editor: Kamran Raza 728 730 Editor: Jaganbabu Rajamanickam 731 733 Editor: Xufeng Liu 734 736 Editor: Zhibo Hu 737 739 Editor: Iftekhar Hussain 740 742 Editor: Himanshu Shah 743 745 Editor: Daniel Voyer 746 748 Editor: Hani Elmalky 749 751 Editor: Satoru Matsushima 752 754 Editor: Katsuhiro Horiba 755 757 Editor: Ahmed AbdelSalam 758 760 "; 762 description 763 "This YANG module defines the essential types for the 764 management of Segment-Routing with IPv6 dataplane (SRv6). 766 Copyright (c) 2018 IETF Trust and the persons identified as 767 authors of the code. All rights reserved. 769 Redistribution and use in source and binary forms, with or 770 without modification, is permitted pursuant to, and subject 771 to the license terms contained in, the Simplified BSD License 772 set forth in Section 4.c of the IETF Trust's Legal Provisions 773 Relating to IETF Documents 774 (http://trustee.ietf.org/license-info)."; 776 reference "RFC XXXX"; 777 // RFC Editor: replace XXXX with actual RFC number and remove 778 // this note 780 revision 2019-07-08 { 781 description 782 "Alignment with latest SRv6 network programming"; 783 reference 784 "RFC XXXX: YANG Data Model for SRv6"; 785 // RFC Editor: replace XXXX with actual RFC number and remove 786 // this note 787 } 789 revision 2018-10-22 { 790 description 791 "Initial revision."; 792 reference 793 "RFC XXXX: YANG Data Model for SRv6"; 794 // RFC Editor: replace XXXX with actual RFC number and remove 795 // this note 796 } 798 identity srv6-endpoint-type { 799 description 800 "Base identity from which specific SRv6 Endpoint types are derived."; 801 } 803 /* Endpoints defined under draft-filsfils-spring-srv6-network-programming */ 805 identity End { 806 base srv6-endpoint-type; 807 description 808 "End function (variant: no PSP, no USP)."; 809 reference 810 "draft-ietf-spring-srv6-network-programming-01"; 811 // RFC Editor: replace with actual RFC number and remove this note 812 } 814 identity End_PSP { 815 base srv6-endpoint-type; 816 description 817 "End function (variant: PSP only)."; 818 reference 819 "draft-ietf-spring-srv6-network-programming-01"; 820 // RFC Editor: replace with actual RFC number and remove this note 821 } 823 identity End_USP { 824 base srv6-endpoint-type; 825 description 826 "End function (variant: USP only)."; 827 reference 828 "draft-ietf-spring-srv6-network-programming-01"; 829 // RFC Editor: replace with actual RFC number and remove this note 830 } 832 identity End_PSP_USP { 833 base srv6-endpoint-type; 834 description 835 "End function (variant: PSP and USP)."; 836 reference 837 "draft-ietf-spring-srv6-network-programming-01"; 838 // RFC Editor: replace with actual RFC number and remove this note 839 } 841 identity End.X { 842 base srv6-endpoint-type; 843 description 844 "Endpoint with cross-connect to an array 845 of layer-3 adjacencies (variant: no PSP, no USP)."; 846 reference 847 "draft-ietf-spring-srv6-network-programming-01"; 848 // RFC Editor: replace with actual RFC number and remove this note 849 } 851 identity End.X_PSP { 852 base srv6-endpoint-type; 853 description 854 "Endpoint with cross-connect to an array 855 of layer-3 adjacencies (variant: PSP only)."; 857 reference 858 "draft-ietf-spring-srv6-network-programming-01"; 859 // RFC Editor: replace with actual RFC number and remove this note 860 } 862 identity End.X_USP { 863 base srv6-endpoint-type; 864 description 865 "Endpoint with cross-connect to an array 866 of layer-3 adjacencies (variant: USP only)."; 867 reference 868 "draft-ietf-spring-srv6-network-programming-01"; 869 // RFC Editor: replace with actual RFC number and remove this note 870 } 872 identity End.X_PSP_USP { 873 base srv6-endpoint-type; 874 description 875 "Endpoint with cross-connect to an array 876 of layer-3 adjacencies (variant: PSP and USP)."; 877 reference 878 "draft-ietf-spring-srv6-network-programming-01"; 879 // RFC Editor: replace with actual RFC number and remove this note 880 } 882 identity End.T { 883 base srv6-endpoint-type; 884 description 885 "Endpoint with specific IPv6 table lookup 886 (variant: no PSP, no USP)."; 887 reference 888 "draft-ietf-spring-srv6-network-programming-01"; 889 // RFC Editor: replace with actual RFC number and remove this note 890 } 892 identity End.T_PSP { 893 base srv6-endpoint-type; 894 description 895 "Endpoint with specific IPv6 table lookup 896 (variant: PSP only)."; 897 reference 898 "draft-ietf-spring-srv6-network-programming-01"; 899 // RFC Editor: replace with actual RFC number and remove this note 900 } 902 identity End.T_USP { 903 base srv6-endpoint-type; 904 description 905 "Endpoint with specific IPv6 table lookup 906 (variant: USP only)."; 907 reference 908 "draft-ietf-spring-srv6-network-programming-01"; 909 // RFC Editor: replace with actual RFC number and remove this note 910 } 912 identity End.T_PSP_USP { 913 base srv6-endpoint-type; 914 description 915 "Endpoint with specific IPv6 table lookup 916 (variant: PSP and USP)."; 917 reference 918 "draft-ietf-spring-srv6-network-programming-01"; 919 // RFC Editor: replace with actual RFC number and remove this note 920 } 922 identity End.B6.Insert { 923 base srv6-endpoint-type; 924 description 925 "Endpoint bound to an SRv6 Policy"; 926 reference 927 "draft-ietf-spring-srv6-network-programming-01"; 928 // RFC Editor: replace with actual RFC number and remove this note 929 } 931 identity End.B6.Encaps { 932 base srv6-endpoint-type; 933 description 934 "This is a variation of the End.B6.Insert behavior 935 where the SRv6 Policy also includes an 936 IPv6 Source Address A."; 937 reference 938 "draft-ietf-spring-srv6-network-programming-01"; 939 // RFC Editor: replace with actual RFC number and remove this note 940 } 942 identity End.BM { 943 base srv6-endpoint-type; 944 description 945 "Endpoint bound to an SR-MPLS Policy"; 946 reference 947 "draft-ietf-spring-srv6-network-programming-01"; 948 // RFC Editor: replace with actual RFC number and remove this note 949 } 951 identity End.DX6 { 952 base srv6-endpoint-type; 953 description 954 "Endpoint with decapsulation and cross-connect 955 to an array of IPv6 adjacencies"; 956 reference 957 "draft-ietf-spring-srv6-network-programming-01"; 958 // RFC Editor: replace with actual RFC number and remove this note 959 } 961 identity End.DX4 { 962 base srv6-endpoint-type; 963 description 964 "Endpoint with decapsulation and cross-connect 965 to an array of IPv4 adjacencies"; 966 reference 967 "draft-ietf-spring-srv6-network-programming-01"; 968 // RFC Editor: replace with actual RFC number and remove this note 969 } 971 identity End.DT6 { 972 base srv6-endpoint-type; 973 description 974 "Endpoint with decapsulation and specific 975 IPv6 table lookup"; 976 reference 977 "draft-ietf-spring-srv6-network-programming-01"; 978 // RFC Editor: replace with actual RFC number and remove this note 979 } 981 identity End.DT4 { 982 base srv6-endpoint-type; 983 description 984 "Endpoint with decapsulation and specific 985 IPv4 table lookup"; 986 reference 987 "draft-ietf-spring-srv6-network-programming-01"; 988 // RFC Editor: replace with actual RFC number and remove this note 989 } 991 identity End.DT46 { 992 base srv6-endpoint-type; 993 description 994 "Endpoint with decapsulation and specific IP 995 (IPv4 or IPv6) table lookup"; 996 reference 997 "draft-ietf-spring-srv6-network-programming-01"; 998 // RFC Editor: replace with actual RFC number and remove this note 999 } 1000 identity End.DX2 { 1001 base srv6-endpoint-type; 1002 description 1003 "Endpoint with decapsulation and Layer-2 1004 cross-connect to an L2 interface"; 1005 reference 1006 "draft-ietf-spring-srv6-network-programming-01"; 1007 // RFC Editor: replace with actual RFC number and remove this note 1008 } 1010 identity End.DX2V { 1011 base srv6-endpoint-type; 1012 description 1013 "Endpoint with decapsulation and specific 1014 VLAN L2 table lookup"; 1015 reference 1016 "draft-ietf-spring-srv6-network-programming-01"; 1017 // RFC Editor: replace with actual RFC number and remove this note 1018 } 1020 identity End.DT2U { 1021 base srv6-endpoint-type; 1022 description 1023 "Endpoint with decapsulation and specific 1024 unicast MAC L2 table lookup"; 1025 reference 1026 "draft-ietf-spring-srv6-network-programming-01"; 1027 // RFC Editor: replace with actual RFC number and remove this note 1028 } 1030 identity End.DT2M { 1031 base srv6-endpoint-type; 1032 description 1033 "Endpoint with decapsulation and specific L2 table 1034 flooding"; 1035 reference 1036 "draft-ietf-spring-srv6-network-programming-01"; 1037 // RFC Editor: replace with actual RFC number and remove this note 1038 } 1040 identity End.OTP { 1041 base srv6-endpoint-type; 1042 description 1043 "Endpoint for OAM operation of timestamp and punt"; 1044 reference 1045 "draft-ietf-spring-srv6-network-programming-01"; 1046 // RFC Editor: replace with actual RFC number and remove this note 1047 } 1048 identity End.S { 1049 base srv6-endpoint-type; 1050 description 1051 "Endpoint in search of a target in table TE"; 1052 reference 1053 "draft-ietf-spring-srv6-network-programming-01"; 1054 // RFC Editor: replace with actual RFC number and remove this note 1055 } 1057 identity End.B6.Insert.Red { 1058 base srv6-endpoint-type; 1059 description 1060 "This is a reduced insert variation of the End.B6.Insert behavior"; 1061 reference 1062 "draft-ietf-spring-srv6-network-programming-01"; 1063 // RFC Editor: replace with actual RFC number and remove this note 1064 } 1066 identity End.B6.Encaps.Red { 1067 base srv6-endpoint-type; 1068 description 1069 "This is a reduced encap variation of the End.B6.Encap behavior."; 1070 reference 1071 "draft-ietf-spring-srv6-network-programming-01"; 1072 // RFC Editor: replace with actual RFC number and remove this note 1073 } 1075 identity End_USD { 1076 base srv6-endpoint-type; 1077 description 1078 "End function (variant: USD)."; 1079 reference 1080 "draft-ietf-spring-srv6-network-programming-01"; 1081 // RFC Editor: replace with actual RFC number and remove this note 1082 } 1084 identity End.PSP_USD { 1085 base srv6-endpoint-type; 1086 description 1087 "End function (variant: PSP and USD)."; 1088 reference 1089 "draft-ietf-spring-srv6-network-programming-01"; 1090 // RFC Editor: replace with actual RFC number and remove this note 1091 } 1093 identity End.USP_USD { 1094 base srv6-endpoint-type; 1095 description 1096 "End function (variant: USP and USD)."; 1097 reference 1098 "draft-ietf-spring-srv6-network-programming-01"; 1099 // RFC Editor: replace with actual RFC number and remove this note 1100 } 1102 identity End.PSP_USP_USD { 1103 base srv6-endpoint-type; 1104 description 1105 "End function (variant: PSP and USP and USD)."; 1106 reference 1107 "draft-ietf-spring-srv6-network-programming-01"; 1108 // RFC Editor: replace with actual RFC number and remove this note 1109 } 1111 identity End.X_USD { 1112 base srv6-endpoint-type; 1113 description 1114 "Endpoint with cross-connect to an array 1115 of layer-3 adjacencies (variant: USD)."; 1116 reference 1117 "draft-ietf-spring-srv6-network-programming-01"; 1118 // RFC Editor: replace with actual RFC number and remove this note 1119 } 1121 identity End.X_PSP_USD { 1122 base srv6-endpoint-type; 1123 description 1124 "Endpoint with cross-connect to an array 1125 of layer-3 adjacencies (variant: PSP and USD)."; 1126 reference 1127 "draft-ietf-spring-srv6-network-programming-01"; 1128 // RFC Editor: replace with actual RFC number and remove this note 1129 } 1131 identity End.X_USP_USD { 1132 base srv6-endpoint-type; 1133 description 1134 "Endpoint with cross-connect to an array 1135 of layer-3 adjacencies (variant: USP and USD)."; 1136 reference 1137 "draft-ietf-spring-srv6-network-programming-01"; 1138 // RFC Editor: replace with actual RFC number and remove this note 1139 } 1141 identity End.X_PSP_USP_USD { 1142 base srv6-endpoint-type; 1143 description 1144 "Endpoint with cross-connect to an array 1145 of layer-3 adjacencies (variant: PSP and USP and USD)."; 1146 reference 1147 "draft-ietf-spring-srv6-network-programming-01"; 1148 // RFC Editor: replace with actual RFC number and remove this note 1149 } 1151 identity End.T_USD { 1152 base srv6-endpoint-type; 1153 description 1154 "Endpoint with decapsulation and Layer-2 1155 cross-connect to an L2 interface"; 1156 reference 1157 "draft-ietf-spring-srv6-network-programming-01"; 1158 // RFC Editor: replace with actual RFC number and remove this note 1159 } 1161 identity End.T_PSP_USD { 1162 base srv6-endpoint-type; 1163 description 1164 "Endpoint with specific IPv6 table lookup 1165 (variant: PSP and USD)."; 1166 reference 1167 "draft-ietf-spring-srv6-network-programming-01"; 1168 // RFC Editor: replace with actual RFC number and remove this note 1169 } 1171 identity End.T_USP_USD { 1172 base srv6-endpoint-type; 1173 description 1174 "Endpoint with specific IPv6 table lookup 1175 (variant: USP and USD)."; 1176 reference 1177 "draft-ietf-spring-srv6-network-programming-01"; 1178 // RFC Editor: replace with actual RFC number and remove this note 1179 } 1181 identity End.T_PSP_USP_USD { 1182 base srv6-endpoint-type; 1183 description 1184 "Endpoint with specific IPv6 table lookup 1185 (variant: PSP and USP and USD)."; 1186 reference 1187 "draft-ietf-spring-srv6-network-programming-01"; 1188 // RFC Editor: replace with actual RFC number and remove this note 1189 } 1191 /* Endpoints defined under draft-xuclad-spring-sr-service-chaining */ 1192 identity End.AS { 1193 base srv6-endpoint-type; 1194 description 1195 "Service-Chaining Static proxy for inner type (Ethernet, 1196 IPv4 or IPv6)"; 1197 reference 1198 "draft-xuclad-spring-sr-service-chaining-01"; 1199 // RFC Editor: replace with actual RFC number and remove this note 1200 } 1202 identity End.AD { 1203 base srv6-endpoint-type; 1204 description 1205 "Service-Chaining Dynamic proxy for inner type (Ethernet, 1206 IPv4 or IPv6)"; 1207 reference 1208 "draft-xuclad-spring-sr-service-chaining-01"; 1209 // RFC Editor: replace with actual RFC number and remove this note 1210 } 1212 identity End.ASM { 1213 base srv6-endpoint-type; 1214 description 1215 "Service-Chaining Shared memory SR proxy for inner type 1216 (Ethernet, IPv4 or IPv6)"; 1217 reference 1218 "draft-xuclad-spring-sr-service-chaining-01"; 1219 // RFC Editor: replace with actual RFC number and remove this note 1220 } 1222 identity End.AM { 1223 base srv6-endpoint-type; 1224 description 1225 "Service-Chaining Masquerading SR proxy"; 1226 reference 1227 "draft-xuclad-spring-sr-service-chaining-01"; 1228 // RFC Editor: replace with actual RFC number and remove this note 1229 } 1231 /* Endpoints defined under draft-ietf-dmm-srv6-mobile-uplane */ 1233 identity End.MAP { 1234 base srv6-endpoint-type; 1235 description 1236 "DMM End.MAP"; 1237 reference 1238 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1239 // RFC Editor: replace with actual RFC number and remove this note 1241 } 1243 identity End.M.GTP6.D { 1244 base srv6-endpoint-type; 1245 description 1246 "DMM End.M.GTP6.D"; 1247 reference 1248 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1249 // RFC Editor: replace with actual RFC number and remove this note 1250 } 1252 identity End.M.GTP6.E { 1253 base srv6-endpoint-type; 1254 description 1255 "DMM End.M.GTP6.E"; 1256 reference 1257 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1258 // RFC Editor: replace with actual RFC number and remove this note 1259 } 1261 identity End.M.GTP4.E { 1262 base srv6-endpoint-type; 1263 description 1264 "DMM End.M.GTP4.E"; 1265 reference 1266 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1267 // RFC Editor: replace with actual RFC number and remove this note 1268 } 1270 identity T.M.GTP4.D { 1271 base srv6-endpoint-type; 1272 description 1273 "DMM T.M.GTP4.D"; 1274 reference 1275 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1276 // RFC Editor: replace with actual RFC number and remove this note 1277 } 1279 identity End.Limit { 1280 base srv6-endpoint-type; 1281 description 1282 "DMM End.Limit"; 1283 reference 1284 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1285 // RFC Editor: replace with actual RFC number and remove this note 1286 } 1288 identity srv6-transit-type { 1289 description 1290 "Base identity from which SRv6 transit rule types are derived."; 1291 } 1293 identity T { 1294 base srv6-transit-type; 1295 description 1296 "Transit rule T"; 1297 reference 1298 "draft-ietf-spring-srv6-network-programming-01"; 1299 // RFC Editor: replace with actual RFC number and remove this note 1300 } 1302 identity T.Insert { 1303 base srv6-transit-type; 1304 description 1305 "Transit rule T.Insert with insertion of an SRv6 policy"; 1306 reference 1307 "draft-ietf-spring-srv6-network-programming-01"; 1308 // RFC Editor: replace with actual RFC number and remove this note 1309 } 1311 identity T.Insert.Red { 1312 base srv6-transit-type; 1313 description 1314 "Transit rule T.Insert.Red with reduced insertion of an SRv6 policy"; 1315 reference 1316 "draft-ietf-spring-srv6-network-programming-01"; 1317 // RFC Editor: replace with actual RFC number and remove this note 1318 } 1320 identity T.Encaps { 1321 base srv6-transit-type; 1322 description 1323 "Transit rule T.Encaps with encapsulated of an SRv6 policy"; 1324 reference 1325 "draft-ietf-spring-srv6-network-programming-01"; 1326 // RFC Editor: replace with actual RFC number and remove this note 1327 } 1329 identity T.Encaps.Red { 1330 base srv6-transit-type; 1331 description 1332 "Transit rule T.Encaps.Red with reduced encap of an SRv6 policy"; 1333 reference 1334 "draft-ietf-spring-srv6-network-programming-01"; 1335 // RFC Editor: replace with actual RFC number and remove this note 1336 } 1337 identity T.Encaps.L2 { 1338 base srv6-transit-type; 1339 description 1340 "Transit rule T.Encaps.l2 on the received L2 frame"; 1341 reference 1342 "draft-ietf-spring-srv6-network-programming-01"; 1343 // RFC Editor: replace with actual RFC number and remove this note 1344 } 1346 identity T.Encaps.L2.Red { 1347 base srv6-transit-type; 1348 description 1349 "Transit rule T.Encaps.L2.Red on the received L2 frame"; 1350 reference 1351 "draft-ietf-spring-srv6-network-programming-01"; 1352 // RFC Editor: replace with actual RFC number and remove this note 1353 } 1355 identity srv6-security-type { 1356 description 1357 "Base identity from which SRv6 Security rule types are derived."; 1358 } 1360 identity SEC-1 { 1361 base srv6-security-type; 1362 description 1363 "Security rule SEC-1"; 1364 reference 1365 "draft-ietf-spring-srv6-network-programming-01"; 1366 // RFC Editor: replace with actual RFC number and remove this note 1367 } 1369 identity SEC-2 { 1370 base srv6-security-type; 1371 description 1372 "Security rule SEC-2"; 1373 reference 1374 "draft-ietf-spring-srv6-network-programming-01"; 1375 // RFC Editor: replace with actual RFC number and remove this note 1376 } 1378 identity SEC-3 { 1379 base srv6-security-type; 1380 description 1381 "Security rule SEC-3"; 1382 reference 1383 "draft-ietf-spring-srv6-network-programming-01"; 1384 // RFC Editor: replace with actual RFC number and remove this note 1386 } 1388 identity srv6-counter-type { 1389 description 1390 "Base identity from which SRv6 counter types are derived."; 1391 } 1393 identity CNT-1 { 1394 base srv6-counter-type; 1395 description 1396 "Counter rule CNT-1"; 1397 reference 1398 "draft-ietf-spring-srv6-network-programming-01"; 1399 // RFC Editor: replace with actual RFC number and remove this note 1400 } 1402 identity CNT-2 { 1403 base srv6-counter-type; 1404 description 1405 "Counter rule CNT-2"; 1406 reference 1407 "draft-ietf-spring-srv6-network-programming-01"; 1408 // RFC Editor: replace with actual RFC number and remove this note 1409 } 1411 identity CNT-3 { 1412 base srv6-counter-type; 1413 description 1414 "Counter rule CNT-3"; 1415 reference 1416 "draft-ietf-spring-srv6-network-programming-01"; 1417 // RFC Editor: replace with actual RFC number and remove this note 1418 } 1420 typedef srv6-sid { 1421 type inet:ipv6-prefix; 1422 description 1423 "This type defines a SID value in SRv6"; 1424 } 1426 typedef srv6-func-opcode { 1427 type uint32; 1428 description 1429 "This is a typedef for SID FUNC's opcode type"; 1430 } 1432 typedef srv6-func-opcode-reserved { 1433 type uint32 { 1434 range "1 .. 63"; 1435 } 1437 description 1438 "This is a typedef for SID FUNC's reserved opcode type"; 1439 } 1441 typedef srv6-func-opcode-unreserved { 1442 type uint32 { 1443 range "64 .. max"; 1444 } 1446 description 1447 "This is a typedef for SID FUNC's allocatable (unreserved) opcode type"; 1448 } 1450 typedef srv6-func-opcode-reserved-type { 1451 type enumeration { 1452 enum invalid { value 0; description "Invalid opcode"; } 1453 } 1455 description "SRv6 SID FUNC Reserved Opcodes"; 1456 } 1458 typedef srv6-locator-len { 1459 type uint8 { 1460 range "32 .. 96"; 1461 } 1462 description 1463 "This type defines an SRv6 locator len with range constraints"; 1464 } 1466 typedef srv6-sid-pfxlen { 1467 type uint8 { 1468 range "33 .. 128"; 1469 } 1470 default 128; 1471 description 1472 "This type defines a SID prefixlen with range constraints"; 1473 } 1475 typedef sid-alloc-type { 1476 type enumeration { 1477 enum Dynamic { 1478 description 1479 "SID allocated dynamically."; 1480 } 1481 enum Explicit { 1482 description 1483 "SID allocated with explicit (static) value"; 1484 } 1485 } 1486 description 1487 "Types of sid allocation used."; 1488 } 1490 identity srv6-sid-owner-type { 1491 description 1492 "Base identity from which SID owner types are derived."; 1493 } 1495 identity isis { 1496 base srv6-sid-owner-type; 1497 description "ISIS"; 1498 } 1500 identity ospfv3 { 1501 base srv6-sid-owner-type; 1502 description "OSPFv3"; 1503 } 1505 identity bgp { 1506 base srv6-sid-owner-type; 1507 description "BGP"; 1508 } 1510 identity evpn { 1511 base srv6-sid-owner-type; 1512 description "EVPN"; 1513 } 1515 identity sr-policy { 1516 base srv6-sid-owner-type; 1517 description "SR Policy"; 1518 } 1520 identity service-function { 1521 base srv6-sid-owner-type; 1522 description "SF"; 1523 } 1525 // TODO: Rtg module ? 1526 typedef table-id { 1527 type uint32; 1528 description 1529 "Routing Table Id"; 1531 } 1533 typedef srv6-status-type { 1534 type enumeration { 1535 enum up { value 1; description "State is Up"; } 1536 enum down { description "State is Down"; } 1537 } 1538 description 1539 "Status type"; 1540 } 1542 typedef srv6-nexthop-type { 1543 type enumeration { 1544 enum ipv4 { value 1; description "IPv4 next-hop"; } 1545 enum ipv6 { description "IPv6 next-hop"; } 1546 enum mpls { description "MPLS next-hop"; } 1547 enum l2 { description "L2 next-hop"; } 1548 } 1549 description 1550 "Forwarding Next-hop type"; 1551 } 1553 } // module 1555 1557 Figure 5: ietf-srv6-types.yang 1559 5.2. SRv6 Base 1561 This YANG module imports types defined in [RFC6991], [RFC8294], 1562 [RFC8343], and [RFC8349]. 1564 file "ietf-srv6-base@2019-07-08.yang" --> 1566 // RFC Editor: replace the above date with the date of 1567 // publication and remove this note. 1569 module ietf-srv6-base { 1570 yang-version 1.1; 1572 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-base"; 1573 prefix srv6; 1575 import ietf-interfaces { 1576 prefix "if"; 1577 reference "RFC 8343: A YANG Data Model for Interface Management"; 1578 } 1580 import ietf-inet-types { 1581 prefix inet; 1582 reference "RFC 6991: Common YANG Data Types"; 1583 } 1585 import ietf-yang-types { 1586 prefix "yang"; 1587 reference "RFC 6991: Common YANG Data Types"; 1588 } 1590 import ietf-routing-types { 1591 prefix "rt-types"; 1592 reference "RFC 8294: Common YANG Data Types for the Routing Area"; 1593 } 1595 import ietf-routing { 1596 prefix "rt"; 1597 reference 1598 "RFC 8349: A YANG Data Model for Routing Management (NMDA version)"; 1599 } 1601 import ietf-srv6-types { 1602 prefix srv6-types; 1603 reference "RFC XXXX: YANG Data Model for SRv6"; 1604 // RFC Editor: replace XXXX with actual RFC number and remove 1605 // this note 1606 } 1608 organization 1609 "IETF SPRING Working Group"; 1610 contact 1611 "WG Web: 1612 WG List: 1614 Editor: Kamran Raza 1615 1617 Editor: Jaganbabu Rajamanickam 1618 1620 Editor: Xufeng Liu 1621 1623 Editor: Zhibo Hu 1624 1626 Editor: Iftekhar Hussain 1627 1629 Editor: Himanshu Shah 1630 1632 Editor: Daniel Voyer 1633 1635 Editor: Hani Elmalky 1636 1638 Editor: Satoru Matsushima 1639 1641 Editor: Katsuhiro Horiba 1642 1644 Editor: Ahmed AbdelSalam 1645 1647 "; 1649 description 1650 "This YANG module defines the essential elements for the 1651 management of Segment-Routing with IPv6 dataplane (SRv6). 1653 Copyright (c) 2017 IETF Trust and the persons identified as 1654 authors of the code. All rights reserved. 1656 Redistribution and use in source and binary forms, with or 1657 without modification, is permitted pursuant to, and subject 1658 to the license terms contained in, the Simplified BSD License 1659 set forth in Section 4.c of the IETF Trust's Legal Provisions 1660 Relating to IETF Documents 1661 (http://trustee.ietf.org/license-info)."; 1663 reference "RFC XXXX"; 1665 revision 2019-07-08 { 1666 description 1667 "Alignment with SRv6 network programming"; 1668 reference 1669 "RFC XXXX: YANG Data Model for SRv6"; 1670 // RFC Editor: replace XXXX with actual RFC number and remove 1671 // this note 1673 } 1675 revision 2018-10-22 { 1676 description 1677 "Initial revision."; 1678 reference 1679 "RFC XXXX: YANG Data Model for SRv6"; 1680 // RFC Editor: replace XXXX with actual RFC number and remove 1681 // this note 1682 } 1684 /* 1685 * Common 1686 */ 1688 grouping path-attrs-cmn { 1689 description 1690 "Path properties -common for v4/v6"; 1692 leaf weight { 1693 type uint32; 1694 description 1695 "This value is used to compute a loadshare to perform un-equal 1696 load balancing when multiple outgoing path(s) are specified. A 1697 share is computed as a ratio of this number to the total under 1698 all configured path(s)."; 1699 } 1701 leaf role { 1702 type enumeration { 1703 enum PRIMARY { description "Path as primary traffic carrying"; } 1704 enum BACKUP { description "Path acts as a backup"; } 1705 enum PRIMARY_AND_BACKUP { description 1706 "Path acts as primary and backup simultaneously"; } 1707 } 1708 description "The path role"; 1709 } 1711 leaf backup-path-index { 1712 type uint8; 1713 description "Index of the protecting (backup) path"; 1714 } 1715 } 1717 grouping path-out-sids { 1718 description "Grouping for path's SID stack"; 1720 list out-sid { 1721 key "sid"; 1722 description "Out SID"; 1724 leaf sid { 1725 type srv6-types:srv6-sid; 1726 description "SID value"; 1727 } 1728 } 1729 } 1731 grouping path-out-labels { 1732 description "Grouping for path's label stack"; 1734 list out-label { 1735 key "label"; 1736 description "Out label"; 1738 leaf label { 1739 type rt-types:mpls-label; 1740 description "Label value"; 1741 } 1742 } 1744 } 1746 /* 1747 * Config and State 1748 */ 1749 grouping srv6-encap { 1750 description "Grouping for encap param config."; 1752 container encapsulation { 1753 description "Configure encapsulation related parameters"; 1754 leaf source-address { 1755 type inet:ipv6-address; 1756 description "Specify a source address (for T.Encap). The address must locally exists 1757 and be routable"; 1758 } 1759 leaf ip-ttl-propagation { 1760 type boolean; 1761 default false; 1762 description "IP TTL propagation from encapsulated packet to encapsulating outer 1763 IPv6 header. When configured on decapsulation side, this refers to 1764 propagating IP TTL from outer IPv6 header to inner header after decap"; 1765 } 1767 } 1768 } 1769 grouping srv6-locator-state { 1770 description "SRv6 grouping Locastateor "; 1772 leaf operational-status { 1773 type srv6-types:srv6-status-type; 1774 config false; 1775 description "Indicates whether locator state is UP"; 1776 } 1778 leaf is-in-address-conflict { 1779 type boolean; 1780 config false; 1781 description "Indicates whether locator address conflicts with 1782 some other IPv6 address on the box"; 1783 } 1784 } 1786 grouping srv6-locators { 1787 description "SRv6 locator grouping"; 1789 container locators { 1790 description "SRv6 locators"; 1792 list locator { 1793 key "name"; 1794 description "Configure a SRv6 locator"; 1796 leaf name { 1797 type string; 1798 description "Locator name"; 1799 } 1801 leaf enable { 1802 type boolean; 1803 default false; 1804 description "Enable a SRv6 locator"; 1805 } 1807 container prefix { 1808 description "Specify locator prefix value"; 1809 leaf address { 1810 type inet:ipv6-address; 1811 mandatory true; 1812 description "IPv6 address"; 1813 } 1814 leaf length { 1815 type srv6-types:srv6-locator-len; 1816 mandatory true; 1817 description "Locator (prefix) length"; 1818 } 1819 } 1821 leaf algorithm { 1822 type uint32 { 1823 range "128..255"; 1824 } 1826 description "Algorithm Id (for Flex-Algo)"; 1827 } 1829 uses srv6-locator-state; 1830 } 1831 } 1832 } 1834 grouping srv6-stats-in { 1835 description "Grouping for inbound stats"; 1837 leaf in-pkts { 1838 type yang:counter64; 1839 description 1840 "A cumulative counter of the total number of packets received"; 1841 } 1843 leaf in-octets { 1844 type yang:counter64; 1845 description 1846 "A cumulative counter of the total bytes received."; 1847 } 1848 } 1850 grouping srv6-stats-out { 1851 description "Grouping for inbound stats"; 1853 leaf out-pkts { 1854 type yang:counter64; 1855 description 1856 "A cumulative counter of the total number of packets transmitted"; 1857 } 1859 leaf out-octets { 1860 type yang:counter64; 1861 description 1862 "A cumulative counter of the total bytes transmitted."; 1863 } 1864 } 1865 grouping path-out-sids-choice { 1866 description "Grouping for Out-SID choices"; 1867 choice encap-type { 1868 description "Out-SID encap-based choice"; 1869 case srv6 { 1870 uses path-out-sids; 1871 } 1872 case mpls { 1873 uses path-out-labels; 1874 } 1875 } 1876 } 1878 grouping local-sid-fwd-state { 1879 description "SRv6 local-SID forwarding state grouping"; 1881 container forwarding { 1882 description "SRv6 local-SID forwarding state"; 1884 leaf is-installed { 1885 type boolean; 1886 description "Indicates whether SID is installed in forwarding"; 1887 } 1889 leaf next-hop-type { 1890 type srv6-types:srv6-nexthop-type; 1891 description "Forwarding next-hop types"; 1892 } 1894 container paths { 1895 when "../is-installed = 'true'" { 1896 description "This container is valid only when the local-SID is installed 1897 in forwarding"; 1898 } 1900 list path { 1901 key path-index; 1902 description "The list of paths associated with the SID"; 1904 leaf path-index { 1905 type uint8; 1906 description "Index of the path"; 1907 } 1909 container l2 { 1910 when "../../../next-hop-type = 'l2'" { 1911 description "This container is valid only for L2 type of NHs"; 1912 } 1913 leaf interface { 1914 type if:interface-ref; 1915 description "The outgoing Layer2 interface"; 1916 } 1918 description "L2 information"; 1919 } 1921 container l3 { 1922 when "../../../next-hop-type != 'l2'" { 1923 description "This container is valid only for L3 type of NHs"; 1924 } 1926 leaf interface { 1927 type if:interface-ref; 1928 description "The outgoing Layer3 interface"; 1929 } 1931 leaf next-hop { 1932 type inet:ip-address; 1933 description "The IP address of the next-hop"; 1934 } 1936 uses path-attrs-cmn; 1938 description "L3 information"; 1939 } 1940 uses path-out-sids-choice; 1941 } 1943 description "Forwarding paths"; 1944 } 1945 } 1946 } 1948 grouping srv6-state-sid { 1949 description "SRv6 SID state grouping"; 1951 container local-sids { 1952 config false; 1953 description "Local-SID state"; 1955 container counters { 1956 description "SRv6 counters"; 1958 container cnt-3 { 1959 description "Counts SRv6 traffic received/dropped on local prefix not instantiated as local-SID"; 1960 uses srv6-stats-in; 1962 } 1963 } 1965 list local-sid { 1966 key "sid"; 1967 description "Per-localSID Counters"; 1969 leaf sid { 1970 type srv6-types:srv6-sid; 1971 description "Local SID value"; 1972 } 1974 uses srv6-locator; 1976 leaf is-reserved { 1977 type boolean; 1978 description "Set to true if SID comes from reserved pool"; 1979 } 1981 leaf end-behavior-type { 1982 type identityref { 1983 base srv6-types:srv6-endpoint-type; 1984 } 1985 description "Type of SRv6 end behavior."; 1986 } 1988 leaf alloc-type { 1989 type srv6-types:sid-alloc-type; 1990 description 1991 "Type of sid allocation."; 1992 } 1994 list owner { 1995 key "type instance"; 1996 description "SID Owner clients"; 1997 leaf type { 1998 type identityref { 1999 base srv6-types:srv6-sid-owner-type; 2000 } 2001 description "SID owner/client type"; 2002 } 2003 leaf instance { 2004 type string; 2005 description "Client instance"; 2006 } 2007 leaf is-winner { 2008 type boolean; 2009 description "Is this client/owner the winning in terms of forwarding"; 2011 } 2012 } 2014 uses local-sid-fwd-state; 2016 container counters { 2017 description "SRv6 per local-SID counters"; 2019 container cnt-1 { 2020 description "Counts SRv6 traffic received on local-SID prefix and processed successfully"; 2021 uses srv6-stats-in; 2022 } 2023 } 2024 } 2025 } 2026 } 2028 grouping srv6-support-ends { 2029 description "SRv6 End behavior support grouping"; 2031 list end-behavior { 2032 key "type"; 2033 description "End behavior support"; 2035 leaf type { 2036 type identityref { 2037 base srv6-types:srv6-endpoint-type; 2038 } 2039 description "End behavior (End*) type"; 2040 } 2041 leaf supported { 2042 type boolean; 2043 mandatory true; 2044 description "True if supported"; 2045 } 2046 } 2047 } 2049 grouping srv6-support-transits { 2050 description "SRv6 Transit behavior support grouping"; 2052 list transit-behavior { 2053 key "type"; 2054 description "Transit behavior support"; 2056 leaf type { 2057 type identityref { 2058 base srv6-types:srv6-transit-type; 2060 } 2061 description "Transit behavior (T*) type"; 2062 } 2063 leaf supported { 2064 type boolean; 2065 mandatory true; 2066 description "True if supported"; 2067 } 2068 } 2069 } 2071 grouping srv6-support-signaled { 2072 description "SRv6 signaled parameter support grouping"; 2074 container signaled-parameters { 2075 description "SRv6 signaled parameter support"; 2077 leaf max-sl { 2078 type uint8; 2079 //mandatory true; 2080 description "Maximum value of the SL field in the SRH of 2081 a received packet before applying the function 2082 associated with a SID"; 2083 } 2084 leaf max-end-pop-srh { 2085 type uint8; 2086 //mandatory true; 2087 description "Maximum number of SIDs in the top SRH in an 2088 SRH stack to which the router can apply 2089 PSP or USP flavors"; 2090 } 2091 leaf max-t_insert { 2092 type uint8; 2093 //mandatory true; 2094 description "Maximum number of SIDs that can be inserted as 2095 part of the T.insert behavior"; 2096 } 2097 leaf max-t_encap { 2098 type uint8; 2099 //mandatory true; 2100 description "Maximum number of SIDs that can be inserted as 2101 part of the T.Encap behavior"; 2102 } 2103 leaf max-end_d { 2104 type uint8; 2105 //mandatory true; 2106 description "Maximum number of SIDs in an SRH when applying 2107 End.DX6 and End.DT6 functions"; 2109 } 2110 } 2111 } 2113 grouping srv6-support-security-rules { 2114 description "SRv6 Security rules grouping"; 2116 list security-rule { 2117 key "type"; 2118 description "Security rule support"; 2120 leaf type { 2121 type identityref { 2122 base srv6-types:srv6-security-type; 2123 } 2124 description "Security rule type"; 2125 } 2126 leaf supported { 2127 type boolean; 2128 mandatory true; 2129 description "True if supported"; 2130 } 2131 } 2132 } 2134 grouping srv6-support-counters { 2135 description "SRv6 Counters grouping"; 2137 list counters { 2138 key "type"; 2139 description "SRv6 counter support"; 2141 leaf type { 2142 type identityref { 2143 base srv6-types:srv6-counter-type; 2144 } 2145 description "Counter type"; 2146 } 2147 leaf supported { 2148 type boolean; 2149 mandatory true; 2150 description "True if supported"; 2151 } 2152 } 2153 } 2155 grouping srv6-state-capabilities { 2156 description "SRv6 node capabilities grouping"; 2157 container node-capabilities { 2158 config false; 2159 description "Node's SRv6 capabilities"; 2161 uses srv6-support-ends; 2162 uses srv6-support-transits; 2163 uses srv6-support-signaled; 2164 uses srv6-support-security-rules; 2165 uses srv6-support-counters; 2166 } 2167 } 2169 augment "/rt:routing" { 2170 description 2171 "This augments routing-instance configuration with segment-routing SRv6."; 2173 container srv6 { 2174 description "Segment Routing with IPv6 dataplane"; 2176 /* config */ 2177 leaf enable { 2178 type boolean; 2179 default false; 2180 description "Enable SRv6"; 2181 } 2183 uses srv6-encap; 2184 uses srv6-locators; 2185 uses srv6-state-capabilities; 2186 uses srv6-state-sid; 2187 } 2188 } 2190 /* Notifications */ 2192 grouping srv6-locator { 2193 description 2194 "An absolute reference to an SRv6 locator"; 2195 leaf locator { 2196 type leafref { 2197 path "/rt:routing/srv6:srv6/srv6:locators/srv6:locator/srv6:name"; 2198 } 2199 description 2200 "Reference to a SRv6 locator."; 2201 } 2202 } 2204 notification srv6-locator-status-event { 2205 description 2206 "Notification event for a change of SRv6 locator operational status."; 2207 leaf operational-status { 2208 type srv6-types:srv6-status-type; 2209 description "Operational status"; 2210 } 2211 uses srv6-locator; 2212 } 2214 notification srv6-sid-collision-event { 2215 description 2216 "Notification event for an SRv6 SID collision - i.e., attempt to bind an already 2217 bound SID to a new context"; 2218 leaf sid { 2219 type srv6-types:srv6-sid; 2220 description "SRv6 SID"; 2221 } 2222 container existing { 2223 description "Current assignment / bind"; 2224 leaf end-behavior-type { 2225 type identityref { 2226 base srv6-types:srv6-endpoint-type; 2227 } 2228 description "End type"; 2229 } 2230 // TODO: More 2231 } 2232 container requested { 2233 description "Requested assignment / bind"; 2235 leaf end-behavior-type { 2236 type identityref { 2237 base srv6-types:srv6-endpoint-type; 2238 } 2239 description "End type"; 2240 } 2241 } 2243 } 2245 } // module 2247 2249 Figure 6: ietf-srv6-base.yang 2251 5.3. SRv6 Static 2253 This YANG module imports types defined in [RFC6991], [RFC8343], and 2254 [RFC8349]. 2256 file "ietf-srv6-static@2019-07-08.yang" --> 2258 // RFC Editor: replace the above date with the date of 2259 // publication and remove this note. 2261 module ietf-srv6-static { 2262 yang-version 1.1; 2264 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-static"; 2265 prefix srv6-static; 2267 import ietf-interfaces { 2268 prefix "if"; 2269 reference "RFC 8343: A YANG Data Model for Interface Management"; 2270 } 2272 import ietf-inet-types { 2273 prefix inet; 2274 reference "RFC 6991: Common YANG Data Types"; 2275 } 2277 import ietf-routing { 2278 prefix "rt"; 2279 reference 2280 "RFC 8349: A YANG Data Model for Routing Management (NMDA 2281 version)"; 2282 } 2284 import ietf-srv6-types { 2285 prefix srv6-types; 2286 reference "RFC XXXX: YANG Data Model for SRv6"; 2287 // RFC Editor: replace XXXX with actual RFC number and remove 2288 // this note 2289 } 2291 import ietf-srv6-base { 2292 prefix srv6; 2293 reference "RFC XXXX: YANG Data Model for SRv6"; 2294 // RFC Editor: replace XXXX with actual RFC number and remove 2295 // this note 2296 } 2297 organization 2298 "IETF SPRING Working Group"; 2299 contact 2300 "WG Web: 2301 WG List: 2303 Editor: Kamran Raza 2304 2306 Editor: Jaganbabu Rajamanickam 2307 2309 Editor: Xufeng Liu 2310 2312 Editor: Zhibo Hu 2313 2315 Editor: Iftekhar Hussain 2316 2318 Editor: Himanshu Shah 2319 2321 Editor: Daniel Voyer 2322 2324 Editor: Hani Elmalky 2325 2327 Editor: Satoru Matsushima 2328 2330 Editor: Katsuhiro Horiba 2331 2333 Editor: Ahmed AbdelSalam 2334 2336 "; 2338 description 2339 "This YANG module defines the essential elements for the 2340 management of Static application for Segment-Routing with 2341 IPv6 dataplane (SRv6). 2343 Copyright (c) 2018 IETF Trust and the persons identified as 2344 authors of the code. All rights reserved. 2346 Redistribution and use in source and binary forms, with or 2347 without modification, is permitted pursuant to, and subject 2348 to the license terms contained in, the Simplified BSD License 2349 set forth in Section 4.c of the IETF Trust's Legal Provisions 2350 Relating to IETF Documents 2351 (http://trustee.ietf.org/license-info)."; 2353 reference "RFC XXXX"; 2354 // RFC Editor: replace XXXX with actual RFC number and remove 2355 // this note 2357 revision 2019-07-08 { 2358 description 2359 "Alignment with SRv6 network programming"; 2360 reference 2361 "RFC XXXX: YANG Data Model for SRv6"; 2362 // RFC Editor: replace XXXX with actual RFC number and remove 2363 // this note 2364 } 2366 revision 2018-10-22 { 2367 description 2368 "Initial revision."; 2369 reference 2370 "RFC XXXX: YANG Data Model for SRv6"; 2371 // RFC Editor: replace XXXX with actual RFC number and remove 2372 // this note 2373 } 2375 /* 2376 * Config and State 2377 */ 2379 grouping path-attrs-v6 { 2380 description 2381 "IPv6 Path properties"; 2383 leaf interface { 2384 type if:interface-ref; 2385 description "The outgoing interface"; 2386 } 2388 leaf next-hop { 2389 type inet:ipv6-address; 2390 description "The IP address of the next-hop"; 2391 } 2393 uses srv6:path-attrs-cmn; 2394 } 2396 grouping path-attrs-v4 { 2397 description 2398 "IPv4 Path properties"; 2400 leaf interface { 2401 type if:interface-ref; 2402 description "The outgoing interface"; 2403 } 2405 leaf next-hop { 2406 type inet:ipv4-address; 2407 description "The IP address of the next-hop"; 2408 } 2410 uses srv6:path-attrs-cmn; 2411 } 2413 grouping path-attrs-mpls { 2414 description 2415 "MPLS Path properties"; 2417 leaf interface { 2418 type if:interface-ref; 2419 description "The outgoing interface"; 2420 } 2422 leaf next-hop { 2423 type inet:ip-address; 2424 description "The IP address of the next-hop"; 2425 } 2427 uses srv6:path-attrs-cmn; 2428 } 2430 grouping multi-paths-v6 { 2431 description "Multipath grouping"; 2433 container paths { 2434 description "List of outgoing paths"; 2435 list path { 2436 key path-index; 2437 description "The list of paths associated with the SID"; 2439 leaf path-index { 2440 type uint8; 2441 description "Index of the path"; 2442 } 2444 uses path-attrs-v6; 2445 container encap { 2446 description "Encapsulation on path"; 2447 uses srv6:path-out-sids; 2448 } 2449 } 2450 } 2451 } 2453 grouping multi-paths-v4 { 2454 description "Multipath grouping"; 2456 container paths { 2457 description "List of outgoing paths"; 2458 list path { 2459 key path-index; 2460 description "The list of paths associated with the SID"; 2462 leaf path-index { 2463 type uint8; 2464 description "Index of the path"; 2465 } 2467 uses path-attrs-v4; 2468 container encap { 2469 description "Encapsulation on path"; 2470 uses srv6:path-out-sids; 2471 } 2472 } 2473 } 2474 } 2476 grouping multi-paths-mpls { 2477 description "Multipath grouping"; 2479 container paths { 2480 description "List of outgoing paths"; 2481 list path { 2482 key path-index; 2483 description "The list of paths associated with the SID"; 2485 leaf path-index { 2486 type uint8; 2487 description "Index of the path"; 2488 } 2489 uses path-attrs-mpls; 2490 container encap { 2491 description "Encapsulation on path"; 2492 uses srv6:path-out-labels; 2493 } 2494 } 2495 } 2496 } 2498 grouping srv6-sid-config { 2499 description 2500 "Configuration parameters relating to SRv6 sid."; 2502 leaf opcode { 2503 type srv6-types:srv6-func-opcode-unreserved; 2504 description 2505 "SRv6 function opcode."; 2506 } 2507 leaf end-behavior-type { 2508 type identityref { 2509 base srv6-types:srv6-endpoint-type; 2510 } 2511 mandatory true; 2512 description 2513 "Type of SRv6 end behavior."; 2514 } 2516 container end { 2517 when "../end-behavior-type = 'End'" { 2518 description 2519 "This container is valid only when the user chooses End 2520 behavior (variant: no PSP, no USP)."; 2521 } 2522 description 2523 "The Endpoint function is the most basic function. 2524 FIB lookup on updated DA and forward accordingly 2525 to the matched entry. 2526 This is the SRv6 instantiation of a Prefix SID 2527 (variant: no PSP, no USP)"; 2529 } 2531 container end_psp { 2532 when "../end-behavior-type = 'End_PSP'" { 2533 description 2534 "This container is valid only when the user chooses End 2535 behavior (variant: PSP only)."; 2536 } 2537 description 2538 "The Endpoint function is the most basic function. 2539 FIB lookup on updated DA and forward accordingly 2540 to the matched entry. 2541 This is the SRv6 instantiation of a Prefix SID 2542 (variant: PSP only)"; 2544 } 2546 container end_usp { 2547 when "../end-behavior-type = 'End_USP'" { 2548 description 2549 "This container is valid only when the user chooses End 2550 behavior (variant: USP only)."; 2551 } 2552 description 2553 "The Endpoint function is the most basic function. 2554 FIB lookup on updated DA and forward accordingly 2555 to the matched entry. 2556 This is the SRv6 instantiation of a Prefix SID 2557 (variant: USP only)"; 2559 } 2561 container end_psp_usp { 2562 when "../end-behavior-type = 'End_PSP_USP'" { 2563 description 2564 "This container is valid only when the user chooses End 2565 behavior (variant: PSP/USP)."; 2566 } 2567 description 2568 "The Endpoint function is the most basic function. 2569 FIB lookup on updated DA and forward accordingly 2570 to the matched entry. 2571 This is the SRv6 instantiation of a Prefix SID 2572 (variant: PSP/USP)"; 2574 } 2576 container end_usd { 2577 when "../end-behavior-type = 'End_USD'" { 2578 description 2579 "This container is valid only when the user chooses End 2580 behavior (variant: USD only)."; 2581 } 2582 description 2583 "The Endpoint function is the most basic function. 2584 FIB lookup on updated DA and forward accordingly 2585 to the matched entry. 2586 This is the SRv6 instantiation of a Prefix SID 2587 (variant: USD)"; 2589 } 2591 container end_psp_usd { 2592 when "../end-behavior-type = 'End_PSP_USD'" { 2593 description 2594 "This container is valid only when the user chooses End 2595 behavior (variant: PSP/USD)."; 2596 } 2597 description 2598 "The Endpoint function is the most basic function. 2599 FIB lookup on updated DA and forward accordingly 2600 to the matched entry. 2601 This is the SRv6 instantiation of a Prefix SID 2602 (variant: PSP/USD)"; 2604 } 2606 container end_usp_usd { 2607 when "../end-behavior-type = 'End_USP_USD'" { 2608 description 2609 "This container is valid only when the user chooses End 2610 behavior (variant: USP/USD)."; 2611 } 2612 description 2613 "The Endpoint function is the most basic function. 2614 FIB lookup on updated DA and forward accordingly 2615 to the matched entry. 2616 This is the SRv6 instantiation of a Prefix SID 2617 (variant: USP/USD)"; 2619 } 2621 container end_psp_usp_usd { 2622 when "../end-behavior-type = 'End_PSP_USP_IUSD'" { 2623 description 2624 "This container is valid only when the user chooses End 2625 behavior (variant: PSP/USP/USD)."; 2626 } 2627 description 2628 "The Endpoint function is the most basic function. 2629 FIB lookup on updated DA and forward accordingly 2630 to the matched entry. 2631 This is the SRv6 instantiation of a Prefix SID 2632 (variant: PSP/USP/USD)"; 2634 } 2636 container end-t { 2637 when "../end-behavior-type = 'End.T'" { 2638 description 2639 "This container is valid only when the user chooses 2640 End.T behavior (variant: no PSP, no USP)."; 2641 } 2642 description 2643 "Endpoint with specific IPv6 table lookup (variant: no PSP, no USP). 2644 Lookup the next segment in IPv6 table T 2645 associated with the SID and forward via 2646 the matched table entry. 2647 The End.T is used for multi-table operation 2648 in the core."; 2650 // TODO presence "Mandatory child only if container is present"; 2651 leaf lookup-table-ipv6 { 2652 type srv6-types:table-id; 2653 mandatory true; 2654 description 2655 "Table Id for lookup on updated DA (next segment)"; 2656 } 2657 } 2659 container end-t_psp { 2660 when "../end-behavior-type = 'End.T_PSP'" { 2661 description 2662 "This container is valid only when the user chooses 2663 End.T behavior (variant: PSP only)."; 2664 } 2665 description 2666 "Endpoint with specific IPv6 table lookup (variant: PSP only). 2667 Lookup the next segment in IPv6 table T 2668 associated with the SID and forward via 2669 the matched table entry. 2671 The End.T is used for multi-table operation 2672 in the core."; 2674 // TODO presence "Mandatory child only if container is present"; 2676 leaf lookup-table-ipv6 { 2677 type srv6-types:table-id; 2678 mandatory true; 2679 description 2680 "Table Id for lookup on updated DA (next segment)"; 2681 } 2683 } 2685 container end-t_usp { 2686 when "../end-behavior-type = 'End.T_USP'" { 2687 description 2688 "This container is valid only when the user chooses 2689 End.T behavior (variant: USP only)."; 2690 } 2691 description 2692 "Endpoint with specific IPv6 table lookup (variant: USP only). 2693 Lookup the next segment in IPv6 table T 2694 associated with the SID and forward via 2695 the matched table entry. 2696 The End.T is used for multi-table operation 2697 in the core."; 2699 // TODO presence "Mandatory child only if container is present"; 2701 leaf lookup-table-ipv6 { 2702 type srv6-types:table-id; 2703 mandatory true; 2704 description 2705 "Table Id for lookup on updated DA (next segment)"; 2706 } 2707 } 2709 container end-t_psp_usp { 2710 when "../end-behavior-type = 'End.T_PSP_USP'" { 2711 description 2712 "This container is valid only when the user chooses 2713 End.T behavior (variant: USP/PSP)."; 2714 } 2715 description 2716 "Endpoint with specific IPv6 table lookup (variant: USP/PSP). 2717 Lookup the next segment in IPv6 table T 2718 associated with the SID and forward via 2719 the matched table entry. 2720 The End.T is used for multi-table operation 2721 in the core."; 2723 // TODO presence "Mandatory child only if container is present"; 2725 leaf lookup-table-ipv6 { 2726 type srv6-types:table-id; 2727 mandatory true; 2728 description 2729 "Table Id for lookup on updated DA (next segment)"; 2730 } 2732 } 2734 container end-t_usd { 2735 when "../end-behavior-type = 'End.T_USD'" { 2736 description 2737 "This container is valid only when the user chooses 2738 End.T behavior (variant: USD only)."; 2739 } 2740 description 2741 "Endpoint with specific IPv6 table lookup (variant: USD only). 2742 Lookup the next segment in IPv6 table T 2743 associated with the SID and forward via 2744 the matched table entry. 2745 The End.T is used for multi-table operation 2746 in the core."; 2748 // TODO presence "Mandatory child only if container is present"; 2750 leaf lookup-table-ipv6 { 2751 type srv6-types:table-id; 2752 mandatory true; 2753 description 2754 "Table Id for lookup on updated DA (next segment)"; 2755 } 2756 } 2758 container end-t_psp_usd { 2759 when "../end-behavior-type = 'End.T_PSP_USD'" { 2760 description 2761 "This container is valid only when the user chooses 2762 End.T behavior (variant: PSP/USD only)."; 2763 } 2764 description 2765 "Endpoint with specific IPv6 table lookup (variant: PSP/USD only). 2766 Lookup the next segment in IPv6 table T 2767 associated with the SID and forward via 2768 the matched table entry. 2769 The End.T is used for multi-table operation 2770 in the core."; 2772 // TODO presence "Mandatory child only if container is present"; 2774 leaf lookup-table-ipv6 { 2775 type srv6-types:table-id; 2776 mandatory true; 2777 description 2778 "Table Id for lookup on updated DA (next segment)"; 2779 } 2781 } 2783 container end-t_usp_usd { 2784 when "../end-behavior-type = 'End.T_USP_USD'" { 2785 description 2786 "This container is valid only when the user chooses 2787 End.T behavior (variant: USP/USD only)."; 2788 } 2789 description 2790 "Endpoint with specific IPv6 table lookup (variant: USP/USD only). 2791 Lookup the next segment in IPv6 table T 2792 associated with the SID and forward via 2793 the matched table entry. 2794 The End.T is used for multi-table operation 2795 in the core."; 2797 // TODO presence "Mandatory child only if container is present"; 2799 leaf lookup-table-ipv6 { 2800 type srv6-types:table-id; 2801 mandatory true; 2802 description 2803 "Table Id for lookup on updated DA (next segment)"; 2804 } 2805 } 2807 container end-t_psp_usp_usd { 2808 when "../end-behavior-type = 'End.T_PSP_USP_USD'" { 2809 description 2810 "This container is valid only when the user chooses 2811 End.T behavior (variant: USP only)."; 2812 } 2813 description 2814 "Endpoint with specific IPv6 table lookup (variant: PSP/USP/USD only). 2815 Lookup the next segment in IPv6 table T 2816 associated with the SID and forward via 2817 the matched table entry. 2818 The End.T is used for multi-table operation 2819 in the core."; 2821 // TODO presence "Mandatory child only if container is present"; 2823 leaf lookup-table-ipv6 { 2824 type srv6-types:table-id; 2825 mandatory true; 2826 description 2827 "Table Id for lookup on updated DA (next segment)"; 2828 } 2830 } 2832 container end-x { 2833 when "../end-behavior-type = 'End.X'" { 2834 description 2835 "This container is valid only when the user chooses 2836 End.X behavior (variant: no USP/PSP)"; 2837 } 2838 description 2839 "Endpoint with cross-connect to an array of 2840 layer-3 adjacencies (variant: no USP/PSP). 2841 Forward to layer-3 adjacency bound to the SID S. 2842 The End.X function is required to express any 2843 traffic-engineering policy."; 2845 leaf protected { 2846 type boolean; 2847 default false; 2848 description "Is Adj-SID protected?"; 2849 } 2851 uses multi-paths-v6; 2852 } 2854 container end-x_psp { 2855 when "../end-behavior-type = 'End.X_PSP'" { 2856 description 2857 "This container is valid only when the user chooses 2858 End.X behavior (variant: PSP only)"; 2859 } 2860 description 2861 "Endpoint with cross-connect to an array of 2862 layer-3 adjacencies (variant: PSP only). 2863 Forward to layer-3 adjacency bound to the SID S. 2864 The End.X function is required to express any 2865 traffic-engineering policy."; 2867 leaf protected { 2868 type boolean; 2869 default false; 2870 description "Is Adj-SID protected?"; 2871 } 2873 uses multi-paths-v6; 2874 } 2876 container end-x_usp { 2877 when "../end-behavior-type = 'End.X_USP'" { 2878 description 2879 "This container is valid only when the user chooses 2880 End.X behavior (variant: USP only)"; 2881 } 2882 description 2883 "Endpoint with cross-connect to an array of 2884 layer-3 adjacencies (variant: USP only). 2885 Forward to layer-3 adjacency bound to the SID S. 2886 The End.X function is required to express any 2887 traffic-engineering policy."; 2889 leaf protected { 2890 type boolean; 2891 default false; 2892 description "Is Adj-SID protected?"; 2893 } 2895 uses multi-paths-v6; 2896 } 2898 container end-x_psp_usp { 2899 when "../end-behavior-type = 'End.X_PSP_USP'" { 2900 description 2901 "This container is valid only when the user chooses 2902 End.X behavior (variant: PSP/USP)"; 2903 } 2904 description 2905 "Endpoint with cross-connect to an array of 2906 layer-3 adjacencies (variant: PSP/USP). 2907 Forward to layer-3 adjacency bound to the SID S. 2908 The End.X function is required to express any 2909 traffic-engineering policy."; 2911 leaf protected { 2912 type boolean; 2913 default false; 2914 description "Is Adj-SID protected?"; 2915 } 2917 uses multi-paths-v6; 2918 } 2920 container end-x_usd { 2921 when "../end-behavior-type = 'End.X_USD'" { 2922 description 2923 "This container is valid only when the user chooses 2924 End.X behavior (variant: USD only)"; 2926 } 2927 description 2928 "Endpoint with cross-connect to an array of 2929 layer-3 adjacencies (variant: PSP/USP). 2930 Forward to layer-3 adjacency bound to the SID S. 2931 The End.X function is required to express any 2932 traffic-engineering policy."; 2934 leaf protected { 2935 type boolean; 2936 default false; 2937 description "Is Adj-SID protected?"; 2938 } 2940 uses multi-paths-v6; 2941 } 2943 container end-x_psp_usd { 2944 when "../end-behavior-type = 'End.X_PSP_USD'" { 2945 description 2946 "This container is valid only when the user chooses 2947 End.X behavior (variant: PSP/USD only)"; 2948 } 2949 description 2950 "Endpoint with cross-connect to an array of 2951 layer-3 adjacencies (variant: PSP/USP). 2952 Forward to layer-3 adjacency bound to the SID S. 2953 The End.X function is required to express any 2954 traffic-engineering policy."; 2956 leaf protected { 2957 type boolean; 2958 default false; 2959 description "Is Adj-SID protected?"; 2960 } 2962 uses multi-paths-v6; 2963 } 2965 container end-x_usp_usd { 2966 when "../end-behavior-type = 'End.X_USP_USD'" { 2967 description 2968 "This container is valid only when the user chooses 2969 End.X behavior (variant: USP/USD only)"; 2970 } 2971 description 2972 "Endpoint with cross-connect to an array of 2973 layer-3 adjacencies (variant: PSP/USP). 2975 Forward to layer-3 adjacency bound to the SID S. 2976 The End.X function is required to express any 2977 traffic-engineering policy."; 2979 leaf protected { 2980 type boolean; 2981 default false; 2982 description "Is Adj-SID protected?"; 2983 } 2985 uses multi-paths-v6; 2986 } 2988 container end-x_psp_usp_usd { 2989 when "../end-behavior-type = 'End.X_PSP_USP_USD'" { 2990 description 2991 "This container is valid only when the user chooses 2992 End.X behavior (variant: PSP/USP/USD only)"; 2993 } 2994 description 2995 "Endpoint with cross-connect to an array of 2996 layer-3 adjacencies (variant: PSP/USP). 2997 Forward to layer-3 adjacency bound to the SID S. 2998 The End.X function is required to express any 2999 traffic-engineering policy."; 3001 leaf protected { 3002 type boolean; 3003 default false; 3004 description "Is Adj-SID protected?"; 3005 } 3007 uses multi-paths-v6; 3008 } 3010 container end-b6-insert { 3011 when "../end-behavior-type = 'End.B6.Insert'" { 3012 description 3013 "This container is valid only when the user chooses 3014 End.B6.Insert behavior."; 3015 } 3016 description 3017 "Endpoint bound to an SRv6 Policy. 3018 Insert SRH based on the policy and forward the 3019 packet toward the first hop configured in the policy. 3020 This is the SRv6 instantiation of a Binding SID."; 3022 // TODO presence "Mandatory child only if container is present"; 3023 leaf policy-name { 3024 type string; 3025 mandatory true; 3026 description "SRv6 policy name."; 3027 } 3029 uses multi-paths-v6; 3030 } 3032 container end-b6-encaps { 3033 when "../end-behavior-type = 'End.B6.Encaps'" { 3034 description 3035 "This container is valid only when the user chooses 3036 End_B6_Encaps behavior."; 3037 } 3038 description 3039 "This is a variation of the End.B6 behavior where 3040 the SRv6 Policy also includes an IPv6 Source 3041 Address. 3042 Insert SRH based on the policy and update the 3043 source IP and forward the packet toward the 3044 first hop configured in the policy. 3045 Instead of simply inserting an SRH with the 3046 policy (End.B6), this behavior also adds an 3047 outer IPv6 header."; 3049 // TODO presence "Mandatory child only if container is present"; 3051 leaf policy-name { 3052 type string; 3053 mandatory true; 3054 description "SRv6 policy name."; 3055 } 3056 leaf source-address { 3057 type inet:ipv6-address; 3058 mandatory true; 3059 description 3060 "IPv6 source address for Encap."; 3061 } 3063 uses multi-paths-v6; 3064 } 3066 container end-bm { 3067 when "../end-behavior-type = 'End.BM'" { 3068 description 3069 "This container is valid only when the user chooses 3070 End.BM behavior."; 3072 } 3073 description 3074 "Endpoint bound to an SR-MPLS Policy. 3075 push an MPLS label stack on the 3076 received packet and forward the according to 3077 Lable L1. 3078 This is an SRv6 instantiation of an SR-MPLS Binding SID."; 3080 // TODO presence "Mandatory child only if container is present"; 3082 leaf policy-name { 3083 type string; 3084 mandatory true; 3085 description "SRv6 policy name"; 3086 } 3087 uses multi-paths-mpls; 3088 } 3090 container end-dx6 { 3091 when "../end-behavior-type = 'End.DX6'" { 3092 description 3093 "This container is valid only when the user chooses 3094 End.DX6 behavior."; 3095 } 3096 description 3097 "Endpoint with decapsulation and cross-connect to 3098 an array of IPv6 adjacencies. Pop the (outer) 3099 IPv6 header and its extension headers and forward 3100 to layer-3 adjacency bound to the SID S. 3101 The End.DX6 used in the L3VPN use-case."; 3103 uses multi-paths-v6; 3104 } 3105 container end-dx4 { 3106 when "../end-behavior-type = 'End.DX4'" { 3107 description 3108 "This container is valid only when the user chooses 3109 End.DX4 behavior."; 3110 } 3111 description 3112 "Endpoint with decapsulation and cross-connect to 3113 an array of IPv4 adjacencies. 3114 Pop the (outer) IPv6 header and its extension 3115 header and forward to layer-3 adjacency bound 3116 to the SID S. 3117 This would be equivalent to the per-CE VPN 3118 label in MPLS."; 3120 uses multi-paths-v4; 3121 } 3122 container end-dt6 { 3123 when "../end-behavior-type = 'End.DT6'" { 3124 description 3125 "This container is valid only when the user chooses 3126 End.DT6 behavior."; 3127 } 3128 description 3129 "Endpoint with decapsulation and specific IPv6 table 3130 lookup. 3131 Pop the (outer) IPv6 header and its extension 3132 headers. 3133 Lookup the exposed inner IPv6 DA in IPv6 3134 table T and forward via the matched table entry. 3135 End.DT6 function is used in L3VPN use-case."; 3137 // TODO presence "Mandatory child only if container is present"; 3139 leaf lookup-table-ipv6 { 3140 type srv6-types:table-id; 3141 mandatory true; 3142 description "IPv6 table"; 3143 } 3144 } 3145 container end-dt4 { 3146 when "../end-behavior-type = 'End.DT4'" { 3147 description 3148 "This container is valid only when the user chooses 3149 End.DT4 behavior."; 3150 } 3151 description 3152 "Endpoint with decapsulation and specific 3153 IPv4 table lookup. 3154 Pop the (outer) IPv6 header and its extension 3155 headers. 3156 Lookup the exposed inner IPv4 DA in IPv4 3157 table T and forward via the matched table entry. 3158 This would be equivalent to the per-VRF VPN label 3159 in MPLS."; 3161 // TODO presence "Mandatory child only if container is present"; 3163 leaf lookup-table-ipv4 { 3164 type srv6-types:table-id; 3165 mandatory true; 3166 description "IPv4 table"; 3167 } 3169 } 3170 container end-dt46 { 3171 when "../end-behavior-type = 'End.DT46'" { 3172 description 3173 "This container is valid only when the user chooses 3174 End.DT46 behavior."; 3175 } 3176 description 3177 "Endpoint with decapsulation and specific 3178 IP table lookup. 3179 Depending on the protocol type (IPv4 or IPv6) 3180 of the inner ip packet and the specific VRF name 3181 forward the packet. 3182 This would be equivalent to the per-VRF VPN 3183 label in MPLS."; 3185 // TODO presence "Mandatory child only if container is present"; 3187 leaf lookup-table-ipv4 { 3188 type srv6-types:table-id; 3189 mandatory true; 3190 description "IPv4 table"; 3191 } 3192 leaf lookup-table-ipv6 { 3193 type srv6-types:table-id; 3194 mandatory true; 3195 description "IPv6 table"; 3196 } 3197 } 3199 container end-dx2 { 3200 when "../end-behavior-type = 'End.DX2'" { 3201 description 3202 "This container is valid only when the user chooses 3203 End.DX2 behavior."; 3204 } 3205 description 3206 "This is an Endpoint with decapsulation and Layer-2 3207 cross-connect to OIF. 3208 Pop the (outer) IPv6 header and its extension headers. 3209 Forward the resulting frame via OIF associated to the SID. 3210 The End.DX2 function is the L2VPN use-case"; 3212 container paths { 3213 description "List of outgoing paths"; 3215 leaf interface { 3216 type if:interface-ref; 3217 mandatory true; 3218 description "Layer-2 cross-connect to Out interface."; 3219 } 3220 } 3221 } 3222 /* TODO 3223 container end-dx2v { 3224 when "../end-behavior-type = 'End.DX2V'" { 3225 description 3226 "This container is valid only when the user chooses 3227 End.DX2V behavior."; 3228 } 3229 description 3230 "Endpoint with decapsulation and specific VLAN 3231 L2 table lookup. 3232 Pop the (outer) IPv6 header 3233 and its extension headers lookup the exposed 3234 inner VLANs in L2 table T forward via the 3235 matched table entry. 3236 The End.DX2V is used for EVPN Flexible cross-connect 3237 use-cases"; 3238 leaf end-dx2v { 3239 type empty; 3240 description 3241 "End_DX2V behavior"; 3242 } 3243 } 3244 container end-dt2u { 3245 when "../end-behavior-type = 'End.DT2U'" { 3246 description 3247 "This container is valid only when the user chooses 3248 End.DT2U behavior."; 3249 } 3250 description 3251 "Endpoint with decapsulation and specific 3252 unicast MAC L2 table lookup. 3253 Pop the (outer) IPv6 header and its extension headers. 3254 Learn the exposed inner MAC SA in L2 table T. 3255 Lookup the exposed inner MAC DA in L2 table T. 3256 Forward via the matched T entry else to all L2OIF in T. 3257 The End.DT2U is used for EVPN Bridging unicast use cases"; 3258 leaf end-dt2u { 3259 type empty; 3260 description 3261 "End_DT2U behavior"; 3262 } 3263 } 3264 container end-dt2m { 3265 when "../end-behavior-type = 'End.DT2M'" { 3266 description 3267 "This container is valid only when the user chooses 3268 End.DT2M behavior."; 3269 } 3270 description 3271 "Endpoint with decapsulation and specific L2 table flooding. 3272 Pop the (outer) IPv6 header and its extension headers. 3273 Learn the exposed inner MAC SA in L2 table T. 3274 Forward on all L2OIF excluding the one specified in Arg.FE2. 3275 The End.DT2M is used for EVPN Bridging BUM use case with 3276 ESI filtering capability."; 3277 leaf end-dt2m { 3278 type empty; 3279 description 3280 "End_DT2M behavior"; 3281 } 3282 } 3283 */ 3285 container end-otp { 3286 when "../end-behavior-type = 'End.OTP'" { 3287 description 3288 "This container is valid only when the user chooses 3289 End.OTP behavior."; 3290 } 3291 description 3292 "Endpoint for OAM with timestamp and punt behavior"; 3293 } 3294 } 3296 grouping srv6-static-cfg { 3297 description 3298 "Grouping configuration and operation for SRv6 sid."; 3300 list sid { 3301 key "opcode"; 3302 description "List of locally instantiated SIDs"; 3304 uses srv6-sid-config; 3305 } 3306 } 3308 augment "/rt:routing/srv6:srv6/srv6:locators/srv6:locator" { 3309 description 3310 "This augments locator leaf within SRv6."; 3312 container static { 3313 description "Static SRv6"; 3315 /* Local SIDs */ 3316 container local-sids { 3317 description 3318 "SRv6-static locally instantiated SIDs"; 3320 uses srv6-static-cfg; 3321 /* no state for now; SID state accessible through base model */ 3322 } 3324 } 3325 } 3326 } // module 3328 3330 Figure 7: ietf-srv6-static.yang 3332 6. Security Considerations 3334 The YANG module specified in this document defines a schema for data 3335 that is designed to be accessed via network management protocols such 3336 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 3337 is the secure transport layer, and the mandatory-to-implement secure 3338 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 3339 is HTTPS, and the mandatory-to-implement secure transport is TLS 3340 [RFC8446]. 3342 The Network Configuration Access Control Model (NACM) [RFC8341] 3343 provides the means to restrict access for particular NETCONF or 3344 RESTCONF users to a preconfigured subset of all available NETCONF or 3345 RESTCONF protocol operations and content. 3347 There are a number of data nodes defined in this YANG module that are 3348 writable/creatable/ deletable (i.e., config true, which is the 3349 default). These data nodes may be considered sensitive or vulnerable 3350 in some network environments. Write operations (e.g., edit-config) 3351 to these data nodes without proper protection can have a negative 3352 effect on network operations. 3354 Some of the readable data nodes in this YANG module may be considered 3355 sensitive or vulnerable in some network environments. It is thus 3356 important to control read access (e.g., via get, get-config, or 3357 notification) to these data nodes. 3359 It goes without saying that this specification also inherits the 3360 security considerations captured in the SRv6 specification document 3361 [I-D.ietf-spring-srv6-network-programming]. 3363 7. IANA Considerations 3365 This document requests the registration of the following URIs in the 3366 IETF "XML registry" [RFC3688]: 3368 +-----------------------------------------------+------------+------+ 3369 | URI | Registrant | XML | 3370 +-----------------------------------------------+------------+------+ 3371 | urn:ietf:params:xml:ns:yang:ietf-srv6-types | The IESG | N/A | 3372 | | | | 3373 | urn:ietf:params:xml:ns:yang:ietf-srv6-base | The IESG | N/A | 3374 | urn:ietf:params:xml:ns:yang:ietf-srv6-static | The IESG | N/A | 3375 +-----------------------------------------------+------------+------+ 3377 This document requests the registration of the following YANG modules 3378 in the "YANG Module Names" registry [RFC6020]: 3380 +-------------+--------------------------------+----------+---------+ 3381 | Name | Namespace | Prefix | Referen | 3382 | | | | ce | 3383 +-------------+--------------------------------+----------+---------+ 3384 | ietf- | urn:ietf:params:xml:ns:yang | srv6-typ | This do | 3385 | srv6-types | :ietf-srv6-types | es | cument | 3386 | | | | | 3387 | ietf- | urn:ietf:params:xml:ns:yang | srv6 | This do | 3388 | srv6-base | :ietf-srv6-base | | cument | 3389 | | | | | 3390 | ietf- | urn:ietf:params:xml:ns:yang | srv6-sta | This do | 3391 | srv6-static | :ietf-srv6-static | tic | cument | 3392 +-------------+--------------------------------+----------+---------+ 3394 -- RFC Editor: Replace "This document" with the document RFC number 3395 at time of publication, and remove this note. 3397 8. Acknowledgments 3399 This draft is defining the similar YANG data model as 3400 [I-D.hu-spring-srv6-yang]. The authors of that draft have agreed to 3401 join this draft. 3403 The authors would like to acknowledge Darren Dukes, Les Ginsberg, and 3404 Ahmed Bashandy for their input and review. 3406 9. References 3408 9.1. Normative References 3410 [I-D.ietf-spring-srv6-network-programming] 3411 Filsfils, C., Camarillo, P., Leddy, J., 3412 daniel.voyer@bell.ca, d., Matsushima, S., and Z. Li, "SRv6 3413 Network Programming", draft-ietf-spring-srv6-network- 3414 programming-01 (work in progress), July 2019. 3416 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3417 Requirement Levels", BCP 14, RFC 2119, 3418 DOI 10.17487/RFC2119, March 1997, 3419 . 3421 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3422 DOI 10.17487/RFC3688, January 2004, 3423 . 3425 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 3426 the Network Configuration Protocol (NETCONF)", RFC 6020, 3427 DOI 10.17487/RFC6020, October 2010, 3428 . 3430 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 3431 and A. Bierman, Ed., "Network Configuration Protocol 3432 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 3433 . 3435 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 3436 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 3437 . 3439 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 3440 RFC 6991, DOI 10.17487/RFC6991, July 2013, 3441 . 3443 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 3444 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 3445 . 3447 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 3448 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 3449 May 2017, . 3451 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 3452 "Common YANG Data Types for the Routing Area", RFC 8294, 3453 DOI 10.17487/RFC8294, December 2017, 3454 . 3456 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 3457 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 3458 . 3460 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 3461 Access Control Model", STD 91, RFC 8341, 3462 DOI 10.17487/RFC8341, March 2018, 3463 . 3465 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 3466 and R. Wilton, "Network Management Datastore Architecture 3467 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 3468 . 3470 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 3471 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 3472 . 3474 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 3475 Routing Management (NMDA Version)", RFC 8349, 3476 DOI 10.17487/RFC8349, March 2018, 3477 . 3479 [RFC8402] Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., 3480 Decraene, B., Litkowski, S., and R. Shakir, "Segment 3481 Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, 3482 July 2018, . 3484 [RFC8407] Bierman, A., "Guidelines for Authors and Reviewers of 3485 Documents Containing YANG Data Models", BCP 216, RFC 8407, 3486 DOI 10.17487/RFC8407, October 2018, 3487 . 3489 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 3490 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 3491 . 3493 9.2. Informative References 3495 [I-D.hu-spring-srv6-yang] 3496 Li, Z., Matsushima, S., and K. Horiba, "YANG Data Model 3497 for SRv6", draft-hu-spring-srv6-yang-00 (work in 3498 progress), October 2017. 3500 [I-D.ietf-6man-segment-routing-header] 3501 Filsfils, C., Dukes, D., Previdi, S., Leddy, J., 3502 Matsushima, S., and d. daniel.voyer@bell.ca, "IPv6 Segment 3503 Routing Header (SRH)", draft-ietf-6man-segment-routing- 3504 header-21 (work in progress), June 2019. 3506 [I-D.ietf-dmm-srv6-mobile-uplane] 3507 Matsushima, S., Filsfils, C., Kohno, M., Camarillo, P., 3508 daniel.voyer@bell.ca, d., and C. Perkins, "Segment Routing 3509 IPv6 for Mobile User Plane", draft-ietf-dmm-srv6-mobile- 3510 uplane-05 (work in progress), July 2019. 3512 [I-D.ietf-spring-sr-yang] 3513 Litkowski, S., Qu, Y., Lindem, A., Sarkar, P., and J. 3514 Tantsura, "YANG Data Model for Segment Routing", draft- 3515 ietf-spring-sr-yang-13 (work in progress), July 2019. 3517 [I-D.xuclad-spring-sr-service-chaining] 3518 Clad, F., Xu, X., Filsfils, C., daniel.bernier@bell.ca, 3519 d., Li, C., Decraene, B., Ma, S., Yadlapalli, C., 3520 Henderickx, W., and S. Salsano, "Segment Routing for 3521 Service Chaining", draft-xuclad-spring-sr-service- 3522 chaining-01 (work in progress), March 2018. 3524 Authors' Addresses 3526 Kamran Raza 3527 Cisco Systems 3528 Email: skraza@cisco.com 3530 Jaganbabu Rajamanickam 3531 Cisco Systems 3532 Email: jrajaman@cisco.com 3534 Xufeng Liu 3535 Volta Networks 3536 Email: xufeng.liu.ietf@gmail.com 3538 Zhibo Hu 3539 Huawei Technologies 3540 Email: huzhibo@huawei.com 3541 Iftekhar Hussain 3542 Infinera Corporation 3543 Email: IHussain@infinera.com 3545 Himanshu Shah 3546 Ciena Corporation 3547 Email: hshah@ciena.com 3549 Daniel Voyer 3550 Bell Canada 3551 Email: daniel.voyer@bell.ca 3553 Hani Elmalky 3554 Ericsson 3555 Email: hani.elmalky@ericsson.com 3557 Satoru Matsushima 3558 SoftBank 3559 Email: satoru.matsushima@g.softbank.co.jp 3561 Katsuhiro Horiba 3562 SoftBank 3563 Email: katsuhiro.horiba@g.softbank.co.jp 3565 Ahmed AbdelSalam 3566 Cisco Systems 3567 Email: ahabdels@cisco.com