idnits 2.17.00 (12 Aug 2021) /tmp/idnits40665/draft-ietf-bfd-yang-16.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 21, 2018) is 1429 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: draft-ietf-mpls-base-yang has been published as RFC 8960 == Outdated reference: A later version (-29) exists of draft-ietf-teas-yang-te-15 ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) == Outdated reference: draft-ietf-lime-yang-connectionless-oam has been published as RFC 8532 == 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 Summary: 2 errors (**), 0 flaws (~~), 7 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 23, 2018 Huawei Technologies 6 M. Jethanandani, Ed. 7 Xoriant Corporation 8 S. Pallagatti 10 G. Mirsky 11 ZTE Corporation 12 June 21, 2018 14 YANG Data Model for Bidirectional Forwarding Detection (BFD) 15 draft-ietf-bfd-yang-16 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 23, 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 . . . . . . . . . . 68 101 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 68 102 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 68 103 7.1. Normative References . . . . . . . . . . . . . . . . . . 68 104 7.2. Informative References . . . . . . . . . . . . . . . . . 71 105 Appendix A. Echo function configuration example . . . . . . . . 71 106 A.1. Example YANG module for BFD echo function configuration . 71 107 Appendix B. Change log . . . . . . . . . . . . . . . . . . . . . 74 108 B.1. Changes between versions -15 and -16 . . . . . . . . . . 74 109 B.2. Changes between versions -14 and -15 . . . . . . . . . . 74 110 B.3. Changes between versions -13 and -14 . . . . . . . . . . 74 111 B.4. Changes between versions -12 and -13 . . . . . . . . . . 74 112 B.5. Changes between versions -11 and -12 . . . . . . . . . . 74 113 B.6. Changes between versions -10 and -11 . . . . . . . . . . 74 114 B.7. Changes between versions -09 and -10 . . . . . . . . . . 74 115 B.8. Changes between versions -08 and -09 . . . . . . . . . . 74 116 B.9. Changes between versions -07 and -08 . . . . . . . . . . 75 117 B.10. Changes between versions -06 and -07 . . . . . . . . . . 75 118 B.11. Changes between versions -05 and -06 . . . . . . . . . . 75 119 B.12. Changes between versions -04 and -05 . . . . . . . . . . 75 120 B.13. Changes between versions -03 and -04 . . . . . . . . . . 75 121 B.14. Changes between versions -02 and -03 . . . . . . . . . . 76 122 B.15. Changes between versions -01 and -02 . . . . . . . . . . 76 123 B.16. Changes between versions -00 and -01 . . . . . . . . . . 76 124 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 76 126 1. Introduction 128 This document defines a YANG data model that can be used to configure 129 and manage Bidirectional Forwarding Detection (BFD) [RFC5880]. BFD 130 is a network protocol which is used for liveness detection of 131 arbitrary paths between systems. Some examples of different types of 132 paths over which we have BFD: 134 1) Two systems directly connected via IP. This is known as BFD over 135 single-hop IP, a.k.a. BFD for IPv4 and IPv6 [RFC5881] 137 2) Two systems connected via multiple hops as described in BFD for 138 Multiple Hops. [RFC5883] 140 3) Two systems connected via MPLS Label Switched Paths (LSPs) as 141 described in BFD for MPLS LSP [RFC5884] 143 4) Two systems connected via a Link Aggregation Group (LAG) interface 144 as described in BFD on LAG Interfaces [RFC7130] 145 5) Two systems connected via pseudowires (PWs), this is known as 146 Virtual Circuit Connectivity Verification (VCCV) as described in BFD 147 for PW VCCV [RFC5885]. This is not addressed in this document. 149 BFD typically does not operate on its own. Various control 150 protocols, also known as BFD clients, use the services provided by 151 BFD for their own operation as described in Generic Application of 152 BFD [RFC5882]. The obvious candidates which use BFD are those which 153 do not have "hellos" to detect failures, e.g. static routes, and 154 routing protocols whose "hellos" do not support sub-second failure 155 detection, e.g. OSPF and IS-IS. 157 The YANG modules in this document conform to the Network Management 158 Datastore Architecture (NMDA) Network Management Datastore 159 Architecture [RFC8342]. This means that the data models do not have 160 separate top-level or sibling containers for configuration and 161 operational state data. 163 1.1. Requirements Language 165 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 166 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 167 document are to be interpreted as described in BCP 14 [RFC2119] 168 [RFC8174] when, and only when, they appear in all capitals, as shown 169 here. 171 1.2. Tree Diagrams 173 This document uses the graphical representation of data models 174 defined in [RFC8340]. 176 2. Design of the Data Model 178 Since BFD is used for liveliness detection of various forwarding 179 paths, there is no uniform key to identify a BFD session. So the BFD 180 data model is split in multiple YANG modules where each module 181 corresponds to one type of forwarding path. For example, BFD for IP 182 single-hop is in one YANG module and BFD for MPLS-TE is in another 183 YANG module. The main difference between these modules is how a BFD 184 session is uniquely identified, i.e the key for the list containing 185 the BFD sessions for that forwarding path. To avoid duplication of 186 BFD definitions, we have common types and groupings which are used by 187 all the modules. 189 A new control-plane protocol "bfdv1" is defined and a "bfd" container 190 is created under control-plane-protocol as specified in "A YANG Data 191 Model for Routing Management (NMDA Version)" [RFC8349]. This new 192 "bfd" container is augmented by all the YANG modules for their 193 respective specific information: 195 1. ietf-bfd-ip-sh.yang augments "/routing/control-plane-protocols/ 196 control-plane-protocol/bfd/" with the "ip-sh" container for BFD 197 sessions over IP single-hop. 199 2. ietf-bfd-ip-mh.yang augments "/routing/control-plane-protocols/ 200 control-plane-protocol/bfd/" with the "ip-mh" container for BFD 201 sessions over IP multi-hop. 203 3. ietf-bfd-lag.yang augments "/routing/control-plane-protocols/ 204 control-plane-protocol/bfd/" with the "lag" container for BFD 205 sessions over LAG. 207 4. ietf-bfd-mpls.yang augments "/routing/control-plane-protocols/ 208 control-plane-protocol/bfd/" with the "mpls" container for BFD 209 over MPLS LSPs. 211 5. ietf-bfd-mpls-te.yang augments "/routing/control-plane-protocols/ 212 control-plane-protocol/bfd/" with the "mpls-te" container for BFD 213 over MPLS-TE. 215 BFD can operate in the following contexts: 217 1. At the network device level 219 2. In Logical Network Elements as described in YANG Logical Network 220 Element [I-D.ietf-rtgwg-lne-model] 222 3. In Network Instances as described in YANG Logical Network Element 223 [I-D.ietf-rtgwg-ni-model] 225 When used at the network device level, the BFD YANG model is used 226 "as-is". When the BFD YANG model is used in a Logical Network 227 Element or in a Network Instance, then the BFD YANG model augments 228 the mounted routing model for the Logical Network Element or the 229 Network Instance. 231 2.1. Design of Configuration Model 233 The configuration model consists mainly of the parameters specified 234 in BFD [RFC5880]. Some examples are desired minimum transmit 235 interval, required minimum receive interval, detection multiplier, 236 etc 238 BFD clients are applications that use BFD for fast detection of 239 failures. Some implementations have BFD session configuration under 240 the BFD clients. For example, BFD session configuration under 241 routing applications such as OSPF, IS-IS, BGP etc. Other 242 implementations have BFD session configuration centralized under BFD, 243 i.e. outside the multiple BFD clients. 245 The BFD parameters of interest to a BFD client are mainly the 246 multiplier and interval(s) since those parameters impact the 247 convergence time of the BFD clients when a failure occurs. Other 248 parameters such as BFD authentication are not specific to the 249 requirements of the BFD client. Ideally all configuration should be 250 centralized under BFD. However, this is a problem for clients of BFD 251 which auto-discover their peers. For example, IGPs do not have the 252 peer address configured, instead the IGP is enabled on an interface 253 and the IGP peers are auto-discovered. So for an operator to 254 configure BFD to an IGP peer, the operator would first have to 255 determine the peer addresses. And when a new peer is discovered, BFD 256 configuration would need to be added. To avoid this issue, we define 257 grouping client-cfg-parms in Section 2.13 for BFD clients to 258 configure BFD: this allows BFD clients such as the IGPs to have 259 configuration (multiplier and intervals) for the BFD sessions they 260 need. For example, when a new IGP peer is discovered, the IGP would 261 create a BFD session to the newly discovered peer and similarly when 262 an IGP peer goes away, the IGP would remove the BFD session to that 263 peer. The mechanism how the BFD sessions are created and removed by 264 the BFD clients is outside the scope of this document, but typically 265 this would be done by use of an API implemented by the BFD module on 266 the system. For BFD clients which create BFD sessions via their own 267 configuration, authentication parameters (if required) are still 268 specified in BFD. 270 2.1.1. Common BFD configuration parameters 272 The basic BFD configuration parameters are: 274 local-multiplier 275 This is the detection time multiplier as defined in BFD 276 [RFC5880]. 278 desired-min-tx-interval 279 This is the Desired Min TX Interval as defined in BFD 280 [RFC5880]. 282 required-min-rx-interval 283 This is the Required Min RX Interval as defined in BFD 284 [RFC5880]. 286 Although BFD [RFC5880] allows for different values for transmit and 287 receive intervals, some implementations allow users to specify just 288 one interval which is used for both transmit and receive intervals or 289 separate values for transmit and receive intervals. The BFD YANG 290 model supports this: there is a choice between "min-interval", used 291 for both transmit and receive intervals, and "desired-min-tx- 292 interval" and "required-min-rx-interval". This is supported via a 293 grouping which is used by the YANG modules for the various forwarding 294 paths. 296 For BFD authentication we have: 298 key-chain 299 This is a reference to key-chain defined in YANG Data Model 300 for Key Chains [RFC8177]. The keys, cryptographic 301 algorithms, key lifetime etc are all defined in the key-chain 302 model. 304 meticulous 305 This enables meticulous mode as per BFD [RFC5880]. 307 2.1.2. Single-hop IP 309 For single-hop IP, there is an augment of the "bfd" data node in 310 Section 2. The "ip-sh" node contains a list of IP single-hop 311 sessions where each session is uniquely identified by the interface 312 and destination address pair. For the configuration parameters we 313 use what is defined in Section 2.1.1. The "ip-sh" node also contains 314 a list of interfaces, this is used to specify authentication 315 parameters for BFD sessions which are created by BFD clients, see 316 Section 2.1. 318 [RFC5880] and [RFC5881] do not specify whether echo function is 319 continuous or on demand. Therefore the mechanism used to start and 320 stop echo function is implementation specific and should be done by 321 augmentation: 323 1) Configuration. This is suitable for continuous echo function. 324 An example is provided in Appendix A. 326 2) RPC. This is suitable for on-demand echo function. 328 2.1.3. Multihop IP 330 For multihop IP, there is an augment of the "bfd" data node in 331 Section 2. 333 Because of multiple paths, there could be multiple multihop IP 334 sessions between a source and a destination address. We identify 335 this as a "session-group". The key for each "session-group" consists 336 of: 338 source address 339 Address belonging to the local system as per BFD for Multiple 340 Hops [RFC5883] 342 destination address 343 Address belonging to the remote system as per BFD for 344 Multiple Hops [RFC5883] 346 For the configuration parameters we use what is defined in 347 Section 2.1.1 349 Here are some extra parameters: 351 tx-ttl 352 TTL of outgoing BFD control packets. 354 rx-ttl 355 Minimum TTL of incoming BFD control packets. 357 2.1.4. MPLS Traffic Engineering Tunnels 359 For MPLS-TE tunnels, BFD is configured under the MPLS-TE tunnel since 360 the desired failure detection parameters is a property of the MPLS-TE 361 tunnel. This is achieved by augmenting the MPLS-TE data model in 362 YANG Data Model for TE Topologies [I-D.ietf-teas-yang-te]. For BFD 363 parameters which are specific to the TE application, e.g. whether to 364 tear down the tunnel in the event of a BFD session failure, these 365 parameters will be defined in the YANG model of the MPLS-TE 366 application. 368 On top of the usual BFD parameters, we have the following per MPLS-TE 369 tunnel: 371 encap 372 Encapsulation for the BFD packets: choice between IP, G-ACh 373 and IP with G-ACh as per MPLS Generic Associated Channel 374 [RFC5586] 376 For general MPLS-TE data, "mpls-te" data node is added under the 377 "bfd" node in Section 2. Since some MPLS-TE tunnels are uni- 378 directional there is no MPLS-TE configuration for these tunnels on 379 the egress node (note that this does not apply to bi-directional 380 MPLS-TP tunnels). The BFD parameters for the egress node are added 381 under "mpls-te". 383 2.1.5. MPLS Label Switched Paths 385 Here we address MPLS LSPs whose FEC is an IP address. The "bfd" node 386 in Section 2 is augmented with "mpls" which contains a list of 387 sessions uniquely identified by an IP prefix. Because of multiple 388 paths, there could be multiple MPLS sessions to an MPLS FEC. We 389 identify this as a "session-group". 391 Since these LSPs are uni-directional there is no LSP configuration on 392 the egress node. 394 The BFD parameters for the egress node are added under "mpls". 396 2.1.6. Link Aggregation Groups 398 Per BFD on LAG Interfaces [RFC7130], configuring BFD on LAG consists 399 of having micro-BFD sessions on each LAG member link. Since the BFD 400 parameters are an attribute of the LAG, they should be under the LAG. 401 However there is no LAG YANG model which we can augment. So a "lag" 402 data node is added to the "bfd" node in Section 2, the configuration 403 is per-LAG: we have a list of LAGs. The destination IP address of 404 the micro-BFD sessions is configured per-LAG and per address-family 405 (IPv4 and IPv6) 407 2.2. Design of Operational State Model 409 The operational state model contains both the overall statistics of 410 BFD sessions running on the device and the per session operational 411 information. 413 The overall statistics of BFD sessions consist of number of BFD 414 sessions, number of BFD sessions up etc. This information is 415 available globally (i.e. for all BFD sessions) under the "bfd" node 416 in Section 2 and also per type of forwarding path. 418 For each BFD session, mainly three categories of operational state 419 data are shown. The fundamental information of a BFD session such as 420 the local discriminator, remote discriminator and the capability of 421 supporting demand detect mode are shown in the first category. The 422 second category includes a BFD session running information, e.g. the 423 remote BFD state and the diagnostic code received. Another example 424 is the actual transmit interval between the control packets, which 425 may be different from the desired minimum transmit interval 426 configured, is shown in this category. Similar examples are actual 427 received interval between the control packets and the actual transmit 428 interval between the echo packets. The third category contains the 429 detailed statistics of the session, e.g. when the session 430 transitioned up/down and how long it has been in that state. 432 For some path types, there may be more than 1 session on the virtual 433 path to the destination. For example, with IP multihop and MPLS 434 LSPs, there could be multiple BFD sessions from the source to the 435 same destination to test the various paths (ECMP) to the destination. 436 This is represented by having multiple "sessions" under each 437 "session-group". 439 2.3. Notifications 441 This YANG model defines notifications to inform end-users of 442 important events detected during the protocol operation. Pair of 443 local and remote discriminator identifies a BFD session on local 444 system. Notifications also give more important details about BFD 445 sessions; e.g. new state, time in previous state, network-instance 446 and the reason that the BFD session state changed. The notifications 447 are defined for each type of forwarding path but use groupings for 448 common information. 450 2.4. RPC Operations 452 None. 454 2.5. BFD top level hierarchy 456 At the "bfd" node under control-plane-protocol, there is no 457 configuration data, only operational state data. The operational 458 state data consist of overall BFD session statistics, i.e. for BFD on 459 all types of forwarding paths. 461 module: ietf-bfd 462 augment /rt:routing/rt:control-plane-protocols 463 /rt:control-plane-protocol: 464 +--rw bfd 465 +--ro summary 466 +--ro number-of-sessions? yang:gauge32 467 +--ro number-of-sessions-up? yang:gauge32 468 +--ro number-of-sessions-down? yang:gauge32 469 +--ro number-of-sessions-admin-down? yang:gauge32 471 2.6. BFD IP single-hop hierarchy 473 An "ip-sh" node is added under "bfd" node in control-plane-protocol. 474 The configuration and operational state data for each BFD IP single- 475 hop session is under this "ip-sh" node. 477 module: ietf-bfd-ip-sh 478 augment /rt:routing/rt:control-plane-protocols 479 /rt:control-plane-protocol/bfd:bfd: 480 +--rw ip-sh 481 +--ro summary 482 | +--ro number-of-sessions? yang:gauge32 483 | +--ro number-of-sessions-up? yang:gauge32 484 | +--ro number-of-sessions-down? yang:gauge32 485 | +--ro number-of-sessions-admin-down? yang:gauge32 486 +--rw sessions 487 | +--rw session* [interface dest-addr] 488 | +--rw interface if:interface-ref 489 | +--rw dest-addr inet:ip-address 490 | +--rw source-addr? inet:ip-address 491 | +--rw local-multiplier? multiplier 492 | +--rw (interval-config-type)? 493 | | +--:(tx-rx-intervals) 494 | | | +--rw desired-min-tx-interval? uint32 495 | | | +--rw required-min-rx-interval? uint32 496 | | +--:(single-interval) {single-minimum-interval}? 497 | | +--rw min-interval? uint32 498 | +--rw demand-enabled? boolean 499 | | {demand-mode}? 500 | +--rw admin-down? boolean 501 | +--rw authentication! {authentication}? 502 | | +--rw key-chain? kc:key-chain-ref 503 | | +--rw meticulous? boolean 504 | +--ro path-type? identityref 505 | +--ro ip-encapsulation? boolean 506 | +--ro local-discriminator? discriminator 507 | +--ro remote-discriminator? discriminator 508 | +--ro remote-multiplier? multiplier 509 | +--ro demand-capability? boolean 510 | | {demand-mode}? 511 | +--ro source-port? inet:port-number 512 | +--ro dest-port? inet:port-number 513 | +--ro session-running 514 | | +--ro session-index? uint32 515 | | +--ro local-state? state 516 | | +--ro remote-state? state 517 | | +--ro local-diagnostic? 518 | | | iana-bfd-types:diagnostic 519 | | +--ro remote-diagnostic? 520 | | | iana-bfd-types:diagnostic 521 | | +--ro remote-authenticated? boolean 522 | | +--ro remote-authentication-type? 523 | | | iana-bfd-types:auth-type {authentication}? 524 | | +--ro detection-mode? enumeration 525 | | +--ro negotiated-tx-interval? uint32 526 | | +--ro negotiated-rx-interval? uint32 527 | | +--ro detection-time? uint32 528 | | +--ro echo-tx-interval-in-use? uint32 529 | | {echo-mode}? 530 | +--ro session-statistics 531 | +--ro create-time? 532 | | yang:date-and-time 533 | +--ro last-down-time? 534 | | yang:date-and-time 535 | +--ro last-up-time? 536 | | yang:date-and-time 537 | +--ro down-count? yang:counter32 538 | +--ro admin-down-count? yang:counter32 539 | +--ro receive-packet-count? yang:counter64 540 | +--ro send-packet-count? yang:counter64 541 | +--ro receive-invalid-packet-count? yang:counter64 542 | +--ro send-failed-packet-count? yang:counter64 543 +--rw interfaces* [interface] 544 +--rw interface if:interface-ref 545 +--rw authentication! {authentication}? 546 +--rw key-chain? kc:key-chain-ref 547 +--rw meticulous? boolean 549 notifications: 550 +---n singlehop-notification 551 +--ro local-discr? discriminator 552 +--ro remote-discr? discriminator 553 +--ro new-state? state 554 +--ro state-change-reason? iana-bfd-types:diagnostic 555 +--ro time-of-last-state-change? yang:date-and-time 556 +--ro dest-addr? inet:ip-address 557 +--ro source-addr? inet:ip-address 558 +--ro session-index? uint32 559 +--ro path-type? identityref 560 +--ro interface? if:interface-ref 561 +--ro echo-enabled? boolean 563 2.7. BFD IP multihop hierarchy 565 An "ip-mh" node is added under the "bfd" node in cntrol-plane- 566 protocol. The configuration and operational state data for each BFD 567 IP multihop session is under this "ip-mh" node. In the operational 568 state model we support multiple BFD multihop sessions per remote 569 address (ECMP), the local discriminator is used as key. 571 module: ietf-bfd-ip-mh 572 augment /rt:routing/rt:control-plane-protocols 573 /rt:control-plane-protocol/bfd:bfd: 574 +--rw ip-mh 575 +--ro summary 576 | +--ro number-of-sessions? yang:gauge32 577 | +--ro number-of-sessions-up? yang:gauge32 578 | +--ro number-of-sessions-down? yang:gauge32 579 | +--ro number-of-sessions-admin-down? yang:gauge32 580 +--rw session-groups 581 +--rw session-group* [source-addr dest-addr] 582 +--rw source-addr inet:ip-address 583 +--rw dest-addr inet:ip-address 584 +--rw local-multiplier? multiplier 585 +--rw (interval-config-type)? 586 | +--:(tx-rx-intervals) 587 | | +--rw desired-min-tx-interval? uint32 588 | | +--rw required-min-rx-interval? uint32 589 | +--:(single-interval) {single-minimum-interval}? 590 | +--rw min-interval? uint32 591 +--rw demand-enabled? boolean 592 | {demand-mode}? 593 +--rw admin-down? boolean 594 +--rw authentication! {authentication}? 595 | +--rw key-chain? kc:key-chain-ref 596 | +--rw meticulous? boolean 597 +--rw tx-ttl? bfd-types:hops 598 +--rw rx-ttl bfd-types:hops 599 +--ro sessions* [] 600 +--ro path-type? identityref 601 +--ro ip-encapsulation? boolean 602 +--ro local-discriminator? discriminator 603 +--ro remote-discriminator? discriminator 604 +--ro remote-multiplier? multiplier 605 +--ro demand-capability? boolean {demand-mode}? 606 +--ro source-port? inet:port-number 607 +--ro dest-port? inet:port-number 608 +--ro session-running 609 | +--ro session-index? uint32 610 | +--ro local-state? state 611 | +--ro remote-state? state 612 | +--ro local-diagnostic? 613 | | iana-bfd-types:diagnostic 614 | +--ro remote-diagnostic? 615 | | iana-bfd-types:diagnostic 616 | +--ro remote-authenticated? boolean 617 | +--ro remote-authentication-type? 618 | | iana-bfd-types:auth-type {authentication}? 619 | +--ro detection-mode? enumeration 620 | +--ro negotiated-tx-interval? uint32 621 | +--ro negotiated-rx-interval? uint32 622 | +--ro detection-time? uint32 623 | +--ro echo-tx-interval-in-use? uint32 624 | {echo-mode}? 625 +--ro session-statistics 626 +--ro create-time? 627 | yang:date-and-time 628 +--ro last-down-time? 629 | yang:date-and-time 630 +--ro last-up-time? 631 | yang:date-and-time 632 +--ro down-count? 633 | yang:counter32 634 +--ro admin-down-count? 635 | yang:counter32 636 +--ro receive-packet-count? 637 | yang:counter64 638 +--ro send-packet-count? 639 | yang:counter64 640 +--ro receive-invalid-packet-count? 641 | yang:counter64 642 +--ro send-failed-packet-count? 643 yang:counter64 645 notifications: 646 +---n multihop-notification 647 +--ro local-discr? discriminator 648 +--ro remote-discr? discriminator 649 +--ro new-state? state 650 +--ro state-change-reason? iana-bfd-types:diagnostic 651 +--ro time-of-last-state-change? yang:date-and-time 652 +--ro dest-addr? inet:ip-address 653 +--ro source-addr? inet:ip-address 654 +--ro session-index? uint32 655 +--ro path-type? identityref 657 2.8. BFD over LAG hierarchy 659 A "lag" node is added under the "bfd" node in control-plane-protocol. 660 The configuration and operational state data for each BFD LAG session 661 is under this "lag" node. 663 module: ietf-bfd-lag 664 augment /rt:routing/rt:control-plane-protocols 665 /rt:control-plane-protocol/bfd:bfd: 666 +--rw lag 667 +--rw micro-bfd-ipv4-session-statistics 668 | +--ro summary 669 | +--ro number-of-sessions? yang:gauge32 670 | +--ro number-of-sessions-up? yang:gauge32 671 | +--ro number-of-sessions-down? yang:gauge32 672 | +--ro number-of-sessions-admin-down? yang:gauge32 673 +--rw micro-bfd-ipv6-session-statistics 674 | +--ro summary 675 | +--ro number-of-sessions? yang:gauge32 676 | +--ro number-of-sessions-up? yang:gauge32 677 | +--ro number-of-sessions-down? yang:gauge32 678 | +--ro number-of-sessions-admin-down? yang:gauge32 679 +--rw sessions 680 +--rw session* [lag-name] 681 +--rw lag-name if:interface-ref 682 +--rw ipv4-dest-addr? 683 | inet:ipv4-address 684 +--rw ipv6-dest-addr? 685 | inet:ipv6-address 686 +--rw local-multiplier? multiplier 687 +--rw (interval-config-type)? 688 | +--:(tx-rx-intervals) 689 | | +--rw desired-min-tx-interval? uint32 690 | | +--rw required-min-rx-interval? uint32 691 | +--:(single-interval) {single-minimum-interval}? 692 | +--rw min-interval? uint32 693 +--rw demand-enabled? boolean 694 | {demand-mode}? 695 +--rw admin-down? boolean 696 +--rw authentication! {authentication}? 697 | +--rw key-chain? kc:key-chain-ref 698 | +--rw meticulous? boolean 699 +--rw use-ipv4? boolean 700 +--rw use-ipv6? boolean 701 +--ro member-links* [member-link] 702 +--ro member-link if:interface-ref 703 +--ro micro-bfd-ipv4 704 | +--ro path-type? identityref 705 | +--ro ip-encapsulation? boolean 706 | +--ro local-discriminator? discriminator 707 | +--ro remote-discriminator? discriminator 708 | +--ro remote-multiplier? multiplier 709 | +--ro demand-capability? boolean 710 | | {demand-mode}? 711 | +--ro source-port? inet:port-number 712 | +--ro dest-port? inet:port-number 713 | +--ro session-running 714 | | +--ro session-index? uint32 715 | | +--ro local-state? state 716 | | +--ro remote-state? state 717 | | +--ro local-diagnostic? 718 | | | iana-bfd-types:diagnostic 719 | | +--ro remote-diagnostic? 720 | | | iana-bfd-types:diagnostic 721 | | +--ro remote-authenticated? boolean 722 | | +--ro remote-authentication-type? 723 | | | iana-bfd-types:auth-type 724 | | | {authentication}? 725 | | +--ro detection-mode? enumeration 726 | | +--ro negotiated-tx-interval? uint32 727 | | +--ro negotiated-rx-interval? uint32 728 | | +--ro detection-time? uint32 729 | | +--ro echo-tx-interval-in-use? uint32 730 | | {echo-mode}? 731 | +--ro session-statistics 732 | +--ro create-time? 733 | | yang:date-and-time 734 | +--ro last-down-time? 735 | | yang:date-and-time 736 | +--ro last-up-time? 737 | | yang:date-and-time 738 | +--ro down-count? 739 | | yang:counter32 740 | +--ro admin-down-count? 741 | | yang:counter32 742 | +--ro receive-packet-count? 743 | | yang:counter64 744 | +--ro send-packet-count? 745 | | yang:counter64 746 | +--ro receive-invalid-packet-count? 747 | | yang:counter64 748 | +--ro send-failed-packet-count? 749 | yang:counter64 750 +--ro micro-bfd-ipv6 751 +--ro path-type? identityref 752 +--ro ip-encapsulation? boolean 753 +--ro local-discriminator? discriminator 754 +--ro remote-discriminator? discriminator 755 +--ro remote-multiplier? multiplier 756 +--ro demand-capability? boolean 757 | {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? state 763 | +--ro remote-state? state 764 | +--ro local-diagnostic? 765 | | iana-bfd-types:diagnostic 766 | +--ro remote-diagnostic? 767 | | iana-bfd-types:diagnostic 768 | +--ro remote-authenticated? boolean 769 | +--ro remote-authentication-type? 770 | | iana-bfd-types:auth-type 771 | | {authentication}? 772 | +--ro detection-mode? enumeration 773 | +--ro negotiated-tx-interval? uint32 774 | +--ro negotiated-rx-interval? uint32 775 | +--ro detection-time? uint32 776 | +--ro echo-tx-interval-in-use? uint32 777 | {echo-mode}? 778 +--ro session-statistics 779 +--ro create-time? 780 | yang:date-and-time 781 +--ro last-down-time? 782 | yang:date-and-time 783 +--ro last-up-time? 784 | yang:date-and-time 785 +--ro down-count? 786 | yang:counter32 787 +--ro admin-down-count? 788 | yang:counter32 789 +--ro receive-packet-count? 790 | yang:counter64 791 +--ro send-packet-count? 792 | yang:counter64 793 +--ro receive-invalid-packet-count? 794 | yang:counter64 795 +--ro send-failed-packet-count? 796 yang:counter64 798 notifications: 799 +---n lag-notification 800 +--ro local-discr? discriminator 801 +--ro remote-discr? discriminator 802 +--ro new-state? state 803 +--ro state-change-reason? iana-bfd-types:diagnostic 804 +--ro time-of-last-state-change? yang:date-and-time 805 +--ro dest-addr? inet:ip-address 806 +--ro source-addr? inet:ip-address 807 +--ro session-index? uint32 808 +--ro path-type? identityref 809 +--ro lag-name? if:interface-ref 810 +--ro member-link? if:interface-ref 812 2.9. BFD over MPLS LSPs hierarchy 814 An "mpls" node is added under the "bfd" node in control-plane- 815 protocol. The configuration is per MPLS FEC under this "mpls" node. 816 In the operational state model we support multiple BFD sessions per 817 MPLS FEC (ECMP), the local discriminator is used as key. The "mpls" 818 node can be used in a network device (top-level), or mounted in an 819 LNE or in a network instance. 821 module: ietf-bfd-mpls 822 augment /rt:routing/rt:control-plane-protocols 823 /rt:control-plane-protocol/bfd:bfd: 824 +--rw mpls 825 +--ro summary 826 | +--ro number-of-sessions? yang:gauge32 827 | +--ro number-of-sessions-up? yang:gauge32 828 | +--ro number-of-sessions-down? yang:gauge32 829 | +--ro number-of-sessions-admin-down? yang:gauge32 830 +--rw egress 831 | +--rw enable? boolean 832 | +--rw local-multiplier? multiplier 833 | +--rw (interval-config-type)? 834 | | +--:(tx-rx-intervals) 835 | | | +--rw desired-min-tx-interval? uint32 836 | | | +--rw required-min-rx-interval? uint32 837 | | +--:(single-interval) {single-minimum-interval}? 838 | | +--rw min-interval? uint32 839 | +--rw authentication! {authentication}? 840 | +--rw key-chain? kc:key-chain-ref 841 | +--rw meticulous? boolean 842 +--rw session-groups 843 +--rw session-group* [mpls-fec] 844 +--rw mpls-fec inet:ip-prefix 845 +--rw local-multiplier? multiplier 846 +--rw (interval-config-type)? 847 | +--:(tx-rx-intervals) 848 | | +--rw desired-min-tx-interval? uint32 849 | | +--rw required-min-rx-interval? uint32 850 | +--:(single-interval) {single-minimum-interval}? 851 | +--rw min-interval? uint32 852 +--rw demand-enabled? boolean 853 | {demand-mode}? 854 +--rw admin-down? boolean 855 +--rw authentication! {authentication}? 856 | +--rw key-chain? kc:key-chain-ref 857 | +--rw meticulous? boolean 858 +--ro sessions* [] 859 +--ro path-type? identityref 860 +--ro ip-encapsulation? boolean 861 +--ro local-discriminator? discriminator 862 +--ro remote-discriminator? discriminator 863 +--ro remote-multiplier? multiplier 864 +--ro demand-capability? boolean {demand-mode}? 865 +--ro source-port? inet:port-number 866 +--ro dest-port? inet:port-number 867 +--ro session-running 868 | +--ro session-index? uint32 869 | +--ro local-state? state 870 | +--ro remote-state? state 871 | +--ro local-diagnostic? 872 | | iana-bfd-types:diagnostic 873 | +--ro remote-diagnostic? 874 | | iana-bfd-types:diagnostic 875 | +--ro remote-authenticated? boolean 876 | +--ro remote-authentication-type? 877 | | iana-bfd-types:auth-type {authentication}? 878 | +--ro detection-mode? enumeration 879 | +--ro negotiated-tx-interval? uint32 880 | +--ro negotiated-rx-interval? uint32 881 | +--ro detection-time? uint32 882 | +--ro echo-tx-interval-in-use? uint32 883 | {echo-mode}? 884 +--ro session-statistics 885 | +--ro create-time? 886 | | yang:date-and-time 887 | +--ro last-down-time? 888 | | yang:date-and-time 889 | +--ro last-up-time? 890 | | yang:date-and-time 891 | +--ro down-count? 892 | | yang:counter32 893 | +--ro admin-down-count? 894 | | yang:counter32 895 | +--ro receive-packet-count? 896 | | yang:counter64 897 | +--ro send-packet-count? 898 | | yang:counter64 899 | +--ro receive-invalid-packet-count? 900 | | yang:counter64 901 | +--ro send-failed-packet-count? 902 | yang:counter64 903 +--ro mpls-dest-address? inet:ip-address 905 notifications: 906 +---n mpls-notification 907 +--ro local-discr? discriminator 908 +--ro remote-discr? discriminator 909 +--ro new-state? state 910 +--ro state-change-reason? iana-bfd-types:diagnostic 911 +--ro time-of-last-state-change? yang:date-and-time 912 +--ro dest-addr? inet:ip-address 913 +--ro source-addr? inet:ip-address 914 +--ro session-index? uint32 915 +--ro path-type? identityref 916 +--ro mpls-dest-address? inet:ip-address 918 2.10. BFD over MPLS-TE hierarchy 920 YANG Data Model for TE Topologies [I-D.ietf-teas-yang-te] is 921 augmented. BFD is configured per MPLS-TE tunnel, and BFD session 922 operational state data is provided per MPLS-TE LSP. 924 module: ietf-bfd-mpls-te 925 augment /rt:routing/rt:control-plane-protocols 926 /rt:control-plane-protocol/bfd:bfd: 927 +--rw mpls-te 928 +--rw egress 929 | +--rw enable? boolean 930 | +--rw local-multiplier? multiplier 931 | +--rw (interval-config-type)? 932 | | +--:(tx-rx-intervals) 933 | | | +--rw desired-min-tx-interval? uint32 934 | | | +--rw required-min-rx-interval? uint32 935 | | +--:(single-interval) {single-minimum-interval}? 936 | | +--rw min-interval? uint32 937 | +--rw authentication! {authentication}? 938 | +--rw key-chain? kc:key-chain-ref 939 | +--rw meticulous? boolean 940 +--ro summary 941 +--ro number-of-sessions? yang:gauge32 942 +--ro number-of-sessions-up? yang:gauge32 943 +--ro number-of-sessions-down? yang:gauge32 944 +--ro number-of-sessions-admin-down? yang:gauge32 945 augment /te:te/te:tunnels/te:tunnel: 946 +--rw local-multiplier? multiplier 947 +--rw (interval-config-type)? 948 | +--:(tx-rx-intervals) 949 | | +--rw desired-min-tx-interval? uint32 950 | | +--rw required-min-rx-interval? uint32 951 | +--:(single-interval) {single-minimum-interval}? 952 | +--rw min-interval? uint32 953 +--rw demand-enabled? boolean {demand-mode}? 954 +--rw admin-down? boolean 955 +--rw authentication! {authentication}? 956 | +--rw key-chain? kc:key-chain-ref 957 | +--rw meticulous? boolean 958 +--rw encap? identityref 959 augment /te:te/te:lsps-state/te:lsp: 960 +--ro path-type? identityref 961 +--ro ip-encapsulation? boolean 962 +--ro local-discriminator? discriminator 963 +--ro remote-discriminator? discriminator 964 +--ro remote-multiplier? multiplier 965 +--ro demand-capability? boolean {demand-mode}? 966 +--ro source-port? inet:port-number 967 +--ro dest-port? inet:port-number 968 +--ro session-running 969 | +--ro session-index? uint32 970 | +--ro local-state? state 971 | +--ro remote-state? state 972 | +--ro local-diagnostic? iana-bfd-types:diagnostic 973 | +--ro remote-diagnostic? iana-bfd-types:diagnostic 974 | +--ro remote-authenticated? boolean 975 | +--ro remote-authentication-type? iana-bfd-types:auth-type 976 | | {authentication}? 977 | +--ro detection-mode? enumeration 978 | +--ro negotiated-tx-interval? uint32 979 | +--ro negotiated-rx-interval? uint32 980 | +--ro detection-time? uint32 981 | +--ro echo-tx-interval-in-use? uint32 {echo-mode}? 982 +--ro session-statistics 983 | +--ro create-time? yang:date-and-time 984 | +--ro last-down-time? yang:date-and-time 985 | +--ro last-up-time? yang:date-and-time 986 | +--ro down-count? yang:counter32 987 | +--ro admin-down-count? yang:counter32 988 | +--ro receive-packet-count? yang:counter64 989 | +--ro send-packet-count? yang:counter64 990 | +--ro receive-invalid-packet-count? yang:counter64 991 | +--ro send-failed-packet-count? yang:counter64 992 +--ro mpls-dest-address? inet:ip-address 994 notifications: 995 +---n mpls-te-notification 996 +--ro local-discr? discriminator 997 +--ro remote-discr? discriminator 998 +--ro new-state? state 999 +--ro state-change-reason? iana-bfd-types:diagnostic 1000 +--ro time-of-last-state-change? yang:date-and-time 1001 +--ro dest-addr? inet:ip-address 1002 +--ro source-addr? inet:ip-address 1003 +--ro session-index? uint32 1004 +--ro path-type? identityref 1005 +--ro mpls-dest-address? inet:ip-address 1006 +--ro tunnel-name? string 1008 2.11. Interaction with other YANG modules 1010 Generic YANG Data Model for Connectionless OAM protocols 1011 [I-D.ietf-lime-yang-connectionless-oam] describes how the LIME 1012 connectionless OAM model could be extended to support BFD. 1014 Also, the operation of the BFD data model depends on configuration 1015 parameters that are defined in other YANG modules. 1017 2.11.1. Module ietf-interfaces 1019 The following boolean configuration is defined in A YANG Data Model 1020 for Interface Management [RFC8343]: 1022 /if:interfaces/if:interface/if:enabled 1023 If this configuration is set to "false", no BFD packets can 1024 be transmitted or received on that interface. 1026 2.11.2. Module ietf-ip 1028 The following boolean configuration is defined in A YANG Data Model 1029 for IP Management [RFC8344]: 1031 /if:interfaces/if:interface/ip:ipv4/ip:enabled 1032 If this configuration is set to "false", no BFD IPv4 packets 1033 can be transmitted or received on that interface. 1035 /if:interfaces/if:interface/ip:ipv4/ip:forwarding 1036 If this configuration is set to "false", no BFD IPv4 packets 1037 can be transmitted or received on that interface. 1039 /if:interfaces/if:interface/ip:ipv6/ip:enabled 1040 If this configuration is set to "false", no BFD IPv6 packets 1041 can be transmitted or received on that interface. 1043 /if:interfaces/if:interface/ip:ipv6/ip:forwarding 1044 If this configuration is set to "false", no BFD IPv6 packets 1045 can be transmitted or received on that interface. 1047 2.11.3. Module ietf-mpls 1049 The following boolean configuration is defined in A YANG Data Model 1050 for MPLS Base [I-D.ietf-mpls-base-yang]: 1052 /rt:routing/mpls:mpls/mpls:interface/mpls:config/mpls:enabled 1053 If this configuration is set to "false", no BFD MPLS packets 1054 can be transmitted or received on that interface. 1056 2.11.4. Module ietf-te 1058 The following configuration is defined in the "ietf-te" YANG module 1059 YANG Data Model for TE Topology [I-D.ietf-teas-yang-te]: 1061 /ietf-te:te/ietf-te:tunnels/ietf-te:tunnel/ietf-te:config/ietf- 1062 te:admin-status 1063 If this configuration is not set to "state-up", no BFD MPLS 1064 packets can be transmitted or received on that tunnel. 1066 2.12. IANA BFD YANG Module 1068 file "iana-bfd-types@2018-06-21.yang" 1070 module iana-bfd-types { 1072 yang-version 1.1; 1074 namespace "urn:ietf:params:xml:ns:yang:iana-bfd-types"; 1076 prefix "iana-bfd-types"; 1078 organization "IANA"; 1080 contact 1081 " Internet Assigned Numbers Authority 1083 Postal: ICANN 1084 4676 Admiralty Way, Suite 330 1085 Marina del Rey, CA 90292 1087 Tel: +1 310 823 9358 1088 "; 1090 description 1091 "This module defines YANG data types for IANA-registered 1092 BFD parameters. 1094 This YANG module is maintained by IANA and reflects the 1095 'BFD Diagnostic Codes' and 'BFD Authentication Types' registries. 1097 Copyright (c) 2018 IETF Trust and the persons 1098 identified as authors of the code. All rights reserved. 1100 Redistribution and use in source and binary forms, with or 1101 without modification, is permitted pursuant to, and subject 1102 to the license terms contained in, the Simplified BSD License 1103 set forth in Section 4.c of the IETF Trust's Legal Provisions 1104 Relating to IETF Documents 1105 (http://trustee.ietf.org/license-info). 1107 This version of this YANG module is part of RFC XXXX; see 1108 the RFC itself for full legal notices."; 1110 // RFC Ed.: replace XXXX with actual RFC number and remove 1111 // this note 1113 reference "RFC XXXX"; 1115 revision 2018-06-21 { 1116 description "Initial revision."; 1117 reference "RFC XXXX: IANA BFD YANG Data Types."; 1118 } 1120 /* 1121 * Type Definitions 1122 */ 1123 typedef diagnostic { 1124 type enumeration { 1125 enum none { 1126 value 0; 1127 description "None"; 1128 } 1129 enum control-expiry { 1130 value 1; 1131 description "Control timer expiry"; 1132 } 1133 enum echo-failed { 1134 value 2; 1135 description "Echo failure"; 1136 } 1137 enum neighbor-down { 1138 value 3; 1139 description "Neighbor down"; 1140 } 1141 enum forwarding-reset { 1142 value 4; 1143 description "Forwarding reset"; 1144 } 1145 enum path-down { 1146 value 5; 1147 description "Path down"; 1148 } 1149 enum concatenated-path-down { 1150 value 6; 1151 description "Concatenated path down"; 1152 } 1153 enum admin-down { 1154 value 7; 1155 description "Admin down"; 1156 } 1157 enum reverse-concatenated-path-down { 1158 value 8; 1159 description "Reverse concatenated path down"; 1160 } 1161 enum mis-connectivity-defect { 1162 value 9; 1163 description "Mis-connectivity defect as specified in RFC6428"; 1164 } 1165 } 1166 description 1167 "BFD diagnostic as defined in RFC 5880, values are maintained in 1168 the 'BFD Diagnostic Codes' IANA registry. Range is 0 to 31."; 1169 } 1171 typedef auth-type { 1172 type enumeration { 1173 enum reserved { 1174 value 0; 1175 description "Reserved"; 1176 } 1177 enum simple-password { 1178 value 1; 1179 description "Simple password"; 1180 } 1181 enum keyed-md5 { 1182 value 2; 1183 description "Keyed MD5"; 1184 } 1185 enum meticulous-keyed-md5 { 1186 value 3; 1187 description "Meticulous keyed MD5"; 1188 } 1189 enum keyed-sha1 { 1190 value 4; 1191 description "Keyed SHA1"; 1192 } 1193 enum meticulous-keyed-sha1 { 1194 value 5; 1195 description "Meticulous keyed SHA1"; 1196 } 1197 } 1198 description 1199 "BFD authentication type as defined in RFC 5880, values are 1200 maintained in the 'BFD Authentication Types' IANA registry. 1201 Range is 0 to 255."; 1202 } 1203 } 1205 1207 2.13. BFD types YANG Module 1209 This YANG module imports typedefs from [RFC6991], [RFC8177] and the 1210 "control-plane-protocol" identity from [RFC8349]. 1212 file "ietf-bfd-types@2018-06-21.yang" 1214 module ietf-bfd-types { 1216 yang-version 1.1; 1218 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-types"; 1220 prefix "bfd-types"; 1222 // RFC Ed.: replace occurences of XXXX with actual RFC number and 1223 // remove this note 1225 import iana-bfd-types { 1226 prefix "iana-bfd-types"; 1227 reference "RFC XXXX: YANG Data Model for BFD"; 1228 } 1230 import ietf-inet-types { 1231 prefix "inet"; 1232 reference "RFC 6991: Common YANG Data Types"; 1233 } 1235 import ietf-yang-types { 1236 prefix "yang"; 1237 reference "RFC 6991: Common YANG Data Types"; 1238 } 1239 import ietf-routing { 1240 prefix "rt"; 1241 reference 1242 "RFC 8349: A YANG Data Model for Routing Management 1243 (NMDA version)"; 1244 } 1246 import ietf-key-chain { 1247 prefix "kc"; 1248 reference "RFC 8177: YANG Data Model for Key Chains"; 1249 } 1251 organization "IETF BFD Working Group"; 1253 contact 1254 "WG Web: 1255 WG List: 1257 Editors: Reshad Rahman (rrahman@cisco.com), 1258 Lianshu Zheng (vero.zheng@huawei.com), 1259 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1261 description 1262 "This module contains a collection of BFD specific YANG data type 1263 definitions, as per RFC 5880, and also groupings which are common 1264 to other BFD YANG modules. 1266 Copyright (c) 2018 IETF Trust and the persons 1267 identified as authors of the code. All rights reserved. 1269 Redistribution and use in source and binary forms, with or 1270 without modification, is permitted pursuant to, and subject 1271 to the license terms contained in, the Simplified BSD License 1272 set forth in Section 4.c of the IETF Trust's Legal Provisions 1273 Relating to IETF Documents 1274 (http://trustee.ietf.org/license-info). 1276 This version of this YANG module is part of RFC XXXX; see 1277 the RFC itself for full legal notices."; 1279 reference "RFC XXXX"; 1281 revision 2018-06-21 { 1282 description "Initial revision."; 1283 reference "RFC XXXX: YANG Data Model for BFD"; 1284 } 1286 /* 1287 * Feature definitions 1288 */ 1289 feature single-minimum-interval { 1290 description 1291 "This feature indicates that the server supports configuration 1292 of one minimum interval value which is used for both transmit and 1293 receive minimum intervals."; 1294 } 1296 feature authentication { 1297 description 1298 "This feature indicates that the server supports BFD 1299 authentication."; 1300 reference 1301 "RFC 5880: Bidirectional Forwarding Detection (BFD), 1302 section 6.7."; 1303 } 1305 feature demand-mode { 1306 description 1307 "This feature indicates that the server supports BFD demand 1308 mode."; 1309 reference 1310 "RFC 5880: Bidirectional Forwarding Detection (BFD), 1311 section 6.6."; 1312 } 1314 feature echo-mode { 1315 description 1316 "This feature indicates that the server supports BFD echo 1317 mode."; 1318 reference 1319 "RFC 5880: Bidirectional Forwarding Detection (BFD), 1320 section 6.4."; 1321 } 1323 /* 1324 * Identity definitions 1325 */ 1326 identity bfdv1 { 1327 base "rt:control-plane-protocol"; 1328 description "BFD protocol version 1."; 1329 reference 1330 "RFC 5880: Bidirectional Forwarding Detection (BFD)."; 1331 } 1333 identity path-type { 1334 description 1335 "Base identity for BFD path type. The path type indicates 1336 the type of path on which BFD is running."; 1337 } 1338 identity path-ip-sh { 1339 base path-type; 1340 description "BFD on IP single hop."; 1341 reference 1342 "RFC 5881: Bidirectional Forwarding Detection (BFD) 1343 for IPv4 and IPv6 (Single Hop)."; 1344 } 1345 identity path-ip-mh { 1346 base path-type; 1347 description "BFD on IP multihop paths."; 1348 reference 1349 "RFC 5883: Bidirectional Forwarding Detection (BFD) for 1350 Multihop Paths."; 1351 } 1352 identity path-mpls-te { 1353 base path-type; 1354 description 1355 "BFD on MPLS Traffic Engineering."; 1356 reference 1357 "RFC 5884: Bidirectional Forwarding Detection (BFD) 1358 for MPLS Label Switched Paths (LSPs)."; 1359 } 1360 identity path-mpls-lsp { 1361 base path-type; 1362 description 1363 "BFD on MPLS Label Switched Path."; 1364 reference 1365 "RFC 5884: Bidirectional Forwarding Detection (BFD) 1366 for MPLS Label Switched Paths (LSPs)."; 1367 } 1368 identity path-lag { 1369 base path-type; 1370 description 1371 "Micro-BFD on LAG member links."; 1372 reference 1373 "RFC 7130: Bidirectional Forwarding Detection (BFD) on 1374 Link Aggregation Group (LAG) Interfaces."; 1375 } 1377 identity encap-type { 1378 description 1379 "Base identity for BFD encapsulation type."; 1380 } 1381 identity encap-ip { 1382 base encap-type; 1383 description "BFD with IP encapsulation."; 1384 } 1386 /* 1387 * Type Definitions 1388 */ 1389 typedef discriminator { 1390 type uint32; 1391 description "BFD discriminator as described in RFC 5880."; 1392 } 1394 typedef state { 1395 type enumeration { 1396 enum adminDown { 1397 value 0; 1398 description "admindown"; 1399 } 1400 enum down { 1401 value 1; 1402 description "down"; 1403 } 1404 enum init { 1405 value 2; 1406 description "init"; 1407 } 1408 enum up { 1409 value 3; 1410 description "up"; 1411 } 1412 } 1413 description "BFD state as defined in RFC 5880."; 1414 } 1416 typedef multiplier { 1417 type uint8 { 1418 range 1..255; 1419 } 1420 description "BFD multiplier as described in RFC 5880."; 1421 } 1423 typedef hops { 1424 type uint8 { 1425 range 1..255; 1426 } 1427 description 1428 "This corresponds to Time To Live for IPv4 and corresponds to hop 1429 limit for IPv6."; 1430 } 1431 /* 1432 * Groupings 1433 */ 1434 grouping auth-parms { 1435 description 1436 "Grouping for BFD authentication parameters 1437 (see section 6.7 of RFC 5880)."; 1438 container authentication { 1439 if-feature authentication; 1440 presence 1441 "Enables BFD authentication (see section 6.7 of RFC 5880)."; 1442 description "Parameters for BFD authentication."; 1444 leaf key-chain { 1445 type kc:key-chain-ref; 1446 description "Name of the key-chain as per RFC 8177."; 1447 } 1449 leaf meticulous { 1450 type boolean; 1451 description 1452 "Enables meticulous mode as described in section 6.7 " + 1453 "of RFC 5880."; 1454 } 1455 } 1456 } 1458 grouping base-cfg-parms { 1459 description "BFD grouping for base config parameters."; 1460 leaf local-multiplier { 1461 type multiplier; 1462 default 3; 1463 description "Multiplier transmitted by local system."; 1464 } 1466 choice interval-config-type { 1467 description 1468 "Two interval values or one value used for both transmit and 1469 receive."; 1470 case tx-rx-intervals { 1471 leaf desired-min-tx-interval { 1472 type uint32; 1473 units microseconds; 1474 default 1000000; 1475 description 1476 "Desired minimum transmit interval of control packets."; 1477 } 1478 leaf required-min-rx-interval { 1479 type uint32; 1480 units microseconds; 1481 default 1000000; 1482 description 1483 "Required minimum receive interval of control packets."; 1484 } 1485 } 1486 case single-interval { 1487 if-feature single-minimum-interval; 1489 leaf min-interval { 1490 type uint32; 1491 units microseconds; 1492 default 1000000; 1493 description 1494 "Desired minimum transmit interval and required " + 1495 "minimum receive interval of control packets."; 1496 } 1497 } 1498 } 1499 } 1501 grouping client-cfg-parms { 1502 description 1503 "BFD grouping for configuration parameters 1504 used by clients of BFD, e.g. IGP or MPLS."; 1506 leaf enable { 1507 type boolean; 1508 default false; 1509 description 1510 "Indicates whether the BFD is enabled."; 1511 } 1512 uses base-cfg-parms; 1513 } 1515 grouping common-cfg-parms { 1516 description 1517 "BFD grouping for common configuration parameters."; 1519 uses base-cfg-parms; 1521 leaf demand-enabled { 1522 if-feature demand-mode; 1523 type boolean; 1524 default false; 1525 description 1526 "To enable demand mode."; 1527 } 1529 leaf admin-down { 1530 type boolean; 1531 default false; 1532 description 1533 "Is the BFD session administratively down."; 1534 } 1535 uses auth-parms; 1536 } 1538 grouping all-session { 1539 description "BFD session operational information"; 1540 leaf path-type { 1541 type identityref { 1542 base path-type; 1543 } 1544 config "false"; 1545 description 1546 "BFD path type, this indicates the path type that BFD is 1547 running on."; 1548 } 1549 leaf ip-encapsulation { 1550 type boolean; 1551 config "false"; 1552 description "Whether BFD encapsulation uses IP."; 1553 } 1554 leaf local-discriminator { 1555 type discriminator; 1556 config "false"; 1557 description "Local discriminator."; 1558 } 1559 leaf remote-discriminator { 1560 type discriminator; 1561 config "false"; 1562 description "Remote discriminator."; 1563 } 1564 leaf remote-multiplier { 1565 type multiplier; 1566 config "false"; 1567 description "Remote multiplier."; 1568 } 1569 leaf demand-capability { 1570 if-feature demand-mode; 1571 type boolean; 1572 config "false"; 1573 description "Local demand mode capability."; 1575 } 1576 leaf source-port { 1577 when "../ip-encapsulation = 'true'" { 1578 description 1579 "Source port valid only when IP encapsulation is used."; 1580 } 1581 type inet:port-number; 1582 config "false"; 1583 description "Source UDP port"; 1584 } 1585 leaf dest-port { 1586 when "../ip-encapsulation = 'true'" { 1587 description 1588 "Destination port valid only when IP encapsulation is used."; 1589 } 1590 type inet:port-number; 1591 config "false"; 1592 description "Destination UDP port."; 1593 } 1595 container session-running { 1596 config "false"; 1597 description "BFD session running information."; 1598 leaf session-index { 1599 type uint32; 1600 description 1601 "An index used to uniquely identify BFD sessions."; 1602 } 1603 leaf local-state { 1604 type state; 1605 description "Local state."; 1606 } 1607 leaf remote-state { 1608 type state; 1609 description "Remote state."; 1610 } 1611 leaf local-diagnostic { 1612 type iana-bfd-types:diagnostic; 1613 description "Local diagnostic."; 1614 } 1615 leaf remote-diagnostic { 1616 type iana-bfd-types:diagnostic; 1617 description "Remote diagnostic."; 1618 } 1619 leaf remote-authenticated { 1620 type boolean; 1621 description 1622 "Indicates whether incoming BFD control packets are 1623 authenticated."; 1624 } 1625 leaf remote-authentication-type { 1626 when "../remote-authenticated = 'true'" { 1627 description 1628 "Only valid when incoming BFD control packets are 1629 authenticated."; 1630 } 1631 if-feature authentication; 1632 type iana-bfd-types:auth-type; 1633 description 1634 "Authentication type of incoming BFD control packets."; 1635 } 1636 leaf detection-mode { 1637 type enumeration { 1638 enum async-with-echo { 1639 value "1"; 1640 description "Async with echo."; 1641 } 1642 enum async-without-echo { 1643 value "2"; 1644 description "Async without echo."; 1645 } 1646 enum demand-with-echo { 1647 value "3"; 1648 description "Demand with echo."; 1649 } 1650 enum demand-without-echo { 1651 value "4"; 1652 description "Demand without echo."; 1653 } 1654 } 1655 description "Detection mode."; 1656 } 1657 leaf negotiated-tx-interval { 1658 type uint32; 1659 units microseconds; 1660 description "Negotiated transmit interval."; 1661 } 1662 leaf negotiated-rx-interval { 1663 type uint32; 1664 units microseconds; 1665 description "Negotiated receive interval."; 1666 } 1667 leaf detection-time { 1668 type uint32; 1669 units microseconds; 1670 description "Detection time."; 1672 } 1673 leaf echo-tx-interval-in-use { 1674 when "../../path-type = 'bfd-types:path-ip-sh'" { 1675 description 1676 "Echo is supported for IP single-hop only."; 1677 } 1678 if-feature echo-mode; 1679 type uint32; 1680 units microseconds; 1681 description "Echo transmit interval in use."; 1682 } 1683 } 1685 container session-statistics { 1686 config "false"; 1687 description "BFD per-session statistics."; 1689 leaf create-time { 1690 type yang:date-and-time; 1691 description 1692 "Time and date when this session was created."; 1693 } 1694 leaf last-down-time { 1695 type yang:date-and-time; 1696 description 1697 "Time and date of last time this session went down."; 1698 } 1699 leaf last-up-time { 1700 type yang:date-and-time; 1701 description 1702 "Time and date of last time this session went up."; 1703 } 1704 leaf down-count { 1705 type yang:counter32; 1706 description 1707 "The number of times this session has transitioned in the 1708 down state."; 1709 } 1710 leaf admin-down-count { 1711 type yang:counter32; 1712 description 1713 "The number of times this session has transitioned in the 1714 admin-down state."; 1715 } 1716 leaf receive-packet-count { 1717 type yang:counter64; 1718 description 1719 "Count of received packets in this session. This includes 1720 valid and invalid received packets."; 1721 } 1722 leaf send-packet-count { 1723 type yang:counter64; 1724 description "Count of sent packets in this session."; 1725 } 1726 leaf receive-invalid-packet-count { 1727 type yang:counter64; 1728 description 1729 "Count of invalid received packets in this session."; 1730 } 1731 leaf send-failed-packet-count { 1732 type yang:counter64; 1733 description 1734 "Count of packets which failed to be sent in this session."; 1735 } 1736 } 1737 } 1739 grouping session-statistics-summary { 1740 description "Grouping for session statistics summary."; 1741 container summary { 1742 config false; 1743 description "BFD session statistics summary."; 1744 leaf number-of-sessions { 1745 type yang:gauge32; 1746 description "Number of BFD sessions."; 1747 } 1748 leaf number-of-sessions-up { 1749 type yang:gauge32; 1750 description "Number of BFD sessions currently in up state."; 1751 } 1752 leaf number-of-sessions-down { 1753 type yang:gauge32; 1754 description "Number of BFD sessions currently in down state."; 1755 } 1756 leaf number-of-sessions-admin-down { 1757 type yang:gauge32; 1758 description 1759 "Number of BFD sessions currently in admin-down state."; 1760 } 1761 } 1762 } 1764 grouping notification-parms { 1765 description 1766 "This group describes common parameters that will be sent " + 1767 "as part of BFD notification."; 1769 leaf local-discr { 1770 type discriminator; 1771 description "BFD local discriminator."; 1772 } 1774 leaf remote-discr { 1775 type discriminator; 1776 description "BFD remote discriminator."; 1777 } 1779 leaf new-state { 1780 type state; 1781 description "Current BFD state."; 1782 } 1784 leaf state-change-reason { 1785 type iana-bfd-types:diagnostic; 1786 description "BFD state change reason."; 1787 } 1789 leaf time-of-last-state-change { 1790 type yang:date-and-time; 1791 description 1792 "Calendar time of previous state change."; 1793 } 1795 leaf dest-addr { 1796 type inet:ip-address; 1797 description "BFD peer address."; 1798 } 1800 leaf source-addr { 1801 type inet:ip-address; 1802 description "BFD local address."; 1803 } 1805 leaf session-index { 1806 type uint32; 1807 description "An index used to uniquely identify BFD sessions."; 1808 } 1810 leaf path-type { 1811 type identityref { 1812 base path-type; 1813 } 1814 description "BFD path type."; 1815 } 1816 } 1818 } 1820 1822 2.14. BFD top-level YANG Module 1824 This YANG module imports and augments "/routing/control-plane- 1825 protocols/control-plane-protocol" from [RFC8349]. 1827 file "ietf-bfd@2018-06-21.yang" 1829 module ietf-bfd { 1831 yang-version 1.1; 1833 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd"; 1835 prefix "bfd"; 1837 // RFC Ed.: replace occurences of XXXX with actual RFC number and 1838 // remove this note 1840 import ietf-bfd-types { 1841 prefix "bfd-types"; 1842 reference "RFC XXXX: YANG Data Model for BFD"; 1843 } 1845 import ietf-routing { 1846 prefix "rt"; 1847 reference 1848 "RFC 8349: A YANG Data Model for Routing Management 1849 (NMDA version)"; 1850 } 1852 organization "IETF BFD Working Group"; 1854 contact 1855 "WG Web: 1856 WG List: 1858 Editors: Reshad Rahman (rrahman@cisco.com), 1859 Lianshu Zheng (vero.zheng@huawei.com), 1860 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1862 description 1863 "This module contains the YANG definition for BFD parameters as 1864 per RFC 5880. 1866 Copyright (c) 2018 IETF Trust and the persons 1867 identified as authors of the code. All rights reserved. 1869 Redistribution and use in source and binary forms, with or 1870 without modification, is permitted pursuant to, and subject 1871 to the license terms contained in, the Simplified BSD License 1872 set forth in Section 4.c of the IETF Trust's Legal Provisions 1873 Relating to IETF Documents 1874 (http://trustee.ietf.org/license-info). 1876 This version of this YANG module is part of RFC XXXX; see 1877 the RFC itself for full legal notices."; 1879 reference "RFC XXXX"; 1881 revision 2018-06-21 { 1882 description "Initial revision."; 1883 reference "RFC XXXX: YANG Data Model for BFD"; 1884 } 1886 augment "/rt:routing/rt:control-plane-protocols/" 1887 + "rt:control-plane-protocol" { 1888 when "derived-from-or-self(rt:type, 'bfd-types:bfdv1')" { 1889 description 1890 "This augmentation is only valid for a control-plane protocol 1891 instance of BFD (type 'bfdv1')."; 1892 } 1893 description "BFD augmentation."; 1895 container bfd { 1896 description "BFD top level container."; 1898 uses bfd-types:session-statistics-summary; 1899 } 1900 } 1901 } 1903 1905 2.15. BFD IP single-hop YANG Module 1907 This YANG module imports "interface-ref" from [RFC8343], typedefs 1908 from [RFC6991] and augments "/routing/control-plane-protocols/ 1909 control-plane-protocol" from [RFC8349]. 1911 file "ietf-bfd-ip-sh@2018-06-21.yang" 1913 module ietf-bfd-ip-sh { 1914 yang-version 1.1; 1916 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh"; 1918 prefix "bfd-ip-sh"; 1920 // RFC Ed.: replace occurences of XXXX with actual RFC number and 1921 // remove this note 1923 import ietf-bfd-types { 1924 prefix "bfd-types"; 1925 reference "RFC XXXX: YANG Data Model for BFD"; 1926 } 1928 import ietf-bfd { 1929 prefix "bfd"; 1930 reference "RFC XXXX: YANG Data Model for BFD"; 1931 } 1933 import ietf-interfaces { 1934 prefix "if"; 1935 reference 1936 "RFC 8343: A YANG Data Model for Interface Management"; 1937 } 1939 import ietf-inet-types { 1940 prefix "inet"; 1941 reference "RFC 6991: Common YANG Data Types"; 1942 } 1944 import ietf-routing { 1945 prefix "rt"; 1946 reference 1947 "RFC 8349: A YANG Data Model for Routing Management 1948 (NMDA version)"; 1949 } 1951 organization "IETF BFD Working Group"; 1953 contact 1954 "WG Web: 1955 WG List: 1957 Editors: Reshad Rahman (rrahman@cisco.com), 1958 Lianshu Zheng (vero.zheng@huawei.com), 1959 Mahesh Jethanandani (mjethanandani@gmail.com)"; 1961 description 1962 "This module contains the YANG definition for BFD IP single-hop 1963 as per RFC 5881. 1965 Copyright (c) 2018 IETF Trust and the persons 1966 identified as authors of the code. All rights reserved. 1968 Redistribution and use in source and binary forms, with or 1969 without modification, is permitted pursuant to, and subject 1970 to the license terms contained in, the Simplified BSD License 1971 set forth in Section 4.c of the IETF Trust's Legal Provisions 1972 Relating to IETF Documents 1973 (http://trustee.ietf.org/license-info). 1975 This version of this YANG module is part of RFC XXXX; see 1976 the RFC itself for full legal notices."; 1978 reference "RFC XXXX"; 1980 revision 2018-06-21 { 1981 description "Initial revision."; 1982 reference "RFC XXXX: A YANG data model for BFD IP single-hop"; 1983 } 1985 /* 1986 * Augments 1987 */ 1988 augment "/rt:routing/rt:control-plane-protocols/" 1989 + "rt:control-plane-protocol/bfd:bfd" { 1990 description "BFD augmentation for IP single-hop"; 1991 container ip-sh { 1992 description "BFD IP single-hop top level container"; 1994 uses bfd-types:session-statistics-summary; 1996 container sessions { 1997 description 1998 "BFD IP single-hop sessions."; 1999 list session { 2000 key "interface dest-addr"; 2001 description "List of IP single-hop sessions."; 2002 leaf interface { 2003 type if:interface-ref; 2004 description 2005 "Interface on which the BFD session is running."; 2006 } 2007 leaf dest-addr { 2008 type inet:ip-address; 2009 description "IP address of the peer."; 2011 } 2012 leaf source-addr { 2013 type inet:ip-address; 2014 description "Local IP address."; 2015 } 2017 uses bfd-types:common-cfg-parms; 2019 uses bfd-types:all-session; 2020 } 2021 } 2022 list interfaces { 2023 key "interface"; 2024 description "List of interfaces."; 2025 leaf interface { 2026 type if:interface-ref; 2027 description 2028 "BFD information for this interface."; 2029 } 2031 uses bfd-types:auth-parms; 2032 } 2033 } 2034 } 2036 /* 2037 * Notifications 2038 */ 2039 notification singlehop-notification { 2040 description 2041 "Notification for BFD single-hop session state change. An " + 2042 "implementation may rate-limit notifications, e.g. when a" + 2043 "session is continuously changing state."; 2045 uses bfd-types:notification-parms; 2047 leaf interface { 2048 type if:interface-ref; 2049 description "Interface to which this BFD session belongs to."; 2050 } 2052 leaf echo-enabled { 2053 type boolean; 2054 description "Was echo enabled for BFD."; 2055 } 2056 } 2058 } 2059 2061 2.16. BFD IP multihop YANG Module 2063 This YANG module imports typedefs from [RFC6991] and augments 2064 "/routing/control-plane-protocols/control-plane-protocol" from 2065 [RFC8349]. 2067 file "ietf-bfd-ip-mh@2018-06-21.yang" 2069 module ietf-bfd-ip-mh { 2071 yang-version 1.1; 2073 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh"; 2075 prefix "bfd-ip-mh"; 2077 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2078 // remove this note 2080 import ietf-bfd-types { 2081 prefix "bfd-types"; 2082 reference "RFC XXXX: YANG Data Model for BFD"; 2083 } 2085 import ietf-bfd { 2086 prefix "bfd"; 2087 reference "RFC XXXX: YANG Data Model for BFD"; 2088 } 2090 import ietf-inet-types { 2091 prefix "inet"; 2092 reference "RFC 6991: Common YANG Data Types"; 2093 } 2095 import ietf-routing { 2096 prefix "rt"; 2097 reference 2098 "RFC 8349: A YANG Data Model for Routing Management 2099 (NMDA version)"; 2100 } 2102 organization "IETF BFD Working Group"; 2104 contact 2105 "WG Web: 2106 WG List: 2107 Editors: Reshad Rahman (rrahman@cisco.com), 2108 Lianshu Zheng (vero.zheng@huawei.com), 2109 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2111 description 2112 "This module contains the YANG definition for BFD IP multi-hop 2113 as per RFC 5883. 2115 Copyright (c) 2018 IETF Trust and the persons 2116 identified as authors of the code. All rights reserved. 2118 Redistribution and use in source and binary forms, with or 2119 without modification, is permitted pursuant to, and subject 2120 to the license terms contained in, the Simplified BSD License 2121 set forth in Section 4.c of the IETF Trust's Legal Provisions 2122 Relating to IETF Documents 2123 (http://trustee.ietf.org/license-info). 2125 This version of this YANG module is part of RFC XXXX; see 2126 the RFC itself for full legal notices."; 2128 reference "RFC XXXX"; 2130 revision 2018-06-21 { 2131 description "Initial revision."; 2132 reference "RFC XXXX: A YANG data model for BFD IP multihop."; 2133 } 2135 /* 2136 * Augments 2137 */ 2138 augment "/rt:routing/rt:control-plane-protocols/" 2139 + "rt:control-plane-protocol/bfd:bfd" { 2140 description "BFD augmentation for IP multihop."; 2141 container ip-mh { 2142 description "BFD IP multihop top level container."; 2144 uses bfd-types:session-statistics-summary; 2146 container session-groups { 2147 description 2148 "BFD IP multi-hop session groups."; 2149 list session-group { 2150 key "source-addr dest-addr"; 2151 description 2152 "Group of BFD IP multi-hop sessions (for ECMP). A " + 2153 "group of sessions is between 1 source and 1 " + 2154 "destination, each session has a different field " + 2155 "in UDP/IP hdr for ECMP."; 2157 leaf source-addr { 2158 type inet:ip-address; 2159 description 2160 "Local IP address."; 2161 } 2162 leaf dest-addr { 2163 type inet:ip-address; 2164 description 2165 "IP address of the peer."; 2166 } 2167 uses bfd-types:common-cfg-parms; 2169 leaf tx-ttl { 2170 type bfd-types:hops; 2171 default 255; 2172 description "Hop count of outgoing BFD control packets."; 2173 } 2174 leaf rx-ttl { 2175 type bfd-types:hops; 2176 mandatory true; 2177 description 2178 "Minimum allowed hop count value for incoming BFD control 2179 packets. Control packets whose hop count is lower than 2180 this value are dropped."; 2181 } 2182 list sessions { 2183 config false; 2184 description 2185 "The multiple BFD sessions between a source and a " + 2186 "destination."; 2187 uses bfd-types:all-session; 2188 } 2189 } 2190 } 2191 } 2192 } 2194 /* 2195 * Notifications 2196 */ 2197 notification multihop-notification { 2198 description 2199 "Notification for BFD multi-hop session state change. An " + 2200 "implementation may rate-limit notifications, e.g. when a" + 2201 "session is continuously changing state."; 2203 uses bfd-types:notification-parms; 2204 } 2205 } 2207 2209 2.17. BFD over LAG YANG Module 2211 This YANG module imports "interface-ref" from [RFC8343], typedefs 2212 from [RFC6991] and augments "/routing/control-plane-protocols/ 2213 control-plane-protocol" from [RFC8349]. 2215 file "ietf-bfd-lag@2018-06-21.yang" 2217 module ietf-bfd-lag { 2219 yang-version 1.1; 2221 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-lag"; 2223 prefix "bfd-lag"; 2225 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2226 // remove this note 2228 import ietf-bfd-types { 2229 prefix "bfd-types"; 2230 reference "RFC XXXX: YANG Data Model for BFD"; 2231 } 2233 import ietf-bfd { 2234 prefix "bfd"; 2235 reference "RFC XXXX: YANG Data Model for BFD"; 2236 } 2238 import ietf-interfaces { 2239 prefix "if"; 2240 reference 2241 "RFC 8343: A YANG Data Model for Interface Management"; 2242 } 2244 import ietf-inet-types { 2245 prefix "inet"; 2246 reference "RFC 6991: Common YANG Data Types"; 2247 } 2249 import ietf-routing { 2250 prefix "rt"; 2251 reference 2252 "RFC 8349: A YANG Data Model for Routing Management 2253 (NMDA version)"; 2254 } 2256 organization "IETF BFD Working Group"; 2258 contact 2259 "WG Web: 2260 WG List: 2262 Editors: Reshad Rahman (rrahman@cisco.com), 2263 Lianshu Zheng vero.zheng@huawei.com), 2264 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2266 description 2267 "This module contains the YANG definition for BFD over LAG 2268 interfaces as per RFC7130. 2270 Copyright (c) 2018 IETF Trust and the persons 2271 identified as authors of the code. All rights reserved. 2273 Redistribution and use in source and binary forms, with or 2274 without modification, is permitted pursuant to, and subject 2275 to the license terms contained in, the Simplified BSD License 2276 set forth in Section 4.c of the IETF Trust's Legal Provisions 2277 Relating to IETF Documents 2278 (http://trustee.ietf.org/license-info). 2280 This version of this YANG module is part of RFC XXXX; see 2281 the RFC itself for full legal notices."; 2283 reference "RFC XXXX"; 2285 revision 2018-06-21 { 2286 description "Initial revision."; 2287 reference "RFC XXXX: A YANG data model for BFD over LAG"; 2288 } 2290 /* 2291 * Augments 2292 */ 2293 augment "/rt:routing/rt:control-plane-protocols/" 2294 + "rt:control-plane-protocol/bfd:bfd" { 2295 description "BFD augmentation for LAG"; 2296 container lag { 2297 description "BFD over LAG top level container"; 2298 container micro-bfd-ipv4-session-statistics { 2299 description "Micro-BFD IPv4 session counters."; 2300 uses bfd-types:session-statistics-summary; 2301 } 2302 container micro-bfd-ipv6-session-statistics { 2303 description "Micro-BFD IPv6 session counters."; 2304 uses bfd-types:session-statistics-summary; 2305 } 2307 container sessions { 2308 description 2309 "BFD over LAG sessions"; 2310 list session { 2311 key "lag-name"; 2312 description "List of BFD over LAG sessions."; 2313 leaf lag-name { 2314 type if:interface-ref ; 2315 description "Name of the LAG"; 2316 } 2317 leaf ipv4-dest-addr { 2318 type inet:ipv4-address; 2319 description 2320 "IPv4 address of the peer, for IPv4 micro-BFD."; 2321 } 2322 leaf ipv6-dest-addr { 2323 type inet:ipv6-address; 2324 description 2325 "IPv6 address of the peer, for IPv6 micro-BFD."; 2326 } 2327 uses bfd-types:common-cfg-parms; 2329 leaf use-ipv4 { 2330 type boolean; 2331 description "Using IPv4 micro-BFD."; 2332 } 2333 leaf use-ipv6 { 2334 type boolean; 2335 description "Using IPv6 micro-BFD."; 2336 } 2338 list member-links { 2339 key "member-link"; 2340 config false; 2341 description 2342 "Micro-BFD over LAG. This represents one member link."; 2344 leaf member-link { 2345 type if:interface-ref; 2346 description 2347 "Member link on which micro-BFD is running."; 2348 } 2349 container micro-bfd-ipv4 { 2350 when "../../use-ipv4 = 'true'" { 2351 description "Needed only if IPv4 is used."; 2352 } 2353 description 2354 "Micro-BFD IPv4 session state on member link."; 2355 uses bfd-types:all-session; 2356 } 2357 container micro-bfd-ipv6 { 2358 when "../../use-ipv6 = 'true'" { 2359 description "Needed only if IPv6 is used."; 2360 } 2361 description 2362 "Micro-BFD IPv6 session state on member link."; 2363 uses bfd-types:all-session; 2364 } 2365 } 2366 } 2367 } 2368 } 2369 } 2371 /* 2372 * Notifications 2373 */ 2374 notification lag-notification { 2375 description 2376 "Notification for BFD over LAG session state change. " + 2377 "An implementation may rate-limit notifications, e.g. when a" + 2378 "session is continuously changing state."; 2380 uses bfd-types:notification-parms; 2382 leaf lag-name { 2383 type if:interface-ref; 2384 description "LAG interface name."; 2385 } 2387 leaf member-link { 2388 type if:interface-ref; 2389 description "Member link on which BFD is running."; 2390 } 2391 } 2392 } 2393 2395 2.18. BFD over MPLS YANG Module 2397 This YANG module imports typedefs from [RFC6991] and augments 2398 "/routing/control-plane-protocols/control-plane-protocol" from 2399 [RFC8349]. 2401 file "ietf-bfd-mpls@2018-06-21.yang" 2403 module ietf-bfd-mpls { 2405 yang-version 1.1; 2407 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-mpls"; 2409 prefix "bfd-mpls"; 2411 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2412 // remove this note 2414 import ietf-bfd-types { 2415 prefix "bfd-types"; 2416 reference "RFC XXXX: YANG Data Model for BFD"; 2417 } 2419 import ietf-bfd { 2420 prefix "bfd"; 2421 reference "RFC XXXX: YANG Data Model for BFD"; 2422 } 2424 import ietf-inet-types { 2425 prefix "inet"; 2426 reference "RFC 6991: Common YANG Data Types"; 2427 } 2429 import ietf-routing { 2430 prefix "rt"; 2431 reference 2432 "RFC 8349: A YANG Data Model for Routing Management 2433 (NMDA version)"; 2434 } 2436 organization "IETF BFD Working Group"; 2438 contact 2439 "WG Web: 2440 WG List: 2441 Editors: Reshad Rahman (rrahman@cisco.com), 2442 Lianshu Zheng (vero.zheng@huawei.com), 2443 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2445 description 2446 "This module contains the YANG definition for BFD parameters for 2447 MPLS LSPs as per RFC 5884. 2449 Copyright (c) 2018 IETF Trust and the persons 2450 identified as authors of the code. All rights reserved. 2452 Redistribution and use in source and binary forms, with or 2453 without modification, is permitted pursuant to, and subject 2454 to the license terms contained in, the Simplified BSD License 2455 set forth in Section 4.c of the IETF Trust's Legal Provisions 2456 Relating to IETF Documents 2457 (http://trustee.ietf.org/license-info). 2459 This version of this YANG module is part of RFC XXXX; see 2460 the RFC itself for full legal notices."; 2462 reference "RFC XXXX"; 2464 revision 2018-06-21 { 2465 description "Initial revision."; 2466 reference "RFC XXXX: A YANG data model for BFD over MPLS LSPs"; 2467 } 2469 /* 2470 * Identity definitions 2471 */ 2472 identity encap-gach { 2473 base bfd-types:encap-type; 2474 description 2475 "BFD with G-ACh encapsulation as per RFC 5586."; 2476 } 2478 identity encap-ip-gach { 2479 base bfd-types:encap-type; 2480 description 2481 "BFD with IP and G-ACh encapsulation as per RFC 5586."; 2482 } 2484 /* 2485 * Groupings 2486 */ 2487 grouping encap-cfg { 2488 description "Configuration for BFD encapsulation"; 2489 leaf encap { 2490 type identityref { 2491 base bfd-types:encap-type; 2492 } 2493 default bfd-types:encap-ip; 2494 description "BFD encapsulation"; 2495 } 2496 } 2498 grouping mpls-dest-address { 2499 description "Destination address as per RFC 5884."; 2501 leaf mpls-dest-address { 2502 type inet:ip-address; 2503 config "false"; 2504 description 2505 "Destination address as per RFC 5884. 2506 Needed if IP encapsulation is used."; 2507 } 2508 } 2510 /* 2511 * Augments 2512 */ 2513 augment "/rt:routing/rt:control-plane-protocols/" 2514 + "rt:control-plane-protocol/bfd:bfd" { 2515 description "BFD augmentation for MPLS."; 2516 container mpls { 2517 description "BFD MPLS top level container."; 2519 uses bfd-types:session-statistics-summary; 2521 container egress { 2522 description "Egress configuration."; 2524 uses bfd-types:client-cfg-parms; 2526 uses bfd-types:auth-parms; 2527 } 2529 container session-groups { 2530 description 2531 "BFD over MPLS session groups."; 2532 list session-group { 2533 key "mpls-fec"; 2534 description 2535 "Group of BFD MPLS sessions (for ECMP). A group of " + 2536 "sessions is for 1 FEC, each session has a different " + 2537 "field in UDP/IP hdr for ECMP."; 2538 leaf mpls-fec { 2539 type inet:ip-prefix; 2540 description "MPLS FEC."; 2541 } 2543 uses bfd-types:common-cfg-parms; 2545 list sessions { 2546 config false; 2547 description 2548 "The BFD sessions for an MPLS FEC. Local " + 2549 "discriminator is unique for each session in the " + 2550 "group."; 2551 uses bfd-types:all-session; 2553 uses bfd-mpls:mpls-dest-address; 2554 } 2555 } 2556 } 2557 } 2558 } 2560 /* 2561 * Notifications 2562 */ 2563 notification mpls-notification { 2564 description 2565 "Notification for BFD over MPLS FEC session state change. " + 2566 "An implementation may rate-limit notifications, e.g. when a" + 2567 "session is continuously changing state."; 2569 uses bfd-types:notification-parms; 2571 leaf mpls-dest-address { 2572 type inet:ip-address; 2573 description 2574 "Destination address as per RFC 5884. 2575 Needed if IP encapsulation is used."; 2576 } 2577 } 2578 } 2580 2582 2.19. BFD over MPLS-TE YANG Module 2584 This YANG module imports and augments "/te/tunnels/tunnel" from 2585 [I-D.ietf-teas-yang-te]. 2587 file "ietf-bfd-mpls-te@2018-06-21.yang" 2589 module ietf-bfd-mpls-te { 2591 yang-version 1.1; 2593 namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te"; 2595 prefix "bfd-mpls-te"; 2597 // RFC Ed.: replace occurences of XXXX with actual RFC number and 2598 // remove this note 2600 import ietf-bfd-types { 2601 prefix "bfd-types"; 2602 reference "RFC XXXX: YANG Data Model for BFD"; 2603 } 2605 import ietf-bfd { 2606 prefix "bfd"; 2607 reference "RFC XXXX: YANG Data Model for BFD"; 2608 } 2610 import ietf-bfd-mpls { 2611 prefix "bfd-mpls"; 2612 reference "RFC XXXX: YANG Data Model for BFD"; 2613 } 2615 import ietf-te { 2616 prefix "te"; 2617 // RFC Ed.: replace YYYY with actual RFC number of 2618 // draft-ietf-teas-yang-te and remove this note. 2619 reference 2620 "RFC YYYY: A YANG Data Model for Traffic Engineering Tunnels and 2621 Interfaces"; 2622 } 2624 import ietf-routing { 2625 prefix "rt"; 2626 reference 2627 "RFC 8349: A YANG Data Model for Routing Management 2628 (NMDA version)"; 2629 } 2630 organization "IETF BFD Working Group"; 2632 contact 2633 "WG Web: 2634 WG List: 2636 Editors: Reshad Rahman (rrahman@cisco.com), 2637 Lianshu Zheng (vero.zheng@huawei.com), 2638 Mahesh Jethanandani (mjethanandani@gmail.com)"; 2640 description 2641 "This module contains the YANG definition for BFD parameters for 2642 MPLS Traffic Engineering as per RFC 5884. 2644 Copyright (c) 2018 IETF Trust and the persons 2645 identified as authors of the code. All rights reserved. 2647 Redistribution and use in source and binary forms, with or 2648 without modification, is permitted pursuant to, and subject 2649 to the license terms contained in, the Simplified BSD License 2650 set forth in Section 4.c of the IETF Trust's Legal Provisions 2651 Relating to IETF Documents 2652 (http://trustee.ietf.org/license-info). 2654 This version of this YANG module is part of RFC XXXX; see 2655 the RFC itself for full legal notices."; 2657 reference "RFC XXXX"; 2659 revision 2018-06-21 { 2660 description "Initial revision."; 2661 reference "RFC XXXX: A YANG data model for BFD over MPLS-TE"; 2662 } 2664 /* 2665 * Augments 2666 */ 2667 augment "/rt:routing/rt:control-plane-protocols/" 2668 + "rt:control-plane-protocol/bfd:bfd" { 2669 description "BFD augmentation for MPLS-TE."; 2670 container mpls-te { 2671 description "BFD MPLS-TE top level container."; 2673 container egress { 2674 description "Egress configuration."; 2676 uses bfd-types:client-cfg-parms; 2677 uses bfd-types:auth-parms; 2678 } 2680 uses bfd-types:session-statistics-summary; 2681 } 2682 } 2684 augment "/te:te/te:tunnels/te:tunnel" { 2685 description "BFD configuration on MPLS-TE tunnel."; 2687 uses bfd-types:common-cfg-parms; 2689 uses bfd-mpls:encap-cfg; 2690 } 2692 augment "/te:te/te:lsps-state/te:lsp" { 2693 when "/te:te/te:lsps-state/te:lsp/te:origin-type != 'transit'" { 2694 description "BFD information not needed at transit points."; 2695 } 2696 description "BFD state information on MPLS-TE LSP."; 2698 uses bfd-types:all-session; 2700 uses bfd-mpls:mpls-dest-address; 2701 } 2703 /* 2704 * Notifications 2705 */ 2706 notification mpls-te-notification { 2707 description 2708 "Notification for BFD over MPLS-TE session state change. " + 2709 "An implementation may rate-limit notifications, e.g. when a" + 2710 "session is continuously changing state."; 2712 uses bfd-types:notification-parms; 2714 uses bfd-mpls:mpls-dest-address; 2716 leaf tunnel-name { 2717 type string; 2718 description "MPLS-TE tunnel on which BFD was running."; 2719 } 2720 } 2721 } 2723 2725 3. Data Model examples 2727 This section presents some simple and illustrative examples on how to 2728 configure BFD. 2730 3.1. IP single-hop 2732 The following is an example configuration for a BFD IP single-hop 2733 session. The desired transmit interval and the required receive 2734 interval are both set to 10ms. 2736 2737 2738 2739 2740 eth0 2741 2742 ianaift:ethernetCsmacd 2743 2744 2745 2746 2747 2748 2749 2751 bfd-types:bfdv1 2752 2753 name:BFD 2754 2755 2756 2757 2758 eth0 2759 2001:db8:0:113::101 2760 10000 2761 2762 10000 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 3.2. IP multihop 2774 The following is an example configuration for a BFD IP multihop 2775 session group. The desired transmit interval and the required 2776 receive interval are both set to 150ms. 2778 2779 2780 2781 2782 2783 2785 bfd-types:bfdv1 2786 2787 name:BFD 2788 2789 2790 2791 2792 2001:db8:0:113::103 2793 2001:db8:0:114::100 2794 2795 150000 2796 2797 2798 150000 2799 2800 240 2801 2802 2803 2804 2805 2806 2807 2808 2810 3.3. LAG 2812 The following is an example of BFD configuration for a LAG session. 2813 In this case, an interface named "Bundle-Ether1" of interface type 2814 "ieee802eadLag" has a desired transmit and required receive interval 2815 set to 10ms. 2817 2818 2819 2820 2821 Bundle-Ether1 2822 2823 ianaift:ieee8023adLag 2824 2825 2826 2827 2828 2829 2830 2832 bfd-types:bfdv1 2833 2834 name:BFD 2835 2836 2837 2838 2839 Bundle-Ether1 2840 2001:db8:112::16 2841 2842 100000 2843 2844 2845 100000 2846 2847 true 2848 2849 2850 2851 2852 2853 2854 2855 2857 3.4. MPLS 2859 The following is an example of BFD configured for an MPLS LSP. In 2860 this case, the desired transmit and required receive interval set to 2861 250ms. 2863 2864 2865 2866 2867 2868 2870 bfd-types:bfdv1 2871 2872 name:BFD 2873 2874 2875 2876 2877 2001:db8:114::/116 2878 2879 250000 2880 2881 2882 250000 2883 2884 2885 2886 2887 2888 2889 2890 2891 2893 4. Security Considerations 2895 The YANG module specified in this document defines a schema for data 2896 that is designed to be accessed via network management protocols such 2897 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 2898 is the secure transport layer, and the mandatory-to-implement secure 2899 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 2900 is HTTPS, and the mandatory-to-implement secure transport is TLS 2901 [RFC5246]. 2903 The NETCONF access control model [RFC6536] provides the means to 2904 restrict access for particular NETCONF or RESTCONF users to a 2905 preconfigured subset of all available NETCONF or RESTCONF protocol 2906 operations and content. 2908 There are a number of data nodes defined in this YANG module that are 2909 writable/creatable/deletable (i.e., config true, which is the 2910 default). These data nodes may be considered sensitive or vulnerable 2911 in some network environments. Write operations (e.g., edit-config) 2912 to these data nodes without proper protection can have a negative 2913 effect on network operations. These are the subtrees and data nodes 2914 and their sensitivity/vulnerability: 2916 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/ 2917 sessions: the list specifies the IP single-hop BFD sessions. 2919 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/ 2920 sessions: data nodes local-multiplier, desired-min-tx-interval, 2921 required-min-rx-interval, min-interval and authentication all impact 2922 the BFD IP single-hop session. 2924 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/ 2925 session-group: the list specifies the IP multi-hop BFD session 2926 groups. 2928 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/ 2929 session-group: data nodes local-multiplier, desired-min-tx-interval, 2930 required-min-rx-interval, min-interval and authentication all impact 2931 the BFD IP multi-hop session. 2933 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2934 sessions: the list specifies the BFD sessions over LAG. 2936 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2937 sessions: data nodes local-multiplier, desired-min-tx-interval, 2938 required-min-rx-interval, min-interval and authentication all impact 2939 the BFD over LAG session. 2941 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 2942 session-group: the list specifies the session groups for BFD over 2943 MPLS. 2945 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 2946 session-group: data nodes local-multiplier, desired-min-tx-interval, 2947 required-min-rx-interval, min-interval and authentication all impact 2948 the BFD over MPLS LSPs session. 2950 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 2951 egress: data nodes local-multiplier, desired-min-tx-interval, 2952 required-min-rx-interval, min-interval and authentication all impact 2953 the BFD over MPLS LSPs sessions for which this device is an MPLS LSP 2954 egress node. 2956 /te/tunnels/tunnel: data nodes local-multiplier, desired-min-tx- 2957 interval, required-min-rx-interval, min-interval and authentication 2958 all impact the BFD session over the MPLS-TE tunnel. 2960 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls-te/ 2961 egress: data nodes local-multiplier, desired-min-tx-interval, 2962 required-min-rx-interval, min-interval and authentication all impact 2963 the BFD over MPLS-TE sessions for which this device is an MPLS-TE 2964 egress node. 2966 The YANG module has writeable data nodes which can be used for 2967 creation of BFD sessions and modification of BFD session parameters. 2968 The system should "police" creation of BFD sessions to prevent new 2969 sessions from causing existing BFD sessions to fail. For BFD session 2970 modification, the BFD protocol has mechanisms in place which allow 2971 for in service modification. 2973 Some of the readable data nodes in this YANG module may be considered 2974 sensitive or vulnerable in some network environments. It is thus 2975 important to control read access (e.g., via get, get-config, or 2976 notification) to these data nodes. These are the subtrees and data 2977 nodes and their sensitivity/vulnerability: 2979 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/ 2980 summary: access to this information discloses the number of BFD IP 2981 single-hop sessions which are up, down and admin-down. The counters 2982 include BFD sessions for which the user does not have read-access. 2984 /routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/ 2985 summary: access to this information discloses the number of BFD IP 2986 multi-hop sessions which are up, down and admin-down. The counters 2987 include BFD sessions for which the user does not have read-access. 2989 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2990 micro-bfd-ipv4-session-statistics/summary: access to this information 2991 discloses the number of micro BFD IPv4 LAG sessions which are up, 2992 down and admin-down. The counters include BFD sessions for which the 2993 user does not have read-access. 2995 /routing/control-plane-protocols/control-plane-protocol/bfd/lag/ 2996 micro-bfd-ipv6-session-statistics/summary: access to this information 2997 discloses the number of micro BFD IPv6 LAG sessions which are up, 2998 down and admin-down. The counters include BFD sessions for which the 2999 user does not have read-access. 3001 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls/ 3002 summary: access to this information discloses the number of BFD 3003 sessions over MPLS LSPs which are up, down and admin-down. The 3004 counters include BFD sessions for which the user does not have read- 3005 access. 3007 /routing/control-plane-protocols/control-plane-protocol/bfd/mpls-te/ 3008 summary: access to this information discloses the number of BFD 3009 sessions over MPLS-TE which are up, down and admin-down. The 3010 counters include BFD sessions for which the user does not have read- 3011 access. 3013 5. IANA Considerations 3015 This document registers the following namespace URIs in the IETF XML 3016 registry [RFC3688]: 3018 -------------------------------------------------------------------- 3020 URI: urn:ietf:params:xml:ns:yang:iana-bfd-types 3022 Registrant Contact: The IESG. 3024 XML: N/A, the requested URI is an XML namespace. 3026 -------------------------------------------------------------------- 3028 -------------------------------------------------------------------- 3030 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-types 3032 Registrant Contact: The IESG. 3034 XML: N/A, the requested URI is an XML namespace. 3036 -------------------------------------------------------------------- 3038 -------------------------------------------------------------------- 3040 URI: urn:ietf:params:xml:ns:yang:ietf-bfd 3042 Registrant Contact: The IESG. 3044 XML: N/A, the requested URI is an XML namespace. 3046 -------------------------------------------------------------------- 3048 -------------------------------------------------------------------- 3050 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh 3051 Registrant Contact: The IESG. 3053 XML: N/A, the requested URI is an XML namespace. 3055 -------------------------------------------------------------------- 3057 -------------------------------------------------------------------- 3059 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mh 3061 Registrant Contact: The IESG. 3063 XML: N/A, the requested URI is an XML namespace. 3065 -------------------------------------------------------------------- 3067 -------------------------------------------------------------------- 3069 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-lag 3071 Registrant Contact: The IESG. 3073 XML: N/A, the requested URI is an XML namespace. 3075 -------------------------------------------------------------------- 3077 -------------------------------------------------------------------- 3079 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls 3081 Registrant Contact: The IESG. 3083 XML: N/A, the requested URI is an XML namespace. 3085 -------------------------------------------------------------------- 3087 -------------------------------------------------------------------- 3089 URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te 3091 Registrant Contact: The IESG. 3093 XML: N/A, the requested URI is an XML namespace. 3095 -------------------------------------------------------------------- 3097 This document registers the following YANG modules in the YANG Module 3098 Names registry [RFC6020]: 3100 RFC Editor: Replace RFC XXXX with actual RFC number and remove this 3101 note. 3103 -------------------------------------------------------------------- 3105 Name: iana-bfd-types 3107 Namespace: urn:ietf:params:xml:ns:yang:iana-bfd-types 3109 Prefix: iana-bfd-types 3111 Reference: RFC XXXX 3113 -------------------------------------------------------------------- 3115 -------------------------------------------------------------------- 3117 Name: ietf-bfd-types 3119 Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-types 3121 Prefix: bfd-types 3123 Reference: RFC XXXX 3125 -------------------------------------------------------------------- 3127 -------------------------------------------------------------------- 3129 Name: ietf-bfd 3131 Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd 3133 Prefix: bfd 3135 Reference: RFC XXXX 3137 -------------------------------------------------------------------- 3139 -------------------------------------------------------------------- 3141 Name: ietf-bfd-ip-sh 3143 Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh 3145 Prefix: bfd-ip-sh 3147 Reference: RFC XXXX 3148 -------------------------------------------------------------------- 3150 -------------------------------------------------------------------- 3152 Name: ietf-bfd-ip-mh 3154 Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh 3156 Prefix: bfd-ip-mh 3158 Reference: RFC XXXX 3160 -------------------------------------------------------------------- 3162 -------------------------------------------------------------------- 3164 Name: ietf-bfd-lag 3166 Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-lag 3168 Prefix: bfd-lag 3170 Reference: RFC XXXX 3172 -------------------------------------------------------------------- 3174 -------------------------------------------------------------------- 3176 Name: ietf-bfd-mpls 3178 Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls 3180 Prefix: bfd-mpls 3182 Reference: RFC XXXX 3184 -------------------------------------------------------------------- 3186 -------------------------------------------------------------------- 3188 Name: ietf-bfd-mpls-te 3190 Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te 3192 Prefix: bfd-mpls-te 3194 Reference: RFC XXXX 3195 -------------------------------------------------------------------- 3197 5.1. IANA-Maintained iana-bfd-types module 3199 This document defines the initial version of the IANA-maintained 3200 iana-bfd-types YANG module. 3202 The iana-bfd-types YANG module mirrors the "BFD Diagnostic Codes" 3203 registry and "BFD Authentication Types" registry at 3204 https://www.iana.org/assignments/bfd-parameters/bfd-parameters.xhtml. 3205 Whenever that registry changes, IANA must update the iana-bfd-types 3206 YANG module. 3208 6. Acknowledgements 3210 We would also like to thank Nobo Akiya and Jeff Haas for their 3211 encouragement on this work. We would also like to thank Rakesh 3212 Gandhi and Tarek Saad for their help on the MPLS-TE model. We would 3213 also like to thank Acee Lindem for his guidance. 3215 7. References 3217 7.1. Normative References 3219 [I-D.ietf-mpls-base-yang] 3220 Saad, T., Raza, K., Gandhi, R., Liu, X., and V. Beeram, "A 3221 YANG Data Model for MPLS Base", draft-ietf-mpls-base- 3222 yang-06 (work in progress), February 2018. 3224 [I-D.ietf-teas-yang-te] 3225 Saad, T., Gandhi, R., Liu, X., Beeram, V., Shah, H., and 3226 I. Bryskin, "A YANG Data Model for Traffic Engineering 3227 Tunnels and Interfaces", draft-ietf-teas-yang-te-15 (work 3228 in progress), June 2018. 3230 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3231 Requirement Levels", BCP 14, RFC 2119, 3232 DOI 10.17487/RFC2119, March 1997, 3233 . 3235 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3236 DOI 10.17487/RFC3688, January 2004, 3237 . 3239 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 3240 (TLS) Protocol Version 1.2", RFC 5246, 3241 DOI 10.17487/RFC5246, August 2008, 3242 . 3244 [RFC5586] Bocci, M., Ed., Vigoureux, M., Ed., and S. Bryant, Ed., 3245 "MPLS Generic Associated Channel", RFC 5586, 3246 DOI 10.17487/RFC5586, June 2009, 3247 . 3249 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 3250 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 3251 . 3253 [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 3254 (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, 3255 DOI 10.17487/RFC5881, June 2010, 3256 . 3258 [RFC5882] Katz, D. and D. Ward, "Generic Application of 3259 Bidirectional Forwarding Detection (BFD)", RFC 5882, 3260 DOI 10.17487/RFC5882, June 2010, 3261 . 3263 [RFC5883] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 3264 (BFD) for Multihop Paths", RFC 5883, DOI 10.17487/RFC5883, 3265 June 2010, . 3267 [RFC5884] Aggarwal, R., Kompella, K., Nadeau, T., and G. Swallow, 3268 "Bidirectional Forwarding Detection (BFD) for MPLS Label 3269 Switched Paths (LSPs)", RFC 5884, DOI 10.17487/RFC5884, 3270 June 2010, . 3272 [RFC5885] Nadeau, T., Ed. and C. Pignataro, Ed., "Bidirectional 3273 Forwarding Detection (BFD) for the Pseudowire Virtual 3274 Circuit Connectivity Verification (VCCV)", RFC 5885, 3275 DOI 10.17487/RFC5885, June 2010, 3276 . 3278 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 3279 the Network Configuration Protocol (NETCONF)", RFC 6020, 3280 DOI 10.17487/RFC6020, October 2010, 3281 . 3283 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 3284 and A. Bierman, Ed., "Network Configuration Protocol 3285 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 3286 . 3288 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 3289 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 3290 . 3292 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 3293 Protocol (NETCONF) Access Control Model", RFC 6536, 3294 DOI 10.17487/RFC6536, March 2012, 3295 . 3297 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 3298 RFC 6991, DOI 10.17487/RFC6991, July 2013, 3299 . 3301 [RFC7130] Bhatia, M., Ed., Chen, M., Ed., Boutros, S., Ed., 3302 Binderberger, M., Ed., and J. Haas, Ed., "Bidirectional 3303 Forwarding Detection (BFD) on Link Aggregation Group (LAG) 3304 Interfaces", RFC 7130, DOI 10.17487/RFC7130, February 3305 2014, . 3307 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 3308 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 3309 . 3311 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 3312 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 3313 May 2017, . 3315 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 3316 Zhang, "YANG Data Model for Key Chains", RFC 8177, 3317 DOI 10.17487/RFC8177, June 2017, 3318 . 3320 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 3321 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 3322 . 3324 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 3325 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 3326 . 3328 [RFC8344] Bjorklund, M., "A YANG Data Model for IP Management", 3329 RFC 8344, DOI 10.17487/RFC8344, March 2018, 3330 . 3332 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 3333 Routing Management (NMDA Version)", RFC 8349, 3334 DOI 10.17487/RFC8349, March 2018, 3335 . 3337 7.2. Informative References 3339 [I-D.ietf-lime-yang-connectionless-oam] 3340 Kumar, D., Wang, Z., Wu, Q., Rahman, R., and S. Raghavan, 3341 "Generic YANG Data Model for the Management of Operations, 3342 Administration, and Maintenance (OAM) Protocols that use 3343 Connectionless Communications", draft-ietf-lime-yang- 3344 connectionless-oam-18 (work in progress), November 2017. 3346 [I-D.ietf-rtgwg-lne-model] 3347 Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 3348 Liu, "YANG Model for Logical Network Elements", draft- 3349 ietf-rtgwg-lne-model-10 (work in progress), March 2018. 3351 [I-D.ietf-rtgwg-ni-model] 3352 Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 3353 Liu, "YANG Model for Network Instances", draft-ietf-rtgwg- 3354 ni-model-12 (work in progress), March 2018. 3356 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 3357 and R. Wilton, "Network Management Datastore Architecture 3358 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 3359 . 3361 Appendix A. Echo function configuration example 3363 As mentioned in Section 2.1.2, the mechanism to start and stop the 3364 echo function, as defined in [RFC5880] and [RFC5881], is 3365 implementation specific. In this section we provide an example of 3366 how the echo function can be implemented via configuration. 3368 module: example-bfd-echo 3369 augment /rt:routing/rt:control-plane-protocols 3370 /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh 3371 /bfd-ip-sh:sessions: 3372 +--rw echo {bfd-types:echo-mode}? 3373 +--rw desired-min-echo-tx-interval? uint32 3374 +--rw required-min-echo-rx-interval? uint32 3376 A.1. Example YANG module for BFD echo function configuration 3378 module example-bfd-echo { 3379 namespace "tag:example.com,2018:example-bfd-echo"; 3381 prefix "example-bfd-echo"; 3382 import ietf-bfd-types { 3383 prefix "bfd-types"; 3384 } 3386 import ietf-bfd { 3387 prefix "bfd"; 3388 } 3390 import ietf-bfd-ip-sh { 3391 prefix "bfd-ip-sh"; 3392 } 3394 import ietf-routing { 3395 prefix "rt"; 3396 } 3398 organization "IETF BFD Working Group"; 3400 contact 3401 "WG Web: 3402 WG List: 3404 Editors: Reshad Rahman (rrahman@cisco.com), 3405 Lianshu Zheng (vero.zheng@huawei.com), 3406 Mahesh Jethanandani (mjethanandani@gmail.com)"; 3408 description 3409 "This module contains an example YANG augmentation for configuration 3410 of BFD echo function. 3412 Copyright (c) 2018 IETF Trust and the persons 3413 identified as authors of the code. All rights reserved. 3415 Redistribution and use in source and binary forms, with or 3416 without modification, is permitted pursuant to, and subject 3417 to the license terms contained in, the Simplified BSD License 3418 set forth in Section 4.c of the IETF Trust's Legal Provisions 3419 Relating to IETF Documents 3420 (http://trustee.ietf.org/license-info). 3422 This version of this YANG module is part of RFC XXXX; see 3423 the RFC itself for full legal notices."; 3425 revision 2018-06-21 { 3426 description "Initial revision."; 3427 reference 3428 "RFC XXXX: A YANG data model example augmentation for BFD echo 3429 function"; 3431 } 3433 // RFC Ed.: replace XXXX with actual RFC number and remove this 3434 // note 3436 /* 3437 * Groupings 3438 */ 3439 grouping echo-cfg-parms { 3440 description "BFD grouping for echo config parameters"; 3441 leaf desired-min-echo-tx-interval { 3442 type uint32; 3443 units microseconds; 3444 default 0; 3445 description 3446 "This is the minimum interval that the local system would like 3447 to use when transmitting BFD echo packets. If 0, the echo 3448 function as defined in BFD [RFC5880] is disabled."; 3449 } 3451 leaf required-min-echo-rx-interval { 3452 type uint32; 3453 units microseconds; 3454 default 0; 3455 description 3456 "This is the Required Min Echo RX Interval as defined in BFD 3457 [RFC5880]."; 3458 } 3459 } 3461 augment "/rt:routing/rt:control-plane-protocols/" 3462 + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/" 3463 + "bfd-ip-sh:sessions" { 3464 description "Augmentation for BFD echo function."; 3466 container echo { 3467 if-feature bfd-types:echo-mode; 3469 description "BFD echo function container"; 3471 uses echo-cfg-parms; 3472 } 3473 } 3474 } 3475 Appendix B. Change log 3477 RFC Editor: Remove this section upon publication as an RFC. 3479 B.1. Changes between versions -15 and -16 3481 o Added list of modules for YANG module registry. 3483 B.2. Changes between versions -14 and -15 3485 o Added missing ietf-bfd-types in XML registry. 3487 B.3. Changes between versions -13 and -14 3489 o Addressed missing/incorrect references in import statements. 3491 B.4. Changes between versions -12 and -13 3493 o Updated references for drafts which became RFCs recently. 3495 B.5. Changes between versions -11 and -12 3497 o Addressed comments from YANG Doctor review of rev11. 3499 B.6. Changes between versions -10 and -11 3501 o Added 2 examples. 3503 o Added a container around some lists. 3505 o Fixed some indentation nits. 3507 B.7. Changes between versions -09 and -10 3509 o Addressed comments from YANG Doctor review. 3511 o Addressed comments from WGLC. 3513 B.8. Changes between versions -08 and -09 3515 o Mostly cosmetic changes to abide by draft-ietf-netmod-rfc6087bis. 3517 o Specified yang-version 1.1. 3519 o Added data model examples. 3521 o Some minor changes. 3523 B.9. Changes between versions -07 and -08 3525 o Timer intervals in client-cfg-parms are not mandatory anymore. 3527 o Added list of interfaces under "ip-sh" node for authentication 3528 parameters. 3530 o Renamed replay-protection to meticulous. 3532 B.10. Changes between versions -06 and -07 3534 o New ietf-bfd-types module. 3536 o Grouping for BFD clients to have BFD multiplier and interval 3537 values. 3539 o Change in ietf-bfd-mpls-te since MPLS-TE model changed. 3541 o Removed bfd- prefix from many names. 3543 B.11. Changes between versions -05 and -06 3545 o Adhere to NMDA-guidelines. 3547 o Echo function config moved to appendix as example. 3549 o Added IANA YANG modules. 3551 o Addressed various comments. 3553 B.12. Changes between versions -04 and -05 3555 o "bfd" node in augment of control-plane-protocol. 3557 o Removed augment of network-instance. Replaced by schema-mount. 3559 o Added information on interaction with other YANG modules. 3561 B.13. Changes between versions -03 and -04 3563 o Updated author information. 3565 o Fixed YANG compile error in ietf-bfd-lag.yang which was due to 3566 incorrect when statement. 3568 B.14. Changes between versions -02 and -03 3570 o Fixed YANG compilation warning due to incorrect revision date in 3571 ietf-bfd-ip-sh module. 3573 B.15. Changes between versions -01 and -02 3575 o Replace routing-instance with network-instance from YANG Network 3576 Instances [I-D.ietf-rtgwg-ni-model] 3578 B.16. Changes between versions -00 and -01 3580 o Remove BFD configuration parameters from BFD clients, all BFD 3581 configuration parameters in BFD 3583 o YANG module split in multiple YANG modules (one per type of 3584 forwarding path) 3586 o For BFD over MPLS-TE we augment MPLS-TE model 3588 o For BFD authentication we now use YANG Data Model for Key Chains 3589 [RFC8177] 3591 Authors' Addresses 3593 Reshad Rahman (editor) 3594 Cisco Systems 3595 Canada 3597 Email: rrahman@cisco.com 3599 Lianshu Zheng (editor) 3600 Huawei Technologies 3601 China 3603 Email: vero.zheng@huawei.com 3605 Mahesh Jethanandani (editor) 3606 Xoriant Corporation 3607 1248 Reamwood Ave 3608 Sunnyvale, California 94089 3609 USA 3611 Email: mjethanandani@gmail.com 3612 Santosh Pallagatti 3613 India 3615 Email: santosh.pallagatti@gmail.com 3617 Greg Mirsky 3618 ZTE Corporation 3620 Email: gregimirsky@gmail.com