idnits 2.17.1 draft-ietf-mpls-ldp-yang-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 10 instances of too long lines in the document, the longest one being 11 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 496 has weird spacing: '...address ine...' == Line 514 has weird spacing: '...address ine...' == Line 575 has weird spacing: '...address ine...' == Line 1188 has weird spacing: '... lsr-id yan...' -- The document date (27 February 2020) is 1513 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 5443 ** Downref: Normative reference to an Informational RFC: RFC 5920 == Outdated reference: A later version (-11) exists of draft-ietf-mpls-mldp-yang-06 == Outdated reference: A later version (-31) exists of draft-ietf-rtgwg-policy-model-08 Summary: 3 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 MPLS Working Group K. Raza, Ed. 2 Internet-Draft R. Asati 3 Intended status: Standards Track Cisco Systems 4 Expires: 30 August 2020 5 X. Liu 6 Volta Networks 8 S. Esale 9 Juniper Networks 11 X. Chen 12 Huawei Technologies 14 H. Shah 15 Ciena Corporation 17 27 February 2020 19 YANG Data Model for MPLS LDP 20 draft-ietf-mpls-ldp-yang-08 22 Abstract 24 This document describes a YANG data model for Multi-Protocol Label 25 Switching (MPLS) Label Distribution Protocol (LDP). The model also 26 serves as the base model to define Multipoint LDP (mLDP) model. 28 The YANG modules in this document conform to the Network Management 29 Datastore Architecture (NMDA). 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on 30 August 2020. 48 Copyright Notice 50 Copyright (c) 2020 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 55 license-info) in effect on the date of publication of this document. 56 Please review these documents carefully, as they describe your rights 57 and restrictions with respect to this document. Code Components 58 extracted from this document must include Simplified BSD License text 59 as described in Section 4.e of the Trust Legal Provisions and are 60 provided without warranty as described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 65 1.1. Base and Extended . . . . . . . . . . . . . . . . . . . . 3 66 2. Specification of Requirements . . . . . . . . . . . . . . . . 4 67 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 68 4. The Complete Tree . . . . . . . . . . . . . . . . . . . . . . 7 69 5. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 16 70 5.1. Configuration Hierarchy . . . . . . . . . . . . . . . . . 19 71 5.1.1. Global parameters . . . . . . . . . . . . . . . . . . 20 72 5.1.2. Capabilities parameters . . . . . . . . . . . . . . . 20 73 5.1.3. Per-Address-Family parameters . . . . . . . . . . . . 20 74 5.1.4. Hello Discovery parameters . . . . . . . . . . . . . 20 75 5.1.5. Peer parameters . . . . . . . . . . . . . . . . . . . 21 76 5.1.6. Forwarding parameters . . . . . . . . . . . . . . . . 21 77 6. Operational State . . . . . . . . . . . . . . . . . . . . . . 22 78 6.1. Adjacency state . . . . . . . . . . . . . . . . . . . . . 22 79 6.2. Peer state . . . . . . . . . . . . . . . . . . . . . . . 23 80 6.3. Bindings state . . . . . . . . . . . . . . . . . . . . . 24 81 6.4. Capabilities state . . . . . . . . . . . . . . . . . . . 26 82 7. Notifications . . . . . . . . . . . . . . . . . . . . . . . . 27 83 8. Action . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 84 9. YANG Specification . . . . . . . . . . . . . . . . . . . . . 27 85 9.1. Base . . . . . . . . . . . . . . . . . . . . . . . . . . 27 86 9.2. Extended . . . . . . . . . . . . . . . . . . . . . . . . 59 87 10. Security Considerations . . . . . . . . . . . . . . . . . . . 80 88 10.1. YANG model . . . . . . . . . . . . . . . . . . . . . . . 80 89 10.1.1. Writable nodes . . . . . . . . . . . . . . . . . . . 81 90 10.1.2. Readable nodes . . . . . . . . . . . . . . . . . . . 81 91 10.1.3. RPC operations . . . . . . . . . . . . . . . . . . . 82 92 10.1.4. Notifications . . . . . . . . . . . . . . . . . . . 83 93 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 83 94 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 83 95 13. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 84 96 14. Normative References . . . . . . . . . . . . . . . . . . . . 84 97 15. Informative References . . . . . . . . . . . . . . . . . . . 87 98 Appendix A. Data Tree Example . . . . . . . . . . . . . . . . . 88 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 92 101 1. Introduction 103 The Network Configuration Protocol (NETCONF) [RFC6241] is one of the 104 network management protocols that defines mechanisms to manage 105 network devices. YANG [RFC6020] [RFC7950] is a modular language that 106 represents data structures in an XML tree format, and is used as a 107 data modelling language for the NETCONF. 109 This document introduces a YANG data model for MPLS Label 110 Distribution Protocol (LDP) [RFC5036]. This model also covers LDP 111 IPv6 [RFC7552] and LDP capabilities [RFC5561] specifications. 113 The data model is defined for the following constructs that are used 114 for managing the protocol: 116 * Configuration 118 * Operational State 120 * Executables (Actions) 122 * Notifications 124 This document is organized to define the data model for each of the 125 above constructs in the sequence as listed above. 127 1.1. Base and Extended 129 The configuration and state items are divided into the following two 130 broad categories: 132 * Base 134 * Extended 136 The "base" category contains the basic and fundamental features that 137 are covered in LDP base specification [RFC5036] and constitute the 138 minimum requirements for a typical base LDP deployment. Whereas, the 139 "extended" category contains other non-base features. All the items 140 in a base category are mandatory and hence no "if-feature" is allowed 141 under the "base" category. The base and extended categories are 142 defined in their own modules as described later. 144 The example of base feature includes the configuration of LDP lsr-id, 145 enabling LDP interfaces, setting password for LDP session etc., 146 whereas the examples of extended feature include inbound/outbound 147 label policies, igp sync [RFC5443], downstream-on-demand etc. This 148 is worth highlighting that LDP IPv6 [RFC7552] is also categorized as 149 an extended feature. 151 While "base" model support will suffice for small deployments, it is 152 expected that large deployments will require both the "base" and 153 "extended" models support from the vendors. 155 2. Specification of Requirements 157 In this document, the word "IP" is used to refer to both IPv4 and 158 IPv6, unless otherwise explicitly stated. For example, "IP address 159 family" should be read as "IPv4 and/or IPv6 address family". 161 3. Overview 163 This document defines two new modules for LDP YANG support: 165 * "ietf-mpls-ldp" module that specifies the base LDP features and 166 augments /rt:routing/rt:control-plane-protocols/rt:control-plane- 167 protocol defined in [RFC8349]. We define new identity 'mpls-ldp' 168 for LDP and the model allows only a single instance of 'mpls-ldp'. 170 * "ietf-mpls-ldp-extended" module that specifies the extended LDP 171 features and augments the base LDP module. 173 It is to be noted that mLDP YANG model [I-D.ietf-mpls-mldp-yang] 174 augments LDP base and extended modules to specify the mLDP specific 175 base and extended features. 177 There are four types of containers in our module(s): 179 * Read-Write parameters for configuration (Section 5) 181 * Read-only parameters for operational state (Section 6) 183 * Notifications for events (Section 7) 185 * RPCs for executing commands to perform some action (Section 8) 187 The modules in this document conforms to the Network Management 188 Datastore Architecture (NMDA) defined in [RFC8342]. The operational 189 state data is combined with the associated configuration data in the 190 same hierarchy [RFC8407]. When protocol states are retrieved from 191 the NMDA operational state datastore, the returned states cover all 192 "config true" (rw) and "config false" (ro) nodes defined in the 193 schema. 195 Following diagram depicts high level LDP YANG tree organization and 196 hierarchy: 198 +-- rw routing 199 +-- rw control-plane-protocols 200 +-- rw control-plane-protocol 201 +-- rw mpls-ldp 202 +-- rw ... 203 +-- rw ... // base 204 | +-- rw ... 205 | +-- ro ... 206 | +-- 207 +-- ro ... 208 | +-- ro ... 209 | +-- ro ... 210 | +-- 211 +-- rw ldp-ext: .... // extended 212 | +-- rw ... 213 | +-- ro ... 214 | +-- 215 +-- ro ... 216 +-- ro ... 217 +-- ro ... 219 rpcs: 220 +-- x mpls-ldp-some_action 221 +-- x . . . . . 223 notifications: 224 +--- n mpls-ldp-some_event 225 +--- n ... 227 Figure 1: LDP YANG tree organization 229 Before going into data model details, it is important to take note of 230 the following points: 232 * This model aims to address only the core LDP parameters as per RFC 233 specification, as well as well-known and widely deployed 234 manageability controls (such as label filtering policies to apply 235 filtering rules on the assignment, advertisement, and acceptance 236 for label bindings). Any vendor specific feature should be 237 defined in a vendor-specific augmentation of this model. 239 * Multi-topology LDP [RFC7307] is beyond the scope of this document. 241 * This model does not cover any applications running on top of LDP, 242 nor does it cover any OAM procedures for LDP. 244 * This model is a VPN Routing and Forwarding (VRF)-centric model. 245 It is important to note that [RFC4364] defines VRF tables and 246 default forwarding tables as different, however from a YANG 247 modelling perspective this introduces unnecessary complications, 248 hence we are treating the default forwarding table as just another 249 VRF. 251 * A "network-instance", as defined in [RFC8529], refers to a VRF 252 instance (both default and non-default) within the scope of this 253 model. 255 * This model supports two address-families, namely "ipv4" and 256 "ipv6". 258 * This model assumes platform-wide label space (i.e. label space Id 259 of zero). However, when Upstream Label assignment [RFC6389] is in 260 use, an upstream assigned label is looked up in a Context-Specific 261 label space as defined in [RFC5331]. 263 * The label and peer policies (including filters) are defined using 264 prefix-set and neighbor-set respectively as defined in routing- 265 policy model [I-D.ietf-rtgwg-policy-model]. 267 * This model uses the terms LDP "neighbor"/"adjacency", "session", 268 and "peer" with the following semantics: 270 - Neighbor/Adjacency: An LDP enabled LSR that is discovered 271 through LDP discovery mechanisms. 273 - Session: An LDP neighbor with whom a TCP connection has been 274 established. 276 - Peer: An LDP session which has successfully progressed beyond 277 its initialization phase and is either already exchanging the 278 bindings or is ready to do so. 280 It is to be noted that LDP Graceful Restart mechanisms defined in 281 [RFC3478] allow keeping the exchanged bindings for some time after 282 a session goes down with a peer. We call such a state belonging 283 to a "stale" peer -- i.e. keeping peer bindings from a peer with 284 whom currently there is either no connection established or 285 connection is established but GR session is in recovery state. 286 When used in this document, the above terms will refer strictly to 287 the semantics and definitions defined for them. 289 A simplified graphical tree representation of base and extended LDP 290 YANG data model is presented in Figure 2. The meaning of the symbols 291 in these tree diagrams is defined in [RFC8340]. 293 The actual YANG specification for base and extended modules is 294 captured in Section 9. 296 While presenting the YANG tree view and actual specification, this 297 document assumes readers' familiarity with the concepts of YANG 298 modeling, its presentation and its compilation. 300 4. The Complete Tree 302 Following is a complete tree representation of configuration, state, 303 notification, and rpc items under LDP base and extended modules. 305 module: ietf-mpls-ldp 306 augment /rt:routing/rt:control-plane-protocols 307 /rt:control-plane-protocol: 308 +--rw mpls-ldp 309 +--rw global 310 | +--rw capability 311 | | +--rw ldp-ext:end-of-lib {capability-end-of-lib}? 312 | | | +--rw ldp-ext:enabled? boolean 313 | | +--rw ldp-ext:typed-wildcard-fec 314 | | | {capability-typed-wildcard-fec}? 315 | | | +--rw ldp-ext:enabled? boolean 316 | | +--rw ldp-ext:upstream-label-assignment 317 | | {capability-upstream-label-assignment}? 318 | | +--rw ldp-ext:enabled? boolean 319 | +--rw graceful-restart 320 | | +--rw enabled? boolean 321 | | +--rw reconnect-time? uint16 322 | | +--rw recovery-time? uint16 323 | | +--rw forwarding-holdtime? uint16 324 | | +--rw ldp-ext:helper-enabled? boolean 325 | | {graceful-restart-helper-mode}? 326 | +--rw lsr-id? 327 | | rt-types:router-id 328 | +--rw address-families 329 | | +--rw ipv4! 330 | | | +--rw enabled? boolean 331 | | | +--ro label-distribution-control-mode? enumeration 332 | | | +--ro bindings 333 | | | | +--ro address* [address] 334 | | | | | +--ro address inet:ipv4-address 335 | | | | | +--ro advertisement-type? advertised-received 336 | | | | | +--ro peer 337 | | | | | +--ro lsr-id? leafref 338 | | | | | +--ro label-space-id? leafref 339 | | | | +--ro fec-label* [fec] 340 | | | | +--ro fec inet:ipv4-prefix 341 | | | | +--ro peer* 342 | | | | [lsr-id label-space-id advertisement-type] 343 | | | | +--ro lsr-id leafref 344 | | | | +--ro label-space-id leafref 345 | | | | +--ro advertisement-type 346 | | | | | advertised-received 347 | | | | +--ro label? 348 | | | | | rt-types:mpls-label 349 | | | | +--ro used-in-forwarding? boolean 350 | | | +--rw ldp-ext:label-policy 351 | | | | +--rw ldp-ext:advertise 352 | | | | | +--rw ldp-ext:egress-explicit-null 353 | | | | | | +--rw ldp-ext:enabled? boolean 354 | | | | | +--rw ldp-ext:prefix-list? 355 | | | | | prefix-list-ref 356 | | | | +--rw ldp-ext:accept 357 | | | | | +--rw ldp-ext:prefix-list? prefix-list-ref 358 | | | | +--rw ldp-ext:assign 359 | | | | {policy-label-assignment-config}? 360 | | | | +--rw ldp-ext:independent-mode 361 | | | | | +--rw ldp-ext:prefix-list? prefix-list-ref 362 | | | | +--rw ldp-ext:ordered-mode 363 | | | | {policy-ordered-label-config}? 364 | | | | +--rw ldp-ext:egress-prefix-list? 365 | | | | prefix-list-ref 366 | | | +--rw ldp-ext:transport-address? 367 | | | inet:ipv4-address 368 | | +--rw ldp-ext:ipv6! 369 | | +--rw ldp-ext:enabled? 370 | | | boolean 371 | | +--rw ldp-ext:label-policy 372 | | | +--rw ldp-ext:advertise 373 | | | | +--rw ldp-ext:egress-explicit-null 374 | | | | | +--rw ldp-ext:enabled? boolean 375 | | | | +--rw ldp-ext:prefix-list? 376 | | | | prefix-list-ref 377 | | | +--rw ldp-ext:accept 378 | | | | +--rw ldp-ext:prefix-list? prefix-list-ref 379 | | | +--rw ldp-ext:assign 380 | | | {policy-label-assignment-config}? 381 | | | +--rw ldp-ext:independent-mode 382 | | | | +--rw ldp-ext:prefix-list? prefix-list-ref 383 | | | +--rw ldp-ext:ordered-mode 384 | | | {policy-ordered-label-config}? 385 | | | +--rw ldp-ext:egress-prefix-list? 386 | | | prefix-list-ref 387 | | +--rw ldp-ext:transport-address 388 | | | inet:ipv6-address 389 | | +--ro ldp-ext:label-distribution-control-mode? 390 | | | enumeration 391 | | +--ro ldp-ext:bindings 392 | | +--ro ldp-ext:address* [address] 393 | | | +--ro ldp-ext:address 394 | | | | inet:ipv6-address 395 | | | +--ro ldp-ext:advertisement-type? 396 | | | | advertised-received 397 | | | +--ro ldp-ext:peer 398 | | | +--ro ldp-ext:lsr-id? leafref 399 | | | +--ro ldp-ext:label-space-id? leafref 400 | | +--ro ldp-ext:fec-label* [fec] 401 | | +--ro ldp-ext:fec inet:ipv6-prefix 402 | | +--ro ldp-ext:peer* 403 | | [lsr-id label-space-id advertisement-type] 404 | | +--ro ldp-ext:lsr-id leafref 405 | | +--ro ldp-ext:label-space-id leafref 406 | | +--ro ldp-ext:advertisement-type 407 | | | advertised-received 408 | | +--ro ldp-ext:label? 409 | | | rt-types:mpls-label 410 | | +--ro ldp-ext:used-in-forwarding? boolean 411 | +--rw ldp-ext:forwarding-nexthop 412 | | {forwarding-nexthop-config}? 413 | | +--rw ldp-ext:interfaces 414 | | +--rw ldp-ext:interface* [name] 415 | | +--rw ldp-ext:name if:interface-ref 416 | | +--rw ldp-ext:address-family* [afi] 417 | | +--rw ldp-ext:afi identityref 418 | | +--rw ldp-ext:ldp-disable? boolean 419 | +--rw ldp-ext:igp-synchronization-delay? uint16 420 +--rw discovery 421 | +--rw interfaces 422 | | +--rw hello-holdtime? uint16 423 | | +--rw hello-interval? uint16 424 | | +--rw interface* [name] 425 | | +--rw name 426 | | | if:interface-ref 427 | | +--ro next-hello? uint16 428 | | +--rw address-families 429 | | | +--rw ipv4! 430 | | | | +--rw enabled? boolean 431 | | | | +--ro hello-adjacencies 432 | | | | | +--ro hello-adjacency* [adjacent-address] 433 | | | | | +--ro adjacent-address 434 | | | | | | inet:ipv4-address 435 | | | | | +--ro flag* identityref 436 | | | | | +--ro hello-holdtime 437 | | | | | | +--ro adjacent? uint16 438 | | | | | | +--ro negotiated? uint16 439 | | | | | | +--ro remaining? uint16 440 | | | | | +--ro next-hello? uint16 441 | | | | | +--ro statistics 442 | | | | | | +--ro discontinuity-time 443 | | | | | | | yang:date-and-time 444 | | | | | | +--ro hello-received? 445 | | | | | | | yang:counter64 446 | | | | | | +--ro hello-dropped? 447 | | | | | | yang:counter64 448 | | | | | +--ro peer 449 | | | | | +--ro lsr-id? leafref 450 | | | | | +--ro label-space-id? leafref 451 | | | | +--rw ldp-ext:transport-address? union 452 | | | +--rw ldp-ext:ipv6! 453 | | | +--rw ldp-ext:enabled? boolean 454 | | | +--ro ldp-ext:hello-adjacencies 455 | | | | +--ro ldp-ext:hello-adjacency* 456 | | | | [adjacent-address] 457 | | | | +--ro ldp-ext:adjacent-address 458 | | | | | inet:ipv6-address 459 | | | | +--ro ldp-ext:flag* 460 | | | | | identityref 461 | | | | +--ro ldp-ext:hello-holdtime 462 | | | | | +--ro ldp-ext:adjacent? uint16 463 | | | | | +--ro ldp-ext:negotiated? uint16 464 | | | | | +--ro ldp-ext:remaining? uint16 465 | | | | +--ro ldp-ext:next-hello? uint16 466 | | | | +--ro ldp-ext:statistics 467 | | | | | +--ro ldp-ext:discontinuity-time 468 | | | | | | yang:date-and-time 469 | | | | | +--ro ldp-ext:hello-received? 470 | | | | | | yang:counter64 471 | | | | | +--ro ldp-ext:hello-dropped? 472 | | | | | yang:counter64 473 | | | | +--ro ldp-ext:peer 474 | | | | +--ro ldp-ext:lsr-id? leafref 475 | | | | +--ro ldp-ext:label-space-id? leafref 476 | | | +--rw ldp-ext:transport-address? union 477 | | +--rw ldp-ext:hello-holdtime? uint16 478 | | | {per-interface-timer-config}? 479 | | +--rw ldp-ext:hello-interval? uint16 480 | | | {per-interface-timer-config}? 481 | | +--rw ldp-ext:igp-synchronization-delay? uint16 482 | | {per-interface-timer-config}? 483 | +--rw targeted 484 | +--rw hello-holdtime? uint16 485 | +--rw hello-interval? uint16 486 | +--rw hello-accept 487 | | +--rw enabled? boolean 488 | | +--rw ldp-ext:neighbor-list? neighbor-list-ref 489 | | {policy-targeted-discovery-config}? 490 | +--rw address-families 491 | +--rw ipv4! 492 | | +--ro hello-adjacencies 493 | | | +--ro hello-adjacency* 494 | | | [local-address adjacent-address] 495 | | | +--ro local-address inet:ipv4-address 496 | | | +--ro adjacent-address inet:ipv4-address 497 | | | +--ro flag* identityref 498 | | | +--ro hello-holdtime 499 | | | | +--ro adjacent? uint16 500 | | | | +--ro negotiated? uint16 501 | | | | +--ro remaining? uint16 502 | | | +--ro next-hello? uint16 503 | | | +--ro statistics 504 | | | | +--ro discontinuity-time 505 | | | | | yang:date-and-time 506 | | | | +--ro hello-received? 507 | | | | | yang:counter64 508 | | | | +--ro hello-dropped? 509 | | | | yang:counter64 510 | | | +--ro peer 511 | | | +--ro lsr-id? leafref 512 | | | +--ro label-space-id? leafref 513 | | +--rw target* [adjacent-address] 514 | | +--rw adjacent-address inet:ipv4-address 515 | | +--rw enabled? boolean 516 | | +--rw local-address? inet:ipv4-address 517 | +--rw ldp-ext:ipv6! 518 | +--ro ldp-ext:hello-adjacencies 519 | | +--ro ldp-ext:hello-adjacency* 520 | | [local-address adjacent-address] 521 | | +--ro ldp-ext:local-address 522 | | | inet:ipv6-address 523 | | +--ro ldp-ext:adjacent-address 524 | | | inet:ipv6-address 525 | | +--ro ldp-ext:flag* 526 | | | identityref 527 | | +--ro ldp-ext:hello-holdtime 528 | | | +--ro ldp-ext:adjacent? uint16 529 | | | +--ro ldp-ext:negotiated? uint16 530 | | | +--ro ldp-ext:remaining? uint16 531 | | +--ro ldp-ext:next-hello? uint16 532 | | +--ro ldp-ext:statistics 533 | | | +--ro ldp-ext:discontinuity-time 534 | | | | yang:date-and-time 535 | | | +--ro ldp-ext:hello-received? 536 | | | | yang:counter64 537 | | | +--ro ldp-ext:hello-dropped? 538 | | | yang:counter64 539 | | +--ro ldp-ext:peer 540 | | +--ro ldp-ext:lsr-id? leafref 541 | | +--ro ldp-ext:label-space-id? leafref 542 | +--rw ldp-ext:target* [adjacent-address] 543 | +--rw ldp-ext:adjacent-address 544 | | inet:ipv6-address 545 | +--rw ldp-ext:enabled? boolean 546 | +--rw ldp-ext:local-address? 547 | inet:ipv6-address 548 +--rw peers 549 +--rw authentication 550 | +--rw (authentication-type)? 551 | +--:(password) 552 | | +--rw key? string 553 | | +--rw crypto-algorithm? identityref 554 | +--:(ldp-ext:key-chain) {key-chain}? 555 | +--rw ldp-ext:key-chain? key-chain:key-chain-ref 556 +--rw session-ka-holdtime? uint16 557 +--rw session-ka-interval? uint16 558 +--rw peer* [lsr-id label-space-id] 559 | +--rw lsr-id rt-types:router-id 560 | +--rw label-space-id uint16 561 | +--rw authentication 562 | | +--rw (authentication-type)? 563 | | +--:(password) 564 | | | +--rw key? string 565 | | | +--rw crypto-algorithm? identityref 566 | | +--:(ldp-ext:key-chain) {key-chain}? 567 | | +--rw ldp-ext:key-chain? 568 | | key-chain:key-chain-ref 569 | +--rw address-families 570 | | +--rw ipv4! 571 | | | +--ro hello-adjacencies 572 | | | | +--ro hello-adjacency* 573 | | | | [local-address adjacent-address] 574 | | | | +--ro local-address inet:ipv4-address 575 | | | | +--ro adjacent-address inet:ipv4-address 576 | | | | +--ro flag* identityref 577 | | | | +--ro hello-holdtime 578 | | | | | +--ro adjacent? uint16 579 | | | | | +--ro negotiated? uint16 580 | | | | | +--ro remaining? uint16 581 | | | | +--ro next-hello? uint16 582 | | | | +--ro statistics 583 | | | | | +--ro discontinuity-time 584 | | | | | | yang:date-and-time 585 | | | | | +--ro hello-received? 586 | | | | | | yang:counter64 587 | | | | | +--ro hello-dropped? 588 | | | | | yang:counter64 589 | | | | +--ro interface? if:interface-ref 590 | | | +--rw ldp-ext:label-policy 591 | | | +--rw ldp-ext:advertise 592 | | | | +--rw ldp-ext:prefix-list? prefix-list-ref 593 | | | +--rw ldp-ext:accept 594 | | | +--rw ldp-ext:prefix-list? prefix-list-ref 595 | | +--rw ldp-ext:ipv6! 596 | | +--ro ldp-ext:hello-adjacencies 597 | | | +--ro ldp-ext:hello-adjacency* 598 | | | [local-address adjacent-address] 599 | | | +--ro ldp-ext:local-address 600 | | | | inet:ipv6-address 601 | | | +--ro ldp-ext:adjacent-address 602 | | | | inet:ipv6-address 603 | | | +--ro ldp-ext:flag* 604 | | | | identityref 605 | | | +--ro ldp-ext:hello-holdtime 606 | | | | +--ro ldp-ext:adjacent? uint16 607 | | | | +--ro ldp-ext:negotiated? uint16 608 | | | | +--ro ldp-ext:remaining? uint16 609 | | | +--ro ldp-ext:next-hello? uint16 610 | | | +--ro ldp-ext:statistics 611 | | | | +--ro ldp-ext:discontinuity-time 612 | | | | | yang:date-and-time 613 | | | | +--ro ldp-ext:hello-received? 614 | | | | | yang:counter64 615 | | | | +--ro ldp-ext:hello-dropped? 616 | | | | yang:counter64 617 | | | +--ro ldp-ext:interface? 618 | | | if:interface-ref 619 | | +--rw ldp-ext:label-policy 620 | | +--rw ldp-ext:advertise 621 | | | +--rw ldp-ext:prefix-list? prefix-list-ref 622 | | +--rw ldp-ext:accept 623 | | +--rw ldp-ext:prefix-list? prefix-list-ref 624 | +--ro label-advertisement-mode 625 | | +--ro local? label-adv-mode 626 | | +--ro peer? label-adv-mode 627 | | +--ro negotiated? label-adv-mode 628 | +--ro next-keep-alive? uint16 629 | +--ro received-peer-state 630 | | +--ro graceful-restart 631 | | | +--ro enabled? boolean 632 | | | +--ro reconnect-time? uint16 633 | | | +--ro recovery-time? uint16 634 | | +--ro capability 635 | | +--ro end-of-lib 636 | | | +--ro enabled? boolean 637 | | +--ro typed-wildcard-fec 638 | | | +--ro enabled? boolean 639 | | +--ro upstream-label-assignment 640 | | +--ro enabled? boolean 641 | +--ro session-holdtime 642 | | +--ro peer? uint16 643 | | +--ro negotiated? uint16 644 | | +--ro remaining? uint16 645 | +--ro session-state? enumeration 646 | +--ro tcp-connection 647 | | +--ro local-address? inet:ip-address 648 | | +--ro local-port? inet:port-number 649 | | +--ro remote-address? inet:ip-address 650 | | +--ro remote-port? inet:port-number 651 | +--ro up-time? 652 | | rt-types:timeticks64 653 | +--ro statistics 654 | | +--ro discontinuity-time yang:date-and-time 655 | | +--ro received 656 | | | +--ro total-octets? yang:counter64 657 | | | +--ro total-messages? yang:counter64 658 | | | +--ro address? yang:counter64 659 | | | +--ro address-withdraw? yang:counter64 660 | | | +--ro initialization? yang:counter64 661 | | | +--ro keepalive? yang:counter64 662 | | | +--ro label-abort-request? yang:counter64 663 | | | +--ro label-mapping? yang:counter64 664 | | | +--ro label-release? yang:counter64 665 | | | +--ro label-request? yang:counter64 666 | | | +--ro label-withdraw? yang:counter64 667 | | | +--ro notification? yang:counter64 668 | | +--ro sent 669 | | | +--ro total-octets? yang:counter64 670 | | | +--ro total-messages? yang:counter64 671 | | | +--ro address? yang:counter64 672 | | | +--ro address-withdraw? yang:counter64 673 | | | +--ro initialization? yang:counter64 674 | | | +--ro keepalive? yang:counter64 675 | | | +--ro label-abort-request? yang:counter64 676 | | | +--ro label-mapping? yang:counter64 677 | | | +--ro label-release? yang:counter64 678 | | | +--ro label-request? yang:counter64 679 | | | +--ro label-withdraw? yang:counter64 680 | | | +--ro notification? yang:counter64 681 | | +--ro total-addresses? uint32 682 | | +--ro total-labels? uint32 683 | | +--ro total-fec-label-bindings? uint32 684 | +--rw ldp-ext:admin-down? boolean 685 | | {per-peer-admin-down}? 686 | +--rw ldp-ext:graceful-restart 687 | | {per-peer-graceful-restart-config}? 688 | | +--rw ldp-ext:enabled? boolean 689 | | +--rw ldp-ext:reconnect-time? uint16 690 | | +--rw ldp-ext:recovery-time? uint16 691 | +--rw ldp-ext:session-ka-holdtime? uint16 692 | | {per-peer-session-attributes-config}? 693 | +--rw ldp-ext:session-ka-interval? uint16 694 | {per-peer-session-attributes-config}? 695 +--rw ldp-ext:session-downstream-on-demand 696 | {session-downstream-on-demand-config}? 697 | +--rw ldp-ext:enabled? boolean 698 | +--rw ldp-ext:peer-list? peer-list-ref 699 +--rw ldp-ext:dual-stack-transport-preference 700 {peers-dual-stack-transport-preference}? 701 +--rw ldp-ext:max-wait? uint16 702 +--rw ldp-ext:prefer-ipv4! 703 +--rw ldp-ext:peer-list? peer-list-ref 705 rpcs: 706 +---x mpls-ldp-clear-peer 707 | +---w input 708 | +---w protocol-name? leafref 709 | +---w lsr-id? leafref 710 | +---w label-space-id? leafref 711 +---x mpls-ldp-clear-hello-adjacency 712 | +---w input 713 | +---w hello-adjacency 714 | +---w protocol-name? leafref 715 | +---w (hello-adjacency-type)? 716 | +--:(targeted) 717 | | +---w targeted! 718 | | +---w target-address? inet:ip-address 719 | +--:(link) 720 | +---w link! 721 | +---w next-hop-interface? leafref 722 | +---w next-hop-address? inet:ip-address 723 +---x mpls-ldp-clear-peer-statistics 724 +---w input 725 +---w protocol-name? leafref 726 +---w lsr-id? leafref 727 +---w label-space-id? leafref 729 notifications: 730 +---n mpls-ldp-peer-event 731 | +--ro event-type? oper-status-event-type 732 | +--ro peer 733 | +--ro protocol-name? leafref 734 | +--ro lsr-id? leafref 735 | +--ro label-space-id? leafref 736 +---n mpls-ldp-hello-adjacency-event 737 | +--ro event-type? oper-status-event-type 738 | +--ro protocol-name? leafref 739 | +--ro (hello-adjacency-type)? 740 | +--:(targeted) 741 | | +--ro targeted 742 | | +--ro target-address? inet:ip-address 743 | +--:(link) 744 | +--ro link 745 | +--ro next-hop-interface? if:interface-ref 746 | +--ro next-hop-address? inet:ip-address 747 +---n mpls-ldp-fec-event 748 +--ro event-type? oper-status-event-type 749 +--ro protocol-name? leafref 750 +--ro fec? inet:ip-prefix 752 Figure 2: Complete Tree 754 5. Configuration 756 This specification defines the configuration parameters for base LDP 757 as specified in [RFC5036] and LDP IPv6 [RFC7552]. Moreover, it 758 incorporates provisions to enable LDP Capabilities [RFC5561], and 759 defines some of the most significant and commonly used capabilities 760 such as Typed Wildcard FEC [RFC5918], End-of-LIB [RFC5919], and LDP 761 Upstream Label Assignment [RFC6389]. 763 This model augments /rt:routing/rt:control-plane-protocols/ 764 rt:control-plane-protocol that is defined in [RFC8349] and follows 765 NMDA as mentioned earlier. 767 Following is the high-level configuration organization for base LDP 768 module: 770 augment /rt:routing/rt:control-plane-protocols: 771 /rt:control-plane-protocol: 772 +-- mpls-ldp 773 +-- global 774 | +-- ... 775 | +-- ... 776 | +-- address-families 777 | | +-- ipv4 778 | | +-- . . . 779 | | +-- . . . 780 | +-- capability 781 | +-- ... 782 | +-- ... 783 +-- discovery 784 | +-- interfaces 785 | | +-- ... 786 | | +-- ... 787 | | +-- interface* [interface] 788 | | +-- ... 789 | | +-- address-families 790 | | +-- ipv4 791 | | +-- ... 792 | | +-- ... 793 | +-- targeted 794 | +-- ... 795 | +-- address-families 796 | +-- ipv4 797 | +- target* [adjacent-address] 798 | +- ... 799 | +- ... 800 +-- peers 801 +-- ... 802 +-- ... 803 +-- peer* [lsr-id label-space-id] 804 +-- ... 805 +-- ... 807 Figure 3: Base Configuration organization 809 Following is the high-level configuration organization for extended 810 LDP: 812 augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol 813 +-- mpls-ldp 814 +-- global 815 | +-- ... 816 | +-- ... 817 | +-- address-families 818 | | +-- ipv4 819 | | | +-- . . . 820 | | | +-- . . . 821 | | | +-- label-policy 822 | | | +-- ... 823 | | | +-- ... 824 | | +-- ipv6 825 | | +-- . . . 826 | | +-- . . . 827 | | +-- label-policy 828 | | +-- ... 829 | | +-- ... 830 | +-- capability 831 | | +-- ... 832 | | +-- ... 833 | +-- discovery 834 | +-- interfaces 835 | | +-- ... 836 | | +-- ... 837 | | +-- interface* [interface] 838 | | +-- ... 839 | | +-- address-families 840 | | +-- ipv4 841 | | | +-- ... 842 | | | +-- ... 843 | | +-- ipv6 844 | | +-- ... 845 | | +-- ... 846 | +-- targeteted 847 | +-- ... 848 | +-- address-families 849 | +-- ipv6 850 | +- target* [adjacent-address] 851 | +- ... 852 | +- ... 853 +-- forwarding-nexthop 854 | +-- ... 855 | +-- ... 856 +-- peers 857 +-- ... 858 +-- ... 859 +-- peer* 860 +-- ... 861 +-- ... 862 +-- label-policy 863 | +-- .. 864 +-- address-families 865 +-- ipv4 866 | +-- ... 867 +-- ipv6 868 +-- ... 870 Figure 4: Extended Configuration organization 872 Given the configuration hierarchy, the model allows inheritance such 873 that an item in a child tree is able to derive value from a similar 874 or related item in one of the parents. For instance, hello holdtime 875 can be configured per-VRF or per-VRF-interface, thus allowing 876 inheritance as well flexibility to override with a different value at 877 any child level. 879 5.1. Configuration Hierarchy 881 LDP module resides under a network-instance and the scope of any LDP 882 configuration defined under this tree is per network-instance (per- 883 VRF). This configuration is further divided into sub categories as 884 follows. 886 * Global parameters 888 * Per-address-family parameters 890 * LDP Capabilities parameters 892 * Hello Discovery parameters 894 - interfaces 896 o Global 898 o Per-interface: Global 900 o Per-interface: Per-address-family 902 - targeted 904 o Global 905 o Per-address-family: Per-target 907 * Peer parameters 909 - Global 911 - Per-peer: Global 913 - Per-peer: Per-address-family 915 * Forwarding parameters 917 Following subsections briefly explain these configuration areas. 919 5.1.1. Global parameters 921 There are configuration items that are available directly under a VRF 922 instance and do not fall under any other sub tree. Example of such a 923 parameter is LDP LSR Id that is typically configured per VRF. To 924 keep legacy LDP features and applications working in an LDP IPv4 925 networks with this model, this document recommends an operator to 926 pick a routable IPv4 unicast address (within a routing domain) as an 927 LSR Id. 929 5.1.2. Capabilities parameters 931 This container falls under global tree and holds the LDP capabilities 932 that are to be enabled for certain features. By default, an LDP 933 capability is disabled unless explicitly enabled. These capabilities 934 are typically used to negotiate with LDP peer(s) the support/non- 935 support related to a feature and its parameters. The scope of a 936 capability enabled under this container applies to all LDP peers in 937 the given VRF instance. There is also a peer level capability 938 container that is provided to override a capability that is enabled/ 939 specified at VRF level. 941 5.1.3. Per-Address-Family parameters 943 Any LDP configuration parameter related to IP address family (AF) 944 whose scope is VRF wide is configured under this tree. The examples 945 of per-AF parameters include enabling LDP for an address family, 946 prefix-list based label policies, and LDP transport address. 948 5.1.4. Hello Discovery parameters 950 This container is used to hold LDP configuration related to Hello and 951 discovery process for both basic (link) and extended (targeted) 952 discovery. 954 The "interfaces" is a container to configure parameters related to 955 VRF interfaces. There are parameters that apply to all interfaces 956 (such as hello timers), as well as parameters that can be configured 957 per-interface. Hence, an interface list is defined under 958 "interfaces" container. The model defines parameters to configure 959 per-interface non AF related items, as well as per-interface per-AF 960 items. The example of former is interface hello timers, and example 961 of latter is enabling hellos for a given AF under an interface. 963 The "targeted" container under a VRF instance allows to configure LDP 964 targeted discovery related parameters. Within this container, the 965 "target" list provides a means to configure multiple target addresses 966 to perform extended discovery to a specific destination target, as 967 well as to fine-tune the per-target parameters. 969 5.1.5. Peer parameters 971 This container is used to hold LDP configuration related to LDP 972 sessions and peers under a VRF instance. This container allows to 973 configure parameters that either apply on VRF's all peers or a subset 974 (peer-list) of VRF peers. The example of such parameters include 975 authentication password, session KA timers etc. Moreover, the model 976 also allows per-peer parameter tuning by specifying a "peer" list 977 under the "peers" container. A peer is uniquely identified by its 978 LSR Id. 980 Like per-interface parameters, some per-peer parameters are AF- 981 agnostic (i.e. either non AF related or apply to both IP address 982 families), and some that belong to an AF. The example of former is 983 per-peer session password configuration, whereas the example of 984 latter is prefix-list based label policies (inbound and outbound) 985 that apply to a given peer. 987 5.1.6. Forwarding parameters 989 This container is used to hold configuration used to control LDP 990 forwarding behavior under a VRF instance. One example of a 991 configuration under this container is when a user wishes to enable 992 neighbor discovery on an interface but wishes to disable use of the 993 same interface as forwarding nexthop. This example configuration 994 makes sense only when there are more than one LDP enabled interfaces 995 towards the neighbor. 997 6. Operational State 999 Operational state of LDP can be queried and obtained from read-only 1000 state containers that fall under the same tree (/rt:routing/ 1001 rt:control-plane-protocols/rt:control-plane-protocol) as the 1002 configuration. 1004 Following are main areas for which LDP operational state is defined: 1006 * Neighbor Adjacencies 1008 * Peer 1010 * Bindings (FEC-label and address) 1012 * Capabilities 1014 6.1. Adjacency state 1016 Neighbor adjacencies are per address-family hello adjacencies that 1017 are formed with neighbors as result of LDP basic or extended 1018 discovery. In terms of organization, there is a source of discovery 1019 (e.g. interface or target address) along with its associated 1020 parameters and one or more discovered neighbors along with neighbor 1021 discovery related parameters. For the basic discovery, there could 1022 be more than one discovered neighbor for a given source (interface), 1023 whereas there is at most one discovered neighbor for an extended 1024 discovery source (local-address and target-address). This is also to 1025 be noted that the reason for a targeted neighbor adjacency could be 1026 either an active source (locally configured targeted) or passive 1027 source (to allow any incoming extended/targeted hellos). A neighbor/ 1028 adjacency record also contains session-state that helps highlight 1029 whether a given adjacency has progressed to subsequent session level 1030 or to eventual peer level. 1032 Following captures high level tree hierarchy for neighbor adjacency 1033 state. The tree is shown for ipv4 address-family only; a similar 1034 tree exists for ipv6 address-family as well. 1036 +--rw mpls-ldp! 1037 +--rw discovery 1038 +--rw interfaces 1039 | +--rw interface* [interface] 1040 | +--rw address-families 1041 | +--rw ipv4 1042 | +--ro hello-adjacencies 1043 | +--ro hello-adjacencies* [adjacent-address] 1044 | +--ro adjacent-address 1045 | . . . . 1046 | . . . . 1047 +--rw targeted 1048 +--rw address-families 1049 +--rw ipv4 1050 +--ro hello-adjacencies 1051 +--ro hello-adjacencies* 1052 | [local-address adjacent-address] 1053 +--ro local-address 1054 +--ro adjacent-address 1055 . . . . 1056 . . . . 1058 Figure 5: Adjacency state 1060 6.2. Peer state 1062 Peer related state is presented under peers tree. This is one of the 1063 core state that provides info on the session related parameters 1064 (mode, authentication, KA timeout etc.), TCP connection info, hello 1065 adjacencies for the peer, statistics related to messages and 1066 bindings, and capabilities exchange info. 1068 Following captures high level tree hierarchy for peer state. The 1069 peer's hello adjacencies tree is shown for ipv4 address-family only; 1070 a similar tree exists for ipv6 address-family as well. 1072 +--rw mpls-ldp! 1073 +--rw peers 1074 +--rw peer* [lsr-id label-space-id] 1075 +--rw lsr-id 1076 +--rw label-space-id 1077 +--ro label-advertisement-mode 1078 +--ro session-state 1079 +--ro tcp-connection 1080 +--ro session-holdtime? 1081 +--ro up-time 1082 +-- . . . . 1083 +--ro address-families 1084 | +--ro ipv4 1085 | +--ro hello-adjacencies 1086 | +--ro hello-adjacencies* 1087 | [local-address adjacent-address] 1088 | . . . . 1089 | . . . . 1090 +--ro received-peer-state 1091 | +--ro . . . . 1092 | +--ro capability 1093 | +--ro . . . . 1094 +--ro statistics 1095 +-- . . . . 1096 +-- received 1097 | +-- ... 1098 +-- sent 1099 +-- ... 1101 Figure 6: Peer state 1103 6.3. Bindings state 1105 Binding state provides information on LDP FEC-label bindings as well 1106 as address binding for both inbound (received) as well as outbound 1107 (advertised) direction. FEC-label bindings are presented as a FEC- 1108 centric view, and address bindings are presented as an address- 1109 centric view: 1111 FEC-Label bindings: 1112 FEC 203.0.113.1/32: 1113 advertised: local-label 16000 1114 peer 192.0.2.1:0 1115 peer 192.0.2.2:0 1116 peer 192.0.2.3:0 1117 received: 1118 peer 192.0.2.1:0, label 16002, used-in-forwarding=Yes 1119 peer 192.0.2.2:0, label 17002, used-in-forwarding=No 1120 FEC 203.0.113.2/32: 1121 . . . . 1122 FEC 198.51.100.0/24: 1123 . . . . 1124 FEC 2001:db8:0:2:: 1125 . . . . 1126 FEC 2001:db8:0:3:: 1127 . . . . 1129 Address bindings: 1130 Addr 192.0.2.10: 1131 advertised 1132 Addr 2001:db8:0:10:: 1133 advertised 1135 Addr 192.0.2.1: 1136 received, peer 192.0.2.1:0 1137 Addr 192.0.2.2: 1138 received, peer 192.0.2.2:0 1139 Addr 192.0.2.3: 1140 received, peer 192.0.2.3:0 1141 Addr 2001:db8:0:2:: 1142 received, peer 192.0.2.2:0 1143 Addr 2001:db8:0:3:: 1144 received, peer 192.0.2.3:0 1146 Figure 7: Example Bindings 1148 Note that all local addresses are advertised to all peers and hence 1149 no need to provide per-peer information for local address 1150 advertisement. Furthermore, note that it is easy to derive a peer- 1151 centric view for the bindings from the information already provided 1152 in this model. 1154 Following captures high level tree hierarchy for bindings state. The 1155 tree shown below is for ipv4 address-family only; a similar tree 1156 exists for ipv6 address-family as well. 1158 +--rw mpls-ldp! 1159 +--rw global 1160 +--rw address-families 1161 +--rw ipv4 1162 +--ro bindings 1163 +--ro address* [address] 1164 | +--ro address (ipv4-address or ipv6-address) 1165 | +--ro advertisement-type? advertised-received 1166 | +--ro peer? leafref 1167 +--ro fec-label* [fec] 1168 +--ro fec (ipv4-prefix or ipv6-prefix) 1169 +--ro peer* [peer advertisement-type] 1170 +--ro peer leafref 1171 +--ro advertisement-type? advertised-received 1172 +--ro label? mpls:mpls-label 1173 +--ro used-in-forwarding? boolean 1175 Figure 8: Bindings state 1177 6.4. Capabilities state 1179 LDP capabilities state comprise two types of information - global 1180 information (such as timer etc.), and per-peer information. 1182 Following captures high level tree hierarchy for LDP capabilities 1183 state. 1185 +--rw mpls-ldp! 1186 +--rw peers 1187 +--rw peer* [lsr-id label-space-id] 1188 +--rw lsr-id yang:dotted-quad 1189 +--rw label-space-id 1190 +--ro received-peer-state 1191 +--ro capability 1192 +--ro . . . . 1193 +--ro . . . . 1195 Figure 9: Capabilities state 1197 7. Notifications 1199 This model defines a list of notifications to inform client of 1200 important events detected during the protocol operation. These 1201 events include events related to changes in the operational state of 1202 an LDP peer, hello adjacency, and FEC etc. It is to be noted that an 1203 LDP FEC is treated as operational (up) as long as it has at least 1 1204 NHLFE with outgoing label. 1206 A simplified graphical representation of the data model for LDP 1207 notifications is shown in Figure 2. 1209 8. Action 1211 This model defines a list of rpcs that allow performing an action or 1212 executing a command on the protocol. For example, it allows to clear 1213 (reset) LDP peers, hello-adjacencies, and statistics. The model 1214 makes an effort to provide different level of control so that a user 1215 is able to either clear all, or clear all for a given type, or clear 1216 a specific entity. 1218 A simplified graphical representation of the data model for LDP 1219 actions is shown in Figure 2. 1221 9. YANG Specification 1223 Following sections specify the actual YANG (module) specification for 1224 LDP constructs defined earlier in the document. 1226 9.1. Base 1228 This YANG module imports types defined in [RFC6991], [RFC8349], 1229 [RFC8294], [RFC8343], and [RFC8344]. 1231 file "ietf-mpls-ldp@2020-02-25.yang" 1233 // RFC Editor: replace the above date 2020-02-25 with the date of 1234 // publication and remove this note. 1236 module ietf-mpls-ldp { 1237 yang-version 1.1; 1239 namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-ldp"; 1240 prefix "ldp"; 1242 import ietf-inet-types { 1243 prefix "inet"; 1244 reference "RFC 6991: Common YANG Data Types"; 1245 } 1247 import ietf-yang-types { 1248 prefix "yang"; 1249 reference "RFC 6991: Common YANG Data Types"; 1250 } 1252 import ietf-routing { 1253 prefix "rt"; 1254 reference 1255 "RFC 8349: A YANG Data Model for Routing Management (NMDA 1256 version)"; 1257 } 1259 import ietf-routing-types { 1260 prefix "rt-types"; 1261 reference 1262 "RFC 8294: Common YANG Data Types for the Routing Area"; 1263 } 1265 import ietf-interfaces { 1266 prefix "if"; 1267 reference "RFC 8343: A YANG Data Model for Interface Management"; 1268 } 1270 import ietf-ip { 1271 prefix "ip"; 1272 reference "RFC 7277: A YANG Data Model for IP Management"; 1273 } 1275 import ietf-key-chain { 1276 prefix "key-chain"; 1277 reference "RFC 8177: YANG Data Model for Key Chains"; 1278 } 1280 organization 1281 "IETF MPLS Working Group"; 1282 contact 1283 "WG Web: 1284 WG List: 1286 Editor: Kamran Raza 1287 1289 Editor: Rajiv Asati 1290 1292 Editor: Xufeng Liu 1293 1295 Editor: Santosh Esale 1296 1298 Editor: Xia Chen 1299 1301 Editor: Himanshu Shah 1302 "; 1304 description 1305 "This YANG module defines the essential components for the 1306 management of Multi-Protocol Label Switching (MPLS) Label 1307 Distribution Protocol (LDP). It is also the base model to 1308 be augmented for Multipoint LDP (mLDP). 1310 Copyright (c) 2020 IETF Trust and the persons identified as 1311 authors of the code. All rights reserved. 1313 Redistribution and use in source and binary forms, with or 1314 without modification, is permitted pursuant to, and subject to 1315 the license terms contained in, the Simplified BSD License set 1316 forth in Section 4.c of the IETF Trust's Legal Provisions 1317 Relating to IETF Documents 1318 (http://trustee.ietf.org/license-info). 1320 This version of this YANG module is part of RFC XXXX; see the 1321 RFC itself for full legal notices."; 1323 // RFC Editor: replace XXXX with actual RFC number and remove 1324 // this note 1326 revision 2020-02-25 { 1327 description 1328 "Initial revision."; 1329 reference 1330 "RFC XXXX: YANG Data Model for MPLS LDP."; 1331 // RFC Editor: replace XXXX with actual RFC number and remove 1332 // this note 1333 } 1335 /* 1336 * Typedefs 1337 */ 1338 typedef advertised-received { 1339 type enumeration { 1340 enum advertised { 1341 description "Advertised information."; 1342 } 1343 enum received { 1344 description "Received information."; 1345 } 1346 } 1347 description 1348 "Received or advertised."; 1349 } 1351 typedef downstream-upstream { 1352 type enumeration { 1353 enum downstream { 1354 description "Downstream information."; 1355 } 1356 enum upstream { 1357 description "Upstream information."; 1358 } 1359 } 1360 description 1361 "Downstream or upstream."; 1362 } 1364 typedef label-adv-mode { 1365 type enumeration { 1366 enum downstream-unsolicited { 1367 description "Downstream Unsolicited."; 1368 } 1369 enum downstream-on-demand { 1370 description "Downstream on Demand."; 1371 } 1372 } 1373 description 1374 "Label Advertisement Mode."; 1375 } 1377 typedef oper-status-event-type { 1378 type enumeration { 1379 enum up { 1380 value 1; 1381 description 1382 "Operational status changed to up."; 1383 } 1384 enum down { 1385 value 2; 1386 description 1387 "Operational status changed to down."; 1389 } 1390 } 1391 description "Operational status event type for notifications."; 1392 } 1394 /* 1395 * Identities 1396 */ 1397 identity mpls-ldp { 1398 base rt:control-plane-protocol; 1399 description 1400 "LDP protocol."; 1401 reference 1402 "RFC 5036: LDP Specification"; 1403 } 1405 identity adjacency-flag-base { 1406 description "Base type for adjacency flags."; 1407 } 1409 identity adjacency-flag-active { 1410 base adjacency-flag-base; 1411 description 1412 "This adjacency is configured and actively created."; 1413 } 1415 identity adjacency-flag-passive { 1416 base adjacency-flag-base; 1417 description 1418 "This adjacency is not configured and passively accepted."; 1419 } 1421 /* 1422 * Groupings 1423 */ 1425 grouping adjacency-state-attributes { 1426 description 1427 "The operational state attributes of an LDP Hello adjacency, 1428 which can used for basic and extended discoveris, in IPv4 and 1429 IPv6 address families."; 1431 leaf-list flag { 1432 type identityref { 1433 base adjacency-flag-base; 1434 } 1435 description 1436 "On or more flags to indicate whether the adjacency is 1437 actively created, passively accepted, or both."; 1438 } 1439 container hello-holdtime { 1440 description 1441 "Containing Hello holdtime state information."; 1442 leaf adjacent { 1443 type uint16; 1444 units seconds; 1445 description 1446 "The holdtime value learned from the adjacent LSR."; 1447 } 1448 leaf negotiated { 1449 type uint16; 1450 units seconds; 1451 description 1452 "The holdtime negotiated between this LSR and the adjacent 1453 LSR."; 1454 } 1455 leaf remaining { 1456 type uint16; 1457 units seconds; 1458 description 1459 "The time remaining until the holdtime timer expires."; 1460 } 1461 } 1463 leaf next-hello { 1464 type uint16; 1465 units seconds; 1466 description 1467 "The time when the next Hello message will be sent."; 1468 } 1470 container statistics { 1471 description 1472 "Statistics objects."; 1474 leaf discontinuity-time { 1475 type yang:date-and-time; 1476 mandatory true; 1477 description 1478 "The time on the most recent occasion at which any one or 1479 more of this interface's counters suffered a 1480 discontinuity. If no such discontinuities have occurred 1481 since the last re-initialization of the local management 1482 subsystem, then this node contains the time the local 1483 management subsystem re-initialized itself."; 1484 } 1485 leaf hello-received { 1486 type yang:counter64; 1487 description 1488 "The number of Hello messages received."; 1489 } 1490 leaf hello-dropped { 1491 type yang:counter64; 1492 description 1493 "The number of Hello messages dropped."; 1494 } 1495 } // statistics 1496 } // adjacency-state-attributes 1498 grouping basic-discovery-timers { 1499 description 1500 "The timer attributes for basic discovery, used in the 1501 per-interface setting and in the all-interface setting."; 1503 leaf hello-holdtime { 1504 type uint16 { 1505 range 15..3600; 1506 } 1507 units seconds; 1508 description 1509 "The time interval for which a LDP link Hello adjacency 1510 is maintained in the absence of link Hello messages from 1511 the LDP neighbor. 1512 This leaf may be configured at the per-interface level or 1513 the global level, with precedence given to the value at the 1514 per-interface level. If the leaf is not configured at 1515 either level, the default value at the global level is 1516 used."; 1517 } 1518 leaf hello-interval { 1519 type uint16 { 1520 range 5..1200; 1521 } 1522 units seconds; 1523 description 1524 "The interval between consecutive LDP link Hello messages 1525 used in basic LDP discovery. 1526 This leaf may be configured at the per-interface level or 1527 the global level, with precedence given to the value at the 1528 per-interface level. If the leaf is not configured at 1529 either level, the default value at the global level is 1530 used."; 1531 } 1532 } // basic-discovery-timers 1533 grouping binding-address-state-attributes { 1534 description 1535 "Operational state attributes of an address binding, used in 1536 IPv4 and IPv6 address families."; 1538 leaf advertisement-type { 1539 type advertised-received; 1540 description 1541 "Received or advertised."; 1542 } 1543 container peer { 1544 when "../advertisement-type = 'received'" { 1545 description 1546 "Applicable for received address."; 1547 } 1548 description 1549 "LDP peer from which this address is received."; 1550 uses ldp-peer-ref-from-binding; 1551 } 1552 } // binding-address-state-attributes 1554 grouping binding-label-state-attributes { 1555 description 1556 "Operational state attributes for a FEC-label binding, used in 1557 IPv4 and IPv6 address families."; 1559 list peer { 1560 key "lsr-id label-space-id advertisement-type"; 1561 description 1562 "List of advertised and received peers."; 1563 uses ldp-peer-ref-from-binding { 1564 description 1565 "The LDP peer from which this binding is received, or to 1566 which this binding is advertised. 1567 The peer is identified by its LDP ID, which consists of 1568 the LSR ID and the Label Space ID."; 1569 } 1570 leaf advertisement-type { 1571 type advertised-received; 1572 description 1573 "Received or advertised."; 1574 } 1575 leaf label { 1576 type rt-types:mpls-label; 1577 description 1578 "Advertised (outbound) or received (inbound) 1579 label."; 1580 } 1581 leaf used-in-forwarding { 1582 type boolean; 1583 description 1584 "'true' if the label is used in forwarding."; 1585 } 1586 } // peer 1587 } // binding-label-state-attributes 1589 grouping graceful-restart-attributes-per-peer { 1590 description 1591 "Per peer graceful restart attributes. 1592 On the local side, these attributes are configuration and 1593 operational state data. One the peer side, these attributes 1594 are operational state data received from the peer."; 1596 container graceful-restart { 1597 description 1598 "Attributes for graceful restart."; 1599 leaf enabled { 1600 type boolean; 1601 description 1602 "Enable or disable graceful restart. 1603 This leaf may be configured at the per-peer level or the 1604 global level, with precedence given to the value at the 1605 per-peer level. If the leaf is not configured at either 1606 level, the default value at the global level is used."; 1607 } 1608 leaf reconnect-time { 1609 type uint16 { 1610 range 10..1800; 1611 } 1612 units seconds; 1613 description 1614 "Specifies the time interval that the remote LDP peer 1615 must wait for the local LDP peer to reconnect after the 1616 remote peer detects the LDP communication failure. 1617 This leaf may be configured at the per-peer level or the 1618 global level, with precedence given to the value at the 1619 per-peer level. If the leaf is not configured at either 1620 level, the default value at the global level is used."; 1621 } 1622 leaf recovery-time { 1623 type uint16 { 1624 range 30..3600; 1625 } 1626 units seconds; 1627 description 1628 "Specifies the time interval, in seconds, that the remote 1629 LDP peer preserves its MPLS forwarding state after 1630 receiving the Initialization message from the restarted 1631 local LDP peer. 1632 This leaf may be configured at the per-peer level or the 1633 global level, with precedence given to the value at the 1634 per-peer level. If the leaf is not configured at either 1635 level, the default value at the global level is used."; 1636 } 1637 } // graceful-restart 1638 } // graceful-restart-attributes-per-peer 1640 grouping ldp-interface-ref { 1641 description 1642 "Defining a reference to LDP interface."; 1644 leaf name { 1645 type if:interface-ref; 1646 must "(/if:interfaces/if:interface[if:name=current()]/ip:ipv4)" 1647 + " or " 1648 + "(/if:interfaces/if:interface[if:name=current()]/ip:ipv6)" 1649 { 1650 description "Interface is IPv4 or IPv6."; 1651 } 1652 description 1653 "The name of an LDP interface."; 1654 } 1655 } 1657 grouping ldp-peer-ref-absolute { 1658 description 1659 "An absolute reference to an LDP peer, by the LDP ID, which 1660 consists of the LSR ID and the Label Space ID."; 1662 leaf protocol-name { 1663 type leafref { 1664 path "/rt:routing/rt:control-plane-protocols/" 1665 + "rt:control-plane-protocol/rt:name"; 1666 } 1667 description 1668 "The name of the LDP protocol instance."; 1669 } 1670 leaf lsr-id { 1671 type leafref { 1672 path "/rt:routing/rt:control-plane-protocols/" 1673 + "rt:control-plane-protocol" 1674 + "[rt:name=current()/../protocol-name]/" 1675 + "ldp:mpls-ldp/ldp:peers/ldp:peer/ldp:lsr-id"; 1676 } 1677 description 1678 "The LSR ID of the peer, as a portion of the peer LDP ID."; 1679 } 1680 leaf label-space-id { 1681 type leafref { 1682 path "/rt:routing/rt:control-plane-protocols/" 1683 + "rt:control-plane-protocol" 1684 + "[rt:name=current()/../protocol-name]/" 1685 + "ldp:mpls-ldp/ldp:peers/" 1686 + "ldp:peer[ldp:lsr-id=current()/../lsr-id]/" 1687 + "ldp:label-space-id"; 1688 } 1689 description 1690 "The Label Space ID of the peer, as a portion of the peer 1691 LDP ID."; 1692 } 1693 } // ldp-peer-ref-absolute 1695 grouping ldp-peer-ref-from-binding { 1696 description 1697 "A relative reference to an LDP peer, by the LDP ID, which 1698 consists of the LSR ID and the Label Space ID."; 1700 leaf lsr-id { 1701 type leafref { 1702 path "../../../../../../../ldp:peers/ldp:peer/ldp:lsr-id"; 1703 } 1704 description 1705 "The LSR ID of the peer, as a portion of the peer LDP ID."; 1706 } 1707 leaf label-space-id { 1708 type leafref { 1709 path "../../../../../../../ldp:peers/" 1710 + "ldp:peer[ldp:lsr-id=current()/../lsr-id]/" 1711 + "ldp:label-space-id"; 1712 } 1713 description 1714 "The Label Space ID of the peer, as a portion of the peer 1715 LDP ID."; 1716 } 1717 } // ldp-peer-ref-from-binding 1719 grouping ldp-peer-ref-from-interface { 1720 description 1721 "A relative reference to an LDP peer, by the LDP ID, which 1722 consists of the LSR ID and the Label Space ID."; 1724 container peer { 1725 description 1726 "Reference to an LDP peer, by the LDP ID, which consists of 1727 the LSR ID and the Label Space ID."; 1728 leaf lsr-id { 1729 type leafref { 1730 path "../../../../../../../../../ldp:peers/ldp:peer/" 1731 + "ldp:lsr-id"; 1732 } 1733 description 1734 "The LSR ID of the peer, as a portion of the peer LDP ID."; 1735 } 1736 leaf label-space-id { 1737 type leafref { 1738 path "../../../../../../../../../ldp:peers/" 1739 + "ldp:peer[ldp:lsr-id=current()/../lsr-id]/" 1740 + "ldp:label-space-id"; 1741 } 1742 description 1743 "The Label Space ID of the peer, as a portion of the peer 1744 LDP ID."; 1745 } 1746 } // peer 1747 } // ldp-peer-ref-from-interface 1749 grouping ldp-peer-ref-from-target { 1750 description 1751 "A relative reference to an LDP peer, by the LDP ID, which 1752 consists of the LSR ID and the Label Space ID."; 1754 container peer { 1755 description 1756 "Reference to an LDP peer, by the LDP ID, which consists of 1757 the LSR ID and the Label Space ID."; 1758 leaf lsr-id { 1759 type leafref { 1760 path "../../../../../../../../ldp:peers/ldp:peer/" 1761 + "ldp:lsr-id"; 1762 } 1763 description 1764 "The LSR ID of the peer, as a portion of the peer LDP ID."; 1765 } 1766 leaf label-space-id { 1767 type leafref { 1768 path "../../../../../../../../ldp:peers/" 1769 + "ldp:peer[ldp:lsr-id=current()/../lsr-id]/" 1770 + "ldp:label-space-id"; 1771 } 1772 description 1773 "The Label Space ID of the peer, as a portion of the peer 1774 LDP ID."; 1775 } 1776 } // peer 1777 } // ldp-peer-ref-from-target 1779 grouping peer-attributes { 1780 description 1781 "Peer configuration attributes, used in the per-peer setting 1782 can in the all-peer setting."; 1784 leaf session-ka-holdtime { 1785 type uint16 { 1786 range 45..3600; 1787 } 1788 units seconds; 1789 description 1790 "The time interval after which an inactive LDP session 1791 terminates and the corresponding TCP session closes. 1792 Inactivity is defined as not receiving LDP packets from the 1793 peer. 1794 This leaf may be configured at the per-peer level or the 1795 global level, with precedence given to the value at the 1796 per-peer level. If the leaf is not configured at either 1797 level, the default value at the global level is used."; 1798 } 1799 leaf session-ka-interval { 1800 type uint16 { 1801 range 15..1200; 1802 } 1803 units seconds; 1804 description 1805 "The interval between successive transmissions of keepalive 1806 packets. Keepalive packets are only sent in the absence of 1807 other LDP packets transmitted over the LDP session. 1808 This leaf may be configured at the per-peer level or the 1809 global level, with precedence given to the value at the 1810 per-peer level. If the leaf is not configured at either 1811 level, the default value at the global level is used."; 1812 } 1813 } // peer-attributes 1815 grouping peer-authentication { 1816 description 1817 "Peer authentication container, used in the per-peer setting 1818 can in the all-peer setting."; 1820 container authentication { 1821 description 1822 "Containing authentication information."; 1823 choice authentication-type { 1824 description 1825 "Choice of authentication."; 1826 case password { 1827 leaf key { 1828 type string; 1829 description 1830 "This leaf specifies the authentication key. The length 1831 of the key may be dependent on the cryptographic 1832 algorithm."; 1833 } 1834 leaf crypto-algorithm { 1835 type identityref { 1836 base key-chain:crypto-algorithm; 1837 } 1838 description 1839 "Cryptographic algorithm associated with key."; 1840 } 1841 } 1842 } 1843 } 1844 } // peer-authentication 1846 grouping peer-state-derived { 1847 description 1848 "The peer state information derived from the LDP protocol 1849 operations."; 1851 container label-advertisement-mode { 1852 config false; 1853 description "Label advertisement mode state."; 1854 leaf local { 1855 type label-adv-mode; 1856 description 1857 "Local Label Advertisement Mode."; 1858 } 1859 leaf peer { 1860 type label-adv-mode; 1861 description 1862 "Peer Label Advertisement Mode."; 1863 } 1864 leaf negotiated { 1865 type label-adv-mode; 1866 description 1867 "Negotiated Label Advertisement Mode."; 1868 } 1870 } 1871 leaf next-keep-alive { 1872 type uint16; 1873 units seconds; 1874 config false; 1875 description 1876 "Time duration from now until sending the next KeepAlive 1877 message."; 1878 } 1880 container received-peer-state { 1881 config false; 1882 description 1883 "Operational state information learned from the peer."; 1885 uses graceful-restart-attributes-per-peer; 1887 container capability { 1888 description "Peer capability information."; 1889 container end-of-lib { 1890 description 1891 "Peer's end-of-lib capability."; 1892 leaf enabled { 1893 type boolean; 1894 description 1895 "'true' if peer's end-of-lib capability is enabled."; 1896 } 1897 } 1898 container typed-wildcard-fec { 1899 description 1900 "Peer's typed-wildcard-fec capability."; 1901 leaf enabled { 1902 type boolean; 1903 description 1904 "'true' if peer's typed-wildcard-fec capability is 1905 enabled."; 1906 } 1907 } 1908 container upstream-label-assignment { 1909 description 1910 "Peer's upstream label assignment capability."; 1911 leaf enabled { 1912 type boolean; 1913 description 1914 "'true' if peer's upstream label assignment is 1915 enabled."; 1916 } 1917 } 1919 } // capability 1920 } // received-peer-state 1922 container session-holdtime { 1923 config false; 1924 description "Session holdtime state."; 1925 leaf peer { 1926 type uint16; 1927 units seconds; 1928 description "Peer holdtime."; 1929 } 1930 leaf negotiated { 1931 type uint16; 1932 units seconds; 1933 description "Negotiated holdtime."; 1934 } 1935 leaf remaining { 1936 type uint16; 1937 units seconds; 1938 description "Remaining holdtime."; 1939 } 1940 } // session-holdtime 1942 leaf session-state { 1943 type enumeration { 1944 enum non-existent { 1945 description "NON EXISTENT state. Transport disconnected."; 1946 } 1947 enum initialized { 1948 description "INITIALIZED state."; 1949 } 1950 enum openrec { 1951 description "OPENREC state."; 1952 } 1953 enum opensent { 1954 description "OPENSENT state."; 1955 } 1956 enum operational { 1957 description "OPERATIONAL state."; 1958 } 1959 } 1960 config false; 1961 description 1962 "Representing the operational status of the LDP session."; 1963 reference 1964 "RFC5036, Sec. 2.5.4."; 1965 } 1966 container tcp-connection { 1967 config false; 1968 description "TCP connection state."; 1969 leaf local-address { 1970 type inet:ip-address; 1971 description "Local address."; 1972 } 1973 leaf local-port { 1974 type inet:port-number; 1975 description "Local port number."; 1976 } 1977 leaf remote-address { 1978 type inet:ip-address; 1979 description "Remote address."; 1980 } 1981 leaf remote-port { 1982 type inet:port-number; 1983 description "Remote port number."; 1984 } 1985 } // tcp-connection 1987 leaf up-time { 1988 type rt-types:timeticks64; 1989 config false; 1990 description 1991 "The number of time ticks (hundredths of a second) since the 1992 the state of the session with the peer changed to 1993 OPERATIONAL."; 1994 } 1996 container statistics { 1997 config false; 1998 description 1999 "Statistics objects."; 2001 leaf discontinuity-time { 2002 type yang:date-and-time; 2003 mandatory true; 2004 description 2005 "The time on the most recent occasion at which any one or 2006 more of this interface's counters suffered a 2007 discontinuity. If no such discontinuities have occurred 2008 since the last re-initialization of the local management 2009 subsystem, then this node contains the time the local 2010 management subsystem re-initialized itself."; 2011 } 2013 container received { 2014 description "Inbound statistics."; 2015 uses statistics-peer-received-sent; 2016 } 2017 container sent { 2018 description "Outbound statistics."; 2019 uses statistics-peer-received-sent; 2020 } 2022 leaf total-addresses { 2023 type uint32; 2024 description 2025 "The number of learned addresses."; 2026 } 2027 leaf total-labels { 2028 type uint32; 2029 description 2030 "The number of learned labels."; 2031 } 2032 leaf total-fec-label-bindings { 2033 type uint32; 2034 description 2035 "The number of learned label-address bindings."; 2036 } 2037 } // statistics 2038 } // peer-state-derived 2040 grouping statistics-peer-received-sent { 2041 description 2042 "Inbound and outbound statistic counters."; 2043 leaf total-octets { 2044 type yang:counter64; 2045 description 2046 "The total number of octets sent or received."; 2047 } 2048 leaf total-messages { 2049 type yang:counter64; 2050 description 2051 "The number of messages sent or received."; 2052 } 2053 leaf address { 2054 type yang:counter64; 2055 description 2056 "The number of address messages sent or received."; 2057 } 2058 leaf address-withdraw { 2059 type yang:counter64; 2060 description 2061 "The number of address-withdraw messages sent or received."; 2063 } 2064 leaf initialization { 2065 type yang:counter64; 2066 description 2067 "The number of initialization messages sent or received."; 2068 } 2069 leaf keepalive { 2070 type yang:counter64; 2071 description 2072 "The number of keepalive messages sent or received."; 2073 } 2074 leaf label-abort-request { 2075 type yang:counter64; 2076 description 2077 "The number of label-abort-request messages sent or 2078 received."; 2079 } 2080 leaf label-mapping { 2081 type yang:counter64; 2082 description 2083 "The number of label-mapping messages sent or received."; 2084 } 2085 leaf label-release { 2086 type yang:counter64; 2087 description 2088 "The number of label-release messages sent or received."; 2089 } 2090 leaf label-request { 2091 type yang:counter64; 2092 description 2093 "The number of label-request messages sent or received."; 2094 } 2095 leaf label-withdraw { 2096 type yang:counter64; 2097 description 2098 "The number of label-withdraw messages sent or received."; 2099 } 2100 leaf notification { 2101 type yang:counter64; 2102 description 2103 "The number of notification messages sent or received."; 2104 } 2105 } // statistics-peer-received-sent 2107 /* 2108 * Configuration data and operational state data nodes 2109 */ 2111 augment "/rt:routing/rt:control-plane-protocols/" 2112 + "rt:control-plane-protocol" { 2113 when "derived-from-or-self(rt:type, 'ldp:mpls-ldp')" { 2114 description 2115 "This augmentation is only valid for a control-plane 2116 protocol instance of LDP (type 'mpls-ldp')."; 2117 } 2118 description 2119 "LDP augmentation to routing control-plane protocol 2120 configuration and state."; 2122 container mpls-ldp { 2123 must "not (../../rt:control-plane-protocol" 2124 + "[derived-from-or-self(rt:type, 'ldp:mpls-ldp')]" 2125 + "[rt:name!=current()/../rt:name])" 2126 { 2127 description "Only one LDP instance is allowed."; 2128 } 2130 description 2131 "Containing configuration and operational data for the LDP 2132 protocol."; 2134 container global { 2135 description 2136 "Global attributes for LDP."; 2138 container capability { 2139 description 2140 "Containing the LDP capability data. The container is 2141 used for augmentations."; 2142 reference 2143 "RFC5036: Sec. 1.5."; 2144 } 2146 container graceful-restart { 2147 description 2148 "Attributes for graceful restart."; 2149 leaf enabled { 2150 type boolean; 2151 default false; 2152 description 2153 "Enable or disable graceful restart."; 2154 } 2155 leaf reconnect-time { 2156 type uint16 { 2157 range 10..1800; 2158 } 2159 units seconds; 2160 default 120; 2161 description 2162 "Specifies the time interval that the remote LDP peer 2163 must wait for the local LDP peer to reconnect after 2164 the remote peer detects the LDP communication 2165 failure."; 2166 } 2167 leaf recovery-time { 2168 type uint16 { 2169 range 30..3600; 2170 } 2171 units seconds; 2172 default 120; 2173 description 2174 "Specifies the time interval, in seconds, that the 2175 remote LDP peer preserves its MPLS forwarding state 2176 after receiving the Initialization message from the 2177 restarted local LDP peer."; 2178 } 2179 leaf forwarding-holdtime { 2180 type uint16 { 2181 range 30..3600; 2182 } 2183 units seconds; 2184 default 180; 2185 description 2186 "Specifies the time interval, in seconds, before the 2187 termination of the recovery phase."; 2188 } 2189 } // graceful-restart 2191 leaf lsr-id { 2192 type rt-types:router-id; 2193 description 2194 "Specify the value to act as the LDP LSR ID. 2195 If this attribute is not specified, LDP uses the router 2196 ID as determined by the system."; 2197 } 2199 container address-families { 2200 description 2201 "Per address family confgiration and operational state. 2202 The address family can be either IPv4 or IPv6."; 2203 container ipv4 { 2204 presence 2205 "Present if IPv4 is enabled, unless the 'enable' 2206 leaf is set to 'false'"; 2208 description 2209 "Containing data related to the IPv4 address family."; 2211 leaf enabled { 2212 type boolean; 2213 default true; 2214 description 2215 "'true' to enable the address family."; 2216 } 2218 leaf label-distribution-control-mode { 2219 type enumeration { 2220 enum independent { 2221 description 2222 "Independent label distribution control."; 2223 } 2224 enum ordered { 2225 description 2226 "Ordered label distribution control."; 2227 } 2228 } 2229 config false; 2230 description 2231 "Label distribution control mode."; 2232 reference 2233 "RFC5036: LDP Specification. Sec 2.6."; 2234 } 2236 // ipv4 bindings 2237 container bindings { 2238 config false; 2239 description 2240 "LDP address and label binding information."; 2241 list address { 2242 key "address"; 2243 description 2244 "List of address bindings learned by LDP."; 2245 leaf address { 2246 type inet:ipv4-address; 2247 description 2248 "The IPv4 address learned from an Address 2249 message received from or advertised to a peer."; 2250 } 2251 uses binding-address-state-attributes; 2252 } 2254 list fec-label { 2255 key "fec"; 2256 description 2257 "List of FEC-label bindings learned by LDP."; 2258 leaf fec { 2259 type inet:ipv4-prefix; 2260 description 2261 "The prefix FEC value in the FEC-label binding, 2262 learned in a Label Mapping message received from 2263 or advertised to a peer."; 2264 } 2265 uses binding-label-state-attributes; 2266 } 2267 } // bindings 2268 } // ipv4 2269 } // address-families 2270 } // global 2272 container discovery { 2273 description 2274 "Neighbor discovery configuration and operational state."; 2276 container interfaces { 2277 description 2278 "A list of interfaces for LDP Basic Discovery."; 2279 reference 2280 "RFC5036: LDP Specification. Sec 2.4.1."; 2282 uses basic-discovery-timers { 2283 refine "hello-holdtime" { 2284 default 15; 2285 } 2286 refine "hello-interval" { 2287 default 5; 2288 } 2289 } 2291 list interface { 2292 key "name"; 2293 description 2294 "List of LDP interfaces used for LDP Basic Discovery."; 2295 uses ldp-interface-ref; 2296 leaf next-hello { 2297 type uint16; 2298 units seconds; 2299 config false; 2300 description "Time to send the next Hello message."; 2301 } 2303 container address-families { 2304 description 2305 "Container for address families."; 2306 container ipv4 { 2307 presence 2308 "Present if IPv4 is enabled, unless the 'enable' 2309 leaf is set to 'false'"; 2310 description 2311 "IPv4 address family."; 2313 leaf enabled { 2314 type boolean; 2315 default true; 2316 description 2317 "Enable the address family on the interface."; 2318 } 2320 container hello-adjacencies { 2321 config false; 2322 description 2323 "Containing a list of Hello adjacencies."; 2325 list hello-adjacency { 2326 key "adjacent-address"; 2327 config false; 2328 description "List of Hello adjacencies."; 2330 leaf adjacent-address { 2331 type inet:ipv4-address; 2332 description 2333 "Neighbor address of the Hello adjacency."; 2334 } 2336 uses adjacency-state-attributes; 2337 uses ldp-peer-ref-from-interface; 2338 } 2339 } 2340 } // ipv4 2341 } // address-families 2342 } // interface 2343 } // interfaces 2345 container targeted 2346 { 2347 description 2348 "A list of targeted neighbors for extended discovery."; 2350 leaf hello-holdtime { 2351 type uint16 { 2352 range 15..3600; 2353 } 2354 units seconds; 2355 default 45; 2356 description 2357 "The time interval for which LDP targeted Hello 2358 adjacency is maintained in the absence of targeted 2359 Hello messages from an LDP neighbor."; 2360 } 2361 leaf hello-interval { 2362 type uint16 { 2363 range 5..3600; 2364 } 2365 units seconds; 2366 default 15; 2367 description 2368 "The interval between consecutive LDP targeted Hello 2369 messages used in extended LDP discovery."; 2370 } 2372 container hello-accept { 2373 description 2374 "LDP policy to control the acceptance of extended 2375 neighbor discovery Hello messages."; 2377 leaf enabled { 2378 type boolean; 2379 default false; 2380 description 2381 "'true' to accept; 'false' to deny."; 2382 } 2383 } 2385 container address-families { 2386 description 2387 "Container for address families."; 2388 container ipv4 { 2389 presence 2390 "Present if IPv4 is enabled."; 2391 description 2392 "IPv4 address family."; 2394 container hello-adjacencies { 2395 config false; 2396 description 2397 "Containing a list of Hello adjacencies."; 2399 list hello-adjacency { 2400 key "local-address adjacent-address"; 2401 description "List of Hello adjacencies."; 2403 leaf local-address { 2404 type inet:ipv4-address; 2405 description 2406 "Local address of the Hello adjacency."; 2407 } 2408 leaf adjacent-address { 2409 type inet:ipv4-address; 2410 description 2411 "Neighbor address of the Hello adjacency."; 2412 } 2414 uses adjacency-state-attributes; 2415 uses ldp-peer-ref-from-target; 2416 } 2417 } 2419 list target { 2420 key "adjacent-address"; 2421 description 2422 "Targeted discovery params."; 2424 leaf adjacent-address { 2425 type inet:ipv4-address; 2426 description 2427 "Configures a remote LDP neighbor for the 2428 extended LDP discovery."; 2429 } 2431 leaf enabled { 2432 type boolean; 2433 default true; 2434 description 2435 "'true' to enable the target."; 2436 } 2437 leaf local-address { 2438 type inet:ipv4-address; 2439 description 2440 "The local address used as the source address to 2441 send targeted Hello messages. 2442 If the value is not specified, the 2443 transport-address is used as the source 2444 address."; 2445 } 2446 } // target 2447 } // ipv4 2449 } // address-families 2450 } // targeted 2451 } // discovery 2453 container peers { 2454 description 2455 "Peers configuration attributes."; 2457 uses peer-authentication; 2458 uses peer-attributes { 2459 refine session-ka-holdtime { 2460 default 180; 2461 } 2462 refine session-ka-interval { 2463 default 60; 2464 } 2465 } 2467 list peer { 2468 key "lsr-id label-space-id"; 2469 description 2470 "List of peers."; 2472 leaf lsr-id { 2473 type rt-types:router-id; 2474 description 2475 "The LSR ID of the peer, to identify the globally 2476 unique LSR. This is the first four octets of the LDP 2477 ID. This leaf is used together with the leaf 2478 'label-space-id' to form the LDP ID."; 2479 reference 2480 "RFC5036. Sec 2.2.2."; 2481 } 2482 leaf label-space-id { 2483 type uint16; 2484 description 2485 "The Label Space ID of the peer, to identify a specific 2486 label space within the LSR. This is the last two 2487 octets of the LDP ID. This leaf is used together with 2488 the leaf 'lsr-id' to form the LDP ID."; 2489 reference 2490 "RFC5036. Sec 2.2.2."; 2491 } 2493 uses peer-authentication; 2495 container address-families { 2496 description 2497 "Per-vrf per-af params."; 2498 container ipv4 { 2499 presence 2500 "Present if IPv4 is enabled."; 2501 description 2502 "IPv4 address family."; 2504 container hello-adjacencies { 2505 config false; 2506 description 2507 "Containing a list of Hello adjacencies."; 2509 list hello-adjacency { 2510 key "local-address adjacent-address"; 2511 description "List of Hello adjacencies."; 2513 leaf local-address { 2514 type inet:ipv4-address; 2515 description 2516 "Local address of the Hello adjacency."; 2517 } 2518 leaf adjacent-address { 2519 type inet:ipv4-address; 2520 description 2521 "Neighbor address of the Hello adjacency."; 2522 } 2524 uses adjacency-state-attributes; 2526 leaf interface { 2527 type if:interface-ref; 2528 description "Interface for this adjacency."; 2529 } 2530 } 2531 } 2532 } // ipv4 2533 } // address-families 2535 uses peer-state-derived; 2536 } // list peer 2537 } // peers 2538 } // container mpls-ldp 2539 } 2541 /* 2542 * RPCs 2543 */ 2544 rpc mpls-ldp-clear-peer { 2545 description 2546 "Clears the session to the peer."; 2547 input { 2548 uses ldp-peer-ref-absolute { 2549 description 2550 "The LDP peer to be cleared. If this is not provided 2551 then all peers are cleared. 2552 The peer is identified by its LDP ID, which consists of 2553 the LSR ID and the Label Space ID."; 2554 } 2555 } 2556 } 2558 rpc mpls-ldp-clear-hello-adjacency { 2559 description 2560 "Clears the hello adjacency"; 2561 input { 2562 container hello-adjacency { 2563 description 2564 "Link adjacency or targettted adjacency. If this is not 2565 provided then all Hello adjacencies are cleared"; 2566 leaf protocol-name { 2567 type leafref { 2568 path "/rt:routing/rt:control-plane-protocols/" 2569 + "rt:control-plane-protocol/rt:name"; 2570 } 2571 description 2572 "The name of the LDP protocol instance."; 2573 } 2574 choice hello-adjacency-type { 2575 description "Adjacency type."; 2576 case targeted { 2577 container targeted { 2578 presence "Present to clear targeted adjacencies."; 2579 description 2580 "Clear targeted adjacencies."; 2581 leaf target-address { 2582 type inet:ip-address; 2583 description 2584 "The target address. If this is not provided then 2585 all targeted adjacencies are cleared"; 2586 } 2587 } 2588 } 2589 case link { 2590 container link { 2591 presence "Present to clear link adjacencies."; 2592 description 2593 "Clear link adjacencies."; 2594 leaf next-hop-interface { 2595 type leafref { 2596 path "/rt:routing/rt:control-plane-protocols/" 2597 + "rt:control-plane-protocol/mpls-ldp/discovery/" 2598 + "interfaces/interface/name"; 2599 } 2600 description 2601 "Interface connecting to next-hop. If this is not 2602 provided then all link adjacencies are cleared."; 2603 } 2604 leaf next-hop-address { 2605 type inet:ip-address; 2606 must "../next-hop-interface" { 2607 description 2608 "Applicable when interface is specified."; 2609 } 2610 description 2611 "IP address of next-hop. If this is not provided 2612 then adjacencies to all next-hops on the given 2613 interface are cleared."; 2614 } 2615 } 2616 } 2617 } // hello-adjacency-type 2618 } // hello-adjacency 2619 } // input 2620 } // mpls-ldp-clear-hello-adjacency 2622 rpc mpls-ldp-clear-peer-statistics { 2623 description 2624 "Clears protocol statistics (e.g. sent and received 2625 counters)."; 2626 input { 2627 uses ldp-peer-ref-absolute { 2628 description 2629 "The LDP peer whose statistics are to be cleared. 2630 If this is not provided then all peers' statistics are 2631 cleared. 2632 The peer is identified by its LDP ID, which consists of 2633 the LSR ID and the Label Space ID."; 2634 } 2635 } 2636 } 2638 /* 2639 * Notifications 2640 */ 2642 notification mpls-ldp-peer-event { 2644 description 2645 "Notification event for a change of LDP peer operational 2646 status."; 2647 leaf event-type { 2648 type oper-status-event-type; 2649 description "Event type."; 2650 } 2651 container peer { 2652 description 2653 "Reference to an LDP peer, by the LDP ID, which consists of 2654 the LSR ID and the Label Space ID."; 2655 uses ldp-peer-ref-absolute; 2656 } 2657 } 2659 notification mpls-ldp-hello-adjacency-event { 2660 description 2661 "Notification event for a change of LDP adjacency operational 2662 status."; 2663 leaf event-type { 2664 type oper-status-event-type; 2665 description "Event type."; 2666 } 2667 leaf protocol-name { 2668 type leafref { 2669 path "/rt:routing/rt:control-plane-protocols/" 2670 + "rt:control-plane-protocol/rt:name"; 2671 } 2672 description 2673 "The name of the LDP protocol instance."; 2674 } 2675 choice hello-adjacency-type { 2676 description 2677 "Interface or targeted adjacency."; 2678 case targeted { 2679 container targeted { 2680 description 2681 "Targeted adjacency through LDP extended discovery."; 2682 leaf target-address { 2683 type inet:ip-address; 2684 description 2685 "The target adjacent address learned."; 2686 } 2687 } 2688 } 2689 case link { 2690 container link { 2691 description 2692 "Link adjacency through LDP basic discovery."; 2693 leaf next-hop-interface { 2694 type if:interface-ref; 2695 description 2696 "The interface connecting to the adjacent next hop."; 2697 } 2698 leaf next-hop-address { 2699 type inet:ip-address; 2700 must "../next-hop-interface" { 2701 description 2702 "Applicable when interface is specified."; 2704 } 2705 description 2706 "IP address of the next hop. This can be IPv4 or IPv6 2707 address."; 2708 } 2709 } 2710 } 2711 } // hello-adjacency-type 2712 } // mpls-ldp-hello-adjacency-event 2714 notification mpls-ldp-fec-event { 2715 description 2716 "Notification event for a change of FEC status."; 2717 leaf event-type { 2718 type oper-status-event-type; 2719 description "Event type."; 2720 } 2721 leaf protocol-name { 2722 type leafref { 2723 path "/rt:routing/rt:control-plane-protocols/" 2724 + "rt:control-plane-protocol/rt:name"; 2725 } 2726 description 2727 "The name of the LDP protocol instance."; 2728 } 2729 leaf fec { 2730 type inet:ip-prefix; 2731 description 2732 "The address prefix element of the FEC whose status 2733 has changed."; 2734 } 2735 } 2736 } 2737 2739 Figure 10: LDP base module 2741 9.2. Extended 2743 This YANG module imports types defined in [RFC6991], [RFC8349], 2744 [RFC8177], and [RFC8343]. 2746 file "ietf-mpls-ldp-extended@2020-02-25.yang" 2748 // RFC Editor: replace the above date 2020-02-25 with the date of 2749 // publication and remove this note. 2751 module ietf-mpls-ldp-extended { 2752 yang-version 1.1; 2754 namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-ldp-extended"; 2755 prefix "ldp-ext"; 2757 import ietf-inet-types { 2758 prefix "inet"; 2759 reference "RFC 6991: Common YANG Data Types"; 2760 } 2762 import ietf-routing { 2763 prefix "rt"; 2764 reference 2765 "RFC 8349: A YANG Data Model for Routing Management (NMDA 2766 version)"; 2767 } 2769 import ietf-key-chain { 2770 prefix "key-chain"; 2771 reference "RFC 8177: YANG Data Model for Key Chains"; 2772 } 2774 import ietf-mpls-ldp { 2775 prefix "ldp"; 2776 reference "RFC XXXX: YANG Data Model for MPLS LDP"; 2777 // RFC Editor: replace XXXX with actual RFC number and remove 2778 // this note 2779 } 2780 import ietf-interfaces { 2781 prefix "if"; 2782 reference "RFC 8343: A YANG Data Model for Interface Management"; 2783 } 2785 import ietf-routing-policy { 2786 prefix rt-pol; 2787 reference 2788 "I-D.ietf-rtgwg-policy-model: A YANG Data Model for Routing 2789 Policy Management"; 2790 } 2792 organization 2793 "IETF MPLS Working Group"; 2794 contact 2795 "WG Web: 2796 WG List: 2798 Editor: Kamran Raza 2799 2801 Editor: Rajiv Asati 2802 2804 Editor: Xufeng Liu 2805 2807 Editor: Santosh Esale 2808 2810 Editor: Xia Chen 2811 2813 Editor: Himanshu Shah 2814 "; 2816 description 2817 "This YANG module defines the extended components for the 2818 management of Multi-Protocol Label Switching (MPLS) Label 2819 Distribution Protocol (LDP). It is also the model to 2820 be augmented for extended Multipoint LDP (mLDP). 2822 Copyright (c) 2020 IETF Trust and the persons identified as 2823 authors of the code. All rights reserved. 2825 Redistribution and use in source and binary forms, with or 2826 without modification, is permitted pursuant to, and subject to 2827 the license terms contained in, the Simplified BSD License set 2828 forth in Section 4.c of the IETF Trust's Legal Provisions 2829 Relating to IETF Documents 2830 (http://trustee.ietf.org/license-info). 2832 This version of this YANG module is part of RFC XXXX; see the 2833 RFC itself for full legal notices."; 2835 // RFC Editor: replace XXXX with actual RFC number and remove 2836 // this note 2838 revision 2020-02-25 { 2839 description 2840 "Initial revision."; 2841 reference 2842 "RFC XXXX: YANG Data Model for MPLS LDP."; 2844 // RFC Editor: replace XXXX with actual RFC number and remove 2845 // this note 2846 } 2848 /* 2849 * Features 2850 */ 2851 feature capability-end-of-lib { 2852 description 2853 "This feature indicates that the system allows to configure 2854 LDP end-of-lib capability."; 2855 } 2857 feature capability-typed-wildcard-fec { 2858 description 2859 "This feature indicates that the system allows to configure 2860 LDP typed-wildcard-fec capability."; 2861 } 2863 feature capability-upstream-label-assignment { 2864 description 2865 "This feature indicates that the system allows to configure 2866 LDP upstream label assignment capability."; 2867 } 2869 feature forwarding-nexthop-config { 2870 description 2871 "This feature indicates that the system allows to configure 2872 forwarding nexthop on interfaces."; 2873 } 2875 feature graceful-restart-helper-mode { 2876 description 2877 "This feature indicates that the system supports graceful 2878 restart helper mode. We call an LSR to be operating in GR 2879 helper mode when it advertises 0 as its FT Reconnect Timeout 2880 in the FT Session TLV. 2881 Please refer RFC3478 section 2 for details."; 2882 } 2884 feature key-chain { 2885 description 2886 "This feature indicates that the system supports keychain for 2887 authentication."; 2888 } 2890 feature peers-dual-stack-transport-preference { 2891 description 2892 "This feature indicates that the system allows to configure 2893 the transport connection preference in a dual-stack setup 2894 for peers."; 2895 } 2897 feature per-interface-timer-config { 2898 description 2899 "This feature indicates that the system allows to configure 2900 interface Hello timers at the per-interface level."; 2901 } 2903 feature per-peer-admin-down { 2904 description 2905 "This feature indicates that the system allows to 2906 administratively disable a peer."; 2907 } 2909 feature per-peer-graceful-restart-config { 2910 description 2911 "This feature indicates that the system allows to configure 2912 graceful restart at the per-peer level."; 2913 } 2915 feature per-peer-session-attributes-config { 2916 description 2917 "This feature indicates that the system allows to configure 2918 session attributes at the per-peer level."; 2919 } 2921 feature policy-label-assignment-config { 2922 description 2923 "This feature indicates that the system allows to configure 2924 policies to assign labels according to certain prefixes."; 2925 } 2927 feature policy-ordered-label-config { 2928 description 2929 "This feature indicates that the system allows to configure 2930 ordered label policies."; 2931 } 2933 feature policy-targeted-discovery-config { 2934 description 2935 "This feature indicates that the system allows to configure 2936 policies to control the acceptance of targeted neighbor 2937 discovery Hello messages."; 2938 } 2940 feature session-downstream-on-demand-config { 2941 description 2942 "This feature indicates that the system allows to configure 2943 session downstream-on-demand"; 2944 } 2946 /* 2947 * Typedefs 2948 */ 2949 typedef neighbor-list-ref { 2950 type leafref { 2951 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 2952 + "rt-pol:neighbor-sets/rt-pol:neighbor-set/rt-pol:name"; 2953 } 2954 description 2955 "A type for a reference to a neighbor address list. 2956 The string value is the name identifier for uniquely 2957 identifying the referenced address list, which contains a list 2958 of addresses that a routing policy can applied."; 2959 reference 2960 "I-D.ietf-rtgwg-policy-model: A YANG Data Model for Routing 2961 Policy Management"; 2962 } 2964 typedef prefix-list-ref { 2965 type leafref { 2966 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 2967 + "rt-pol:prefix-sets/rt-pol:prefix-set/rt-pol:name"; 2968 } 2969 description 2970 "A type for a reference to a prefix list. 2971 The string value is the name identifier for uniquely 2972 identifying the referenced prefix set, which contains a list 2973 of prefixes that a routing policy can applied."; 2974 reference 2975 "I-D.ietf-rtgwg-policy-model: A YANG Data Model for Routing 2976 Policy Management"; 2977 } 2979 typedef peer-list-ref { 2980 type leafref { 2981 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 2982 + "rt-pol:neighbor-sets/rt-pol:neighbor-set/rt-pol:name"; 2983 } 2984 description 2985 "A type for a reference to a peer address list. 2986 The string value is the name identifier for uniquely 2987 identifying the referenced address list, which contains a list 2988 of addresses that a routing policy can applied."; 2989 reference 2990 "I-D.ietf-rtgwg-policy-model: A YANG Data Model for Routing 2991 Policy Management"; 2992 } 2994 /* 2995 * Identities 2996 */ 2998 /* 2999 * Groupings 3000 */ 3001 grouping address-family-ipv4-augment { 3002 description "Augmentation to address family IPv4."; 3004 uses policy-container; 3006 leaf transport-address { 3007 type inet:ipv4-address; 3008 description 3009 "The transport address advertised in LDP Hello messages. 3010 If this value is not specified, the LDP LSR ID is used as 3011 the transport address."; 3012 reference 3013 "RFC5036. Sec. 3.5.2."; 3014 } 3015 } 3017 grouping authentication-keychain-augment { 3018 description "Augmentation to authentication to add keychain."; 3019 leaf key-chain { 3020 type key-chain:key-chain-ref; 3021 description 3022 "key-chain name. 3023 If not specified, no key chain is used."; 3024 } 3025 } 3027 grouping capability-augment { 3028 description "Augmentation to capability."; 3030 container end-of-lib { 3031 if-feature capability-end-of-lib; 3032 description 3033 "Configure end-of-lib capability."; 3034 leaf enabled { 3035 type boolean; 3036 default false; 3037 description 3038 "'true' to enable end-of-lib capability."; 3039 } 3040 } 3041 container typed-wildcard-fec { 3042 if-feature capability-typed-wildcard-fec; 3043 description 3044 "Configure typed-wildcard-fec capability."; 3045 leaf enabled { 3046 type boolean; 3047 default false; 3048 description 3049 "'true' to enable typed-wildcard-fec capability."; 3050 } 3051 } 3052 container upstream-label-assignment { 3053 if-feature capability-upstream-label-assignment; 3054 description 3055 "Configure upstream label assignment capability."; 3056 leaf enabled { 3057 type boolean; 3058 default false; 3059 description 3060 "'true' to enable upstream label assignment."; 3061 } 3062 } 3063 } // capability-augment 3065 grouping global-augment { 3066 description "Augmentation to global attributes."; 3067 leaf igp-synchronization-delay { 3068 type uint16 { 3069 range "0 | 3..300"; 3070 } 3071 units seconds; 3072 default 0; 3073 description 3074 "Sets the interval that the LDP waits before notifying the 3075 Interior Gateway Protocol (IGP) that label exchange is 3076 completed so that IGP can start advertising the normal 3077 metric for the link. 3078 If the value is not specified, there is no delay."; 3079 } 3080 } 3082 grouping global-forwarding-nexthop-augment { 3083 description 3084 "Augmentation to global forwarding nexthop interfaces."; 3086 container forwarding-nexthop { 3087 if-feature forwarding-nexthop-config; 3088 description 3089 "Configuration for forwarding nexthop."; 3091 container interfaces { 3092 description 3093 "Containing a list of interfaces on which forwarding can be 3094 disabled."; 3096 list interface { 3097 key "name"; 3098 description 3099 "List of LDP interfaces on which forwarding can be 3100 disabled."; 3101 uses ldp:ldp-interface-ref; 3102 list address-family { 3103 key "afi"; 3104 description 3105 "Per-vrf per-af params."; 3106 leaf afi { 3107 type identityref { 3108 base rt:address-family; 3109 } 3110 description 3111 "Address family type value."; 3112 } 3113 leaf ldp-disable { 3114 type boolean; 3115 default false; 3116 description 3117 "'true' to disable LDP forwarding on the interface."; 3118 } 3119 } 3120 } // interface 3121 } // interfaces 3122 } // forwarding-nexthop 3123 } // global-forwarding-nexthop-augment 3125 grouping graceful-restart-augment { 3126 description "Augmentation to graceful restart."; 3128 leaf helper-enabled { 3129 if-feature graceful-restart-helper-mode; 3130 type boolean; 3131 default false; 3132 description 3133 "Enable or disable graceful restart helper mode."; 3134 } 3135 } 3137 grouping interface-address-family-ipv4-augment { 3138 description "Augmentation to interface address family IPv4."; 3140 leaf transport-address { 3141 type union { 3142 type enumeration { 3143 enum "use-global-transport-address" { 3144 description 3145 "Use the transport address set at the global level 3146 common for all interfaces for this address family."; 3147 } 3148 enum "use-interface-address" { 3149 description 3150 "Use interface address as the transport address."; 3151 } 3152 } 3153 type inet:ipv4-address; 3154 } 3155 default "use-global-transport-address"; 3156 description 3157 "IP address to be advertised as the LDP transport address."; 3158 } 3159 } 3161 grouping interface-address-family-ipv6-augment { 3162 description "Augmentation to interface address family IPv6."; 3163 leaf transport-address { 3164 type union { 3165 type enumeration { 3166 enum "use-global-transport-address" { 3167 description 3168 "Use the transport address set at the global level 3169 common for all interfaces for this address family."; 3170 } 3171 enum "use-interface-address" { 3172 description 3173 "Use interface address as the transport address."; 3174 } 3175 } 3176 type inet:ipv6-address; 3177 } 3178 default "use-global-transport-address"; 3179 description 3180 "IP address to be advertised as the LDP transport address."; 3181 } 3182 } 3184 grouping interface-augment { 3185 description "Augmentation to interface."; 3187 uses ldp:basic-discovery-timers { 3188 if-feature per-interface-timer-config; 3189 } 3190 leaf igp-synchronization-delay { 3191 if-feature per-interface-timer-config; 3192 type uint16 { 3193 range "0 | 3..300"; 3194 } 3195 units seconds; 3196 description 3197 "Sets the interval that the LDP waits before notifying the 3198 Interior Gateway Protocol (IGP) that label exchange is 3199 completed so that IGP can start advertising the normal 3200 metric for the link. 3201 This leaf may be configured at the per-interface level or 3202 the global level, with precedence given to the value at the 3203 per-interface level. If the leaf is not configured at 3204 either level, the default value at the global level is 3205 used."; 3206 } 3207 } 3209 grouping peer-af-policy-container { 3210 description 3211 "LDP policy attribute container under peer address-family."; 3212 container label-policy { 3213 description 3214 "Label policy attributes."; 3215 container advertise { 3216 description 3217 "Label advertising policies."; 3218 leaf prefix-list { 3219 type prefix-list-ref; 3220 description 3221 "Applies the prefix list to filter outgoing label 3222 advertisements. 3223 If the value is not specified, no prefix filter 3224 is applied."; 3225 } 3226 } 3227 container accept { 3228 description 3229 "Label advertisement acceptance policies."; 3230 leaf prefix-list { 3231 type prefix-list-ref; 3232 description 3233 "Applies the prefix list to filer incoming label 3234 advertisements. 3235 If the value is not specified, no prefix filter 3236 is applied."; 3237 } 3238 } 3239 } 3240 } // peer-af-policy-container 3242 grouping peer-augment { 3243 description "Augmentation to each peer list entry."; 3245 leaf admin-down { 3246 if-feature per-peer-admin-down; 3247 type boolean; 3248 default false; 3249 description 3250 "'true' to disable the peer."; 3251 } 3253 uses ldp:graceful-restart-attributes-per-peer { 3254 if-feature per-peer-graceful-restart-config; 3255 } 3257 uses ldp:peer-attributes { 3258 if-feature per-peer-session-attributes-config; 3260 } 3261 } 3263 grouping peers-augment { 3264 description "Augmentation to peers container."; 3266 container session-downstream-on-demand { 3267 if-feature session-downstream-on-demand-config; 3268 description 3269 "Session downstream-on-demand attributes."; 3270 leaf enabled { 3271 type boolean; 3272 default false; 3273 description 3274 "'true' if session downstream-on-demand is enabled."; 3275 } 3276 leaf peer-list { 3277 type peer-list-ref; 3278 description 3279 "The name of a peer ACL, to be applied to the 3280 downstream-on-demand sessions. 3281 If this value is not specified, no filter is applied to 3282 any downstream-on-demand sessions."; 3283 } 3284 } 3285 container dual-stack-transport-preference { 3286 if-feature peers-dual-stack-transport-preference; 3287 description 3288 "The settings of peers to establish TCP connection in a 3289 dual-stack setup."; 3290 leaf max-wait { 3291 type uint16 { 3292 range "0..60"; 3293 } 3294 default 30; 3295 description 3296 "The maximum wait time in seconds for preferred transport 3297 connection establishment. 0 indicates no preference."; 3298 } 3299 container prefer-ipv4 { 3300 presence 3301 "Present if IPv4 is prefered for transport connection 3302 establishment, subject to the 'peer-list' in this 3303 container."; 3304 description 3305 "Uses IPv4 as the prefered address family for transport 3306 connection establishment, subject to the 'peer-list' in 3307 this container. 3309 If this container is not present, as a default, IPv6 is 3310 the prefered address family for transport connection 3311 establishment."; 3312 leaf peer-list { 3313 type peer-list-ref; 3314 description 3315 "The name of a peer ACL, to be applied to the IPv4 3316 transport connections. 3317 If this value is not specified, no filter is applied, 3318 and the IPv4 is prefered for all peers."; 3319 } 3320 } 3321 } 3322 } // peers-augment 3324 grouping policy-container { 3325 description 3326 "LDP policy attributes."; 3327 container label-policy { 3328 description 3329 "Label policy attributes."; 3330 container advertise { 3331 description 3332 "Label advertising policies."; 3333 container egress-explicit-null { 3334 description 3335 "Enables an egress router to advertise an 3336 explicit null label (value 0) in place of an 3337 implicit null label (value 3) to the 3338 penultimate hop router."; 3339 leaf enabled { 3340 type boolean; 3341 default false; 3342 description 3343 "'true' to enable explicit null."; 3344 } 3345 } 3346 leaf prefix-list { 3347 type prefix-list-ref; 3348 description 3349 "Applies the prefix list to filter outgoing label 3350 advertisements. 3351 If the value is not specified, no prefix filter 3352 is applied."; 3353 } 3354 } 3355 container accept { 3356 description 3357 "Label advertisement acceptance policies."; 3358 leaf prefix-list { 3359 type prefix-list-ref; 3360 description 3361 "Applies the prefix list to filter incoming label 3362 advertisements. 3363 If the value is not specified, no prefix filter 3364 is applied."; 3365 } 3366 } 3367 container assign { 3368 if-feature policy-label-assignment-config; 3369 description 3370 "Label assignment policies"; 3371 container independent-mode { 3372 description 3373 "Independent label policy attributes."; 3374 leaf prefix-list { 3375 type prefix-list-ref; 3376 description 3377 "Assign labels according to certain prefixes. 3378 If the value is not specified, no prefix filter 3379 is applied (labels are assigned to all learned 3380 routes)."; 3382 } 3383 } 3384 container ordered-mode { 3385 if-feature policy-ordered-label-config; 3386 description 3387 "Ordered label policy attributes."; 3388 leaf egress-prefix-list { 3389 type prefix-list-ref; 3390 description 3391 "Assign labels according to certain prefixes for 3392 egress LSR."; 3393 } 3394 } 3395 } // assign 3396 } // label-policy 3397 } // policy-container 3399 /* 3400 * Configuration and state data nodes 3401 */ 3402 // Forwarding nexthop augmentation to the global tree 3403 augment "/rt:routing/rt:control-plane-protocols/" 3404 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global" { 3405 description "Forwarding nexthop augmentation."; 3406 uses global-forwarding-nexthop-augment; 3407 } 3409 // global/address-families/ipv6 3410 augment "/rt:routing/rt:control-plane-protocols/" 3411 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" 3412 + "ldp:address-families" { 3413 description "Global IPv6 augmentation."; 3415 container ipv6 { 3416 presence 3417 "Present if IPv6 is enabled, unless the 'enable' 3418 leaf is set to 'false'"; 3419 description 3420 "Containing data related to the IPv6 address family."; 3422 leaf enabled { 3423 type boolean; 3424 default true; 3425 description 3426 "'true' to enable the address family."; 3427 } 3429 uses policy-container; 3431 leaf transport-address { 3432 type inet:ipv6-address; 3433 mandatory true; 3434 description 3435 "The transport address advertised in LDP Hello messages."; 3436 } 3438 leaf label-distribution-control-mode { 3439 type enumeration { 3440 enum independent { 3441 description 3442 "Independent label distribution control."; 3443 } 3444 enum ordered { 3445 description 3446 "Ordered label distribution control."; 3447 } 3448 } 3449 config false; 3450 description 3451 "Label distribution control mode."; 3452 reference 3453 "RFC5036: LDP Specification. Sec 2.6."; 3454 } 3456 // ipv6 bindings 3457 container bindings { 3458 config false; 3459 description 3460 "LDP address and label binding information."; 3461 list address { 3462 key "address"; 3463 description 3464 "List of address bindings learned by LDP."; 3465 leaf address { 3466 type inet:ipv6-address; 3467 description 3468 "The IPv6 address learned from an Address 3469 message received from or advertised to a peer."; 3470 } 3471 uses ldp:binding-address-state-attributes; 3472 } 3474 list fec-label { 3475 key "fec"; 3476 description 3477 "List of FEC-label bindings learned by LDP."; 3478 leaf fec { 3479 type inet:ipv6-prefix; 3480 description 3481 "The prefix FEC value in the FEC-label binding, 3482 learned in a Label Mapping message received from 3483 or advertised to a peer."; 3484 } 3485 uses ldp:binding-label-state-attributes; 3486 } 3487 } // bindings 3488 } // ipv6 3489 } 3491 // discovery/interfaces/interface/address-families/ipv6 3492 augment "/rt:routing/rt:control-plane-protocols/" 3493 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" 3494 + "ldp:interfaces/ldp:interface/" 3495 + "ldp:address-families" { 3496 description "Interface IPv6 augmentation."; 3498 container ipv6 { 3499 presence 3500 "Present if IPv6 is enabled, unless the 'enable' 3501 leaf is set to 'false'"; 3502 description 3503 "IPv6 address family."; 3505 leaf enabled { 3506 type boolean; 3507 default true; 3508 description 3509 "'true' to enable the address family on the interface."; 3510 } 3512 container hello-adjacencies { 3513 config false; 3514 description 3515 "Containing a list of Hello adjacencies."; 3517 list hello-adjacency { 3518 key "adjacent-address"; 3519 config false; 3520 description "List of Hello adjacencies."; 3522 leaf adjacent-address { 3523 type inet:ipv6-address; 3524 description 3525 "Neighbor address of the Hello adjacency."; 3526 } 3528 uses ldp:adjacency-state-attributes; 3529 uses ldp:ldp-peer-ref-from-interface; 3530 } 3531 } 3532 } // ipv6 3533 } 3535 // discovery/targeted/address-families/ipv6 3536 augment "/rt:routing/rt:control-plane-protocols/" 3537 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" 3538 + "ldp:targeted/ldp:address-families" { 3539 description "Targeted discovery IPv6 augmentation."; 3541 container ipv6 { 3542 presence 3543 "Present if IPv6 is enabled."; 3544 description 3545 "IPv6 address family."; 3547 container hello-adjacencies { 3548 config false; 3549 description 3550 "Containing a list of Hello adjacencies."; 3552 list hello-adjacency { 3553 key "local-address adjacent-address"; 3554 config false; 3555 description "List of Hello adjacencies."; 3557 leaf local-address { 3558 type inet:ipv6-address; 3559 description 3560 "Local address of the Hello adjacency."; 3561 } 3562 leaf adjacent-address { 3563 type inet:ipv6-address; 3564 description 3565 "Neighbor address of the Hello adjacency."; 3566 } 3568 uses ldp:adjacency-state-attributes; 3569 uses ldp:ldp-peer-ref-from-target; 3570 } 3571 } 3573 list target { 3574 key "adjacent-address"; 3575 description 3576 "Targeted discovery params."; 3578 leaf adjacent-address { 3579 type inet:ipv6-address; 3580 description 3581 "Configures a remote LDP neighbor for the 3582 extended LDP discovery."; 3583 } 3584 leaf enabled { 3585 type boolean; 3586 default true; 3587 description 3588 "'true' to enable the target."; 3589 } 3590 leaf local-address { 3591 type inet:ipv6-address; 3592 description 3593 "The local address used as the source address to send 3594 targeted Hello messages. 3595 If the value is not specified, the transport-address 3596 is used as the source address."; 3598 } 3599 } // target 3600 } // ipv6 3601 } 3603 // /peers/peer/state/address-families/ipv6 3604 augment "/rt:routing/rt:control-plane-protocols/" 3605 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" 3606 + "ldp:peer/ldp:address-families" { 3607 description "Peer state IPv6 augmentation."; 3609 container ipv6 { 3610 presence 3611 "Present if IPv6 is enabled."; 3612 description 3613 "IPv6 address family."; 3615 container hello-adjacencies { 3616 config false; 3617 description 3618 "Containing a list of Hello adjacencies."; 3620 list hello-adjacency { 3621 key "local-address adjacent-address"; 3622 description "List of Hello adjacencies."; 3624 leaf local-address { 3625 type inet:ipv6-address; 3626 description 3627 "Local address of the Hello adjacency."; 3628 } 3629 leaf adjacent-address { 3630 type inet:ipv6-address; 3631 description 3632 "Neighbor address of the Hello adjacency."; 3633 } 3635 uses ldp:adjacency-state-attributes; 3637 leaf interface { 3638 type if:interface-ref; 3639 description "Interface for this adjacency."; 3640 } 3641 } 3642 } 3643 } // ipv6 3644 } 3645 /* 3646 * Configuration data and operational state data nodes 3647 */ 3648 augment "/rt:routing/rt:control-plane-protocols/" 3649 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global" { 3650 description "Graceful restart augmentation."; 3651 uses global-augment; 3652 } 3654 augment "/rt:routing/rt:control-plane-protocols/" 3655 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" 3656 + "ldp:capability" { 3657 description "Capability augmentation."; 3658 uses capability-augment; 3659 } 3661 augment "/rt:routing/rt:control-plane-protocols/" 3662 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" 3663 + "ldp:graceful-restart" { 3664 description "Graceful restart augmentation."; 3665 uses graceful-restart-augment; 3666 } 3668 augment "/rt:routing/rt:control-plane-protocols/" 3669 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" 3670 + "ldp:address-families/ldp:ipv4" { 3671 description "Address family IPv4 augmentation."; 3672 uses address-family-ipv4-augment; 3673 } 3675 augment "/rt:routing/rt:control-plane-protocols/" 3676 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" 3677 + "ldp:interfaces/ldp:interface" { 3678 description "Interface augmentation."; 3679 uses interface-augment; 3680 } 3682 augment "/rt:routing/rt:control-plane-protocols/" 3683 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" 3684 + "ldp:interfaces/ldp:interface/ldp:address-families/" 3685 + "ldp:ipv4" { 3686 description "Interface address family IPv4 augmentation."; 3687 uses interface-address-family-ipv4-augment; 3688 } 3690 augment "/rt:routing/rt:control-plane-protocols/" 3691 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" 3692 + "ldp:interfaces/ldp:interface/ldp:address-families/" 3693 + "ldp-ext:ipv6" { 3694 description "Interface address family IPv6 augmentation."; 3695 uses interface-address-family-ipv6-augment; 3696 } 3698 augment "/rt:routing/rt:control-plane-protocols/" 3699 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" 3700 + "ldp:targeted/ldp:hello-accept" { 3701 description "Targeted discovery augmentation."; 3702 leaf neighbor-list { 3703 if-feature policy-targeted-discovery-config; 3704 type neighbor-list-ref; 3705 description 3706 "The name of a neighbor ACL, to accept Hello messages from 3707 LDP peers as permitted by the neighbor-list policy. 3708 If this value is not specified, targeted Hello messages from 3709 any source are accepted."; 3710 } 3711 } 3713 augment "/rt:routing/rt:control-plane-protocols/" 3714 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers" { 3715 description "Peers augmentation."; 3716 uses peers-augment; 3717 } 3719 augment "/rt:routing/rt:control-plane-protocols/" 3720 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" 3721 + "ldp:authentication/ldp:authentication-type" { 3722 if-feature key-chain; 3723 description "Peers authentication augmentation."; 3724 case key-chain { 3725 uses authentication-keychain-augment; 3726 } 3727 } 3729 augment "/rt:routing/rt:control-plane-protocols/" 3730 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/ldp:peer" { 3731 description "Peer list entry augmentation."; 3732 uses peer-augment; 3733 } 3735 augment "/rt:routing/rt:control-plane-protocols/" 3736 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/ldp:peer/" 3737 + "ldp:authentication/ldp:authentication-type" { 3738 if-feature key-chain; 3739 description "Peer list entry authentication augmentation."; 3740 case key-chain { 3741 uses authentication-keychain-augment; 3742 } 3743 } 3745 augment "/rt:routing/rt:control-plane-protocols/" 3746 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/ldp:peer/" 3747 + "ldp:address-families/ldp:ipv4" { 3748 description 3749 "Peer list entry IPv4 augmentation."; 3750 uses peer-af-policy-container; 3751 } 3753 augment "/rt:routing/rt:control-plane-protocols/" 3754 + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/ldp:peer/" 3755 + "ldp:address-families/ldp-ext:ipv6" { 3756 description 3757 "Peer list entry IPv6 augmentation."; 3758 uses peer-af-policy-container; 3759 } 3760 } 3762 3764 Figure 11: LDP extended module 3766 10. Security Considerations 3768 This specification inherits the security considerations captured in 3769 [RFC5920] and the LDP protocol specification documents, namely base 3770 LDP [RFC5036], LDP IPv6 [RFC7552], LDP Capabilities [RFC5561], Typed 3771 Wildcard FEC [RFC5918], LDP End-of-LIB [RFC5919], and LDP Upstream 3772 Label Assignment [RFC6389]. 3774 10.1. YANG model 3776 The YANG modules specified in this document defines a schema for data 3777 that is designed to be accessed via network management protocols such 3778 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 3779 is the secure transport layer, and the mandatory-to-implement secure 3780 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 3781 is HTTPS, and the mandatory-to-implement secure transport is TLS 3782 [RFC8446]. 3784 The Network Configuration Access Control Model (NACM) [RFC8341] 3785 provides the means to restrict access for particular NETCONF or 3786 RESTCONF users to a preconfigured subset of all available NETCONF or 3787 RESTCONF protocol operations and content. 3789 10.1.1. Writable nodes 3791 There are a number of data nodes defined in this YANG module that are 3792 writable/creatable/deletable (i.e., config true, which is the 3793 default). These data nodes may be considered sensitive or vulnerable 3794 in some network environments. Write operations (e.g., edit-config) 3795 to these data nodes without proper protection can have a negative 3796 effect on network operations. 3798 For LDP, the ability to modify MPLS LDP configuration may allow the 3799 entire MPLS LDP domain to be compromised including forming LDP 3800 adjacencies and/or peer sessions with unauthorized routers to mount a 3801 massive Denial-of-Service (DoS) attack. In particular, folling are 3802 the subtrees and data nodes that are sensitivite and vulnerable: 3804 * /mpls-ldp/discovery/interfaces/interface: Adding LDP on any 3805 unprotected interface could allow an LDP hello adjacency to be 3806 formed with an unauthorized and malicious neighbor. Once an hello 3807 adjacency is formed, a peer session could progress with this 3808 neighbor. 3810 * /mpls-ldp/discovery/targeted/hello-accept: Allowing acceptance of 3811 targeted-hellos could open LDP to DoS attacks related to incoming 3812 targeted hellos from malicious sources. 3814 * /mpls-ldp/peers/authentication: Allowing a peer session 3815 establishement is typically controlled via LDP authentication 3816 where a proper and secure authentication password/key management 3817 is warranted. 3819 * /mpls-ldp/peers/peer/authentication: Same as above. 3821 10.1.2. Readable nodes 3823 Some of the readable data nodes in this YANG module may be considered 3824 sensitive or vulnerable in some network environments. It is thus 3825 important to control read access (e.g., via get, get-config, or 3826 notification) to these data nodes. These are the subtrees and data 3827 nodes and their sensitivity/vulnerability: 3829 The exposure of LDP databases (such as hello adjacencies, peers, 3830 address bindings, and fec-label bindings) beyond the scope of the LDP 3831 admin domain may be undesirable. The relevant subtrees and data 3832 nodes are as follows: 3834 * /mpls-ldp/global/address-families/ipv4/bindings/address 3836 * /mpls-ldp/global/address-families/ipv6/bindings/address 3838 * /mpls-ldp/global/address-families/ipv4/bindings/fec-label 3840 * /mpls-ldp/global/address-families/ipv6/bindings/fec-label 3842 * /mpls-ldp/discovery/interfaces/interface/address-families/ipv4/ 3843 hello-adjacencies 3845 * /mpls-ldp/discovery/interfaces/interface/address-families/ipv6/ 3846 hello-adjacencies 3848 * /mpls-ldp/discovery/targeted/address-families/ipv4/hello- 3849 adjacencies 3851 * /mpls-ldp/discovery/targeted/address-families/ipv6/hello- 3852 adjacencies 3854 * /mpls-ldp/peers 3856 The configuration for LDP peer authentication is supported via the 3857 specification of key-chain [RFC8040], or via direct specification of 3858 a key associated with a crypto algorithm (such as MD5). The relevant 3859 subtrees and data nodes are as follows: 3861 * /mpls-ldp/peers/authentication 3863 * /mpls-ldp/peers/peer/authentication 3865 The actual authentication key data (whether locally specified or part 3866 of a key-chain) is sensitive and needs to be kept secret from 3867 unauthorized parties. For key-chain based authentication, this model 3868 inherits the security considerations of [RFC8040] (that includes the 3869 considerations with respect to the local storage and handling of 3870 authentication keys). A similar procedure for storage and access to 3871 direct key is warranted. 3873 10.1.3. RPC operations 3875 Some of the RPC operations in this YANG module may be considered 3876 sensitive or vulnerable in some network environments. It is thus 3877 important to control access to these operations otherwise control 3878 plane flaps, network outages, and DoS attacks are possible. These 3879 are the operations and their sensitivity/vulnerability: 3881 * mpls-ldp-clear-peer 3882 * mpls-ldp-clear-hello-adjacency 3884 10.1.4. Notifications 3886 The model describes several notifications. The implementations must 3887 rate-limit the generation of these notifications to avoid creating 3888 significant notification load and possible side effects on the system 3889 stability. 3891 11. IANA Considerations 3893 This document requests the registration of the following URIs in the 3894 IETF "XML registry" [RFC3688]: 3896 +----------------------------------------------------+----------+---+ 3897 | URI |Registrant|XML| 3898 +====================================================+==========+===+ 3899 | urn:ietf:params:xml:ns:yang:ietf-mpls-ldp | The IESG |N/A| 3900 +----------------------------------------------------+----------+---+ 3901 | urn:ietf:params:xml:ns:yang:ietf-mpls-ldp-extended | The IESG |N/A| 3902 +----------------------------------------------------+----------+---+ 3904 Table 1: URIs 3906 This document requests the registration of the following YANG modules 3907 in the "YANG Module Names" registry [RFC6020]: 3909 +----------------------+---------------------------+------+---------+ 3910 | Name | Namespace |Prefix|Reference| 3911 +======================+===========================+======+=========+ 3912 |ietf-mpls-ldp |urn:ietf:params:xml:ns:yang| ldp | This | 3913 | |:ietf-mpls-ldp | | document| 3914 +----------------------+---------------------------+------+---------+ 3915 |ietf-mpls-ldp-extended|urn:ietf:params:xml:ns:yang| ldp- | This | 3916 | |:ietf-mpls-ldp-extended | ext | document| 3917 +----------------------+---------------------------+------+---------+ 3919 Table 2: YANG Modules 3921 -- RFC Editor: Replace "this document" with the document RFC number 3922 at time of publication, and remove this note. 3924 12. Acknowledgments 3926 The authors would like to acknowledge Eddie Chami, Nagendra Kumar, 3927 Mannan Venkatesan, and Pavan Beeram for their contribution to this 3928 document. 3930 We also acknowledge Ladislav Lhotka, Jan Lindblad, Tom Petch, 3931 Yingzhen Qu, and Benjamin Kaduk for their detailed review of the 3932 model during WG and IESG. 3934 13. Contributors 3936 Danial Johari 3937 Cisco Systems 3938 Email: dajohari@cisco.com 3940 Loa Andersson 3941 Huawei Technologies 3942 Email: loa@pi.nu 3944 Jeff Tantsura 3945 Apstra 3946 Email: jefftant.ietf@gmail.com 3948 Matthew Bocci 3949 Nokia 3950 Email: matthew.bocci@nokia.com 3952 Reshad Rahman 3953 Cisco Systems 3954 Email: rrahman@cisco.com 3956 Stephane Litkowski 3957 Cisco Systems 3958 Email: slitkows@cisco.com 3960 14. Normative References 3962 [RFC3478] Leelanivas, M., Rekhter, Y., and R. Aggarwal, "Graceful 3963 Restart Mechanism for Label Distribution Protocol", 3964 RFC 3478, DOI 10.17487/RFC3478, February 2003, 3965 . 3967 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3968 DOI 10.17487/RFC3688, January 2004, 3969 . 3971 [RFC5036] Andersson, L., Ed., Minei, I., Ed., and B. Thomas, Ed., 3972 "LDP Specification", RFC 5036, DOI 10.17487/RFC5036, 3973 October 2007, . 3975 [RFC5331] Aggarwal, R., Rekhter, Y., and E. Rosen, "MPLS Upstream 3976 Label Assignment and Context-Specific Label Space", 3977 RFC 5331, DOI 10.17487/RFC5331, August 2008, 3978 . 3980 [RFC5443] Jork, M., Atlas, A., and L. Fang, "LDP IGP 3981 Synchronization", RFC 5443, DOI 10.17487/RFC5443, March 3982 2009, . 3984 [RFC5561] Thomas, B., Raza, K., Aggarwal, S., Aggarwal, R., and JL. 3985 Le Roux, "LDP Capabilities", RFC 5561, 3986 DOI 10.17487/RFC5561, July 2009, 3987 . 3989 [RFC5918] Asati, R., Minei, I., and B. Thomas, "Label Distribution 3990 Protocol (LDP) 'Typed Wildcard' Forward Equivalence Class 3991 (FEC)", RFC 5918, DOI 10.17487/RFC5918, August 2010, 3992 . 3994 [RFC5919] Asati, R., Mohapatra, P., Chen, E., and B. Thomas, 3995 "Signaling LDP Label Advertisement Completion", RFC 5919, 3996 DOI 10.17487/RFC5919, August 2010, 3997 . 3999 [RFC5920] Fang, L., Ed., "Security Framework for MPLS and GMPLS 4000 Networks", RFC 5920, DOI 10.17487/RFC5920, July 2010, 4001 . 4003 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 4004 the Network Configuration Protocol (NETCONF)", RFC 6020, 4005 DOI 10.17487/RFC6020, October 2010, 4006 . 4008 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 4009 and A. Bierman, Ed., "Network Configuration Protocol 4010 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 4011 . 4013 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 4014 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 4015 . 4017 [RFC6389] Aggarwal, R. and JL. Le Roux, "MPLS Upstream Label 4018 Assignment for LDP", RFC 6389, DOI 10.17487/RFC6389, 4019 November 2011, . 4021 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 4022 RFC 6991, DOI 10.17487/RFC6991, July 2013, 4023 . 4025 [RFC7552] Asati, R., Pignataro, C., Raza, K., Manral, V., and R. 4026 Papneja, "Updates to LDP for IPv6", RFC 7552, 4027 DOI 10.17487/RFC7552, June 2015, 4028 . 4030 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 4031 RFC 7950, DOI 10.17487/RFC7950, August 2016, 4032 . 4034 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 4035 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 4036 . 4038 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 4039 Zhang, "YANG Data Model for Key Chains", RFC 8177, 4040 DOI 10.17487/RFC8177, June 2017, 4041 . 4043 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 4044 "Common YANG Data Types for the Routing Area", RFC 8294, 4045 DOI 10.17487/RFC8294, December 2017, 4046 . 4048 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 4049 Access Control Model", STD 91, RFC 8341, 4050 DOI 10.17487/RFC8341, March 2018, 4051 . 4053 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 4054 and R. Wilton, "Network Management Datastore Architecture 4055 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 4056 . 4058 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 4059 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 4060 . 4062 [RFC8344] Bjorklund, M., "A YANG Data Model for IP Management", 4063 RFC 8344, DOI 10.17487/RFC8344, March 2018, 4064 . 4066 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 4067 Routing Management (NMDA Version)", RFC 8349, 4068 DOI 10.17487/RFC8349, March 2018, 4069 . 4071 [RFC8407] Bierman, A., "Guidelines for Authors and Reviewers of 4072 Documents Containing YANG Data Models", BCP 216, RFC 8407, 4073 DOI 10.17487/RFC8407, October 2018, 4074 . 4076 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 4077 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 4078 . 4080 [RFC8529] Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 4081 Liu, "YANG Data Model for Network Instances", RFC 8529, 4082 DOI 10.17487/RFC8529, March 2019, 4083 . 4085 15. Informative References 4087 [I-D.ietf-mpls-mldp-yang] 4088 Raza, K., Liu, X., Esale, S., Andersson, L., Tantsura, J., 4089 and S. Krishnaswamy, "YANG Data Model for MPLS mLDP", Work 4090 in Progress, Internet-Draft, draft-ietf-mpls-mldp-yang-06, 4091 31 May 2019, . 4094 [I-D.ietf-rtgwg-policy-model] 4095 Qu, Y., Tantsura, J., Lindem, A., and X. Liu, "A YANG Data 4096 Model for Routing Policy Management", Work in Progress, 4097 Internet-Draft, draft-ietf-rtgwg-policy-model-08, 2 4098 January 2020, . 4101 [RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private 4102 Networks (VPNs)", RFC 4364, DOI 10.17487/RFC4364, February 4103 2006, . 4105 [RFC7307] Zhao, Q., Raza, K., Zhou, C., Fang, L., Li, L., and D. 4106 King, "LDP Extensions for Multi-Topology", RFC 7307, 4107 DOI 10.17487/RFC7307, July 2014, 4108 . 4110 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 4111 RFC 7951, DOI 10.17487/RFC7951, August 2016, 4112 . 4114 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 4115 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 4116 . 4118 Appendix A. Data Tree Example 4120 This section contains an example of an instance data tree in the JSON 4121 encoding [RFC7951], containing both configuration and state data. 4123 +---------------------+ 4124 | | 4125 | Router 203.0.113.1 | 4126 | | 4127 +----------+----------+ 4128 |eth1 4129 |2001:db8:0:1::1/64 4130 | 4131 | 4132 |2001:db8:0:1::2/64 4133 +----------+----------+ 4134 | | | 4135 | Another Router +---------| 2001:db8:0:2::/64 4136 | | | 4137 +---------------------+ 4139 Figure 12: Example topology 4141 The configuration instance data tree for Router 203.0.113.1 in the 4142 above figure could be as follows: 4144 { 4145 "ietf-interfaces:interfaces": { 4146 "interface": [ 4147 { 4148 "name": "eth1", 4149 "description": "An interface with LDP enabled.", 4150 "type": "iana-if-type:ethernetCsmacd", 4151 "ietf-ip:ipv6": { 4152 "address": [ 4153 { 4154 "ip": "2001:db8:0:1::1", 4155 "prefix-length": 64 4156 } 4157 ], 4158 "forwarding": true 4159 } 4160 } 4161 ] 4162 }, 4163 "ietf-routing:routing": { 4164 "router-id": "203.0.113.1", 4165 "control-plane-protocols": { 4166 "control-plane-protocol": [ 4167 { 4168 "type": "ietf-mpls-ldp:mpls-ldp", 4169 "name": "ldp-1", 4170 "ietf-mpls-ldp:mpls-ldp": { 4171 "global": { 4172 "address-families": { 4173 "ietf-mpls-ldp-extended:ipv6": { 4174 "enabled": true, 4175 "transport-address": "2001:db8:0:1::1" 4176 } 4177 } 4178 }, 4179 "discovery": { 4180 "interfaces": { 4181 "interface": [ 4182 { 4183 "name": "eth1", 4184 "address-families": { 4185 "ietf-mpls-ldp-extended:ipv6": { 4186 "enabled": true 4187 } 4188 } 4189 } 4190 ] 4191 } 4192 } 4193 } 4194 } 4195 ] 4196 } 4197 } 4198 } 4200 Figure 13: Example Configuration data in JSON 4202 The corresponding operational state data for Router 203.0.113.1 could 4203 be as follows: 4205 { 4206 "ietf-interfaces:interfaces": { 4207 "interface": [ 4208 { 4209 "name": "eth1", 4210 "description": "An interface with LDP enabled.", 4211 "type": "iana-if-type:ethernetCsmacd", 4212 "phys-address": "00:00:5e:00:53:01", 4213 "oper-status": "up", 4214 "statistics": { 4215 "discontinuity-time": "2018-09-10T15:16:27-05:00" 4216 }, 4217 "ietf-ip:ipv6": { 4218 "forwarding": true, 4219 "mtu": 1500, 4220 "address": [ 4221 { 4222 "ip": "2001:db8:0:1::1", 4223 "prefix-length": 64, 4224 "origin": "static", 4225 "status": "preferred" 4226 }, 4227 { 4228 "ip": "fe80::200:5eff:fe00:5301", 4229 "prefix-length": 64, 4230 "origin": "link-layer", 4231 "status": "preferred" 4232 } 4233 ], 4234 "neighbor": [ 4235 { 4236 "ip": "2001:db8:0:1::2", 4237 "link-layer-address": "00:00:5e:00:53:02", 4238 "origin": "dynamic", 4239 "is-router": [null], 4240 "state": "reachable" 4241 }, 4242 { 4243 "ip": "fe80::200:5eff:fe00:5302", 4244 "link-layer-address": "00:00:5e:00:53:02", 4245 "origin": "dynamic", 4246 "is-router": [null], 4247 "state": "reachable" 4248 } 4249 ] 4250 } 4251 } 4252 ] 4253 }, 4254 "ietf-routing:routing": { 4255 "router-id": "203.0.113.1", 4256 "interfaces": { 4257 "interface": [ 4258 "eth1" 4259 ] 4260 }, 4261 "control-plane-protocols": { 4262 "control-plane-protocol": [ 4263 { 4264 "type": "ietf-mpls-ldp:mpls-ldp", 4265 "name": "ldp-1", 4266 "ietf-mpls-ldp:mpls-ldp": { 4267 "global": { 4268 "address-families": { 4269 "ietf-mpls-ldp-extended:ipv6": { 4270 "enabled": true, 4271 "transport-address": "2001:db8:0:1::1" 4272 } 4273 } 4274 }, 4275 "discovery": { 4276 "interfaces": { 4277 "interface": [ 4278 { 4279 "name": "eth1", 4280 "address-families": { 4281 "ietf-mpls-ldp-extended:ipv6": { 4282 "enabled": true, 4283 "hello-adjacencies": { 4284 "hello-adjacency": [ 4285 { 4286 "adjacent-address": 4287 "fe80::200:5eff:fe00:5302", 4288 "flag": ["adjacency-flag-active"], 4289 "hello-holdtime": { 4290 "adjacent": 15, 4291 "negotiated": 15, 4292 "remaining": 9 4293 }, 4294 "next-hello": 3, 4295 "statistics": { 4296 "discontinuity-time": 4297 "2018-09-10T15:16:27-05:00" 4298 }, 4299 "peer": { 4300 "lsr-id": "203.0.113.2", 4301 "label-space-id": 0 4302 } 4303 } 4304 ] 4305 } 4306 } 4307 } 4308 } 4310 ] 4311 } 4312 }, 4313 "peers": { 4314 "peer": [ 4315 { 4316 "lsr-id": "203.0.113.2", 4317 "label-space-id": 0, 4318 "label-advertisement-mode": { 4319 "local": "downstream-unsolicited", 4320 "peer": "downstream-unsolicited", 4321 "negotiated": "downstream-unsolicited" 4322 }, 4323 "next-keep-alive": 5, 4324 "session-holdtime": { 4325 "peer": 180, 4326 "negotiated": 180, 4327 "remaining": 78 4328 }, 4329 "session-state": "operational", 4330 "tcp-connection": { 4331 "local-address": "fe80::200:5eff:fe00:5301", 4332 "local-port": 646, 4333 "remote-address": "fe80::200:5eff:fe00:5302", 4334 "remote-port": 646 4335 }, 4336 "up-time": 3438100, 4337 "statistics": { 4338 "discontinuity-time": "2018-09-10T15:16:27-05:00" 4339 } 4340 } 4341 ] 4342 } 4343 } 4344 } 4345 ] 4346 } 4347 } 4348 } 4350 Figure 14: Example Operational data in JSON 4352 Authors' Addresses 4354 Kamran Raza (editor) 4355 Cisco Systems 4356 Canada 4357 Email: skraza@cisco.com 4359 Rajiv Asati 4360 Cisco Systems 4361 United States of America 4362 Email: rajiva@cisco.com 4364 Xufeng Liu 4365 Volta Networks 4366 United States of America 4367 Email: xufeng.liu.ietf@gmail.com 4369 Santosh Esale 4370 Juniper Networks 4371 United States of America 4372 Email: sesale@juniper.net 4374 Xia Chen 4375 Huawei Technologies 4376 China 4377 Email: jescia.chenxia@huawei.com 4379 Himanshu Shah 4380 Ciena Corporation 4381 United States of America 4382 Email: hshah@ciena.com