module ietf-pim-bidir {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-pim-bidir";
prefix pim-bidir;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-routing-types {
prefix rt-types;
reference
"RFC 8294: Common YANG Data Types for the Routing Area";
}
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
import ietf-routing {
prefix rt;
reference
"RFC 8349: A YANG Data Model for Routing Management (NMDA
Version)";
}
import ietf-pim-base {
prefix pim-base;
reference
"RFC 9128: A YANG Data Model for Protocol Independent
Multicast (PIM)";
}
import ietf-pim-rp {
prefix pim-rp;
reference
"RFC 9128: A YANG Data Model for Protocol Independent
Multicast (PIM)";
}
organization
"IETF PIM Working Group";
contact
"WG Web:
WG List:
Editor: Xufeng Liu
Editor: Pete McAllister
Editor: Anish Peter
Editor: Mahesh Sivakumar
Editor: Yisong Liu
Editor: Fangwei Hu
";
description
"This YANG module defines a PIM (Protocol Independent Multicast)
BIDIR (Bidirectional) mode model.
Copyright (c) 2022 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9128; see the
RFC itself for full legal notices.";
revision 2022-10-19 {
description
"Initial revision.";
reference
"RFC 9128: A YANG Data Model for Protocol Independent
Multicast (PIM)";
}
/*
* Features
*/
feature intf-df-election {
description
"Supports configuration of interface DF election.";
reference
"RFC 5015: Bidirectional Protocol Independent Multicast
(BIDIR-PIM), Section 3.5";
}
/*
* Identities
*/
identity rp-bidir {
base pim-rp:rp-mode;
description
"BIDIR mode.";
}
identity df-state {
description
"DF (Designated Forwarder) election state type.";
reference
"RFC 5015: Bidirectional Protocol Independent Multicast
(BIDIR-PIM)";
}
identity df-state-offer {
base df-state;
description
"Initial election state. When in the Offer state, a router
thinks it can eventually become the winner and periodically
generates Offer messages.";
}
identity df-state-lose {
base df-state;
description
"Either (1) there is a different election winner or
(2) no router on the link has a path to the RPA
(Rendezvous Point Address).";
}
identity df-state-win {
base df-state;
description
"The router is the acting DF without any contest.";
}
identity df-state-backoff {
base df-state;
description
"The router is the acting DF, but another router has made a
bid to take over.";
}
/*
* Groupings
*/
grouping static-rp-bidir-container {
description
"Grouping that contains BIDIR attributes for a static RP
(Rendezvous Point).";
container bidir {
presence "Indicates support for BIDIR mode.";
description
"PIM-BIDIR configuration data.";
uses pim-rp:static-rp-attributes;
} // bidir
} // static-rp-bidir-container
grouping interface-df-election-state-attributes {
description
"Grouping that contains the state attributes of a DF election
on an interface.";
leaf interface-state {
type identityref {
base df-state;
}
description
"Interface state with respect to the DF election.";
}
leaf up-time {
type rt-types:timeticks64;
description
"The number of time ticks (hundredths of a second) since the
current DF has been elected as the winner.";
}
leaf winner-metric {
type uint32;
description
"The unicast routing metric used by the DF to reach the RP.
The value is announced by the DF.";
}
leaf winner-metric-preference {
type uint32;
description
"The preference value assigned to the unicast routing
protocol that the DF used to obtain the route to the RP.
The value is announced by the DF.";
}
} // interface-df-election-state-attributes
/*
* Configuration data and operational state data nodes
*/
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:address-family" {
description
"PIM-BIDIR augmentation.";
container bidir {
presence "Present to enable BIDIR mode.";
description
"PIM-BIDIR configuration data.";
} // bidir
} // augment
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:interfaces/pim-base:interface/"
+ "pim-base:address-family" {
description
"PIM-BIDIR augmentation.";
container bidir {
presence "Present to enable BIDIR mode.";
description
"PIM-BIDIR configuration data.";
container df-election {
if-feature "intf-df-election";
description
"DF election attributes.";
leaf offer-interval {
type uint16;
units "milliseconds";
default "100";
description
"Offer interval. Specifies the interval between
repeated DF election messages.";
}
leaf backoff-interval {
type uint16;
units "milliseconds";
default "1000";
description
"This is the interval that the acting DF waits between
receiving a better DF Offer and sending the Pass message
to transfer DF responsibility.";
}
leaf offer-multiplier {
type uint8;
default "3";
description
"This is the number of transmission attempts for
DF election messages.
When a DF election Offer or Winner message fails to be
received, the message is retransmitted.
'offer-multiplier' sets the minimum number of DF
election messages that must fail to be received for DF
election to fail.
If a router receives from a neighbor a better offer than
its own, the router stops participating in the election
for a period of 'offer-multiplier' * 'offer-interval'.
Eventually, all routers except the best candidate stop
sending Offer messages.";
}
} // df-election
} // bidir
} // augment
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:address-family/pim-rp:rp/"
+ "pim-rp:static-rp/pim-rp:ipv4-rp" {
description
"PIM-BIDIR augmentation.";
uses static-rp-bidir-container;
} // augment
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:address-family/pim-rp:rp/"
+ "pim-rp:static-rp/pim-rp:ipv6-rp" {
description
"PIM-BIDIR augmentation.";
uses static-rp-bidir-container;
} // augment
/*
* Operational state data nodes
*/
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:address-family/pim-rp:rp" {
description
"PIM-BIDIR augmentation to RP state data.";
container bidir {
config false;
description
"PIM-BIDIR state data.";
container df-election {
description
"DF election data.";
list ipv4-rp {
when "../../../../pim-base:address-family = 'rt:ipv4'" {
description
"Only applicable to an IPv4 address family.";
}
key "rp-address";
description
"A list of IPv4 RP addresses.";
leaf rp-address {
type inet:ipv4-address;
description
"The address of the RP.";
}
} // ipv4-rp
list ipv6-rp {
when "../../../../pim-base:address-family = 'rt:ipv6'" {
description
"Only applicable to an IPv6 address family.";
}
key "rp-address";
description
"A list of IPv6 RP addresses.";
leaf rp-address {
type inet:ipv6-address;
description
"The address of the RP.";
}
} // ipv6-rp
} // df-election
container interface-df-election {
description
"Interface DF election data.";
list ipv4-rp {
when "../../../../pim-base:address-family = 'rt:ipv4'" {
description
"Only applicable to an IPv4 address family.";
}
key "rp-address interface-name";
description
"A list of IPv4 RP addresses.";
leaf rp-address {
type inet:ipv4-address;
description
"The address of the RP.";
}
leaf interface-name {
type if:interface-ref;
description
"The name of the interface for which the DF state is
being maintained.";
}
leaf df-address {
type inet:ipv4-address;
description
"The address of the elected DF, which is the winner of
the DF election process.";
}
uses interface-df-election-state-attributes;
} // ipv4-rp
list ipv6-rp {
when "../../../../pim-base:address-family = 'rt:ipv6'" {
description
"Only applicable to an IPv6 address family.";
}
key "rp-address interface-name";
description
"A list of IPv6 RP addresses.";
leaf rp-address {
type inet:ipv6-address;
description
"The address of the RP.";
}
leaf interface-name {
type if:interface-ref;
description
"The name of the interface for which the DF state is
being maintained.";
}
leaf df-address {
type inet:ipv6-address;
description
"DF address.";
}
uses interface-df-election-state-attributes;
} // ipv6-rp
} // interface-df-election
}
} // augment
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:interfaces/pim-base:interface/"
+ "pim-base:address-family/pim-base:neighbors/"
+ "pim-base:ipv4-neighbor" {
description
"PIM-BIDIR augmentation to the IPv4 neighbor state data.";
leaf bidir-capable {
type boolean;
description
"'true' if the neighbor is using the Bidirectional Capable
option in the last Hello message.";
}
} // augment
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:interfaces/pim-base:interface/"
+ "pim-base:address-family/pim-base:neighbors/"
+ "pim-base:ipv6-neighbor" {
description
"PIM-BIDIR augmentation to the IPv6 neighbor state data.";
leaf bidir-capable {
type boolean;
description
"'true' if the neighbor is using the Bidirectional Capable
option in the last Hello message.";
}
} // augment
}