module ietf-msdp {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-msdp";
prefix msdp;
import ietf-yang-types {
prefix "yang";
reference "RFC6991";
}
import ietf-inet-types {
prefix "inet";
reference "RFC6991";
}
import ietf-routing {
prefix "rt";
reference "RFC8022";
}
import ietf-interfaces {
prefix "if";
reference "RFC7223";
}
import ietf-ip {
prefix "ip";
reference "RFC7277";
}
import ietf-key-chain {
prefix "key-chain";
reference "RFC8177";
}
import ietf-routing-types {
prefix "rt-types";
reference "RFC8294";
}
organization
"IETF PIM(Protocols for IP Multicast) Working Group";
contact
"WG Web:
WG List:
Editor: Xufeng Liu
Editor: Zheng Zhang
Editor: Anish Peter
Editor: Mahesh Sivakumar
Editor: Feng Guo
Editor: Pete McAllister
";
description
"The module defines the YANG definitions for MSDP.
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 3618; see
the RFC itself for full legal notices.";
revision 2018-10-20 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for MSDP.
RFC 3618: Multicast Source Discovery Protocol (MSDP).
RFC 4624: Multicast Source Discovery Protocol (MSDP) MIB";
}
/*
* Features
*/
feature global-tcp-connect-source {
description
"Support configuration of global tcp connect source.";
}
feature global-default-peer {
description
"Support configuration of global default peer.";
}
feature global-default-peer-policy {
description
"Support policy configuration of global default peer.";
}
feature global-sa-filter {
description
"Support configuration of global SA filter.";
}
feature global-sa-limit {
description
"Support configuration of global limit on SA entries.";
}
feature global-ttl-threshold {
description
"Support configuration of global TTL threshold.";
}
feature rpc-clear-sa-cache {
description
"Support the RPC to clear SA cache.";
}
feature peer-admin-enable {
description
"Support configuration of peer administrative enabling.";
}
feature peer-as {
description
"Support configuration of peer AS number.";
}
feature peer-tcp-connect-source {
description
"Support configuration of peer tcp connect source.";
}
feature peer-description {
description
"Support configuration of peer description.";
}
feature peer-key-chain {
description
"Support configuration of peer key-chain.";
}
feature peer-password {
description
"Support configuration of peer password.";
}
feature peer-sa-limit {
description
"Support configuration of per peer limit on SA entries.";
}
/*
* Groupings
*/
grouping authentication-container {
description
"Authentication attributes.";
container authentication {
description
"A container defining authentication attributes.";
choice authentication-type {
case key-chain {
if-feature peer-key-chain;
leaf key-chain {
type key-chain:key-chain-ref;
description
"Reference to a key-chain.";
}
}
case password {
leaf key {
type string;
description
"This leaf describes the authentication key.";
}
leaf crypto-algorithm {
type identityref {
base key-chain:crypto-algorithm;
}
description
"Cryptographic algorithm associated with key.";
}
}
description
"Choice of authentication.";
}
}
} // authentication-container
grouping tcp-connect-source {
description
"Attribute to configure peer TCP connection source.";
leaf tcp-connection-source {
type if:interface-ref;
must "/if:interfaces/if:interface[if:name = current()]/"
+ "ip:ipv4" {
description
"The interface must have IPv4 enabled.";
}
description
"The interface is to be the source for the TCP
connection. It is a reference to an entry in the global
interface list.";
}
} // tcp-connection-source
grouping global-config-attributes {
description "Global MSDP configuration.";
uses tcp-connect-source {
if-feature global-tcp-connect-source;
}
list default-peer {
if-feature global-default-peer;
if-feature global-default-peer-policy;
key "peer-addr prefix-policy";
description
"The default peer accepts all MSDP SA messages.
A default peer is needed in topologies where MSDP peers
do not coexist with BGP peers. The reverse path
forwarding (RPF) check on SA messages can fail, and no
SA messages are accepted. In these cases, you can configure
the peer as a default peer and bypass RPF checks.";
leaf peer-addr {
type leafref {
path "../../../peers/peer/address";
}
mandatory true;
description
"Reference to a peer that is in the peer list.";
}
leaf prefix-policy {
type string;
description
"If specified, only those SA entries whose RP is
permitted in the prefix list are allowed;
if not specified, all SA messages from the default
peer are accepted.";
}
} // default-peer
container originating-rp {
description
"The container of Originating RP.";
leaf interface {
type if:interface-ref;
must "/if:interfaces/if:interface[if:name = current()]/"
+ "ip:ipv4" {
description
"The interface must have IPv4 enabled.";
}
description
"Reference to an entry in the global interface
list.
IP address of the interface is used in the RP field of
an SA message entry. When Anycast RPs are used, all
RPs use the same IP address. This parameter can be
used to define a unique IP address for the RP of each
MSDP peer.
By default, the software uses the RP address of the
local system.";
}
} // originating-rp
uses sa-filter-container {
if-feature global-sa-filter;
}
leaf sa-limit {
if-feature global-sa-limit;
type uint32;
description
"A limit on the number of SA entries accepted.
By default, there is no limit.";
}
uses ttl-threshold {
if-feature global-ttl-threshold;
}
} // global-config-attributes
grouping peer-config-attributes {
description "Per peer configuration for MSDP.";
uses authentication-container;
leaf enable {
if-feature peer-admin-enable;
type boolean;
description
"'true' if peer is enabled;
'false' if peer is disabled.";
}
uses tcp-connect-source {
if-feature peer-tcp-connect-source;
}
leaf description {
if-feature peer-description;
type string;
description
"The peer description.";
}
leaf mesh-group {
type string;
description
"Configure this peer to be a member of a mesh group";
}
leaf peer-as {
if-feature peer-as;
type inet:as-number;
description
"Peer's autonomous system number (ASN). Using peer-as to
do verification can provide more controlled ability.";
}
uses sa-filter-container;
leaf sa-limit {
if-feature peer-sa-limit;
type uint32;
description
"A limit on the number of SA entries accepted from this
peer. By default, there is no limit.";
}
container timer {
description "Timer attributes.";
leaf connect-retry-interval {
type uint16;
units seconds;
default 30;
description "Peer timer for connect-retry,
SHOULD be set to 30 seconds.";
}
leaf holdtime-interval {
type uint16 {
range "3..65535";
}
units seconds;
must "(../keepalive-interval and . > ../keepalive-interval) or "
+"(not(../keepalive-interval) and . > 60)" {
error-message "The keep alive interval must be "
+ "smaller than the hold time interval";
}
default 75;
description "The SA hold down period of this MSDP peer.";
}
leaf keepalive-interval {
type uint16 {
range "1..65535";
}
units seconds;
must "(../holdtime-interval and . < ../holdtime-interval) or "
+"(not(../holdtime-interval) and . < 75)" {
error-message "The keep alive interval must be "
+ "smaller than the hold time interval";
}
default 60;
description "The keepalive timer of this MSDP peer.";
}
} // timer
uses ttl-threshold;
} // peer-config-attributes
grouping peer-state-attributes {
description "Per peer state attributes for MSDP.";
leaf session-state {
type enumeration {
enum disabled {
description "Disabled.";
}
enum inactive {
description "Inactive.";
}
enum listen {
description "Listen.";
}
enum connecting {
description "Connecting.";
}
enum established {
description "Established.";
}
}
config false;
description
"Peer session state.";
reference
"RFC3618: Multicast Source Discovery Protocol (MSDP).";
}
leaf elapsed-time {
type uint32;
units seconds;
config false;
description "Elapsed time for being in a state.";
}
leaf connect-retry-expire {
type uint32;
units seconds;
config false;
description "Connect retry expire time of peer connection.";
}
leaf hold-expire {
type uint16;
units seconds;
config false;
description "Hold expire time of peer connection.";
}
leaf is-default-peer {
type boolean;
config false;
description "If this peer is default peer.";
}
leaf keepalive-expire {
type uint16;
units seconds;
config false;
description "Keepalive expire time of this peer.";
}
leaf reset-count {
type uint32;
config false;
description "The reset count of this peer.";
}
container statistics {
config false;
description
"A container defining statistics attributes.";
leaf discontinuity-time {
type yang:date-and-time;
description
"The time on the most recent occasion at which any one
or more of the statistic counters suffered a
discontinuity. If no such discontinuities have occurred
since the last re-initialization of the local
management subsystem, then this node contains the time
the local management subsystem re-initialized itself.";
}
container error {
description
"A grouping defining error statistics attributes.";
leaf rpf-failure {
type uint32;
description "Number of RPF failures.";
}
} // statistics-error
container queue {
description
"A container includes queue statistics attributes.";
leaf size-in {
type uint32;
description
"The size of the input queue.";
}
leaf size-out {
type uint32;
description
"The size of the output queue.";
}
} // statistics-queue
container received {
description "Received message counters.";
uses statistics-sent-received;
}
container sent {
description "Sent message counters.";
uses statistics-sent-received;
}
} // statistics-container
} // peer-state-attributes
grouping sa-filter-container {
description "A container defining SA filters.";
container sa-filter {
description
"Specifies an access control list (ACL) to filter source
active (SA) messages coming in to or going out of the
peer.";
leaf in {
type string;
description
"Filters incoming SA messages only.
The string value is the name to uniquely identify a policy that
contains one or more policy rules used to accept or reject MSDP
SA messages.
If a policy is not specified, all MSDP SA messages are accepted,
The definition of such a policy is outside the scope of this document.";
}
leaf out {
type string;
description
"Filters outgoing SA messages only.
The string value is the name to uniquely identify a policy that
contains one or more policy rules used to accept or reject MSDP
SA messages.
If a policy is not specified, all MSDP SA messages are accepted,
The definition of such a policy is outside the scope of this document.";
}
} // sa-filter
} // sa-filter-container
grouping ttl-threshold {
description "Attribute to configure TTL threshold.";
leaf ttl-threshold {
type uint8 {
range 1..255;
}
description "Maximum number of hops data packets can
traverse before being dropped.";
}
} // sa-ttl-threshold
grouping statistics-sent-received {
description
"A grouping defining sent and received statistics attributes.";
leaf keepalive {
type yang:counter64;
description
"The number of keepalive messages.";
}
leaf notification {
type yang:counter64;
description
"The number of notification messages.";
}
leaf sa-message {
type yang:counter64;
description
"The number of SA messages.";
}
leaf sa-response {
type yang:counter64;
description
"The number of SA response messages.";
}
leaf sa-request {
type yang:counter64;
description
"The number of SA request messages.";
}
leaf total {
type yang:counter64;
description
"The number of total messages.";
}
} // statistics-sent-received
/*
* Data nodes
*/
augment "/rt:routing/rt:control-plane-protocols" {
description
"MSDP augmentation to routing instance. This augmentation
is only valid for a routing protocol instance of MSDP.";
container msdp {
presence "Container for MSDP protocol.";
description
"MSDP configuration data.";
container global {
description
"Global attributes.";
uses global-config-attributes;
}
container peers {
description
"Containing a list of peers.";
list peer {
key "address";
description
"List of MSDP peers.";
leaf address {
type inet:ipv4-address;
description
"The address of peer";
}
uses peer-config-attributes;
uses peer-state-attributes;
} // peer
} // peers
container sa-cache {
config false;
description
"The SA cache information.";
list entry {
key "group source-addr";
description "A list of SA cache entries.";
leaf group {
type inet:ipv4-address;
description "The group address of this SA cache.";
}
leaf source-addr {
type union {
type enumeration {
enum '*' {
description "Any source address.";
}
}
type inet:ipv4-address;
}
description "Source IPv4 address.";
}
list origin-rp {
key "rp-address";
description "Origin RP address.";
leaf rp-address {
type inet:ip-address;
description "The RP address.";
}
leaf is-local-rp {
type boolean;
description "The RP is local.";
}
leaf sa-adv-expire {
type uint32;
units seconds;
description
"The remaining time duration before expiration
of the periodic SA advertisement timer on a local RP.";
}
}
container state-attributes {
description "SA cache state attributes for MSDP.";
leaf up-time {
type uint32;
units seconds;
description "The duration time of receiving this SA cache.";
}
leaf expire {
type uint32;
units seconds;
description "The duration time since this SA cache expires.";
}
leaf holddown-interval {
type uint32;
units seconds;
description "Hold-down timer value for SA forwarding.";
}
leaf peer-learned-from {
type inet:ipv4-address;
description
"The address of the peer that we learned this SA from.";
}
leaf rpf-peer {
type inet:ipv4-address;
description
"The address is used to find the SA's originating RP.";
}
} // sa-cache-state-attributes
} // entry
} // sa-cache
} // msdp
} // augment
/*
* RPCs
*/
rpc clear-peer {
description
"Clears the TCP connection to the peer.";
input {
leaf peer-address {
type inet:ipv4-address;
description
"Address of peer to be cleared. If this is not provided
then all peers are cleared.";
}
}
}
rpc clear-sa-cache {
if-feature rpc-clear-sa-cache;
description
"Clears MSDP source active (SA) cache entries.";
input {
container entry {
presence "If a particular entry is cleared.";
description
"The SA cache (S,G) or (*,G) entry to be cleared. If
this is not provided, all entries are cleared.";
leaf group {
type rt-types:ipv4-multicast-group-address;
mandatory true;
description "The group address";
}
leaf source-addr {
type rt-types:ipv4-multicast-source-address;
description
"Address of multicast source to be cleared. If this
is not provided then all entries related to the
given group are cleared.";
}
} // s-g
leaf peer-address {
type inet:ipv4-address;
description
"Peer IP address from which MSDP SA cache entries have
been learned. If this is not provided, entries learned
from all peers are cleared.";
}
leaf peer-as {
type inet:as-number;
description
"ASN from which MSDP SA cache entries have been learned.
If this is not provided, entries learned from all AS's
are cleared.";
}
}
}
}