idnits 2.17.1 draft-ietf-spring-srv6-yang-00.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 8 instances of too long lines in the document, the longest one being 33 characters in excess of 72. ** There is 1 instance of lines with control characters in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 256 has weird spacing: '...address ine...' == Line 307 has weird spacing: '...pported boo...' == Line 310 has weird spacing: '...pported boo...' == Line 318 has weird spacing: '...pported boo...' == Line 321 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. -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'IGP' is mentioned on line 233, but not defined == Outdated reference: A later version (-30) exists of draft-ietf-spring-sr-yang-22 == Outdated reference: A later version (-28) exists of draft-ietf-spring-srv6-network-programming-18 == Outdated reference: A later version (-24) exists of draft-ietf-dmm-srv6-mobile-uplane-09 == Outdated reference: A later version (-09) exists of draft-ietf-spring-sr-service-programming-03 Summary: 2 errors (**), 0 flaws (~~), 14 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 SPRING Working Group K. Raza 2 Internet-Draft S. Agarwal 3 Intended status: Standards Track Cisco Systems 4 Expires: March 13, 2021 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 S. Matsushima 21 K. Horiba 22 SoftBank 24 H. Elmalky 26 A. AbdelSalam 27 J. Rajamanickam 28 Cisco Systems 30 September 9, 2020 32 YANG Data Model for SRv6 Base and Static 33 draft-ietf-spring-srv6-yang-00 35 Abstract 37 This document describes a YANG data model for Segment Routing IPv6 38 (SRv6) base. The model serves as a base framework for configuring 39 and managing an SRv6 subsystem and expected to be augmented by other 40 SRv6 technology models accordingly. Additionally, this document also 41 specifies the model for the SRv6 Static application. 43 The YANG modules in this document conform to the Network Management 44 Datastore Architecture (NMDA). 46 Status of This Memo 48 This Internet-Draft is submitted in full conformance with the 49 provisions of BCP 78 and BCP 79. 51 Internet-Drafts are working documents of the Internet Engineering 52 Task Force (IETF). Note that other groups may also distribute 53 working documents as Internet-Drafts. The list of current Internet- 54 Drafts is at https://datatracker.ietf.org/drafts/current/. 56 Internet-Drafts are draft documents valid for a maximum of six months 57 and may be updated, replaced, or obsoleted by other documents at any 58 time. It is inappropriate to use Internet-Drafts as reference 59 material or to cite them other than as "work in progress." 61 This Internet-Draft will expire on March 13, 2021. 63 Copyright Notice 65 Copyright (c) 2020 IETF Trust and the persons identified as the 66 document authors. All rights reserved. 68 This document is subject to BCP 78 and the IETF Trust's Legal 69 Provisions Relating to IETF Documents 70 (https://trustee.ietf.org/license-info) in effect on the date of 71 publication of this document. Please review these documents 72 carefully, as they describe your rights and restrictions with respect 73 to this document. Code Components extracted from this document must 74 include Simplified BSD License text as described in Section 4.e of 75 the Trust Legal Provisions and are provided without warranty as 76 described in the Simplified BSD License. 78 Table of Contents 80 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 81 2. Specification of Requirements . . . . . . . . . . . . . . . . 3 82 3. YANG Model . . . . . . . . . . . . . . . . . . . . . . . . . 4 83 3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4 84 3.2. SRv6 Types . . . . . . . . . . . . . . . . . . . . . . . 4 85 3.3. SRv6 Base . . . . . . . . . . . . . . . . . . . . . . . . 5 86 3.3.1. Configuration . . . . . . . . . . . . . . . . . . . . 5 87 3.3.2. State . . . . . . . . . . . . . . . . . . . . . . . . 6 88 3.3.3. Notification . . . . . . . . . . . . . . . . . . . . 8 89 3.4. SRv6 Static . . . . . . . . . . . . . . . . . . . . . . . 9 90 3.4.1. Configuration . . . . . . . . . . . . . . . . . . . . 9 91 3.4.2. State . . . . . . . . . . . . . . . . . . . . . . . . 15 92 3.4.3. Notification . . . . . . . . . . . . . . . . . . . . 15 93 4. Pending Items . . . . . . . . . . . . . . . . . . . . . . . . 15 94 5. YANG Specification . . . . . . . . . . . . . . . . . . . . . 15 95 5.1. SRv6 Types . . . . . . . . . . . . . . . . . . . . . . . 15 96 5.2. SRv6 Base . . . . . . . . . . . . . . . . . . . . . . . . 32 97 5.3. SRv6 Static . . . . . . . . . . . . . . . . . . . . . . . 48 98 6. Security Considerations . . . . . . . . . . . . . . . . . . . 71 99 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 72 100 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 72 101 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 73 102 9.1. Normative References . . . . . . . . . . . . . . . . . . 73 103 9.2. Informative References . . . . . . . . . . . . . . . . . 75 105 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 75 107 1. Introduction 109 The Network Configuration Protocol (NETCONF) [RFC6241] is one of the 110 network management protocols that defines mechanisms to manage 111 network devices. YANG [RFC6020] is a modular language that 112 represents data structures in an XML tree format, and is used as a 113 data modeling language for the NETCONF. 115 Segment Routing (SR), as defined in [RFC8402], leverages the source 116 routing paradigm where a node steers a packet through an ordered list 117 of instructions, called segments. SR, thus, allows enforcing a flow 118 through any topological path and/or service chain while maintaining 119 per-flow state only at the ingress nodes to the SR domain. When 120 applied to ipv6 data-plane (i.e. SRv6), SR requires a type of 121 routing header (SRH) in an IPv6 packet that is used to encode an 122 ordered list of IPv6 addresses (SIDs). The active segment is 123 indicated by the Destination Address of the packet, and the next 124 segment is indicated by a pointer in the SRH [RFC8754]. The various 125 functions and behaviors corresponding to network programming using 126 SRv6 are 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-value: Typedef for FUNC value in an SRv6 SID 188 o srv6-func-value-reserved-type: Enum (list) of "reserved" FUNC 189 opcode 191 o srv6-endpoint-type: SRv6 Endpoint behaviors 192 [I-D.ietf-spring-srv6-network-programming] identity type 194 o srv6-headend-type: SRv6 Headend behavior types 195 [I-D.ietf-spring-srv6-network-programming] identity type 197 o srv6-security-type: SRv6 Security rule type 198 [I-D.ietf-spring-srv6-network-programming] identity type 200 o srv6-counter-type: SRv6 Counter type 201 [I-D.ietf-spring-srv6-network-programming] identity type 203 The corresponding YANG specification for this module is captured in 204 Section 5.1. 206 3.3. SRv6 Base 208 The base SRv6 model is specified in ietf-srv6-base module. This 209 module augments "/rt:routing:/sr:segment-routing" 210 [I-D.ietf-spring-sr-yang] and specifies the configuration, 211 operational state, and notification events that are required to 212 manage the base SRv6. 214 The corresponding YANG specification for this module is captured in 215 Section 5.2. 217 3.3.1. Configuration 219 The module defines some fundamental items required to configure an 220 SRv6 network: 222 o SRv6 Enablement: Enable Segment-Routing SRv6 feature 224 o Encapsulation Parameters: Provide encapsulation related parameters 225 (such as source-address, hop-limit, and traffic-class) to be used 226 when performing T.Encap* operation. 228 o Locator(s) Specification: SRv6 locator is a fundamental construct 229 for an SRv6 network. This is the construct from which SID 230 (function values) are allocated that on the local box, and 231 advertised to and used by remote nodes for reachability. A 232 locator is identified by a name and has associated prefix and 233 [IGP] algorithm. It can be configured as an anycast locator. It 234 is possible to have more than one locator on a node (e.g. locator 235 per algorithm, anycast and non-anycast locators, etc.). 237 Following is a simplified graphical tree representation of the data 238 model for SRv6 base configuration 239 module: ietf-srv6-base 240 augment /rt:routing/sr:segment-routing: 241 +--rw srv6 242 +--rw enable? boolean 243 +--rw encapsulation 244 | +--rw source-address? inet:ipv6-address 245 | +--rw hop-limit 246 | | +--rw value? uint8 247 | | +--rw propagate? boolean 248 | +--rw traffic-class 249 | +--rw value? uint8 250 | +--rw propagate? boolean 251 +--rw locators 252 +--rw locator* [name] 253 +--rw name string 254 +--rw enable? boolean 255 +--rw prefix 256 | +--rw address inet:ipv6-address 257 | +--rw length srv6-types:srv6-locator-len 258 +--rw algorithm? uint32 259 +--rw anycast? boolean 261 Figure 1: SRv6 Base - Config Tree 263 3.3.2. State 265 As per NMDA model, the state related to configuration items specified 266 in above section Section 3.3.1 can be retrieved from the same tree. 267 This section defines other operational state items related to SRv6 268 base. 270 The operational state corresponding to the SRv6 base includes: 272 o node capabilities: provides information on the node (hardware) 273 capabilities and support regarding various SRv6 aspects and 274 features including endpoint behaviors, headend behaviors, security 275 rules, counter/stats support, and other SRv6 parameters that need 276 to be signaled in an SRv6 network by the protocols. 278 o locator: provides information related to a locator. The 279 information includes locator operational state, and state of 280 address conflict with any ipv6 address configured on local 281 interfaces etc. 283 o local-sid: provides information related to local-SIDs allocated 284 and/or installed on the node. This includes two types of 285 information: 287 1. aggregate across all local-SIDs such as aggregate counters 289 2. per local-SID information such as allocation type (dynamic or 290 explicit), SID owner protocol(s)/client(s), forwarding [paths] 291 information, and stats/counters. 293 Following is a simplified graphical tree representation of the data 294 model for the SRv6 operational state (for read-only items): 296 module: ietf-srv6-base 297 augment /rt:routing/sr:segment-routing: 298 +--rw srv6 299 +--rw locators 300 | +--rw locator* [name] 301 | +--rw name string 302 | +--ro operational-status? srv6-types:srv6-status-type 303 | +--ro is-in-address-conflict? boolean 304 +--ro node-capabilities 305 | +--ro end-behavior* [type] 306 | | +--ro type identityref 307 | | +--ro supported boolean 308 | +--ro headend-behavior* [type] 309 | | +--ro type identityref 310 | | +--ro supported boolean 311 | +--ro msd 312 | | +--ro max-sl? uint8 313 | | +--ro max-end-pop? uint8 314 | | +--ro max-h_encap? uint8 315 | | +--ro max-end_d? uint8 316 | +--ro security-rule* [type] 317 | | +--ro type identityref 318 | | +--ro supported boolean 319 | +--ro counters* [type] 320 | +--ro type identityref 321 | +--ro supported boolean 322 +--ro local-sids 323 +--ro counters 324 | +--ro cnt-3 325 | +--ro in-pkts? yang:counter64 326 | +--ro in-octets? yang:counter64 327 +--ro local-sid* [sid] 328 +--ro sid srv6-types:srv6-sid 329 +--ro locator? -> /rt:routing/sr:segment-routing/srv6:srv6/locators/locator/name 330 +--ro is-reserved? boolean 331 +--ro end-behavior-type? identityref 332 +--ro alloc-type? srv6-types:sid-alloc-type 333 +--ro owner* [type instance] 334 | +--ro type identityref 335 | +--ro instance string 336 | +--ro is-winner? boolean 337 +--ro forwarding 338 | +--ro is-installed? boolean 339 | +--ro next-hop-type? srv6-types:srv6-nexthop-type 340 | +--ro paths 341 | +--ro path* [path-index] 342 | +--ro path-index uint8 343 | +--ro l2 344 | | +--ro interface? if:interface-ref 345 | +--ro l3 346 | | +--ro interface? if:interface-ref 347 | | +--ro next-hop? inet:ip-address 348 | | +--ro weight? uint32 349 | | +--ro role? enumeration 350 | | +--ro backup-path-index? uint8 351 | +--ro (encap-type)? 352 | +--:(srv6) 353 | | +--ro out-sid* [sid] 354 | | +--ro sid srv6-types:srv6-sid 355 | +--:(mpls) 356 | +--ro out-label* [label] 357 | +--ro label rt-types:mpls-label 358 +--ro counters 359 +--ro cnt-1 360 +--ro in-pkts? yang:counter64 361 +--ro in-octets? yang:counter64 363 Figure 2: SRv6 Base - State Tree 365 3.3.3. Notification 367 This model defines a list of notifications to inform an operator of 368 important events detected during the SRv6 operation. These events 369 include events related to: 371 o locator operational state changes 373 o local-SID collision event 375 Following is a simplified graphical tree representation of the data 376 model for SRv6 notifications: 378 module: ietf-srv6-base 380 notifications: 381 +---n srv6-locator-status-event 382 | +--ro operational-status? srv6-types:srv6-status-type 383 | +--ro locator? -> /rt:routing/sr:segment-routing/srv6:srv6/locators/locator/name 384 +---n srv6-sid-collision-event 385 +--ro sid? srv6-types:srv6-sid 386 +--ro existing 387 | +--ro end-behavior-type? identityref 388 +--ro requested 389 +--ro end-behavior-type? identityref 391 Figure 3: SRv6 Base - Notification Tree 393 3.4. SRv6 Static 395 SRv6-Static application allows a user to specify SRv6 local SIDs and 396 program them in the forwarding plane. The SRv6-Static model is 397 captured in the ietf-srv6-static module. 399 The associated YANG specification for this module is captured in 400 Section 5.3. 402 3.4.1. Configuration 404 The SRv6-Static configuration augments the SRv6-base locator tree 405 "/rt:routing/sr:segment-routing/srv6:srv6/srv6:locators/srv6:locator" 407 Following are salient features of the SRv6-Static config model: 409 o Allows static (explicit) configuration for local-SIDs under a 410 given locator. 412 o Given that entry is scoped under a locator, the key for each entry 413 is "function" value. 415 o A user must also specify end-behavior type (End*) associated with 416 the entry. 418 o A user must also specify behavior-specific data with each entry. 419 For example, for any end behavior requiring a table lookup, a 420 lookup-table need be provided. Similarly, for any end behavior 421 with forwarding next-hops need to specify next-hop information. 422 The example of former include End, End.T, End.DT4, End.DT6, and 423 End.DT46, whereas example of later include End.X, End.DX4, 424 End.DX6, End.B6, End.BM etc. 426 o Each local-SID entry has zero or more forwarding paths specified. 428 o A forwarding path has next-hop type that depends on the end 429 behavior, and could be either ipv6, or ipv4, or mpls, or l2 type. 430 For example, End.X, End.DX4, End.DX6, End.B6, End.BM, and End.DX2 431 will have ipv6, ipv4, ipv6, ipv6, mpls, and l2 next-hop types 432 respectively 434 o For each forwarding next-hop type, the appropriate path attributes 435 are to be specified as well. For L2 type, the only other 436 information required is the L2 interface name. Whereas for L3 437 (ipv6, ipv4, mpls) types, the information includes L3 interface 438 name, next-hop IP address, weight, and protection information. 440 o Depending on the end behavior type, a forwarding path may have 441 either MPLS or SRv6 encapsulation -- i.e., Stack of out-labels or 442 Stack of SRv6 out-SIDs. The example of former is End.BM and 443 example of later include the rest (End.X, End.DX4, End.DX6, End.B6 444 etc.). 446 Following is a simplified graphical tree representation of the data 447 model for SRv6 Static configuration 449 module: ietf-srv6-static 450 augment /rt:routing/sr:segment-routing/srv6:srv6/srv6:locators/srv6:locator: 451 +--rw static 452 +--rw local-sids 453 +--rw sid* [function] 454 +--rw function srv6-types:srv6-func-value 455 +--rw end-behavior-type identityref 456 +--rw end 457 +--rw end_psp 458 +--rw end_usp 459 +--rw end_psp_usp 460 +--rw end_usd 461 +--rw end_psp_usd 462 +--rw end_usp_usd 463 +--rw end_psp_usp_usd 464 +--rw end-t 465 | +--rw lookup-table-ipv6 srv6-types:table-id 466 +--rw end-t_psp 467 | +--rw lookup-table-ipv6 srv6-types:table-id 468 +--rw end-t_usp 469 | +--rw lookup-table-ipv6 srv6-types:table-id 470 +--rw end-t_psp_usp 471 | +--rw lookup-table-ipv6 srv6-types:table-id 472 +--rw end-t_usd 473 | +--rw lookup-table-ipv6 srv6-types:table-id 474 +--rw end-t_psp_usd 475 | +--rw lookup-table-ipv6 srv6-types:table-id 476 +--rw end-t_usp_usd 477 | +--rw lookup-table-ipv6 srv6-types:table-id 478 +--rw end-t_psp_usp_usd 479 | +--rw lookup-table-ipv6 srv6-types:table-id 480 +--rw end-x 481 | +--rw protected? boolean 482 | +--rw paths 483 | +--rw path* [path-index] 484 | +--rw path-index uint8 485 | +--rw interface? if:interface-ref 486 | +--rw next-hop? inet:ipv6-address 487 | +--rw table? srv6-types:table-id 488 | +--rw weight? uint32 489 | +--rw role? enumeration 490 | +--rw backup-path-index? uint8 491 | +--rw sid-list 492 | +--rw out-sid* [sid] 493 | +--rw sid srv6-types:srv6-sid 494 +--rw end-x_psp 495 | +--rw protected? boolean 496 | +--rw paths 497 | +--rw path* [path-index] 498 | +--rw path-index uint8 499 | +--rw interface? if:interface-ref 500 | +--rw next-hop? inet:ipv6-address 501 | +--rw table? srv6-types:table-id 502 | +--rw weight? uint32 503 | +--rw role? enumeration 504 | +--rw backup-path-index? uint8 505 | +--rw sid-list 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 table? srv6-types:table-id 516 | +--rw weight? uint32 517 | +--rw role? enumeration 518 | +--rw backup-path-index? uint8 519 | +--rw sid-list 520 | +--rw out-sid* [sid] 521 | +--rw sid srv6-types:srv6-sid 522 +--rw end-x_psp_usp 523 | +--rw protected? boolean 524 | +--rw paths 525 | +--rw path* [path-index] 526 | +--rw path-index uint8 527 | +--rw interface? if:interface-ref 528 | +--rw next-hop? inet:ipv6-address 529 | +--rw table? srv6-types:table-id 530 | +--rw weight? uint32 531 | +--rw role? enumeration 532 | +--rw backup-path-index? uint8 533 | +--rw sid-list 534 | +--rw out-sid* [sid] 535 | +--rw sid srv6-types:srv6-sid 536 +--rw end-x_usd 537 | +--rw protected? boolean 538 | +--rw paths 539 | +--rw path* [path-index] 540 | +--rw path-index uint8 541 | +--rw interface? if:interface-ref 542 | +--rw next-hop? inet:ipv6-address 543 | +--rw table? srv6-types:table-id 544 | +--rw weight? uint32 545 | +--rw role? enumeration 546 | +--rw backup-path-index? uint8 547 | +--rw sid-list 548 | +--rw out-sid* [sid] 549 | +--rw sid srv6-types:srv6-sid 550 +--rw end-x_psp_usd 551 | +--rw protected? boolean 552 | +--rw paths 553 | +--rw path* [path-index] 554 | +--rw path-index uint8 555 | +--rw interface? if:interface-ref 556 | +--rw next-hop? inet:ipv6-address 557 | +--rw table? srv6-types:table-id 558 | +--rw weight? uint32 559 | +--rw role? enumeration 560 | +--rw backup-path-index? uint8 561 | +--rw sid-list 562 | +--rw out-sid* [sid] 563 | +--rw sid srv6-types:srv6-sid 564 +--rw end-x_usp_usd 565 | +--rw protected? boolean 566 | +--rw paths 567 | +--rw path* [path-index] 568 | +--rw path-index uint8 569 | +--rw interface? if:interface-ref 570 | +--rw next-hop? inet:ipv6-address 571 | +--rw table? srv6-types:table-id 572 | +--rw weight? uint32 573 | +--rw role? enumeration 574 | +--rw backup-path-index? uint8 575 | +--rw sid-list 576 | +--rw out-sid* [sid] 577 | +--rw sid srv6-types:srv6-sid 578 +--rw end-x_psp_usp_usd 579 | +--rw protected? boolean 580 | +--rw paths 581 | +--rw path* [path-index] 582 | +--rw path-index uint8 583 | +--rw interface? if:interface-ref 584 | +--rw next-hop? inet:ipv6-address 585 | +--rw table? srv6-types:table-id 586 | +--rw weight? uint32 587 | +--rw role? enumeration 588 | +--rw backup-path-index? uint8 589 | +--rw sid-list 590 | +--rw out-sid* [sid] 591 | +--rw sid srv6-types:srv6-sid 592 +--rw end-b6-encaps 593 | +--rw policy-name string 594 | +--rw source-address inet:ipv6-address 595 | +--rw paths 596 | +--rw path* [path-index] 597 | +--rw path-index uint8 598 | +--rw interface? if:interface-ref 599 | +--rw next-hop? inet:ipv6-address 600 | +--rw table? srv6-types:table-id 601 | +--rw weight? uint32 602 | +--rw role? enumeration 603 | +--rw backup-path-index? uint8 604 | +--rw sid-list 605 | +--rw out-sid* [sid] 606 | +--rw sid srv6-types:srv6-sid 607 +--rw end-bm 608 | +--rw policy-name string 609 | +--rw paths 610 | +--rw path* [path-index] 611 | +--rw path-index uint8 612 | +--rw interface? if:interface-ref 613 | +--rw next-hop? inet:ip-address 614 | +--rw weight? uint32 615 | +--rw role? enumeration 616 | +--rw backup-path-index? uint8 617 | +--rw sid-list 618 | +--rw out-sid* [sid] 619 | +--rw sid srv6-types:srv6-sid 620 +--rw end-dx6 621 | +--rw paths 622 | +--rw path* [path-index] 623 | +--rw path-index uint8 624 | +--rw interface? if:interface-ref 625 | +--rw next-hop? inet:ipv6-address 626 | +--rw table? srv6-types:table-id 627 | +--rw weight? uint32 628 | +--rw role? enumeration 629 | +--rw backup-path-index? uint8 630 | +--rw sid-list 631 | +--rw out-sid* [sid] 632 | +--rw sid srv6-types:srv6-sid 633 +--rw end-dx4 634 | +--rw paths 635 | +--rw path* [path-index] 636 | +--rw path-index uint8 637 | +--rw interface? if:interface-ref 638 | +--rw next-hop? inet:ipv4-address 639 | +--rw table? srv6-types:table-id 640 | +--rw weight? uint32 641 | +--rw role? enumeration 642 | +--rw backup-path-index? uint8 643 | +--rw sid-list 644 | +--rw out-sid* [sid] 645 | +--rw sid srv6-types:srv6-sid 646 +--rw end-dt6 647 | +--rw lookup-table-ipv6 srv6-types:table-id 648 +--rw end-dt4 649 | +--rw lookup-table-ipv4 srv6-types:table-id 650 +--rw end-dt46 651 | +--rw lookup-table-ipv4 srv6-types:table-id 652 | +--rw lookup-table-ipv6 srv6-types:table-id 653 +--rw end-dx2 654 | +--rw path 655 | +--rw l2-interface if:interface-ref 656 +--rw end-dx2v 657 | +--rw lookup-table-vlan srv6-types:table-id 658 +--rw end-dt2u 659 | +--rw lookup-table-mac srv6-types:table-id 660 +--rw end-dt2m 661 +--rw flooding-table srv6-types:table-id 662 +--rw paths 663 +--rw path* [path-index] 664 +--rw path-index uint8 665 +--rw l2-interface? if:interface-ref 667 Figure 4: SRv6 Static - Config Tree 669 3.4.2. State 671 As per NMDA model, the state related to configuration items specified 672 in above section Section 3.4.1 can be retrieved from the same tree. 673 The state regarding the local-SIDs created by SRv6-static model can 674 be obtained using the state model of SRv6-base. Hence, there is no 675 additional state identified at this time for SRv6-static. 677 3.4.3. Notification 679 None. 681 4. Pending Items 683 Following are the items that will be addressed in next revisions: 685 o Extend local-SID collision event/notification in SRv6-base model. 687 o Add RPC support in the SRv6-base model. 689 o Add ARGS support in the SRv6-Static model. 691 o QoS support 693 5. YANG Specification 695 Following are actual YANG definition for SRv6 modules defined earlier 696 in the document. 698 5.1. SRv6 Types 700 This YANG module imports types defined in [RFC6991]. 702 Moreover, the module models behaviors defined in 703 [I-D.ietf-spring-srv6-network-programming], 704 [I-D.ietf-spring-sr-service-programming], and 705 [I-D.ietf-dmm-srv6-mobile-uplane]. 707 file "ietf-srv6-types@2020-07-13.yang" 709 // RFC Editor: replace the above date with the date of 710 // publication and remove this note. 712 module ietf-srv6-types { 713 yang-version 1.1; 715 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-types"; 716 prefix srv6-types; 718 import ietf-inet-types { 719 prefix inet; 720 reference "RFC 6991: Common YANG Data Types"; 721 } 723 organization 724 "IETF SPRING Working Group"; 725 contact 726 "WG Web: 727 WG List: 729 Editor: Kamran Raza 730 732 Editor: Jaganbabu Rajamanickam 733 735 Editor: Xufeng Liu 736 738 Editor: Zhibo Hu 739 741 Editor: Iftekhar Hussain 742 744 Editor: Himanshu Shah 745 747 Editor: Daniel Voyer 748 750 Editor: Hani Elmalky 751 753 Editor: Satoru Matsushima 754 756 Editor: Katsuhiro Horiba 757 759 Editor: Ahmed AbdelSalam 760 762 "; 764 description 765 "This YANG module defines the essential types for the 766 management of Segment-Routing with IPv6 dataplane (SRv6). 768 Copyright (c) 2018 IETF Trust and the persons identified as 769 authors of the code. All rights reserved. 771 Redistribution and use in source and binary forms, with or 772 without modification, is permitted pursuant to, and subject 773 to the license terms contained in, the Simplified BSD License 774 set forth in Section 4.c of the IETF Trust's Legal Provisions 775 Relating to IETF Documents 776 (http://trustee.ietf.org/license-info)."; 778 reference "RFC XXXX"; 779 // RFC Editor: replace XXXX with actual RFC number and remove 780 // this note 782 revision 2020-07-13 { 783 description 784 "Alignment with SRv6 net-pgm rev16"; 785 reference 786 "RFC XXXX: YANG Data Model for SRv6"; 787 // RFC Editor: replace XXXX with actual RFC number and remove 788 // this note 789 } 791 revision 2019-10-30 { 792 description 793 "Renaming of some types"; 794 reference 795 "RFC XXXX: YANG Data Model for SRv6"; 796 // RFC Editor: replace XXXX with actual RFC number and remove 797 // this note 798 } 800 revision 2019-07-08 { 801 description 802 "Alignment with latest SRv6 network programming"; 803 reference 804 "RFC XXXX: YANG Data Model for SRv6"; 805 // RFC Editor: replace XXXX with actual RFC number and remove 806 // this note 808 } 810 revision 2018-10-22 { 811 description 812 "Initial revision."; 813 reference 814 "RFC XXXX: YANG Data Model for SRv6"; 815 // RFC Editor: replace XXXX with actual RFC number and remove 816 // this note 817 } 819 identity srv6-endpoint-type { 820 description 821 "Base identity from which specific SRv6 Endpoint types are 822 derived."; 823 } 825 /* Endpoints defined under draft-ietf-spring- 826 * srv6-network-programming */ 828 identity End { 829 base srv6-endpoint-type; 830 description 831 "End function (variant: no PSP, no USP)."; 832 reference 833 "draft-ietf-spring-srv6-network-programming-01"; 834 // RFC Editor: replace with actual RFC number and remove this note 835 } 837 identity End_PSP { 838 base srv6-endpoint-type; 839 description 840 "End function (variant: PSP only)."; 841 reference 842 "draft-ietf-spring-srv6-network-programming-01"; 843 // RFC Editor: replace with actual RFC number and remove this note 844 } 846 identity End_USP { 847 base srv6-endpoint-type; 848 description 849 "End function (variant: USP only)."; 850 reference 851 "draft-ietf-spring-srv6-network-programming-01"; 852 // RFC Editor: replace with actual RFC number and remove this note 853 } 855 identity End_PSP_USP { 856 base srv6-endpoint-type; 857 description 858 "End function (variant: PSP and USP)."; 859 reference 860 "draft-ietf-spring-srv6-network-programming-01"; 861 // RFC Editor: replace with actual RFC number and remove this note 862 } 864 identity End.X { 865 base srv6-endpoint-type; 866 description 867 "Endpoint with cross-connect to an array 868 of layer-3 adjacencies (variant: no PSP, no USP)."; 869 reference 870 "draft-ietf-spring-srv6-network-programming-01"; 871 // RFC Editor: replace with actual RFC number and remove this note 872 } 874 identity End.X_PSP { 875 base srv6-endpoint-type; 876 description 877 "Endpoint with cross-connect to an array 878 of layer-3 adjacencies (variant: PSP only)."; 879 reference 880 "draft-ietf-spring-srv6-network-programming-01"; 881 // RFC Editor: replace with actual RFC number and remove this note 882 } 884 identity End.X_USP { 885 base srv6-endpoint-type; 886 description 887 "Endpoint with cross-connect to an array 888 of layer-3 adjacencies (variant: USP only)."; 889 reference 890 "draft-ietf-spring-srv6-network-programming-01"; 891 // RFC Editor: replace with actual RFC number and remove this note 892 } 894 identity End.X_PSP_USP { 895 base srv6-endpoint-type; 896 description 897 "Endpoint with cross-connect to an array 898 of layer-3 adjacencies (variant: PSP and USP)."; 899 reference 900 "draft-ietf-spring-srv6-network-programming-01"; 901 // RFC Editor: replace with actual RFC number and remove this note 902 } 903 identity End.T { 904 base srv6-endpoint-type; 905 description 906 "Endpoint with specific IPv6 table lookup 907 (variant: no PSP, no USP)."; 908 reference 909 "draft-ietf-spring-srv6-network-programming-01"; 910 // RFC Editor: replace with actual RFC number and remove this note 911 } 913 identity End.T_PSP { 914 base srv6-endpoint-type; 915 description 916 "Endpoint with specific IPv6 table lookup 917 (variant: PSP only)."; 918 reference 919 "draft-ietf-spring-srv6-network-programming-01"; 920 // RFC Editor: replace with actual RFC number and remove this note 921 } 923 identity End.T_USP { 924 base srv6-endpoint-type; 925 description 926 "Endpoint with specific IPv6 table lookup 927 (variant: USP only)."; 928 reference 929 "draft-ietf-spring-srv6-network-programming-01"; 930 // RFC Editor: replace with actual RFC number and remove this note 931 } 933 identity End.T_PSP_USP { 934 base srv6-endpoint-type; 935 description 936 "Endpoint with specific IPv6 table lookup 937 (variant: PSP and USP)."; 938 reference 939 "draft-ietf-spring-srv6-network-programming-01"; 940 // RFC Editor: replace with actual RFC number and remove this note 941 } 943 identity End.B6.Encaps { 944 base srv6-endpoint-type; 945 description 946 "Endpoint bound to an SRv6 Policy 947 where the SRv6 Policy also includes an 948 IPv6 Source Address A."; 949 reference 950 "draft-ietf-spring-srv6-network-programming-01"; 952 // RFC Editor: replace with actual RFC number and remove this note 953 } 955 identity End.BM { 956 base srv6-endpoint-type; 957 description 958 "Endpoint bound to an SR-MPLS Policy"; 959 reference 960 "draft-ietf-spring-srv6-network-programming-01"; 961 // RFC Editor: replace with actual RFC number and remove this note 962 } 964 identity End.DX6 { 965 base srv6-endpoint-type; 966 description 967 "Endpoint with decapsulation and cross-connect 968 to an array of IPv6 adjacencies"; 969 reference 970 "draft-ietf-spring-srv6-network-programming-01"; 971 // RFC Editor: replace with actual RFC number and remove this note 972 } 974 identity End.DX4 { 975 base srv6-endpoint-type; 976 description 977 "Endpoint with decapsulation and cross-connect 978 to an array of IPv4 adjacencies"; 979 reference 980 "draft-ietf-spring-srv6-network-programming-01"; 981 // RFC Editor: replace with actual RFC number and remove this note 982 } 984 identity End.DT6 { 985 base srv6-endpoint-type; 986 description 987 "Endpoint with decapsulation and specific 988 IPv6 table lookup"; 989 reference 990 "draft-ietf-spring-srv6-network-programming-01"; 991 // RFC Editor: replace with actual RFC number and remove this note 992 } 994 identity End.DT4 { 995 base srv6-endpoint-type; 996 description 997 "Endpoint with decapsulation and specific 998 IPv4 table lookup"; 999 reference 1000 "draft-ietf-spring-srv6-network-programming-01"; 1001 // RFC Editor: replace with actual RFC number and remove this note 1002 } 1004 identity End.DT46 { 1005 base srv6-endpoint-type; 1006 description 1007 "Endpoint with decapsulation and specific IP 1008 (IPv4 or IPv6) table lookup"; 1009 reference 1010 "draft-ietf-spring-srv6-network-programming-01"; 1011 // RFC Editor: replace with actual RFC number and remove this note 1012 } 1014 identity End.DX2 { 1015 base srv6-endpoint-type; 1016 description 1017 "Endpoint with decapsulation and Layer-2 1018 cross-connect to an L2 interface"; 1019 reference 1020 "draft-ietf-spring-srv6-network-programming-01"; 1021 // RFC Editor: replace with actual RFC number and remove this note 1022 } 1024 identity End.DX2V { 1025 base srv6-endpoint-type; 1026 description 1027 "Endpoint with decapsulation and specific 1028 VLAN L2 table lookup"; 1029 reference 1030 "draft-ietf-spring-srv6-network-programming-01"; 1031 // RFC Editor: replace with actual RFC number and remove this note 1032 } 1034 identity End.DT2U { 1035 base srv6-endpoint-type; 1036 description 1037 "Endpoint with decapsulation and specific 1038 unicast MAC L2 table lookup"; 1039 reference 1040 "draft-ietf-spring-srv6-network-programming-01"; 1041 // RFC Editor: replace with actual RFC number and remove this note 1042 } 1044 identity End.DT2M { 1045 base srv6-endpoint-type; 1046 description 1047 "Endpoint with decapsulation and specific L2 table 1048 flooding"; 1049 reference 1050 "draft-ietf-spring-srv6-network-programming-01"; 1051 // RFC Editor: replace with actual RFC number and remove this note 1052 } 1054 identity End.S { 1055 base srv6-endpoint-type; 1056 description 1057 "Endpoint in search of a target in table TE"; 1058 reference 1059 "draft-ietf-spring-srv6-network-programming-01"; 1060 // RFC Editor: replace with actual RFC number and remove this note 1061 } 1063 identity End.B6.Encaps.Red { 1064 base srv6-endpoint-type; 1065 description 1066 "This is a reduced encap variation of the End.B6.Encap 1067 behavior."; 1068 reference 1069 "draft-ietf-spring-srv6-network-programming-01"; 1070 // RFC Editor: replace with actual RFC number and remove this note 1071 } 1073 identity End_USD { 1074 base srv6-endpoint-type; 1075 description 1076 "End function (variant: USD)."; 1077 reference 1078 "draft-ietf-spring-srv6-network-programming-01"; 1079 // RFC Editor: replace with actual RFC number and remove this note 1080 } 1082 identity End.PSP_USD { 1083 base srv6-endpoint-type; 1084 description 1085 "End function (variant: PSP and USD)."; 1086 reference 1087 "draft-ietf-spring-srv6-network-programming-01"; 1088 // RFC Editor: replace with actual RFC number and remove this note 1089 } 1091 identity End.USP_USD { 1092 base srv6-endpoint-type; 1093 description 1094 "End function (variant: USP and USD)."; 1095 reference 1096 "draft-ietf-spring-srv6-network-programming-01"; 1097 // RFC Editor: replace with actual RFC number and remove this note 1098 } 1100 identity End.PSP_USP_USD { 1101 base srv6-endpoint-type; 1102 description 1103 "End function (variant: PSP and USP and USD)."; 1104 reference 1105 "draft-ietf-spring-srv6-network-programming-01"; 1106 // RFC Editor: replace with actual RFC number and remove this note 1107 } 1109 identity End.X_USD { 1110 base srv6-endpoint-type; 1111 description 1112 "Endpoint with cross-connect to an array 1113 of layer-3 adjacencies (variant: USD)."; 1114 reference 1115 "draft-ietf-spring-srv6-network-programming-01"; 1116 // RFC Editor: replace with actual RFC number and remove this note 1117 } 1119 identity End.X_PSP_USD { 1120 base srv6-endpoint-type; 1121 description 1122 "Endpoint with cross-connect to an array 1123 of layer-3 adjacencies (variant: PSP and USD)."; 1124 reference 1125 "draft-ietf-spring-srv6-network-programming-01"; 1126 // RFC Editor: replace with actual RFC number and remove this note 1127 } 1129 identity End.X_USP_USD { 1130 base srv6-endpoint-type; 1131 description 1132 "Endpoint with cross-connect to an array 1133 of layer-3 adjacencies (variant: USP and USD)."; 1134 reference 1135 "draft-ietf-spring-srv6-network-programming-01"; 1136 // RFC Editor: replace with actual RFC number and remove this note 1137 } 1139 identity End.X_PSP_USP_USD { 1140 base srv6-endpoint-type; 1141 description 1142 "Endpoint with cross-connect to an array 1143 of layer-3 adjacencies (variant: PSP and USP and USD)."; 1145 reference 1146 "draft-ietf-spring-srv6-network-programming-01"; 1147 // RFC Editor: replace with actual RFC number and remove this note 1148 } 1150 identity End.T_USD { 1151 base srv6-endpoint-type; 1152 description 1153 "Endpoint with decapsulation and Layer-2 1154 cross-connect to an L2 interface"; 1155 reference 1156 "draft-ietf-spring-srv6-network-programming-01"; 1157 // RFC Editor: replace with actual RFC number and remove this note 1158 } 1160 identity End.T_PSP_USD { 1161 base srv6-endpoint-type; 1162 description 1163 "Endpoint with specific IPv6 table lookup 1164 (variant: PSP and USD)."; 1165 reference 1166 "draft-ietf-spring-srv6-network-programming-01"; 1167 // RFC Editor: replace with actual RFC number and remove this note 1168 } 1170 identity End.T_USP_USD { 1171 base srv6-endpoint-type; 1172 description 1173 "Endpoint with specific IPv6 table lookup 1174 (variant: USP and USD)."; 1175 reference 1176 "draft-ietf-spring-srv6-network-programming-01"; 1177 // RFC Editor: replace with actual RFC number and remove this note 1178 } 1180 identity End.T_PSP_USP_USD { 1181 base srv6-endpoint-type; 1182 description 1183 "Endpoint with specific IPv6 table lookup 1184 (variant: PSP and USP and USD)."; 1185 reference 1186 "draft-ietf-spring-srv6-network-programming-01"; 1187 // RFC Editor: replace with actual RFC number and remove this note 1188 } 1190 /* 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 1240 } 1241 identity End.M.GTP6.D { 1242 base srv6-endpoint-type; 1243 description 1244 "DMM End.M.GTP6.D"; 1245 reference 1246 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1247 // RFC Editor: replace with actual RFC number and remove this note 1248 } 1250 identity End.M.GTP6.E { 1251 base srv6-endpoint-type; 1252 description 1253 "DMM End.M.GTP6.E"; 1254 reference 1255 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1256 // RFC Editor: replace with actual RFC number and remove this note 1257 } 1259 identity End.M.GTP4.D { 1260 base srv6-endpoint-type; 1261 description 1262 "DMM End.M.GTP4.D"; 1263 reference 1264 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1265 // RFC Editor: replace with actual RFC number and remove this note 1266 } 1268 identity End.M.GTP4.E { 1269 base srv6-endpoint-type; 1270 description 1271 "DMM End.M.GTP4.E"; 1272 reference 1273 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1274 // RFC Editor: replace with actual RFC number and remove this note 1275 } 1277 identity End.Limit { 1278 base srv6-endpoint-type; 1279 description 1280 "DMM End.Limit"; 1281 reference 1282 "draft-ietf-dmm-srv6-mobile-uplane-05"; 1283 // RFC Editor: replace with actual RFC number and remove this note 1284 } 1286 identity srv6-headend-type { 1287 description 1288 "Base identity from which SRv6 headend rule types are derived."; 1290 } 1292 identity H.Encaps { 1293 base srv6-headend-type; 1294 description 1295 "Headend rule H.Encaps with encapsulated of an SRv6 policy"; 1296 reference 1297 "draft-ietf-spring-srv6-network-programming-16"; 1298 // RFC Editor: replace with actual RFC number and remove this note 1299 } 1301 identity H.Encaps.Red { 1302 base srv6-headend-type; 1303 description 1304 "Headend rule H.Encaps.Red with reduced encap of an 1305 SRv6 policy"; 1306 reference 1307 "draft-ietf-spring-srv6-network-programming-16"; 1308 // RFC Editor: replace with actual RFC number and remove this note 1309 } 1311 identity H.Encaps.L2 { 1312 base srv6-headend-type; 1313 description 1314 "Headend rule H.Encaps.l2 on the received L2 frame"; 1315 reference 1316 "draft-ietf-spring-srv6-network-programming-16"; 1317 // RFC Editor: replace with actual RFC number and remove this note 1318 } 1320 identity H.Encaps.L2.Red { 1321 base srv6-headend-type; 1322 description 1323 "Headend rule H.Encaps.L2.Red on the received L2 frame"; 1324 reference 1325 "draft-ietf-spring-srv6-network-programming-16"; 1326 // RFC Editor: replace with actual RFC number and remove this note 1327 } 1329 identity srv6-security-type { 1330 description 1331 "Base identity from which SRv6 Security rule types are 1332 derived."; 1333 } 1335 identity SEC-1 { 1336 base srv6-security-type; 1337 description 1338 "Security rule SEC-1"; 1339 reference 1340 "draft-ietf-spring-srv6-network-programming-01"; 1341 // RFC Editor: replace with actual RFC number and remove this note 1342 } 1344 identity SEC-2 { 1345 base srv6-security-type; 1346 description 1347 "Security rule SEC-2"; 1348 reference 1349 "draft-ietf-spring-srv6-network-programming-01"; 1350 // RFC Editor: replace with actual RFC number and remove this note 1351 } 1353 identity SEC-3 { 1354 base srv6-security-type; 1355 description 1356 "Security rule SEC-3"; 1357 reference 1358 "draft-ietf-spring-srv6-network-programming-01"; 1359 // RFC Editor: replace with actual RFC number and remove this note 1360 } 1362 identity srv6-counter-type { 1363 description 1364 "Base identity from which SRv6 counter types are derived."; 1365 } 1367 identity CNT-1 { 1368 base srv6-counter-type; 1369 description 1370 "Counter rule CNT-1"; 1371 reference 1372 "draft-ietf-spring-srv6-network-programming-01"; 1373 // RFC Editor: replace with actual RFC number and remove this note 1374 } 1376 identity CNT-2 { 1377 base srv6-counter-type; 1378 description 1379 "Counter rule CNT-2"; 1380 reference 1381 "draft-ietf-spring-srv6-network-programming-01"; 1382 // RFC Editor: replace with actual RFC number and remove this note 1383 } 1385 identity CNT-3 { 1386 base srv6-counter-type; 1387 description 1388 "Counter rule CNT-3"; 1389 reference 1390 "draft-ietf-spring-srv6-network-programming-01"; 1391 // RFC Editor: replace with actual RFC number and remove this note 1392 } 1394 typedef srv6-sid { 1395 type inet:ipv6-prefix; 1396 description 1397 "This type defines a SID value in SRv6"; 1398 } 1400 typedef srv6-func-value { 1401 type uint32; 1402 description 1403 "This is a typedef for SID's FUNC value"; 1404 } 1406 typedef srv6-func-value-reserved-type { 1407 type enumeration { 1408 enum invalid { value 0; description "Invalid function value"; } 1409 } 1411 description "SRv6 SID's FUNC Reserved values"; 1412 } 1414 typedef srv6-locator-len { 1415 type uint8 { 1416 range "32 .. 96"; 1417 } 1418 description 1419 "This type defines an SRv6 locator len with range constraints"; 1420 } 1422 typedef srv6-sid-pfxlen { 1423 type uint8 { 1424 range "32 .. 128"; 1425 } 1426 default 128; 1427 description 1428 "This type defines a SID prefixlen with range constraints"; 1429 } 1431 typedef sid-alloc-type { 1432 type enumeration { 1433 enum Dynamic { 1434 description 1435 "SID allocated dynamically."; 1436 } 1437 enum Explicit { 1438 description 1439 "SID allocated with explicit (static) value"; 1440 } 1441 } 1442 description 1443 "Types of sid allocation used."; 1444 } 1446 identity srv6-sid-owner-type { 1447 description 1448 "Base identity from which SID owner types are derived."; 1449 } 1451 identity isis { 1452 base srv6-sid-owner-type; 1453 description "ISIS"; 1454 } 1456 identity ospfv3 { 1457 base srv6-sid-owner-type; 1458 description "OSPFv3"; 1459 } 1461 identity bgp { 1462 base srv6-sid-owner-type; 1463 description "BGP"; 1464 } 1466 identity evpn { 1467 base srv6-sid-owner-type; 1468 description "EVPN"; 1469 } 1471 identity sr-policy { 1472 base srv6-sid-owner-type; 1473 description "SR Policy"; 1474 } 1476 identity service-function { 1477 base srv6-sid-owner-type; 1478 description "SF"; 1479 } 1481 typedef table-id { 1482 type uint32; 1483 description 1484 "Routing/switching/bridging/VLAN Table Id"; 1485 } 1487 typedef srv6-status-type { 1488 type enumeration { 1489 enum up { value 1; description "State is Up"; } 1490 enum down { description "State is Down"; } 1491 } 1492 description 1493 "Status type"; 1494 } 1496 typedef srv6-nexthop-type { 1497 type enumeration { 1498 enum ipv4 { value 1; description "IPv4 next-hop"; } 1499 enum ipv6 { description "IPv6 next-hop"; } 1500 enum mpls { description "MPLS next-hop"; } 1501 enum l2 { description "L2 next-hop"; } 1502 } 1503 description 1504 "Forwarding Next-hop type"; 1505 } 1507 } // module 1509 1511 Figure 5: ietf-srv6-types.yang 1513 5.2. SRv6 Base 1515 This YANG module imports types defined in [RFC6991], [RFC8294], 1516 [RFC8343], and [RFC8349]. 1518 file "ietf-srv6-base@2020-07-13.yang" 1520 // RFC Editor: replace the above date with the date of 1521 // publication and remove this note. 1523 module ietf-srv6-base { 1524 yang-version 1.1; 1526 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-base"; 1527 prefix srv6; 1529 import ietf-interfaces { 1530 prefix "if"; 1531 reference "RFC 8343: A YANG Data Model for Interface Management"; 1532 } 1534 import ietf-inet-types { 1535 prefix inet; 1536 reference "RFC 6991: Common YANG Data Types"; 1537 } 1539 import ietf-yang-types { 1540 prefix "yang"; 1541 reference "RFC 6991: Common YANG Data Types"; 1542 } 1544 import ietf-routing-types { 1545 prefix "rt-types"; 1546 reference "RFC 8294: Common YANG Data Types for the Routing Area"; 1547 } 1549 import ietf-routing { 1550 prefix "rt"; 1551 reference 1552 "RFC 8349: A YANG Data Model for Routing Management 1553 (NMDA version)"; 1554 } 1556 import ietf-segment-routing { 1557 prefix sr; 1558 reference "draft-ietf-spring-sr-yang"; 1559 } 1561 import ietf-srv6-types { 1562 prefix srv6-types; 1563 reference "RFC XXXX: YANG Data Model for SRv6"; 1564 // RFC Editor: replace XXXX with actual RFC number and remove 1565 // this note 1566 } 1568 organization 1569 "IETF SPRING Working Group"; 1570 contact 1571 "WG Web: 1572 WG List: 1574 Editor: Kamran Raza 1575 1577 Editor: Jaganbabu Rajamanickam 1578 1580 Editor: Xufeng Liu 1581 1583 Editor: Zhibo Hu 1584 1586 Editor: Iftekhar Hussain 1587 1589 Editor: Himanshu Shah 1590 1592 Editor: Daniel Voyer 1593 1595 Editor: Hani Elmalky 1596 1598 Editor: Satoru Matsushima 1599 1601 Editor: Katsuhiro Horiba 1602 1604 Editor: Ahmed AbdelSalam 1605 1607 "; 1609 description 1610 "This YANG module defines the essential elements for the 1611 management of Segment-Routing with IPv6 dataplane (SRv6). 1613 Copyright (c) 2017 IETF Trust and the persons identified as 1614 authors of the code. All rights reserved. 1616 Redistribution and use in source and binary forms, with or 1617 without modification, is permitted pursuant to, and subject 1618 to the license terms contained in, the Simplified BSD License 1619 set forth in Section 4.c of the IETF Trust's Legal Provisions 1620 Relating to IETF Documents 1621 (http://trustee.ietf.org/license-info)."; 1623 reference "RFC XXXX"; 1625 revision 2020-07-13 { 1626 description 1627 "Alignment with SRv6 network programming rev16"; 1628 reference 1629 "RFC XXXX: YANG Data Model for SRv6"; 1630 // RFC Editor: replace XXXX with actual RFC number and remove 1631 // this note 1632 } 1634 revision 2019-10-30 { 1635 description 1636 "Alignment with SRv6 network programming"; 1637 reference 1638 "RFC XXXX: YANG Data Model for SRv6"; 1639 // RFC Editor: replace XXXX with actual RFC number and remove 1640 // this note 1641 } 1643 revision 2019-07-08 { 1644 description 1645 "Alignment with SRv6 network programming"; 1646 reference 1647 "RFC XXXX: YANG Data Model for SRv6"; 1648 // RFC Editor: replace XXXX with actual RFC number and remove 1649 // this note 1650 } 1652 revision 2018-10-22 { 1653 description 1654 "Initial revision."; 1655 reference 1656 "RFC XXXX: YANG Data Model for SRv6"; 1657 // RFC Editor: replace XXXX with actual RFC number and remove 1658 // this note 1659 } 1661 /* 1662 * Common 1663 */ 1665 grouping path-attrs-cmn { 1666 description 1667 "Path properties -common for v4/v6"; 1669 leaf weight { 1670 type uint32; 1671 description 1672 "This value is used to compute a loadshare to perform un-equal 1673 load balancing when multiple outgoing path(s) are specified. A 1674 share is computed as a ratio of this number to the total under 1675 all configured path(s)."; 1676 } 1678 leaf role { 1679 type enumeration { 1680 enum PRIMARY { description "Path as primary traffic carrying"; } 1681 enum BACKUP { description "Path acts as a backup"; } 1682 enum PRIMARY_AND_BACKUP { 1683 description "Path acts as primary and backup simultaneously"; } 1684 } 1685 description "The path role"; 1686 } 1688 leaf backup-path-index { 1689 type uint8; 1690 description "Index of the protecting (backup) path"; 1691 } 1692 } 1694 grouping path-out-sids { 1695 description "Grouping for path's SID stack"; 1697 list out-sid { 1698 key "sid"; 1699 description "Out SID"; 1701 leaf sid { 1702 type srv6-types:srv6-sid; 1703 description "SID value"; 1704 } 1705 } 1706 } 1708 grouping path-out-labels { 1709 description "Grouping for path's label stack"; 1711 list out-label { 1712 key "label"; 1713 description "Out label"; 1715 leaf label { 1716 type rt-types:mpls-label; 1717 description "Label value"; 1718 } 1720 } 1722 } 1724 /* 1725 * Config and State 1726 */ 1728 grouping srv6-encap { 1729 description "Grouping for encap param config."; 1731 container encapsulation { 1732 description "Configure encapsulation related parameters"; 1733 leaf source-address { 1734 type inet:ipv6-address; 1735 description "Specify a source address (for T.Encap). 1736 The address must locally exists and be routable"; 1737 } 1738 container hop-limit { 1739 description "Configure IPv6 header's Hop-limit options"; 1740 leaf value { 1741 type uint8; 1742 default 64; 1743 description "Set encapsulating outer IPv6 header's Hoplimit 1744 field to specified value when doing 1745 encapsulation"; 1746 } 1748 leaf propagate { 1749 type boolean; 1750 default false; 1751 description "IP TTL/Hop-limit propagation from encapsulated 1752 packet to encapsulating outer IPv6 header's 1753 Hoplimit field. When configured on decapsulation 1754 side, this refers to propagating Hop-limit from 1755 outer IPv6 header to inner header after decap"; 1756 } 1757 } 1759 container traffic-class { 1760 description "Configure IPv6 header's Traffic-class options"; 1761 leaf value { 1762 type uint8; 1763 default 0; 1764 description "Set encapsulating outer IPv6 header's 1765 Traffic-class field to specified value when 1766 doing encapsulation"; 1767 } 1768 leaf propagate { 1769 type boolean; 1770 default false; 1771 description "Propagate (or map) Traffic-class/CoS/PCP from 1772 the incoming packet or L2 Ethernet frame being 1773 encapsulated to the encapsulating IPv6 header's 1774 Traffic-class field."; 1775 } 1776 } 1778 } 1779 } 1781 grouping srv6-locator-state { 1782 description "SRv6 grouping Locator state"; 1784 leaf operational-status { 1785 type srv6-types:srv6-status-type; 1786 config false; 1787 description "Indicates whether locator state is UP"; 1788 } 1790 leaf is-in-address-conflict { 1791 type boolean; 1792 config false; 1793 description "Indicates whether locator address conflicts with 1794 some other IPv6 address on the box"; 1795 } 1796 } 1798 grouping srv6-locators { 1799 description "SRv6 locator grouping"; 1801 container locators { 1802 description "SRv6 locators"; 1804 list locator { 1805 key "name"; 1806 description "Configure a SRv6 locator"; 1808 leaf name { 1809 type string; 1810 description "Locator name"; 1811 } 1813 leaf enable { 1814 type boolean; 1815 default false; 1816 description "Enable a SRv6 locator"; 1817 } 1819 container prefix { 1820 description "Specify locator prefix value"; 1821 leaf address { 1822 type inet:ipv6-address; 1823 mandatory true; 1824 description "IPv6 address"; 1825 } 1826 leaf length { 1827 type srv6-types:srv6-locator-len; 1828 mandatory true; 1829 description "Locator (prefix) length"; 1830 } 1831 } 1833 leaf algorithm { 1834 type uint32 { 1835 range "128..255"; 1836 } 1838 description "Algorithm Id (for Flex-Algo)"; 1839 } 1841 leaf anycast { 1842 type boolean; 1843 default false; 1844 description "Set to true if locator is an Anycast locator"; 1845 } 1847 uses srv6-locator-state; 1848 } 1849 } 1850 } 1852 grouping srv6-stats-in { 1853 description "Grouping for inbound stats"; 1855 leaf in-pkts { 1856 type yang:counter64; 1857 description 1858 "A cumulative counter of the total number of packets 1859 received"; 1860 } 1862 leaf in-octets { 1863 type yang:counter64; 1864 description 1865 "A cumulative counter of the total bytes received."; 1866 } 1867 } 1869 grouping srv6-stats-out { 1870 description "Grouping for inbound stats"; 1872 leaf out-pkts { 1873 type yang:counter64; 1874 description 1875 "A cumulative counter of the total number of packets 1876 transmitted"; 1877 } 1879 leaf out-octets { 1880 type yang:counter64; 1881 description 1882 "A cumulative counter of the total bytes transmitted."; 1883 } 1884 } 1886 grouping path-out-sids-choice { 1887 description "Grouping for Out-SID choices"; 1888 choice encap-type { 1889 description "Out-SID encap-based choice"; 1890 case srv6 { 1891 uses path-out-sids; 1892 } 1893 case mpls { 1894 uses path-out-labels; 1895 } 1896 } 1897 } 1899 grouping local-sid-fwd-state { 1900 description "SRv6 local-SID forwarding state grouping"; 1902 container forwarding { 1903 description "SRv6 local-SID forwarding state"; 1905 leaf is-installed { 1906 type boolean; 1907 description "Indicates whether SID is installed in forwarding"; 1908 } 1910 leaf next-hop-type { 1911 type srv6-types:srv6-nexthop-type; 1912 description "Forwarding next-hop types"; 1913 } 1915 container paths { 1916 when "../is-installed = 'true'" { 1917 description "This container is valid only when the 1918 local-SID is installed in forwarding"; 1919 } 1921 list path { 1922 key path-index; 1923 description "The list of paths associated with the SID"; 1925 leaf path-index { 1926 type uint8; 1927 description "Index of the path"; 1928 } 1930 container l2 { 1931 when "../../../next-hop-type = 'l2'" { 1932 description "This container is valid only for L2 type 1933 of NHs"; 1934 } 1936 leaf interface { 1937 type if:interface-ref; 1938 description "The outgoing Layer2 interface"; 1939 } 1941 description "L2 information"; 1942 } 1944 container l3 { 1945 when "../../../next-hop-type != 'l2'" { 1946 description "This container is valid only for L3 type 1947 of NHs"; 1948 } 1950 leaf interface { 1951 type if:interface-ref; 1952 description "The outgoing Layer3 interface"; 1953 } 1955 leaf next-hop { 1956 type inet:ip-address; 1957 description "The IP address of the next-hop"; 1958 } 1959 uses path-attrs-cmn; 1961 description "L3 information"; 1962 } 1963 uses path-out-sids-choice; 1964 } 1966 description "Forwarding paths"; 1967 } 1968 } 1969 } 1971 grouping srv6-state-sid { 1972 description "SRv6 SID state grouping"; 1974 container local-sids { 1975 config false; 1976 description "Local-SID state"; 1978 container counters { 1979 description "SRv6 counters"; 1980 container cnt-3 { 1981 description "Counts SRv6 traffic received/dropped on local 1982 prefix not instantiated as local-SID"; 1983 uses srv6-stats-in; 1984 } 1985 } 1987 list local-sid { 1988 key "sid"; 1989 description "Per-localSID Counters"; 1991 leaf sid { 1992 type srv6-types:srv6-sid; 1993 description "Local SID value"; 1994 } 1996 uses srv6-locator; 1998 leaf is-reserved { 1999 type boolean; 2000 description "Set to true if SID comes from reserved pool"; 2001 } 2003 leaf end-behavior-type { 2004 type identityref { 2005 base srv6-types:srv6-endpoint-type; 2006 } 2007 description "Type of SRv6 end behavior."; 2008 } 2010 leaf alloc-type { 2011 type srv6-types:sid-alloc-type; 2012 description 2013 "Type of sid allocation."; 2014 } 2016 list owner { 2017 key "type instance"; 2018 description "SID Owner clients"; 2019 leaf type { 2020 type identityref { 2021 base srv6-types:srv6-sid-owner-type; 2022 } 2023 description "SID owner/client type"; 2024 } 2025 leaf instance { 2026 type string; 2027 description "Client instance"; 2028 } 2029 leaf is-winner { 2030 type boolean; 2031 description "Is this client/owner the winning in terms of 2032 forwarding"; 2033 } 2034 } 2036 uses local-sid-fwd-state; 2038 container counters { 2039 description "SRv6 per local-SID counters"; 2041 container cnt-1 { 2042 description "Counts SRv6 traffic received on local-SID 2043 prefix and processed successfully"; 2044 uses srv6-stats-in; 2045 } 2046 } 2047 } 2048 } 2049 } 2051 grouping srv6-support-ends { 2052 description "SRv6 End behavior support grouping"; 2054 list end-behavior { 2055 key "type"; 2056 description "End behavior support"; 2058 leaf type { 2059 type identityref { 2060 base srv6-types:srv6-endpoint-type; 2061 } 2062 description "End behavior (End*) type"; 2063 } 2064 leaf supported { 2065 type boolean; 2066 mandatory true; 2067 description "True if supported"; 2068 } 2069 } 2070 } 2072 grouping srv6-support-headends { 2073 description "SRv6 Headend behavior support grouping"; 2075 list headend-behavior { 2076 key "type"; 2077 description "Headend behavior support"; 2078 leaf type { 2079 type identityref { 2080 base srv6-types:srv6-headend-type; 2081 } 2082 description "Headend behavior (H*) type"; 2083 } 2084 leaf supported { 2085 type boolean; 2086 mandatory true; 2087 description "True if supported"; 2088 } 2089 } 2090 } 2092 grouping srv6-msd-signaled { 2093 description "SRv6 MSD signaled parameter support grouping"; 2095 container msd { 2096 description "SRv6 signaled MSD parameter support"; 2098 leaf max-sl { 2099 type uint8; 2100 description "Maximum value of the SL field in the SRH of 2101 a received packet before applying the Endpoint behavior 2102 associated with a SID"; 2104 } 2105 leaf max-end-pop { 2106 type uint8; 2107 description "Maximum number of SIDs in the top SRH in an 2108 SRH stack to which the router can apply 2109 PSP or USP flavors"; 2110 } 2111 leaf max-h_encap { 2112 type uint8; 2113 description "Maximum number of SIDs that can be pushed as 2114 part of the H.Encaps* behavior"; 2115 } 2116 leaf max-end_d { 2117 type uint8; 2118 description "Maximum number of SIDs in an SRH when applying 2119 End.D* behaviors (e.g. End.X6 and End.DT6)"; 2120 } 2121 } 2122 } 2124 grouping srv6-support-security-rules { 2125 description "SRv6 Security rules grouping"; 2127 list security-rule { 2128 key "type"; 2129 description "Security rule support"; 2131 leaf type { 2132 type identityref { 2133 base srv6-types:srv6-security-type; 2134 } 2135 description "Security rule type"; 2136 } 2137 leaf supported { 2138 type boolean; 2139 mandatory true; 2140 description "True if supported"; 2141 } 2142 } 2143 } 2145 grouping srv6-support-counters { 2146 description "SRv6 Counters grouping"; 2148 list counters { 2149 key "type"; 2150 description "SRv6 counter support"; 2151 leaf type { 2152 type identityref { 2153 base srv6-types:srv6-counter-type; 2154 } 2155 description "Counter type"; 2156 } 2157 leaf supported { 2158 type boolean; 2159 mandatory true; 2160 description "True if supported"; 2161 } 2162 } 2163 } 2165 grouping srv6-state-capabilities { 2166 description "SRv6 node capabilities grouping"; 2167 container node-capabilities { 2168 config false; 2169 description "Node's SRv6 capabilities"; 2171 uses srv6-support-ends; 2172 uses srv6-support-headends; 2173 uses srv6-msd-signaled; 2174 uses srv6-support-security-rules; 2175 uses srv6-support-counters; 2176 } 2177 } 2179 augment "/rt:routing/sr:segment-routing" { 2180 description 2181 "This augments Segment Routing (SR) with SRv6."; 2183 container srv6 { 2184 description "Segment Routing with IPv6 dataplane"; 2186 /* config */ 2187 leaf enable { 2188 type boolean; 2189 default false; 2190 description "Enable SRv6"; 2191 } 2193 uses srv6-encap; 2194 uses srv6-locators; 2195 uses srv6-state-capabilities; 2196 uses srv6-state-sid; 2197 } 2198 } 2199 /* Notifications */ 2201 grouping srv6-locator { 2202 description 2203 "An absolute reference to an SRv6 locator"; 2204 leaf locator { 2205 type leafref { 2206 path "/rt:routing/sr:segment-routing/srv6:srv6/srv6:locators/srv6:locator/srv6:name"; 2207 } 2208 description 2209 "Reference to a SRv6 locator."; 2210 } 2211 } 2213 notification srv6-locator-status-event { 2214 description 2215 "Notification event for a change of SRv6 locator operational 2216 status."; 2217 leaf operational-status { 2218 type srv6-types:srv6-status-type; 2219 description "Operational status"; 2220 } 2221 uses srv6-locator; 2222 } 2224 notification srv6-sid-collision-event { 2225 description 2226 "Notification event for an SRv6 SID collision - i.e., attempt 2227 to bind an already bound SID to a new context"; 2228 leaf sid { 2229 type srv6-types:srv6-sid; 2230 description "SRv6 SID"; 2231 } 2232 container existing { 2233 description "Current assignment / bind"; 2234 leaf end-behavior-type { 2235 type identityref { 2236 base srv6-types:srv6-endpoint-type; 2237 } 2238 description "End type"; 2239 } 2240 // TODO: More 2241 } 2242 container requested { 2243 description "Requested assignment / bind"; 2245 leaf end-behavior-type { 2246 type identityref { 2247 base srv6-types:srv6-endpoint-type; 2248 } 2249 description "End type"; 2250 } 2251 } 2252 } 2253 } // module 2255 2257 Figure 6: ietf-srv6-base.yang 2259 5.3. SRv6 Static 2261 This YANG module imports types defined in [RFC6991], [RFC8343], and 2262 [RFC8349]. 2264 file "ietf-srv6-static@2020-07-13.yang" 2266 // RFC Editor: replace the above date with the date of 2267 // publication and remove this note. 2269 module ietf-srv6-static { 2270 yang-version 1.1; 2272 namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-static"; 2273 prefix srv6-static; 2275 import ietf-interfaces { 2276 prefix "if"; 2277 reference "RFC 8343: A YANG Data Model for Interface Management"; 2278 } 2280 import ietf-inet-types { 2281 prefix inet; 2282 reference "RFC 6991: Common YANG Data Types"; 2283 } 2285 import ietf-routing { 2286 prefix "rt"; 2287 reference 2288 "RFC 8349: A YANG Data Model for Routing Management (NMDA 2289 version)"; 2290 } 2291 import ietf-segment-routing { 2292 prefix sr; 2293 reference "draft-ietf-spring-sr-yang"; 2294 } 2296 import ietf-srv6-types { 2297 prefix srv6-types; 2298 reference "RFC XXXX: YANG Data Model for SRv6"; 2299 // RFC Editor: replace XXXX with actual RFC number and remove 2300 // this note 2301 } 2303 import ietf-srv6-base { 2304 prefix srv6; 2305 reference "RFC XXXX: YANG Data Model for SRv6"; 2306 // RFC Editor: replace XXXX with actual RFC number and remove 2307 // this note 2308 } 2310 organization 2311 "IETF SPRING Working Group"; 2312 contact 2313 "WG Web: 2314 WG List: 2316 Editor: Kamran Raza 2317 2319 Editor: Jaganbabu Rajamanickam 2320 2322 Editor: Xufeng Liu 2323 2325 Editor: Zhibo Hu 2326 2328 Editor: Iftekhar Hussain 2329 2331 Editor: Himanshu Shah 2332 2334 Editor: Daniel Voyer 2335 2337 Editor: Hani Elmalky 2338 2340 Editor: Satoru Matsushima 2341 2343 Editor: Katsuhiro Horiba 2344 2346 Editor: Ahmed AbdelSalam 2347 2348 "; 2350 description 2351 "This YANG module defines the essential elements for the 2352 management of Static application for Segment-Routing with 2353 IPv6 dataplane (SRv6). 2355 Copyright (c) 2018 IETF Trust and the persons identified as 2356 authors of the code. All rights reserved. 2358 Redistribution and use in source and binary forms, with or 2359 without modification, is permitted pursuant to, and subject 2360 to the license terms contained in, the Simplified BSD License 2361 set forth in Section 4.c of the IETF Trust's Legal Provisions 2362 Relating to IETF Documents 2363 (http://trustee.ietf.org/license-info)."; 2365 reference "RFC XXXX"; 2366 // RFC Editor: replace XXXX with actual RFC number and remove 2367 // this note 2369 revision 2020-07-13 { 2370 description 2371 "Alignment with SRv6 network programming rev16"; 2372 reference 2373 "RFC XXXX: YANG Data Model for SRv6"; 2374 // RFC Editor: replace XXXX with actual RFC number and remove 2375 // this note 2376 } 2378 revision 2019-10-30 { 2379 description 2380 "Extended model for EVPN behaviors"; 2381 reference 2382 "RFC XXXX: YANG Data Model for SRv6"; 2383 // RFC Editor: replace XXXX with actual RFC number and remove 2384 // this note 2385 } 2387 revision 2019-07-08 { 2388 description 2389 "Alignment with SRv6 network programming"; 2390 reference 2391 "RFC XXXX: YANG Data Model for SRv6"; 2392 // RFC Editor: replace XXXX with actual RFC number and remove 2393 // this note 2394 } 2396 revision 2018-10-22 { 2397 description 2398 "Initial revision."; 2399 reference 2400 "RFC XXXX: YANG Data Model for SRv6"; 2401 // RFC Editor: replace XXXX with actual RFC number and remove 2402 // this note 2403 } 2405 /* 2406 * Config and State 2407 */ 2409 grouping path-attrs-v6 { 2410 description 2411 "IPv6 Path properties"; 2413 leaf interface { 2414 type if:interface-ref; 2415 description "The outgoing interface"; 2416 } 2418 leaf next-hop { 2419 type inet:ipv6-address; 2420 description "The IP address of the next-hop"; 2421 } 2423 leaf table { 2424 type srv6-types:table-id; 2425 description "The routing table associated with the next-hop"; 2426 } 2428 uses srv6:path-attrs-cmn; 2429 } 2431 grouping path-attrs-v4 { 2432 description 2433 "IPv4 Path properties"; 2435 leaf interface { 2436 type if:interface-ref; 2437 description "The outgoing interface"; 2438 } 2440 leaf next-hop { 2441 type inet:ipv4-address; 2442 description "The IP address of the next-hop"; 2443 } 2445 leaf table { 2446 type srv6-types:table-id; 2447 description "The routing table associated with the next-hop"; 2448 } 2450 uses srv6:path-attrs-cmn; 2451 } 2453 grouping path-attrs-mpls { 2454 description 2455 "MPLS Path properties"; 2457 leaf interface { 2458 type if:interface-ref; 2459 description "The outgoing interface"; 2460 } 2462 leaf next-hop { 2463 type inet:ip-address; 2464 description "The IP address of the next-hop"; 2465 } 2467 uses srv6:path-attrs-cmn; 2468 } 2470 grouping multi-paths-v6 { 2471 description "Multipath grouping"; 2473 container paths { 2474 description "List of outgoing paths"; 2475 list path { 2476 key path-index; 2477 description "The list of paths associated with the SID"; 2479 leaf path-index { 2480 type uint8; 2481 description "Index of the path"; 2482 } 2483 uses path-attrs-v6; 2484 container sid-list { 2485 description "SID-list associated with the path"; 2486 uses srv6:path-out-sids; 2487 } 2488 } 2489 } 2490 } 2492 grouping multi-paths-v4 { 2493 description "Multipath grouping"; 2495 container paths { 2496 description "List of outgoing paths"; 2497 list path { 2498 key path-index; 2499 description "The list of paths associated with the SID"; 2501 leaf path-index { 2502 type uint8; 2503 description "Index of the path"; 2504 } 2506 uses path-attrs-v4; 2507 container sid-list { 2508 description "SID-list associated with the path"; 2509 uses srv6:path-out-sids; 2510 } 2511 } 2512 } 2513 } 2515 grouping multi-paths-mpls { 2516 description "Multipath grouping"; 2518 container paths { 2519 description "List of outgoing paths"; 2520 list path { 2521 key path-index; 2522 description "The list of paths associated with the SID"; 2524 leaf path-index { 2525 type uint8; 2526 description "Index of the path"; 2527 } 2529 uses path-attrs-mpls; 2530 container sid-list { 2531 description "SID-list associated with the path"; 2532 uses srv6:path-out-sids; 2533 } 2534 } 2535 } 2536 } 2538 grouping multi-paths-v6-BUM { 2539 description 2540 "Multipath grouping for EVPN bridging BUM use case"; 2542 container paths { 2543 description 2544 "List of outgoing paths for flooding"; 2545 list path { 2546 key path-index; 2547 description "The list of paths associated with the SID"; 2549 leaf path-index { 2550 type uint8; 2551 description "Index of the path"; 2552 } 2554 leaf l2-interface { 2555 type if:interface-ref; 2556 description "The outgoing L2 interface for flooding"; 2557 } 2558 } 2559 } 2560 } 2562 grouping srv6-sid-config { 2563 description 2564 "Configuration parameters relating to SRv6 sid."; 2566 leaf function { 2567 type srv6-types:srv6-func-value; 2568 description 2569 "SRv6 function value."; 2570 } 2571 leaf end-behavior-type { 2572 type identityref { 2573 base srv6-types:srv6-endpoint-type; 2574 } 2575 mandatory true; 2576 description 2577 "Type of SRv6 end behavior."; 2578 } 2579 container end { 2580 when "../end-behavior-type = 'End'" { 2581 description 2582 "This container is valid only when the user chooses End 2583 behavior (variant: no PSP, no USP)."; 2584 } 2585 description 2586 "The Endpoint function is the most basic function. 2587 FIB lookup on updated DA and forward accordingly 2588 to the matched entry. 2589 This is the SRv6 instantiation of a Prefix SID 2590 (variant: no PSP, no USP)"; 2592 } 2594 container end_psp { 2595 when "../end-behavior-type = 'End_PSP'" { 2596 description 2597 "This container is valid only when the user chooses End 2598 behavior (variant: PSP only)."; 2599 } 2600 description 2601 "The Endpoint function is the most basic function. 2602 FIB lookup on updated DA and forward accordingly 2603 to the matched entry. 2604 This is the SRv6 instantiation of a Prefix SID 2605 (variant: PSP only)"; 2607 } 2609 container end_usp { 2610 when "../end-behavior-type = 'End_USP'" { 2611 description 2612 "This container is valid only when the user chooses End 2613 behavior (variant: USP only)."; 2614 } 2615 description 2616 "The Endpoint function is the most basic function. 2617 FIB lookup on updated DA and forward accordingly 2618 to the matched entry. 2619 This is the SRv6 instantiation of a Prefix SID 2620 (variant: USP only)"; 2622 } 2624 container end_psp_usp { 2625 when "../end-behavior-type = 'End_PSP_USP'" { 2626 description 2627 "This container is valid only when the user chooses End 2628 behavior (variant: PSP/USP)."; 2629 } 2630 description 2631 "The Endpoint function is the most basic function. 2632 FIB lookup on updated DA and forward accordingly 2633 to the matched entry. 2634 This is the SRv6 instantiation of a Prefix SID 2635 (variant: PSP/USP)"; 2637 } 2639 container end_usd { 2640 when "../end-behavior-type = 'End_USD'" { 2641 description 2642 "This container is valid only when the user chooses End 2643 behavior (variant: USD only)."; 2644 } 2645 description 2646 "The Endpoint function is the most basic function. 2647 FIB lookup on updated DA and forward accordingly 2648 to the matched entry. 2649 This is the SRv6 instantiation of a Prefix SID 2650 (variant: USD)"; 2651 } 2653 container end_psp_usd { 2654 when "../end-behavior-type = 'End_PSP_USD'" { 2655 description 2656 "This container is valid only when the user chooses End 2657 behavior (variant: PSP/USD)."; 2658 } 2659 description 2660 "The Endpoint function is the most basic function. 2661 FIB lookup on updated DA and forward accordingly 2662 to the matched entry. 2663 This is the SRv6 instantiation of a Prefix SID 2664 (variant: PSP/USD)"; 2666 } 2668 container end_usp_usd { 2669 when "../end-behavior-type = 'End_USP_USD'" { 2670 description 2671 "This container is valid only when the user chooses End 2672 behavior (variant: USP/USD)."; 2673 } 2674 description 2675 "The Endpoint function is the most basic function. 2676 FIB lookup on updated DA and forward accordingly 2677 to the matched entry. 2678 This is the SRv6 instantiation of a Prefix SID 2679 (variant: USP/USD)"; 2681 } 2683 container end_psp_usp_usd { 2684 when "../end-behavior-type = 'End_PSP_USP_IUSD'" { 2685 description 2686 "This container is valid only when the user chooses End 2687 behavior (variant: PSP/USP/USD)."; 2688 } 2689 description 2690 "The Endpoint function is the most basic function. 2691 FIB lookup on updated DA and forward accordingly 2692 to the matched entry. 2693 This is the SRv6 instantiation of a Prefix SID 2694 (variant: PSP/USP/USD)"; 2696 } 2698 container end-t { 2699 when "../end-behavior-type = 'End.T'" { 2700 description 2701 "This container is valid only when the user chooses 2702 End.T behavior (variant: no PSP, no USP)."; 2703 } 2704 description 2705 "Endpoint with specific IPv6 table lookup (variant: no PSP, 2706 no USP). 2707 Lookup the next segment in IPv6 table T 2708 associated with the SID and forward via 2709 the matched table entry. 2710 The End.T is used for multi-table operation 2711 in the core."; 2713 // TODO presence "Mandatory child only if container is present"; 2714 leaf lookup-table-ipv6 { 2715 type srv6-types:table-id; 2716 mandatory true; 2717 description 2718 "Table Id for lookup on updated DA (next segment)"; 2719 } 2720 } 2722 container end-t_psp { 2723 when "../end-behavior-type = 'End.T_PSP'" { 2724 description 2725 "This container is valid only when the user chooses 2726 End.T behavior (variant: PSP only)."; 2727 } 2728 description 2729 "Endpoint with specific IPv6 table lookup (variant: PSP only). 2730 Lookup the next segment in IPv6 table T 2731 associated with the SID and forward via 2732 the matched table entry. 2734 The End.T is used for multi-table operation 2735 in the core."; 2737 // TODO presence "Mandatory child only if container is present"; 2739 leaf lookup-table-ipv6 { 2740 type srv6-types:table-id; 2741 mandatory true; 2742 description 2743 "Table Id for lookup on updated DA (next segment)"; 2744 } 2745 } 2747 container end-t_usp { 2748 when "../end-behavior-type = 'End.T_USP'" { 2749 description 2750 "This container is valid only when the user chooses 2751 End.T behavior (variant: USP only)."; 2752 } 2753 description 2754 "Endpoint with specific IPv6 table lookup (variant: USP only). 2755 Lookup the next segment in IPv6 table T 2756 associated with the SID and forward via 2757 the matched table entry. 2758 The End.T is used for multi-table operation 2759 in the core."; 2761 // TODO presence "Mandatory child only if container is present"; 2763 leaf lookup-table-ipv6 { 2764 type srv6-types:table-id; 2765 mandatory true; 2766 description 2767 "Table Id for lookup on updated DA (next segment)"; 2768 } 2769 } 2770 container end-t_psp_usp { 2771 when "../end-behavior-type = 'End.T_PSP_USP'" { 2772 description 2773 "This container is valid only when the user chooses 2774 End.T behavior (variant: USP/PSP)."; 2775 } 2776 description 2777 "Endpoint with specific IPv6 table lookup (variant: USP/PSP). 2778 Lookup the next segment in IPv6 table T 2779 associated with the SID and forward via 2780 the matched table entry. 2781 The End.T is used for multi-table operation 2782 in the core."; 2784 // TODO presence "Mandatory child only if container is present"; 2786 leaf lookup-table-ipv6 { 2787 type srv6-types:table-id; 2788 mandatory true; 2789 description 2790 "Table Id for lookup on updated DA (next segment)"; 2791 } 2792 } 2794 container end-t_usd { 2795 when "../end-behavior-type = 'End.T_USD'" { 2796 description 2797 "This container is valid only when the user chooses 2798 End.T behavior (variant: USD only)."; 2799 } 2800 description 2801 "Endpoint with specific IPv6 table lookup (variant: USD only). 2802 Lookup the next segment in IPv6 table T 2803 associated with the SID and forward via 2804 the matched table entry. 2805 The End.T is used for multi-table operation 2806 in the core."; 2808 // TODO presence "Mandatory child only if container is present"; 2810 leaf lookup-table-ipv6 { 2811 type srv6-types:table-id; 2812 mandatory true; 2813 description 2814 "Table Id for lookup on updated DA (next segment)"; 2815 } 2816 } 2817 container end-t_psp_usd { 2818 when "../end-behavior-type = 'End.T_PSP_USD'" { 2819 description 2820 "This container is valid only when the user chooses 2821 End.T behavior (variant: PSP/USD only)."; 2822 } 2823 description 2824 "Endpoint with specific IPv6 table lookup (variant: PSP/USD 2825 only). 2826 Lookup the next segment in IPv6 table T 2827 associated with the SID and forward via 2828 the matched table entry. 2829 The End.T is used for multi-table operation 2830 in the core."; 2832 // TODO presence "Mandatory child only if container is present"; 2834 leaf lookup-table-ipv6 { 2835 type srv6-types:table-id; 2836 mandatory true; 2837 description 2838 "Table Id for lookup on updated DA (next segment)"; 2839 } 2840 } 2842 container end-t_usp_usd { 2843 when "../end-behavior-type = 'End.T_USP_USD'" { 2844 description 2845 "This container is valid only when the user chooses 2846 End.T behavior (variant: USP/USD only)."; 2847 } 2848 description 2849 "Endpoint with specific IPv6 table lookup (variant: 2850 USP/USD only). 2851 Lookup the next segment in IPv6 table T 2852 associated with the SID and forward via 2853 the matched table entry. 2854 The End.T is used for multi-table operation 2855 in the core."; 2857 // TODO presence "Mandatory child only if container is present"; 2859 leaf lookup-table-ipv6 { 2860 type srv6-types:table-id; 2861 mandatory true; 2862 description 2863 "Table Id for lookup on updated DA (next segment)"; 2864 } 2866 } 2868 container end-t_psp_usp_usd { 2869 when "../end-behavior-type = 'End.T_PSP_USP_USD'" { 2870 description 2871 "This container is valid only when the user chooses 2872 End.T behavior (variant: USP only)."; 2873 } 2874 description 2875 "Endpoint with specific IPv6 table lookup (variant: 2876 PSP/USP/USD only). 2877 Lookup the next segment in IPv6 table T 2878 associated with the SID and forward via 2879 the matched table entry. 2880 The End.T is used for multi-table operation 2881 in the core."; 2883 // TODO presence "Mandatory child only if container is present"; 2885 leaf lookup-table-ipv6 { 2886 type srv6-types:table-id; 2887 mandatory true; 2888 description 2889 "Table Id for lookup on updated DA (next segment)"; 2890 } 2891 } 2893 container end-x { 2894 when "../end-behavior-type = 'End.X'" { 2895 description 2896 "This container is valid only when the user chooses 2897 End.X behavior (variant: no USP/PSP)"; 2898 } 2899 description 2900 "Endpoint with cross-connect to an array of 2901 layer-3 adjacencies (variant: no USP/PSP). 2902 Forward to layer-3 adjacency bound to the SID S. 2903 The End.X function is required to express any 2904 traffic-engineering policy."; 2906 leaf protected { 2907 type boolean; 2908 default false; 2909 description "Is Adj-SID protected?"; 2910 } 2912 uses multi-paths-v6; 2913 } 2915 container end-x_psp { 2916 when "../end-behavior-type = 'End.X_PSP'" { 2917 description 2918 "This container is valid only when the user chooses 2919 End.X behavior (variant: PSP only)"; 2920 } 2921 description 2922 "Endpoint with cross-connect to an array of 2923 layer-3 adjacencies (variant: PSP only). 2924 Forward to layer-3 adjacency bound to the SID S. 2925 The End.X function is required to express any 2926 traffic-engineering policy."; 2928 leaf protected { 2929 type boolean; 2930 default false; 2931 description "Is Adj-SID protected?"; 2932 } 2934 uses multi-paths-v6; 2935 } 2937 container end-x_usp { 2938 when "../end-behavior-type = 'End.X_USP'" { 2939 description 2940 "This container is valid only when the user chooses 2941 End.X behavior (variant: USP only)"; 2942 } 2943 description 2944 "Endpoint with cross-connect to an array of 2945 layer-3 adjacencies (variant: USP only). 2946 Forward to layer-3 adjacency bound to the SID S. 2947 The End.X function is required to express any 2948 traffic-engineering policy."; 2950 leaf protected { 2951 type boolean; 2952 default false; 2953 description "Is Adj-SID protected?"; 2954 } 2956 uses multi-paths-v6; 2957 } 2959 container end-x_psp_usp { 2960 when "../end-behavior-type = 'End.X_PSP_USP'" { 2961 description 2962 "This container is valid only when the user chooses 2963 End.X behavior (variant: PSP/USP)"; 2964 } 2965 description 2966 "Endpoint with cross-connect to an array of 2967 layer-3 adjacencies (variant: PSP/USP). 2968 Forward to layer-3 adjacency bound to the SID S. 2969 The End.X function is required to express any 2970 traffic-engineering policy."; 2972 leaf protected { 2973 type boolean; 2974 default false; 2975 description "Is Adj-SID protected?"; 2976 } 2978 uses multi-paths-v6; 2979 } 2981 container end-x_usd { 2982 when "../end-behavior-type = 'End.X_USD'" { 2983 description 2984 "This container is valid only when the user chooses 2985 End.X behavior (variant: USD only)"; 2986 } 2987 description 2988 "Endpoint with cross-connect to an array of 2989 layer-3 adjacencies (variant: PSP/USP). 2990 Forward to layer-3 adjacency bound to the SID S. 2991 The End.X function is required to express any 2992 traffic-engineering policy."; 2994 leaf protected { 2995 type boolean; 2996 default false; 2997 description "Is Adj-SID protected?"; 2998 } 3000 uses multi-paths-v6; 3001 } 3003 container end-x_psp_usd { 3004 when "../end-behavior-type = 'End.X_PSP_USD'" { 3005 description 3006 "This container is valid only when the user chooses 3007 End.X behavior (variant: PSP/USD only)"; 3008 } 3009 description 3010 "Endpoint with cross-connect to an array of 3011 layer-3 adjacencies (variant: PSP/USP). 3012 Forward to layer-3 adjacency bound to the SID S. 3013 The End.X function is required to express any 3014 traffic-engineering policy."; 3016 leaf protected { 3017 type boolean; 3018 default false; 3019 description "Is Adj-SID protected?"; 3020 } 3022 uses multi-paths-v6; 3023 } 3025 container end-x_usp_usd { 3026 when "../end-behavior-type = 'End.X_USP_USD'" { 3027 description 3028 "This container is valid only when the user chooses 3029 End.X behavior (variant: USP/USD only)"; 3030 } 3031 description 3032 "Endpoint with cross-connect to an array of 3033 layer-3 adjacencies (variant: PSP/USP). 3034 Forward to layer-3 adjacency bound to the SID S. 3035 The End.X function is required to express any 3036 traffic-engineering policy."; 3038 leaf protected { 3039 type boolean; 3040 default false; 3041 description "Is Adj-SID protected?"; 3042 } 3044 uses multi-paths-v6; 3045 } 3047 container end-x_psp_usp_usd { 3048 when "../end-behavior-type = 'End.X_PSP_USP_USD'" { 3049 description 3050 "This container is valid only when the user chooses 3051 End.X behavior (variant: PSP/USP/USD only)"; 3052 } 3053 description 3054 "Endpoint with cross-connect to an array of 3055 layer-3 adjacencies (variant: PSP/USP). 3056 Forward to layer-3 adjacency bound to the SID S. 3057 The End.X function is required to express any 3058 traffic-engineering policy."; 3060 leaf protected { 3061 type boolean; 3062 default false; 3063 description "Is Adj-SID protected?"; 3064 } 3066 uses multi-paths-v6; 3067 } 3069 container end-b6-encaps { 3070 when "../end-behavior-type = 'End.B6.Encaps' or 3071 ../end-behavior-type = 'End.B6.Encaps.Red'" { 3072 description 3073 "This container is valid only when the user chooses 3074 End.B6.Encaps or End.B6.Encaps.Red behavior."; 3075 } 3076 description 3077 "Endpoint bound to an SRv6 Policy. 3078 Insert SRH based on the policy and forward the 3079 packet toward the first hop configured in the policy. 3080 This is the SRv6 instantiation of a Binding SID. 3081 This behavior also adds an outer IPv6 header"; 3083 // TODO presence "Mandatory child only if container is present"; 3085 leaf policy-name { 3086 type string; 3087 mandatory true; 3088 description "SRv6 policy name."; 3089 } 3090 leaf source-address { 3091 type inet:ipv6-address; 3092 mandatory true; 3093 description 3094 "IPv6 source address for Encap."; 3095 } 3097 uses multi-paths-v6; 3098 } 3100 container end-bm { 3101 when "../end-behavior-type = 'End.BM'" { 3102 description 3103 "This container is valid only when the user chooses 3104 End.BM behavior."; 3105 } 3106 description 3107 "Endpoint bound to an SR-MPLS Policy. 3108 push an MPLS label stack on the 3109 received packet and forward the according to 3110 Lable L1. 3111 This is an SRv6 instantiation of an SR-MPLS Binding SID."; 3113 // TODO presence "Mandatory child only if container is present"; 3115 leaf policy-name { 3116 type string; 3117 mandatory true; 3118 description "SRv6 policy name"; 3119 } 3120 uses multi-paths-mpls; 3121 } 3123 container end-dx6 { 3124 when "../end-behavior-type = 'End.DX6'" { 3125 description 3126 "This container is valid only when the user chooses 3127 End.DX6 behavior."; 3128 } 3129 description 3130 "Endpoint with decapsulation and cross-connect to 3131 an array of IPv6 adjacencies. Pop the (outer) 3132 IPv6 header and its extension headers and forward 3133 to layer-3 adjacency bound to the SID S. 3134 The End.DX6 used in the L3VPN use-case."; 3136 uses multi-paths-v6; 3137 // TODO: Backup path of type "Lookup in table" 3138 } 3140 container end-dx4 { 3141 when "../end-behavior-type = 'End.DX4'" { 3142 description 3143 "This container is valid only when the user chooses 3144 End.DX4 behavior."; 3145 } 3146 description 3147 "Endpoint with decapsulation and cross-connect to 3148 an array of IPv4 adjacencies. 3149 Pop the (outer) IPv6 header and its extension 3150 header and forward to layer-3 adjacency bound 3151 to the SID S. 3152 This would be equivalent to the per-CE VPN 3153 label in MPLS."; 3155 uses multi-paths-v4; 3156 // TODO: Backup path of type "Lookup in table" 3157 } 3158 container end-dt6 { 3159 when "../end-behavior-type = 'End.DT6'" { 3160 description 3161 "This container is valid only when the user chooses 3162 End.DT6 behavior."; 3163 } 3164 description 3165 "Endpoint with decapsulation and specific IPv6 table 3166 lookup. 3167 Pop the (outer) IPv6 header and its extension 3168 headers. 3169 Lookup the exposed inner IPv6 DA in IPv6 3170 table T and forward via the matched table entry. 3171 End.DT6 function is used in L3VPN use-case."; 3173 // TODO presence "Mandatory child only if container is present"; 3175 leaf lookup-table-ipv6 { 3176 type srv6-types:table-id; 3177 mandatory true; 3178 description "IPv6 table"; 3179 } 3180 } 3181 container end-dt4 { 3182 when "../end-behavior-type = 'End.DT4'" { 3183 description 3184 "This container is valid only when the user chooses 3185 End.DT4 behavior."; 3186 } 3187 description 3188 "Endpoint with decapsulation and specific 3189 IPv4 table lookup. 3190 Pop the (outer) IPv6 header and its extension 3191 headers. 3192 Lookup the exposed inner IPv4 DA in IPv4 3193 table T and forward via the matched table entry. 3194 This would be equivalent to the per-VRF VPN label 3195 in MPLS."; 3197 // TODO presence "Mandatory child only if container is present"; 3199 leaf lookup-table-ipv4 { 3200 type srv6-types:table-id; 3201 mandatory true; 3202 description "IPv4 table"; 3204 } 3205 } 3206 container end-dt46 { 3207 when "../end-behavior-type = 'End.DT46'" { 3208 description 3209 "This container is valid only when the user chooses 3210 End.DT46 behavior."; 3211 } 3212 description 3213 "Endpoint with decapsulation and specific 3214 IP table lookup. 3215 Depending on the protocol type (IPv4 or IPv6) 3216 of the inner ip packet and the specific VRF name 3217 forward the packet. 3218 This would be equivalent to the per-VRF VPN 3219 label in MPLS."; 3221 // TODO presence "Mandatory child only if container is present"; 3223 leaf lookup-table-ipv4 { 3224 type srv6-types:table-id; 3225 mandatory true; 3226 description "IPv4 table"; 3227 } 3228 leaf lookup-table-ipv6 { 3229 type srv6-types:table-id; 3230 mandatory true; 3231 description "IPv6 table"; 3232 } 3233 } 3235 /* EVPN END behavior types */ 3236 container end-dx2 { 3237 when "../end-behavior-type = 'End.DX2'" { 3238 description 3239 "This container is valid only when the user chooses 3240 End.DX2 behavior."; 3241 } 3242 description 3243 "This is an Endpoint with decapsulation and Layer-2 3244 cross-connect to OIF. 3245 Pop the (outer) IPv6 header and its extension headers. 3246 Forward the resulting frame via OIF associated to the SID. 3247 The End.DX2 function is the L2VPN/EVPN VPWS use-case."; 3249 container path { 3250 description "Outgoing path"; 3251 leaf l2-interface { 3252 type if:interface-ref; 3253 mandatory true; 3254 description "Outgoing L2 interface"; 3255 } 3256 } 3257 } 3259 container end-dx2v { 3260 when "../end-behavior-type = 'End.DX2V'" { 3261 description 3262 "This container is valid only when the user chooses 3263 End.DX2V behavior."; 3264 } 3265 description 3266 "Endpoint with decapsulation and specific VLAN 3267 L2 table lookup. 3268 Pop the (outer) IPv6 header and its extension headers. 3269 Lookup the exposed inner VLANs in L2 table T. 3270 Forward via the matched table entry. 3271 The End.DX2V is used for EVPN Flexible cross-connect 3272 use-cases"; 3274 leaf lookup-table-vlan { 3275 type srv6-types:table-id; 3276 mandatory true; 3277 description 3278 "VLAN lookup table. There could be multiple 3279 vlan demux tables on the node, where a DX2V SID 3280 points to one vlan table"; 3281 } 3282 } 3284 container end-dt2u { 3285 when "../end-behavior-type = 'End.DT2U'" { 3286 description 3287 "This container is valid only when the user chooses 3288 End.DT2U behavior."; 3289 } 3290 description 3291 "Endpoint with decapsulation and specific 3292 unicast L2 MAC table lookup. 3293 Pop the (outer) IPv6 header and its extension headers. 3294 Learn the exposed inner MAC SA in L2 MAC table T. 3295 Lookup the exposed inner MAC DA in L2 MAC table T. 3296 Forward via the matched T entry else to all L2OIF in T. 3297 The End.DT2U is used for EVPN Bridging unicast use cases"; 3299 leaf lookup-table-mac { 3300 type srv6-types:table-id; 3301 mandatory true; 3302 description "MAC L2 lookup table"; 3303 } 3304 } 3306 container end-dt2m { 3307 when "../end-behavior-type = 'End.DT2M'" { 3308 description 3309 "This container is valid only when the user chooses 3310 End.DT2M behavior."; 3311 } 3312 description 3313 "Endpoint with decapsulation and specific flooding table. 3314 Pop the (outer) IPv6 header and its extension headers. 3315 Learn the exposed inner MAC SA in L2 MAC table T. 3316 Forward on all L2OIF (in the flooding table) excluding the one 3317 identfied by Arg.FE2. 3318 The End.DT2M is used for EVPN Bridging BUM use case with 3319 ESI (Split Horizon) filtering capability."; 3321 leaf flooding-table { 3322 type srv6-types:table-id; 3323 mandatory true; 3324 description "L2 Flooding table (list of OIFs)"; 3325 } 3327 uses multi-paths-v6-BUM; 3329 /* TODO - Support for argument Arg.FE2. It is an argument specific 3330 to EVPN ESI filtering and EVPN-ETREE used to exclude specific 3331 OIF (or set of OIFs) from flooding table. */ 3332 } 3334 /* End of EVPN END behavior types */ 3335 } 3337 grouping srv6-static-cfg { 3338 description 3339 "Grouping configuration and operation for SRv6 sid."; 3341 list sid { 3342 key "function"; 3343 description "List of locally instantiated SIDs"; 3345 uses srv6-sid-config; 3346 } 3347 } 3349 augment "/rt:routing/sr:segment-routing/srv6:srv6/srv6:locators/srv6:locator" { 3350 description 3351 "This augments locator leaf within SRv6."; 3353 container static { 3354 description "Static SRv6"; 3356 /* Local SIDs */ 3357 container local-sids { 3358 description 3359 "SRv6-static locally instantiated SIDs"; 3361 uses srv6-static-cfg; 3362 /* no state for now; SID state accessible through base model */ 3363 } 3365 } 3366 } 3367 } // module 3369 3371 Figure 7: ietf-srv6-static.yang 3373 6. Security Considerations 3375 The YANG module specified in this document defines a schema for data 3376 that is designed to be accessed via network management protocols such 3377 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 3378 is the secure transport layer, and the mandatory-to-implement secure 3379 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 3380 is HTTPS, and the mandatory-to-implement secure transport is TLS 3381 [RFC8446]. 3383 The Network Configuration Access Control Model (NACM) [RFC8341] 3384 provides the means to restrict access for particular NETCONF or 3385 RESTCONF users to a preconfigured subset of all available NETCONF or 3386 RESTCONF protocol operations and content. 3388 There are a number of data nodes defined in this YANG module that are 3389 writable/creatable/ deletable (i.e., config true, which is the 3390 default). These data nodes may be considered sensitive or vulnerable 3391 in some network environments. Write operations (e.g., edit-config) 3392 to these data nodes without proper protection can have a negative 3393 effect on network operations. 3395 Some of the readable data nodes in this YANG module may be considered 3396 sensitive or vulnerable in some network environments. It is thus 3397 important to control read access (e.g., via get, get-config, or 3398 notification) to these data nodes. 3400 It goes without saying that this specification also inherits the 3401 security considerations captured in the SRv6 specification document 3402 [I-D.ietf-spring-srv6-network-programming]. 3404 7. IANA Considerations 3406 This document requests the registration of the following URIs in the 3407 IETF "XML registry" [RFC3688]: 3409 +-----------------------------------------------+------------+------+ 3410 | URI | Registrant | XML | 3411 +-----------------------------------------------+------------+------+ 3412 | urn:ietf:params:xml:ns:yang:ietf-srv6-types | The IESG | N/A | 3413 | | | | 3414 | urn:ietf:params:xml:ns:yang:ietf-srv6-base | The IESG | N/A | 3415 | urn:ietf:params:xml:ns:yang:ietf-srv6-static | The IESG | N/A | 3416 +-----------------------------------------------+------------+------+ 3418 This document requests the registration of the following YANG modules 3419 in the "YANG Module Names" registry [RFC6020]: 3421 +-------------+--------------------------------+----------+---------+ 3422 | Name | Namespace | Prefix | Referen | 3423 | | | | ce | 3424 +-------------+--------------------------------+----------+---------+ 3425 | ietf- | urn:ietf:params:xml:ns:yang:ie | srv6-typ | This do | 3426 | srv6-types | tf-srv6-types | es | cument | 3427 | | | | | 3428 | ietf- | urn:ietf:params:xml:ns:yang:ie | srv6 | This do | 3429 | srv6-base | tf-srv6-base | | cument | 3430 | | | | | 3431 | ietf- | urn:ietf:params:xml:ns:yang:ie | srv6-sta | This do | 3432 | srv6-static | tf-srv6-static | tic | cument | 3433 +-------------+--------------------------------+----------+---------+ 3435 -- RFC Editor: Replace "This document" with the document RFC number 3436 at time of publication, and remove this note. 3438 8. Acknowledgments 3440 The authors would like to acknowledge Darren Dukes, Les Ginsberg, 3441 Ahmed Bashandy, Rajesh Venkateswaran, and Mike Mallin for their 3442 review of some of the contents in this draft. 3444 9. References 3446 9.1. Normative References 3448 [I-D.ietf-spring-sr-yang] 3449 Litkowski, S., Qu, Y., Lindem, A., Sarkar, P., and J. 3450 Tantsura, "YANG Data Model for Segment Routing", draft- 3451 ietf-spring-sr-yang-22 (work in progress), August 2020. 3453 [I-D.ietf-spring-srv6-network-programming] 3454 Filsfils, C., Camarillo, P., Leddy, J., Voyer, D., 3455 Matsushima, S., and Z. Li, "SRv6 Network Programming", 3456 draft-ietf-spring-srv6-network-programming-18 (work in 3457 progress), August 2020. 3459 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3460 Requirement Levels", BCP 14, RFC 2119, 3461 DOI 10.17487/RFC2119, March 1997, 3462 . 3464 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3465 DOI 10.17487/RFC3688, January 2004, 3466 . 3468 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 3469 the Network Configuration Protocol (NETCONF)", RFC 6020, 3470 DOI 10.17487/RFC6020, October 2010, 3471 . 3473 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 3474 and A. Bierman, Ed., "Network Configuration Protocol 3475 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 3476 . 3478 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 3479 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 3480 . 3482 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 3483 RFC 6991, DOI 10.17487/RFC6991, July 2013, 3484 . 3486 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 3487 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 3488 . 3490 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 3491 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 3492 May 2017, . 3494 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 3495 "Common YANG Data Types for the Routing Area", RFC 8294, 3496 DOI 10.17487/RFC8294, December 2017, 3497 . 3499 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 3500 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 3501 . 3503 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 3504 Access Control Model", STD 91, RFC 8341, 3505 DOI 10.17487/RFC8341, March 2018, 3506 . 3508 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 3509 and R. Wilton, "Network Management Datastore Architecture 3510 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 3511 . 3513 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 3514 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 3515 . 3517 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 3518 Routing Management (NMDA Version)", RFC 8349, 3519 DOI 10.17487/RFC8349, March 2018, 3520 . 3522 [RFC8402] Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., 3523 Decraene, B., Litkowski, S., and R. Shakir, "Segment 3524 Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, 3525 July 2018, . 3527 [RFC8407] Bierman, A., "Guidelines for Authors and Reviewers of 3528 Documents Containing YANG Data Models", BCP 216, RFC 8407, 3529 DOI 10.17487/RFC8407, October 2018, 3530 . 3532 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 3533 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 3534 . 3536 9.2. Informative References 3538 [I-D.ietf-dmm-srv6-mobile-uplane] 3539 Matsushima, S., Filsfils, C., Kohno, M., Camarillo, P., 3540 Voyer, D., and C. Perkins, "Segment Routing IPv6 for 3541 Mobile User Plane", draft-ietf-dmm-srv6-mobile-uplane-09 3542 (work in progress), July 2020. 3544 [I-D.ietf-spring-sr-service-programming] 3545 Clad, F., Xu, X., Filsfils, C., daniel.bernier@bell.ca, 3546 d., Li, C., Decraene, B., Ma, S., Yadlapalli, C., 3547 Henderickx, W., and S. Salsano, "Service Programming with 3548 Segment Routing", draft-ietf-spring-sr-service- 3549 programming-03 (work in progress), September 2020. 3551 [RFC8754] Filsfils, C., Ed., Dukes, D., Ed., Previdi, S., Leddy, J., 3552 Matsushima, S., and D. Voyer, "IPv6 Segment Routing Header 3553 (SRH)", RFC 8754, DOI 10.17487/RFC8754, March 2020, 3554 . 3556 Authors' Addresses 3558 Kamran Raza 3559 Cisco Systems 3560 Email: skraza@cisco.com 3562 Sonal Agarwal 3563 Cisco Systems 3564 Email: agarwaso@cisco.com 3566 Xufeng Liu 3567 Volta Networks 3568 Email: xufeng.liu.ietf@gmail.com 3570 Zhibo Hu 3571 Huawei Technologies 3572 Email: huzhibo@huawei.com 3573 Iftekhar Hussain 3574 Infinera Corporation 3575 Email: IHussain@infinera.com 3577 Himanshu Shah 3578 Ciena Corporation 3579 Email: hshah@ciena.com 3581 Daniel Voyer 3582 Bell Canada 3583 Email: daniel.voyer@bell.ca 3585 Hani Elmalky 3586 Individual 3587 Email: helmalky@google.com 3589 Satoru Matsushima 3590 SoftBank 3591 Email: satoru.matsushima@g.softbank.co.jp 3593 Katsuhiro Horiba 3594 SoftBank 3595 Email: katsuhiro.horiba@g.softbank.co.jp 3597 Jaganbabu Rajamanickam 3598 Cisco Systems 3599 Email: jrajaman@cisco.com 3601 Ahmed AbdelSalam 3602 Cisco Systems 3603 Email: ahabdels@cisco.com