module: ietf-bfd-unsolicited augment /rt:routing/rt:control-plane-protocols /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh: +--rw unsolicited? +--rw local-multiplier? multiplier +--rw (interval-config-type)? +--:(tx-rx-intervals) | +--rw desired-min-tx-interval? uint32 | +--rw required-min-rx-interval? uint32 +--:(single-interval) {single-minimum-interval}? +--rw min-interval? uint32 augment /rt:routing/rt:control-plane-protocols /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh /bfd-ip-sh:interfaces: +--rw unsolicited +--rw enabled? boolean +--rw local-multiplier? bfd-types:multiplier {bfd-unsol:unsolicited-params-per-interface}? +--rw (interval-config-type)? {bfd-unsol:unsolicited-params-per-interface}? +--:(tx-rx-intervals) | +--rw desired-min-tx-interval? uint32 | +--rw required-min-rx-interval? uint32 +--:(single-interval) {bfd-types:single-minimum-interval}? +--rw min-interval? uint32 augment /rt:routing/rt:control-plane-protocols /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh /bfd-ip-sh:sessions/bfd-ip-sh:session: +--ro role? bfd-unsol:role
module ietf-bfd-unsolicited { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-unsolicited"; prefix bfd-unsol; import ietf-bfd-types { prefix bfd-types; reference "RFC 9314: YANG Data Model for Bidirectional Forwarding Detection (BFD)"; } import ietf-bfd { prefix bfd; reference "RFC 9314: YANG Data Model for Bidirectional Forwarding Detection (BFD)"; } import ietf-bfd-ip-sh { prefix bfd-ip-sh; reference "RFC 9314: YANG Data Model for Bidirectional Forwarding Detection (BFD)"; } import ietf-routing { prefix rt; reference "RFC 8349: A YANG Data Model for Routing Management (NMDA Version)"; } organization "IETF BFD Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/bfd/> WG List: <rtg-bfd@ietf.org> Editors: Enke Chen (enchen@paloaltonetworks.com), Naiming Shen (naiming@zededa.com), Robert Raszuk (robert@raszuk.net), Reshad Rahman (reshad@yahoo.com)"; description "This module contains the YANG definition for unsolicited BFD, as per RFC 9468. Copyright (c) 2023 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 9468; see the RFC itself for full legal notices."; reference "RFC 9468: Unsolicited Bidirectional Forwarding Detection (BFD) for Sessionless Applications"; revision 2023-08-31 { description "Initial revision."; reference "RFC 9468: Unsolicited Bidirectional Forwarding Detection (BFD) for Sessionless Applications"; } /* * Feature definitions */ feature unsolicited-params-per-interface { description "This feature indicates that the server supports per-interface parameters for unsolicited sessions."; reference "RFC 9468: Unsolicited Bidirectional Forwarding Detection (BFD) for Sessionless Applications"; } /* * Type Definitions */ identity role { description "Base identity from which all roles are derived. Role of local system during BFD session initialization."; } identity active { base bfd-unsol:role; description "Active role."; reference "RFC 5880: Bidirectional Forwarding Detection (BFD), Section 6.1"; } identity passive { base bfd-unsol:role; description "Passive role."; reference "RFC 5880: Bidirectional Forwarding Detection (BFD), Section 6.1"; } /* * Augments */ augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh" { description "Augmentation for unsolicited BFD parameters."; container unsolicited { description "BFD IP single-hop unsolicited top-level container."; uses bfd-types:base-cfg-parms; } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/" + "bfd-ip-sh:interfaces" { description "Augmentation for unsolicited BFD on IP single-hop interface."; container unsolicited { description "BFD IP single-hop interface unsolicited top-level container."; leaf enabled { type boolean; default "false"; description "Unsolicited BFD is enabled on this interface."; } /* * The following is the same as bfd-types:base-cfg-parms, but * without default values (for inheritance) */ leaf local-multiplier { if-feature "bfd-unsol:unsolicited-params-per-interface"; type bfd-types:multiplier; description "Multiplier transmitted by the local system. Defaults to ../../unsolicited/local-multiplier. A multiplier configured under an interface takes precedence over the multiplier configured at the global level."; } choice interval-config-type { if-feature "bfd-unsol:unsolicited-params-per-interface"; description "Two interval values or one value used for both transmit and receive. Defaults to ../../unsolicited/interval-config-type. An interval configured under an interface takes precedence over any interval configured at the global level."; case tx-rx-intervals { leaf desired-min-tx-interval { type uint32; units "microseconds"; description "Desired minimum transmit interval of control packets."; } leaf required-min-rx-interval { type uint32; units "microseconds"; description "Required minimum receive interval of control packets."; } } case single-interval { if-feature "bfd-types:single-minimum-interval"; leaf min-interval { type uint32; units "microseconds"; description "Desired minimum transmit interval and required minimum receive interval of control packets."; } } } } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/" + "bfd-ip-sh:sessions/bfd-ip-sh:session" { description "Augmentation for unsolicited BFD on IP single-hop session."; leaf role { type identityref { base bfd-unsol:role; } config false; description "Role."; } } }
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>eth0</name> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> ianaift:ethernetCsmacd</type> </interface> <interface> <name>eth1</name> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> ianaift:ethernetCsmacd</type> </interface> </interfaces> <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> <control-plane-protocols> <control-plane-protocol> <type xmlns:bfd-types= "urn:ietf:params:xml:ns:yang:ietf-bfd-types"> bfd-types:bfdv1</type> <name>name:BFD</name> <bfd xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd"> <ip-sh xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh"> <unsolicited> <local-multiplier>2</local-multiplier> <min-interval>50000</min-interval> </unsolicited> <interfaces> <interface>eth0</interface> <unsolicited> <enabled>true</enabled> <local-multiplier>3</local-multiplier> <min-interval>250000</min-interval> </unsolicited> </interfaces> <interfaces> <interface>eth1</interface> <unsolicited> <enabled>true</enabled> </unsolicited> </interfaces> </ip-sh> </bfd> </control-plane-protocol> </control-plane-protocols> </routing> </config>