<?xml version='1.0' encoding='utf-8'?> version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY RFC1112 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1112.xml"> nbsp    "&#160;">
  <!ENTITY RFC2236 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2236.xml"> zwsp   "&#8203;">
  <!ENTITY RFC2710 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2710.xml"> nbhy   "&#8209;">
  <!ENTITY RFC3376 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3376.xml">
<!ENTITY RFC3688 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml">
<!ENTITY RFC3810 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3810.xml">
<!ENTITY RFC4286 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4286.xml">
<!ENTITY RFC4541 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4541.xml">
<!ENTITY RFC5790 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5790.xml">
<!ENTITY RFC6020 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml">
<!ENTITY RFC6241 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC6242 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml">
<!ENTITY RFC6636 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6636.xml">
<!ENTITY RFC6991 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml">
<!ENTITY RFC7761 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7761.xml">
<!ENTITY RFC7950 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC8040 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml">
<!ENTITY RFC8294 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8294.xml">
<!ENTITY RFC8340 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml">
<!ENTITY RFC8341 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml">
<!ENTITY RFC8342 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml">
<!ENTITY RFC8343 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8343.xml">
<!ENTITY RFC8349 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml">
<!ENTITY RFC8446 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml">
<!ENTITY RFC8529 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8529.xml">
<!ENTITY I-D.ietf-bess-l2vpn-yang SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-bess-l2vpn-yang-10.xml">
<!ENTITY I-D.ietf-bess-l2vpn-yang SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-l2vpn-yang.xml">
<!ENTITY RFC3916 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3916.xml">
<!ENTITY RFC7951 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7951.xml">
<!ENTITY RFC8407 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8407.xml">
<!ENTITY RFC8652 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8652.xml"> wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-ietf-pim-igmp-mld-snooping-yang-20" number="9166" submissionType="IETF" docName="draft-ietf-pim-igmp-mld-snooping-yang-18" category="std" ipr="trust200902">
	<!-- Generated by id2xml 1.5.0 on 2020-08-27T22:26:26Z -->
	<?rfc strict="yes"?>
	<?rfc compact="yes"?>
	<?rfc subcompact="no"?>
	<?rfc symrefs="yes"?>
	<?rfc sortrefs="no"?>
	<?rfc text-list-symbols="*o+-"?>
	<?rfc toc="yes"?> consensus="true" ipr="trust200902" obsoletes="" updates="" xml:lang="en" symRefs="true" sortRefs="true" tocInclude="true" version="3">

  <front>
    <title abbrev="IGMP &amp; MLD Snooping Yang YANG Module">A Yang YANG Data Model for IGMP Internet Group Management Protocol (IGMP) and MLD Multicast Listener Discovery (MLD) Snooping</title>
    <seriesInfo name="RFC" value="9166"/>
    <author initials="H." surname="Zhao" fullname="Hongji Zhao">
	<organization>Ericsson
      <organization abbrev="Ericsson">Ericsson (China) Communications Company Ltd.</organization>
      <address>
        <postal>
          <street>Ericsson Tower, No. 5 Lize East Street</street>
            <city>Chaoyang District</city>
            <region>Beijing</region>
          <city>Beijing</city>
          <region/>
          <code>100102</code>
            <country>P.R. China</country>
          <country>China</country>
        </postal>
        <phone></phone>
        <phone/>
        <email>hongji.zhao@ericsson.com</email>
        <uri></uri>
        <uri/>
      </address>
    </author>
    <author initials="X." surname="Liu" fullname="Xufeng Liu">
	<organization>Volta Networks</organization>
      <organization>IBM Corporation</organization>
      <address>
        <postal>
            <street></street>
            <city></city>
            <region></region>
            <code></code>
            <country>USA</country>
          <street>2300 Dulles Station Blvd.</street>
          <city>Herndon</city>
          <region>VA</region>
          <code>20171</code>
          <country>United States of America</country>
        </postal>
        <phone></phone>
        <phone/>
        <email>xufeng.liu.ietf@gmail.com</email>
        <uri></uri>
        <uri/>
      </address>
    </author>
    <author initials="Y." surname="Liu" fullname="Yisong Liu">
      <organization>China Mobile</organization>
      <address>
        <postal>
            <street></street>
            <city></city>
            <region></region>
            <code></code>
          <street/>
          <city/>
          <region/>
          <code/>
          <country>China</country>
        </postal>
          <phone></phone>
        <phone/>
        <email>liuyisong@chinamobile.com</email>
          <uri></uri>
        <uri/>
      </address>
    </author>
    <author initials="A." surname="Peter" fullname="Anish Peter">
      <organization>Individual</organization>
      <address>
        <email>anish.ietf@gmail.com</email>
        <uri></uri>
        <uri/>
      </address>
    </author>
    <author initials="M." surname="Sivakumar" fullname="Mahesh Sivakumar">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>1133 Innovation Way</street>
          <city>Sunnyvale</city>
          <region>CA</region>
            <code></code>
            <country>USA</country>
          <code/>
          <country>United States of America</country>
        </postal>
        <phone></phone>
        <phone/>
        <email>sivakumar.mahesh@gmail.com</email>
        <uri></uri>
        <uri/>
      </address>
    </author>
    <date year="2020" month="September"/>
	<workgroup>PIM Working Group</workgroup>
	<abstract><t> month="January" year="2022"/>
    <area>RTG</area>
    <workgroup>PIM</workgroup>

    <keyword>YANG</keyword>
    <keyword>IGMP Snooping</keyword>
    <keyword>MLD Snooping</keyword>
    <keyword>multicast</keyword>
    <keyword>data model</keyword>
    <keyword>ietf-igmp-mld-snooping</keyword>
    <keyword>network management</keyword>
    <keyword>routing</keyword>

    <abstract>
      <t>
   This document defines a YANG data model that can be used to configure and
   manage Internet Group Management Protocol (IGMP) and Multicast Listener Discovery
   (MLD) Snooping snooping devices. The YANG module in this document conforms
   to the Network Management Datastore Architecture (NMDA).</t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction" anchor="sect-1"><t> anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   This document defines a YANG <xref target="RFC7950"/> target="RFC7950" format="default"/> data model for the management of
   Internet Group Management Protocol (IGMP)
   IGMP and Multicast Listener Discovery
   (MLD) Snooping MLD snooping <xref target="RFC4541"/> target="RFC4541" format="default"/> devices.</t>
      <t>
   The YANG module in this document conforms to the Network Management
   Datastore Architecture NMDA defined in <xref target="RFC8342"/>. target="RFC8342" format="default"/>. The "Network
   Management Datastore Architecture" (NMDA) NMDA adds the ability to inspect the
   current operational values for configuration, allowing clients to use
   identical paths for retrieving the configured values and the operational
   values.</t>
      <section title="Terminology" anchor="sect-1.1"><t> anchor="sect-1.1" numbered="true" toc="default">
        <name>Terminology</name>
        <t>
   The terminology for describing YANG data models is found in <xref target="RFC6020"/> target="RFC6020" format="default"/> and
   <xref target="RFC7950"/>, target="RFC7950" format="default"/>, including:

	<list style="symbols">

	<t>augment</t>

	<t>data model</t>

	<t>data node</t>

	<t>identity</t>

	<t>module</t>

	</list>

        </t>
        <ul spacing="normal">
          <li>augment</li>
          <li>data model</li>
          <li>data node</li>
          <li>identity</li>
          <li>module</li>
        </ul>
        <t>
   The following terminologies are used in this document:</t>

	<t><list style="hanging" hangIndent="6">

	<t hangText="mrouter:">multicast
        <dl newline="false" spacing="normal" indent="6">
          <dt>mrouter:</dt>
          <dd>multicast router, which is a router that has
        multicast routing enabled <xref target="RFC4286"/>.</t>

	<t hangText="mrouter interfaces:">snooping target="RFC4286" format="default"/>.</dd>
          <dt>mrouter interfaces:</dt>
          <dd>snooping switch ports where
        multicast routers are attached <xref target="RFC4541"/>.</t>

	</list>
	</t> target="RFC4541" format="default"/>.</dd>
        </dl>
        <t>
   The following abbreviations are used in this document and defined model:</t>

	<t>
   IGMP: Internet

     <dl>
  <dt>IGMP:</dt><dd>Internet Group Management Protocol <xref target="RFC3376"/>.</t>

        <t>
   MLD:	Multicast target="RFC3376" format="default"/>.</dd>

  <dt>MLD:</dt><dd>Multicast Listener Discovery <xref target="RFC3810"/>.</t>

	<t>
   AC: Attachment Circuit <xref target="RFC3916"/>.</t>

	<t>
   PW: Pseudo Wire <xref target="RFC3916"/>.</t> target="RFC3810" format="default"/>.</dd>
      </dl>

      </section>
      <section title="Tree Diagrams" anchor="sect-1.2"><t> anchor="sect-1.2" numbered="true" toc="default">
        <name>Tree Diagrams</name>
        <t>
   Tree diagrams used in this document follow the notation defined in
   <xref target="RFC8340"/>.</t> target="RFC8340" format="default"/>.</t>
      </section>
      <section title="Prefixes anchor="sect-1.3" numbered="true" toc="default">
        <name>Prefixes in Data Node Names" anchor="sect-1.3"><t> Names</name>
        <t>
   In this document, names of data nodes, actions, and other data model
   objects are often used without a prefix, as long as it is clear from the
   context in which YANG module each name is defined. Otherwise, names are
   prefixed using the standard prefix associated with the corresponding YANG
   module, as shown in Table 1.<!--
   draft-ietf-pim-igmp-mld-snooping-yang-18-manual.txt(159): Warning: Unexpected
   title: expected 'Figure ...', found 'Table 1: Prefixes and Corresponding YANG
   Modules'.  This looks like a figure that has been entered as a texttable.
   The generated XML will need adjustment.
   --></t>

	<figure title="Prefixes <xref target="tab-1"/>.
        </t>
           <table anchor="tab-1">

          <name>Prefixes and Corresponding YANG Modules" anchor="tab-1"><artwork><![CDATA[
+----------+-----------------------+---------------------------------+
| Prefix   | YANG module           | Reference                       |
+==========+=======================+=================================+
| inet     | ietf-inet-types       | [RFC6991]                       |
+----------+-----------------------+---------------------------------+
| yang     | ietf-yang-types       | [RFC6991]                       |
+----------+-----------------------+---------------------------------+
| if       | ietf-interfaces       | [RFC8343]                       |
+----------+-----------------------+---------------------------------+
| rt       | ietf-routing          | [RFC8349]                       |
+----------+-----------------------+---------------------------------+
| rt-types | ietf-routing-types    | [RFC8294]
+----------+-----------------------+---------------------------------+
| ni       | ietf-network-instance | [RFC8529]                       |
+----------+-----------------------+---------------------------------+
| pw       | ietf-pseudowires      | [draft-ietf-bess-l2vpn-yang]    |
+----------+-----------------------+---------------------------------+
| l2vpn    | ietf-l2vpn            | [draft-ietf-bess-l2vpn-yang]    |
+----------+-----------------------+---------------------------------+
| dot1q    | ieee802-dot1q-bridge  | [dot1Qcp]                       |
+----------+-----------------------+---------------------------------+
]]></artwork>
	</figure> Modules</name>

            <thead>
              <tr>
                <th>Prefix</th>
                <th>YANG module</th>
                <th>Reference</th>
              </tr>
            </thead>
            <tbody>
            <tr>
              <td>inet</td>
              <td>ietf-inet-types</td>
              <td><xref target="RFC6991"/></td>
            </tr>
            <tr>
              <td>yang</td>
              <td>ietf-yang-types</td>
              <td><xref target="RFC6991"/></td>
            </tr>
            <tr>
              <td>if</td>
              <td>ietf-interfaces</td>
              <td><xref target="RFC8343"/></td>
            </tr>
            <tr>
              <td>rt</td>
              <td>ietf-routing</td>
              <td><xref target="RFC8349"/></td>
            </tr>
            <tr>
              <td>rt-types</td>
              <td>ietf-routing-types</td>
              <td><xref target="RFC8294"/></td>
            </tr>
            <tr>
              <td>dot1q</td>
              <td>ieee802-dot1q-bridge</td>
              <td><xref target="dot1Qcp"/></td>
            </tr>
            </tbody>
           </table>
      </section>
    </section>
    <section title="Design anchor="sect-2" numbered="true" toc="default">
      <name>Design of Data Model" anchor="sect-2"><t> Model</name>
      <t>
   An IGMP/MLD snooping switch <xref target="RFC4541"/> target="RFC4541" format="default"/> analyzes IGMP/MLD packets and sets up
   forwarding tables for multicast traffic. If a switch does not run IGMP/MLD
   snooping, multicast traffic will be flooded in the broadcast domain. If a
   switch runs IGMP/MLD snooping, multicast traffic will be forwarded based on
   the forwarding tables to avoid wasting bandwidth. The IGMP/MLD snooping
   switch does not need to run any of the IGMP/MLD protocols. Because the
   IGMP/MLD snooping is independent of the IGMP/MLD protocols, the data model
   defined in this document does not augment, or even require, the IGMP/MLD
   data model defined in <xref target="RFC8652"/>. target="RFC8652" format="default"/>.  The model covers considerations for
   Internet Group Management Protocol (IGMP) IGMP and Multicast Listener Discovery
   (MLD) Snooping Switches MLD snooping switches <xref target="RFC4541"/>.</t> target="RFC4541" format="default"/>.</t>
      <t>
   IGMP and MLD snooping switches do not adhere to the conceptual model that
   provides the strict separation of functionality between different
   communications layers in the ISO model, model and instead utilize information in
   the upper level upper-level protocol headers as factors to be considered in processing
   at the lower levels <xref target="RFC4541"/>.</t> target="RFC4541" format="default"/>.</t>
      <t>
   IGMP Snooping snooping switches utilize IGMP, IGMP and could support IGMPv1 <xref
   target="RFC1112"/>, target="RFC1112" format="default"/>, IGMPv2 <xref target="RFC2236"/>, target="RFC2236" format="default"/>, and IGMPv3 <xref
   target="RFC3376"/>. target="RFC3376" format="default"/>. MLD Snooping snooping switches utilize MLD, MLD and could support
   MLDv1 <xref target="RFC2710"/> target="RFC2710" format="default"/> and MLDv2 <xref target="RFC3810"/>. target="RFC3810" format="default"/>. The goal
   of this document is to define a data model that provides a common user
   interface to IGMP and MLD Snooping.</t> snooping.</t>
      <section title="Overview" anchor="sect-2.1"><t> anchor="sect-2.1" numbered="true" toc="default">
        <name>Overview</name>
        <t>
   The YANG module on IGMP and MLD Snooping YANG module snooping defined in this document has all the
        common building blocks for the IGMP and MLD Snooping snooping switches.</t>
   <t>
   The YANG module includes an IGMP and MLD Snooping snooping instance definition, using definition that uses the instance in the L2 service type of BRIDGE <xref target="dot1Qcp"/> and L2VPN bridge <xref target="I-D.ietf-bess-l2vpn-yang"/>. The module target="dot1Qcp" format="default"/>. It also includes actions for clearing
        IGMP and MLD Snooping snooping group tables.</t>
        <t>The YANG module doesn't cover L2VPN, which will be specified in a separate document.
        </t>
      </section>
      <section title="Optional Capabilities" anchor="sect-2.2"><t> anchor="sect-2.2" numbered="true" toc="default">
        <name>Optional Capabilities</name>
        <t>
   This model is designed to represent the basic capability subsets of IGMP
   and MLD Snooping. snooping. The main design goals of this document are that the basic
   capabilities described in the model are supported by any major now-existing
   implementation,
   implementation and that the configuration of all implementations meeting
   the specifications is easy to express through some combination of the
   optional features in the model and simple vendor augmentations.</t>
        <t>
   There is also value in widely supported features being standardized, standardized to
   provide a standardized way to access these features, to save work for
   individual vendors, and so to ensure that mapping between different vendors'
   configuration is not needlessly complicated. Therefore, this model declares
   a number of features representing capabilities that not all deployed
   devices support.</t>
        <t>
   The extensive use of feature declarations should also substantially
   simplify the capability negotiation process for a vendor's IGMP and MLD
   Snooping
   snooping implementations.</t>
        <t>
   On the other hand, operational state parameters are not so widely
   designated as features, as there are many cases where the defaulting of an
   operational state parameter would not cause any harm to the system, and it
   is much more likely that an implementation without native intrinsic support for a
   piece of operational state would be able to derive a suitable value for a
   state variable that is not natively intrinsically supported.</t>
      </section>
      <section title="Position anchor="sect-2.3" numbered="true" toc="default">
        <name>Position of Address Family in Hierarchy" anchor="sect-2.3"><t> Hierarchy</name>
        <t>
   IGMP Snooping snooping only supports IPv4, while MLD Snooping snooping only supports IPv6.
   The data model defined in this document can be used for both IPv4 and IPv6
   address families.</t>
        <t>
   This document defines IGMP Snooping snooping and MLD Snooping snooping as separate schema
   branches in the structure. The benefits are:

   <list style="symbols">

	<t>The

        </t>
        <ul spacing="normal">
          <li>The model can support IGMP Snooping snooping (IPv4), MLD Snooping snooping (IPv6), or
        both optionally and independently. Such flexibility cannot be achieved
        cleanly with a combined branch.</t>

	<t>The branch.</li>
          <li>The structure is consistent with other YANG data models such as
        <xref target="RFC8652"/>, target="RFC8652" format="default"/>, which uses separate branches for IPv4 and
	IPv6.</t>

	<t>Having
        IPv6.</li>
          <li>Having separate branches for IGMP Snooping snooping and MLD Snooping snooping allows
        minor differences in their behavior to be modelled modeled more simply and
        cleanly. The two branches can better support different features and
        node types.</t>

   </list>
   </t> types.</li>
        </ul>
      </section>
    </section>
    <section title="Module Structure" anchor="sect-3"> anchor="sect-3" numbered="true" toc="default">
      <name>Module Structure</name>
      <t>This model augments the core routing data model specified in <xref target="RFC8349"/>.</t>

	<figure><artwork><![CDATA[ target="RFC8349" format="default"/>.</t>
      <sourcecode type="yangtree"><![CDATA[
   +--rw routing
      +--rw router-id?
      +--rw control-plane-protocols
      |  +--rw control-plane-protocol* [type name]
      |     +--rw type
      |     +--rw name
      |     +--rw igmp-snooping-instance <= Augmented by this Model
                     ...
      |     +--rw mld-snooping-instance   <= Augmented by this Model
                     ...
]]></artwork>
	</figure>
]]></sourcecode>
      <t>
   The "igmp-snooping-instance" container instantiates an IGMP Snooping
   Instance. snooping
   instance. The "mld-snooping-instance" container instantiates an MLD
   Snooping Instance.</t>
   snooping instance.</t>
      <t>
   The YANG data model defined in this document conforms to the Network
   Management Datastore Architecture (NMDA) NMDA <xref target="RFC8342"/>. target="RFC8342" format="default"/>. The operational state
   data is combined with the associated configuration data in the same
   hierarchy <xref target="RFC8407"/>.</t> target="RFC8407" format="default"/>.</t>
      <section title="IGMP anchor="sect-3.1" numbered="true" toc="default">
        <name>IGMP Snooping Instances" anchor="sect-3.1"><t> Instances</name>
        <t>
   The YANG module ietf-igmp-mld-snooping augments
   /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol to add the
   igmp-snooping-instance container.</t>
        <t>
   All the IGMP Snooping related snooping-related attributes have been defined in the
   igmp-snooping-instance. The read-write attributes represent configurable
   data. The read-only attributes represent state data.</t>
        <t>
	One igmp-snooping-instance could be used in one BRIDGE <xref target="dot1Qcp"/> instance
   or L2VPN bridge <xref target="I-D.ietf-bess-l2vpn-yang"/> instance. One igmp-snooping-instance target="dot1Qcp" format="default"/> instance, and it corresponds to one BRIDGE instance or one L2VPN bridge instance.</t>
	  <t>
   The
   Currently, the value of l2-service-type in igmp-snooping-instance is bridge or
   l2vpn. When it is bridge, igmp-snooping-instance will could only be used in the BRIDGE
   service. When set to 'bridge'. After it is l2vpn, set, igmp-snooping-instance will could be used in the L2VPN bridge
   service.</t>
        <t>
   The values of bridge-mrouter-interface, l2vpn-mrouter-interface-ac,
   l2vpn-mrouter-interface-pw bridge-mrouter-interface are filled by the snooping device
   dynamically. They are It is different from static-bridge-mrouter-interface,
   static-l2vpn-mrouter-interface-ac, and static-l2vpn-mrouter-interface-pw
   which are is configured.</t>
        <t>
   The attributes under the interfaces show the statistics of IGMP Snooping
   related snooping-related packets.</t>

	<figure><artwork><![CDATA[
        <sourcecode type="yangtree"><![CDATA[
augment /rt:routing/rt:control-plane-protocols
         /rt:control-plane-protocol:
  +--rw igmp-snooping-instance {igmp-snooping}?
     +--rw l2-service-type?                     l2-service-type
     +--rw enable? enabled?                             boolean
     +--rw forwarding-table-type?               enumeration
     +--rw explicit-tracking?                   boolean
     |       {explicit-tracking}?
     +--rw lite-exclude-filter?                 empty
     |       {lite-exclude-filter}?
     +--rw send-query?                          boolean
     +--rw immediate-leave? fast-leave?                          empty
     |       {immediate-leave}? {fast-leave}?
     +--rw last-member-query-interval?          uint16
     +--rw query-interval?                      uint16
     +--rw query-max-response-time?             uint16
     +--rw require-router-alert?                boolean
     |       {require-router-alert}?
     +--rw robustness-variable?                 uint8
     +--rw static-bridge-mrouter-interface*     if:interface-ref
     |       {static-mrouter-interface}?
     +--rw static-l2vpn-mrouter-interface-ac*   if:interface-ref
     |       {static-mrouter-interface}?
     +--rw static-l2vpn-mrouter-interface-pw*   pw:pseudowire-ref
     |       {static-mrouter-interface}?
     +--rw igmp-version?                        uint8
     +--rw querier-source?                      inet:ipv4-address
     +--rw static-l2-multicast-group* [group source-addr]
     |       {static-l2-multicast-group}?
     |  +--rw group
     |  |       rt-types:ipv4-multicast-group-address
     |  +--rw source-addr
     |  |       rt-types:ipv4-multicast-source-address
     |  +--rw bridge-outgoing-interface*   if:interface-ref
     |  +--rw l2vpn-outgoing-ac*           if:interface-ref
     |  +--rw l2vpn-outgoing-pw*           pw:pseudowire-ref
     +--ro entries-count?                       yang:gauge32
     +--ro bridge-mrouter-interface*            if:interface-ref
     +--ro l2vpn-mrouter-interface-ac*          if:interface-ref
     +--ro l2vpn-mrouter-interface-pw*          pw:pseudowire-ref
     +--ro group* [address]
     |  +--ro address
     |  |       rt-types:ipv4-multicast-group-address
     |  +--ro mac-address?     yang:phys-address
     |  +--ro expire?          rt-types:timer-value-seconds16
     |  +--ro up-time          uint32
     |  +--ro last-reporter?   inet:ipv4-address
     |  +--ro source* [address]
     |     +--ro address
     |     |       rt-types:ipv4-multicast-source-address
     |     +--ro bridge-outgoing-interface*   if:interface-ref
     |     +--ro l2vpn-outgoing-ac*           if:interface-ref
     |     +--ro l2vpn-outgoing-pw*           pw:pseudowire-ref
     |     +--ro up-time                      uint32
     |     +--ro expire?
     |     |       rt-types:timer-value-seconds16
     |     +--ro host-count?                  yang:gauge32
     |     |       {explicit-tracking}?
     |     +--ro last-reporter?               inet:ipv4-address
     |     +--ro host* [host-address] [address] {explicit-tracking}?
     |        +--ro host-address address        inet:ipv4-address
     |        +--ro host-filter-mode filter-mode    filter-mode-type
     +--ro interfaces
        +--ro interface* [name]
           +--ro name          if:interface-ref
           +--ro statistics
              +--ro discontinuity-time?   yang:date-and-time
              +--ro received
              |  +--ro query-count?                  yang:counter64
              |  +--ro membership-report-v1-count?   yang:counter64
              |  +--ro membership-report-v2-count?   yang:counter64
              |  +--ro membership-report-v3-count?   yang:counter64
              |  +--ro leave-count?                  yang:counter64
              |  +--ro pim-hello-count?              yang:counter64
              +--ro sent
                 +--ro query-count?                  yang:counter64
                 +--ro membership-report-v1-count?   yang:counter64
                 +--ro membership-report-v2-count?   yang:counter64
                 +--ro membership-report-v3-count?   yang:counter64
                 +--ro leave-count?                  yang:counter64
                 +--ro pim-hello-count?              yang:counter64
]]></artwork>
	</figure>
]]></sourcecode>
      </section>
      <section title="MLD anchor="sect-3.2" numbered="true" toc="default">
        <name>MLD Snooping Instances" anchor="sect-3.2"><t> Instances</name>
        <t>
   The YANG module ietf-igmp-mld-snooping augments
   /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol to add the
   mld-snooping-instance container. The mld-snooping-instance could be used in
   the BRIDGE <xref target="dot1Qcp"/> or L2VPN bridge <xref target="I-D.ietf-bess-l2vpn-yang"/> target="dot1Qcp" format="default"/> service to
   enable MLD Snooping.</t> snooping.</t>
        <t>
   All the MLD Snooping related snooping-related attributes have been defined in the
   mld-snooping-instance. The read-write attributes represent configurable
   data. The read-only attributes represent state data.</t>
        <t>
   The mld-snooping-instance has a similar structure as to IGMP snooping. Some of
   leaves are protocol related. The mld-snooping-instance uses IPv6 addresses
   and mld-version, while igmp-snooping-instance uses IPv4 addresses and
   igmp-version. Statistic counters in each of the above snooping instances
   are also tailored to the specific protocol type. One mld-snooping-instance
   could be used in one BRIDGE bridge instance or L2VPN instance. One
   mld-snooping-instance and corresponds to one BRIDGE instance or L2VPN bridge instance.</t>

   <t>
   The
   Currently, the value of l2-service-type in mld-snooping-instance is bridge or
   l2vpn. When it is bridge, mld-snooping-instance will could only be used in the BRIDGE
   service. When set to 'bridge'. After it is l2vpn, set, mld-snooping-instance will could be used in the L2VPN bridge
   service.</t>
        <t>
   The values value of bridge-mrouter-interface, l2vpn-mrouter-interface-ac,
   l2vpn-mrouter-interface-pw are bridge-mrouter-interface is filled by the snooping device
   dynamically. They are It is different from static-bridge-mrouter-interface,
   static-l2vpn-mrouter-interface-ac, and static-l2vpn-mrouter-interface-pw
   which are is configured.</t>
        <t>
   The attributes under the interfaces show the statistics of MLD Snooping
   related snooping-related packets.</t>

	<figure><artwork><![CDATA[
        <sourcecode type="yangtree"><![CDATA[
augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol:
  +--rw mld-snooping-instance {mld-snooping}?
  +--rw l2-service-type?                          l2-service-type
     +--rw enable? enabled?                             boolean
     +--rw forwarding-table-type?               enumeration
     +--rw explicit-tracking?                   boolean
     |       {explicit-tracking}?
     +--rw lite-exclude-filter?                 empty
     |       {lite-exclude-filter}?
     +--rw send-query?                          boolean
     +--rw immediate-leave? fast-leave?                          empty
       |       {immediate-leave}? {fast-leave}?
     +--rw last-member-query-interval?          uint16
     +--rw query-interval?                      uint16
     +--rw query-max-response-time?             uint16
     +--rw require-router-alert?                boolean
     |       {require-router-alert}?
     +--rw robustness-variable?                 uint8
     +--rw static-bridge-mrouter-interface*     if:interface-ref
     |       {static-mrouter-interface}?
     +--rw static-l2vpn-mrouter-interface-ac*   if:interface-ref
       |       {static-mrouter-interface}?
       +--rw static-l2vpn-mrouter-interface-pw*   pw:pseudowire-ref
       |       {static-mrouter-interface}?
       +--rw mld-version?                         uint8
     +--rw querier-source?                      inet:ipv6-address
     +--rw static-l2-multicast-group* [group source-addr]
     |       {static-l2-multicast-group}?
     |  +--rw group
     |  |       rt-types:ipv6-multicast-group-address
     |  +--rw source-addr
     |  |       rt-types:ipv6-multicast-source-address
     |  +--rw bridge-outgoing-interface*   if:interface-ref
       |  +--rw l2vpn-outgoing-ac*           if:interface-ref
       |  +--rw l2vpn-outgoing-pw*           pw:pseudowire-ref
     +--ro entries-count?                       yang:gauge32
     +--ro bridge-mrouter-interface*            if:interface-ref
     +--ro l2vpn-mrouter-interface-ac*          if:interface-ref
       +--ro l2vpn-mrouter-interface-pw*          pw:pseudowire-ref
       +--ro group* [address]
     |  +--ro address
     |  |       rt-types:ipv6-multicast-group-address
     |  +--ro mac-address?     yang:phys-address
     |  +--ro expire?          rt-types:timer-value-seconds16
     |  +--ro up-time          uint32
     |  +--ro last-reporter?   inet:ipv6-address
     |  +--ro source* [address]
     |     +--ro address
     |     |       rt-types:ipv6-multicast-source-address
     |     +--ro bridge-outgoing-interface*   if:interface-ref
     |     +--ro l2vpn-outgoing-ac*           if:interface-ref
       |     +--ro l2vpn-outgoing-pw*           pw:pseudowire-ref
       |     +--ro up-time                      uint32
     |     +--ro expire?
     |     |       rt-types:timer-value-seconds16
     |     +--ro host-count?                  yang:gauge32
     |     |       {explicit-tracking}?
     |     +--ro last-reporter?               inet:ipv6-address
     |     +--ro host* [host-address] [address]       {explicit-tracking}?
     |        +--ro host-address address             inet:ipv6-address
     |        +--ro host-filter-mode filter-mode    filter-mode-type
     +--ro interfaces
        +--ro interface* [name]
           +--ro name          if:interface-ref
           +--ro statistics
              +--ro discontinuity-time?   yang:date-and-time
              +--ro received
              |  +--ro query-count?       yang:counter64
              |  +--ro report-v1-count?   yang:counter64
              |  +--ro report-v2-count?   yang:counter64
              |  +--ro done-count?        yang:counter64
              |  +--ro pim-hello-count?   yang:counter64
              +--ro sent
                 +--ro query-count?       yang:counter64
                 +--ro report-v1-count?   yang:counter64
                 +--ro report-v2-count?   yang:counter64
                 +--ro done-count?        yang:counter64
                 +--ro pim-hello-count?   yang:counter64
]]></artwork>
	</figure>
]]></sourcecode>
      </section>
      <section title="Using anchor="sect-3.3" numbered="true" toc="default">
        <name>Using IGMP and MLD Snooping Instances" anchor="sect-3.3"><t> Instances</name>
        <t>
	The igmp-snooping-instance could be used in the service of BRIDGE <xref target="dot1Qcp"/>
   or L2VPN bridge <xref target="I-D.ietf-bess-l2vpn-yang"/> target="dot1Qcp" format="default"/> to configure the IGMP Snooping.</t> snooping.</t>
        <t>
   For the BRIDGE service bridge service, this model augments /dot1q:bridges/dot1q:bridge to
   use igmp-snooping-instance. It means IGMP Snooping snooping is enabled in the whole bridge.</t>
        <t>
   It also augments /dot1q:bridges/dot1q:bridge/dot1q:component/
   dot1q:bridge-vlan/dot1q:vlan /dot1q:bridges/dot1q:bridge/dot1q:component/dot1q:bridge-vlan/dot1q:vlan to use igmp-snooping-instance. It means IGMP
   Snooping
   snooping is enabled in the specified VLAN on the bridge.</t>

<figure><artwork><![CDATA[

   <t>The mld-snooping-instance could be used in concurrence with igmp-snooping-instance to configure the MLD snooping.
   </t>

   <sourcecode name="" type="yangtree"><![CDATA[
augment /dot1q:bridges/dot1q:bridge:
  +--rw igmp-snooping-instance?   igmp-mld-snooping-instance-ref
  +--rw mld-snooping-instance?    igmp-mld-snooping-instance-ref

augment /dot1q:bridges/dot1q:bridge/dot1q:component
          /dot1q:bridge-vlan/dot1q:vlan:
  +--rw igmp-snooping-instance?   igmp-mld-snooping-instance-ref
  +--rw mld-snooping-instance?    igmp-mld-snooping-instance-ref
]]></artwork></figure>

	<t>
   For the L2VPN service this model augments /ni:network-instances/
   ni:network-instance/ni:ni-type/l2vpn:l2vpn <xref target="RFC8529"/> to use
   igmp-snooping-instance. It means IGMP Snooping is enabled in the specified
   l2vpn instance.</t>

<figure><artwork><![CDATA[
   augment /ni:network-instances/ni:network-instance/ni:ni-type
             /l2vpn:l2vpn:
     +--rw igmp-snooping-instance?">   igmp-mld-snooping-instance-ref
     +--rw mld-snooping-instance?      igmp-mld-snooping-instance-ref
]]></artwork></figure>

	<t>
   The mld-snooping-instance could be used in concurrence with
   igmp-snooping-instance to configure the MLD Snooping.</t>
]]></sourcecode>
      </section>
      <section title="IGMP anchor="sect-3.4" numbered="true" toc="default">
        <name>IGMP and MLD Snooping Actions" anchor="sect-3.4"><t> Actions</name>
        <t>
   IGMP and MLD Snooping snooping actions clear the specified IGMP and MLD Snooping snooping
   group tables. If both source X and group Y are specified, only source X
   from group Y in that specific instance will be cleared.</t>

<figure><artwork><![CDATA[
<sourcecode name="" type="yangtree"><![CDATA[
augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol:
  +--rw igmp-snooping-instance {igmp-snooping}?
     +---x clear-igmp-snooping-groups {action-clear-groups}?
        +---w input
           +---w group     union
           +---w source    rt-types:ipv4-multicast-source-address

augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol:
  +--rw mld-snooping-instance {mld-snooping}?
     +---x clear-mld-snooping-groups {action-clear-groups}?
        +---w input
           +---w group     union
           +---w source    rt-types:ipv6-multicast-source-address
]]></artwork></figure>
]]></sourcecode>
      </section>
    </section>
    <section title="IGMP anchor="sect-4" numbered="true" toc="default">
      <name>IGMP and MLD Snooping YANG Module" anchor="sect-4"> Module</name>
      <t>

   This module references [RFC1112],[RFC2236],[RFC2710],[RFC3376],
   [RFC3810],[RFC4541],<xref target="RFC5790"/>,<xref target="RFC6636"/>,<xref
   target="RFC6991"/>,<xref target="RFC7761"/>, <xref
   target="RFC8343"/>,[RFC8529],[dot1Qcp], and
   [draft-ietf-bess-l2vpn-yang].</t>

<figure><artwork><![CDATA[
<CODE BEGINS> file ietf-igmp-mld-snooping@2020-08-07.yang <xref target="RFC1112"/>, <xref target="RFC2236"/>, <xref target="RFC2710"/>, <xref target="RFC3376"/>,
      <xref target="RFC3810"/>, <xref target="RFC4541"/>, <xref target="RFC5790" format="default"/>, <xref target="RFC6636" format="default"/>, <xref target="RFC6991" format="default"/>, <xref target="RFC7761" format="default"/>, <xref target="RFC8343" format="default"/>, and <xref target="dot1Qcp"/>.</t>

<sourcecode name="ietf-igmp-mld-snooping@2021-12-20.yang" type="yang" markers="true"><![CDATA[
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"; inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-yang-types {
    prefix "yang"; yang;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-interfaces {
    prefix "if"; if;
    reference
      "RFC 8343: A YANG Data Model for Interface Management";
  }
  import ietf-routing {
    prefix "rt"; rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management (NMDA
       Version)";
  }
  import ietf-routing-types {
    prefix "rt-types"; rt-types;
    reference
      "RFC 8294: Common YANG Data Types for the Routing Area";
  }
  import ietf-l2vpn {
    prefix "l2vpn";
    reference
      "draft-ietf-bess-l2vpn-yang: YANG Data Model for MPLS-based
L2VPN";
  }

  import ietf-network-instance {
    prefix "ni";
    reference
      "RFC 8529: YANG Data Model for Network Instances";
  }

  import ietf-pseudowires {
    prefix "pw";
    reference
      "draft-ietf-bess-l2vpn-yang: YANG Data Model for MPLS-based
L2VPN";
  }

  import ieee802-dot1q-bridge {
    prefix "dot1q"; dot1q;
    reference
      "dot1Qcp: IEEE 802.1Qcp-2018 Bridges Standard for Local and
       Metropolitan area networks--Bridges and Bridged Networks
                - Amendment:
       --Amendment 30: YANG Data Model";
  }

  organization
    "IETF PIM Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/pim/>   <http://datatracker.ietf.org/wg/pim/>
     WG List:  <mailto:pim@ietf.org>

     Editors:  Hongji Zhao
               <mailto:hongji.zhao@ericsson.com>

               Xufeng Liu
               <mailto:xufeng.liu.ietf@gmail.com>

               Yisong Liu
               <mailto:liuyisong@chinamobile.com>

               Anish Peter
               <mailto:anish.ietf@gmail.com>

               Mahesh Sivakumar
               <mailto:sivakumar.mahesh@gmail.com>

    ";
  description
    "The module defines a collection of YANG definitions common for
     all devices that implement Internet Group Management Protocol
     (IGMP) and Multicast Listener Discovery (MLD) Snooping snooping, which is
     described in RFC 4541.

     Copyright (c) 2020 2021 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; 9166; see the
     RFC itself for full legal notices.";

  revision 2020-08-07 2021-12-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: 9166: A YANG Data Model for IGMP Internet Group Management
       Protocol (IGMP) and MLD Multicast Listener Discovery (MLD)
       Snooping";
  }

  /*
   * Features
   */

  feature igmp-snooping {
    description
      "Support IGMP snooping.";
    reference
      "RFC 4541"; 4541: Considerations for Internet Group Management
       Protocol (IGMP) and Multicast Listener Discovery (MLD)
       Snooping Switches";
  }

  feature mld-snooping {
    description
      "Support MLD snooping.";
    reference
      "RFC 4541"; 4541: Considerations for Internet Group Management
       Protocol (IGMP) and Multicast Listener Discovery (MLD)
       Snooping Switches";
  }

  feature immediate-leave fast-leave {
    description
      "Support configuration of fast leave.  The fast leave feature
       does not send last member query messages to hosts.";
    reference
      "RFC 3376"; 3376: Internet Group Management Protocol, Version 3";
  }

  feature static-l2-multicast-group {
    description
      "Support configuration of static L2 multicast static-group."; group.";
  }

  feature static-mrouter-interface {
    description
      "Support multicast router interface explicitly configured
       by management"; management.";
    reference
      "RFC 4541"; 4541: Considerations for Internet Group Management
       Protocol (IGMP) and Multicast Listener Discovery (MLD)
       Snooping Switches";
  }

  feature action-clear-groups {
    description
      "Support clearing statistics by action for IGMP & and MLD
       snooping.";
  }

  feature require-router-alert {
    description
      "Support configuration of require-router-alert.";
    reference
      "RFC 3376"; 3376: Internet Group Management Protocol, Version 3";
  }

  feature lite-exclude-filter {
    description
      "Enable the support of the simplified EXCLUDE filter.";
    reference
      "RFC 5790"; 5790: Lightweight Internet Group Management Protocol
       Version 3 (IGMPv3) and Multicast Listener Discovery Version
       2 (MLDv2) Protocols";
  }

  feature explicit-tracking {
    description
      "Support configuration of per instance per-instance explicit-tracking.";
    reference
      "RFC 6636"; 6636: Tuning the Behavior of the Internet Group Management
       Protocol (IGMP) and Multicast Listener Discovery (MLD) for
       Routers in Mobile and Wireless Networks";
  }

  /* identities */

  identity l2-service-type {
    description
      "Base identity for L2 service type in IGMP & and MLD snooping"; snooping.";
  }

  identity bridge {
    base l2-service-type;
    description
      "This identity represents BRIDGE service.";
  }

  identity l2vpn {
    base l2-service-type;
    description
      "This identity represents L2VPN bridge service.";
  }

  identity filter-mode {
    description
      "Base identity for filter mode in IGMP & and MLD snooping"; 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"; snooping.";
  }

  identity mld-snooping {
    base rt:control-plane-protocol;
    description
      "MLD snooping"; snooping.";
  }

  /*
   * Typedefs
   */

  typedef l2-service-type {
    type identityref {
      base "l2-service-type"; l2-service-type;
    }
    description
      "The L2 service type used with IGMP & and MLD snooping ";
       snooping.";
  }

  typedef filter-mode-type {
    type identityref {
      base "filter-mode"; filter-mode;
    }
    description
      "The host filter mode"; mode.";
  }

  typedef igmp-mld-snooping-instance-ref {
    type leafref {
      path "/rt:routing/rt:control-plane-protocols"+ "/rt:routing/rt:control-plane-protocols"
         + "/rt:control-plane-protocol/rt:name";
    }
    description
      "This type is used by data models which that need to
       reference IGMP & or MLD snooping instance.";
  }

  /*
   * Groupings
   */

  grouping instance-config-attributes-igmp-mld-snooping {
    description
      "IGMP and MLD snooping configuration of each VLAN.";
    leaf enable enabled {
      type boolean;
      default false; "false";
      description
        "Set the value to true to enable IGMP & and MLD snooping.";
    }
    leaf forwarding-table-type {
      type enumeration {
        enum "mac" mac {
          description
            "MAC-based lookup mode"; mode.";
        }
        enum "ip" ip {
          description
            "IP-based lookup mode"; mode.";
        }
      }
      default "ip";
      description
        "The default forwarding table type is ip"; ip.";
    }
    leaf explicit-tracking {
      if-feature explicit-tracking; "explicit-tracking";
      type boolean;
      default false; "false";
      description
        "Track the IGMPv3 and MLDv2 snooping membership reports
         from individual hosts.  It contributes to saving network
         resources and shortening leave latency.";
    }
    leaf lite-exclude-filter {
      if-feature lite-exclude-filter; "lite-exclude-filter";
      type empty;
      description
        "For IGMP Snooping, snooping, the presence of this
         leaf enables the support of the simplified EXCLUDE filter
         in the Lightweight IGMPv3 protocol, which simplifies the
         standard versions of IGMPv3.
         For MLD Snooping, the presence of this
         leaf enables the support of the simplified EXCLUDE filter
         in the Lightweight MLDv2 protocol, which simplifies the
         standard versions of MLDv2.";
      reference
        "RFC 5790"; 5790: Lightweight Internet Group Management Protocol
         Version 3 (IGMPv3) and Multicast Listener Discovery Version
         2 (MLDv2) Protocols";
    }
    leaf send-query {
      type boolean;
      default false; "false";
      description
        "Enable quick response for topology changes.
         To support IGMP snooping in
        "When it is true, this switch will send out a VLAN where PIM and periodic IGMP are
         not configured. It cooperates with parameter querier-source.";
         General Query Message or MLD General Query Message.";
    }
    leaf immediate-leave fast-leave {
      if-feature immediate-leave; "fast-leave";
      type empty;
      description
        "When immediate 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 "10..10230";
      }
      units deciseconds; "deciseconds";
      default 10; "10";
      description
        "Last Member Query Interval, which may be tuned to modify
         the leave latency of the network.
         It is represented in units of 1/10 second.";
      reference
        "RFC 3376. Sec. 8.8."; 3376: Internet Group Management Protocol, Version 3,
         Section 8.8";
    }
    leaf query-interval {
      type uint16;
      units seconds; "seconds";
      default 125; "125";
      description
        "The Query Interval is the interval between General Queries
         sent by the Querier.";
      reference
        "RFC 3376. Sec. 3376: Internet Group Management Protocol, Version 3,
         Sections 4.1.7, 8.2, 8.14.2."; and 8.14.2";
    }
    leaf query-max-response-time {
      type uint16;
      units deciseconds; "deciseconds";
      default 100; "100";
      description
        "Query maximum response time specifies the maximum time
         allowed before sending a responding report.
         It is represented in units of 1/10 second.";
      reference
        "RFC 3376. Sec. 3376: Internet Group Management Protocol, Version 3,
         Sections 4.1.1, 8.3, 8.14.3."; and 8.14.3";
    }
    leaf require-router-alert {
      if-feature require-router-alert; "require-router-alert";
      type boolean;
      default false; "false";
      description
        "When the value is true, a router alert should exist
         in the IP header of the IGMP or MLD packet.  If it
         doesn't exist, the IGMP or MLD packet."; packet will be ignored.";
      reference
        "RFC 3376: Internet Group Management Protocol, Version 3,
         Sections 9.1, 9.2, and 9.3";
    }
    leaf robustness-variable {
      type uint8 {
        range "1..7";
      }
      default 2; "2";
      description
        "Querier's Robustness Variable allows tuning for the
         expected packet loss on a network.";
      reference
        "RFC 3376. Sec. 3376: Internet Group Management Protocol, Version 3,
         Sections 4.1.6, 8.1, 8.14.1."; and 8.14.1";
    }
    leaf-list static-bridge-mrouter-interface {
      when 'derived-from-or-self(../l2-service-type,"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(../l2-service-type,"ims:l2vpn")';
      if-feature static-mrouter-interface; "static-mrouter-interface";
      type if:interface-ref;
      description
        "static
        "Static mrouter interface whose type is interface in L2VPN forwarding";
    }

    leaf-list static-l2vpn-mrouter-interface-pw {
      when 'derived-from-or-self(../l2-service-type,"ims:l2vpn")';
      if-feature static-mrouter-interface;
      type pw:pseudowire-ref;
      description
        "static mrouter interface whose type is PW
         in L2VPN bridge forwarding";
    }
  } // instance-config-attributes-igmp-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; "seconds";
      description
        "The time left before multicast group timeout.";
    }
    leaf up-time {
      type uint32;
      units seconds; "seconds";
      mandatory true;
      description
        "The time elapsed since the L2 multicast record was
         created.";
    }
  } // instance-state-group-attributes-igmp-mld-snooping

  grouping instance-state-attributes-igmp-mld-snooping {
    description
      "State attributes for IGMP & or MLD snooping instance.";
    leaf entries-count {
      type yang:gauge32;
      config false;
      description
        "The number of L2 multicast entries in IGMP & and MLD snooping";
         snooping.";
    }
    leaf-list bridge-mrouter-interface {
      when 'derived-from-or-self(../l2-service-type,"ims:bridge")';
      type if:interface-ref;
      config false;
      description
        "Indicates a list of mrouter interfaces dynamicly dynamically learned
         in a bridge.  When this switch receives IGMP/MLD queries
         from a multicast router on an interface, the interface will
         become
         mrouter interface for IGMP/MLD snooping.";
    }

    leaf-list l2vpn-mrouter-interface-ac {
      when 'derived-from-or-self(../l2-service-type,"ims:l2vpn")';
      type if:interface-ref;
      config false;
      description
        "The mrouter interface whose type is interface in L2VPN
         forwarding. When switch receives IGMP/MLD queries from
         multicast router on an interface, this interface will
         become mrouter interface for IGMP/MLD snooping.";
    }

    leaf-list l2vpn-mrouter-interface-pw {
      when 'derived-from-or-self(../l2-service-type,"ims:l2vpn")';
      type pw:pseudowire-ref;
      config false;
      description
        "The mrouter interface whose type is PW in L2VPN forwarding.
         When switch receives IGMP/MLD queries from multicast router
         on a PW, this PW will become mrouter interface for IGMP/MLD snooping.";
    }
  } // instance-config-attributes-igmp-mld-snooping

  grouping instance-state-source-attributes-igmp-mld-snooping {
    description
      "State attributes for IGMP & or MLD snooping instance.";
    leaf-list bridge-outgoing-interface {
      when 'derived-from-or-self(../../../l2-service-
type,"ims:bridge")'; 'derived-from-or-self(../../../l2-service-type,
            "ims:bridge")';
      type if:interface-ref;
      description
        "Outgoing interface in BRIDGE forwarding";
    }

    leaf-list l2vpn-outgoing-ac {
      when 'derived-from-or-self(../../../l2-service-type,"ims:l2vpn")';
      type if:interface-ref;
      description "Outgoing Attachment Circuit (AC) in L2VPN";
    }

    leaf-list l2vpn-outgoing-pw {
      when 'derived-from-or-self(../../../l2-service-type,"ims:l2vpn")';
      type pw:pseudowire-ref;
      description "Outgoing Pseudo Wire (PW) in L2VPN"; bridge forwarding.";
    }
    leaf up-time {
      type uint32;
      units seconds; "seconds";
      mandatory true;
      description
        "The time elapsed since L2 multicast record created"; was created.";
    }
    leaf expire {
      type rt-types:timer-value-seconds16;
      units seconds; "seconds";
      description
        "The time left before multicast group timeout.";
    }
    leaf host-count {
      if-feature explicit-tracking; "explicit-tracking";
      type yang:gauge32;
      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 query-count {
      type yang:counter64;
      description
        "The number of Membership Query messages.";
      reference
        "RFC 2236"; 2236: Internet Group Management Protocol, Version 2";
    }
    leaf membership-report-v1-count {
      type yang:counter64;
      description
        "The number of Version 1 Membership Report messages.";
      reference
        "RFC 1112"; 1112: Host extensions for IP multicasting";
    }
    leaf membership-report-v2-count {
      type yang:counter64;
      description
        "The number of Version 2 Membership Report messages.";
      reference
        "RFC 2236"; 2236: Internet Group Management Protocol, Version 2";
    }
    leaf membership-report-v3-count {
      type yang:counter64;
      description
        "The number of Version 3 Membership Report messages.";
      reference
        "RFC 3376"; 3376: Internet Group Management Protocol, Version 3";
    }
    leaf leave-count {
      type yang:counter64;
      description
        "The number of Leave Group messages.";
      reference
        "RFC 2236"; 2236: Internet Group Management Protocol, Version 2";
    }
    leaf pim-hello-count {
      type yang:counter64;
      description
        "The number of PIM hello messages.";
      reference
        "RFC 7761"; 7761: Protocol Independent Multicast - Sparse Mode
         (PIM-SM): Protocol Specification (Revised)";
    }
  } // igmp-snooping-statistics

  grouping mld-snooping-statistics {
    description
      "The statistics attributes for MLD snooping.";
    leaf query-count {
      type yang:counter64;
      description
        "The number of Multicast Listener Query messages.";
      reference
        "RFC 3810"; 3810: Multicast Listener Discovery Version 2 (MLDv2)
         for IPv6";
    }
    leaf report-v1-count {
      type yang:counter64;
      description
        "The number of Version 1 Multicast Listener Report.";
      reference
        "RFC 2710"; 2710: Multicast Listener Discovery (MLD) for IPv6";
    }
    leaf report-v2-count {
      type yang:counter64;
      description
        "The number of Version 2 Multicast Listener Report.";
      reference
        "RFC 3810"; 3810: Multicast Listener Discovery Version 2 (MLDv2)
         for IPv6";
    }
    leaf done-count {
      type yang:counter64;
      description
        "The number of Version 1 Multicast Listener Done.";
      reference
        "RFC 2710"; 2710: Multicast Listener Discovery (MLD) for IPv6";
    }
    leaf pim-hello-count {
      type yang:counter64;
      description
        "The number of PIM hello messages.";
      reference
        "RFC 7761"; 7761: Protocol Independent Multicast - Sparse Mode
         (PIM-SM): Protocol Specification (Revised)";
    }
  } // mld-snooping-statistics

  augment "/rt:routing/rt:control-plane-protocols"+ "/rt:routing/rt:control-plane-protocols"
        + "/rt:control-plane-protocol" {
    when 'derived-from-or-self(rt:type, "ims:igmp-snooping")' {
      description
        "This container is only valid for IGMP snooping.";
    }
    description
      "IGMP snooping augmentation to control plane control-plane protocol
       configuration and state.";
    container igmp-snooping-instance {
      if-feature igmp-snooping; "igmp-snooping";
      description
        "IGMP snooping instance to configure igmp-snooping.";
      leaf l2-service-type {
        type l2-service-type;
        default bridge; "bridge";
        description
          "The l2-service-type
          "It indicates BRIDGE bridge or L2VPN."; other services.";
      }
      uses instance-config-attributes-igmp-mld-snooping;
      leaf igmp-version {
        type uint8 {
          range "1..3";
        }
        default 2; "2";
        description
          "IGMP version.";
      }
      leaf querier-source {
        type inet:ipv4-address;
        description
          "Use
          "The source address of the IGMP snooping querier to support IGMP
           snooping in a VLAN where PIM and IGMP are not configured.
           The IPv4 address General Query message,
           which is used as source address in messages."; sent out by this switch.";
      }
      list static-l2-multicast-group {
        if-feature static-l2-multicast-group; "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"; 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(../../l2-service-
type,"ims:bridge")'; 'derived-from-or-self(../../l2-service-type,
                "ims:bridge")';
          type if:interface-ref;
          description
            "Outgoing interface in BRIDGE forwarding";
        }

        leaf-list l2vpn-outgoing-ac {
          when 'derived-from-or-self(../../l2-service-
type,"ims:l2vpn")';
          type if:interface-ref;
          description "Outgoing Attachment Circuit (AC) in L2VPN";
        }

        leaf-list l2vpn-outgoing-pw {
          when 'derived-from-or-self(../../l2-service-
type,"ims:l2vpn")';
          type pw:pseudowire-ref;
          description "Outgoing Pseudo Wire (PW) in L2VPN"; bridge forwarding.";
        }
      } // static-l2-multicast-group
      uses instance-state-attributes-igmp-mld-snooping;
      list group {
        key "address";
        config false;
        description
          "IGMP snooping information"; information.";
        leaf address {
          type rt-types:ipv4-multicast-group-address;
          description
            "Multicast group IPv4 address"; address.";
        }
        uses instance-state-group-attributes-igmp-mld-snooping;
        leaf last-reporter {
          type inet:ipv4-address;
          description
            "Address of the last host which that has sent a report to join
             the multicast group.";
        }
        list source {
          key "address";
          description
            "Source IPv4 address for multicast stream"; stream.";
          leaf address {
            type rt-types:ipv4-multicast-source-address;
            description
              "Source IPv4 address for multicast stream"; stream.";
          }
          uses instance-state-source-attributes-igmp-mld-snooping;
          leaf last-reporter {
            type inet:ipv4-address;
            description
              "Address of the last host which that has sent a report
               to join the multicast group.";
          }
          list host {
            if-feature explicit-tracking; "explicit-tracking";
            key "host-address"; "address";
            description
              "List of multicast membership hosts
               of the specific multicast source-group."; source group.";
            leaf host-address address {
              type inet:ipv4-address;
              description
                "Multicast membership host address.";
            }
            leaf host-filter-mode 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
      container interfaces {
        config false;
        description
          "Contains the interfaces associated with the IGMP snooping
            instance";
           instance.";
        list interface {
          key "name";
          description
            "A list of interfaces associated with the IGMP snooping
              instance";
             instance.";
          leaf name {
            type if:interface-ref;
            description
              "The name of interface"; the interface.";
          }
          container statistics {
            description
              "The interface statistics for IGMP snooping"; snooping.";
            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 received {
              description
                "Number of received snooped IGMP packets"; packets.";
              uses igmp-snooping-statistics;
            }
            container sent {
              description
                "Number of sent snooped IGMP packets"; packets.";
              uses igmp-snooping-statistics;
            }
          }
        }
      }
      action clear-igmp-snooping-groups {
        if-feature action-clear-groups; "action-clear-groups";
        description
          "Clear IGMP snooping cache tables.";
        input {
          leaf group {
            type union {
              type enumeration {
                enum 'all-groups' all-groups {
                  description
                    "All multicast group addresses.";
                }
              }
              type rt-types:ipv4-multicast-group-address;
            }
            mandatory true;
            description
              "Multicast group IPv4 address.  If value
               'all-groups' is specified, all IGMP snooping
               group entries are cleared for the specified source
               address.";
          }
          leaf source {
            type rt-types:ipv4-multicast-source-address;
            mandatory true;
            description
              "Multicast source IPv4 address.  If value '*' is
               specified, all IGMP snooping source-group tables
               are cleared.";
          }
        }
      } // action clear-igmp-snooping-groups
    } // igmp-snooping-instance
  } // augment

  augment "/rt:routing/rt:control-plane-protocols"+ "/rt:routing/rt:control-plane-protocols"
        + "/rt:control-plane-protocol" {
    when 'derived-from-or-self(rt:type, "ims:mld-snooping")' {
      description
        "This container is only valid for MLD snooping.";
    }
    description
      "MLD snooping augmentation to control plane control-plane protocol
       configuration and state.";
    container mld-snooping-instance {
      if-feature mld-snooping; "mld-snooping";
      description
        "MLD snooping instance to configure mld-snooping.";
      leaf l2-service-type {
        type l2-service-type;
        default bridge; "bridge";
        description
          "The l2-service-type
          "It indicates BRIDGE bridge or L2VPN."; other services.";
      }
      uses instance-config-attributes-igmp-mld-snooping;
      leaf mld-version {
        type uint8 {
          range "1..2";
        }
        default 2; "2";
        description
          "MLD 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
          "The source address in messages."; of MLD General Query message, which
           is sent out by this switch.";
      }
      list static-l2-multicast-group {
        if-feature static-l2-multicast-group; "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"; 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(../../l2-service-
type,"ims:bridge")'; 'derived-from-or-self(../../l2-service-type,
                "ims:bridge")';
          type if:interface-ref;
          description
            "Outgoing interface in BRIDGE forwarding";
        }

        leaf-list l2vpn-outgoing-ac {
          when 'derived-from-or-self(../../l2-service-
type,"ims:l2vpn")';
          type if:interface-ref;
          description "Outgoing Attachment Circuit (AC) in L2VPN";
        }

        leaf-list l2vpn-outgoing-pw {
          when 'derived-from-or-self(../../l2-service-
type,"ims:l2vpn")';
          type pw:pseudowire-ref;
          description "Outgoing Pseudo Wire (PW) in L2VPN"; bridge forwarding.";
        }
      } // static-l2-multicast-group
      uses instance-state-attributes-igmp-mld-snooping;
      list group {
        key "address";
        config false;
        description
          "MLD snooping statistics information"; information.";
        leaf address {
          type rt-types:ipv6-multicast-group-address;
          description
            "Multicast group IPv6 address"; address.";
        }
        uses instance-state-group-attributes-igmp-mld-snooping;
        leaf last-reporter {
          type inet:ipv6-address;
          description
            "Address of the last host which that has sent report
             to join the multicast group.";
        }
        list source {
          key "address";
          description
            "Source IPv6 address for multicast stream"; stream.";
          leaf address {
            type rt-types:ipv6-multicast-source-address;
            description
              "Source IPv6 address for multicast stream"; stream.";
          }
          uses instance-state-source-attributes-igmp-mld-snooping;
          leaf last-reporter {
            type inet:ipv6-address;
            description
              "Address of the last host which that has sent report
               to join the multicast group.";
          }
          list host {
            if-feature explicit-tracking; "explicit-tracking";
            key "host-address"; "address";
            description
              "List of multicast membership hosts
               of the specific multicast source-group."; source group.";
            leaf host-address address {
              type inet:ipv6-address;
              description
                "Multicast membership host address.";
            }
            leaf host-filter-mode 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
      container interfaces {
        config false;
        description
          "Contains the interfaces associated with the MLD snooping
            instance";
           instance.";
        list interface {
          key "name";
          description
            "A list of interfaces associated with the MLD snooping
              instance";
             instance.";
          leaf name {
            type if:interface-ref;
            description
              "The name of interface"; the interface.";
          }
          container statistics {
            description
              "The interface statistics for MLD snooping"; snooping.";
            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 received {
              description
                "Number of received snooped MLD packets"; packets.";
              uses mld-snooping-statistics;
            }
            container sent {
              description
                "Number of sent snooped MLD packets"; packets.";
              uses mld-snooping-statistics;
            }
          }
        }
      }
      action clear-mld-snooping-groups {
        if-feature action-clear-groups; "action-clear-groups";
        description
          "Clear MLD snooping cache tables.";
        input {
          leaf group {
            type union {
              type enumeration {
                enum 'all-groups' all-groups {
                  description
                    "All multicast group addresses.";
                }
              }
              type rt-types:ipv6-multicast-group-address;
            }
            mandatory true;
            description
              "Multicast group IPv6 address.  If value 'all-groups'
               is specified, all MLD snooping group entries are
               cleared for the specified source address.";
          }
          leaf source {
            type rt-types:ipv6-multicast-source-address;
            mandatory true;
            description
              "Multicast source IPv6 address.  If value '*' is
               specified, all MLD snooping source-group tables
               are cleared.";
          }
        }
      } // action clear-mld-snooping-groups
    }//
    } // mld-snooping-instance
  } // augment

  augment "/dot1q:bridges/dot1q:bridge" {
    description
      "Use IGMP & or MLD snooping instance in BRIDGE."; bridge.";
    leaf igmp-snooping-instance {
      type igmp-mld-snooping-instance-ref;
      description
        "Configure IGMP snooping instance under bridge view"; view.";
    }
    leaf mld-snooping-instance {
      type igmp-mld-snooping-instance-ref;
      description
        "Configure MLD snooping instance under bridge view"; view.";
    }
  }

  augment "/dot1q:bridges/dot1q:bridge"+ "/dot1q:bridges/dot1q:bridge"
        + "/dot1q:component/dot1q:bridge-vlan/dot1q:vlan" {
    description
      "Use IGMP & or MLD snooping instance in a certain VLAN
       of BRIDGE"; bridge.";
    leaf igmp-snooping-instance {
      type igmp-mld-snooping-instance-ref;
      description
        "Configure IGMP snooping instance under VLAN view"; view.";
    }
    leaf mld-snooping-instance {
      type igmp-mld-snooping-instance-ref;
      description
        "Configure MLD snooping instance under VLAN view"; view.";
    }
  }

  augment "/ni:network-instances/ni:network-instance"+
    "/ni:ni-type/l2vpn:l2vpn" {

    description
      "Use IGMP & MLD snooping instance in L2VPN.";

    leaf igmp-snooping-instance {
      type igmp-mld-snooping-instance-ref;
      description
        "Configure IGMP snooping instance in L2VPN.";
    }

    leaf mld-snooping-instance {
      type igmp-mld-snooping-instance-ref;
      description
        "Configure MLD snooping instance in L2VPN.";
    }
}
}
<CODE ENDS>
]]></artwork></figure>
]]></sourcecode>
    </section>
    <section title="Security Considerations" anchor="sect-5"><t> anchor="sect-5" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   The YANG module specified in this document defines a schema for data that
   is designed to be accessed via network management protocols such as NETCONF
   <xref target="RFC6241"/> target="RFC6241" format="default"/> or RESTCONF <xref target="RFC8040"/>. target="RFC8040" format="default"/>. The lowest NETCONF layer is the secure
   transport layer, and the mandatory-to-implement secure transport is Secure
   Shell (SSH) <xref target="RFC6242"/>. target="RFC6242" format="default"/>. The lowest RESTCONF layer is HTTPS, and the
   mandatory-to-implement secure transport is TLS <xref target="RFC8446"/>.</t> target="RFC8446" format="default"/>.</t>
      <t>
   The Network Configuration Access Control Model (NACM) <xref target="RFC8341"/> target="RFC8341" format="default"/> provides
   the means to restrict access for particular NETCONF or RESTCONF users to a
   preconfigured subset of all available NETCONF or RESTCONF protocol
   operations and content.</t>
      <t>
   There are a number of data nodes defined in this YANG module that are
   writable/creatable/deletable (i.e., config true, which is the default).
   These data nodes may be considered sensitive or vulnerable in some network
   environments. Write operations (e.g., edit-config) to these data nodes
   without proper protection can have a negative effect on network
   operations.

   These are the subtrees and data nodes and their
      sensitivity/vulnerability:</t>

      <t>
      Under /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol:/</t>

   <t>ims:igmp-snooping-instance</t>

   <t>ims:mld-snooping-instance</t>
      <ul empty="true">
      <li>ims:igmp-snooping-instance</li>
      <li>ims:mld-snooping-instance</li>
      </ul>

      <t>The subtrees under /dot1q:bridges/dot1q:bridge</t>

   <t>ims:igmp-snooping-instance</t>

   <t>ims:mld-snooping-instance</t>
       <ul empty="true">
      <li>ims:igmp-snooping-instance</li>
      <li>ims:mld-snooping-instance</li>
       </ul>

      <t>The subtrees under /dot1q:bridges/dot1q:bridge/dot1q:component
   /dot1q:bridge-vlan/dot1q:vlan</t>

   <t>ims:igmp-snooping-instance</t>

   <t>ims:mld-snooping-instance</t> /dot1q:bridges/dot1q:bridge/dot1q:component/dot1q:bridge-vlan/dot1q:vlan</t>
        <ul empty="true">
      <li>ims:igmp-snooping-instance</li>
      <li>ims:mld-snooping-instance</li>
      </ul>
      <t>
   Unauthorized access to any data node of these subtrees can adversely affect
   the IGMP &amp; and MLD Snooping snooping subsystem of both the local device and the
   network. This may lead to network malfunctions, delivery of packets to
   inappropriate destinations, and other problems.</t>
      <t>
   Some of the readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments. It is thus important
   to control read access (e.g., via get, get-config, or notification) to
   these data nodes. These are the subtrees and data nodes and their
   sensitivity/vulnerability:</t>
      <t>
   Under /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol:/</t>

	<t>
   ims:igmp-snooping-instance</t>

	<t>
   ims:mld-snooping-instance</t>

     <ul empty="true">
  <li> ims:igmp-snooping-instance</li>
      <li>
      ims:mld-snooping-instance</li>
     </ul>
      <t>
   Unauthorized access to any data node of these subtrees can disclose the
   operational state information of IGMP &amp; and MLD Snooping snooping on this device. The
   group/source/host information may expose multicast group memberships, and
   transitively memberships and,
   transitively, the associations between the user on the host and the contents
   from the source source, which could be privately sensitive. Some of the action
   operations in this YANG module may be considered sensitive or vulnerable in
   some network environments. It is thus important to control access to these
   operations. These are the operations and their sensitivity/vulnerability:</t>
      <t>
   Under /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol:/</t>

	<t>
   ims:igmp-snooping-instance/ims:clear-igmp-snooping-groups</t>

	<t>
   ims:mld-snooping-instance/ims:clear-mld-snooping-groups</t>

      <ul empty="true">
  <li> ims:igmp-snooping-instance/ims:clear-igmp-snooping-groups</li>

	<li> ims:mld-snooping-instance/ims:clear-mld-snooping-groups</li>
      </ul>

      <t>
   Some of the actions in this YANG module may be considered sensitive or
   vulnerable in some network environments. The IGMP &amp; and MLD Snooping snooping YANG
   module supports the "clear-igmp-snooping-groups" and
   "clear-mld-snooping-groups" actions. If unauthorized action is invoked, the
   IGMP and MLD Snooping snooping group tables will be cleared unexpectedly. Especially
   when using wildcard, all the multicast traffic will be flooded in the
   broadcast domain. The devices that use this YANG module should heed the
   Security Considerations
   security considerations in <xref target="RFC4541"/>.</t> target="RFC4541" format="default"/>.</t>
    </section>
    <section title="IANA Considerations" anchor="sect-6"><t>
   RFC Ed.: In this section, replace all occurrences of 'XXXX' with the actual
   RFC number (and remove this note).</t> anchor="sect-6" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section title="XML Registry" anchor="sect-6.1"><t> anchor="sect-6.1" numbered="true" toc="default">
        <name>XML Registry</name>
        <t>
   This document registers the following namespace URIs URI in the IETF XML</t>

	<t>
   registry "IETF XML
   Registry" <xref target="RFC3688"/>:</t>

	<figure><artwork><![CDATA[
--------------------------------------------------------------------
URI: urn:ietf:params:xml:ns:yang:ietf-igmp-mld-snooping
Registrant Contact: The IETF.
XML: N/A, target="RFC3688" format="default"/>:</t>
        <dl spacing="compact">
<dt>URI:</dt><dd>urn:ietf:params:xml:ns:yang:ietf-igmp-mld-snooping</dd>
<dt>Registrant Contact:</dt><dd>The IETF.</dd>
<dt>XML:</dt><dd>N/A; the requested URI is an XML namespace.
--------------------------------------------------------------------
]]></artwork>
	</figure> namespace.</dd>
	</dl>
      </section>
      <section title="YANG anchor="sect-6.2" numbered="true" toc="default">
        <name>YANG Module Names Registry" anchor="sect-6.2"> Registry</name>
        <t>
   This document registers the following YANG modules module in the YANG "YANG Module Names Names"
   registry [RFC7950]:</t>

<figure><artwork><![CDATA[
--------------------------------------------------------------------
name:         ietf-igmp-mld-snooping
namespace:    urn:ietf:params:xml:ns:yang:ietf-igmp-mld-snooping
prefix:       ims
reference: <xref target="RFC7950"/>:</t>
        <dl spacing="compact" indent="14">
<dt>Name:</dt><dd> ietf-igmp-mld-snooping</dd>
<dt>Namespace:</dt><dd>    urn:ietf:params:xml:ns:yang:ietf-igmp-mld-snooping</dd>
<dt>Prefix:</dt><dd>       ims</dd>
<dt>Reference:</dt><dd>    RFC XXXX
--------------------------------------------------------------------
]]></artwork>
	</figure> 9166</dd>
	</dl>
      </section>
    </section>
  </middle>
  <back>
	<references title="Normative References">

<references>
      <name>References</name>
      <references>
        <name>Normative References</name>

        <reference anchor="dot1Qcp" target="https://ieeexplore.ieee.org/servlet/opac?punumber=8467505"><front> target="https://ieeexplore.ieee.org/servlet/opac?punumber=8467505">
          <front>
            <title>Standard for Local and metropolitan area networks--Bridges and Bridged Networks--Amendment 30: YANG Data Model</title>
            <author>
              <organization>IEEE</organization>
            </author>
            <date month="September" year="2018"/>
          </front>
            <seriesInfo name="IEEE" value="Std 802.1Qcp-2018 (Revision of IEEE Std 802.1Q-2014)"/> name="IEEE Std" value="802.1Qcp-2018"/>
  	  <seriesInfo name="DOI" value="10.1109/IEEESTD.2018.8467507"/>
        </reference>
	&RFC1112;
	&RFC2236;
	&RFC2710;
	&RFC3376;
	&RFC3688;
	&RFC3810;
	&RFC4286;
	&RFC4541;
	&RFC5790;
	&RFC6020;
	&RFC6241;
	&RFC6242;
	&RFC6636;
	&RFC6991;
	&RFC7761;
	&RFC7950;
	&RFC8040;
	&RFC8294;
	&RFC8340;
	&RFC8341;
	&RFC8342;
	&RFC8343;
	&RFC8349;
	&RFC8446;
	&RFC8529;
	&I-D.ietf-bess-l2vpn-yang;
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.1112.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2236.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2710.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3376.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3810.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4286.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4541.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5790.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6636.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7761.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8294.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8343.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7951.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8407.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8652.xml"/>
      </references>
	<references title="Informative References">
	&RFC3916;
	&RFC7951;
	&RFC8407;
	&RFC8652;
    </references>
    <section title="Data anchor="sect-a" numbered="true" toc="default">
      <name>Data Tree Example" anchor="sect-a"><section title="Bridge service" anchor="sect-a.1"><t> Example</name>
        <t>
   This section contains an example for of bridge service in the JSON encoding
   <xref target="RFC7951"/>, target="RFC7951" format="default"/>, containing both configuration and state data.</t>

	<figure><artwork><![CDATA[
        <artwork name="" type="" align="left" alt=""><![CDATA[
           +-----------+
           +  Source   +
           +-----+-----+
                 |
-----------------+----------------------------
                 |eth1/1
             +---+---+
             +  R1   +
             +-+---+-+
        eth1/2 |    \ eth1/3
               |     \
               |      \
               |       \
               |        \
        eth2/1 |         \ eth3/1
           +---+---+   +--+---+
           +  R2   +   +  R3  +
           +---+---+   +--+---+
        eth2/2 |          | eth3/2
               |          |
---------------+----------+-------------------
               |          |
               |          |
      +--------+--+   +---+--------+
      + Receiver1 +   +  Receiver2 +
      +-----------+   +------------+

The
]]></artwork>

<t>The configuration data for R1 in the above figure could be as follows: follows:</t>

<sourcecode type=""><![CDATA[
{
"ietf-interfaces:interfaces":{
  "interface":[
   {
    "name":"eth1/1",
    "type":"iana-if-type:ethernetCsmacd"
   }
  ]
 },
 "ietf-routing:routing":{
  "control-plane-protocols":{
   "control-plane-protocol":[
    {
     "type":"ietf-igmp-mld-snooping:igmp-snooping",
     "name":"bis1",
     "ietf-igmp-mld-snooping:igmp-snooping-instance":{
       "l2-service-type":"ietf-igmp-mld-snooping:bridge",
       "enable":true
       "enabled":true
     }
    }
   ]
  }
 },
 "ieee802-dot1q-bridge:bridges":{
  "bridge":[
   {
    "name":"isp1",
    "address":"00-23-ef-a5-77-12",
    "bridge-type":"ieee802-dot1q-bridge:customer-vlan-bridge",
    "component":[
     {
      "name":"comp1",
      "type":"ieee802-dot1q-bridge:c-vlan-component",
      "bridge-vlan":{
       "vlan":[
        {
         "vid":101,
         "ietf-igmp-mld-snooping:igmp-snooping-instance":"bis1"
        }
       ]
      }
     }
    ]
   }
  ]
 }
}

The
]]></sourcecode>

<t>The corresponding operational state data for R1 could be as follows: follows:</t>
<sourcecode type="json"><![CDATA[
{
 "ietf-interfaces:interfaces": {
  "interface": [
   {
    "name": "eth1/1",
    "type": "iana-if-type:ethernetCsmacd",
    "oper-status": "up",
    "statistics": {
     "discontinuity-time": "2018-05-23T12:34:56-05:00"
    }
   }
  ]
 },
 "ietf-routing:routing": {
  "control-plane-protocols": {
   "control-plane-protocol": [
    {
     "type": "ietf-igmp-mld-snooping:igmp-snooping",
     "name": "bis1",
     "ietf-igmp-mld-snooping:igmp-snooping-instance": {
      "l2-service-type": "ietf-igmp-mld-snooping:bridge",
      "enable":
      "enabled": true
     }
    }
   ]
  }
 },
 "ieee802-dot1q-bridge:bridges": {
  "bridge": [
   {
    "name": "isp1",
    "address": "00-23-ef-a5-77-12",
    "bridge-type": "ieee802-dot1q-bridge:customer-vlan-bridge",
    "component": [
     {
      "name": "comp1",
      "type": "ieee802-dot1q-bridge:c-vlan-component",
      "bridge-vlan": {
       "vlan": [
        {
         "vid": 101,
         "ietf-igmp-mld-snooping:igmp-snooping-instance": "bis1"
        }
       ]
      }
     }
    ]
   }
  ]
 }
}
The
]]></sourcecode>
<t>The following action is to clear all the entries whose group address is
225.1.1.1 for igmp-snooping-instance bis1. bis1.</t>

<sourcecode><![CDATA[
POST /restconf/operations/ietf-routing:routing/control-plane-protocols/\ /restconf/operations/ietf-routing:routing/\
control-plane-protocols/\
control-plane-protocol=ietf-igmp-mld-snooping:igmp-snooping,bis1/\
ietf-igmp-mld-snooping:igmp-snooping-instance/\
clear-igmp-snooping-groups HTTP/1.1
Host: example.com
Content-Type: application/yang-data+json

{
  "ietf-igmp-mld-snooping:input" : {
    "group": "225.1.1.1",
    "source": "*"
  }
}

]]> </artwork></figure>
      </section>

<section title="L2VPN service" anchor="sect-a.2">

   <t>
   This section contains an example for L2VPN service in the JSON encoding
   [RFC7951], containing both configuration and state data.</t>

<figure><artwork><![CDATA[
              +-----------+
              +  Source   +
              +-----+-----+
                    |
   -----------------+----------------------------
                    |eth1/1
                +---+---+
                +  R1   +
                +-+---+-+
           eth1/2 |    \ eth1/3
                  |     \
                  |      \
                  |       \
                  |        \
           eth2/1 |         \ eth3/1
              +---+---+    +-+---+
              +  R2   +----+ R3  +
              +---+---+    +-+---+
           eth2/2 |          | eth3/2
                  |          |
   ---------------+----------+-------------------
                  |          |
                  |          |
         +--------+--+   +---+--------+
         + Receiver1 +   +  Receiver2 +
         +-----------+   +------------+

The configuration data for R1 in the above figure could be as follows:
{
"ietf-interfaces:interfaces":{
  "interface":[
   {
    "name":"eth1/1",
    "type":"iana-if-type:ethernetCsmacd"
   }
  ]
 },
 "ietf-pseudowires:pseudowires": {
  "pseudowire": [
   {
    "name": "pw2"
   },
   {
    "name": "pw3"
   }
  ]
 },
 "ietf-network-instance:network-instances": {
  "network-instance": [
   {
    "name": "vpls1",
    "ietf-igmp-mld-snooping:igmp-snooping-instance": "vis1",
    "ietf-l2vpn:type": "ietf-l2vpn:vpls-instance-type",
    "ietf-l2vpn:signaling-type": "ietf-l2vpn:ldp-signaling",
    "ietf-l2vpn:endpoint": [
     {
      "name": "acs",
      "ac": [
        {
         "name": "eth1/1"
        }
      ]
     },
     {
      "name": "pws",
      "pw": [
        {
         "name": "pw2"
        },
        {
         "name": "pw3"
        }
      ]
     }
    ]
   }
  ]
 },
 "ietf-routing:routing": {
  "control-plane-protocols": {
   "control-plane-protocol": [
    {
     "type": "ietf-igmp-mld-snooping:igmp-snooping",
     "name": "vis1",
     "ietf-igmp-mld-snooping:igmp-snooping-instance": {
      "l2-service-type": "ietf-igmp-mld-snooping:l2vpn",
      "enable": true
     }
    }
   ]
  }
 }
}

The corresponding operational state data for R1 could be as follows:

{
"ietf-interfaces:interfaces":{
  "interface":[
   {
    "name":"eth1/1",
    "type":"iana-if-type:ethernetCsmacd",
    "oper-status": "up",
    "statistics": {
     "discontinuity-time": "2018-05-23T12:34:56-05:00"
    }
   }
  ]
 },
 "ietf-pseudowires:pseudowires": {
  "pseudowire": [
   {
    "name": "pw2"
   },
   {
    "name": "pw3"
   }
  ]
 },
 "ietf-network-instance:network-instances": {
  "network-instance": [
   {
    "name": "vpls1",
    "ietf-igmp-mld-snooping:igmp-snooping-instance": "vis1",
    "ietf-l2vpn:type": "ietf-l2vpn:vpls-instance-type",
    "ietf-l2vpn:signaling-type": "ietf-l2vpn:ldp-signaling",
    "ietf-l2vpn:endpoint": [
     {
      "name": "acs",
      "ac": [
        {
         "name": "eth1/1"
        }
      ]
     },
     {
      "name": "pws",
      "pw": [
        {
         "name": "pw2"
        },
        {
         "name": "pw3"
        }
      ]
     }
    ]
   }
  ]
 },
 "ietf-routing:routing": {
  "control-plane-protocols": {
   "control-plane-protocol": [
    {
     "type": "ietf-igmp-mld-snooping:igmp-snooping",
     "name": "vis1",
     "ietf-igmp-mld-snooping:igmp-snooping-instance": {
      "l2-service-type": "ietf-igmp-mld-snooping:l2vpn",
      "enable": true
     }
    }
   ]
  }
 }
}
]]> </artwork></figure>

	</section>
]]></sourcecode>

    </section>
  </back>

</rfc>