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";
}
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-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 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 source-policy {
description
"Support configuration of source policy.";
}
feature ssm-map {
description
"Support configuration of ssm-map.";
}
feature static-l2-multicast-group {
description
"Support configuration of L2 multicast static-group.";
}
feature verify-source-subnet {
description
"Support configuration of verify-source-subnet.";
}
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.";
}
/*
* 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
/*
* 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 vlan-config-attributes-igmp-snooping {
description "IGMP snooping configuration of each VLAN.";
uses vlan-config-attributes-igmp-mld-snooping;
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 ";
}
}
} // 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-learning {
type boolean;
default true;
description
"Enable router port learning function";
}
leaf mrouter-aging-time {
type uint16 ;
default 180;
description "Aging time for mrouter port";
}
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.";
}
leaf last-member-query-interval {
type uint16 {
range "1..65535";
}
description
" Modify the value to adjust the leave latency of the
network.";
}
leaf query-interval {
type uint16;
units seconds;
default 125;
description
"Interval between general queries sent by the querier.";
}
leaf max-response-time {
type uint16;
units seconds;
description
"Maximum time for the host to respond the query packet.";
}
leaf require-router-alert {
if-feature require-router-alert;
type boolean;
description
"When the value is true, router alert exists in the IP
head of IGMP or MLD packet.";
}
leaf robustness-variable {
type uint8 {
range "2..7";
}
default 2;
description
"Adjust the value for the expected packet loss on the
network.";
}
leaf source-policy {
if-feature source-policy;
type string;
description
"Name of the access policy used to filter sources.";
}
leaf verify-source-subnet {
if-feature verify-source-subnet;
type empty;
description
"If the value is present, the interface accepts packets
with matching source IP subnet only.";
}
leaf version {
type uint8 {
range "1..3";
}
description "IGMP and MLD Snooping version.";
}
} // 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;
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";
}
}
} // vlan-config-attributes-mld-snooping
grouping vlan-state-attributes-igmp-snooping {
description
"State attributes for IGMP snooping of each VLAN.";
uses vlan-state-attributes-igmp-mld-snooping;
leaf querier {
type inet:ipv4-address;
description "Configures a snooping querier when PIM is
disabled because multicast traffic does not need to be routed. The IP
address is used as the source address in messages.";
}
list group {
key "address";
description "IGMP snooping information";
leaf address {
type inet:ipv4-address;
description
"Multicast group IP address";
}
list source {
key "address";
description "Source IP address for multicast stream";
leaf address {
type inet:ipv4-address;
description "Source IP address for multicast stream";
}
leaf reporter {
type inet:ipv4-address;
description "The reporter IP address behind the port";
}
uses vlan-state-group-attributes-igmp-mld-snooping;
} // 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 {
type if:interface-ref;
description "The interfaces 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;
leaf querier {
type inet:ipv6-address;
description
"Configures a snooping querier when PIM is disabled because
multicast traffic does not need to be routed.";
}
list group {
key "address";
description "MLD snooping statistics information";
leaf address {
type inet:ipv6-address;
description
"Multicast group IP address";
}
list source {
key "address";
description "Source IP address for multicast stream";
leaf address {
type inet:ipv6-address;
description "Source IP address for multicast stream";
}
leaf reporter {
type inet:ipv6-address;
description "The reporter IP address behind the port";
}
uses vlan-state-group-attributes-igmp-mld-snooping;
} // list source
} // list group
} // vlan-state-attributes-mld-snooping
grouping vlan-state-group-attributes-igmp-mld-snooping {
description
"State attributes for both IGMP and MLD Snooping of each
VLAN.";
leaf filter-mode {
type enumeration {
enum "include" {
description
"";
}
enum "exclude" {
description
"";
}
}
description "Allow (include) or block (exclude) filtering
";
}
leaf interface {
type if:interface-ref;
description
"The outgoing interface for L2 multicast stream.";
}
leaf up-time {
type uint32;
units seconds;
description "The up time for the interface.";
}
leaf last-join {
type uint32;
units seconds;
description "The last-join information collected since a
clear command was entered last time.";
}
leaf last-leave {
type uint32;
units seconds;
description "The last-leave information collected since a
clear command was entered last time.";
}
} // vlan-state-group-attributes-igmp-mld-snooping
grouping vlan-config-static-l2-multicast-group {
description
"Configures a L2 static connection to a multicast
receiver.";
list static-l2-multicast-group {
key group;
description "Multicast group IP address";
leaf group {
type inet:ipv4-address;
description
"Multicast group IP address";
}
leaf interface {
type if:interface-ref;
description
"Interface for static multicast group";
}
}
} //vlan-config-static-l2-multicast-group
/*
* Configuration data nodes
*/
container configuration
{
description
"IGMP and MLD Snooping configuration data.";
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.";
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;
}
leaf-list static-mrouter-interface {
type if:interface-ref;
description "Configures a static connection to a
multicast router. The interface to the router must be in the selected
VLAN. The interface is specified by type and number.";
}
uses vlan-config-static-l2-multicast-group {
if-feature static-l2-multicast-group;
}
} // vlan
} // vlans
} // igmp-snooping
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.";
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;
}
leaf-list static-mrouter-interface {
type if:interface-ref;
description "Configures a static connection to a
multicast router. The interface to the router must be in the selected
VLAN. The interface is specified by type and number.";
}
uses vlan-config-static-l2-multicast-group {
if-feature static-l2-multicast-group;
}
} // vlan
} // vlans
} // mld-snooping
} //
/*
* Operational state data nodes
*/
container state
{
config false;
description
"IGMP and MLD 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.";
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
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.";
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
} //
/*
* RPCs
*/
//clear ip igmp snooping statistics interface vlan-id
rpc clear-igmp-mld-snooping-statistics {
if-feature rpc-clear-statistics;
description
"Clears the specified IGMP and MLD Snooping statistics.";
input {
leaf vlan-id {
type uint16 {
range "1 .. 4094";
}
description
"VLAN ID, the range of which is 1 to 4094 ";
}
}
} // rpc clear-igmp-mld-snooping-statistics
/*
* Notifications
*/
}