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";
}
import ietf-routing-types {
prefix "rt-types";
}
import ietf-interfaces {
prefix "if";
}
import ietf-routing {
prefix "rt";
}
import ietf-pim-base {
prefix "pim-base";
}
import ietf-pim-rp {
prefix "pim-rp";
}
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
"The YANG module defines a PIM (Protocol Independent Multicast)
BIDIR (Bidirectional) mode model.
Copyright (c) 2018 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 Simplified 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 XXXX; see the
RFC itself for full legal notices.";
revision 2018-02-29 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for PIM.
RFC5015: Bidirectional Protocol Independent Multicast
(BIDIR-PIM).";
}
/*
* Features
*/
feature intf-df-election {
description
"Support configuration of interface DF election.";
reference
"RFC5015: Bidirectional Protocol Independent Multicast
(BIDIR-PIM). Sec. 3.5.";
}
/*
* Identities
*/
identity rp-bidir {
base pim-rp:rp-mode;
description
"BIDIR (Bidirectional) mode.";
}
identity df-state {
description
"DF (Designated Forwarder) election state type.";
reference
"RFC5015: 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
"There either is a different election winner or that 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 (Bidirectional) attributes for
static RP (Rendezvous-Point).";
container bidir {
presence
"Indicate the support of 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 date nodes
*/
augment "/rt:routing/rt:control-plane-protocols/"
+ "pim-base:pim/pim-base:address-family" {
description "PIM BIDIR (Bidirectional) 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 number of transmission attempts for DF election
messages.
When a DF election Offer or Winner message fails to be
received, the message is retransmitted.
The 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 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 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 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 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 address of the RP.";
}
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
}