module ietf-igmp-mld-snooping {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-igmp-mld-snooping";
prefix ims;
import ietf-inet-types {
prefix "inet";
}
import ietf-yang-types {
prefix "yang";
}
import ietf-interfaces {
prefix "if";
}
import ietf-routing {
prefix "rt";
}
import ietf-routing-types {
prefix "rt-types";
}
import ietf-l2vpn {
prefix "l2vpn";
}
import ietf-network-instance {
prefix "ni";
}
import ietf-pseudowires {
prefix "pw";
}
import ieee802-dot1q-bridge {
prefix "dot1q";
}
organization
"IETF PIM Working Group";
contact
"WG Web:
WG List:
Editors: Hongji Zhao
Xufeng Liu
Yisong Liu
Anish Peter
Mahesh Sivakumar
";
description
"The module defines a collection of YANG definitions common for
all Internet Group Management Protocol (IGMP) and Multicast
Listener Discovery (MLD) Snooping devices.
Copyright (c) 2019 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 2019-01-08 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for IGMP and MLD Snooping";
}
/*
* Features
*/
feature feature-igmp-snooping {
description
"Support IGMP snooping protocol.";
reference
"RFC 4541, Section 1";
}
feature feature-mld-snooping {
description
"Support MLD snooping protocol.";
reference
"RFC 4541, Section 1";
}
feature immediate-leave {
description
"Support configuration of immediate-leave.";
reference
"RFC 2236, Section 10";
}
feature require-router-alert {
description
"Support configuration of require-router-alert.";
reference
"RFC 3376, Section 5.2";
}
feature static-l2-multicast-group {
description
"Support configuration of L2 multicast static-group.";
reference
"RFC 4541, Section 2.1";
}
feature static-mrouter-interface {
description
"Support configuration of mrouter interface.";
reference
"RFC 4541, Section 2.1";
}
feature rpc-clear-groups {
description
"Support clearing statistics by RPC for IGMP & MLD snooping.";
reference
"RFC 4541, Section 2.1";
}
feature explicit-tracking {
description
"Support configuration of per instance explicit-tracking.";
reference
"RFC 3376, Appendix B";
}
feature exclude-lite {
description
"Support configuration of per instance exclude-lite.";
reference
"RFC 5790, Section 3";
}
/* identities */
identity scenario-type {
description
"Base identity for scenario type in IGMP & MLD snooping";
}
identity bridge {
base scenario-type;
description
"This identity represents BRIDGE scenario.";
}
identity l2vpn {
base scenario-type;
description
"This identity represents L2VPN scenario.";
}
identity filter-mode {
description
"Base identity for filter mode in IGMP & MLD snooping";
}
identity include {
base filter-mode;
description
"This identity represents include mode.";
}
identity exclude {
base filter-mode;
description
"This identity represents exclude mode.";
}
identity igmp-snooping {
base rt:control-plane-protocol;
description
"IGMP snooping protocol";
}
identity mld-snooping {
base rt:control-plane-protocol;
description
"MLD snooping protocol";
}
/*
* Typedefs
*/
typedef snooping-scenario-type {
type identityref {
base "scenario-type";
}
description "The IGMP & MLD snooping scenario type";
}
typedef filter-mode-type {
type identityref {
base "filter-mode";
}
description "The host filter mode";
}
typedef igmp-mld-snooping-instance-ref {
type leafref {
path "/rt:routing/rt:control-plane-protocols"+
"/rt:control-plane-protocol/rt:name";
}
description
"This type is used by data models which need to
reference IGMP & MLD snooping instance.";
}
/*
* Groupings
*/
grouping instance-config-attributes-igmp-snooping {
description
"IGMP snooping configuration for each BRIDGE or L2VPN instance.";
uses instance-config-attributes-igmp-mld-snooping;
leaf version {
type uint8 {
range "1..3";
}
default 2;
description "IGMP snooping version.";
}
leaf querier-source {
type inet:ipv4-address;
description
"Use the IGMP snooping querier to support IGMP
snooping in a VLAN where PIM and IGMP are not configured.
The IPv4 address is used as source address in messages.";
}
list static-l2-multicast-group {
if-feature static-l2-multicast-group;
key "group source-addr";
description
"A static multicast route, (*,G) or (S,G).";
leaf group {
type rt-types:ipv4-multicast-group-address;
description
"Multicast group IPv4 address";
}
leaf source-addr {
type rt-types:ipv4-multicast-source-address;
description
"Multicast source IPv4 address.";
}
leaf-list bridge-outgoing-interface {
when 'derived-from-or-self(../../scenario,"ims:bridge")';
type if:interface-ref;
description "Outgoing interface in BRIDGE forwarding";
}
leaf-list l2vpn-outgoing-ac {
when 'derived-from-or-self(../../scenario,"ims:l2vpn")';
type if:interface-ref;
description "Outgoing AC in L2VPN forwarding";
}
leaf-list l2vpn-outgoing-pw {
when 'derived-from-or-self(../../scenario,"ims:l2vpn")';
type pw:pseudowire-ref;
description "Outgoing PW in L2VPN forwarding";
}
} // static-l2-multicast-group
} // instance-config-attributes-igmp-snooping
grouping instance-config-attributes-igmp-mld-snooping {
description
"IGMP and MLD snooping configuration of each VLAN.";
leaf enable {
type boolean;
default false;
description
"Set the value to true to enable IGMP & MLD snooping.";
}
leaf forwarding-mode {
type enumeration {
enum "mac" {
description
"MAC-based lookup mode";
}
enum "ip" {
description
"IP-based lookup mode";
}
}
default "ip";
description "The default forwarding mode is ip";
}
leaf explicit-tracking {
if-feature explicit-tracking;
type boolean;
default false;
description
"Track the IGMP & MLD snooping v3 membership reports
from individual hosts. It contributes to saving network
resources and shortening leave latency.";
}
leaf exclude-lite {
if-feature exclude-lite;
type boolean;
default false;
description
"Track the Lightweight IGMPv3 and MLDv2 protocol report";
reference "RFC5790";
}
leaf send-query {
type boolean;
default false;
description
"Enable quick response for topology changes.
To support IGMP snooping in a VLAN where PIM and IGMP are
not configured. It cooperates with parameter querier-source.";
}
leaf immediate-leave {
if-feature immediate-leave;
type empty;
description
"When immediate leave is enabled, the IGMP software assumes
that no more than one host is present on each VLAN port.";
}
leaf last-member-query-interval {
type uint16 {
range "1..1023";
}
units seconds;
default 1;
description
"Last Member Query Interval, which may be tuned to modify
the leave latency of the network.";
reference "RFC3376. Sec. 8.8.";
}
leaf query-interval {
type uint16;
units seconds;
default 125;
description
"The Query Interval is the interval between General Queries
sent by the Querier.";
reference "RFC3376. Sec. 4.1.7, 8.2, 8.14.2.";
}
leaf query-max-response-time {
type uint16;
units seconds;
default 10;
description
"Query maximum response time specifies the maximum time
allowed before sending a responding report.";
reference "RFC3376. Sec. 4.1.1, 8.3, 8.14.3.";
}
leaf require-router-alert {
if-feature require-router-alert;
type boolean;
default false;
description
"When the value is true, router alert should exist
in the IP head of IGMP or MLD packet.";
}
leaf robustness-variable {
type uint8 {
range "1..7";
}
default 2;
description
"Querier's Robustness Variable allows tuning for the
expected packet loss on a network.";
reference "RFC3376. Sec. 4.1.6, 8.1, 8.14.1.";
}
leaf-list static-bridge-mrouter-interface {
when 'derived-from-or-self(../scenario,"ims:bridge")';
if-feature static-mrouter-interface;
type if:interface-ref;
description "static mrouter interface in BRIDGE forwarding";
}
leaf-list static-l2vpn-mrouter-interface-ac {
when 'derived-from-or-self(../scenario,"ims:l2vpn")';
if-feature static-mrouter-interface;
type if:interface-ref;
description
"static mrouter interface whose type is interface
in L2VPN forwarding";
}
leaf-list static-l2vpn-mrouter-interface-pw {
when 'derived-from-or-self(../scenario,"ims:l2vpn")';
if-feature static-mrouter-interface;
type pw:pseudowire-ref;
description
"static mrouter interface whose type is PW
in L2VPN forwarding";
}
} // instance-config-attributes-igmp-mld-snooping
grouping instance-config-attributes-mld-snooping {
description "MLD snooping configuration of each VLAN.";
uses instance-config-attributes-igmp-mld-snooping;
leaf version {
type uint8 {
range "1..2";
}
default 2;
description "MLD snooping version.";
}
leaf querier-source {
type inet:ipv6-address;
description
"Use the MLD snooping querier to support MLD snooping where
PIM and MLD are not configured. The IPv6 address is used as
the source address in messages.";
}
list static-l2-multicast-group {
if-feature static-l2-multicast-group;
key "group source-addr";
description
"A static multicast route, (*,G) or (S,G).";
leaf group {
type rt-types:ipv6-multicast-group-address;
description
"Multicast group IPv6 address";
}
leaf source-addr {
type rt-types:ipv6-multicast-source-address;
description
"Multicast source IPv6 address.";
}
leaf-list bridge-outgoing-interface {
when 'derived-from-or-self(../../scenario,"ims:bridge")';
type if:interface-ref;
description "Outgoing interface in BRIDGE forwarding";
}
leaf-list l2vpn-outgoing-ac {
when 'derived-from-or-self(../../scenario,"ims:l2vpn")';
type if:interface-ref;
description "Outgoing AC in L2VPN forwarding";
}
leaf-list l2vpn-outgoing-pw {
when 'derived-from-or-self(../../scenario,"ims:l2vpn")';
type pw:pseudowire-ref;
description "Outgoing PW in L2VPN forwarding";
}
} // static-l2-multicast-group
} // instance-config-attributes-mld-snooping
grouping instance-state-group-attributes-igmp-mld-snooping {
description
"Attributes for both IGMP and MLD snooping groups.";
leaf mac-address {
type yang:phys-address;
description "Destination MAC address for L2 multicast.";
}
leaf expire {
type rt-types:timer-value-seconds16;
units seconds;
description
"The time left before multicast group timeout.";
}
leaf up-time {
type uint32;
units seconds;
mandatory true;
description
"The time elapsed since L2 multicast record created.";
}
} // instance-state-group-attributes-igmp-mld-snooping
grouping instance-state-attributes-igmp-snooping {
description
"State attributes for IGMP snooping for each instance.";
uses instance-state-attributes-igmp-mld-snooping;
list group {
key "address";
config false;
description "IGMP snooping information";
leaf address {
type rt-types:ipv4-multicast-group-address;
description
"Multicast group IPv4 address";
}
uses instance-state-group-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv4-address;
description
"Address of the last host which has sent report to join
the multicast group.";
}
list source {
key "address";
description "Source IPv4 address for multicast stream";
leaf address {
type rt-types:ipv4-multicast-source-address;
description "Source IPv4 address for multicast stream";
}
uses instance-state-source-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv4-address;
description
"Address of the last host which has sent report
to join the multicast group.";
}
list host {
if-feature explicit-tracking;
key "host-address";
description
"List of multicast membership hosts
of the specific multicast source-group.";
leaf host-address {
type inet:ipv4-address;
description
"Multicast membership host address.";
}
leaf host-filter-mode {
type filter-mode-type;
mandatory true;
description
"Filter mode for a multicast membership
host may be either include or exclude.";
}
}// list host
} // list source
} // list group
} // instance-state-attributes-igmp-snooping
grouping instance-state-attributes-igmp-mld-snooping {
description
"State attributes for IGMP & MLD snooping instance.";
leaf entries-count {
type uint32;
config false;
description
"The number of L2 multicast entries in IGMP & MLD snooping";
}
leaf-list bridge-mrouter-interface {
when 'derived-from-or-self(../scenario,"ims:bridge")';
type if:interface-ref;
config false;
description "mrouter interface in BRIDGE forwarding";
}
leaf-list l2vpn-mrouter-interface-ac {
when 'derived-from-or-self(../scenario,"ims:l2vpn")';
type if:interface-ref;
config false;
description
"mrouter interface whose type is interface
in L2VPN forwarding";
}
leaf-list l2vpn-mrouter-interface-pw {
when 'derived-from-or-self(../scenario,"ims:l2vpn")';
type pw:pseudowire-ref;
config false;
description
"mrouter interface whose type is PW in L2VPN forwarding";
}
} // instance-config-attributes-igmp-mld-snooping
grouping instance-state-attributes-mld-snooping {
description
"State attributes for MLD snooping of each VLAN.";
uses instance-state-attributes-igmp-mld-snooping;
list group {
key "address";
config false;
description "MLD snooping statistics information";
leaf address {
type rt-types:ipv6-multicast-group-address;
description
"Multicast group IPv6 address";
}
uses instance-state-group-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv6-address;
description
"Address of the last host which has sent report
to join the multicast group.";
}
list source {
key "address";
description "Source IPv6 address for multicast stream";
leaf address {
type rt-types:ipv6-multicast-source-address;
description "Source IPv6 address for multicast stream";
}
uses instance-state-source-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv6-address;
description
"Address of the last host which has sent report
to join the multicast group.";
}
list host {
if-feature explicit-tracking;
key "host-address";
description
"List of multicast membership hosts
of the specific multicast source-group.";
leaf host-address {
type inet:ipv6-address;
description
"Multicast membership host address.";
}
leaf host-filter-mode {
type filter-mode-type;
mandatory true;
description
"Filter mode for a multicast membership
host may be either include or exclude.";
}
}// list host
} // list source
} // list group
} // instance-state-attributes-mld-snooping
grouping instance-state-source-attributes-igmp-mld-snooping {
description
"State attributes for IGMP & MLD snooping instance.";
leaf-list bridge-outgoing-interface {
when 'derived-from-or-self(../../../scenario,"ims:bridge")';
type if:interface-ref;
description "Outgoing interface in BRIDGE forwarding";
}
leaf-list l2vpn-outgoing-ac {
when 'derived-from-or-self(../../../scenario,"ims:l2vpn")';
type if:interface-ref;
description "Outgoing AC in L2VPN forwarding";
}
leaf-list l2vpn-outgoing-pw {
when 'derived-from-or-self(../../../scenario,"ims:l2vpn")';
type pw:pseudowire-ref;
description "Outgoing PW in L2VPN forwarding";
}
leaf up-time {
type uint32;
units seconds;
mandatory true;
description
"The time elapsed since L2 multicast record created";
}
leaf expire {
type rt-types:timer-value-seconds16;
units seconds;
description
"The time left before multicast group timeout.";
}
leaf host-count {
if-feature explicit-tracking;
type uint32;
description
"The number of host addresses.";
}
} // instance-state-source-attributes-igmp-mld-snooping
grouping igmp-snooping-statistics {
description
"The statistics attributes for IGMP snooping.";
leaf num-query {
type yang:counter64;
description
"The number of query messages.";
reference
"RFC 2236, Section 2.1";
}
leaf num-membership-report-v1 {
type yang:counter64;
description
"The number of membership report v1 messages.";
reference
"RFC 3376, Section 4";
}
leaf num-membership-report-v2 {
type yang:counter64;
description
"The number of membership report v2 messages.";
reference
"RFC 3376, Section 4";
}
leaf num-membership-report-v3 {
type yang:counter64;
description
"The number of membership report v3 messages.";
reference
"RFC 3376, Section 4";
}
leaf num-leave {
type yang:counter64;
description
"The number of leave messages.";
reference
"RFC 3376, Section 4";
}
leaf num-non-member-leave {
type yang:counter64;
description
"The number of non member leave messages.";
reference
"RFC 3376, Section 4";
}
leaf num-pim-hello {
type yang:counter64;
description
"The number of PIM hello messages.";
reference
"RFC 7761, Section 4.9";
}
} // igmp-snooping-statistics
grouping mld-snooping-statistics {
description
"The statistics attributes for MLD snooping.";
leaf num-query {
type yang:counter64;
description
"The number of Multicast Listener Query messages.";
reference
"RFC 3810, Section 5";
}
leaf num-report-v1 {
type yang:counter64;
description
"The number of Version 1 Multicast Listener Report.";
reference
"RFC 3810, Section 5";
}
leaf num-report-v2 {
type yang:counter64;
description
"The number of Version 2 Multicast Listener Report.";
reference
"RFC 3810, Section 5";
}
leaf num-done {
type yang:counter64;
description
"The number of Version 1 Multicast Listener Done.";
reference
"RFC 3810, Section 5";
}
leaf num-pim-hello {
type yang:counter64;
description
"The number of PIM hello messages.";
reference
"RFC 7761, Section 4.9";
}
} // mld-snooping-statistics
grouping igmp-snooping-interface-statistics-attributes {
description "Interface statistics attributes for IGMP snooping";
container interfaces {
config false;
description
"Interfaces associated with the IGMP snooping instance";
list interface {
key "name";
description
"Interfaces associated with the IGMP snooping instance";
leaf name {
type if:interface-ref;
description
"The name of interface";
}
container statistics {
description
"The interface statistics for IGMP snooping";
container received {
description
"Statistics of received IGMP snooping packets.";
uses igmp-snooping-statistics;
}
container sent {
description
"Statistics of sent IGMP snooping packets.";
uses igmp-snooping-statistics;
}
}
}
}
}//igmp-snooping-interface-statistics-attributes
grouping mld-snooping-interface-statistics-attributes {
description "Interface statistics attributes for MLD snooping";
container interfaces {
config false;
description
"Interfaces associated with the MLD snooping instance";
list interface {
key "name";
description
"Interfaces associated with the MLD snooping instance";
leaf name {
type if:interface-ref;
description
"The name of interface";
}
container statistics {
description
"The interface statistics for MLD snooping";
container received {
description
"Statistics of received MLD snooping packets.";
uses mld-snooping-statistics;
}
container sent {
description
"Statistics of sent MLD snooping packets.";
uses mld-snooping-statistics;
}
}
}
}
}//mld-snooping-interface-statistics-attributes
augment "/rt:routing/rt:control-plane-protocols"+
"/rt:control-plane-protocol" {
description
"IGMP & MLD snooping augmentation to control plane protocol
configuration and state.";
/*
* igmp-snooping-instance
*/
container igmp-snooping-instance {
when 'derived-from-or-self(../rt:type, "ims:igmp-snooping")' {
description
"This container is only valid for IGMP snooping protocol.";
}
if-feature feature-igmp-snooping;
description
"IGMP snooping instance to configure the igmp-snooping.";
leaf scenario {
type snooping-scenario-type;
default bridge;
description
"The scenario indicates BRIDGE or L2VPN.";
}
uses instance-config-attributes-igmp-snooping;
uses instance-state-attributes-igmp-snooping;
uses igmp-snooping-interface-statistics-attributes;
} //igmp-snooping-instance
/*
* mld-snooping-instance
*/
container mld-snooping-instance {
when 'derived-from-or-self(../rt:type, "ims:mld-snooping")' {
description
"This container is only valid for MLD snooping protocol.";
}
if-feature feature-mld-snooping;
description
"MLD snooping instance to configure the mld-snooping.";
leaf scenario {
type snooping-scenario-type;
default bridge;
description
"The scenario indicates BRIDGE or L2VPN.";
}
uses instance-config-attributes-mld-snooping;
uses instance-state-attributes-mld-snooping;
uses mld-snooping-interface-statistics-attributes;
}//mld-snooping-instance
}
augment "/dot1q:bridges/dot1q:bridge" {
description
"Reference IGMP & MLD snooping instance in BRIDGE scenario";
leaf igmp-snooping-instance {
type igmp-mld-snooping-instance-ref;
description
"Configure IGMP snooping instance under bridge view";
}
leaf mld-snooping-instance {
type igmp-mld-snooping-instance-ref;
description
"Configure MLD snooping instance under bridge view";
}
}
augment "/dot1q:bridges/dot1q:bridge"+
"/dot1q:component/dot1q:bridge-vlan/dot1q:vlan" {
description
"Reference IGMP & MLD snooping instance in BRIDGE scenario";
leaf igmp-snooping-instance {
type igmp-mld-snooping-instance-ref;
description
"Configure IGMP snooping instance under VLAN view";
}
leaf mld-snooping-instance {
type igmp-mld-snooping-instance-ref;
description
"Configure MLD snooping instance under VLAN view";
}
}
augment "/ni:network-instances/ni:network-instance"+
"/ni:ni-type/l2vpn:l2vpn" {
description
"Reference IGMP & MLD snooping instance in L2VPN scenario";
leaf igmp-snooping-instance {
type igmp-mld-snooping-instance-ref;
description
"Configure IGMP snooping instance in L2VPN scenario";
}
leaf mld-snooping-instance {
type igmp-mld-snooping-instance-ref;
description
"Configure MLD snooping instance in L2VPN scenario";
}
}
/* RPCs */
rpc clear-igmp-snooping-groups {
if-feature rpc-clear-groups;
description
"Clear the specified IGMP snooping cache tables.";
input {
leaf name {
if-feature feature-igmp-snooping;
type igmp-mld-snooping-instance-ref;
description
"Name of the igmp-snooping-instance";
}
leaf group {
type rt-types:ipv4-multicast-group-address;
description
"Multicast group IPv4 address. If it is not specified,
all IGMP snooping group tables are cleared.";
}
leaf source {
type rt-types:ipv4-multicast-source-address;
description
"Multicast source IPv4 address. If it is not specified,
all IGMP snooping source-group tables are cleared.";
}
}
} // rpc clear-igmp-snooping-groups
rpc clear-mld-snooping-groups {
if-feature rpc-clear-groups;
description
"Clear the specified MLD snooping cache tables.";
input {
leaf name {
if-feature feature-mld-snooping;
type igmp-mld-snooping-instance-ref;
description
"Name of the mld-snooping-instance";
}
leaf group {
type rt-types:ipv6-multicast-group-address;
description
"Multicast group IPv6 address. If it is not specified,
all MLD snooping group tables are cleared.";
}
leaf source {
type rt-types:ipv6-multicast-source-address;
description
"Multicast source IPv6 address. If it is not specified,
all MLD snooping source-group tables are cleared.";
}
}
} // rpc clear-mld-snooping-groups
}