module ietf-pim-rp {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-pim-rp";
prefix pim-rp;
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";
}
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)
RP (Rendezvous Point) 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-04-16 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for PIM";
}
/*
* Features
*/
feature bsr {
description
"This feature indicates that the system supports BSR
(Bootstrap Router).";
reference
"RFC5059: Bootstrap Router (BSR) Mechanism for Protocol
Independent Multicast (PIM).";
}
feature bsr-election-state {
if-feature bsr;
description
"This feature indicates that the system supports providing
BSR election state.";
reference
"RFC5059: Bootstrap Router (BSR) Mechanism for Protocol
Independent Multicast (PIM).";
}
feature static-rp-override {
description
"This feature indicates that the system supports configuration
of static RP (Rendezvous Point) override.";
reference
"RFC7761: Protocol Independent Multicast - Sparse Mode
(PIM-SM): Protocol Specification (Revised). Sec. 3.7.";
}
feature candidate-interface {
description
"This feature indicates that the system supports using
an interface to configure a BSR or RP candidate.";
}
feature candidate-ipv4 {
description
"This feature indicates that the system supports using
an IPv4 address to configure a BSR or RP candidate.";
}
feature candidate-ipv6 {
description
"This feature indicates that the system supports using
an IPv6 address to configure a BSR or RP candidate.";
}
/*
* Typedefs
*/
typedef rp-event-type {
type enumeration {
enum invalid-jp {
description
"An invalid JP (Join/Prune) message has been received.";
}
enum invalid-register {
description
"An invalid register message has been received.";
}
enum mapping-created {
description
"A new mapping has been created.";
}
enum mapping-deleted {
description
"A mapping has been deleted.";
}
}
description "Operational status event type for notifications.";
}
/*
* Identities
*/
identity rp-mode {
description
"The mode of an RP, which can be SM (Sparse Mode) or
BIDIR (bi-directional).";
}
identity rp-info-source-type {
description
"The information source of an RP.";
}
identity static {
base rp-info-source-type;
description
"The RP is statically configured.";
}
identity bootstrap {
base rp-info-source-type;
description
"The RP is learned from bootstrap.";
}
/*
* Groupings
*/
grouping rp-mapping-state-attributes {
description
"Grouping of RP mapping attributes.";
leaf up-time {
type rt-types:timeticks64;
description
"The number of time ticks (hundredths of a second) since
the RP mapping or the RP became actively available.";
}
leaf expiration {
type rt-types:timer-value-seconds16;
description "Expiration time.";
}
} // rp-mapping-state-attributes
grouping rp-state-attributes {
description
"Grouping of RP state attributes.";
leaf info-source-type {
type identityref {
base rp-info-source-type;
}
description "The information source of an RP.";
} // info-source-type
leaf up-time {
type rt-types:timeticks64;
description
"The number of time ticks (hundredths of a second) since
the RP became actively available.";
}
leaf expiration {
type rt-types:timer-value-seconds16;
description "Expiration time.";
}
} // rp-state-attributes
grouping static-rp-attributes {
description
"Grouping of static RP attributes, used in augmenting
modules.";
leaf policy-name {
type string;
description
"The string value is the name to uniquely identify a
policy that contains one or more policy rules used to
determine which multicast group addresses are mapped
to this statically configured RP address.
If a policy is not specified, the entire multicast address
space is mapped.
The definition of such a policy is outside the scope
of this document.";
}
leaf override {
if-feature static-rp-override;
type boolean;
default false;
description
"When there is a conflict between static RP and dynamic
RP, setting this attribute to 'true' will ask the
system to use static RP.";
}
} // static-rp-attributes
grouping rp-candidate-attributes {
description
"Grouping of RP candidate attributes.";
leaf policy-name {
type string;
description
"The string value is the name to uniquely identify a
policy that contains one or more policy rules used to
accept or reject certain multicast groups.
If a policy is not specified, the entire multicast address
space is accepted.
The definition of such a policy is outside the scope
of this document.";
}
leaf mode {
type identityref {
base rp-mode;
}
description
"The mode of an RP, which can be SM (Sparse Mode) or BIDIR
(bi-directional), each of them is defined in a saparate YNAG
module. If a system supports an RP mode, the corresponding
YANG module is implemented.
When the value of this leaf is not specified, the default
value is the supported mode if only one mode is implemented,
or the default value is SM (Sparce Mode) if both SM and
BIDIR are implemented.";
}
} // rp-candidate-attributes
/*
* Configuration data nodes
*/
augment "/rt:routing/rt:control-plane-protocols/pim-base:pim/"
+ "pim-base:address-family" {
description "PIM RP augmentation.";
container rp {
description
"PIM RP configuration data.";
container static-rp {
description
"Containing static RP attributes.";
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
"Specifies a static RP address.";
}
}
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
"Specifies a static RP address.";
}
}
} // static-rp
container bsr {
if-feature bsr;
description
"Containing BSR (BootStrap Router) attributes.";
container bsr-candidate {
presence
"Present to serve as a BSR candidate";
description
"BSR candidate attributes.";
choice interface-or-address {
description
"Use either interface or ip-address.";
case interface {
if-feature candidate-interface;
leaf interface {
type if:interface-ref;
mandatory true;
description
"Interface to be used by BSR.";
}
}
case ipv4-address {
when "../../../pim-base:address-family = 'rt:ipv4'" {
description
"Only applicable to IPv4 address family.";
}
if-feature candidate-ipv4;
leaf ipv4-address {
type inet:ipv4-address;
mandatory true;
description
"IP address to be used by BSR.";
}
}
case ipv6-address {
when "../../../pim-base:address-family = 'rt:ipv6'" {
description
"Only applicable to IPv6 address family.";
}
if-feature candidate-ipv6;
leaf ipv6-address {
type inet:ipv6-address;
mandatory true;
description
"IP address to be used by BSR.";
}
}
}
leaf hash-mask-length{
type uint8 {
range "0..128";
}
mandatory true;
description
"Value contained in BSR messages used by all routers to
hash (map) to an RP.";
}
leaf priority {
type uint8 {
range "0..255";
}
default 64;
description
"BSR election priority among different candidate BSRs.
A larger value has a higher priority over a smaller
value.";
}
} // bsr-candidate
container rp-candidate {
description
"Containing RP candidate attributes.";
list interface {
if-feature candidate-interface;
key "name";
description
"A list of RP candidates";
leaf name {
type if:interface-ref;
description
"Interface that the RP candidate uses.";
}
uses rp-candidate-attributes;
}
list ipv4-address {
when "../../../../pim-base:address-family = 'rt:ipv4'" {
description
"Only applicable to IPv4 address family.";
}
if-feature candidate-ipv4;
key "address";
description
"A list of RP candidate addresses.";
leaf address {
type inet:ipv4-address;
description
"IPv4 address that the RP candidate uses.";
}
uses rp-candidate-attributes;
}
list ipv6-address {
when "../../../../pim-base:address-family = 'rt:ipv6'" {
description
"Only applicable to IPv6 address family.";
}
if-feature candidate-ipv6;
key "address";
description
"A list of RP candidate addresses.";
leaf address {
type inet:ipv6-address;
description
"IPv6 address that the RP candidate uses.";
}
uses rp-candidate-attributes;
}
}
// BSR state attributes.
container bsr {
config false;
description
"BSR information.";
leaf address {
type inet:ip-address;
description "BSR address";
}
leaf hash-mask-length {
type uint8 {
range "0..128";
}
description "Hash mask length.";
}
leaf priority {
type uint8 {
range "0..255";
}
description "Priority.";
}
leaf up-time {
type rt-types:timeticks64;
description
"The number of time ticks (hundredths of a second)
since the BSR became up.";
}
}
choice election-state {
if-feature bsr-election-state;
config false;
description "BSR election state.";
case candidate {
leaf candidate-bsr-state {
type enumeration {
enum "candidate" {
description
"The router is a candidate to be the BSR for the
scope zone, but currently another router is the
preferred BSR.";
}
enum "pending" {
description
"The router is a candidate to be the BSR for the
scope zone. Currently, no other router is the
preferred BSR, but this router is not yet the
elected BSR. This is a temporary state that
prevents rapid thrashing of the choice of BSR
during BSR election.";
}
enum "elected" {
description
"The router is the elected BSR for the scope zone
and it must perform all the BSR functions.";
}
}
description
"Candidate-BSR state.";
reference
"RFC5059, Section 3.1.1.";
}
}
case "non-candidate" {
leaf non-candidate-bsr-state {
type enumeration {
enum "no-info" {
description
"The router has no information about this scope
zone.";
}
enum "accept-any" {
description
"The router does not know of an active BSR, and
will accept the first Bootstrap message it sees
as giving the new BSR's identity and the
RP-Set.";
}
enum "accept" {
description
"The router knows the identity of the current
BSR, and is using the RP-Set provided by that
BSR. Only Bootstrap messages from that BSR or
from a Candidate-BSR (C-BSR) with higher weight
than the current BSR will be accepted.";
}
}
description
"Non-candidate-BSR state.";
reference
"RFC5059, Section 3.1.2.";
}
}
} // election-state
leaf bsr-next-bootstrap {
type uint16;
units seconds;
config false;
description
"The remaining time interval in seconds until the next
bootstrap will be sent.";
}
container rp {
config false;
description
"State information of the RP.";
leaf rp-address {
type inet:ip-address;
description "RP address.";
}
leaf policy-name {
type string;
description
"The string value is the name to uniquely identify a
policy that contains one or more policy rules used to
accept or reject certain multicast groups.
If a policy is not specified, the entire multicast
address space is accepted.
The definition of such a policy is outside the scope
of this document.";
}
leaf up-time {
type rt-types:timeticks64;
description
"The number of time ticks (hundredths of a second)
since the RP became actively available.";
}
}
leaf rp-candidate-next-advertisement {
type uint16;
units seconds;
config false;
description
"The remaining time interval in seconds until the next
RP candidate advertisement will be sent.";
}
} // bsr
container rp-list {
config false;
description
"Containing a list of RPs.";
list ipv4-rp {
when "../../../pim-base:address-family = 'rt:ipv4'" {
description
"Only applicable to IPv4 address family.";
}
key "rp-address mode";
description
"A list of IPv4 RP addresses.";
leaf rp-address {
type inet:ipv4-address;
description
"RP address.";
}
leaf mode {
type identityref {
base rp-mode;
}
description
"RP mode.";
}
leaf info-source-address {
type inet:ipv4-address;
description
"The address where RP information is learned.";
}
uses rp-state-attributes;
}
list ipv6-rp {
when "../../../pim-base:address-family = 'rt:ipv6'" {
description
"Only applicable to IPv6 address family.";
}
key "rp-address mode";
description
"A list of IPv6 RP addresses.";
leaf rp-address {
type inet:ipv6-address;
description
"RP address.";
}
leaf mode {
type identityref {
base rp-mode;
}
description
"RP mode.";
}
leaf info-source-address {
type inet:ipv6-address;
description
"The address where RP information is learned.";
}
uses rp-state-attributes;
}
} // rp-list
container rp-mappings {
config false;
description
"Containing a list of group-to-RP mappings.";
list ipv4-rp {
when "../../../pim-base:address-family = 'rt:ipv4'" {
description
"Only applicable to IPv4 address family.";
}
key "group-range rp-address";
description
"A list of group-to-RP mappings.";
leaf group-range {
type inet:ipv4-prefix;
description
"Group range presented in the format of prefix.";
}
leaf rp-address {
type inet:ipv4-address;
description
"RP address.";
}
uses rp-mapping-state-attributes;
}
list ipv6-rp {
when "../../../pim-base:address-family = 'rt:ipv6'" {
description
"Only applicable to IPv6 address family.";
}
key "group-range rp-address";
description
"A list of IPv6 RP addresses.";
leaf group-range {
type inet:ipv6-prefix;
description
"Group range presented in the format of prefix.";
}
leaf rp-address {
type inet:ipv6-address;
description
"RP address.";
}
uses rp-mapping-state-attributes;
}
} // rp-mappings
} // rp
} // augment
/*
* Notifications
*/
notification pim-rp-event {
description "Notification event for RP.";
leaf event-type {
type rp-event-type;
description "Event type.";
}
uses pim-base:pim-instance-af-state-ref;
leaf group {
type rt-types:ip-multicast-group-address;
description "Group address.";
}
leaf rp-address {
type inet:ip-address;
description "RP address.";
}
leaf is-rpt {
type boolean;
description "'true' if the tree is RPT (RP-Tree).";
}
leaf mode {
type identityref {
base pim-base:pim-mode;
}
description "PIM mode.";
}
leaf message-origin {
type inet:ip-address;
description "Where the message is originated.";
}
}
}