module ietf-igmp-mld-snooping {
namespace "urn:ietf:params:xml:ns:yang:ietf-igmp-mld-snooping";
// replace with IANA namespace when assigned
prefix igmp-mld-snooping;
import ietf-inet-types {
prefix "inet";
}
import ietf-yang-types {
prefix "yang";
}
import ietf-interfaces {
prefix "if";
}
import ietf-routing {
prefix "rt";
}
organization
"IETF PIM Working Group";
contact
"WG Web:
WG List:
WG Chair: Stig Venaas
WG Chair: Mike McBride
Editors: Hongji Zhao
";
description
"The module defines a collection of YANG definitions common
for
IGMP and MLD Snooping.";
revision 2017-05-05 {
description
"augment /rt:routing/rt:control-plane-protocols
augment /rt:routing-state/rt:control-plane-protocols";
reference
"RFC XXXX: A YANG Data Model for IGMP and MLD Snooping";
}
revision 2017-02-05 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for IGMP and MLD Snooping";
}
/*
* Features
*/
feature global-admin-enable {
description
"Support global configuration to enable or disable IGMP and
MLD Snooping.";
}
feature global-vlan-config {
description
"Support global configuration applied for all vlans.";
}
feature admin-enable {
description
"Support configuration to enable or disable protocol under
VLAN instance.";
}
feature fast-leave {
description
"Support configuration of fast-leave.";
}
feature join-group {
description
"Support configuration of join-group.";
}
feature require-router-alert {
description
"Support configuration of require-router-alert.";
}
feature ssm-map {
description
"Support configuration of ssm-map.";
}
feature static-l2-multicast-group {
description
"Support configuration of L2 multicast static-group.";
}
feature per-vlan-config {
description
"Support configuration of each VLAN.";
}
feature rpc-clear-statistics {
description
"Support to clear statistics by RPC for IGMP and MLD
Snooping.";
}
feature vlan-last-member-query-interval-extended {
description
"Support configuration of vlan last member query interval
different value range.";
}
feature vlan-query-interval-extended {
description
"Support configuration of vlan query interval
different value range.";
}
feature vlan-query-max-response-time-extended {
description
"Support configuration of vlan query max response time
different value range.";
}
feature vlan-robustness-variable-extended {
description
"Support configuration of vlan robustness-variable
different value range.";
}
/*
* Typedefs
*/
typedef ssm-map-ipv4-addr-type {
type union {
type enumeration {
enum 'policy' {
description
"Source address in SSM map policy.";
}
}
type inet:ipv4-address;
}
description
"Source IPV4 address type for SSM map.";
} // ssm-map-ipv4-addr-type
typedef ssm-map-ipv6-addr-type {
type union {
type enumeration {
enum 'policy' {
description
"Source address in SSM map policy.";
}
}
type inet:ipv6-address;
}
description
"Source IPV6 address type for SSM map.";
} // ssm-map-ipv6-addr-type
typedef source-ipv4-addr-type {
type union {
type enumeration {
enum '*' {
description
"Any source address.";
}
}
type inet:ipv4-address;
}
description
"Multicast source IP address type.";
} // source-ipv4-addr-type
typedef source-ipv6-addr-type {
type union {
type enumeration {
enum '*' {
description
"Any source address.";
}
}
type inet:ipv6-address;
}
description
"Multicast source IP address type.";
} // source-ipv6-addr-type
/*
* Identities
*/
/*
* Groupings
*/
grouping global-config-attributes {
description "Global configuration of IGMP and MLD Snooping.";
leaf enable {
if-feature global-admin-enable;
type boolean;
description
"Set the value to true to enable IGMP or MLD Snooping in the
global view";
}
} // global-config-attributes
grouping global-state-attributes {
description "Global attributes of IGMP and MLD Snooping
state";
leaf entries-count {
type uint32;
description
"The number of L2 multicast entries in IGMP and MLD
Snooping.";
}
} // global-state-attributes
grouping vlans-config-attributes-igmp-mld-snooping {
description
"Configuration attributes applied to vlans whose
per vlan attributes are not existing.";
choice last-member-query-interval {
description
"Different vendors can restrict different range to the
Last Member Query Interval parameter.";
leaf last-member-query-interval-basic {
type uint16 {
range "1..65535";
}
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 last-member-query-interval-extended {
if-feature vlan-last-member-query-interval-extended;
type uint16;
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.";
}
}
choice query-interval {
description
"Different vendors can restrict different range to the
Query Interval parameter.";
leaf query-interval-basic {
type uint16 {
range "1..31744";
}
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-interval-extended {
if-feature vlan-query-interval-extended;
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.";
}
}
choice query-max-response-time {
description
"Different vendors can restrict different range to the
Query maximum response time parameter.";
leaf query-max-response-time-basic {
type uint16 {
range "1..65535";
}
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 query-max-response-time-extended {
if-feature vlan-query-max-response-time-extended;
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 exists in the IP
head of IGMP or MLD packet.";
}
choice robustness-variable {
description
"Different vendors can restrict different range to the
Robustness Variable parameter.";
leaf robustness-variable-basic {
type uint8 {
range "2..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 robustness-variable-extended {
if-feature vlan-robustness-variable-extended;
type uint8;
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 version {
type uint8 {
range "1..3";
}
description "IGMP and MLD Snooping version.";
}
} // vlans-config-attributes-igmp-mld-snooping
grouping vlan-config-attributes-igmp-snooping {
description "IGMP snooping configuration of each VLAN.";
uses vlan-config-attributes-igmp-mld-snooping;
leaf querier {
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 IP address is used as the source address in
messages.";
}
list ssm-map {
if-feature ssm-map;
key "source-addr group-addr-prefix";
description "SSM mapping list for igmp snooping";
leaf source-addr {
type ssm-map-ipv4-addr-type;
description
"Source IP address.";
}
leaf group-addr-prefix {
type inet:ipv4-prefix;
description
"Multicast group IP address for ssm-map in the format
of x.x.x.x/x ";
}
}
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 inet:ipv4-address;
description
"Multicast group IP address";
}
leaf source-addr {
type source-ipv4-addr-type;
description
"Multicast source IP address.";
}
leaf interface {
type if:interface-ref;
description
"Interface for static multicast group";
}
} // static-l2-multicast-group
} // vlan-config-attributes-igmp-snooping
grouping vlan-config-attributes-igmp-mld-snooping {
description
"IGMP and MLD Snooping configuration of each VLAN.";
leaf enable {
if-feature admin-enable;
type boolean;
description
"Set the value to true to enable IGMP and MLD Snooping in
the VLAN instance.";
}
leaf forwarding-mode {
type enumeration {
enum "mac" {
description
"";
}
enum "ip" {
description
"";
}
}
description "The default forwarding mode for IGMP and MLD
Snooping is ip.";
}
leaf explicit-tracking {
when "../version = 3";
type string;
description "Tracks IGMPv3 membership reports from
individual hosts for each port of each VLAN. ";
}
leaf send-query {
type boolean;
default true;
description "Enable quick response for topo changes";
}
leaf mrouter-aging-time {
type uint16 ;
default 180;
description "Aging time for mrouter interface";
}
leaf fast-leave {
if-feature fast-leave;
type empty;
description
"When fast leave is enabled, the IGMP software assumes
that no more than one host is present on each VLAN port.";
}
choice last-member-query-interval {
description
"Different vendors can restrict different range to the
Last Member Query Interval parameter.";
leaf last-member-query-interval-basic {
type uint16 {
range "1..65535";
}
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 last-member-query-interval-extended {
if-feature vlan-last-member-query-interval-extended;
type uint16;
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.";
}
}
choice query-interval {
description
"Different vendors can restrict different range to the
Query Interval parameter.";
leaf query-interval-basic {
type uint16 {
range "1..31744";
}
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-interval-extended {
if-feature vlan-query-interval-extended;
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.";
}
}
choice query-max-response-time {
description
"Different vendors can restrict different range to the
Query maximum response time parameter.";
leaf query-max-response-time-basic {
type uint16 {
range "1..65535";
}
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 query-max-response-time-extended {
if-feature vlan-query-max-response-time-extended;
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 exists in the IP
head of IGMP or MLD packet.";
}
choice robustness-variable {
description
"Different vendors can restrict different range to the
Robustness Variable parameter.";
leaf robustness-variable-basic {
type uint8 {
range "2..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 robustness-variable-extended {
if-feature vlan-robustness-variable-extended;
type uint8;
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 version {
type uint8 {
range "1..3";
}
description "IGMP and MLD Snooping version.";
}
leaf-list static-mrouter-interface {
if-feature static-l2-multicast-group;
type if:interface-ref;
description "Multicast Router Interface. The interface to
the router must be in the selected VLAN, and it is specified by type
and number.";
}
} // vlan-config-attributes-igmp-mld-snooping
grouping vlan-config-attributes-mld-snooping {
description "MLD snooping configuration of each VLAN.";
uses vlan-config-attributes-igmp-mld-snooping;
leaf querier {
type inet:ipv6-address;
description
"Use the IGMP snooping querier to support IGMP snooping in a
VLAN where PIM and IGMP are not configured.
The IP address is used as the source address in messages.";
}
list ssm-map {
if-feature ssm-map;
key "source-addr group-addr-prefix";
description "SSM mapping list for MLD snooping";
leaf source-addr {
type ssm-map-ipv6-addr-type;
description
"Source IP address.";
}
leaf group-addr-prefix {
type inet:ipv6-prefix;
description
"Multicast group IP address for ssm-map";
}
}
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 inet:ipv6-address;
description
"Multicast group IPv6 address.";
}
leaf source-addr {
type source-ipv6-addr-type;
description
"Multicast source IPv6 address.";
}
leaf interface {
type if:interface-ref;
description
"Interface for static multicast group";
}
} // static-l2-multicast-group
} // vlan-config-attributes-mld-snooping
grouping vlan-state-group-attributes-igmp-mld-snooping {
description
"Per vlan state attributes for both IGMP and MLD snooping
groups.";
leaf expire {
type uint32;
units seconds;
description
"The time left before multicast group timeout.";
}
leaf up-time {
type uint32;
units seconds;
description
"The time after the device created L2 multicast record.";
}
leaf interface {
type if:interface-ref;
description
"The outgoing interface for L2 multicast stream.";
}
} // vlan-state-group-attributes-igmp-mld-snooping
grouping vlan-state-attributes-igmp-snooping {
description
"State attributes for IGMP snooping of each VLAN.";
uses vlan-state-attributes-igmp-mld-snooping;
list group {
key "address";
description "IGMP snooping information";
leaf address {
type inet:ipv4-address;
description
"Multicast group IP address";
}
uses vlan-state-group-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv4-address;
description
"The last host address which has sent the
report to join the multicast group.";
}
list source {
key "address";
description "Source IP address for multicast stream";
leaf address {
type inet:ipv4-address;
description "Source IP address for multicast stream";
}
uses vlan-state-source-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv4-address;
description
"The last host address which has sent the
report to join the multicast source and group.";
}
} // list source
} // list group
} // vlan-state-attributes-igmp-snooping
grouping vlan-state-attributes-igmp-mld-snooping {
description
"State attributes for both IGMP and MLD Snooping of each
VLAN.";
leaf-list mrouter-interface {
type if:interface-ref;
description "Multicast Router Interface which is the
interface that connect to the multicast router";
}
leaf-list port-info {
type if:interface-ref;
description "The port-info shows the interfaces that attach
the hosts, which join in the multicast group";
}
leaf-list mac-address {
type yang:phys-address;
description "Destination mac address for L2 multicast
forwarding.";
}
} // vlan-config-attributes-igmp-mld-snooping
grouping vlan-state-attributes-mld-snooping {
description
"State attributes for MLD snooping of each VLAN.";
uses vlan-state-attributes-igmp-mld-snooping;
list group {
key "address";
description "MLD snooping statistics information";
leaf address {
type inet:ipv6-address;
description
"Multicast group IP address";
}
uses vlan-state-group-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv6-address;
description
"The last host address which has sent the
report to join the multicast group.";
}
list source {
key "address";
description "Source IP address for multicast stream";
leaf address {
type inet:ipv6-address;
description "Source IP address for multicast stream";
}
uses vlan-state-source-attributes-igmp-mld-snooping;
leaf last-reporter {
type inet:ipv6-address;
description
"The last host address which has sent the report to
join the multicast source and group.";
}
} // list source
} // list group
} // vlan-state-attributes-mld-snooping
grouping vlan-state-source-attributes-igmp-mld-snooping {
description
"State attributes for both IGMP and MLD Snooping of each
VLAN.";
leaf up-time {
type uint32;
units seconds;
description "The time after the device created L2 multicast
record";
}
leaf expire {
type uint32;
units seconds;
description
"The time left before multicast group timeout.";
}
} // vlan-state-source-attributes-igmp-mld-snooping
/*
* Configuration data nodes
*/
augment "/rt:routing/rt:control-plane-protocols"
{
description
"IGMP snooping augmentation to routing control plane
protocol configuration.";
container igmp-snooping {
description
"IGMP Snooping configuration data.";
container global {
description
"Global attributes.";
uses global-config-attributes;
}
container vlans {
description
"List of VLANs that enable IGMP Snooping.";
uses vlans-config-attributes-igmp-mld-snooping {
if-feature global-vlan-config;
}
list vlan {
key "vlan-id";
description
"IGMP Snooping config-attributes for each VLAN.";
leaf vlan-id {
type uint16 {
range "1 .. 4094";
}
description
"VLAN ID, the range of which is 1 to 4094.";
}
uses vlan-config-attributes-igmp-snooping {
if-feature per-vlan-config;
}
} // vlan
} // vlans
} // igmp-snooping
} // augment
augment "/rt:routing/rt:control-plane-protocols"
{
description
"MLD snooping augmentation to routing control plane
protocol configuration.";
container mld-snooping {
description
"MLD Snooping configuration data.";
container global {
description
"Global attributes.";
uses global-config-attributes;
}
container vlans {
description
"List of VLANs that enable IGMP Snooping.";
uses vlans-config-attributes-igmp-mld-snooping {
if-feature global-vlan-config;
}
list vlan {
key "vlan-id";
description
"IGMP Snooping configuration attributes for each
VLAN.";
leaf vlan-id {
type uint16 {
range "1 .. 4094";
}
description
"VLAN ID, the range of which is 1 to 4094";
}
uses vlan-config-attributes-mld-snooping {
if-feature per-vlan-config;
}
} // vlan
} // vlans
} // mld-snooping
} // augment
/*
* Operational state data nodes
*/
augment "/rt:routing-state/rt:control-plane-protocols"
{
description
"IGMP Snooping state data.";
container igmp-snooping {
description
"IGMP Snooping operational state data.";
container global {
description
"Global attributes.";
uses global-config-attributes;
uses global-state-attributes;
}
container vlans{
description
" List of VLANs that enable IGMP Snooping.";
uses vlans-config-attributes-igmp-mld-snooping {
if-feature global-vlan-config;
}
list vlan {
key "vlan-id";
description
"IGMP Snooping state-attributes for each VLAN.";
leaf vlan-id {
type uint16 {
range "1 .. 4094";
}
description
"VLAN ID, the range of which is 1 to 4094 ";
}
uses vlan-config-attributes-igmp-snooping {
if-feature per-vlan-config;
}
uses vlan-state-attributes-igmp-snooping;
} // vlan
} // vlans
} // igmp-snooping
} // augment
augment "/rt:routing-state/rt:control-plane-protocols"
{
description
"MLD Snooping state data.";
container mld-snooping {
description
"MLD Snooping state data.";
container global {
description
"Global attributes.";
uses global-config-attributes;
uses global-state-attributes;
}
container vlans {
description
"List of VLANs that enable MLD Snooping.";
uses vlans-config-attributes-igmp-mld-snooping {
if-feature global-vlan-config;
}
list vlan {
key "vlan-id";
description
"MLD Snooping state-attributes for each VLAN.";
leaf vlan-id {
type uint16 {
range "1 .. 4094";
}
description
"VLAN ID, the range of which is 1 to 4094 ";
}
uses vlan-config-attributes-mld-snooping {
if-feature per-vlan-config;
}
uses vlan-state-attributes-mld-snooping;
} // vlan
} // vlans
} // mld-snooping
} // augment
/*
* RPCs
*/
//clear ip igmp snooping statistics interface vlan-id
rpc clear-igmp-snooping-statistics {
if-feature rpc-clear-statistics;
description
"Clears the specified IGMP Snooping statistics.";
input {
leaf vlan-id {
type uint16 {
range "1 .. 4094";
}
description
"VLAN ID, the range of which is 1 to 4094 ";
}
leaf group {
type inet:ipv4-address;
description
"Multicast group IPv4 address.
If it is not specified, all IGMP snooping group tables
are
cleared.";
}
leaf source {
type inet:ipv4-address;
description
"Multicast source IPv4 address.
If it is not specified, all IGMP snooping source-group
tables are
cleared.";
}
}
} // rpc clear-igmp-snooping-statistics
rpc clear-mld-snooping-statistics {
if-feature rpc-clear-statistics;
description
"Clears the specified MLD Snooping statistics.";
input {
leaf vlan-id {
type uint16 {
range "1 .. 4094";
}
description
"VLAN ID, the range of which is 1 to 4094 ";
}
leaf group {
type inet:ipv6-address;
description
"Multicast group IPv6 address.
If it is not specified, all MLD snooping group tables
are
cleared.";
}
leaf source {
type inet:ipv6-address;
description
"Multicast source IPv6 address.
If it is not specified, all MLD snooping source-group
tables are
cleared.";
}
}
} // rpc clear-mld-snooping-statistics
/*
* Notifications
*/
}