idnits 2.17.00 (12 Aug 2021) /tmp/idnits55522/draft-ietf-bfd-yang-06.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 == Line 520 has weird spacing: '...nterval uin...' == Line 610 has weird spacing: '...nterval uin...' == Line 731 has weird spacing: '...nterval uin...' == Line 743 has weird spacing: '...nterval uin...' == Line 817 has weird spacing: '...nterval uin...' == (1 more instance...) == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (June 30, 2017) is 1785 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) == Missing Reference: 'RFC6242' is mentioned on line 2341, but not defined == Missing Reference: 'RFC6536' is mentioned on line 2342, but not defined ** Obsolete undefined reference: RFC 6536 (Obsoleted by RFC 8341) == Unused Reference: 'RFC6020' is defined on line 2483, but no explicit reference was found in the text == Unused Reference: 'RFC8040' is defined on line 2557, but no explicit reference was found in the text ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) ** Obsolete normative reference: RFC 7277 (Obsoleted by RFC 8344) ** Obsolete normative reference: RFC 8022 (Obsoleted by RFC 8349) == Outdated reference: draft-ietf-lime-yang-connectionless-oam has been published as RFC 8532 == Outdated reference: draft-ietf-mpls-base-yang has been published as RFC 8960 == Outdated reference: draft-ietf-netmod-schema-mount has been published as RFC 8528 == Outdated reference: draft-ietf-rtgwg-lne-model has been published as RFC 8530 == Outdated reference: draft-ietf-rtgwg-ni-model has been published as RFC 8529 == Outdated reference: A later version (-29) exists of draft-ietf-teas-yang-te-06 Summary: 4 errors (**), 0 flaws (~~), 18 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: January 1, 2018 Huawei Technologies 6 M. Jethanandani, Ed. 7 Cisco Systems 8 S. Pallagatti 10 G. Mirsky 11 ZTE Corporation 12 June 30, 2017 14 YANG Data Model for Bidirectional Forwarding Detection (BFD) 15 draft-ietf-bfd-yang-06.txt 17 Abstract 19 This document defines a YANG data model that can be used to configure 20 and manage Bidirectional Forwarding Detection (BFD). 22 Requirements Language 24 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 25 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 26 document are to be interpreted as described in RFC 2119 [RFC2119]. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at http://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on January 1, 2018. 45 Copyright Notice 47 Copyright (c) 2017 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 63 2. Design of the Data Model . . . . . . . . . . . . . . . . . . 4 64 2.1. Design of Configuration Model . . . . . . . . . . . . . . 5 65 2.1.1. Common BFD configuration parameters . . . . . . . . . 5 66 2.1.2. Single-hop IP . . . . . . . . . . . . . . . . . . . . 6 67 2.1.3. Multi-hop IP . . . . . . . . . . . . . . . . . . . . 6 68 2.1.4. MPLS Traffic Engineering Tunnels . . . . . . . . . . 7 69 2.1.5. MPLS Label Switched Paths . . . . . . . . . . . . . . 7 70 2.1.6. Link Aggregation Groups . . . . . . . . . . . . . . . 8 71 2.2. Design of Operational Model . . . . . . . . . . . . . . . 8 72 2.3. Notifications . . . . . . . . . . . . . . . . . . . . . . 9 73 2.4. RPC Operations . . . . . . . . . . . . . . . . . . . . . 9 74 2.5. BFD top level hierarchy . . . . . . . . . . . . . . . . . 9 75 2.6. BFD IP single-hop hierarchy . . . . . . . . . . . . . . . 9 76 2.7. BFD IP multi-hop hierarchy . . . . . . . . . . . . . . . 11 77 2.8. BFD over LAG hierarchy . . . . . . . . . . . . . . . . . 13 78 2.9. BFD over MPLS LSPs hierarchy . . . . . . . . . . . . . . 16 79 2.10. BFD over MPLS-TE hierarchy . . . . . . . . . . . . . . . 18 80 2.11. Interaction with other YANG modules . . . . . . . . . . . 19 81 2.11.1. Module ietf-interfaces . . . . . . . . . . . . . . . 20 82 2.11.2. Module ietf-ip . . . . . . . . . . . . . . . . . . . 20 83 2.11.3. Module ietf-mpls . . . . . . . . . . . . . . . . . . 20 84 2.11.4. Module ietf-te . . . . . . . . . . . . . . . . . . . 20 85 2.12. IANA BFD YANG Module . . . . . . . . . . . . . . . . . . 21 86 2.13. BFD top-level YANG Module . . . . . . . . . . . . . . . . 23 87 2.14. BFD IP single-hop YANG Module . . . . . . . . . . . . . . 36 88 2.15. BFD IP multi-hop YANG Module . . . . . . . . . . . . . . 38 89 2.16. BFD over LAG YANG Module . . . . . . . . . . . . . . . . 41 90 2.17. BFD over MPLS YANG Module . . . . . . . . . . . . . . . . 44 91 2.18. BFD over MPLS-TE YANG Module . . . . . . . . . . . . . . 47 92 2.19. Security Considerations . . . . . . . . . . . . . . . . . 50 93 2.20. IANA Considerations . . . . . . . . . . . . . . . . . . . 50 94 2.20.1. IANA-Maintained iana-bfd-types module . . . . . . . 51 95 2.21. Acknowledgements . . . . . . . . . . . . . . . . . . . . 52 96 3. References . . . . . . . . . . . . . . . . . . . . . . . . . 52 97 3.1. Normative References . . . . . . . . . . . . . . . . . . 52 98 3.2. Informative References . . . . . . . . . . . . . . . . . 53 99 Appendix A. Echo function configuration example . . . . . . . . 54 100 A.1. Example YANG module for BFD echo function . . . . . . . . 55 101 Appendix B. Change log . . . . . . . . . . . . . . . . . . . . . 57 102 B.1. Changes between versions -05 and -06 . . . . . . . . . . 57 103 B.2. Changes between versions -04 and -05 . . . . . . . . . . 57 104 B.3. Changes between versions -03 and -04 . . . . . . . . . . 57 105 B.4. Changes between versions -02 and -03 . . . . . . . . . . 57 106 B.5. Changes between versions -01 and -02 . . . . . . . . . . 58 107 B.6. Changes between versions -00 and -01 . . . . . . . . . . 58 108 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 58 110 1. Introduction 112 This document defines a YANG data model that can be used to configure 113 and manage Bidirectional Forwarding Detection (BFD) [RFC5880]. BFD 114 is a network protocol which is used for liveness detection of 115 arbitrary paths between systems. Some examples of different types of 116 paths over which we have BFD: 118 1) Two systems directly connected via IP. This is known as BFD over 119 single-hop IP, a.k.a. BFD for IPv4 and IPv6 [RFC5881] 121 2) Two systems connected via multiple hops as described in BFD for 122 Multiple Hops. [RFC5883] 124 3) Two systems connected via MPLS Label Switched Paths (LSPs) as 125 described in BFD for MPLS LSP [RFC5884] 127 4) Two systems connected via a Link Aggregation Group (LAG) interface 128 as described in BFD on LAG Interfaces [RFC7130] 130 5) Two systems connected via pseudowires (PWs), this is known as 131 Virtual Circuit Connectivity Verification (VCCV) as described in BFD 132 for PW VCCV [RFC5885]. This is not addressed in this document. 134 BFD typically does not operate on its own. Various control 135 protocols, also known as BFD clients, use the services provided by 136 BFD for their own operation as described in Generic Application of 137 BFD [RFC5882]. The obvious candidates which use BFD are those which 138 do not have "hellos" to detect failures, e.g. static routes, and 139 routing protocols whose "hellos" do not support sub-second failure 140 detection, e.g. OSPF and IS-IS. 142 2. Design of the Data Model 144 Since BFD is used for liveliness detection of various forwarding 145 paths, there is no uniform key to identify a BFD session. So the BFD 146 data model is split in multiple YANG modules where each module 147 corresponds to one type of forwarding path. For example, BFD for IP 148 single-hop is in one YANG module and BFD for MPLS-TE is in another 149 YANG module. The main difference between these modules is how a BFD 150 session is uniquely identified, i.e the key for the list containing 151 the BFD sessions for that forwarding path. To avoid duplication of 152 BFD definitions, we have common types and groupings which are used by 153 all the modules. 155 A new control-plane protocol "bfdv1" is defined and a "bfd" container 156 is created under control-plane-protocol as specified in A YANG Data 157 Model for Routing Management [RFC8022]. This new "bfd" node is 158 augmented by all the YANG modules for their respective specific 159 information. 161 BFD can operate in the following contexts: 163 1. Network devices as described in Network Device YANG 164 Organizational Models [I-D.ietf-rtgwg-device-model] 166 2. Logical Network Elements as described in YANG Logical Network 167 Element [I-D.ietf-rtgwg-lne-model] 169 3. Network instances as described in YANG Logical Network Element 170 [I-D.ietf-rtgwg-ni-model] 172 The approach taken is to do a schema-mount (see Schema Mount 173 [I-D.ietf-netmod-schema-mount]) of the BFD model in the appropriate 174 locations. For example, if an implementation supports BFD IP multi- 175 hop in network instances, the implementation would do schema-mount of 176 the BFD IP multi-hop model in a mount-point which resides in a 177 network instance. 179 The data models in this document strive to follow the "Network 180 Management Datastore Architecture" (NMDA) guidelines described in 181 [I-D.dsdt-nmda-guidelines]. This means that the data models do NOT 182 have separate top-level or sibling containers for configuration and 183 operational data. One exception at the moment is the model for MPLS- 184 TE in Section 2.1.4 186 2.1. Design of Configuration Model 188 The configuration model consists mainly of the parameters specified 189 in BFD [RFC5880]. Some examples are desired minimum transmit 190 interval, required minimum receive interval, detection multiplier, 191 etc 193 BFD clients are applications that use BFD for fast detection of 194 failures. Some implementations have BFD session configuration under 195 the BFD clients. For example, BFD session configuration under 196 routing applications such as OSPF, IS-IS, BGP etc. Other 197 implementations have BFD session configuration centralized under BFD, 198 i.e. outside the multiple BFD clients. 200 The BFD parameters of interest to a BFD client are mainly the 201 multiplier and interval(s) since those parameters impact the 202 convergence time of the BFD clients when a failure occurs. Other 203 parameters such as BFD authentication are not specific to the 204 requirements of the BFD client. To avoid splitting the BFD 205 configuration between BFD clients and this centralized model of BFD, 206 all the configuration is kept under this centralized model of BFD. 207 The only BFD configuration under BFD clients should be an "enable" 208 knob which makes those clients react to BFD liveliness detection 209 events. 211 2.1.1. Common BFD configuration parameters 213 The basic BFD configuration parameters are: 215 local-multiplier 216 This is the detection time multiplier as defined in BFD 217 [RFC5880]. 219 desired-min-tx-interval 220 This is the Desired Min TX Interval as defined in BFD 221 [RFC5880]. 223 required-min-rx-interval 224 This is the Required Min RX Interval as defined in BFD 225 [RFC5880]. 227 Although BFD [RFC5880] allows for different values for transmit and 228 receive intervals, some implementations allow users to specify just 229 one interval which is used for both transmit and receive intervals or 230 separate values for transmit and receive intervals. The BFD YANG 231 model supports this: there is a choice between "min-interval", used 232 for both transmit and receive intervals, and "desired-min-tx- 233 interval" and "required-min-rx-interval". This is supported via a 234 grouping which is used by the YANG modules for the various forwarding 235 paths. For BFD authentication we have: 237 key-chain 238 This is a reference to key-chain defined in YANG Data Model 239 for Key Chains [RFC8177]. The keys, cryptographic algotihms, 240 key lifetime etc are all defined in the key-chain model. 242 replay-protection 243 This specifies meticulous v/s non-meticulous mode as per BFD 244 [RFC5880]. 246 2.1.2. Single-hop IP 248 For single-hop IP, there is an augment of the "bfd" data node in 249 Section 2. The "ip-sh" node contains a list of IP single-hop 250 sessions where each session is uniquely identified by the interface 251 and destination address pair. For the configuration parameters we 252 use what is defined in Section 2.1.1 254 [RFC5880] and [RFC5881] do not specify whether echo function is 255 continuous or on demand. Therefore the mechanism used to start and 256 stop echo function is implementation specific and should be done by 257 augmentation: 259 1) Configuration. This is suitable for continuous echo function. 260 An example is provided in Appendix A. 262 2) RPC. This is suitable for on-demand echo function. 264 2.1.3. Multi-hop IP 266 For multi-hop IP, there is an augment of the "bfd" data node in 267 Section 2. 269 Because of multiple paths, there could be multiple multi-hop IP 270 sessions between a source and a destination address. We identify 271 this as a "session-group". The key for each "session-group" consists 272 of: 274 source address 275 Address belonging to the local system as per BFD for Multiple 276 Hops [RFC5883] 278 destination address 279 Address belonging to the remote system as per BFD for 280 Multiple Hops [RFC5883] 282 For the configuration parameters we use what is defined in 283 Section 2.1.1 285 Here are some extra parameters: 287 tx-ttl 288 TTL of outgoing BFD control packets. 290 rx-ttl 291 Minimum TTL of incoming BFD control packets. 293 2.1.4. MPLS Traffic Engineering Tunnels 295 For MPLS-TE tunnels, BFD is configured under the MPLS-TE tunnel since 296 the desired failure detection parameters is a property of the MPLS-TE 297 tunnel. This is achieved by augmenting the MPLS-TE data model in 298 YANG Data Model for TE Topologies [I-D.ietf-teas-yang-te]. For BFD 299 parameters which are specific to the TE application, e.g. whether to 300 tear down the tunnel in the event of a BFD session failure, these 301 parameters will be defined in the YANG model of the MPLS-TE 302 application. 304 On top of the usual BFD parameters, we have the following per MPLS-TE 305 tunnel: 307 encap 308 Encapsulation for the BFD packets: choice between IP, G-ACh 309 and IP with G-ACh as per MPLS Generic Associated Channel 310 [RFC5586] 312 For general MPLS-TE data, "mpls-te" data node is added under the 313 "bfd" node in Section 2. Since some MPLS-TE tunnels are uni- 314 directional there is no MPLS-TE configuration for these tunnels on 315 the egress node (note that this does not apply to bi-directional 316 MPLS-TP tunnels). The BFD parameters for the egress node are added 317 under "mpls-te". 319 2.1.5. MPLS Label Switched Paths 321 Here we address MPLS LSPs whose FEC is an IP address. The "bfd" node 322 in Section 2 is augmented with "mpls" which contains a list of 323 sessions uniquely identified by an IP prefix. Because of multiple 324 paths, there could be multiple MPLS sessions to an MPLS FEC. We 325 identify this as a "session-group". 327 Since these LSPs are uni-directional there is no LSP configuration on 328 the egress node. 330 The BFD parameters for the egress node are added under "mpls". 332 2.1.6. Link Aggregation Groups 334 Per BFD on LAG Interfaces [RFC7130], configuring BFD on LAG consists 335 of having micro-BFD sessions on each LAG member link. Since the BFD 336 parameters are an attribute of the LAG, they should be under the LAG. 337 However there is no LAG YANG model which we can augment. So a "lag" 338 data node is added to the "bfd" node in Section 2, the configuration 339 is per-LAG: we have a list of LAGs. The destination IP address of 340 the micro-BFD sessions is configured per-LAG and per address-family 341 (IPv4 and IPv6) 343 2.2. Design of Operational Model 345 The operational model contains both the overall statistics of BFD 346 sessions running on the device and the per session operational 347 information. 349 The overall statistics of BFD sessions consist of number of BFD 350 sessions, number of BFD sessions up etc. This information is 351 available globally (i.e. for all BFD sessions) under the "bfd" node 352 in Section 2 and also per type of forwarding path. 354 For each BFD session, mainly three categories of operational items 355 are shown. The fundamental information of a BFD session such as the 356 local discriminator, remote discriminator and the capability of 357 supporting demand detect mode are shown in the first category. The 358 second category includes a BFD session running information, e.g. the 359 remote BFD state and the diagnostic code received. Another example 360 is the actual transmit interval between the control packets, which 361 may be different from the desired minimum transmit interval 362 configured, is shown in this category. Similar examples are actual 363 received interval between the control packets and the actual transmit 364 interval between the echo packets. The third category contains the 365 detailed statistics of the session, e.g. when the session 366 transitioned up/down and how long it has been in that state. 368 For some session types, there may be more than 1 session on the 369 virtual path to the destination. For example, with IP multi-hop and 370 MPLS LSPs, there could be multiple BFD sessions from the source to 371 the same destination to test the various paths (ECMP) to the 372 destination. This is represented by having multiple "sessions" under 373 each "session-group". 375 2.3. Notifications 377 This YANG model defines notifications to inform clients of BFD of 378 important events detected during the protocol operation. Pair of 379 local and remote discriminator identifies a BFD session on local 380 system. Notifications also give more important details about BFD 381 sessions; e.g. new state, time in previous state, network-instance 382 and the reason that the BFD session state changed. The notifications 383 are defined for each type of forwarding path but use groupings for 384 common information. 386 2.4. RPC Operations 388 None. 390 2.5. BFD top level hierarchy 392 At the "bfd" node under control-plane-protocol, there is no 393 configuration data, only operational data. The operational data 394 consist of overall BFD session statistics, i.e. for BFD on all types 395 of forwarding paths. The "bfd" node under control-plane-protocol can 396 be used in a network device (top-level), or mounted in an LNE or in a 397 network instance. 399 module: ietf-bfd 400 augment /rt:routing/rt:control-plane-protocols 401 /rt:control-plane-protocol: 402 +--rw bfd 403 +--ro bfd-session-statistics 404 +--ro session-count? uint32 405 +--ro session-up-count? uint32 406 +--ro session-down-count? uint32 407 +--ro session-admin-down-count? uint32 409 2.6. BFD IP single-hop hierarchy 411 An "ip-sh" node is added under "bfd" node in control-plane-protocol. 412 The configuration and operational data for each BFD IP single-hop 413 session is under this "ip-sh" node. The "ip-sh" node can be used in 414 a network device (top-level), or mounted in an LNE or in a network 415 instance. 417 module: ietf-bfd-ip-sh 418 augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protoco 419 l/bfd:bfd: 420 +--rw ip-sh 421 +--ro bfd-session-statistics 422 | +--ro session-count? uint32 423 | +--ro session-up-count? uint32 424 | +--ro session-down-count? uint32 425 | +--ro session-admin-down-count? uint32 426 +--rw sessions* [interface dest-addr] 427 +--rw interface if:interface-ref 428 +--rw dest-addr inet:ip-address 429 +--rw source-addr? inet:ip-address 430 +--rw local-multiplier? bfd-multiplier 431 +--rw (interval-config-type)? 432 | +--:(tx-rx-intervals) 433 | | +--rw desired-min-tx-interval uint32 434 | | +--rw required-min-rx-interval uint32 435 | +--:(single-interval) 436 | +--rw min-interval uint32 437 +--rw demand-enabled? boolean 438 {bfd-demand-mode}? 439 +--rw admin-down? boolean 440 +--rw authentication-parms! {bfd-authentication}? 441 | +--rw key-chain? kc:key-chain-ref 442 | +--rw replay-protection? identityref 443 +--rw desired-min-echo-tx-interval? uint32 444 +--rw required-min-echo-rx-interval? uint32 445 +--ro path-type? identityref 446 +--ro ip-encapsulation? boolean 447 +--ro local-discriminator? bfd-discriminator 448 +--ro remote-discriminator? bfd-discriminator 449 +--ro remote-multiplier? bfd-multiplier 450 +--ro demand-capability? boolean 451 {bfd-demand-mode}? 452 +--ro source-port? inet:port-number 453 +--ro dest-port? inet:port-number 454 +--ro session-running 455 | +--ro session-index? uint32 456 | +--ro local-state? bfd-state 457 | +--ro remote-state? bfd-state 458 | +--ro local-diagnostic? iana-bfd-types: 459 bfd-diagnostic 460 | +--ro remote-diagnostic? iana-bfd-types: 461 bfd-diagnostic 462 | +--ro remote-authenticated? boolean 463 | +--ro remote-authentication-type? iana-bfd-types: 464 bfd-auth-type 465 | +--ro detection-mode? enumeration 466 | +--ro negotiated-tx-interval? uint32 467 | +--ro negotiated-rx-interval? uint32 468 | +--ro detection-time? uint32 469 | +--ro echo-tx-interval-in-use? uint32 {bfd-echo-mode}? 470 +--ro sesssion-statistics 471 +--ro create-time? yang:date-and-time 472 +--ro last-down-time? yang:date-and-time 473 +--ro last-up-time? yang:date-and-time 474 +--ro down-count? uint32 475 +--ro admin-down-count? uint32 476 +--ro receive-packet-count? uint64 477 +--ro send-packet-count? uint64 478 +--ro receive-bad-packet? uint64 479 +--ro send-failed-packet? uint64 480 notifications: 481 +---n bfd-singlehop-notification 482 +--ro local-discr? bfd-discriminator 483 +--ro remote-discr? bfd-discriminator 484 +--ro new-state? bfd-state 485 +--ro state-change-reason? iana-bfd-types:bfd-diagnostic 486 +--ro time-of-last-state-change? yang:date-and-time 487 +--ro dest-addr? inet:ip-address 488 +--ro source-addr? inet:ip-address 489 +--ro session-index? uint32 490 +--ro path-type? identityref 491 +--ro interface? if:interface-ref 492 +--ro echo-enabled? boolean 494 2.7. BFD IP multi-hop hierarchy 496 An "ip-mh" node is added under the "bfd" node in cntrol-plane- 497 protocol. The configuration and operational data for each BFD IP 498 multi-hop session is under this "ip-mh" node. In the operational 499 model we support multiple BFD multi-hop sessions per remote address 500 (ECMP), the local discriminator is used as key. The "ip-mh" node can 501 be used in a network device (top-level), or mounted in an LNE or in a 502 network instance. 504 module: ietf-bfd-ip-mh 505 augment /rt:routing/rt:control-plane-protocols 506 /rt:control-plane-protocol/bfd:bfd: 507 +--rw ip-mh 508 +--ro bfd-session-statistics 509 | +--ro session-count? uint32 510 | +--ro session-up-count? uint32 511 | +--ro session-down-count? uint32 512 | +--ro session-admin-down-count? uint32 513 +--rw session-group* [source-addr dest-addr] 514 +--rw source-addr inet:ip-address 515 +--rw dest-addr inet:ip-address 516 +--rw local-multiplier? bfd-multiplier 517 +--rw (interval-config-type)? 518 | +--:(tx-rx-intervals) 519 | | +--rw desired-min-tx-interval uint32 520 | | +--rw required-min-rx-interval uint32 521 | +--:(single-interval) 522 | +--rw min-interval uint32 523 +--rw demand-enabled? boolean {bfd-demand-mode}? 524 +--rw admin-down? boolean 525 +--rw authentication-parms! {bfd-authentication}? 526 | +--rw key-chain? kc:key-chain-ref 527 | +--rw replay-protection? identityref 528 +--rw tx-ttl? bfd:hops 529 +--rw rx-ttl bfd:hops 530 +--ro sessions* 531 +--ro path-type? identityref 532 +--ro ip-encapsulation? boolean 533 +--ro local-discriminator? bfd-discriminator 534 +--ro remote-discriminator? bfd-discriminator 535 +--ro remote-multiplier? bfd-multiplier 536 +--ro demand-capability? boolean {bfd-demand-mode}? 537 +--ro source-port? inet:port-number 538 +--ro dest-port? inet:port-number 539 +--ro session-running 540 | +--ro session-index? uint32 541 | +--ro local-state? bfd-state 542 | +--ro remote-state? bfd-state 543 | +--ro local-diagnostic? iana-bfd-types: 544 bfd-diagnostic 545 | +--ro remote-diagnostic? iana-bfd-types: 546 bfd-diagnostic 547 | +--ro remote-authenticated? boolean 548 | +--ro remote-authentication-type? iana-bfd-types: 549 bfd-auth-type 550 | +--ro detection-mode? enumeration 551 | +--ro negotiated-tx-interval? uint32 552 | +--ro negotiated-rx-interval? uint32 553 | +--ro detection-time? uint32 554 | +--ro echo-tx-interval-in-use? uint32 555 {bfd-echo-mode}? 556 +--ro session-statistics 557 +--ro create-time? yang:date-and-time 558 +--ro last-down-time? yang:date-and-time 559 +--ro last-up-time? yang:date-and-time 560 +--ro down-count? uint32 561 +--ro admin-down-count? uint32 562 +--ro receive-packet-count? uint64 563 +--ro send-packet-count? uint64 564 +--ro receive-bad-packet? uint64 565 +--ro send-failed-packet? uint64 567 notifications: 568 +---n bfd-multihop-notification 569 +--ro local-discr? bfd-discriminator 570 +--ro remote-discr? bfd-discriminator 571 +--ro new-state? bfd-state 572 +--ro state-change-reason? iana-bfd-types:bfd-diagnostic 573 +--ro time-of-last-state-change? yang:date-and-time 574 +--ro dest-addr? inet:ip-address 575 +--ro source-addr? inet:ip-address 576 +--ro session-index? uint32 577 +--ro path-type? identityref 579 2.8. BFD over LAG hierarchy 581 A "lag" node is added under the "bfd" node in control-plane-protocol. 582 The configuration and operational data for each BFD LAG session is 583 under this "lag" node. The "lag" node can be used in a network 584 device (top-level), or mounted in an LNE or in a network instance. 586 module: ietf-bfd-lag 587 augment /rt:routing/rt:control-plane-protocols 588 /rt:control-plane-protocol/bfd:bfd: 589 +--rw lag 590 +--rw micro-bfd-ipv4-session-statistics 591 | +--ro bfd-session-statistics 592 | +--ro session-count? uint32 593 | +--ro session-up-count? uint32 594 | +--ro session-down-count? uint32 595 | +--ro session-admin-down-count? uint32 596 +--rw micro-bfd-ipv6-session-statistics 597 | +--ro bfd-session-statistics 598 | +--ro session-count? uint32 599 | +--ro session-up-count? uint32 600 | +--ro session-down-count? uint32 601 | +--ro session-admin-down-count? uint32 602 +--rw sessions* [lag-name] 603 +--rw lag-name if:interface-ref 604 +--rw ipv4-dest-addr? inet:ipv4-address 605 +--rw ipv6-dest-addr? inet:ipv6-address 606 +--rw local-multiplier? bfd-multiplier 607 +--rw (interval-config-type)? 608 | +--:(tx-rx-intervals) 609 | | +--rw desired-min-tx-interval uint32 610 | | +--rw required-min-rx-interval uint32 611 | +--:(single-interval) 612 | +--rw min-interval uint32 613 +--rw demand-enabled? boolean {bfd-demand-mode}? 614 +--rw admin-down? boolean 615 +--rw authentication-parms! {bfd-authentication}? 616 | +--rw key-chain? kc:key-chain-ref 617 | +--rw replay-protection? identityref 618 +--rw use-ipv4? boolean 619 +--rw use-ipv6? boolean 620 +--ro member-links* [member-link] 621 +--ro member-link if:interface-ref 622 +--ro micro-bfd-ipv4 623 | +--ro path-type? identityref 624 | +--ro ip-encapsulation? boolean 625 | +--ro local-discriminator? bfd-discriminator 626 | +--ro remote-discriminator? bfd-discriminator 627 | +--ro remote-multiplier? bfd-multiplier 628 | +--ro demand-capability? boolean {bfd-demand-mode}? 629 | +--ro source-port? inet:port-number 630 | +--ro dest-port? inet:port-number 631 | +--ro session-running 632 | | +--ro session-index? uint32 633 | | +--ro local-state? bfd-state 634 | | +--ro remote-state? bfd-state 635 | | +--ro local-diagnostic? iana-bfd-types: 636 bfd-diagnostic 637 | | +--ro remote-diagnostic? iana-bfd-types: 638 bfd-diagnostic 639 | | +--ro remote-authenticated? boolean 640 | | +--ro remote-authentication-type? iana-bfd-types: 641 bfd-auth-type 642 | | +--ro detection-mode? enumeration 643 | | +--ro negotiated-tx-interval? uint32 644 | | +--ro negotiated-rx-interval? uint32 645 | | +--ro detection-time? uint32 646 | | +--ro echo-tx-interval-in-use? uint32 647 {bfd-echo-mode}? 648 | +--ro sesssion-statistics 649 | +--ro create-time? yang:date-and-time 650 | +--ro last-down-time? yang:date-and-time 651 | +--ro last-up-time? yang:date-and-time 652 | +--ro down-count? uint32 653 | +--ro admin-down-count? uint32 654 | +--ro receive-packet-count? uint64 655 | +--ro send-packet-count? uint64 656 | +--ro receive-bad-packet? uint64 657 | +--ro send-failed-packet? uint64 658 +--ro micro-bfd-ipv6 659 +--ro path-type? identityref 660 +--ro ip-encapsulation? boolean 661 +--ro local-discriminator? bfd-discriminator 662 +--ro remote-discriminator? bfd-discriminator 663 +--ro remote-multiplier? bfd-multiplier 664 +--ro demand-capability? boolean {bfd-demand-mode}? 665 +--ro source-port? inet:port-number 666 +--ro dest-port? inet:port-number 667 +--ro session-running 668 | +--ro session-index? uint32 669 | +--ro local-state? bfd-state 670 | +--ro remote-state? bfd-state 671 | +--ro local-diagnostic? iana-bfd-types: 672 bfd-diagnostic 673 | +--ro remote-diagnostic? iana-bfd-types: 674 bfd-diagnostic 675 | +--ro remote-authenticated? boolean 676 | +--ro remote-authentication-type? iana-bfd-types: 677 bfd-auth-type 678 | +--ro detection-mode? enumeration 679 | +--ro negotiated-tx-interval? uint32 680 | +--ro negotiated-rx-interval? uint32 681 | +--ro detection-time? uint32 682 | +--ro echo-tx-interval-in-use? uint32 683 {bfd-echo-mode}? 684 +--ro sesssion-statistics 685 +--ro create-time? yang:date-and-time 686 +--ro last-down-time? yang:date-and-time 687 +--ro last-up-time? yang:date-and-time 688 +--ro down-count? uint32 689 +--ro admin-down-count? uint32 690 +--ro receive-packet-count? uint64 691 +--ro send-packet-count? uint64 692 +--ro receive-bad-packet? uint64 693 +--ro send-failed-packet? uint64 694 notifications: 695 +---n bfd-lag-notification 696 +--ro local-discr? bfd-discriminator 697 +--ro remote-discr? bfd-discriminator 698 +--ro new-state? bfd-state 699 +--ro state-change-reason? iana-bfd-types:bfd-diagnostic 700 +--ro time-of-last-state-change? yang:date-and-time 701 +--ro dest-addr? inet:ip-address 702 +--ro source-addr? inet:ip-address 703 +--ro session-index? uint32 704 +--ro path-type? identityref 705 +--ro lag-name? if:interface-ref 706 +--ro member-link? if:interface-ref 708 2.9. BFD over MPLS LSPs hierarchy 710 An "mpls" node is added under the "bfd" node in control-plane- 711 protocol. The configuration is per MPLS FEC under this "mpls" node. 712 In the operational model we support multiple BFD sessions per MPLS 713 FEC (ECMP), the local discriminator is used as key. The "mpls" node 714 can be used in a network device (top-level), or mounted in an LNE or 715 in a network instance. 717 module: ietf-bfd-mpls 718 augment /rt:routing/rt:control-plane-protocols 719 /rt:control-plane-protocol/bfd:bfd: 720 +--rw mpls 721 +--ro bfd-session-statistics 722 | +--ro session-count? uint32 723 | +--ro session-up-count? uint32 724 | +--ro session-down-count? uint32 725 | +--ro session-admin-down-count? uint32 726 +--rw egress 727 | +--rw local-multiplier? bfd-multiplier 728 | +--rw (interval-config-type)? 729 | | +--:(tx-rx-intervals) 730 | | | +--rw desired-min-tx-interval uint32 731 | | | +--rw required-min-rx-interval uint32 732 | | +--:(single-interval) 733 | | +--rw min-interval uint32 734 | +--rw authentication-parms! {bfd-authentication}? 735 | +--rw key-chain? kc:key-chain-ref 736 | +--rw replay-protection? identityref 737 +--rw session-group* [mpls-fec] 738 +--rw mpls-fec inet:ip-prefix 739 +--rw local-multiplier? bfd-multiplier 740 +--rw (interval-config-type)? 741 | +--:(tx-rx-intervals) 742 | | +--rw desired-min-tx-interval uint32 743 | | +--rw required-min-rx-interval uint32 744 | +--:(single-interval) 745 | +--rw min-interval uint32 746 +--rw demand-enabled? boolean {bfd-demand-mode}? 747 +--rw admin-down? boolean 748 +--rw authentication-parms! {bfd-authentication}? 749 | +--rw key-chain? kc:key-chain-ref 750 | +--rw replay-protection? identityref 751 +--ro sessions* 752 +--ro path-type? identityref 753 +--ro ip-encapsulation? boolean 754 +--ro local-discriminator? bfd-discriminator 755 +--ro remote-discriminator? bfd-discriminator 756 +--ro remote-multiplier? bfd-multiplier 757 +--ro demand-capability? boolean {bfd-demand-mode}? 758 +--ro source-port? inet:port-number 759 +--ro dest-port? inet:port-number 760 +--ro session-running 761 | +--ro session-index? uint32 762 | +--ro local-state? bfd-state 763 | +--ro remote-state? bfd-state 764 | +--ro local-diagnostic? iana-bfd-types: 765 bfd-diagnostic 766 | +--ro remote-diagnostic? iana-bfd-types: 767 bfd-diagnostic 768 | +--ro remote-authenticated? boolean 769 | +--ro remote-authentication-type? iana-bfd-types: 770 bfd-auth-type 771 | +--ro detection-mode? enumeration 772 | +--ro negotiated-tx-interval? uint32 773 | +--ro negotiated-rx-interval? uint32 774 | +--ro detection-time? uint32 775 | +--ro echo-tx-interval-in-use? uint32 776 {bfd-echo-mode}? 777 +--ro sesssion-statistics 778 | +--ro create-time? yang:date-and-time 779 | +--ro last-down-time? yang:date-and-time 780 | +--ro last-up-time? yang:date-and-time 781 | +--ro down-count? uint32 782 | +--ro admin-down-count? uint32 783 | +--ro receive-packet-count? uint64 784 | +--ro send-packet-count? uint64 785 | +--ro receive-bad-packet? uint64 786 | +--ro send-failed-packet? uint64 787 +--ro mpls-dest-address? inet:ip-address 788 notifications: 789 +---n bfd-mpls-notification 790 +--ro local-discr? bfd-discriminator 791 +--ro remote-discr? bfd-discriminator 792 +--ro new-state? bfd-state 793 +--ro state-change-reason? iana-bfd-types:bfd-diagnostic 794 +--ro time-of-last-state-change? yang:date-and-time 795 +--ro dest-addr? inet:ip-address 796 +--ro source-addr? inet:ip-address 797 +--ro session-index? uint32 798 +--ro path-type? identityref 799 +--ro mpls-dest-address? inet:ip-address 801 2.10. BFD over MPLS-TE hierarchy 803 YANG Data Model for TE Topologies [I-D.ietf-teas-yang-te] is 804 augmented. BFD is configured per MPLS-TE tunnel, and BFD session 805 operational data is provided per MPLS-TE LSP. 807 module: ietf-bfd-mpls-te 808 augment /rt:routing/rt:control-plane-protocols 809 /rt:control-plane-protocol/bfd:bfd: 810 +--rw mpls-te 811 +--rw config 812 | +--rw egress 813 | +--rw local-multiplier? bfd-multiplier 814 | +--rw (interval-config-type)? 815 | | +--:(tx-rx-intervals) 816 | | | +--rw desired-min-tx-interval uint32 817 | | | +--rw required-min-rx-interval uint32 818 | | +--:(single-interval) 819 | | +--rw min-interval uint32 820 | +--rw authentication-parms! {bfd-authentication}? 821 | +--rw key-chain? kc:key-chain-ref 822 | +--rw replay-protection? identityref 823 +--ro oper 824 +--ro bfd-session-statistics 825 +--ro session-count? uint32 826 +--ro session-up-count? uint32 827 +--ro session-down-count? uint32 828 +--ro session-admin-down-count? uint32 829 augment /te:te/te:tunnels/te:tunnel/te:config: 830 +--rw local-multiplier? bfd-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) 836 | +--rw min-interval uint32 837 +--rw demand-enabled? boolean {bfd-demand-mode}? 838 +--rw admin-down? boolean 839 +--rw authentication-parms! {bfd-authentication}? 840 | +--rw key-chain? kc:key-chain-ref 841 | +--rw replay-protection? identityref 842 +--rw encap? identityref 843 augment /te:te/te:lsps-state/te:lsp: 844 +--ro path-type? identityref 845 +--ro ip-encapsulation? boolean 846 +--ro local-discriminator? bfd-discriminator 847 +--ro remote-discriminator? bfd-discriminator 848 +--ro remote-multiplier? bfd-multiplier 849 +--ro demand-capability? boolean {bfd-demand-mode}? 850 +--ro source-port? inet:port-number 851 +--ro dest-port? inet:port-number 852 +--ro session-running 853 | +--ro session-index? uint32 854 | +--ro local-state? bfd-state 855 | +--ro remote-state? bfd-state 856 | +--ro local-diagnostic? iana-bfd-types:bfd-diagnostic 857 | +--ro remote-diagnostic? iana-bfd-types:bfd-diagnostic 858 | +--ro remote-authenticated? boolean 859 | +--ro remote-authentication-type? iana-bfd-types:bfd-auth-type 860 {bfd-authentication}? 861 | +--ro detection-mode? enumeration 862 | +--ro negotiated-tx-interval? uint32 863 | +--ro negotiated-rx-interval? uint32 864 | +--ro detection-time? uint32 865 | +--ro echo-tx-interval-in-use? uint32 {bfd-echo-mode}? 866 +--ro sesssion-statistics 867 | +--ro create-time? yang:date-and-time 868 | +--ro last-down-time? yang:date-and-time 869 | +--ro last-up-time? yang:date-and-time 870 | +--ro down-count? uint32 871 | +--ro admin-down-count? uint32 872 | +--ro receive-packet-count? uint64 873 | +--ro send-packet-count? uint64 874 | +--ro receive-bad-packet? uint64 875 | +--ro send-failed-packet? uint64 876 +--ro mpls-dest-address? inet:ip-address 877 notifications: 878 +---n bfd-mpls-te-notification 879 +--ro local-discr? bfd-discriminator 880 +--ro remote-discr? bfd-discriminator 881 +--ro new-state? bfd-state 882 +--ro state-change-reason? iana-bfd-types:bfd-diagnostic 883 +--ro time-of-last-state-change? yang:date-and-time 884 +--ro dest-addr? inet:ip-address 885 +--ro source-addr? inet:ip-address 886 +--ro session-index? uint32 887 +--ro path-type? identityref 888 +--ro mpls-dest-address? inet:ip-address 889 +--ro tunnel-name? string 891 2.11. Interaction with other YANG modules 893 Generic YANG Data Model for Connectionless OAM protocols 894 [I-D.ietf-lime-yang-connectionless-oam] describes how the LIME 895 connectionless OAM model could be extended to support BFD. 897 Also, the operation of the BFD data model depends on configuration 898 parameters that are defined in other YANG modules. 900 2.11.1. Module ietf-interfaces 902 The following boolean configuration is defined in A YANG Data Model 903 for Interface Management [RFC7223]: 905 /if:interfaces/if:interface/if:enabled 906 If this configuration is set to "false", no BFD packets can 907 be transmitted or received on that interface. 909 2.11.2. Module ietf-ip 911 The following boolean configuration is defined in A YANG Data Model 912 for IP Management [RFC7277]: 914 /if:interfaces/if:interface/ip:ipv4/ip:enabled 915 If this configuration is set to "false", no BFD IPv4 packets 916 can be transmitted or received on that interface. 918 /if:interfaces/if:interface/ip:ipv4/ip:forwarding 919 If this configuration is set to "false", no BFD IPv4 packets 920 can be transmitted or received on that interface. 922 /if:interfaces/if:interface/ip:ipv6/ip:enabled 923 If this configuration is set to "false", no BFD IPv6 packets 924 can be transmitted or received on that interface. 926 /if:interfaces/if:interface/ip:ipv6/ip:forwarding 927 If this configuration is set to "false", no BFD IPv6 packets 928 can be transmitted or received on that interface. 930 2.11.3. Module ietf-mpls 932 The following boolean configuration is defined in A YANG Data Model 933 for MPLS Base [I-D.ietf-mpls-base-yang]: 935 /rt:routing/mpls:mpls/mpls:interface/mpls:config/mpls:enabled 936 If this configuration is set to "false", no BFD MPLS packets 937 can be transmitted or received on that interface. 939 2.11.4. Module ietf-te 941 The following configuration is defined in the "ietf-te" YANG module 942 YANG Data Model for TE Topology [I-D.ietf-teas-yang-te]: 944 /ietf-te:te/ietf-te:tunnels/ietf-te:tunnel/ietf-te:config/ietf- 945 te:admin-status 946 If this configuration is not set to "state-up", no BFD MPLS 947 packets can be transmitted or received on that tunnel. 949 2.12. IANA BFD YANG Module 951 file "iana-bfd-types@2017-06-30.yang" 953 module iana-bfd-types { 954 namespace "urn:ietf:params:xml:ns:yang:iana-bfd-types"; 956 prefix "iana-bfd-types"; 958 organization "IANA"; 960 contact 961 " Internet Assigned Numbers Authority 963 Postal: ICANN 964 4676 Admiralty Way, Suite 330 965 Marina del Rey, CA 90292 967 Tel: +1 310 823 9358 968 "; 970 description 971 "This module contains a collection of YANG data types 972 considered defined by IANA and used for BFD. 974 Copyright (c) 2017 IETF Trust and the persons 975 identified as authors of the code. All rights reserved. 977 Redistribution and use in source and binary forms, with or 978 without modification, is permitted pursuant to, and subject 979 to the license terms contained in, the Simplified BSD License 980 set forth in Section 4.c of the IETF Trust's Legal Provisions 981 Relating to IETF Documents 982 (http://trustee.ietf.org/license-info). 984 This version of this YANG module is part of RFC XXXX; see 985 the RFC itself for full legal notices."; 987 revision 2017-06-30 { 988 description "Initial revision."; 989 reference "RFC XXXX: IANA BFD YANG Data Types."; 990 } 991 // RFC Ed.: replace XXXX with actual RFC number and remove this 992 // note 994 typedef bfd-diagnostic { 995 type enumeration { 996 enum none { 997 value 0; 998 description "None"; 999 } 1000 enum control-expiry { 1001 value 1; 1002 description "Control timer expiry"; 1003 } 1004 enum echo-failed { 1005 value 2; 1006 description "Echo failure"; 1007 } 1008 enum neighbor-down { 1009 value 3; 1010 description "Neighbor down"; 1011 } 1012 enum forwarding-reset { 1013 value 4; 1014 description "Forwarding reset"; 1015 } 1016 enum path-down { 1017 value 5; 1018 description "Path down"; 1019 } 1020 enum concatenated-path-down { 1021 value 6; 1022 description "Concatenated path down"; 1023 } 1024 enum admin-down { 1025 value 7; 1026 description "Admin down"; 1027 } 1028 enum reverse-concatenated-path-down { 1029 value 8; 1030 description "Reverse concatenated path down"; 1031 } 1032 enum mis-connectivity-defect { 1033 value 9; 1034 description "Mis-connectivity defect as specified in RFC6428"; 1035 } 1036 } 1037 description 1038 "BFD diagnostic as defined in RFC5880. Range is 0 to 31."; 1039 } 1041 typedef bfd-auth-type { 1042 type enumeration { 1043 enum reserved { 1044 value 0; 1045 description "Reserved"; 1046 } 1047 enum simple-password { 1048 value 1; 1049 description "Simple password"; 1050 } 1051 enum keyed-md5 { 1052 value 2; 1053 description "Keyed MD5"; 1054 } 1055 enum meticulous-keyed-md5 { 1056 value 3; 1057 description "Meticulous keyed MD5"; 1058 } 1059 enum keyed-sha1 { 1060 value 4; 1061 description "Keyed SHA1"; 1062 } 1063 enum meticulous-keyed-sha1 { 1064 value 5; 1065 description "Meticulous keyed SHA1"; 1066 } 1067 } 1068 description 1069 "BFD authentication type as defined in RFC5880. Range is 0 to 1070 255."; 1071 } 1073 } 1075 1077 2.13. BFD top-level YANG Module 1079 file "ietf-bfd@2017-06-30.yang" 1081 module ietf-bfd { 1082 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd"; 1084 prefix "bfd"; 1085 import iana-bfd-types { 1086 prefix "iana-bfd-types"; 1087 } 1089 import ietf-inet-types { 1090 prefix "inet"; 1091 } 1093 import ietf-yang-types { 1094 prefix "yang"; 1095 } 1097 import ietf-routing { 1098 prefix "rt"; 1099 } 1101 import ietf-key-chain { 1102 prefix "kc"; 1103 } 1105 organization "IETF BFD Working Group"; 1107 contact 1108 "WG Web: 1109 WG List: 1111 Editors: Reshad Rahman (rrahman@cisco.com), 1112 Lianshu Zheng (vero.zheng@huawei.com), 1113 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1115 description 1116 "This module contains the YANG definition for BFD parameters as 1117 per RFC5880. 1119 Copyright (c) 2017 IETF Trust and the persons 1120 identified as authors of the code. All rights reserved. 1122 Redistribution and use in source and binary forms, with or 1123 without modification, is permitted pursuant to, and subject 1124 to the license terms contained in, the Simplified BSD License 1125 set forth in Section 4.c of the IETF Trust's Legal Provisions 1126 Relating to IETF Documents 1127 (http://trustee.ietf.org/license-info). 1129 This version of this YANG module is part of RFC XXXX; see 1130 the RFC itself for full legal notices."; 1132 revision 2017-06-30 { 1133 description "Initial revision."; 1134 reference "RFC XXXX: A YANG data model for BFD"; 1135 } 1137 // RFC Ed.: replace XXXX with actual RFC number and remove this 1138 // note 1140 identity bfdv1 { 1141 base "rt:control-plane-protocol"; 1142 description "BFD protocol version 1 as per RFC5880."; 1143 } 1145 typedef bfd-discriminator { 1146 type uint32 { 1147 range 1..4294967295; 1148 } 1149 description "BFD discriminator"; 1150 } 1152 typedef bfd-state { 1153 type enumeration { 1154 enum adminDown { 1155 value 0; 1156 description "admindown"; 1157 } 1158 enum down { 1159 value 1; 1160 description "down"; 1161 } 1162 enum init { 1163 value 2; 1164 description "init"; 1165 } 1166 enum up { 1167 value 3; 1168 description "up"; 1169 } 1170 } 1171 description "BFD state as defined in RFC5880"; 1172 } 1174 typedef bfd-multiplier { 1175 type uint8 { 1176 range 1..255; 1177 } 1178 description "Multiplier"; 1179 } 1180 typedef hops { 1181 type uint8 { 1182 range 1..255; 1183 } 1184 description 1185 "This corresponds to Time To Live for IPv4 and corresponds to hop 1186 limit for IPv6"; 1187 } 1189 /* 1190 * Identity definitions 1191 */ 1192 identity bfd-path-type { 1193 description 1194 "Base identity for BFD path type. The session type indicates 1195 the type of path on which BFD is running"; 1196 } 1197 identity bfd-path-ip-sh { 1198 base bfd-path-type; 1199 description "BFD on IP single hop"; 1200 } 1201 identity bfd-path-ip-mh { 1202 base bfd-path-type; 1203 description "BFD on IP multi hop"; 1204 } 1205 identity bfd-path-mpls-te { 1206 base bfd-path-type; 1207 description "BFD on MPLS Traffic Engineering"; 1208 } 1209 identity bfd-path-mpls-lsp { 1210 base bfd-path-type; 1211 description "BFD on MPLS Label Switched Path"; 1212 } 1213 identity bfd-path-lag { 1214 base bfd-path-type; 1215 description "Micro-BFD on LAG member links"; 1216 } 1218 identity bfd-encap-type { 1219 description 1220 "Base identity for BFD encapsulation type."; 1221 } 1222 identity bfd-encap-ip { 1223 base bfd-encap-type; 1224 description "BFD with IP encapsulation."; 1225 } 1227 identity bfd-auth-replay-protection { 1228 description 1229 "Base identity for BFD authentication replay protection. " + 1230 "See section 6.7 of RFC5880."; 1231 } 1232 identity bfd-auth-replay-protection-non-meticulous { 1233 base bfd-auth-replay-protection; 1234 description "Non-meticulous (see section 6.7.3 of RFC5880)"; 1235 } 1236 identity bfd-auth-replay-protection-meticulous { 1237 base bfd-auth-replay-protection; 1238 description "Meticulous (see section 6.7.3 of RFC5880)"; 1239 } 1241 /* 1242 * Feature definitions. 1243 */ 1244 feature bfd-authentication { 1245 description "BFD authentication supported"; 1246 } 1248 feature bfd-demand-mode { 1249 description "BFD demand mode supported"; 1250 } 1252 feature bfd-echo-mode { 1253 description "BFD echo mode supported"; 1254 } 1256 /* 1257 * Groupings 1258 */ 1259 grouping bfd-auth-parms { 1260 description 1261 "Grouping for BFD authentication parameters 1262 (see section 6.7 of RFC5880)."; 1263 container authentication-parms { 1264 if-feature bfd-authentication; 1265 presence 1266 "Enables BFD authentication (see section 6.7 of RFC5880)."; 1267 description "Parameters for BFD authentication"; 1269 leaf key-chain { 1270 type kc:key-chain-ref; 1271 description "Name of key-chain"; 1272 } 1274 leaf replay-protection { 1275 type identityref { 1276 base bfd-auth-replay-protection; 1277 } 1278 description 1279 "Protection against replays"; 1280 } 1281 } 1282 } 1284 grouping bfd-grouping-base-cfg-parms { 1285 description "BFD grouping for base config parameters"; 1286 leaf local-multiplier { 1287 type bfd-multiplier; 1288 default 3; 1289 description "Multiplier transmitted by local system"; 1290 } 1292 choice interval-config-type { 1293 description 1294 "Two interval values or 1 value used for both tx and rx"; 1295 case tx-rx-intervals { 1296 leaf desired-min-tx-interval { 1297 type uint32; 1298 units microseconds; 1299 mandatory true; 1300 description 1301 "Desired minimum transmit interval of control packets"; 1302 } 1304 leaf required-min-rx-interval { 1305 type uint32; 1306 units microseconds; 1307 mandatory true; 1308 description 1309 "Required minimum receive interval of control packets"; 1310 } 1311 } 1312 case single-interval { 1313 leaf min-interval { 1314 type uint32; 1315 units microseconds; 1316 mandatory true; 1317 description 1318 "Desired minimum transmit interval and required " + 1319 "minimum receive interval of control packets"; 1320 } 1321 } 1322 } 1323 } 1324 grouping bfd-grouping-common-cfg-parms { 1325 description "BFD grouping for common config parameters"; 1327 uses bfd-grouping-base-cfg-parms; 1329 leaf demand-enabled { 1330 if-feature bfd-demand-mode; 1331 type boolean; 1332 default false; 1333 description "To enable demand mode"; 1334 } 1336 leaf admin-down { 1337 type boolean; 1338 default false; 1339 description 1340 "Is the BFD session administratively down"; 1341 } 1342 uses bfd-auth-parms; 1343 } 1345 grouping bfd-grouping-echo-cfg-parms { 1346 description "BFD grouping for echo config parameters"; 1347 leaf desired-min-echo-tx-interval { 1348 type uint32; 1349 units microseconds; 1350 default 0; 1351 description "Desired minumum transmit interval for echo"; 1352 } 1354 leaf required-min-echo-rx-interval { 1355 type uint32; 1356 units microseconds; 1357 default 0; 1358 description "Required minimum receive interval for echo"; 1359 } 1360 } 1362 grouping bfd-client-base-cfg-parms { 1363 description 1364 "BFD grouping which could be used by a protocol which 1365 is a client of BFD to enable its use of BFD"; 1367 container bfd-cfg { 1368 description "BFD configuration"; 1369 leaf enabled { 1370 type boolean; 1371 default false; 1372 description "True if BFD is enabled"; 1373 } 1374 } 1375 } 1377 grouping bfd-all-session { 1378 description "BFD session operational information"; 1379 leaf path-type { 1380 type identityref { 1381 base bfd-path-type; 1382 } 1383 config "false"; 1384 description 1385 "BFD session type, this indicates the path type that BFD is 1386 running on"; 1387 } 1388 leaf ip-encapsulation { 1389 type boolean; 1390 config "false"; 1391 description "Whether BFD encapsulation uses IP"; 1392 } 1393 leaf local-discriminator { 1394 type bfd-discriminator; 1395 config "false"; 1396 description "Local discriminator"; 1397 } 1398 leaf remote-discriminator { 1399 type bfd-discriminator; 1400 config "false"; 1401 description "Remote discriminator"; 1402 } 1403 leaf remote-multiplier { 1404 type bfd-multiplier; 1405 config "false"; 1406 description "Remote multiplier"; 1407 } 1408 leaf demand-capability { 1409 if-feature bfd-demand-mode; 1410 type boolean; 1411 config "false"; 1412 description "Local demand mode capability"; 1413 } 1414 leaf source-port { 1415 when "../ip-encapsulation = 'true'" { 1416 description 1417 "Source port valid only when IP encapsulation is used"; 1418 } 1419 type inet:port-number; 1420 config "false"; 1421 description "Source UDP port"; 1422 } 1423 leaf dest-port { 1424 when "../ip-encapsulation = 'true'" { 1425 description 1426 "Destination port valid only when IP encapsulation is used"; 1427 } 1428 type inet:port-number; 1429 config "false"; 1430 description "Destination UDP port"; 1431 } 1433 container session-running { 1434 config "false"; 1435 description "BFD session running information"; 1436 leaf session-index { 1437 type uint32; 1438 description 1439 "An index used to uniquely identify BFD sessions"; 1440 } 1441 leaf local-state { 1442 type bfd-state; 1443 description "Local state"; 1444 } 1445 leaf remote-state { 1446 type bfd-state; 1447 description "Remote state"; 1448 } 1449 leaf local-diagnostic { 1450 type iana-bfd-types:bfd-diagnostic; 1451 description "Local diagnostic"; 1452 } 1453 leaf remote-diagnostic { 1454 type iana-bfd-types:bfd-diagnostic; 1455 description "Remote diagnostic"; 1456 } 1457 leaf remote-authenticated { 1458 type boolean; 1459 description 1460 "Indicates whether incoming BFD control packets are 1461 authenticated"; 1462 } 1463 leaf remote-authentication-type { 1464 when "../remote-authenticated = 'true'" { 1465 description 1466 "Only valid when incoming BFD control packets are 1467 authenticated"; 1469 } 1470 if-feature bfd-authentication; 1471 type iana-bfd-types:bfd-auth-type; 1472 description 1473 "Authentication type of incoming BFD control packets"; 1474 } 1475 leaf detection-mode { 1476 type enumeration { 1477 enum async-with-echo { 1478 value "1"; 1479 description "Async with echo"; 1480 } 1481 enum async-without-echo { 1482 value "2"; 1483 description "Async without echo"; 1484 } 1485 enum demand-with-echo { 1486 value "3"; 1487 description "Demand with echo"; 1488 } 1489 enum demand-without-echo { 1490 value "4"; 1491 description "Demand without echo"; 1492 } 1493 } 1494 description "Detection mode"; 1495 } 1496 leaf negotiated-tx-interval { 1497 type uint32; 1498 units microseconds; 1499 description "Negotiated transmit interval"; 1500 } 1501 leaf negotiated-rx-interval { 1502 type uint32; 1503 units microseconds; 1504 description "Negotiated receive interval"; 1505 } 1506 leaf detection-time { 1507 type uint32; 1508 units microseconds; 1509 description "Detection time"; 1510 } 1511 leaf echo-tx-interval-in-use { 1512 when "../../path-type = 'bfd-path-ip-sh'" { 1513 description 1514 "Echo is supported for IP single-hop only."; 1515 } 1516 if-feature bfd-echo-mode; 1517 type uint32; 1518 units microseconds; 1519 description "Echo transmit interval in use"; 1520 } 1521 } 1523 container sesssion-statistics { 1524 config "false"; 1525 description "BFD per-session statistics"; 1527 leaf create-time { 1528 type yang:date-and-time; 1529 description 1530 "Time and date when session was created"; 1531 } 1532 leaf last-down-time { 1533 type yang:date-and-time; 1534 description 1535 "Time and date of last time the session went down"; 1536 } 1537 leaf last-up-time { 1538 type yang:date-and-time; 1539 description 1540 "Time and date of last time the session went up"; 1541 } 1542 leaf down-count { 1543 type uint32; 1544 description "Session Down Count"; 1545 } 1546 leaf admin-down-count { 1547 type uint32; 1548 description "Session Admin-Down Count"; 1549 } 1550 leaf receive-packet-count { 1551 type uint64; 1552 description "Received Packet Count"; 1553 } 1554 leaf send-packet-count { 1555 type uint64; 1556 description "Sent Packet Count"; 1557 } 1558 leaf receive-bad-packet { 1559 type uint64; 1560 description "Received bad packet count"; 1561 } 1562 leaf send-failed-packet { 1563 type uint64; 1564 description "Packet Failed to Send Count"; 1566 } 1567 } 1568 } 1570 grouping bfd-session-statistics { 1571 description "Grouping for session counters"; 1572 container bfd-session-statistics { 1573 config false; 1574 description "BFD session counters"; 1575 leaf session-count { 1576 type uint32; 1577 description "Number of sessions"; 1578 } 1579 leaf session-up-count { 1580 type uint32; 1581 description "Count of sessions which are up"; 1582 } 1583 leaf session-down-count { 1584 type uint32; 1585 description "Count of sessions which are down"; 1586 } 1587 leaf session-admin-down-count { 1588 type uint32; 1589 description "Count of sessions which are admin-down"; 1590 } 1591 } 1592 } 1594 grouping bfd-notification-parms { 1595 description 1596 "This group describes common parameters that will be sent " + 1597 "as part of BFD notification"; 1599 leaf local-discr { 1600 type bfd-discriminator; 1601 description "BFD local discriminator"; 1602 } 1604 leaf remote-discr { 1605 type bfd-discriminator; 1606 description "BFD remote discriminator"; 1607 } 1609 leaf new-state { 1610 type bfd-state; 1611 description "Current BFD state"; 1612 } 1613 leaf state-change-reason { 1614 type iana-bfd-types:bfd-diagnostic; 1615 description "BFD state change reason"; 1616 } 1618 leaf time-of-last-state-change { 1619 type yang:date-and-time; 1620 description 1621 "Calendar time of previous state change"; 1622 } 1624 leaf dest-addr { 1625 type inet:ip-address; 1626 description "BFD peer address"; 1627 } 1629 leaf source-addr { 1630 type inet:ip-address; 1631 description "BFD local address"; 1632 } 1634 leaf session-index { 1635 type uint32; 1636 description "An index used to uniquely identify BFD sessions"; 1637 } 1639 leaf path-type { 1640 type identityref { 1641 base bfd-path-type; 1642 } 1643 description "BFD path type"; 1644 } 1645 } 1647 augment "/rt:routing/rt:control-plane-protocols/" 1648 + "rt:control-plane-protocol" { 1649 when "rt:type = 'bfd:bfdv1'" { 1650 description 1651 "This augmentation is only valid for a control-plane protocol 1652 instance of BFD (type 'bfdv1')."; 1653 } 1654 description "BFD augmentation."; 1656 container bfd { 1657 description "BFD top level container"; 1659 uses bfd-session-statistics; 1660 } 1662 } 1663 } 1665 1667 2.14. BFD IP single-hop YANG Module 1669 file "ietf-bfd-ip-sh@2017-06-30.yang" 1671 module ietf-bfd-ip-sh { 1672 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh"; 1674 prefix "bfd-ip-sh"; 1676 import ietf-bfd { 1677 prefix "bfd"; 1678 } 1680 import ietf-interfaces { 1681 prefix "if"; 1682 } 1684 import ietf-inet-types { 1685 prefix "inet"; 1686 } 1688 import ietf-routing { 1689 prefix "rt"; 1690 } 1692 organization "IETF BFD Working Group"; 1694 contact 1695 "WG Web: 1696 WG List: 1698 Editors: Reshad Rahman (rrahman@cisco.com), 1699 Lianshu Zheng (vero.zheng@huawei.com), 1700 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1702 description 1703 "This module contains the YANG definition for BFD IP single-hop 1704 as per RFC5881. 1706 Copyright (c) 2017 IETF Trust and the persons 1707 identified as authors of the code. All rights reserved. 1709 Redistribution and use in source and binary forms, with or 1710 without modification, is permitted pursuant to, and subject 1711 to the license terms contained in, the Simplified BSD License 1712 set forth in Section 4.c of the IETF Trust's Legal Provisions 1713 Relating to IETF Documents 1714 (http://trustee.ietf.org/license-info). 1716 This version of this YANG module is part of RFC XXXX; see 1717 the RFC itself for full legal notices."; 1719 revision 2017-06-30 { 1720 description "Initial revision."; 1721 reference "RFC XXXX: A YANG data model for BFD IP single-hop"; 1722 } 1724 // RFC Ed.: replace XXXX with actual RFC number and remove this 1725 // note 1727 augment "/rt:routing/rt:control-plane-protocols/" 1728 + "rt:control-plane-protocol/bfd:bfd" { 1729 description "BFD augmentation for IP single-hop"; 1730 container ip-sh { 1731 description "BFD IP single-hop top level container"; 1733 uses bfd:bfd-session-statistics; 1735 list sessions { 1736 key "interface dest-addr"; 1737 description "List of IP single-hop sessions"; 1738 leaf interface { 1739 type if:interface-ref; 1740 description 1741 "Interface on which the BFD session is running."; 1742 } 1743 leaf dest-addr { 1744 type inet:ip-address; 1745 description "IP address of the peer"; 1746 } 1747 leaf source-addr { 1748 type inet:ip-address; 1749 description "Local address"; 1750 } 1752 uses bfd:bfd-grouping-common-cfg-parms; 1754 uses bfd:bfd-grouping-echo-cfg-parms; 1756 uses bfd:bfd-all-session; 1757 } 1759 } 1760 } 1762 notification bfd-singlehop-notification { 1763 description 1764 "Notification for BFD single-hop session state change. An " + 1765 "implementation may rate-limit notifications, e.g. when a" + 1766 "session is continuously changing state."; 1768 uses bfd:bfd-notification-parms; 1770 leaf interface { 1771 type if:interface-ref; 1772 description "Interface to which this BFD session belongs to"; 1773 } 1775 leaf echo-enabled { 1776 type boolean; 1777 description "Was echo enabled for BFD"; 1778 } 1779 } 1781 } 1783 1785 2.15. BFD IP multi-hop YANG Module 1787 file "ietf-bfd-ip-mh@2017-06-30.yang" 1789 module ietf-bfd-ip-mh { 1790 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh"; 1791 // replace with IANA namespace when assigned 1792 prefix "bfd-ip-mh"; 1794 import ietf-bfd { 1795 prefix "bfd"; 1796 } 1798 import ietf-inet-types { 1799 prefix "inet"; 1800 } 1802 import ietf-routing { 1803 prefix "rt"; 1804 } 1806 organization "IETF BFD Working Group"; 1807 contact 1808 "WG Web: 1809 WG List: 1811 Editors: Reshad Rahman (rrahman@cisco.com), 1812 Lianshu Zheng (vero.zheng@huawei.com), 1813 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1815 description 1816 "This module contains the YANG definition for BFD IP multi-hop 1817 as per RFC5883. 1819 Copyright (c) 2017 IETF Trust and the persons 1820 identified as authors of the code. All rights reserved. 1822 Redistribution and use in source and binary forms, with or 1823 without modification, is permitted pursuant to, and subject 1824 to the license terms contained in, the Simplified BSD License 1825 set forth in Section 4.c of the IETF Trust's Legal Provisions 1826 Relating to IETF Documents 1827 (http://trustee.ietf.org/license-info). 1829 This version of this YANG module is part of RFC XXXX; see 1830 the RFC itself for full legal notices."; 1832 revision 2017-06-30 { 1833 description "Initial revision."; 1834 reference "RFC XXXX: A YANG data model for BFD IP multi-hop"; 1835 } 1837 // RFC Ed.: replace XXXX with actual RFC number and remove this 1838 // note 1840 augment "/rt:routing/rt:control-plane-protocols/" 1841 + "rt:control-plane-protocol/bfd:bfd" { 1842 description "BFD augmentation for IP multi-hop"; 1843 container ip-mh { 1844 description "BFD IP multi-hop top level container"; 1846 uses bfd:bfd-session-statistics; 1848 list session-group { 1849 key "source-addr dest-addr"; 1850 description 1851 "Group of BFD IP multi-hop sessions (for ECMP). A " + 1852 "group of sessions is between 1 source and 1 " + 1853 "destination, each session has a different field " + 1854 "in UDP/IP hdr for ECMP."; 1856 leaf source-addr { 1857 type inet:ip-address; 1858 description 1859 "Local IP address"; 1860 } 1861 leaf dest-addr { 1862 type inet:ip-address; 1863 description 1864 "IP address of the peer"; 1865 } 1866 uses bfd:bfd-grouping-common-cfg-parms; 1868 leaf tx-ttl { 1869 type bfd:hops; 1870 default 255; 1871 description "Hop count of outgoing BFD control packets"; 1872 } 1873 leaf rx-ttl { 1874 type bfd:hops; 1875 mandatory true; 1876 description 1877 "Minimum allowed hop count value for incoming BFD control 1878 packets. Control packets whose hop count is lower than this 1879 value are dropped."; 1880 } 1881 list sessions { 1882 config false; 1883 description 1884 "The multiple BFD sessions between a source and a " + 1885 "destination."; 1886 uses bfd:bfd-all-session; 1887 } 1888 } 1889 } 1890 } 1892 notification bfd-multihop-notification { 1893 description 1894 "Notification for BFD multi-hop session state change. An " + 1895 "implementation may rate-limit notifications, e.g. when a" + 1896 "session is continuously changing state."; 1898 uses bfd:bfd-notification-parms; 1899 } 1900 } 1902 1903 2.16. BFD over LAG YANG Module 1905 file "ietf-bfd-lag@2017-06-30.yang" 1907 module ietf-bfd-lag { 1908 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-lag"; 1909 // replace with IANA namespace when assigned 1910 prefix "bfd-lag"; 1912 import ietf-bfd { 1913 prefix "bfd"; 1914 } 1916 import ietf-interfaces { 1917 prefix "if"; 1918 } 1920 import ietf-inet-types { 1921 prefix "inet"; 1922 } 1924 import ietf-routing { 1925 prefix "rt"; 1926 } 1928 organization "IETF BFD Working Group"; 1930 contact 1931 "WG Web: 1932 WG List: 1934 Editors: Reshad Rahman (rrahman@cisco.com), 1935 Lianshu Zheng vero.zheng@huawei.com), 1936 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1938 description 1939 "This module contains the YANG definition for BFD over LAG 1940 interfaces as per RFC7130. 1942 Copyright (c) 2017 IETF Trust and the persons 1943 identified as authors of the code. All rights reserved. 1945 Redistribution and use in source and binary forms, with or 1946 without modification, is permitted pursuant to, and subject 1947 to the license terms contained in, the Simplified BSD License 1948 set forth in Section 4.c of the IETF Trust's Legal Provisions 1949 Relating to IETF Documents 1950 (http://trustee.ietf.org/license-info). 1951 This version of this YANG module is part of RFC XXXX; see 1952 the RFC itself for full legal notices."; 1954 revision 2017-06-30 { 1955 description "Initial revision."; 1956 reference "RFC XXXX: A YANG data model for BFD over LAG"; 1957 } 1959 // RFC Ed.: replace XXXX with actual RFC number and remove this 1960 // note 1962 augment "/rt:routing/rt:control-plane-protocols/" 1963 + "rt:control-plane-protocol/bfd:bfd" { 1964 description "BFD augmentation for LAG"; 1965 container lag { 1966 description "BFD over LAG top level container"; 1968 container micro-bfd-ipv4-session-statistics { 1969 description "Micro-BFD IPv4 session counters"; 1970 uses bfd:bfd-session-statistics; 1971 } 1972 container micro-bfd-ipv6-session-statistics { 1973 description "Micro-BFD IPv6 session counters"; 1974 uses bfd:bfd-session-statistics; 1975 } 1977 list sessions { 1978 key "lag-name"; 1979 description "A LAG interface on which BFD is running"; 1980 leaf lag-name { 1981 type if:interface-ref ; 1982 description "Name of the LAG"; 1983 } 1984 leaf ipv4-dest-addr { 1985 type inet:ipv4-address; 1986 description 1987 "IPv4 address of the peer, for IPv4 micro-BFD."; 1988 } 1989 leaf ipv6-dest-addr { 1990 type inet:ipv6-address; 1991 description 1992 "IPv6 address of the peer, for IPv6 micro-BFD."; 1993 } 1994 uses bfd:bfd-grouping-common-cfg-parms; 1996 leaf use-ipv4 { 1997 type boolean; 1998 description "Using IPv4 micro-BFD."; 2000 } 2001 leaf use-ipv6 { 2002 type boolean; 2003 description "Using IPv6 micro-BFD."; 2004 } 2006 list member-links { 2007 key "member-link"; 2008 config false; 2009 description 2010 "Micro-BFD over LAG. This represents one member link"; 2012 leaf member-link { 2013 type if:interface-ref; 2014 description 2015 "Member link on which micro-BFD is running"; 2016 } 2017 container micro-bfd-ipv4 { 2018 when "../../use-ipv4 = 'true'" { 2019 description "Needed only if IPv4 is used."; 2020 } 2021 description 2022 "Micro-BFD IPv4 session state on member link"; 2023 uses bfd:bfd-all-session; 2024 } 2025 container micro-bfd-ipv6 { 2026 when "../../use-ipv6 = 'true'" { 2027 description "Needed only if IPv6 is used."; 2028 } 2029 description 2030 "Micro-BFD IPv6 session state on member link"; 2031 uses bfd:bfd-all-session; 2032 } 2033 } 2034 } 2035 } 2036 } 2038 notification bfd-lag-notification { 2039 description 2040 "Notification for BFD over LAG session state change. " + 2041 "An implementation may rate-limit notifications, e.g. when a" + 2042 "session is continuously changing state."; 2044 uses bfd:bfd-notification-parms; 2046 leaf lag-name { 2047 type if:interface-ref; 2048 description "LAG interface name"; 2049 } 2051 leaf member-link { 2052 type if:interface-ref; 2053 description "Member link on which BFD is running"; 2054 } 2055 } 2056 } 2058 2060 2.17. BFD over MPLS YANG Module 2062 file "ietf-bfd-mpls@2017-06-30.yang" 2064 module ietf-bfd-mpls { 2065 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-mpls"; 2066 // replace with IANA namespace when assigned 2067 prefix "bfd-mpls"; 2069 import ietf-bfd { 2070 prefix "bfd"; 2071 } 2073 import ietf-inet-types { 2074 prefix "inet"; 2075 } 2077 import ietf-routing { 2078 prefix "rt"; 2079 } 2081 organization "IETF BFD Working Group"; 2083 contact 2084 "WG Web: 2085 WG List: 2087 Editors: Reshad Rahman (rrahman@cisco.com), 2088 Lianshu Zheng (vero.zheng@huawei.com), 2089 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2091 description 2092 "This module contains the YANG definition for BFD parameters for 2093 MPLS LSPs as per RFC5884. 2095 Copyright (c) 2017 IETF Trust and the persons 2096 identified as authors of the code. All rights reserved. 2098 Redistribution and use in source and binary forms, with or 2099 without modification, is permitted pursuant to, and subject 2100 to the license terms contained in, the Simplified BSD License 2101 set forth in Section 4.c of the IETF Trust's Legal Provisions 2102 Relating to IETF Documents 2103 (http://trustee.ietf.org/license-info). 2105 This version of this YANG module is part of RFC XXXX; see 2106 the RFC itself for full legal notices."; 2108 revision 2017-06-30 { 2109 description "Initial revision."; 2110 reference "RFC XXXX: A YANG data model for BFD over MPLS LSPs"; 2111 } 2113 // RFC Ed.: replace XXXX with actual RFC number and remove this 2114 // note 2116 identity bfd-encap-gach { 2117 base bfd:bfd-encap-type; 2118 description 2119 "BFD with G-ACh encapsulation as per RFC5586."; 2120 } 2122 identity bfd-encap-ip-gach { 2123 base bfd:bfd-encap-type; 2124 description 2125 "BFD with IP and G-ACh encapsulation as per RFC5586."; 2126 } 2128 grouping bfd-encap-cfg { 2129 description "Configuration for BFD encapsulation"; 2131 leaf encap { 2132 type identityref { 2133 base bfd:bfd-encap-type; 2134 } 2135 default bfd:bfd-encap-ip; 2136 description "BFD encapsulation"; 2137 } 2138 } 2140 grouping bfd-mpls-dest-address { 2141 description "Destination address as per RFC5884"; 2143 leaf mpls-dest-address { 2144 type inet:ip-address; 2145 config "false"; 2146 description 2147 "Destination address as per RFC5884. 2148 Needed if IP encapsulation is used"; 2149 } 2150 } 2152 augment "/rt:routing/rt:control-plane-protocols/" 2153 + "rt:control-plane-protocol/bfd:bfd" { 2154 description "BFD augmentation for MPLS"; 2155 container mpls { 2156 description "BFD MPLS top level container"; 2158 uses bfd:bfd-session-statistics; 2160 container egress { 2161 description "Egress configuration"; 2163 uses bfd:bfd-grouping-base-cfg-parms; 2165 uses bfd:bfd-auth-parms; 2166 } 2168 list session-group { 2169 key "mpls-fec"; 2170 description 2171 "Group of BFD MPLS sessions (for ECMP). A group of " + 2172 "sessions is for 1 FEC, each session has a different " + 2173 "field in UDP/IP hdr for ECMP."; 2174 leaf mpls-fec { 2175 type inet:ip-prefix; 2176 description "MPLS FEC"; 2177 } 2179 uses bfd:bfd-grouping-common-cfg-parms; 2181 list sessions { 2182 config false; 2183 description 2184 "The BFD sessions for an MPLS FEC. Local " + 2185 "discriminator is unique for each session in the " + 2186 "group."; 2187 uses bfd:bfd-all-session; 2189 uses bfd-mpls:bfd-mpls-dest-address; 2190 } 2192 } 2193 } 2194 } 2196 notification bfd-mpls-notification { 2197 description 2198 "Notification for BFD over MPLS FEC session state change. " + 2199 "An implementation may rate-limit notifications, e.g. when a" + 2200 "session is continuously changing state."; 2202 uses bfd:bfd-notification-parms; 2204 leaf mpls-dest-address { 2205 type inet:ip-address; 2206 description 2207 "Destination address as per RFC5884. 2208 Needed if IP encapsulation is used"; 2209 } 2210 } 2211 } 2213 2215 2.18. BFD over MPLS-TE YANG Module 2217 file "ietf-bfd-mpls-te@2017-06-30.yang" 2219 module ietf-bfd-mpls-te { 2220 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te"; 2221 // replace with IANA namespace when assigned 2222 prefix "bfd-mpls-te"; 2224 import ietf-bfd { 2225 prefix "bfd"; 2226 } 2228 import ietf-bfd-mpls { 2229 prefix "bfd-mpls"; 2230 } 2232 import ietf-te { 2233 prefix "te"; 2234 } 2236 import ietf-routing { 2237 prefix "rt"; 2238 } 2239 organization "IETF BFD Working Group"; 2241 contact 2242 "WG Web: 2243 WG List: 2245 Editors: Reshad Rahman (rrahman@cisco.com), 2246 Lianshu Zheng (vero.zheng@huawei.com), 2247 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2249 description 2250 "This module contains the YANG definition for BFD parameters for 2251 MPLS Traffic Engineering as per RFC5884. 2253 Copyright (c) 2017 IETF Trust and the persons 2254 identified as authors of the code. All rights reserved. 2256 Redistribution and use in source and binary forms, with or 2257 without modification, is permitted pursuant to, and subject 2258 to the license terms contained in, the Simplified BSD License 2259 set forth in Section 4.c of the IETF Trust's Legal Provisions 2260 Relating to IETF Documents 2261 (http://trustee.ietf.org/license-info). 2263 This version of this YANG module is part of RFC XXXX; see 2264 the RFC itself for full legal notices."; 2266 revision 2017-06-30 { 2267 description "Initial revision."; 2268 reference "RFC XXXX: A YANG data model for BFD over MPLS-TE"; 2269 } 2271 // RFC Ed.: replace XXXX with actual RFC number and remove this 2272 // note 2274 augment "/rt:routing/rt:control-plane-protocols/" 2275 + "rt:control-plane-protocol/bfd:bfd" { 2276 description "BFD augmentation for MPLS-TE"; 2277 container mpls-te { 2278 description "BFD MPLS-TE top level container"; 2280 container config { 2281 description "BFD MPLS-TE configuration container"; 2283 container egress { 2284 description "Egress configuration"; 2286 uses bfd:bfd-grouping-base-cfg-parms; 2287 uses bfd:bfd-auth-parms; 2288 } 2289 } 2291 container oper { 2292 config "false"; 2293 description "BFD operational container"; 2294 uses bfd:bfd-session-statistics; 2295 } 2296 } 2297 } 2299 augment "/te:te/te:tunnels/te:tunnel/te:config" { 2300 description "BFD configuration on MPLS-TE tunnel."; 2302 uses bfd:bfd-grouping-common-cfg-parms; 2304 uses bfd-mpls:bfd-encap-cfg; 2305 } 2307 augment "/te:te/te:lsps-state/te:lsp" { 2308 when "/te:te/te:lsps-state/te:lsp/te:origin-type != 'transit'" { 2309 description "BFD information not needed at transit points"; 2310 } 2311 description "BFD state information on MPLS-TE LSP."; 2313 uses bfd:bfd-all-session; 2315 uses bfd-mpls:bfd-mpls-dest-address; 2316 } 2318 notification bfd-mpls-te-notification { 2319 description 2320 "Notification for BFD over MPLS-TE session state change. " + 2321 "An implementation may rate-limit notifications, e.g. when a" + 2322 "session is continuously changing state."; 2324 uses bfd:bfd-notification-parms; 2326 uses bfd-mpls:bfd-mpls-dest-address; 2328 leaf tunnel-name { 2329 type string; 2330 description "MPLS-TE tunnel on which BFD was running."; 2331 } 2332 } 2333 } 2334 2336 2.19. Security Considerations 2338 The YANG module defined in this memo is designed to be accessed via 2339 the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the 2340 secure transport layer and the mandatory to implement secure 2341 transport is SSH [RFC6242]. The NETCONF access control model 2342 [RFC6536] provides the means to restrict access for particular 2343 NETCONF users to a pre-configured subset of all available NETCONF 2344 protocol operations and content. 2346 The YANG module has writeable data nodes which can be used for 2347 creation of BFD sessions and modification of BFD session parameters. 2348 The system should "police" creation of BFD sessions to prevent new 2349 sessions from causing existing BFD sessions to fail. For BFD session 2350 modification, the BFD protocol has mechanisms in place which allow 2351 for in service modification. 2353 2.20. IANA Considerations 2355 The IANA is requested to as assign a new namespace URI from the IETF 2356 XML registry. 2358 This document registers the following namesace URIs in the IETF XML 2359 registry [RFC3688]: 2361 -------------------------------------------------------------------- 2363 URI: urn:ietf:params:xml:ns:yang:ietf-bfd 2365 Registrant Contact: The IESG. 2367 XML: N/A, the requested URI is an XML namespace. 2369 -------------------------------------------------------------------- 2371 -------------------------------------------------------------------- 2373 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh 2375 Registrant Contact: The IESG. 2377 XML: N/A, the requested URI is an XML namespace. 2379 -------------------------------------------------------------------- 2381 -------------------------------------------------------------------- 2382 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mh 2384 Registrant Contact: The IESG. 2386 XML: N/A, the requested URI is an XML namespace. 2388 -------------------------------------------------------------------- 2390 -------------------------------------------------------------------- 2392 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-lag 2394 Registrant Contact: The IESG. 2396 XML: N/A, the requested URI is an XML namespace. 2398 -------------------------------------------------------------------- 2400 -------------------------------------------------------------------- 2402 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls 2404 Registrant Contact: The IESG. 2406 XML: N/A, the requested URI is an XML namespace. 2408 -------------------------------------------------------------------- 2410 -------------------------------------------------------------------- 2412 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te 2414 Registrant Contact: The IESG. 2416 XML: N/A, the requested URI is an XML namespace. 2418 -------------------------------------------------------------------- 2420 2.20.1. IANA-Maintained iana-bfd-types module 2422 This document defines the initial version of the IANA-maintained 2423 iana-bfd-types YANG module. 2425 The iana-bfd-types YANG module is intended to reflect the "BFD 2426 Diagnostic Codes" registry and "BFD Authentication Types" registry at 2427 https://www.iana.org/assignments/bfd-parameters/bfd-parameters.xhtml 2429 2.21. Acknowledgements 2431 We would also like to thank Nobo Akiya and Jeff Haas for their 2432 encouragement on this work. We would also like to thank Rakesh 2433 Gandhi and Tarek Saad for their help on the MPLS-TE model. We would 2434 also like to thank Acee Lindem for his guidance. 2436 3. References 2438 3.1. Normative References 2440 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2441 Requirement Levels", BCP 14, RFC 2119, 2442 DOI 10.17487/RFC2119, March 1997, 2443 . 2445 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2446 DOI 10.17487/RFC3688, January 2004, 2447 . 2449 [RFC5586] Bocci, M., Ed., Vigoureux, M., Ed., and S. Bryant, Ed., 2450 "MPLS Generic Associated Channel", RFC 5586, 2451 DOI 10.17487/RFC5586, June 2009, 2452 . 2454 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 2455 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 2456 . 2458 [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 2459 (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, 2460 DOI 10.17487/RFC5881, June 2010, 2461 . 2463 [RFC5882] Katz, D. and D. Ward, "Generic Application of 2464 Bidirectional Forwarding Detection (BFD)", RFC 5882, 2465 DOI 10.17487/RFC5882, June 2010, 2466 . 2468 [RFC5883] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 2469 (BFD) for Multihop Paths", RFC 5883, DOI 10.17487/RFC5883, 2470 June 2010, . 2472 [RFC5884] Aggarwal, R., Kompella, K., Nadeau, T., and G. Swallow, 2473 "Bidirectional Forwarding Detection (BFD) for MPLS Label 2474 Switched Paths (LSPs)", RFC 5884, DOI 10.17487/RFC5884, 2475 June 2010, . 2477 [RFC5885] Nadeau, T., Ed. and C. Pignataro, Ed., "Bidirectional 2478 Forwarding Detection (BFD) for the Pseudowire Virtual 2479 Circuit Connectivity Verification (VCCV)", RFC 5885, 2480 DOI 10.17487/RFC5885, June 2010, 2481 . 2483 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2484 the Network Configuration Protocol (NETCONF)", RFC 6020, 2485 DOI 10.17487/RFC6020, October 2010, 2486 . 2488 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2489 and A. Bierman, Ed., "Network Configuration Protocol 2490 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2491 . 2493 [RFC7130] Bhatia, M., Ed., Chen, M., Ed., Boutros, S., Ed., 2494 Binderberger, M., Ed., and J. Haas, Ed., "Bidirectional 2495 Forwarding Detection (BFD) on Link Aggregation Group (LAG) 2496 Interfaces", RFC 7130, DOI 10.17487/RFC7130, February 2497 2014, . 2499 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 2500 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 2501 . 2503 [RFC7277] Bjorklund, M., "A YANG Data Model for IP Management", 2504 RFC 7277, DOI 10.17487/RFC7277, June 2014, 2505 . 2507 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 2508 Management", RFC 8022, DOI 10.17487/RFC8022, November 2509 2016, . 2511 3.2. Informative References 2513 [I-D.dsdt-nmda-guidelines] 2514 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 2515 and R. Wilton, "Guidelines for YANG Module Authors 2516 (NMDA)", draft-dsdt-nmda-guidelines-01 (work in progress), 2517 May 2017. 2519 [I-D.ietf-lime-yang-connectionless-oam] 2520 Kumar, D., Wang, Z., Wu, Q., Rahman, R., and S. Raghavan, 2521 "Generic YANG Data Model for Connectionless Operations, 2522 Administration, and Maintenance(OAM) protocols", draft- 2523 ietf-lime-yang-connectionless-oam-07 (work in progress), 2524 June 2017. 2526 [I-D.ietf-mpls-base-yang] 2527 Raza, K., Gandhi, R., Liu, X., Beeram, V., Saad, T., 2528 Bryskin, I., Chen, X., Jones, R., and B. Wen, "A YANG Data 2529 Model for MPLS Base", draft-ietf-mpls-base-yang-04 (work 2530 in progress), March 2017. 2532 [I-D.ietf-netmod-schema-mount] 2533 Bjorklund, M. and L. Lhotka, "YANG Schema Mount", draft- 2534 ietf-netmod-schema-mount-05 (work in progress), May 2017. 2536 [I-D.ietf-rtgwg-device-model] 2537 Lindem, A., Berger, L., Bogdanovic, D., and C. Hopps, 2538 "Network Device YANG Logical Organization", draft-ietf- 2539 rtgwg-device-model-02 (work in progress), March 2017. 2541 [I-D.ietf-rtgwg-lne-model] 2542 Berger, L., Hopps, C., Lindem, A., and D. Bogdanovic, 2543 "YANG Logical Network Elements", draft-ietf-rtgwg-lne- 2544 model-02 (work in progress), March 2017. 2546 [I-D.ietf-rtgwg-ni-model] 2547 Berger, L., Hopps, C., Lindem, A., and D. Bogdanovic, 2548 "YANG Network Instances", draft-ietf-rtgwg-ni-model-02 2549 (work in progress), March 2017. 2551 [I-D.ietf-teas-yang-te] 2552 Saad, T., Gandhi, R., Liu, X., Beeram, V., Shah, H., and 2553 I. Bryskin, "A YANG Data Model for Traffic Engineering 2554 Tunnels and Interfaces", draft-ietf-teas-yang-te-06 (work 2555 in progress), March 2017. 2557 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 2558 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 2559 . 2561 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 2562 Zhang, "YANG Data Model for Key Chains", RFC 8177, 2563 DOI 10.17487/RFC8177, June 2017, 2564 . 2566 Appendix A. Echo function configuration example 2568 The following intervals are added for the echo function (if 2569 supported): 2571 desired-min-echo-tx-interval 2572 This is the minimum interval that the local system would like 2573 to use when transmitting BFD echo packets. If 0, the echo 2574 function as defined in BFD [RFC5880] is disabled. 2576 required-min-echo-rx-interval 2577 This is the Required Min Echo RX Interval as defined in BFD 2578 [RFC5880]. 2580 module: example-bfd-echo 2581 augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protoco 2582 l/bfd:bfd/bfd-ip-sh:ip-sh/bfd-ip-sh:sessions: 2583 +--rw echo {bfd-echo-mode}? 2584 +--rw desired-min-echo-tx-interval? uint32 2585 +--rw required-min-echo-rx-interval? uint32 2587 A.1. Example YANG module for BFD echo function 2589 module example-bfd-echo { 2590 namespace "tag:example.com,2017:example-bfd-echo"; 2592 prefix "example-bfd-echo"; 2594 import ietf-bfd { 2595 prefix "bfd"; 2596 } 2598 import ietf-bfd-ip-sh { 2599 prefix "bfd-ip-sh"; 2600 } 2602 import ietf-routing { 2603 prefix "rt"; 2604 } 2606 organization "IETF BFD Working Group"; 2608 contact 2609 "WG Web: 2610 WG List: 2612 Editors: Reshad Rahman (rrahman@cisco.com), 2613 Lianshu Zheng (vero.zheng@huawei.com), 2614 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2616 description 2617 "This module contains an example YANG augmentation for configuration 2618 of BFD echo function. 2620 Copyright (c) 2017 IETF Trust and the persons 2621 identified as authors of the code. All rights reserved. 2623 Redistribution and use in source and binary forms, with or 2624 without modification, is permitted pursuant to, and subject 2625 to the license terms contained in, the Simplified BSD License 2626 set forth in Section 4.c of the IETF Trust's Legal Provisions 2627 Relating to IETF Documents 2628 (http://trustee.ietf.org/license-info). 2630 This version of this YANG module is part of RFC XXXX; see 2631 the RFC itself for full legal notices."; 2633 revision 2017-06-30 { 2634 description "Initial revision."; 2635 reference 2636 "RFC XXXX: A YANG data model example augmentation for BFD echo 2637 function"; 2638 } 2640 // RFC Ed.: replace XXXX with actual RFC number and remove this 2641 // note 2643 /* 2644 * Groupings 2645 */ 2646 grouping bfd-grouping-echo-cfg-parms { 2647 description "BFD grouping for echo config parameters"; 2648 leaf desired-min-echo-tx-interval { 2649 type uint32; 2650 units microseconds; 2651 default 0; 2652 description "Desired minumum transmit interval for echo"; 2653 } 2655 leaf required-min-echo-rx-interval { 2656 type uint32; 2657 units microseconds; 2658 default 0; 2659 description "Required minimum receive interval for echo"; 2660 } 2661 } 2663 augment "/rt:routing/rt:control-plane-protocols/" 2664 + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/" 2665 + "bfd-ip-sh:sessions" { 2666 description "Augmentation for BFD echo fucntion."; 2667 container echo { 2668 if-feature bfd-echo-mode; 2670 description "BFD echo function container"; 2672 uses bfd-grouping-echo-cfg-parms; 2673 } 2674 } 2675 } 2677 Appendix B. Change log 2679 RFC Editor: Remove this section upon publication as an RFC. 2681 B.1. Changes between versions -05 and -06 2683 o Adhere to NMDA-guidelines. 2685 o Echo function config moved to appendix as example. 2687 o Added IANA YANG modules. 2689 o Addressed various comments. 2691 B.2. Changes between versions -04 and -05 2693 o "bfd" node in augment of control-plane-protocol as per A YANG Data 2694 Model for Routing Management [RFC8022]. 2696 o Removed augment of network-instance. Replaced by schema-mount. 2698 o Added information on interaction with other YANG modules. 2700 B.3. Changes between versions -03 and -04 2702 o Updated author information. 2704 o Fixed YANG compile error in ietf-bfd-lag.yang which was due to 2705 incorrect when statement. 2707 B.4. Changes between versions -02 and -03 2709 o Fixed YANG compilation warning due to incorrect revision date in 2710 ietf-bfd-ip-sh module. 2712 B.5. Changes between versions -01 and -02 2714 o Replace routing-instance, which has been removed from A YANG Data 2715 Model for Routing Management [RFC8022], with network-instance from 2716 YANG Network Instances [I-D.ietf-rtgwg-ni-model] 2718 B.6. Changes between versions -00 and -01 2720 o Remove BFD configuration parameters from BFD clients, all BFD 2721 configuration parameters in BFD 2723 o YANG module split in multiple YANG modules (one per type of 2724 forwarding path) 2726 o For BFD over MPLS-TE we augment MPLS-TE model 2728 o For BFD authentication we now use YANG Data Model for Key Chains 2729 [RFC8177] 2731 Authors' Addresses 2733 Reshad Rahman (editor) 2734 Cisco Systems 2735 Canada 2737 Email: rrahman@cisco.com 2739 Lianshu Zheng (editor) 2740 Huawei Technologies 2741 China 2743 Email: vero.zheng@huawei.com 2745 Mahesh Jethanandani (editor) 2746 Cisco Systems 2748 Email: mjethanandani@gmail.com 2750 Santosh Pallagatti 2751 India 2753 Email: santosh.pallagatti@gmail.com 2754 Greg Mirsky 2755 ZTE Corporation 2757 Email: gregimirsky@gmail.com