idnits 2.17.1 draft-ietf-bfd-yang-14.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet has text resembling RFC 2119 boilerplate text. -- The document date (June 1, 2018) is 2149 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-17) exists of draft-ietf-mpls-base-yang-06 == Outdated reference: A later version (-36) exists of draft-ietf-teas-yang-te-14 ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group R. Rahman, Ed. 3 Internet-Draft Cisco Systems 4 Intended status: Standards Track L. Zheng, Ed. 5 Expires: December 3, 2018 Huawei Technologies 6 M. Jethanandani, Ed. 8 S. Pallagatti 10 G. Mirsky 11 ZTE Corporation 12 June 1, 2018 14 YANG Data Model for Bidirectional Forwarding Detection (BFD) 15 draft-ietf-bfd-yang-14 17 Abstract 19 This document defines a YANG data model that can be used to configure 20 and manage Bidirectional Forwarding Detection (BFD). 22 The YANG modules in this document conform to the Network Management 23 Datastore Architecture (NMDA). 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at https://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on December 3, 2018. 42 Copyright Notice 44 Copyright (c) 2018 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (https://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 60 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 61 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 4 62 2. Design of the Data Model . . . . . . . . . . . . . . . . . . 4 63 2.1. Design of Configuration Model . . . . . . . . . . . . . . 5 64 2.1.1. Common BFD configuration parameters . . . . . . . . . 6 65 2.1.2. Single-hop IP . . . . . . . . . . . . . . . . . . . . 7 66 2.1.3. Multihop IP . . . . . . . . . . . . . . . . . . . . . 7 67 2.1.4. MPLS Traffic Engineering Tunnels . . . . . . . . . . 8 68 2.1.5. MPLS Label Switched Paths . . . . . . . . . . . . . . 9 69 2.1.6. Link Aggregation Groups . . . . . . . . . . . . . . . 9 70 2.2. Design of Operational State Model . . . . . . . . . . . . 9 71 2.3. Notifications . . . . . . . . . . . . . . . . . . . . . . 10 72 2.4. RPC Operations . . . . . . . . . . . . . . . . . . . . . 10 73 2.5. BFD top level hierarchy . . . . . . . . . . . . . . . . . 10 74 2.6. BFD IP single-hop hierarchy . . . . . . . . . . . . . . . 10 75 2.7. BFD IP multihop hierarchy . . . . . . . . . . . . . . . . 12 76 2.8. BFD over LAG hierarchy . . . . . . . . . . . . . . . . . 14 77 2.9. BFD over MPLS LSPs hierarchy . . . . . . . . . . . . . . 18 78 2.10. BFD over MPLS-TE hierarchy . . . . . . . . . . . . . . . 20 79 2.11. Interaction with other YANG modules . . . . . . . . . . . 22 80 2.11.1. Module ietf-interfaces . . . . . . . . . . . . . . . 22 81 2.11.2. Module ietf-ip . . . . . . . . . . . . . . . . . . . 22 82 2.11.3. Module ietf-mpls . . . . . . . . . . . . . . . . . . 23 83 2.11.4. Module ietf-te . . . . . . . . . . . . . . . . . . . 23 84 2.12. IANA BFD YANG Module . . . . . . . . . . . . . . . . . . 23 85 2.13. BFD types YANG Module . . . . . . . . . . . . . . . . . . 26 86 2.14. BFD top-level YANG Module . . . . . . . . . . . . . . . . 39 87 2.15. BFD IP single-hop YANG Module . . . . . . . . . . . . . . 40 88 2.16. BFD IP multihop YANG Module . . . . . . . . . . . . . . . 44 89 2.17. BFD over LAG YANG Module . . . . . . . . . . . . . . . . 47 90 2.18. BFD over MPLS YANG Module . . . . . . . . . . . . . . . . 51 91 2.19. BFD over MPLS-TE YANG Module . . . . . . . . . . . . . . 55 92 3. Data Model examples . . . . . . . . . . . . . . . . . . . . . 58 93 3.1. IP single-hop . . . . . . . . . . . . . . . . . . . . . . 58 94 3.2. IP multihop . . . . . . . . . . . . . . . . . . . . . . . 59 95 3.3. LAG . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 96 3.4. MPLS . . . . . . . . . . . . . . . . . . . . . . . . . . 60 98 4. Security Considerations . . . . . . . . . . . . . . . . . . . 61 99 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 64 100 5.1. IANA-Maintained iana-bfd-types module . . . . . . . . . . 65 101 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 65 102 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 66 103 7.1. Normative References . . . . . . . . . . . . . . . . . . 66 104 7.2. Informative References . . . . . . . . . . . . . . . . . 68 105 Appendix A. Echo function configuration example . . . . . . . . 69 106 A.1. Example YANG module for BFD echo function configuration . 69 107 Appendix B. Change log . . . . . . . . . . . . . . . . . . . . . 71 108 B.1. Changes between versions -13 and -14 . . . . . . . . . . 71 109 B.2. Changes between versions -12 and -13 . . . . . . . . . . 71 110 B.3. Changes between versions -11 and -12 . . . . . . . . . . 71 111 B.4. Changes between versions -10 and -11 . . . . . . . . . . 71 112 B.5. Changes between versions -09 and -10 . . . . . . . . . . 72 113 B.6. Changes between versions -08 and -09 . . . . . . . . . . 72 114 B.7. Changes between versions -07 and -08 . . . . . . . . . . 72 115 B.8. Changes between versions -06 and -07 . . . . . . . . . . 72 116 B.9. Changes between versions -05 and -06 . . . . . . . . . . 72 117 B.10. Changes between versions -04 and -05 . . . . . . . . . . 73 118 B.11. Changes between versions -03 and -04 . . . . . . . . . . 73 119 B.12. Changes between versions -02 and -03 . . . . . . . . . . 73 120 B.13. Changes between versions -01 and -02 . . . . . . . . . . 73 121 B.14. Changes between versions -00 and -01 . . . . . . . . . . 73 122 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 73 124 1. Introduction 126 This document defines a YANG data model that can be used to configure 127 and manage Bidirectional Forwarding Detection (BFD) [RFC5880]. BFD 128 is a network protocol which is used for liveness detection of 129 arbitrary paths between systems. Some examples of different types of 130 paths over which we have BFD: 132 1) Two systems directly connected via IP. This is known as BFD over 133 single-hop IP, a.k.a. BFD for IPv4 and IPv6 [RFC5881] 135 2) Two systems connected via multiple hops as described in BFD for 136 Multiple Hops. [RFC5883] 138 3) Two systems connected via MPLS Label Switched Paths (LSPs) as 139 described in BFD for MPLS LSP [RFC5884] 141 4) Two systems connected via a Link Aggregation Group (LAG) interface 142 as described in BFD on LAG Interfaces [RFC7130] 143 5) Two systems connected via pseudowires (PWs), this is known as 144 Virtual Circuit Connectivity Verification (VCCV) as described in BFD 145 for PW VCCV [RFC5885]. This is not addressed in this document. 147 BFD typically does not operate on its own. Various control 148 protocols, also known as BFD clients, use the services provided by 149 BFD for their own operation as described in Generic Application of 150 BFD [RFC5882]. The obvious candidates which use BFD are those which 151 do not have "hellos" to detect failures, e.g. static routes, and 152 routing protocols whose "hellos" do not support sub-second failure 153 detection, e.g. OSPF and IS-IS. 155 The YANG modules in this document conform to the Network Management 156 Datastore Architecture (NMDA) Network Management Datastore 157 Architecture [RFC8342]. This means that the data models do not have 158 separate top-level or sibling containers for configuration and 159 operational state data. 161 1.1. Requirements Language 163 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 164 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 165 document are to be interpreted as described in BCP 14 [RFC2119] 166 [RFC8174] when, and only when, they appear in all capitals, as shown 167 here. 169 1.2. Tree Diagrams 171 This document uses the graphical representation of data models 172 defined in [RFC8340]. 174 2. Design of the Data Model 176 Since BFD is used for liveliness detection of various forwarding 177 paths, there is no uniform key to identify a BFD session. So the BFD 178 data model is split in multiple YANG modules where each module 179 corresponds to one type of forwarding path. For example, BFD for IP 180 single-hop is in one YANG module and BFD for MPLS-TE is in another 181 YANG module. The main difference between these modules is how a BFD 182 session is uniquely identified, i.e the key for the list containing 183 the BFD sessions for that forwarding path. To avoid duplication of 184 BFD definitions, we have common types and groupings which are used by 185 all the modules. 187 A new control-plane protocol "bfdv1" is defined and a "bfd" container 188 is created under control-plane-protocol as specified in "A YANG Data 189 Model for Routing Management (NMDA Version)" [RFC8349]. This new 190 "bfd" container is augmented by all the YANG modules for their 191 respective specific information: 193 1. ietf-bfd-ip-sh.yang augments "/routing/control-plane-protocols/ 194 control-plane-protocol/bfd/" with the "ip-sh" container for BFD 195 sessions over IP single-hop. 197 2. ietf-bfd-ip-mh.yang augments "/routing/control-plane-protocols/ 198 control-plane-protocol/bfd/" with the "ip-mh" container for BFD 199 sessions over IP multi-hop. 201 3. ietf-bfd-lag.yang augments "/routing/control-plane-protocols/ 202 control-plane-protocol/bfd/" with the "lag" container for BFD 203 sessions over LAG. 205 4. ietf-bfd-mpls.yang augments "/routing/control-plane-protocols/ 206 control-plane-protocol/bfd/" with the "mpls" container for BFD 207 over MPLS LSPs. 209 5. ietf-bfd-mpls-te.yang augments "/routing/control-plane-protocols/ 210 control-plane-protocol/bfd/" with the "mpls-te" container for BFD 211 over MPLS-TE. 213 BFD can operate in the following contexts: 215 1. At the network device level 217 2. In Logical Network Elements as described in YANG Logical Network 218 Element [I-D.ietf-rtgwg-lne-model] 220 3. In Network Instances as described in YANG Logical Network Element 221 [I-D.ietf-rtgwg-ni-model] 223 When used at the network device level, the BFD YANG model is used 224 "as-is". When the BFD YANG model is used in a Logical Network 225 Element or in a Network Instance, then the BFD YANG model augments 226 the mounted routing model for the Logical Network Element or the 227 Network Instance. 229 2.1. Design of Configuration Model 231 The configuration model consists mainly of the parameters specified 232 in BFD [RFC5880]. Some examples are desired minimum transmit 233 interval, required minimum receive interval, detection multiplier, 234 etc 236 BFD clients are applications that use BFD for fast detection of 237 failures. Some implementations have BFD session configuration under 238 the BFD clients. For example, BFD session configuration under 239 routing applications such as OSPF, IS-IS, BGP etc. Other 240 implementations have BFD session configuration centralized under BFD, 241 i.e. outside the multiple BFD clients. 243 The BFD parameters of interest to a BFD client are mainly the 244 multiplier and interval(s) since those parameters impact the 245 convergence time of the BFD clients when a failure occurs. Other 246 parameters such as BFD authentication are not specific to the 247 requirements of the BFD client. Ideally all configuration should be 248 centralized under BFD. However, this is a problem for clients of BFD 249 which auto-discover their peers. For example, IGPs do not have the 250 peer address configured, instead the IGP is enabled on an interface 251 and the IGP peers are auto-discovered. So for an operator to 252 configure BFD to an IGP peer, the operator would first have to 253 determine the peer addresses. And when a new peer is discovered, BFD 254 configuration would need to be added. To avoid this issue, we define 255 grouping client-cfg-parms in Section 2.13 for BFD clients to 256 configure BFD: this allows BFD clients such as the IGPs to have 257 configuration (multiplier and intervals) for the BFD sessions they 258 need. For example, when a new IGP peer is discovered, the IGP would 259 create a BFD session to the newly discovered peer and similarly when 260 an IGP peer goes away, the IGP would remove the BFD session to that 261 peer. The mechanism how the BFD sessions are created and removed by 262 the BFD clients is outside the scope of this document, but typically 263 this would be done by use of an API implemented by the BFD module on 264 the system. For BFD clients which create BFD sessions via their own 265 configuration, authentication parameters (if required) are still 266 specified in BFD. 268 2.1.1. Common BFD configuration parameters 270 The basic BFD configuration parameters are: 272 local-multiplier 273 This is the detection time multiplier as defined in BFD 274 [RFC5880]. 276 desired-min-tx-interval 277 This is the Desired Min TX Interval as defined in BFD 278 [RFC5880]. 280 required-min-rx-interval 281 This is the Required Min RX Interval as defined in BFD 282 [RFC5880]. 284 Although BFD [RFC5880] allows for different values for transmit and 285 receive intervals, some implementations allow users to specify just 286 one interval which is used for both transmit and receive intervals or 287 separate values for transmit and receive intervals. The BFD YANG 288 model supports this: there is a choice between "min-interval", used 289 for both transmit and receive intervals, and "desired-min-tx- 290 interval" and "required-min-rx-interval". This is supported via a 291 grouping which is used by the YANG modules for the various forwarding 292 paths. 294 For BFD authentication we have: 296 key-chain 297 This is a reference to key-chain defined in YANG Data Model 298 for Key Chains [RFC8177]. The keys, cryptographic 299 algorithms, key lifetime etc are all defined in the key-chain 300 model. 302 meticulous 303 This enables meticulous mode as per BFD [RFC5880]. 305 2.1.2. Single-hop IP 307 For single-hop IP, there is an augment of the "bfd" data node in 308 Section 2. The "ip-sh" node contains a list of IP single-hop 309 sessions where each session is uniquely identified by the interface 310 and destination address pair. For the configuration parameters we 311 use what is defined in Section 2.1.1. The "ip-sh" node also contains 312 a list of interfaces, this is used to specify authentication 313 parameters for BFD sessions which are created by BFD clients, see 314 Section 2.1. 316 [RFC5880] and [RFC5881] do not specify whether echo function is 317 continuous or on demand. Therefore the mechanism used to start and 318 stop echo function is implementation specific and should be done by 319 augmentation: 321 1) Configuration. This is suitable for continuous echo function. 322 An example is provided in Appendix A. 324 2) RPC. This is suitable for on-demand echo function. 326 2.1.3. Multihop IP 328 For multihop IP, there is an augment of the "bfd" data node in 329 Section 2. 331 Because of multiple paths, there could be multiple multihop IP 332 sessions between a source and a destination address. We identify 333 this as a "session-group". The key for each "session-group" consists 334 of: 336 source address 337 Address belonging to the local system as per BFD for Multiple 338 Hops [RFC5883] 340 destination address 341 Address belonging to the remote system as per BFD for 342 Multiple Hops [RFC5883] 344 For the configuration parameters we use what is defined in 345 Section 2.1.1 347 Here are some extra parameters: 349 tx-ttl 350 TTL of outgoing BFD control packets. 352 rx-ttl 353 Minimum TTL of incoming BFD control packets. 355 2.1.4. MPLS Traffic Engineering Tunnels 357 For MPLS-TE tunnels, BFD is configured under the MPLS-TE tunnel since 358 the desired failure detection parameters is a property of the MPLS-TE 359 tunnel. This is achieved by augmenting the MPLS-TE data model in 360 YANG Data Model for TE Topologies [I-D.ietf-teas-yang-te]. For BFD 361 parameters which are specific to the TE application, e.g. whether to 362 tear down the tunnel in the event of a BFD session failure, these 363 parameters will be defined in the YANG model of the MPLS-TE 364 application. 366 On top of the usual BFD parameters, we have the following per MPLS-TE 367 tunnel: 369 encap 370 Encapsulation for the BFD packets: choice between IP, G-ACh 371 and IP with G-ACh as per MPLS Generic Associated Channel 372 [RFC5586] 374 For general MPLS-TE data, "mpls-te" data node is added under the 375 "bfd" node in Section 2. Since some MPLS-TE tunnels are uni- 376 directional there is no MPLS-TE configuration for these tunnels on 377 the egress node (note that this does not apply to bi-directional 378 MPLS-TP tunnels). The BFD parameters for the egress node are added 379 under "mpls-te". 381 2.1.5. MPLS Label Switched Paths 383 Here we address MPLS LSPs whose FEC is an IP address. The "bfd" node 384 in Section 2 is augmented with "mpls" which contains a list of 385 sessions uniquely identified by an IP prefix. Because of multiple 386 paths, there could be multiple MPLS sessions to an MPLS FEC. We 387 identify this as a "session-group". 389 Since these LSPs are uni-directional there is no LSP configuration on 390 the egress node. 392 The BFD parameters for the egress node are added under "mpls". 394 2.1.6. Link Aggregation Groups 396 Per BFD on LAG Interfaces [RFC7130], configuring BFD on LAG consists 397 of having micro-BFD sessions on each LAG member link. Since the BFD 398 parameters are an attribute of the LAG, they should be under the LAG. 399 However there is no LAG YANG model which we can augment. So a "lag" 400 data node is added to the "bfd" node in Section 2, the configuration 401 is per-LAG: we have a list of LAGs. The destination IP address of 402 the micro-BFD sessions is configured per-LAG and per address-family 403 (IPv4 and IPv6) 405 2.2. Design of Operational State Model 407 The operational state model contains both the overall statistics of 408 BFD sessions running on the device and the per session operational 409 information. 411 The overall statistics of BFD sessions consist of number of BFD 412 sessions, number of BFD sessions up etc. This information is 413 available globally (i.e. for all BFD sessions) under the "bfd" node 414 in Section 2 and also per type of forwarding path. 416 For each BFD session, mainly three categories of operational state 417 data are shown. The fundamental information of a BFD session such as 418 the local discriminator, remote discriminator and the capability of 419 supporting demand detect mode are shown in the first category. The 420 second category includes a BFD session running information, e.g. the 421 remote BFD state and the diagnostic code received. Another example 422 is the actual transmit interval between the control packets, which 423 may be different from the desired minimum transmit interval 424 configured, is shown in this category. Similar examples are actual 425 received interval between the control packets and the actual transmit 426 interval between the echo packets. The third category contains the 427 detailed statistics of the session, e.g. when the session 428 transitioned up/down and how long it has been in that state. 430 For some path types, there may be more than 1 session on the virtual 431 path to the destination. For example, with IP multihop and MPLS 432 LSPs, there could be multiple BFD sessions from the source to the 433 same destination to test the various paths (ECMP) to the destination. 434 This is represented by having multiple "sessions" under each 435 "session-group". 437 2.3. Notifications 439 This YANG model defines notifications to inform end-users of 440 important events detected during the protocol operation. Pair of 441 local and remote discriminator identifies a BFD session on local 442 system. Notifications also give more important details about BFD 443 sessions; e.g. new state, time in previous state, network-instance 444 and the reason that the BFD session state changed. The notifications 445 are defined for each type of forwarding path but use groupings for 446 common information. 448 2.4. RPC Operations 450 None. 452 2.5. BFD top level hierarchy 454 At the "bfd" node under control-plane-protocol, there is no 455 configuration data, only operational state data. The operational 456 state data consist of overall BFD session statistics, i.e. for BFD on 457 all types of forwarding paths. 459 module: ietf-bfd 460 augment /rt:routing/rt:control-plane-protocols 461 /rt:control-plane-protocol: 462 +--rw bfd 463 +--ro summary 464 +--ro number-of-sessions? yang:gauge32 465 +--ro number-of-sessions-up? yang:gauge32 466 +--ro number-of-sessions-down? yang:gauge32 467 +--ro number-of-sessions-admin-down? yang:gauge32 469 2.6. BFD IP single-hop hierarchy 471 An "ip-sh" node is added under "bfd" node in control-plane-protocol. 472 The configuration and operational state data for each BFD IP single- 473 hop session is under this "ip-sh" node. 475 module: ietf-bfd-ip-sh 476 augment /rt:routing/rt:control-plane-protocols 477 /rt:control-plane-protocol/bfd:bfd: 478 +--rw ip-sh 479 +--ro summary 480 | +--ro number-of-sessions? yang:gauge32 481 | +--ro number-of-sessions-up? yang:gauge32 482 | +--ro number-of-sessions-down? yang:gauge32 483 | +--ro number-of-sessions-admin-down? yang:gauge32 484 +--rw sessions 485 | +--rw session* [interface dest-addr] 486 | +--rw interface if:interface-ref 487 | +--rw dest-addr inet:ip-address 488 | +--rw source-addr? inet:ip-address 489 | +--rw local-multiplier? multiplier 490 | +--rw (interval-config-type)? 491 | | +--:(tx-rx-intervals) 492 | | | +--rw desired-min-tx-interval? uint32 493 | | | +--rw required-min-rx-interval? uint32 494 | | +--:(single-interval) {single-minimum-interval}? 495 | | +--rw min-interval? uint32 496 | +--rw demand-enabled? boolean 497 | | {demand-mode}? 498 | +--rw admin-down? boolean 499 | +--rw authentication! {authentication}? 500 | | +--rw key-chain? kc:key-chain-ref 501 | | +--rw meticulous? boolean 502 | +--ro path-type? identityref 503 | +--ro ip-encapsulation? boolean 504 | +--ro local-discriminator? discriminator 505 | +--ro remote-discriminator? discriminator 506 | +--ro remote-multiplier? multiplier 507 | +--ro demand-capability? boolean 508 | | {demand-mode}? 509 | +--ro source-port? inet:port-number 510 | +--ro dest-port? inet:port-number 511 | +--ro session-running 512 | | +--ro session-index? uint32 513 | | +--ro local-state? state 514 | | +--ro remote-state? state 515 | | +--ro local-diagnostic? 516 | | | iana-bfd-types:diagnostic 517 | | +--ro remote-diagnostic? 518 | | | iana-bfd-types:diagnostic 519 | | +--ro remote-authenticated? boolean 520 | | +--ro remote-authentication-type? 521 | | | iana-bfd-types:auth-type {authentication}? 522 | | +--ro detection-mode? enumeration 523 | | +--ro negotiated-tx-interval? uint32 524 | | +--ro negotiated-rx-interval? uint32 525 | | +--ro detection-time? uint32 526 | | +--ro echo-tx-interval-in-use? uint32 527 | | {echo-mode}? 528 | +--ro session-statistics 529 | +--ro create-time? 530 | | yang:date-and-time 531 | +--ro last-down-time? 532 | | yang:date-and-time 533 | +--ro last-up-time? 534 | | yang:date-and-time 535 | +--ro down-count? yang:counter32 536 | +--ro admin-down-count? yang:counter32 537 | +--ro receive-packet-count? yang:counter64 538 | +--ro send-packet-count? yang:counter64 539 | +--ro receive-invalid-packet-count? yang:counter64 540 | +--ro send-failed-packet-count? yang:counter64 541 +--rw interfaces* [interface] 542 +--rw interface if:interface-ref 543 +--rw authentication! {authentication}? 544 +--rw key-chain? kc:key-chain-ref 545 +--rw meticulous? boolean 547 notifications: 548 +---n singlehop-notification 549 +--ro local-discr? discriminator 550 +--ro remote-discr? discriminator 551 +--ro new-state? state 552 +--ro state-change-reason? iana-bfd-types:diagnostic 553 +--ro time-of-last-state-change? yang:date-and-time 554 +--ro dest-addr? inet:ip-address 555 +--ro source-addr? inet:ip-address 556 +--ro session-index? uint32 557 +--ro path-type? identityref 558 +--ro interface? if:interface-ref 559 +--ro echo-enabled? boolean 561 2.7. BFD IP multihop hierarchy 563 An "ip-mh" node is added under the "bfd" node in cntrol-plane- 564 protocol. The configuration and operational state data for each BFD 565 IP multihop session is under this "ip-mh" node. In the operational 566 state model we support multiple BFD multihop sessions per remote 567 address (ECMP), the local discriminator is used as key. 569 module: ietf-bfd-ip-mh 570 augment /rt:routing/rt:control-plane-protocols 571 /rt:control-plane-protocol/bfd:bfd: 572 +--rw ip-mh 573 +--ro summary 574 | +--ro number-of-sessions? yang:gauge32 575 | +--ro number-of-sessions-up? yang:gauge32 576 | +--ro number-of-sessions-down? yang:gauge32 577 | +--ro number-of-sessions-admin-down? yang:gauge32 578 +--rw session-groups 579 +--rw session-group* [source-addr dest-addr] 580 +--rw source-addr inet:ip-address 581 +--rw dest-addr inet:ip-address 582 +--rw local-multiplier? multiplier 583 +--rw (interval-config-type)? 584 | +--:(tx-rx-intervals) 585 | | +--rw desired-min-tx-interval? uint32 586 | | +--rw required-min-rx-interval? uint32 587 | +--:(single-interval) {single-minimum-interval}? 588 | +--rw min-interval? uint32 589 +--rw demand-enabled? boolean 590 | {demand-mode}? 591 +--rw admin-down? boolean 592 +--rw authentication! {authentication}? 593 | +--rw key-chain? kc:key-chain-ref 594 | +--rw meticulous? boolean 595 +--rw tx-ttl? bfd-types:hops 596 +--rw rx-ttl bfd-types:hops 597 +--ro sessions* [] 598 +--ro path-type? identityref 599 +--ro ip-encapsulation? boolean 600 +--ro local-discriminator? discriminator 601 +--ro remote-discriminator? discriminator 602 +--ro remote-multiplier? multiplier 603 +--ro demand-capability? boolean {demand-mode}? 604 +--ro source-port? inet:port-number 605 +--ro dest-port? inet:port-number 606 +--ro session-running 607 | +--ro session-index? uint32 608 | +--ro local-state? state 609 | +--ro remote-state? state 610 | +--ro local-diagnostic? 611 | | iana-bfd-types:diagnostic 612 | +--ro remote-diagnostic? 613 | | iana-bfd-types:diagnostic 614 | +--ro remote-authenticated? boolean 615 | +--ro remote-authentication-type? 616 | | iana-bfd-types:auth-type {authentication}? 617 | +--ro detection-mode? enumeration 618 | +--ro negotiated-tx-interval? uint32 619 | +--ro negotiated-rx-interval? uint32 620 | +--ro detection-time? uint32 621 | +--ro echo-tx-interval-in-use? uint32 622 | {echo-mode}? 623 +--ro session-statistics 624 +--ro create-time? 625 | yang:date-and-time 626 +--ro last-down-time? 627 | yang:date-and-time 628 +--ro last-up-time? 629 | yang:date-and-time 630 +--ro down-count? 631 | yang:counter32 632 +--ro admin-down-count? 633 | yang:counter32 634 +--ro receive-packet-count? 635 | yang:counter64 636 +--ro send-packet-count? 637 | yang:counter64 638 +--ro receive-invalid-packet-count? 639 | yang:counter64 640 +--ro send-failed-packet-count? 641 yang:counter64 643 notifications: 644 +---n multihop-notification 645 +--ro local-discr? discriminator 646 +--ro remote-discr? discriminator 647 +--ro new-state? state 648 +--ro state-change-reason? iana-bfd-types:diagnostic 649 +--ro time-of-last-state-change? yang:date-and-time 650 +--ro dest-addr? inet:ip-address 651 +--ro source-addr? inet:ip-address 652 +--ro session-index? uint32 653 +--ro path-type? identityref 655 2.8. BFD over LAG hierarchy 657 A "lag" node is added under the "bfd" node in control-plane-protocol. 658 The configuration and operational state data for each BFD LAG session 659 is under this "lag" node. 661 module: ietf-bfd-lag 662 augment /rt:routing/rt:control-plane-protocols 663 /rt:control-plane-protocol/bfd:bfd: 664 +--rw lag 665 +--rw micro-bfd-ipv4-session-statistics 666 | +--ro summary 667 | +--ro number-of-sessions? yang:gauge32 668 | +--ro number-of-sessions-up? yang:gauge32 669 | +--ro number-of-sessions-down? yang:gauge32 670 | +--ro number-of-sessions-admin-down? yang:gauge32 671 +--rw micro-bfd-ipv6-session-statistics 672 | +--ro summary 673 | +--ro number-of-sessions? yang:gauge32 674 | +--ro number-of-sessions-up? yang:gauge32 675 | +--ro number-of-sessions-down? yang:gauge32 676 | +--ro number-of-sessions-admin-down? yang:gauge32 677 +--rw sessions 678 +--rw session* [lag-name] 679 +--rw lag-name if:interface-ref 680 +--rw ipv4-dest-addr? 681 | inet:ipv4-address 682 +--rw ipv6-dest-addr? 683 | inet:ipv6-address 684 +--rw local-multiplier? multiplier 685 +--rw (interval-config-type)? 686 | +--:(tx-rx-intervals) 687 | | +--rw desired-min-tx-interval? uint32 688 | | +--rw required-min-rx-interval? uint32 689 | +--:(single-interval) {single-minimum-interval}? 690 | +--rw min-interval? uint32 691 +--rw demand-enabled? boolean 692 | {demand-mode}? 693 +--rw admin-down? boolean 694 +--rw authentication! {authentication}? 695 | +--rw key-chain? kc:key-chain-ref 696 | +--rw meticulous? boolean 697 +--rw use-ipv4? boolean 698 +--rw use-ipv6? boolean 699 +--ro member-links* [member-link] 700 +--ro member-link if:interface-ref 701 +--ro micro-bfd-ipv4 702 | +--ro path-type? identityref 703 | +--ro ip-encapsulation? boolean 704 | +--ro local-discriminator? discriminator 705 | +--ro remote-discriminator? discriminator 706 | +--ro remote-multiplier? multiplier 707 | +--ro demand-capability? boolean 708 | | {demand-mode}? 709 | +--ro source-port? inet:port-number 710 | +--ro dest-port? inet:port-number 711 | +--ro session-running 712 | | +--ro session-index? uint32 713 | | +--ro local-state? state 714 | | +--ro remote-state? state 715 | | +--ro local-diagnostic? 716 | | | iana-bfd-types:diagnostic 717 | | +--ro remote-diagnostic? 718 | | | iana-bfd-types:diagnostic 719 | | +--ro remote-authenticated? boolean 720 | | +--ro remote-authentication-type? 721 | | | iana-bfd-types:auth-type 722 | | | {authentication}? 723 | | +--ro detection-mode? enumeration 724 | | +--ro negotiated-tx-interval? uint32 725 | | +--ro negotiated-rx-interval? uint32 726 | | +--ro detection-time? uint32 727 | | +--ro echo-tx-interval-in-use? uint32 728 | | {echo-mode}? 729 | +--ro session-statistics 730 | +--ro create-time? 731 | | yang:date-and-time 732 | +--ro last-down-time? 733 | | yang:date-and-time 734 | +--ro last-up-time? 735 | | yang:date-and-time 736 | +--ro down-count? 737 | | yang:counter32 738 | +--ro admin-down-count? 739 | | yang:counter32 740 | +--ro receive-packet-count? 741 | | yang:counter64 742 | +--ro send-packet-count? 743 | | yang:counter64 744 | +--ro receive-invalid-packet-count? 745 | | yang:counter64 746 | +--ro send-failed-packet-count? 747 | yang:counter64 748 +--ro micro-bfd-ipv6 749 +--ro path-type? identityref 750 +--ro ip-encapsulation? boolean 751 +--ro local-discriminator? discriminator 752 +--ro remote-discriminator? discriminator 753 +--ro remote-multiplier? multiplier 754 +--ro demand-capability? boolean 755 | {demand-mode}? 756 +--ro source-port? inet:port-number 757 +--ro dest-port? inet:port-number 758 +--ro session-running 759 | +--ro session-index? uint32 760 | +--ro local-state? state 761 | +--ro remote-state? state 762 | +--ro local-diagnostic? 763 | | iana-bfd-types:diagnostic 764 | +--ro remote-diagnostic? 765 | | iana-bfd-types:diagnostic 766 | +--ro remote-authenticated? boolean 767 | +--ro remote-authentication-type? 768 | | iana-bfd-types:auth-type 769 | | {authentication}? 770 | +--ro detection-mode? enumeration 771 | +--ro negotiated-tx-interval? uint32 772 | +--ro negotiated-rx-interval? uint32 773 | +--ro detection-time? uint32 774 | +--ro echo-tx-interval-in-use? uint32 775 | {echo-mode}? 776 +--ro session-statistics 777 +--ro create-time? 778 | yang:date-and-time 779 +--ro last-down-time? 780 | yang:date-and-time 781 +--ro last-up-time? 782 | yang:date-and-time 783 +--ro down-count? 784 | yang:counter32 785 +--ro admin-down-count? 786 | yang:counter32 787 +--ro receive-packet-count? 788 | yang:counter64 789 +--ro send-packet-count? 790 | yang:counter64 791 +--ro receive-invalid-packet-count? 792 | yang:counter64 793 +--ro send-failed-packet-count? 794 yang:counter64 796 notifications: 797 +---n lag-notification 798 +--ro local-discr? discriminator 799 +--ro remote-discr? discriminator 800 +--ro new-state? state 801 +--ro state-change-reason? iana-bfd-types:diagnostic 802 +--ro time-of-last-state-change? yang:date-and-time 803 +--ro dest-addr? inet:ip-address 804 +--ro source-addr? inet:ip-address 805 +--ro session-index? uint32 806 +--ro path-type? identityref 807 +--ro lag-name? if:interface-ref 808 +--ro member-link? if:interface-ref 810 2.9. BFD over MPLS LSPs hierarchy 812 An "mpls" node is added under the "bfd" node in control-plane- 813 protocol. The configuration is per MPLS FEC under this "mpls" node. 814 In the operational state model we support multiple BFD sessions per 815 MPLS FEC (ECMP), the local discriminator is used as key. The "mpls" 816 node can be used in a network device (top-level), or mounted in an 817 LNE or in a network instance. 819 module: ietf-bfd-mpls 820 augment /rt:routing/rt:control-plane-protocols 821 /rt:control-plane-protocol/bfd:bfd: 822 +--rw mpls 823 +--ro summary 824 | +--ro number-of-sessions? yang:gauge32 825 | +--ro number-of-sessions-up? yang:gauge32 826 | +--ro number-of-sessions-down? yang:gauge32 827 | +--ro number-of-sessions-admin-down? yang:gauge32 828 +--rw egress 829 | +--rw enable? boolean 830 | +--rw local-multiplier? multiplier 831 | +--rw (interval-config-type)? 832 | | +--:(tx-rx-intervals) 833 | | | +--rw desired-min-tx-interval? uint32 834 | | | +--rw required-min-rx-interval? uint32 835 | | +--:(single-interval) {single-minimum-interval}? 836 | | +--rw min-interval? uint32 837 | +--rw authentication! {authentication}? 838 | +--rw key-chain? kc:key-chain-ref 839 | +--rw meticulous? boolean 840 +--rw session-groups 841 +--rw session-group* [mpls-fec] 842 +--rw mpls-fec inet:ip-prefix 843 +--rw local-multiplier? multiplier 844 +--rw (interval-config-type)? 845 | +--:(tx-rx-intervals) 846 | | +--rw desired-min-tx-interval? uint32 847 | | +--rw required-min-rx-interval? uint32 848 | +--:(single-interval) {single-minimum-interval}? 849 | +--rw min-interval? uint32 850 +--rw demand-enabled? boolean 851 | {demand-mode}? 852 +--rw admin-down? boolean 853 +--rw authentication! {authentication}? 854 | +--rw key-chain? kc:key-chain-ref 855 | +--rw meticulous? boolean 856 +--ro sessions* [] 857 +--ro path-type? identityref 858 +--ro ip-encapsulation? boolean 859 +--ro local-discriminator? discriminator 860 +--ro remote-discriminator? discriminator 861 +--ro remote-multiplier? multiplier 862 +--ro demand-capability? boolean {demand-mode}? 863 +--ro source-port? inet:port-number 864 +--ro dest-port? inet:port-number 865 +--ro session-running 866 | +--ro session-index? uint32 867 | +--ro local-state? state 868 | +--ro remote-state? state 869 | +--ro local-diagnostic? 870 | | iana-bfd-types:diagnostic 871 | +--ro remote-diagnostic? 872 | | iana-bfd-types:diagnostic 873 | +--ro remote-authenticated? boolean 874 | +--ro remote-authentication-type? 875 | | iana-bfd-types:auth-type {authentication}? 876 | +--ro detection-mode? enumeration 877 | +--ro negotiated-tx-interval? uint32 878 | +--ro negotiated-rx-interval? uint32 879 | +--ro detection-time? uint32 880 | +--ro echo-tx-interval-in-use? uint32 881 | {echo-mode}? 882 +--ro session-statistics 883 | +--ro create-time? 884 | | yang:date-and-time 885 | +--ro last-down-time? 886 | | yang:date-and-time 887 | +--ro last-up-time? 888 | | yang:date-and-time 889 | +--ro down-count? 890 | | yang:counter32 891 | +--ro admin-down-count? 892 | | yang:counter32 893 | +--ro receive-packet-count? 894 | | yang:counter64 895 | +--ro send-packet-count? 896 | | yang:counter64 897 | +--ro receive-invalid-packet-count? 898 | | yang:counter64 899 | +--ro send-failed-packet-count? 900 | yang:counter64 901 +--ro mpls-dest-address? inet:ip-address 903 notifications: 904 +---n mpls-notification 905 +--ro local-discr? discriminator 906 +--ro remote-discr? discriminator 907 +--ro new-state? state 908 +--ro state-change-reason? iana-bfd-types:diagnostic 909 +--ro time-of-last-state-change? yang:date-and-time 910 +--ro dest-addr? inet:ip-address 911 +--ro source-addr? inet:ip-address 912 +--ro session-index? uint32 913 +--ro path-type? identityref 914 +--ro mpls-dest-address? inet:ip-address 916 2.10. BFD over MPLS-TE hierarchy 918 YANG Data Model for TE Topologies [I-D.ietf-teas-yang-te] is 919 augmented. BFD is configured per MPLS-TE tunnel, and BFD session 920 operational state data is provided per MPLS-TE LSP. 922 module: ietf-bfd-mpls-te 923 augment /rt:routing/rt:control-plane-protocols 924 /rt:control-plane-protocol/bfd:bfd: 925 +--rw mpls-te 926 +--rw egress 927 | +--rw enable? boolean 928 | +--rw local-multiplier? multiplier 929 | +--rw (interval-config-type)? 930 | | +--:(tx-rx-intervals) 931 | | | +--rw desired-min-tx-interval? uint32 932 | | | +--rw required-min-rx-interval? uint32 933 | | +--:(single-interval) {single-minimum-interval}? 934 | | +--rw min-interval? uint32 935 | +--rw authentication! {authentication}? 936 | +--rw key-chain? kc:key-chain-ref 937 | +--rw meticulous? boolean 938 +--ro summary 939 +--ro number-of-sessions? yang:gauge32 940 +--ro number-of-sessions-up? yang:gauge32 941 +--ro number-of-sessions-down? yang:gauge32 942 +--ro number-of-sessions-admin-down? yang:gauge32 943 augment /te:te/te:tunnels/te:tunnel: 944 +--rw local-multiplier? multiplier 945 +--rw (interval-config-type)? 946 | +--:(tx-rx-intervals) 947 | | +--rw desired-min-tx-interval? uint32 948 | | +--rw required-min-rx-interval? uint32 949 | +--:(single-interval) {single-minimum-interval}? 950 | +--rw min-interval? uint32 951 +--rw demand-enabled? boolean {demand-mode}? 952 +--rw admin-down? boolean 953 +--rw authentication! {authentication}? 954 | +--rw key-chain? kc:key-chain-ref 955 | +--rw meticulous? boolean 956 +--rw encap? identityref 957 augment /te:te/te:lsps-state/te:lsp: 958 +--ro path-type? identityref 959 +--ro ip-encapsulation? boolean 960 +--ro local-discriminator? discriminator 961 +--ro remote-discriminator? discriminator 962 +--ro remote-multiplier? multiplier 963 +--ro demand-capability? boolean {demand-mode}? 964 +--ro source-port? inet:port-number 965 +--ro dest-port? inet:port-number 966 +--ro session-running 967 | +--ro session-index? uint32 968 | +--ro local-state? state 969 | +--ro remote-state? state 970 | +--ro local-diagnostic? iana-bfd-types:diagnostic 971 | +--ro remote-diagnostic? iana-bfd-types:diagnostic 972 | +--ro remote-authenticated? boolean 973 | +--ro remote-authentication-type? iana-bfd-types:auth-type 974 | | {authentication}? 975 | +--ro detection-mode? enumeration 976 | +--ro negotiated-tx-interval? uint32 977 | +--ro negotiated-rx-interval? uint32 978 | +--ro detection-time? uint32 979 | +--ro echo-tx-interval-in-use? uint32 {echo-mode}? 980 +--ro session-statistics 981 | +--ro create-time? yang:date-and-time 982 | +--ro last-down-time? yang:date-and-time 983 | +--ro last-up-time? yang:date-and-time 984 | +--ro down-count? yang:counter32 985 | +--ro admin-down-count? yang:counter32 986 | +--ro receive-packet-count? yang:counter64 987 | +--ro send-packet-count? yang:counter64 988 | +--ro receive-invalid-packet-count? yang:counter64 989 | +--ro send-failed-packet-count? yang:counter64 990 +--ro mpls-dest-address? inet:ip-address 992 notifications: 993 +---n mpls-te-notification 994 +--ro local-discr? discriminator 995 +--ro remote-discr? discriminator 996 +--ro new-state? state 997 +--ro state-change-reason? iana-bfd-types:diagnostic 998 +--ro time-of-last-state-change? yang:date-and-time 999 +--ro dest-addr? inet:ip-address 1000 +--ro source-addr? inet:ip-address 1001 +--ro session-index? uint32 1002 +--ro path-type? identityref 1003 +--ro mpls-dest-address? inet:ip-address 1004 +--ro tunnel-name? string 1006 2.11. Interaction with other YANG modules 1008 Generic YANG Data Model for Connectionless OAM protocols 1009 [I-D.ietf-lime-yang-connectionless-oam] describes how the LIME 1010 connectionless OAM model could be extended to support BFD. 1012 Also, the operation of the BFD data model depends on configuration 1013 parameters that are defined in other YANG modules. 1015 2.11.1. Module ietf-interfaces 1017 The following boolean configuration is defined in A YANG Data Model 1018 for Interface Management [RFC8343]: 1020 /if:interfaces/if:interface/if:enabled 1021 If this configuration is set to "false", no BFD packets can 1022 be transmitted or received on that interface. 1024 2.11.2. Module ietf-ip 1026 The following boolean configuration is defined in A YANG Data Model 1027 for IP Management [RFC8344]: 1029 /if:interfaces/if:interface/ip:ipv4/ip:enabled 1030 If this configuration is set to "false", no BFD IPv4 packets 1031 can be transmitted or received on that interface. 1033 /if:interfaces/if:interface/ip:ipv4/ip:forwarding 1034 If this configuration is set to "false", no BFD IPv4 packets 1035 can be transmitted or received on that interface. 1037 /if:interfaces/if:interface/ip:ipv6/ip:enabled 1038 If this configuration is set to "false", no BFD IPv6 packets 1039 can be transmitted or received on that interface. 1041 /if:interfaces/if:interface/ip:ipv6/ip:forwarding 1042 If this configuration is set to "false", no BFD IPv6 packets 1043 can be transmitted or received on that interface. 1045 2.11.3. Module ietf-mpls 1047 The following boolean configuration is defined in A YANG Data Model 1048 for MPLS Base [I-D.ietf-mpls-base-yang]: 1050 /rt:routing/mpls:mpls/mpls:interface/mpls:config/mpls:enabled 1051 If this configuration is set to "false", no BFD MPLS packets 1052 can be transmitted or received on that interface. 1054 2.11.4. Module ietf-te 1056 The following configuration is defined in the "ietf-te" YANG module 1057 YANG Data Model for TE Topology [I-D.ietf-teas-yang-te]: 1059 /ietf-te:te/ietf-te:tunnels/ietf-te:tunnel/ietf-te:config/ietf- 1060 te:admin-status 1061 If this configuration is not set to "state-up", no BFD MPLS 1062 packets can be transmitted or received on that tunnel. 1064 2.12. IANA BFD YANG Module 1066 file "iana-bfd-types@2018-06-01.yang" 1068 module iana-bfd-types { 1070 yang-version 1.1; 1072 namespace "urn:ietf:params:xml:ns:yang:iana-bfd-types"; 1074 prefix "iana-bfd-types"; 1076 organization "IANA"; 1078 contact 1079 " Internet Assigned Numbers Authority 1081 Postal: ICANN 1082 4676 Admiralty Way, Suite 330 1083 Marina del Rey, CA 90292 1085 Tel: +1 310 823 9358 1086 "; 1088 description 1089 "This module defines YANG data types for IANA-registered 1090 BFD parameters. 1092 This YANG module is maintained by IANA and reflects the 1093 'BFD Diagnostic Codes' and 'BFD Authentication Types' registries. 1095 Copyright (c) 2018 IETF Trust and the persons 1096 identified as authors of the code. All rights reserved. 1098 Redistribution and use in source and binary forms, with or 1099 without modification, is permitted pursuant to, and subject 1100 to the license terms contained in, the Simplified BSD License 1101 set forth in Section 4.c of the IETF Trust's Legal Provisions 1102 Relating to IETF Documents 1103 (http://trustee.ietf.org/license-info). 1105 This version of this YANG module is part of RFC XXXX; see 1106 the RFC itself for full legal notices."; 1108 // RFC Ed.: replace XXXX with actual RFC number and remove 1109 // this note 1111 reference "RFC XXXX"; 1113 revision 2018-06-01 { 1114 description "Initial revision."; 1115 reference "RFC XXXX: IANA BFD YANG Data Types."; 1116 } 1118 /* 1119 * Type Definitions 1120 */ 1121 typedef diagnostic { 1122 type enumeration { 1123 enum none { 1124 value 0; 1125 description "None"; 1126 } 1127 enum control-expiry { 1128 value 1; 1129 description "Control timer expiry"; 1130 } 1131 enum echo-failed { 1132 value 2; 1133 description "Echo failure"; 1134 } 1135 enum neighbor-down { 1136 value 3; 1137 description "Neighbor down"; 1138 } 1139 enum forwarding-reset { 1140 value 4; 1141 description "Forwarding reset"; 1142 } 1143 enum path-down { 1144 value 5; 1145 description "Path down"; 1146 } 1147 enum concatenated-path-down { 1148 value 6; 1149 description "Concatenated path down"; 1150 } 1151 enum admin-down { 1152 value 7; 1153 description "Admin down"; 1154 } 1155 enum reverse-concatenated-path-down { 1156 value 8; 1157 description "Reverse concatenated path down"; 1158 } 1159 enum mis-connectivity-defect { 1160 value 9; 1161 description "Mis-connectivity defect as specified in RFC6428"; 1162 } 1163 } 1164 description 1165 "BFD diagnostic as defined in RFC 5880, values are maintained in 1166 the 'BFD Diagnostic Codes' IANA registry. Range is 0 to 31."; 1167 } 1169 typedef auth-type { 1170 type enumeration { 1171 enum reserved { 1172 value 0; 1173 description "Reserved"; 1174 } 1175 enum simple-password { 1176 value 1; 1177 description "Simple password"; 1178 } 1179 enum keyed-md5 { 1180 value 2; 1181 description "Keyed MD5"; 1182 } 1183 enum meticulous-keyed-md5 { 1184 value 3; 1185 description "Meticulous keyed MD5"; 1186 } 1187 enum keyed-sha1 { 1188 value 4; 1189 description "Keyed SHA1"; 1190 } 1191 enum meticulous-keyed-sha1 { 1192 value 5; 1193 description "Meticulous keyed SHA1"; 1194 } 1195 } 1196 description 1197 "BFD authentication type as defined in RFC 5880, values are 1198 maintained in the 'BFD Authentication Types' IANA registry. 1199 Range is 0 to 255."; 1200 } 1201 } 1203 1205 2.13. BFD types YANG Module 1207 This YANG module imports typedefs from [RFC6991], [RFC8177] and the 1208 "control-plane-protocol" identity from [RFC8349]. 1210 file "ietf-bfd-types@2018-06-01.yang" 1212 module ietf-bfd-types { 1214 yang-version 1.1; 1216 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-types"; 1218 prefix "bfd-types"; 1220 // RFC Ed.: replace occurences of XXXX with actual RFC number and 1221 // remove this note 1223 import iana-bfd-types { 1224 prefix "iana-bfd-types"; 1225 reference "RFC XXXX: YANG Data Model for BFD"; 1226 } 1228 import ietf-inet-types { 1229 prefix "inet"; 1230 reference "RFC 6991: Common YANG Data Types"; 1231 } 1233 import ietf-yang-types { 1234 prefix "yang"; 1235 reference "RFC 6991: Common YANG Data Types"; 1236 } 1237 import ietf-routing { 1238 prefix "rt"; 1239 reference 1240 "RFC 8349: A YANG Data Model for Routing Management 1241 (NMDA version)"; 1242 } 1244 import ietf-key-chain { 1245 prefix "kc"; 1246 reference "RFC 8177: YANG Data Model for Key Chains"; 1247 } 1249 organization "IETF BFD Working Group"; 1251 contact 1252 "WG Web: 1253 WG List: 1255 Editors: Reshad Rahman (rrahman@cisco.com), 1256 Lianshu Zheng (vero.zheng@huawei.com), 1257 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1259 description 1260 "This module contains a collection of BFD specific YANG data type 1261 definitions, as per RFC 5880, and also groupings which are common 1262 to other BFD YANG modules. 1264 Copyright (c) 2018 IETF Trust and the persons 1265 identified as authors of the code. All rights reserved. 1267 Redistribution and use in source and binary forms, with or 1268 without modification, is permitted pursuant to, and subject 1269 to the license terms contained in, the Simplified BSD License 1270 set forth in Section 4.c of the IETF Trust's Legal Provisions 1271 Relating to IETF Documents 1272 (http://trustee.ietf.org/license-info). 1274 This version of this YANG module is part of RFC XXXX; see 1275 the RFC itself for full legal notices."; 1277 reference "RFC XXXX"; 1279 revision 2018-06-01 { 1280 description "Initial revision."; 1281 reference "RFC XXXX: YANG Data Model for BFD"; 1282 } 1284 /* 1285 * Feature definitions 1286 */ 1287 feature single-minimum-interval { 1288 description 1289 "This feature indicates that the server supports configuration 1290 of one minimum interval value which is used for both transmit and 1291 receive minimum intervals."; 1292 } 1294 feature authentication { 1295 description 1296 "This feature indicates that the server supports BFD 1297 authentication."; 1298 reference 1299 "RFC 5880: Bidirectional Forwarding Detection (BFD), 1300 section 6.7."; 1301 } 1303 feature demand-mode { 1304 description 1305 "This feature indicates that the server supports BFD demand 1306 mode."; 1307 reference 1308 "RFC 5880: Bidirectional Forwarding Detection (BFD), 1309 section 6.6."; 1310 } 1312 feature echo-mode { 1313 description 1314 "This feature indicates that the server supports BFD echo 1315 mode."; 1316 reference 1317 "RFC 5880: Bidirectional Forwarding Detection (BFD), 1318 section 6.4."; 1319 } 1321 /* 1322 * Identity definitions 1323 */ 1324 identity bfdv1 { 1325 base "rt:control-plane-protocol"; 1326 description "BFD protocol version 1."; 1327 reference 1328 "RFC 5880: Bidirectional Forwarding Detection (BFD)."; 1329 } 1331 identity path-type { 1332 description 1333 "Base identity for BFD path type. The path type indicates 1334 the type of path on which BFD is running."; 1335 } 1336 identity path-ip-sh { 1337 base path-type; 1338 description "BFD on IP single hop."; 1339 reference 1340 "RFC 5881: Bidirectional Forwarding Detection (BFD) 1341 for IPv4 and IPv6 (Single Hop)."; 1342 } 1343 identity path-ip-mh { 1344 base path-type; 1345 description "BFD on IP multihop paths."; 1346 reference 1347 "RFC 5883: Bidirectional Forwarding Detection (BFD) for 1348 Multihop Paths."; 1349 } 1350 identity path-mpls-te { 1351 base path-type; 1352 description 1353 "BFD on MPLS Traffic Engineering."; 1354 reference 1355 "RFC 5884: Bidirectional Forwarding Detection (BFD) 1356 for MPLS Label Switched Paths (LSPs)."; 1357 } 1358 identity path-mpls-lsp { 1359 base path-type; 1360 description 1361 "BFD on MPLS Label Switched Path."; 1362 reference 1363 "RFC 5884: Bidirectional Forwarding Detection (BFD) 1364 for MPLS Label Switched Paths (LSPs)."; 1365 } 1366 identity path-lag { 1367 base path-type; 1368 description 1369 "Micro-BFD on LAG member links."; 1370 reference 1371 "RFC 7130: Bidirectional Forwarding Detection (BFD) on 1372 Link Aggregation Group (LAG) Interfaces."; 1373 } 1375 identity encap-type { 1376 description 1377 "Base identity for BFD encapsulation type."; 1378 } 1379 identity encap-ip { 1380 base encap-type; 1381 description "BFD with IP encapsulation."; 1382 } 1384 /* 1385 * Type Definitions 1386 */ 1387 typedef discriminator { 1388 type uint32; 1389 description "BFD discriminator as described in RFC 5880."; 1390 } 1392 typedef state { 1393 type enumeration { 1394 enum adminDown { 1395 value 0; 1396 description "admindown"; 1397 } 1398 enum down { 1399 value 1; 1400 description "down"; 1401 } 1402 enum init { 1403 value 2; 1404 description "init"; 1405 } 1406 enum up { 1407 value 3; 1408 description "up"; 1409 } 1410 } 1411 description "BFD state as defined in RFC 5880."; 1412 } 1414 typedef multiplier { 1415 type uint8 { 1416 range 1..255; 1417 } 1418 description "BFD multiplier as described in RFC 5880."; 1419 } 1421 typedef hops { 1422 type uint8 { 1423 range 1..255; 1424 } 1425 description 1426 "This corresponds to Time To Live for IPv4 and corresponds to hop 1427 limit for IPv6."; 1428 } 1429 /* 1430 * Groupings 1431 */ 1432 grouping auth-parms { 1433 description 1434 "Grouping for BFD authentication parameters 1435 (see section 6.7 of RFC 5880)."; 1436 container authentication { 1437 if-feature authentication; 1438 presence 1439 "Enables BFD authentication (see section 6.7 of RFC 5880)."; 1440 description "Parameters for BFD authentication."; 1442 leaf key-chain { 1443 type kc:key-chain-ref; 1444 description "Name of the key-chain as per RFC 8177."; 1445 } 1447 leaf meticulous { 1448 type boolean; 1449 description 1450 "Enables meticulous mode as described in section 6.7 " + 1451 "of RFC 5880."; 1452 } 1453 } 1454 } 1456 grouping base-cfg-parms { 1457 description "BFD grouping for base config parameters."; 1458 leaf local-multiplier { 1459 type multiplier; 1460 default 3; 1461 description "Multiplier transmitted by local system."; 1462 } 1464 choice interval-config-type { 1465 description 1466 "Two interval values or one value used for both transmit and 1467 receive."; 1468 case tx-rx-intervals { 1469 leaf desired-min-tx-interval { 1470 type uint32; 1471 units microseconds; 1472 default 1000000; 1473 description 1474 "Desired minimum transmit interval of control packets."; 1475 } 1476 leaf required-min-rx-interval { 1477 type uint32; 1478 units microseconds; 1479 default 1000000; 1480 description 1481 "Required minimum receive interval of control packets."; 1482 } 1483 } 1484 case single-interval { 1485 if-feature single-minimum-interval; 1487 leaf min-interval { 1488 type uint32; 1489 units microseconds; 1490 default 1000000; 1491 description 1492 "Desired minimum transmit interval and required " + 1493 "minimum receive interval of control packets."; 1494 } 1495 } 1496 } 1497 } 1499 grouping client-cfg-parms { 1500 description 1501 "BFD grouping for configuration parameters 1502 used by clients of BFD, e.g. IGP or MPLS."; 1504 leaf enable { 1505 type boolean; 1506 default false; 1507 description 1508 "Indicates whether the BFD is enabled."; 1509 } 1510 uses base-cfg-parms; 1511 } 1513 grouping common-cfg-parms { 1514 description 1515 "BFD grouping for common configuration parameters."; 1517 uses base-cfg-parms; 1519 leaf demand-enabled { 1520 if-feature demand-mode; 1521 type boolean; 1522 default false; 1523 description 1524 "To enable demand mode."; 1525 } 1527 leaf admin-down { 1528 type boolean; 1529 default false; 1530 description 1531 "Is the BFD session administratively down."; 1532 } 1533 uses auth-parms; 1534 } 1536 grouping all-session { 1537 description "BFD session operational information"; 1538 leaf path-type { 1539 type identityref { 1540 base path-type; 1541 } 1542 config "false"; 1543 description 1544 "BFD path type, this indicates the path type that BFD is 1545 running on."; 1546 } 1547 leaf ip-encapsulation { 1548 type boolean; 1549 config "false"; 1550 description "Whether BFD encapsulation uses IP."; 1551 } 1552 leaf local-discriminator { 1553 type discriminator; 1554 config "false"; 1555 description "Local discriminator."; 1556 } 1557 leaf remote-discriminator { 1558 type discriminator; 1559 config "false"; 1560 description "Remote discriminator."; 1561 } 1562 leaf remote-multiplier { 1563 type multiplier; 1564 config "false"; 1565 description "Remote multiplier."; 1566 } 1567 leaf demand-capability { 1568 if-feature demand-mode; 1569 type boolean; 1570 config "false"; 1571 description "Local demand mode capability."; 1573 } 1574 leaf source-port { 1575 when "../ip-encapsulation = 'true'" { 1576 description 1577 "Source port valid only when IP encapsulation is used."; 1578 } 1579 type inet:port-number; 1580 config "false"; 1581 description "Source UDP port"; 1582 } 1583 leaf dest-port { 1584 when "../ip-encapsulation = 'true'" { 1585 description 1586 "Destination port valid only when IP encapsulation is used."; 1587 } 1588 type inet:port-number; 1589 config "false"; 1590 description "Destination UDP port."; 1591 } 1593 container session-running { 1594 config "false"; 1595 description "BFD session running information."; 1596 leaf session-index { 1597 type uint32; 1598 description 1599 "An index used to uniquely identify BFD sessions."; 1600 } 1601 leaf local-state { 1602 type state; 1603 description "Local state."; 1604 } 1605 leaf remote-state { 1606 type state; 1607 description "Remote state."; 1608 } 1609 leaf local-diagnostic { 1610 type iana-bfd-types:diagnostic; 1611 description "Local diagnostic."; 1612 } 1613 leaf remote-diagnostic { 1614 type iana-bfd-types:diagnostic; 1615 description "Remote diagnostic."; 1616 } 1617 leaf remote-authenticated { 1618 type boolean; 1619 description 1620 "Indicates whether incoming BFD control packets are 1621 authenticated."; 1622 } 1623 leaf remote-authentication-type { 1624 when "../remote-authenticated = 'true'" { 1625 description 1626 "Only valid when incoming BFD control packets are 1627 authenticated."; 1628 } 1629 if-feature authentication; 1630 type iana-bfd-types:auth-type; 1631 description 1632 "Authentication type of incoming BFD control packets."; 1633 } 1634 leaf detection-mode { 1635 type enumeration { 1636 enum async-with-echo { 1637 value "1"; 1638 description "Async with echo."; 1639 } 1640 enum async-without-echo { 1641 value "2"; 1642 description "Async without echo."; 1643 } 1644 enum demand-with-echo { 1645 value "3"; 1646 description "Demand with echo."; 1647 } 1648 enum demand-without-echo { 1649 value "4"; 1650 description "Demand without echo."; 1651 } 1652 } 1653 description "Detection mode."; 1654 } 1655 leaf negotiated-tx-interval { 1656 type uint32; 1657 units microseconds; 1658 description "Negotiated transmit interval."; 1659 } 1660 leaf negotiated-rx-interval { 1661 type uint32; 1662 units microseconds; 1663 description "Negotiated receive interval."; 1664 } 1665 leaf detection-time { 1666 type uint32; 1667 units microseconds; 1668 description "Detection time."; 1670 } 1671 leaf echo-tx-interval-in-use { 1672 when "../../path-type = 'bfd-types:path-ip-sh'" { 1673 description 1674 "Echo is supported for IP single-hop only."; 1675 } 1676 if-feature echo-mode; 1677 type uint32; 1678 units microseconds; 1679 description "Echo transmit interval in use."; 1680 } 1681 } 1683 container session-statistics { 1684 config "false"; 1685 description "BFD per-session statistics."; 1687 leaf create-time { 1688 type yang:date-and-time; 1689 description 1690 "Time and date when this session was created."; 1691 } 1692 leaf last-down-time { 1693 type yang:date-and-time; 1694 description 1695 "Time and date of last time this session went down."; 1696 } 1697 leaf last-up-time { 1698 type yang:date-and-time; 1699 description 1700 "Time and date of last time this session went up."; 1701 } 1702 leaf down-count { 1703 type yang:counter32; 1704 description 1705 "The number of times this session has transitioned in the 1706 down state."; 1707 } 1708 leaf admin-down-count { 1709 type yang:counter32; 1710 description 1711 "The number of times this session has transitioned in the 1712 admin-down state."; 1713 } 1714 leaf receive-packet-count { 1715 type yang:counter64; 1716 description 1717 "Count of received packets in this session. This includes 1718 valid and invalid received packets."; 1719 } 1720 leaf send-packet-count { 1721 type yang:counter64; 1722 description "Count of sent packets in this session."; 1723 } 1724 leaf receive-invalid-packet-count { 1725 type yang:counter64; 1726 description 1727 "Count of invalid received packets in this session."; 1728 } 1729 leaf send-failed-packet-count { 1730 type yang:counter64; 1731 description 1732 "Count of packets which failed to be sent in this session."; 1733 } 1734 } 1735 } 1737 grouping session-statistics-summary { 1738 description "Grouping for session statistics summary."; 1739 container summary { 1740 config false; 1741 description "BFD session statistics summary."; 1742 leaf number-of-sessions { 1743 type yang:gauge32; 1744 description "Number of BFD sessions."; 1745 } 1746 leaf number-of-sessions-up { 1747 type yang:gauge32; 1748 description "Number of BFD sessions currently in up state."; 1749 } 1750 leaf number-of-sessions-down { 1751 type yang:gauge32; 1752 description "Number of BFD sessions currently in down state."; 1753 } 1754 leaf number-of-sessions-admin-down { 1755 type yang:gauge32; 1756 description 1757 "Number of BFD sessions currently in admin-down state."; 1758 } 1759 } 1760 } 1762 grouping notification-parms { 1763 description 1764 "This group describes common parameters that will be sent " + 1765 "as part of BFD notification."; 1767 leaf local-discr { 1768 type discriminator; 1769 description "BFD local discriminator."; 1770 } 1772 leaf remote-discr { 1773 type discriminator; 1774 description "BFD remote discriminator."; 1775 } 1777 leaf new-state { 1778 type state; 1779 description "Current BFD state."; 1780 } 1782 leaf state-change-reason { 1783 type iana-bfd-types:diagnostic; 1784 description "BFD state change reason."; 1785 } 1787 leaf time-of-last-state-change { 1788 type yang:date-and-time; 1789 description 1790 "Calendar time of previous state change."; 1791 } 1793 leaf dest-addr { 1794 type inet:ip-address; 1795 description "BFD peer address."; 1796 } 1798 leaf source-addr { 1799 type inet:ip-address; 1800 description "BFD local address."; 1801 } 1803 leaf session-index { 1804 type uint32; 1805 description "An index used to uniquely identify BFD sessions."; 1806 } 1808 leaf path-type { 1809 type identityref { 1810 base path-type; 1811 } 1812 description "BFD path type."; 1813 } 1814 } 1816 } 1818 1820 2.14. BFD top-level YANG Module 1822 This YANG module imports and augments "/routing/control-plane- 1823 protocols/control-plane-protocol" from [RFC8349]. 1825 file "ietf-bfd@2018-06-01.yang" 1827 module ietf-bfd { 1829 yang-version 1.1; 1831 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd"; 1833 prefix "bfd"; 1835 // RFC Ed.: replace occurences of XXXX with actual RFC number and 1836 // remove this note 1838 import ietf-bfd-types { 1839 prefix "bfd-types"; 1840 reference "RFC XXXX: YANG Data Model for BFD"; 1841 } 1843 import ietf-routing { 1844 prefix "rt"; 1845 reference 1846 "RFC 8349: A YANG Data Model for Routing Management 1847 (NMDA version)"; 1848 } 1850 organization "IETF BFD Working Group"; 1852 contact 1853 "WG Web: 1854 WG List: 1856 Editors: Reshad Rahman (rrahman@cisco.com), 1857 Lianshu Zheng (vero.zheng@huawei.com), 1858 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1860 description 1861 "This module contains the YANG definition for BFD parameters as 1862 per RFC 5880. 1864 Copyright (c) 2018 IETF Trust and the persons 1865 identified as authors of the code. All rights reserved. 1867 Redistribution and use in source and binary forms, with or 1868 without modification, is permitted pursuant to, and subject 1869 to the license terms contained in, the Simplified BSD License 1870 set forth in Section 4.c of the IETF Trust's Legal Provisions 1871 Relating to IETF Documents 1872 (http://trustee.ietf.org/license-info). 1874 This version of this YANG module is part of RFC XXXX; see 1875 the RFC itself for full legal notices."; 1877 reference "RFC XXXX"; 1879 revision 2018-06-01 { 1880 description "Initial revision."; 1881 reference "RFC XXXX: YANG Data Model for BFD"; 1882 } 1884 augment "/rt:routing/rt:control-plane-protocols/" 1885 + "rt:control-plane-protocol" { 1886 when "derived-from-or-self(rt:type, 'bfd-types:bfdv1')" { 1887 description 1888 "This augmentation is only valid for a control-plane protocol 1889 instance of BFD (type 'bfdv1')."; 1890 } 1891 description "BFD augmentation."; 1893 container bfd { 1894 description "BFD top level container."; 1896 uses bfd-types:session-statistics-summary; 1897 } 1898 } 1899 } 1901 1903 2.15. BFD IP single-hop YANG Module 1905 This YANG module imports "interface-ref" from [RFC8343], typedefs 1906 from [RFC6991] and augments "/routing/control-plane-protocols/ 1907 control-plane-protocol" from [RFC8349]. 1909 file "ietf-bfd-ip-sh@2018-06-01.yang" 1911 module ietf-bfd-ip-sh { 1912 yang-version 1.1; 1914 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh"; 1916 prefix "bfd-ip-sh"; 1918 // RFC Ed.: replace occurences of XXXX with actual RFC number and 1919 // remove this note 1921 import ietf-bfd-types { 1922 prefix "bfd-types"; 1923 reference "RFC XXXX: YANG Data Model for BFD"; 1924 } 1926 import ietf-bfd { 1927 prefix "bfd"; 1928 reference "RFC XXXX: YANG Data Model for BFD"; 1929 } 1931 import ietf-interfaces { 1932 prefix "if"; 1933 reference 1934 "RFC 8343: A YANG Data Model for Interface Management"; 1935 } 1937 import ietf-inet-types { 1938 prefix "inet"; 1939 reference "RFC 6991: Common YANG Data Types"; 1940 } 1942 import ietf-routing { 1943 prefix "rt"; 1944 reference 1945 "RFC 8349: A YANG Data Model for Routing Management 1946 (NMDA version)"; 1947 } 1949 organization "IETF BFD Working Group"; 1951 contact 1952 "WG Web: 1953 WG List: 1955 Editors: Reshad Rahman (rrahman@cisco.com), 1956 Lianshu Zheng (vero.zheng@huawei.com), 1957 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1959 description 1960 "This module contains the YANG definition for BFD IP single-hop 1961 as per RFC 5881. 1963 Copyright (c) 2018 IETF Trust and the persons 1964 identified as authors of the code. All rights reserved. 1966 Redistribution and use in source and binary forms, with or 1967 without modification, is permitted pursuant to, and subject 1968 to the license terms contained in, the Simplified BSD License 1969 set forth in Section 4.c of the IETF Trust's Legal Provisions 1970 Relating to IETF Documents 1971 (http://trustee.ietf.org/license-info). 1973 This version of this YANG module is part of RFC XXXX; see 1974 the RFC itself for full legal notices."; 1976 reference "RFC XXXX"; 1978 revision 2018-06-01 { 1979 description "Initial revision."; 1980 reference "RFC XXXX: A YANG data model for BFD IP single-hop"; 1981 } 1983 /* 1984 * Augments 1985 */ 1986 augment "/rt:routing/rt:control-plane-protocols/" 1987 + "rt:control-plane-protocol/bfd:bfd" { 1988 description "BFD augmentation for IP single-hop"; 1989 container ip-sh { 1990 description "BFD IP single-hop top level container"; 1992 uses bfd-types:session-statistics-summary; 1994 container sessions { 1995 description 1996 "BFD IP single-hop sessions."; 1997 list session { 1998 key "interface dest-addr"; 1999 description "List of IP single-hop sessions."; 2000 leaf interface { 2001 type if:interface-ref; 2002 description 2003 "Interface on which the BFD session is running."; 2004 } 2005 leaf dest-addr { 2006 type inet:ip-address; 2007 description "IP address of the peer."; 2009 } 2010 leaf source-addr { 2011 type inet:ip-address; 2012 description "Local IP address."; 2013 } 2015 uses bfd-types:common-cfg-parms; 2017 uses bfd-types:all-session; 2018 } 2019 } 2020 list interfaces { 2021 key "interface"; 2022 description "List of interfaces."; 2023 leaf interface { 2024 type if:interface-ref; 2025 description 2026 "BFD information for this interface."; 2027 } 2029 uses bfd-types:auth-parms; 2030 } 2031 } 2032 } 2034 /* 2035 * Notifications 2036 */ 2037 notification singlehop-notification { 2038 description 2039 "Notification for BFD single-hop session state change. An " + 2040 "implementation may rate-limit notifications, e.g. when a" + 2041 "session is continuously changing state."; 2043 uses bfd-types:notification-parms; 2045 leaf interface { 2046 type if:interface-ref; 2047 description "Interface to which this BFD session belongs to."; 2048 } 2050 leaf echo-enabled { 2051 type boolean; 2052 description "Was echo enabled for BFD."; 2053 } 2054 } 2056 } 2057 2059 2.16. BFD IP multihop YANG Module 2061 This YANG module imports typedefs from [RFC6991] and augments 2062 "/routing/control-plane-protocols/control-plane-protocol" from 2063 [RFC8349]. 2065 file "ietf-bfd-ip-mh@2018-06-01.yang" 2067 module ietf-bfd-ip-mh { 2069 yang-version 1.1; 2071 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh"; 2073 prefix "bfd-ip-mh"; 2075 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2076 // remove this note 2078 import ietf-bfd-types { 2079 prefix "bfd-types"; 2080 reference "RFC XXXX: YANG Data Model for BFD"; 2081 } 2083 import ietf-bfd { 2084 prefix "bfd"; 2085 reference "RFC XXXX: YANG Data Model for BFD"; 2086 } 2088 import ietf-inet-types { 2089 prefix "inet"; 2090 reference "RFC 6991: Common YANG Data Types"; 2091 } 2093 import ietf-routing { 2094 prefix "rt"; 2095 reference 2096 "RFC 8349: A YANG Data Model for Routing Management 2097 (NMDA version)"; 2098 } 2100 organization "IETF BFD Working Group"; 2102 contact 2103 "WG Web: 2104 WG List: 2105 Editors: Reshad Rahman (rrahman@cisco.com), 2106 Lianshu Zheng (vero.zheng@huawei.com), 2107 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2109 description 2110 "This module contains the YANG definition for BFD IP multi-hop 2111 as per RFC 5883. 2113 Copyright (c) 2018 IETF Trust and the persons 2114 identified as authors of the code. All rights reserved. 2116 Redistribution and use in source and binary forms, with or 2117 without modification, is permitted pursuant to, and subject 2118 to the license terms contained in, the Simplified BSD License 2119 set forth in Section 4.c of the IETF Trust's Legal Provisions 2120 Relating to IETF Documents 2121 (http://trustee.ietf.org/license-info). 2123 This version of this YANG module is part of RFC XXXX; see 2124 the RFC itself for full legal notices."; 2126 reference "RFC XXXX"; 2128 revision 2018-06-01 { 2129 description "Initial revision."; 2130 reference "RFC XXXX: A YANG data model for BFD IP multihop."; 2131 } 2133 /* 2134 * Augments 2135 */ 2136 augment "/rt:routing/rt:control-plane-protocols/" 2137 + "rt:control-plane-protocol/bfd:bfd" { 2138 description "BFD augmentation for IP multihop."; 2139 container ip-mh { 2140 description "BFD IP multihop top level container."; 2142 uses bfd-types:session-statistics-summary; 2144 container session-groups { 2145 description 2146 "BFD IP multi-hop session groups."; 2147 list session-group { 2148 key "source-addr dest-addr"; 2149 description 2150 "Group of BFD IP multi-hop sessions (for ECMP). A " + 2151 "group of sessions is between 1 source and 1 " + 2152 "destination, each session has a different field " + 2153 "in UDP/IP hdr for ECMP."; 2155 leaf source-addr { 2156 type inet:ip-address; 2157 description 2158 "Local IP address."; 2159 } 2160 leaf dest-addr { 2161 type inet:ip-address; 2162 description 2163 "IP address of the peer."; 2164 } 2165 uses bfd-types:common-cfg-parms; 2167 leaf tx-ttl { 2168 type bfd-types:hops; 2169 default 255; 2170 description "Hop count of outgoing BFD control packets."; 2171 } 2172 leaf rx-ttl { 2173 type bfd-types:hops; 2174 mandatory true; 2175 description 2176 "Minimum allowed hop count value for incoming BFD control 2177 packets. Control packets whose hop count is lower than 2178 this value are dropped."; 2179 } 2180 list sessions { 2181 config false; 2182 description 2183 "The multiple BFD sessions between a source and a " + 2184 "destination."; 2185 uses bfd-types:all-session; 2186 } 2187 } 2188 } 2189 } 2190 } 2192 /* 2193 * Notifications 2194 */ 2195 notification multihop-notification { 2196 description 2197 "Notification for BFD multi-hop session state change. An " + 2198 "implementation may rate-limit notifications, e.g. when a" + 2199 "session is continuously changing state."; 2201 uses bfd-types:notification-parms; 2202 } 2203 } 2205 2207 2.17. BFD over LAG YANG Module 2209 This YANG module imports "interface-ref" from [RFC8343], typedefs 2210 from [RFC6991] and augments "/routing/control-plane-protocols/ 2211 control-plane-protocol" from [RFC8349]. 2213 file "ietf-bfd-lag@2018-06-01.yang" 2215 module ietf-bfd-lag { 2217 yang-version 1.1; 2219 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-lag"; 2221 prefix "bfd-lag"; 2223 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2224 // remove this note 2226 import ietf-bfd-types { 2227 prefix "bfd-types"; 2228 reference "RFC XXXX: YANG Data Model for BFD"; 2229 } 2231 import ietf-bfd { 2232 prefix "bfd"; 2233 reference "RFC XXXX: YANG Data Model for BFD"; 2234 } 2236 import ietf-interfaces { 2237 prefix "if"; 2238 reference 2239 "RFC 8343: A YANG Data Model for Interface Management"; 2240 } 2242 import ietf-inet-types { 2243 prefix "inet"; 2244 reference "RFC 6991: Common YANG Data Types"; 2245 } 2247 import ietf-routing { 2248 prefix "rt"; 2249 reference 2250 "RFC 8349: A YANG Data Model for Routing Management 2251 (NMDA version)"; 2252 } 2254 organization "IETF BFD Working Group"; 2256 contact 2257 "WG Web: 2258 WG List: 2260 Editors: Reshad Rahman (rrahman@cisco.com), 2261 Lianshu Zheng vero.zheng@huawei.com), 2262 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2264 description 2265 "This module contains the YANG definition for BFD over LAG 2266 interfaces as per RFC7130. 2268 Copyright (c) 2018 IETF Trust and the persons 2269 identified as authors of the code. All rights reserved. 2271 Redistribution and use in source and binary forms, with or 2272 without modification, is permitted pursuant to, and subject 2273 to the license terms contained in, the Simplified BSD License 2274 set forth in Section 4.c of the IETF Trust's Legal Provisions 2275 Relating to IETF Documents 2276 (http://trustee.ietf.org/license-info). 2278 This version of this YANG module is part of RFC XXXX; see 2279 the RFC itself for full legal notices."; 2281 reference "RFC XXXX"; 2283 revision 2018-06-01 { 2284 description "Initial revision."; 2285 reference "RFC XXXX: A YANG data model for BFD over LAG"; 2286 } 2288 /* 2289 * Augments 2290 */ 2291 augment "/rt:routing/rt:control-plane-protocols/" 2292 + "rt:control-plane-protocol/bfd:bfd" { 2293 description "BFD augmentation for LAG"; 2294 container lag { 2295 description "BFD over LAG top level container"; 2296 container micro-bfd-ipv4-session-statistics { 2297 description "Micro-BFD IPv4 session counters."; 2298 uses bfd-types:session-statistics-summary; 2299 } 2300 container micro-bfd-ipv6-session-statistics { 2301 description "Micro-BFD IPv6 session counters."; 2302 uses bfd-types:session-statistics-summary; 2303 } 2305 container sessions { 2306 description 2307 "BFD over LAG sessions"; 2308 list session { 2309 key "lag-name"; 2310 description "List of BFD over LAG sessions."; 2311 leaf lag-name { 2312 type if:interface-ref ; 2313 description "Name of the LAG"; 2314 } 2315 leaf ipv4-dest-addr { 2316 type inet:ipv4-address; 2317 description 2318 "IPv4 address of the peer, for IPv4 micro-BFD."; 2319 } 2320 leaf ipv6-dest-addr { 2321 type inet:ipv6-address; 2322 description 2323 "IPv6 address of the peer, for IPv6 micro-BFD."; 2324 } 2325 uses bfd-types:common-cfg-parms; 2327 leaf use-ipv4 { 2328 type boolean; 2329 description "Using IPv4 micro-BFD."; 2330 } 2331 leaf use-ipv6 { 2332 type boolean; 2333 description "Using IPv6 micro-BFD."; 2334 } 2336 list member-links { 2337 key "member-link"; 2338 config false; 2339 description 2340 "Micro-BFD over LAG. This represents one member link."; 2342 leaf member-link { 2343 type if:interface-ref; 2344 description 2345 "Member link on which micro-BFD is running."; 2346 } 2347 container micro-bfd-ipv4 { 2348 when "../../use-ipv4 = 'true'" { 2349 description "Needed only if IPv4 is used."; 2350 } 2351 description 2352 "Micro-BFD IPv4 session state on member link."; 2353 uses bfd-types:all-session; 2354 } 2355 container micro-bfd-ipv6 { 2356 when "../../use-ipv6 = 'true'" { 2357 description "Needed only if IPv6 is used."; 2358 } 2359 description 2360 "Micro-BFD IPv6 session state on member link."; 2361 uses bfd-types:all-session; 2362 } 2363 } 2364 } 2365 } 2366 } 2367 } 2369 /* 2370 * Notifications 2371 */ 2372 notification lag-notification { 2373 description 2374 "Notification for BFD over LAG session state change. " + 2375 "An implementation may rate-limit notifications, e.g. when a" + 2376 "session is continuously changing state."; 2378 uses bfd-types:notification-parms; 2380 leaf lag-name { 2381 type if:interface-ref; 2382 description "LAG interface name."; 2383 } 2385 leaf member-link { 2386 type if:interface-ref; 2387 description "Member link on which BFD is running."; 2388 } 2389 } 2390 } 2391 2393 2.18. BFD over MPLS YANG Module 2395 This YANG module imports typedefs from [RFC6991] and augments 2396 "/routing/control-plane-protocols/control-plane-protocol" from 2397 [RFC8349]. 2399 file "ietf-bfd-mpls@2018-06-01.yang" 2401 module ietf-bfd-mpls { 2403 yang-version 1.1; 2405 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-mpls"; 2407 prefix "bfd-mpls"; 2409 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2410 // remove this note 2412 import ietf-bfd-types { 2413 prefix "bfd-types"; 2414 reference "RFC XXXX: YANG Data Model for BFD"; 2415 } 2417 import ietf-bfd { 2418 prefix "bfd"; 2419 reference "RFC XXXX: YANG Data Model for BFD"; 2420 } 2422 import ietf-inet-types { 2423 prefix "inet"; 2424 reference "RFC 6991: Common YANG Data Types"; 2425 } 2427 import ietf-routing { 2428 prefix "rt"; 2429 reference 2430 "RFC 8349: A YANG Data Model for Routing Management 2431 (NMDA version)"; 2432 } 2434 organization "IETF BFD Working Group"; 2436 contact 2437 "WG Web: 2438 WG List: 2439 Editors: Reshad Rahman (rrahman@cisco.com), 2440 Lianshu Zheng (vero.zheng@huawei.com), 2441 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2443 description 2444 "This module contains the YANG definition for BFD parameters for 2445 MPLS LSPs as per RFC 5884. 2447 Copyright (c) 2018 IETF Trust and the persons 2448 identified as authors of the code. All rights reserved. 2450 Redistribution and use in source and binary forms, with or 2451 without modification, is permitted pursuant to, and subject 2452 to the license terms contained in, the Simplified BSD License 2453 set forth in Section 4.c of the IETF Trust's Legal Provisions 2454 Relating to IETF Documents 2455 (http://trustee.ietf.org/license-info). 2457 This version of this YANG module is part of RFC XXXX; see 2458 the RFC itself for full legal notices."; 2460 reference "RFC XXXX"; 2462 revision 2018-06-01 { 2463 description "Initial revision."; 2464 reference "RFC XXXX: A YANG data model for BFD over MPLS LSPs"; 2465 } 2467 /* 2468 * Identity definitions 2469 */ 2470 identity encap-gach { 2471 base bfd-types:encap-type; 2472 description 2473 "BFD with G-ACh encapsulation as per RFC 5586."; 2474 } 2476 identity encap-ip-gach { 2477 base bfd-types:encap-type; 2478 description 2479 "BFD with IP and G-ACh encapsulation as per RFC 5586."; 2480 } 2482 /* 2483 * Groupings 2484 */ 2485 grouping encap-cfg { 2486 description "Configuration for BFD encapsulation"; 2487 leaf encap { 2488 type identityref { 2489 base bfd-types:encap-type; 2490 } 2491 default bfd-types:encap-ip; 2492 description "BFD encapsulation"; 2493 } 2494 } 2496 grouping mpls-dest-address { 2497 description "Destination address as per RFC 5884."; 2499 leaf mpls-dest-address { 2500 type inet:ip-address; 2501 config "false"; 2502 description 2503 "Destination address as per RFC 5884. 2504 Needed if IP encapsulation is used."; 2505 } 2506 } 2508 /* 2509 * Augments 2510 */ 2511 augment "/rt:routing/rt:control-plane-protocols/" 2512 + "rt:control-plane-protocol/bfd:bfd" { 2513 description "BFD augmentation for MPLS."; 2514 container mpls { 2515 description "BFD MPLS top level container."; 2517 uses bfd-types:session-statistics-summary; 2519 container egress { 2520 description "Egress configuration."; 2522 uses bfd-types:client-cfg-parms; 2524 uses bfd-types:auth-parms; 2525 } 2527 container session-groups { 2528 description 2529 "BFD over MPLS session groups."; 2530 list session-group { 2531 key "mpls-fec"; 2532 description 2533 "Group of BFD MPLS sessions (for ECMP). A group of " + 2534 "sessions is for 1 FEC, each session has a different " + 2535 "field in UDP/IP hdr for ECMP."; 2536 leaf mpls-fec { 2537 type inet:ip-prefix; 2538 description "MPLS FEC."; 2539 } 2541 uses bfd-types:common-cfg-parms; 2543 list sessions { 2544 config false; 2545 description 2546 "The BFD sessions for an MPLS FEC. Local " + 2547 "discriminator is unique for each session in the " + 2548 "group."; 2549 uses bfd-types:all-session; 2551 uses bfd-mpls:mpls-dest-address; 2552 } 2553 } 2554 } 2555 } 2556 } 2558 /* 2559 * Notifications 2560 */ 2561 notification mpls-notification { 2562 description 2563 "Notification for BFD over MPLS FEC session state change. " + 2564 "An implementation may rate-limit notifications, e.g. when a" + 2565 "session is continuously changing state."; 2567 uses bfd-types:notification-parms; 2569 leaf mpls-dest-address { 2570 type inet:ip-address; 2571 description 2572 "Destination address as per RFC 5884. 2573 Needed if IP encapsulation is used."; 2574 } 2575 } 2576 } 2578 2580 2.19. BFD over MPLS-TE YANG Module 2582 This YANG module imports and augments "/te/tunnels/tunnel" from 2583 [I-D.ietf-teas-yang-te]. 2585 file "ietf-bfd-mpls-te@2018-06-01.yang" 2587 module ietf-bfd-mpls-te { 2589 yang-version 1.1; 2591 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te"; 2593 prefix "bfd-mpls-te"; 2595 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2596 // remove this note 2598 import ietf-bfd-types { 2599 prefix "bfd-types"; 2600 reference "RFC XXXX: YANG Data Model for BFD"; 2601 } 2603 import ietf-bfd { 2604 prefix "bfd"; 2605 reference "RFC XXXX: YANG Data Model for BFD"; 2606 } 2608 import ietf-bfd-mpls { 2609 prefix "bfd-mpls"; 2610 reference "RFC XXXX: YANG Data Model for BFD"; 2611 } 2613 import ietf-te { 2614 prefix "te"; 2615 // RFC Ed.: replace YYYY with actual RFC number of 2616 // draft-ietf-teas-yang-te and remove this note. 2617 reference 2618 "RFC YYYY: A YANG Data Model for Traffic Engineering Tunnels and 2619 Interfaces"; 2620 } 2622 import ietf-routing { 2623 prefix "rt"; 2624 reference 2625 "RFC 8349: A YANG Data Model for Routing Management 2626 (NMDA version)"; 2627 } 2628 organization "IETF BFD Working Group"; 2630 contact 2631 "WG Web: 2632 WG List: 2634 Editors: Reshad Rahman (rrahman@cisco.com), 2635 Lianshu Zheng (vero.zheng@huawei.com), 2636 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2638 description 2639 "This module contains the YANG definition for BFD parameters for 2640 MPLS Traffic Engineering as per RFC 5884. 2642 Copyright (c) 2018 IETF Trust and the persons 2643 identified as authors of the code. All rights reserved. 2645 Redistribution and use in source and binary forms, with or 2646 without modification, is permitted pursuant to, and subject 2647 to the license terms contained in, the Simplified BSD License 2648 set forth in Section 4.c of the IETF Trust's Legal Provisions 2649 Relating to IETF Documents 2650 (http://trustee.ietf.org/license-info). 2652 This version of this YANG module is part of RFC XXXX; see 2653 the RFC itself for full legal notices."; 2655 reference "RFC XXXX"; 2657 revision 2018-06-01 { 2658 description "Initial revision."; 2659 reference "RFC XXXX: A YANG data model for BFD over MPLS-TE"; 2660 } 2662 /* 2663 * Augments 2664 */ 2665 augment "/rt:routing/rt:control-plane-protocols/" 2666 + "rt:control-plane-protocol/bfd:bfd" { 2667 description "BFD augmentation for MPLS-TE."; 2668 container mpls-te { 2669 description "BFD MPLS-TE top level container."; 2671 container egress { 2672 description "Egress configuration."; 2674 uses bfd-types:client-cfg-parms; 2675 uses bfd-types:auth-parms; 2676 } 2678 uses bfd-types:session-statistics-summary; 2679 } 2680 } 2682 augment "/te:te/te:tunnels/te:tunnel" { 2683 description "BFD configuration on MPLS-TE tunnel."; 2685 uses bfd-types:common-cfg-parms; 2687 uses bfd-mpls:encap-cfg; 2688 } 2690 augment "/te:te/te:lsps-state/te:lsp" { 2691 when "/te:te/te:lsps-state/te:lsp/te:origin-type != 'transit'" { 2692 description "BFD information not needed at transit points."; 2693 } 2694 description "BFD state information on MPLS-TE LSP."; 2696 uses bfd-types:all-session; 2698 uses bfd-mpls:mpls-dest-address; 2699 } 2701 /* 2702 * Notifications 2703 */ 2704 notification mpls-te-notification { 2705 description 2706 "Notification for BFD over MPLS-TE session state change. " + 2707 "An implementation may rate-limit notifications, e.g. when a" + 2708 "session is continuously changing state."; 2710 uses bfd-types:notification-parms; 2712 uses bfd-mpls:mpls-dest-address; 2714 leaf tunnel-name { 2715 type string; 2716 description "MPLS-TE tunnel on which BFD was running."; 2717 } 2718 } 2719 } 2721 2723 3. Data Model examples 2725 This section presents some simple and illustrative examples on how to 2726 configure BFD. 2728 3.1. IP single-hop 2730 The following is an example configuration for a BFD IP single-hop 2731 session. The desired transmit interval and the required receive 2732 interval are both set to 10ms. 2734 2735 2736 2737 2738 eth0 2739 2740 ianaift:ethernetCsmacd 2741 2742 2743 2744 2745 2746 2747 2749 bfd-types:bfdv1 2750 2751 name:BFD 2752 2753 2754 2755 2756 eth0 2757 2001:db8:0:113::101 2758 10000 2759 2760 10000 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 3.2. IP multihop 2772 The following is an example configuration for a BFD IP multihop 2773 session group. The desired transmit interval and the required 2774 receive interval are both set to 150ms. 2776 2777 2778 2779 2780 2781 2783 bfd-types:bfdv1 2784 2785 name:BFD 2786 2787 2788 2789 2790 2001:db8:0:113::103 2791 2001:db8:0:114::100 2792 2793 150000 2794 2795 2796 150000 2797 2798 240 2799 2800 2801 2802 2803 2804 2805 2806 2808 3.3. LAG 2810 The following is an example of BFD configuration for a LAG session. 2811 In this case, an interface named "Bundle-Ether1" of interface type 2812 "ieee802eadLag" has a desired transmit and required receive interval 2813 set to 10ms. 2815 2816 2817 2818 2819 Bundle-Ether1 2820 2821 ianaift:ieee8023adLag 2822 2823 2824 2825 2826 2827 2828 2830 bfd-types:bfdv1 2831 2832 name:BFD 2833 2834 2835 2836 2837 Bundle-Ether1 2838 2001:db8:112::16 2839 2840 100000 2841 2842 2843 100000 2844 2845 true 2846 2847 2848 2849 2850 2851 2852 2853 2855 3.4. MPLS 2857 The following is an example of BFD configured for an MPLS LSP. In 2858 this case, the desired transmit and required receive interval set to 2859 250ms. 2861 2862 2863 2864 2865 2866 2868 bfd-types:bfdv1 2869 2870 name:BFD 2871 2872 2873 2874 2875 2001:db8:114::/116 2876 2877 250000 2878 2879 2880 250000 2881 2882 2883 2884 2885 2886 2887 2888 2889 2891 4. Security Considerations 2893 The YANG module specified in this document defines a schema for data 2894 that is designed to be accessed via network management protocols such 2895 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 2896 is the secure transport layer, and the mandatory-to-implement secure 2897 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 2898 is HTTPS, and the mandatory-to-implement secure transport is TLS 2899 [RFC5246]. 2901 The NETCONF access control model [RFC6536] provides the means to 2902 restrict access for particular NETCONF or RESTCONF users to a 2903 preconfigured subset of all available NETCONF or RESTCONF protocol 2904 operations and content. 2906 There are a number of data nodes defined in this YANG module that are 2907 writable/creatable/deletable (i.e., config true, which is the 2908 default). These data nodes may be considered sensitive or vulnerable 2909 in some network environments. Write operations (e.g., edit-config) 2910 to these data nodes without proper protection can have a negative 2911 effect on network operations. These are the subtrees and data nodes 2912 and their sensitivity/vulnerability: 2914 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/ 2915 sessions: the list specifies the IP single-hop BFD sessions. 2917 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/ 2918 sessions: data nodes local-multiplier, desired-min-tx-interval, 2919 required-min-rx-interval, min-interval and authentication all impact 2920 the BFD IP single-hop session. 2922 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/ 2923 session-group: the list specifies the IP multi-hop BFD session 2924 groups. 2926 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/ 2927 session-group: data nodes local-multiplier, desired-min-tx-interval, 2928 required-min-rx-interval, min-interval and authentication all impact 2929 the BFD IP multi-hop session. 2931 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2932 sessions: the list specifies the BFD sessions over LAG. 2934 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2935 sessions: data nodes local-multiplier, desired-min-tx-interval, 2936 required-min-rx-interval, min-interval and authentication all impact 2937 the BFD over LAG session. 2939 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 2940 session-group: the list specifies the session groups for BFD over 2941 MPLS. 2943 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 2944 session-group: data nodes local-multiplier, desired-min-tx-interval, 2945 required-min-rx-interval, min-interval and authentication all impact 2946 the BFD over MPLS LSPs session. 2948 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 2949 egress: data nodes local-multiplier, desired-min-tx-interval, 2950 required-min-rx-interval, min-interval and authentication all impact 2951 the BFD over MPLS LSPs sessions for which this device is an MPLS LSP 2952 egress node. 2954 /te/tunnels/tunnel: data nodes local-multiplier, desired-min-tx- 2955 interval, required-min-rx-interval, min-interval and authentication 2956 all impact the BFD session over the MPLS-TE tunnel. 2958 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls-te/ 2959 egress: data nodes local-multiplier, desired-min-tx-interval, 2960 required-min-rx-interval, min-interval and authentication all impact 2961 the BFD over MPLS-TE sessions for which this device is an MPLS-TE 2962 egress node. 2964 The YANG module has writeable data nodes which can be used for 2965 creation of BFD sessions and modification of BFD session parameters. 2966 The system should "police" creation of BFD sessions to prevent new 2967 sessions from causing existing BFD sessions to fail. For BFD session 2968 modification, the BFD protocol has mechanisms in place which allow 2969 for in service modification. 2971 Some of the readable data nodes in this YANG module may be considered 2972 sensitive or vulnerable in some network environments. It is thus 2973 important to control read access (e.g., via get, get-config, or 2974 notification) to these data nodes. These are the subtrees and data 2975 nodes and their sensitivity/vulnerability: 2977 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/ 2978 summary: access to this information discloses the number of BFD IP 2979 single-hop sessions which are up, down and admin-down. The counters 2980 include BFD sessions for which the user does not have read-access. 2982 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/ 2983 summary: access to this information discloses the number of BFD IP 2984 multi-hop sessions which are up, down and admin-down. The counters 2985 include BFD sessions for which the user does not have read-access. 2987 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2988 micro-bfd-ipv4-session-statistics/summary: access to this information 2989 discloses the number of micro BFD IPv4 LAG sessions which are up, 2990 down and admin-down. The counters include BFD sessions for which the 2991 user does not have read-access. 2993 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2994 micro-bfd-ipv6-session-statistics/summary: access to this information 2995 discloses the number of micro BFD IPv6 LAG sessions which are up, 2996 down and admin-down. The counters include BFD sessions for which the 2997 user does not have read-access. 2999 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 3000 summary: access to this information discloses the number of BFD 3001 sessions over MPLS LSPs which are up, down and admin-down. The 3002 counters include BFD sessions for which the user does not have read- 3003 access. 3005 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls-te/ 3006 summary: access to this information discloses the number of BFD 3007 sessions over MPLS-TE which are up, down and admin-down. The 3008 counters include BFD sessions for which the user does not have read- 3009 access. 3011 5. IANA Considerations 3013 The IANA is requested to as assign a new namespace URI from the IETF 3014 XML registry. 3016 This document registers the following namesace URIs in the IETF XML 3017 registry [RFC3688]: 3019 -------------------------------------------------------------------- 3021 URI: urn:ietf:params:xml:ns:yang:ietf-bfd 3023 Registrant Contact: The IESG. 3025 XML: N/A, the requested URI is an XML namespace. 3027 -------------------------------------------------------------------- 3029 -------------------------------------------------------------------- 3031 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh 3033 Registrant Contact: The IESG. 3035 XML: N/A, the requested URI is an XML namespace. 3037 -------------------------------------------------------------------- 3039 -------------------------------------------------------------------- 3041 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mh 3043 Registrant Contact: The IESG. 3045 XML: N/A, the requested URI is an XML namespace. 3047 -------------------------------------------------------------------- 3049 -------------------------------------------------------------------- 3050 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-lag 3052 Registrant Contact: The IESG. 3054 XML: N/A, the requested URI is an XML namespace. 3056 -------------------------------------------------------------------- 3058 -------------------------------------------------------------------- 3060 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls 3062 Registrant Contact: The IESG. 3064 XML: N/A, the requested URI is an XML namespace. 3066 -------------------------------------------------------------------- 3068 -------------------------------------------------------------------- 3070 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te 3072 Registrant Contact: The IESG. 3074 XML: N/A, the requested URI is an XML namespace. 3076 -------------------------------------------------------------------- 3078 5.1. IANA-Maintained iana-bfd-types module 3080 This document defines the initial version of the IANA-maintained 3081 iana-bfd-types YANG module. 3083 The iana-bfd-types YANG module mirrors the "BFD Diagnostic Codes" 3084 registry and "BFD Authentication Types" registry at 3085 https://www.iana.org/assignments/bfd-parameters/bfd-parameters.xhtml. 3086 Whenever that registry changes, IANA must update the iana-bfd-types 3087 YANG module. 3089 6. Acknowledgements 3091 We would also like to thank Nobo Akiya and Jeff Haas for their 3092 encouragement on this work. We would also like to thank Rakesh 3093 Gandhi and Tarek Saad for their help on the MPLS-TE model. We would 3094 also like to thank Acee Lindem for his guidance. 3096 7. References 3098 7.1. Normative References 3100 [I-D.ietf-mpls-base-yang] 3101 Saad, T., Raza, K., Gandhi, R., Liu, X., and V. Beeram, "A 3102 YANG Data Model for MPLS Base", draft-ietf-mpls-base- 3103 yang-06 (work in progress), February 2018. 3105 [I-D.ietf-teas-yang-te] 3106 Saad, T., Gandhi, R., Liu, X., Beeram, V., Shah, H., and 3107 I. Bryskin, "A YANG Data Model for Traffic Engineering 3108 Tunnels and Interfaces", draft-ietf-teas-yang-te-14 (work 3109 in progress), March 2018. 3111 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3112 Requirement Levels", BCP 14, RFC 2119, 3113 DOI 10.17487/RFC2119, March 1997, 3114 . 3116 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3117 DOI 10.17487/RFC3688, January 2004, 3118 . 3120 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 3121 (TLS) Protocol Version 1.2", RFC 5246, 3122 DOI 10.17487/RFC5246, August 2008, 3123 . 3125 [RFC5586] Bocci, M., Ed., Vigoureux, M., Ed., and S. Bryant, Ed., 3126 "MPLS Generic Associated Channel", RFC 5586, 3127 DOI 10.17487/RFC5586, June 2009, 3128 . 3130 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 3131 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 3132 . 3134 [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 3135 (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, 3136 DOI 10.17487/RFC5881, June 2010, 3137 . 3139 [RFC5882] Katz, D. and D. Ward, "Generic Application of 3140 Bidirectional Forwarding Detection (BFD)", RFC 5882, 3141 DOI 10.17487/RFC5882, June 2010, 3142 . 3144 [RFC5883] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 3145 (BFD) for Multihop Paths", RFC 5883, DOI 10.17487/RFC5883, 3146 June 2010, . 3148 [RFC5884] Aggarwal, R., Kompella, K., Nadeau, T., and G. Swallow, 3149 "Bidirectional Forwarding Detection (BFD) for MPLS Label 3150 Switched Paths (LSPs)", RFC 5884, DOI 10.17487/RFC5884, 3151 June 2010, . 3153 [RFC5885] Nadeau, T., Ed. and C. Pignataro, Ed., "Bidirectional 3154 Forwarding Detection (BFD) for the Pseudowire Virtual 3155 Circuit Connectivity Verification (VCCV)", RFC 5885, 3156 DOI 10.17487/RFC5885, June 2010, 3157 . 3159 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 3160 and A. Bierman, Ed., "Network Configuration Protocol 3161 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 3162 . 3164 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 3165 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 3166 . 3168 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 3169 Protocol (NETCONF) Access Control Model", RFC 6536, 3170 DOI 10.17487/RFC6536, March 2012, 3171 . 3173 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 3174 RFC 6991, DOI 10.17487/RFC6991, July 2013, 3175 . 3177 [RFC7130] Bhatia, M., Ed., Chen, M., Ed., Boutros, S., Ed., 3178 Binderberger, M., Ed., and J. Haas, Ed., "Bidirectional 3179 Forwarding Detection (BFD) on Link Aggregation Group (LAG) 3180 Interfaces", RFC 7130, DOI 10.17487/RFC7130, February 3181 2014, . 3183 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 3184 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 3185 . 3187 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 3188 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 3189 May 2017, . 3191 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 3192 Zhang, "YANG Data Model for Key Chains", RFC 8177, 3193 DOI 10.17487/RFC8177, June 2017, 3194 . 3196 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 3197 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 3198 . 3200 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 3201 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 3202 . 3204 [RFC8344] Bjorklund, M., "A YANG Data Model for IP Management", 3205 RFC 8344, DOI 10.17487/RFC8344, March 2018, 3206 . 3208 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 3209 Routing Management (NMDA Version)", RFC 8349, 3210 DOI 10.17487/RFC8349, March 2018, 3211 . 3213 7.2. Informative References 3215 [I-D.ietf-lime-yang-connectionless-oam] 3216 Kumar, D., Wang, Z., Wu, Q., Rahman, R., and S. Raghavan, 3217 "Generic YANG Data Model for the Management of Operations, 3218 Administration, and Maintenance (OAM) Protocols that use 3219 Connectionless Communications", draft-ietf-lime-yang- 3220 connectionless-oam-18 (work in progress), November 2017. 3222 [I-D.ietf-rtgwg-lne-model] 3223 Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 3224 Liu, "YANG Model for Logical Network Elements", draft- 3225 ietf-rtgwg-lne-model-10 (work in progress), March 2018. 3227 [I-D.ietf-rtgwg-ni-model] 3228 Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 3229 Liu, "YANG Model for Network Instances", draft-ietf-rtgwg- 3230 ni-model-12 (work in progress), March 2018. 3232 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 3233 and R. Wilton, "Network Management Datastore Architecture 3234 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 3235 . 3237 Appendix A. Echo function configuration example 3239 As mentioned in Section 2.1.2, the mechanism to start and stop the 3240 echo function, as defined in [RFC5880] and [RFC5881], is 3241 implementation specific. In this section we provide an example of 3242 how the echo function can be implemented via configuration. 3244 module: example-bfd-echo 3245 augment /rt:routing/rt:control-plane-protocols 3246 /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh 3247 /bfd-ip-sh:sessions: 3248 +--rw echo {bfd-types:echo-mode}? 3249 +--rw desired-min-echo-tx-interval? uint32 3250 +--rw required-min-echo-rx-interval? uint32 3252 A.1. Example YANG module for BFD echo function configuration 3254 module example-bfd-echo { 3255 namespace "tag:example.com,2018:example-bfd-echo"; 3257 prefix "example-bfd-echo"; 3259 import ietf-bfd-types { 3260 prefix "bfd-types"; 3261 } 3263 import ietf-bfd { 3264 prefix "bfd"; 3265 } 3267 import ietf-bfd-ip-sh { 3268 prefix "bfd-ip-sh"; 3269 } 3271 import ietf-routing { 3272 prefix "rt"; 3273 } 3275 organization "IETF BFD Working Group"; 3277 contact 3278 "WG Web: 3279 WG List: 3281 Editors: Reshad Rahman (rrahman@cisco.com), 3282 Lianshu Zheng (vero.zheng@huawei.com), 3283 Mahesh Jethanandani (mjethanandani@gmail.com)"; 3285 description 3286 "This module contains an example YANG augmentation for configuration 3287 of BFD echo function. 3289 Copyright (c) 2018 IETF Trust and the persons 3290 identified as authors of the code. All rights reserved. 3292 Redistribution and use in source and binary forms, with or 3293 without modification, is permitted pursuant to, and subject 3294 to the license terms contained in, the Simplified BSD License 3295 set forth in Section 4.c of the IETF Trust's Legal Provisions 3296 Relating to IETF Documents 3297 (http://trustee.ietf.org/license-info). 3299 This version of this YANG module is part of RFC XXXX; see 3300 the RFC itself for full legal notices."; 3302 revision 2018-06-01 { 3303 description "Initial revision."; 3304 reference 3305 "RFC XXXX: A YANG data model example augmentation for BFD echo 3306 function"; 3307 } 3309 // RFC Ed.: replace XXXX with actual RFC number and remove this 3310 // note 3312 /* 3313 * Groupings 3314 */ 3315 grouping echo-cfg-parms { 3316 description "BFD grouping for echo config parameters"; 3317 leaf desired-min-echo-tx-interval { 3318 type uint32; 3319 units microseconds; 3320 default 0; 3321 description 3322 "This is the minimum interval that the local system would like 3323 to use when transmitting BFD echo packets. If 0, the echo 3324 function as defined in BFD [RFC5880] is disabled."; 3325 } 3327 leaf required-min-echo-rx-interval { 3328 type uint32; 3329 units microseconds; 3330 default 0; 3331 description 3332 "This is the Required Min Echo RX Interval as defined in BFD 3333 [RFC5880]."; 3334 } 3335 } 3337 augment "/rt:routing/rt:control-plane-protocols/" 3338 + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/" 3339 + "bfd-ip-sh:sessions" { 3340 description "Augmentation for BFD echo function."; 3342 container echo { 3343 if-feature bfd-types:echo-mode; 3345 description "BFD echo function container"; 3347 uses echo-cfg-parms; 3348 } 3349 } 3350 } 3352 Appendix B. Change log 3354 RFC Editor: Remove this section upon publication as an RFC. 3356 B.1. Changes between versions -13 and -14 3358 o Addressed missing/incorrect references in import statements. 3360 B.2. Changes between versions -12 and -13 3362 o Updated references for drafts which became RFCs recently. 3364 B.3. Changes between versions -11 and -12 3366 o Addressed comments from YANG Doctor review of rev11. 3368 B.4. Changes between versions -10 and -11 3370 o Added 2 examples. 3372 o Added a container around some lists. 3374 o Fixed some indentation nits. 3376 B.5. Changes between versions -09 and -10 3378 o Addressed comments from YANG Doctor review. 3380 o Addressed comments from WGLC. 3382 B.6. Changes between versions -08 and -09 3384 o Mostly cosmetic changes to abide by draft-ietf-netmod-rfc6087bis. 3386 o Specified yang-version 1.1. 3388 o Added data model examples. 3390 o Some minor changes. 3392 B.7. Changes between versions -07 and -08 3394 o Timer intervals in client-cfg-parms are not mandatory anymore. 3396 o Added list of interfaces under "ip-sh" node for authentication 3397 parameters. 3399 o Renamed replay-protection to meticulous. 3401 B.8. Changes between versions -06 and -07 3403 o New ietf-bfd-types module. 3405 o Grouping for BFD clients to have BFD multiplier and interval 3406 values. 3408 o Change in ietf-bfd-mpls-te since MPLS-TE model changed. 3410 o Removed bfd- prefix from many names. 3412 B.9. Changes between versions -05 and -06 3414 o Adhere to NMDA-guidelines. 3416 o Echo function config moved to appendix as example. 3418 o Added IANA YANG modules. 3420 o Addressed various comments. 3422 B.10. Changes between versions -04 and -05 3424 o "bfd" node in augment of control-plane-protocol. 3426 o Removed augment of network-instance. Replaced by schema-mount. 3428 o Added information on interaction with other YANG modules. 3430 B.11. Changes between versions -03 and -04 3432 o Updated author information. 3434 o Fixed YANG compile error in ietf-bfd-lag.yang which was due to 3435 incorrect when statement. 3437 B.12. Changes between versions -02 and -03 3439 o Fixed YANG compilation warning due to incorrect revision date in 3440 ietf-bfd-ip-sh module. 3442 B.13. Changes between versions -01 and -02 3444 o Replace routing-instance with network-instance from YANG Network 3445 Instances [I-D.ietf-rtgwg-ni-model] 3447 B.14. Changes between versions -00 and -01 3449 o Remove BFD configuration parameters from BFD clients, all BFD 3450 configuration parameters in BFD 3452 o YANG module split in multiple YANG modules (one per type of 3453 forwarding path) 3455 o For BFD over MPLS-TE we augment MPLS-TE model 3457 o For BFD authentication we now use YANG Data Model for Key Chains 3458 [RFC8177] 3460 Authors' Addresses 3462 Reshad Rahman (editor) 3463 Cisco Systems 3464 Canada 3466 Email: rrahman@cisco.com 3467 Lianshu Zheng (editor) 3468 Huawei Technologies 3469 China 3471 Email: vero.zheng@huawei.com 3473 Mahesh Jethanandani (editor) 3475 Email: mjethanandani@gmail.com 3477 Santosh Pallagatti 3478 India 3480 Email: santosh.pallagatti@gmail.com 3482 Greg Mirsky 3483 ZTE Corporation 3485 Email: gregimirsky@gmail.com