bbf-mgmd

This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on layer 2 multicast manag...

  • Version: 2023-12-15

    bbf-mgmd@2023-12-15


    
      module bbf-mgmd {
    
        yang-version 1.1;
    
        namespace "urn:bbf:yang:bbf-mgmd";
    
        prefix bbf-mgmd;
    
        import ietf-yang-types {
          prefix yang;
        }
        import bbf-yang-types {
          prefix bbf-yang;
        }
        import bbf-mgmd-types {
          prefix bbf-mgmd-types;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import bbf-if-type {
          prefix bbfift;
        }
        import bbf-mgmd-common {
          prefix bbf-mgmdc;
        }
    
        organization
          "Broadband Forum <https://www.broadband-forum.org>
         Common YANG Work Area";
    
        contact
          "Comments or questions about this Broadband Forum YANG module
         should be directed to <mailto:help@broadband-forum.org>.
    
         Editor:      Nick Hancock, Adtran
    
         Editor:      Ludwig Pauwels, Nokia
    
         PS Leader:   Joey Boyd, Adtran
    
         WA Director: Joey Boyd, Adtran
    
         WA Director: Sven Ooghe, Nokia";
    
        description
          "This module contains a collection of YANG definitions for
         supporting the Broadband Forum requirements on layer 2 multicast
         management as applicable to access network equipment. As such,
         this module is specific to access network equipment (e.g.,
         BBF-specified Access Nodes and FTTdp DPUs).
    
         Specifically, this module contains a collection of YANG
         definitions for supporting the Multicast Group Membership
         Discovery (MGMD) Protocols. In particular, it describes data
         nodes used for managing the Internet Group Management Protocol
         (IGMP) and the Multicast Listener Discovery (MLD) protocol in
         systems that act as a multicast proxy, snooper, or a snooper with
         proxy reporting.
    
         Copyright (c) 2017-2023, Broadband Forum
    
         Redistribution and use in source and binary forms, with or
         without modification, are permitted provided that the following
         conditions are met:
    
         1. Redistributions of source code must retain the above copyright
            notice, this list of conditions and the following disclaimer.
    
         2. Redistributions in binary form must reproduce the above
            copyright notice, this list of conditions and the following
            disclaimer in the documentation and/or other materials
            provided with the distribution.
    
         3. Neither the name of the copyright holder nor the names of its
            contributors may be used to endorse or promote products
            derived from this software without specific prior written
            permission.
    
         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
         CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
         INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
         MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
         CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
         NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
         LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
         CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
         STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
         ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
         ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
         The above license is used as a license under copyright only.
         Please reference the Forum IPR Policy for patent licensing terms
         <https://www.broadband-forum.org/ipr-policy>.
    
         Any moral rights which are necessary to exercise under the above
         license grant are also deemed granted under this license.
    
         This version of this YANG module is part of TR-383a7; see
         the TR itself for full legal notices.";
    
        revision "2023-12-15" {
          description
            "Amendment 7.
           * Approval Date:    2023-12-15.
           * Publication Date: 2023-12-15.";
          reference
            "TR-383a7: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-7.pdf>";
    
        }
    
        revision "2023-03-07" {
          description
            "Amendment 6.
           * Approval Date:    2023-03-07.
           * Publication Date: 2023-03-07.";
          reference
            "TR-383a6: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-6.pdf>";
    
        }
    
        revision "2022-03-01" {
          description
            "Amendment 5.
           * Approval Date:    2022-03-01.
           * Publication Date: 2022-03-01.";
          reference
            "TR-383a5: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-5.pdf>";
    
        }
    
        revision "2020-10-13" {
          description
            "Amendment 3.
           * Approval Date:    2020-10-13.
           * Publication Date: 2020-10-13.";
          reference
            "TR-383a3: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-3.pdf>";
    
        }
    
        revision "2019-10-21" {
          description
            "Amendment 2 Corrigendum 1.
           * Approval Date:    2019-10-21.
           * Publication Date: 2019-10-21.";
          reference
            "TR-383a2c1: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-2.pdf>";
    
        }
    
        revision "2018-07-13" {
          description
            "Amendment 1.
           * Approval Date:    2018-06-04.
           * Publication Date: see revision date above.";
          reference
            "TR-383: Common YANG Modules
            	<https://www.broadband-forum.org/technical/download/
            		 TR-383_Amendment-1.pdf>";
    
        }
    
    
        feature mgmd-proxy {
          description
            "MGMD proxy functionality is supported.";
        }
    
        feature mgmd-snoop-transparent {
          description
            "MGMD snooping functionality is supported.";
        }
    
        feature mgmd-snoop-with-proxy-reporting {
          description
            "MGMD snooping with proxy reporting functionality is
           supported.";
        }
    
        feature mgmd-snoop-last-leave {
          description
            "MGMD snoop last leave functionality is supported.";
        }
    
        feature multicast-cac {
          description
            "Multicast Connection Admission Control (CAC) functionality is
           supported.";
        }
    
        feature multicast-package {
          description
            "Multicast packages, i.e., a package of multicast channels, are
           supported.";
        }
    
        feature multicast-preview {
          description
            "Indicates support of multicast preview which offers the
           possibility to join multicast channels for a restricted period
           of time or number of times.";
        }
    
        feature mgmd-group-ip-range {
          description
            "Indicates support for the configuration of a range of
           multicast group IP addresses.";
        }
    
        feature static-multicast-host-associations {
          description
            "The system supports static associations of multicast hosts to
           the tree of a multicast channel. The existence of a static
           association is controlled via configuration and not via dynamic
           IGMP or MLD protocol messages.";
        }
    
        identity mgmd-mode {
          description
            "Defines the MGMD mode. The MGMD mode specifies how IGMP/MLD
           messages are processed to manage a multicast tree within the
           context of a Layer 2 forwarder.";
        }
    
        identity proxy {
          base mgmd-mode;
          description
            "A proxy device performing IGMP/MLD-based forwarding has a
           single upstream interface (at a particular moment in time) and
           one or more downstream interfaces. The upstream interface (in
           the direction of the root of the multicast tree) performs the
           host portion of IGMP/MLD protocol and the downstream direction
           (away from the direction of the root of the multicast tree)
           performs the router portion of the IGMP/MLD protocol.";
          reference
            "RFC 4605";
    
        }
    
        identity snoop-transparent {
          base mgmd-mode;
          description
            "A transparent snooper that forwards IGMP/MLD Membership Reports
           only to those ports where multicast routers are attached.";
          reference
            "RFC 4541";
    
        }
    
        identity snoop-with-proxy-reporting {
          base mgmd-mode;
          description
            "A snooper with proxy-reporting capability will perform report
           summarization and MGMD Membership Query suppression in order to
           reduce the load on the upstream multicast router.";
          reference
            "RFC 4541 Section 2.1.1 - Bullet 2";
    
        }
    
        identity unmatched-join-processing {
          description
            "When an MGMD Membership Report is received, and it requests to
           join a group address for which there is no configuration data
           in the system, then there are various alternative ways on how
           to process the request.";
          reference
            "TR-101i2 R-272";
    
        }
    
        identity unmatched-join-discard {
          base unmatched-join-processing;
          description
            "When an MGMD Membership Report is received, and it requests to
           join a group address for which there is no configuration data
           in the system, then the system will discard the request.";
          reference
            "TR-101i2 R-238";
    
        }
    
        identity unmatched-join-forward {
          base unmatched-join-processing;
          description
            "When an MGMD Membership Report is received, and it requests to
           join a group address for which there is no configuration data
           in the system, then the system will forward the MGMD message as
           regular data.";
          reference
            "TR-101i2 R-238";
    
        }
    
        identity unmatched-join-snoop-or-proxy {
          base unmatched-join-processing;
          description
            "When an MGMD Membership Report is received, and it requests to
           join a group address for which there is no configuration data
           in the system, then the system will still perform the
           transparent snooper, snooper with proxy-reporting, or proxy
           function and manage a multicast tree for it.";
        }
    
        typedef rate-limit-action-enum {
          type enumeration {
            enum "drop" {
              value 0;
              description
                "The action is to drop MGMD Membership Reports that if
               granted would result in requiring more bandwidth than
               available on the interface.";
            }
            enum "best-effort" {
              value 1;
              description
                "The action is to process MGMD Membership Reports even when
               granting them would result in requiring more bandwidth than
               available on the interface. This can result in frame
               loss.";
            }
          }
          description
            "Defines the action to be taken for received MGMD Membership
           Reports that, if granted, would result in requiring more
           bandwidth than available on the interface.";
        }
    
        typedef usage-limit {
          type union {
            type enumeration {
              enum "no-limit" {
                value 0;
                description
                  "No limit is applied.";
              }
            }
            type uint32;
          }
          description
            "Defines possible resource usage limitations where the
           limitation can be expressed in a number. The value 'no-limit'
           expresses that no resource usage limitation is applicable.";
        }
    
        container multicast {
          description "Multicast configuration.";
          container mgmd {
            description
              "MGMD configuration, i.e., configuration related to the IGMP
             and/or MLD protocols.";
            leaf global-administrative-enabled {
              type boolean;
              default "true";
              description
                "Controls the administrative state of all MGMD functions in
               the system.
    
               If 'false', all multicast functions in the system will stop
               working:
               - ongoing multicast traffic (video data) will stop being
                 forwarded, which includes the forwarding to statically
                 configured host associations,
               - the dynamic established multicast trees and host
                 associations will be cleared,
               - no MGMD protocol messages will be sent,
               - MGMD protocol messages coming from hosts and router will
                 not be processed and will be silently dropped.
    
               If 'true', all multicast functions in the system will start
               working (unless overruled by other administrative states):
               - MGMD protocol messages coming from hosts and router will
                 be processed and dynamic multicast trees will be built,
               - multicast traffic (video data) will be forwarded
                 according the multicast trees and their host
                 associations.
    
               Note that the MLD protocol is also used in the context of
               some special IPv6 multicast addresses that are used in
               specific IPv6 protocols such as the Neighbor Discovery
               protocol. This administrative state does not affect the
               processing of MLD messages for these specific multicast
               addresses. In other words, it does not affect the
               processing of MLD messages for the all-nodes multicast
               address, nor for solicited-node multicast addresses
               (addresses derived from a unicast address).";
            }
    
            list preview-parameters-profile {
              if-feature multicast-preview;
              key "name";
              description
                "Profile containing configuration data to be activated for a
               multicast channel when it is previewed.";
              leaf name {
                type bbf-yang:string-ascii64;
                description
                  "The name of a preview parameters profile.";
              }
    
              leaf preview-control-style {
                type enumeration {
                  enum "pattern" {
                    value 0;
                    description
                      "Set limit on preview action pattern.";
                  }
                  enum "total-time" {
                    value 1;
                    description
                      "Set limit on total previewed time.
    
                     This limit is applied to a one time opportunity per
                     day to preview a multicast channel. If the preview
                     lasts for the total time, then the user is kicked-out
                     from the multicast tree by the device. When the user
                     previewed the multicast channel over a period shorter
                     than or equal to the total time, then the user has no
                     more opportunity to preview that channel during the
                     same day.";
                  }
                }
                description
                  "This leaf controls the preview method.
    
                 This leaf not being configured means there is no preview.
                 In other words, a multicast channel with 'access-right'
                 set to 'preview' and referencing a profile with the leaf
                 'preview-control-style' not set, is treated in the same
                 way as when the multicast channel was configured with
                 'access-right' 'disabled'.";
              }
    
              container preview-pattern {
                when
                  "../preview-control-style = 'pattern'";
                description
                  "A container with data controlling the preview when the
                 preview method allows for a pattern.";
                leaf preview-repeat-interval {
                  type uint32;
                  units "seconds";
                  default "0";
                  description
                    "The minimum time in seconds between two previews of a
                   given multicast channel.";
                }
    
                leaf preview-repeat-count {
                  type usage-limit;
                  default "3";
                  description
                    "The maximum number of times a given multicast channel
                   may be previewed.";
                }
    
                leaf preview-clip-length {
                  type uint32;
                  units "seconds";
                  default "180";
                  description
                    "The maximum duration of each preview in seconds.";
                }
              }  // container preview-pattern
    
              leaf preview-time {
                when
                  "../preview-control-style = 'total-time'";
                type uint32;
                units "seconds";
                default "180";
                description
                  "The total time permitted for previewing operation in
                 seconds.";
              }
    
              leaf preview-permission-restore-cycle {
                type uint32;
                units "minutes";
                default "60";
                description
                  "Identifies the moments at which the preview repeat
                 counter is reset. The moments are identified as follows:
                 reset happens each day at the moment specified by taking
                 the number of minutes as specified by this leaf after
                 midnight. For example a value of 0 results in a reset at
                 midnight local time, a value of 60 results in a reset at
                 1h00.";
              }
            }  // list preview-parameters-profile
    
            list multicast-snoop-transparent-profile {
              if-feature mgmd-snoop-transparent;
              key "name";
              description
                "Profile containing configuration data to be used by
               systems configured in snoop transparent mode.";
              leaf name {
                type bbf-yang:string-ascii64;
                description
                  "The name of a multicast snoop transparent profile.";
              }
    
              leaf protocol-version {
                type bbf-mgmd-types:mgmd-protocol-and-version;
                mandatory true;
                description
                  "Protocol(s) and/or protocol version(s) supported on the
                 various interfaces of the VPN.";
              }
    
              container interfaces-to-hosts-data {
                description
                  "Data nodes that are applied to an interface when a system
                 operates in snoop transparent mode.";
                leaf immediate-leave {
                  type enumeration {
                    enum "enabled" {
                      value 0;
                      description
                        "Immediate leave enabled means the system performs host
    tracking. Then the reception of a leave results in
    immediately removing this host from the subscription
    list.";
                    }
                    enum "disabled" {
                      value 1;
                      description
                        "Immediate leave disabled means the system sends MGMD
    Group-Specific Query messages on the interface to find
    out if other hosts connected to the same interface would
    still be interested in receiving the multicast channel.";
                    }
                  }
                  default "disabled";
                  description
                    "Immediate leave controls the function by which an interface
    that receives a leave for a certain group might immediately
    delete the corresponding group record.
    
    Configuring immediate leave reduces the amount of time it
    takes for the switch to stop sending multicast traffic to an
    interface when the last host on that interface leaves the
    group.
    
    When immediate leave is disabled, the switch no longer tracks
    hosts. Instead, whenever it receives a leave from a host on
    an interface, it waits for a period as specified by the group
    membership interval. If it does not receive any MGMD
    Membership Report on the interface in that time interval, it
    stops forwarding multicast traffic to the interface.";
                  reference
                    "ITU-T G.988 Clause 9.3.27 - Immediate Leave;
                     RFC 3810 Section A.2";
    
                }
    
                leaf group-membership-interval {
                  type uint32 {
                    range "1..31744";
                  }
                  units "seconds";
                  default "260";
                  description
                    "The group membership interval is the amount of time that has
    to pass before a multicast router decides there are no more
    members of a group or a particular source on an interface.
    
    This leaf, as a parameter of a snooper, has to be consistent
    with the parameters configured in the multicast router that
    is connected to the snooper. It has to be equal to or larger
    than ((the Robustness Variable) times (the Query Interval))
    plus (one Query Response Interval) as calculated from
    parameters configured in the multicast router.";
                  reference
                    "RFC 4541 Section 2.1.1 - Item 6;
                     RFC 3376 Section 8.4";
    
                }
    
                leaf last-member-query-interval {
                  if-feature bbf-mgmd:mgmd-snoop-last-leave;
                  type uint32 {
                    range "2..31744";
                  }
                  units "0.1 seconds";
                  default "10";
                  description
                    "The last member query interval is the maximum response time
    inserted into MGMD Group-Specific Query messages sent in
    response to leaves, and is also the amount of time between
    MGMD Group-Specific Query messages.
    
    This feature is optional for a snooper and can be used in a
    slow network. When this feature is enabled, it permits a
    snooper to send a MGMD Group-Specific Query message after the
    group membership has timed out to verify that clients have
    stopped watching a channel. If no response is received to the
    MGMD Group-Specific Query message, it removes the group state
    and discontinuous multicast transmission for that channel.";
                  reference
                    "RFC 3376 Section 8.8;
                     RFC 5519 Section 5
                    - mgmdRouterInterfaceLastMemberQueryInterval";
    
                }
    
                leaf last-member-query-count {
                  if-feature bbf-mgmd:mgmd-snoop-last-leave;
                  type uint32 {
                    range "1..255";
                  }
                  default "2";
                  description
                    "The number of unanswered MGMD Group-Specific Query messages
    sent out before it is assumed that there are no local members
    interested in the IP multicast stream.
    
    This feature is optional for a snooper and can be used in a
    slow network. When this feature is enabled, it permits a
    snooper to send a MGMD Group-Specific Query message after the
    group membership has timed out to verify that clients have
    stopped watching a channel. If no response is received to the
    MGMD Group-Specific Query message, it removes the group state
    and discontinuous multicast transmission for that channel.";
                  reference
                    "RFC 3376 Section 8.9";
    
                }
              }  // container interfaces-to-hosts-data
            }  // list multicast-snoop-transparent-profile
    
            list multicast-snoop-with-proxy-reporting-profile {
              if-feature mgmd-snoop-with-proxy-reporting;
              key "name";
              description
                "Profile containing configuration data to be used by
               systems configured in snoop with proxy reporting mode.";
              leaf name {
                type bbf-yang:string-ascii64;
                description
                  "The name of a multicast snoop with proxy reporting
                 profile.";
              }
    
              leaf protocol-version {
                type bbf-mgmd-types:mgmd-protocol-and-version;
                mandatory true;
                description
                  "Protocol(s) and/or protocol version(s) supported on the
                 various interfaces of the VPN.";
              }
    
              container interfaces-to-hosts-data {
                description
                  "Data nodes that are applied to each interface facing the
                 multicast tree when a system is configured for snoop with
                 proxy reporting.";
                leaf immediate-leave {
                  type enumeration {
                    enum "enabled" {
                      value 0;
                      description
                        "Immediate leave enabled means the system performs host
    tracking. Then the reception of a leave results in
    immediately removing this host from the subscription
    list.";
                    }
                    enum "disabled" {
                      value 1;
                      description
                        "Immediate leave disabled means the system sends MGMD
    Group-Specific Query messages on the interface to find
    out if other hosts connected to the same interface would
    still be interested in receiving the multicast channel.";
                    }
                  }
                  default "disabled";
                  description
                    "Immediate leave controls the function by which an interface
    that receives a leave for a certain group might immediately
    delete the corresponding group record.
    
    Configuring immediate leave reduces the amount of time it
    takes for the switch to stop sending multicast traffic to an
    interface when the last host on that interface leaves the
    group.
    
    When immediate leave is disabled, the switch no longer tracks
    hosts. Instead, whenever it receives a leave from a host on
    an interface, it waits for a period as specified by the group
    membership interval. If it does not receive any MGMD
    Membership Report on the interface in that time interval, it
    stops forwarding multicast traffic to the interface.";
                  reference
                    "ITU-T G.988 Clause 9.3.27 - Immediate Leave;
                     RFC 3810 Section A.2";
    
                }
    
                leaf group-membership-interval {
                  type uint32 {
                    range "1..31744";
                  }
                  units "seconds";
                  default "260";
                  description
                    "The group membership interval is the amount of time that has
    to pass before a multicast router decides there are no more
    members of a group or a particular source on an interface.
    
    This leaf, as a parameter of a snooper, has to be consistent
    with the parameters configured in the multicast router that
    is connected to the snooper. It has to be equal to or larger
    than ((the Robustness Variable) times (the Query Interval))
    plus (one Query Response Interval) as calculated from
    parameters configured in the multicast router.";
                  reference
                    "RFC 4541 Section 2.1.1 - Item 6;
                     RFC 3376 Section 8.4";
    
                }
    
                leaf last-member-query-interval {
                  if-feature bbf-mgmd:mgmd-snoop-last-leave;
                  type uint32 {
                    range "2..31744";
                  }
                  units "0.1 seconds";
                  default "10";
                  description
                    "The last member query interval is the maximum response time
    inserted into MGMD Group-Specific Query messages sent in
    response to leaves, and is also the amount of time between
    MGMD Group-Specific Query messages.
    
    This feature is optional for a snooper and can be used in a
    slow network. When this feature is enabled, it permits a
    snooper to send a MGMD Group-Specific Query message after the
    group membership has timed out to verify that clients have
    stopped watching a channel. If no response is received to the
    MGMD Group-Specific Query message, it removes the group state
    and discontinuous multicast transmission for that channel.";
                  reference
                    "RFC 3376 Section 8.8;
                     RFC 5519 Section 5
                    - mgmdRouterInterfaceLastMemberQueryInterval";
    
                }
    
                leaf last-member-query-count {
                  if-feature bbf-mgmd:mgmd-snoop-last-leave;
                  type uint32 {
                    range "1..255";
                  }
                  default "2";
                  description
                    "The number of unanswered MGMD Group-Specific Query messages
    sent out before it is assumed that there are no local members
    interested in the IP multicast stream.
    
    This feature is optional for a snooper and can be used in a
    slow network. When this feature is enabled, it permits a
    snooper to send a MGMD Group-Specific Query message after the
    group membership has timed out to verify that clients have
    stopped watching a channel. If no response is received to the
    MGMD Group-Specific Query message, it removes the group state
    and discontinuous multicast transmission for that channel.";
                  reference
                    "RFC 3376 Section 8.9";
    
                }
              }  // container interfaces-to-hosts-data
    
              container interface-to-router-data {
                description
                  "Data nodes that are applied to each interface away from
                 the multicast tree when the system is configured for
                 snoop with proxy reporting.";
                leaf unsolicited-report-interval {
                  type uint32 {
                    range "1..255";
                  }
                  units "0.1 seconds";
                  default "10";
                  description
                    "The interval between repetitions of a host's initial report
    of interest in a multicast address.";
                  reference
                    "RFC 3376 Section 8.11;
                     RFC 3810 Section 9.11";
    
                }
    
                leaf robustness {
                  type uint32 {
                    range "1..255";
                  }
                  default "2";
                  description
                    "The robustness variable allows tuning for the expected packet
    loss on a subnet. If a subnet is expected to be lossy, the
    robustness variable may be increased. IGMP and MLD are robust
    to (robustness variable - 1) packet losses.";
                  reference
                    "RFC 3376 Section 8.1;
                     RFC 5519 Section 5 - mgmdHostInterfaceVersion3Robustness";
    
                }
              }  // container interface-to-router-data
            }  // list multicast-snoop-with-proxy-reporting-profile
    
            list multicast-proxy-profile {
              if-feature mgmd-proxy;
              key "name";
              description
                "Profile containing configuration data to be used by
               multicast proxy switches. A proxy provides service between
               a set of interfaces for which it acts as a router and a set
               of interfaces for which it acts as a host.";
              leaf name {
                type bbf-yang:string-ascii64;
                description
                  "The name of a multicast proxy profile.";
              }
    
              leaf protocol-version {
                type bbf-mgmd-types:mgmd-protocol-and-version;
                mandatory true;
                description
                  "Protocol(s) and/or protocol version(s) supported on the
                 various interfaces of the VPN.";
              }
    
              container interfaces-to-hosts-data {
                description
                  "Data nodes that are applied to each interface facing the
                 multicast tree when the system is configured for proxy
                 mode.";
                leaf query-interval {
                  type uint32 {
                    range "1..31744";
                  }
                  units "seconds";
                  default "125";
                  description
                    "The interval at which MGMD General Query messages (GMQs) are
    sent on interfaces.";
                  reference
                    "RFC 3376 Section 8.2;
                     RFC 3810 Section 9.14.2;
                     RFC 5519 Section 5 - mgmdRouterInterfaceQueryInterval";
    
                }
    
                leaf query-max-response-time {
                  type uint32 {
                    range "0..31744";
                  }
                  units "0.1 seconds";
                  default "100";
                  description
                    "The maximum query response time advertised in MGMD General
    Query messages sent on interfaces. The value 0 means that the
    host receiving the Query message shall reply immediately to
    it. A value different than 0 means that the host waits a
    random time between 0 and the time specified in the Query
    message before answering the Query message.
    
    This configuration is shared between IGMPv2, MLDv1, IGMPv3
    and MLDv2 but has a difference in translating the configured
    value into a time inserted in the Query message:
    
    IGMPv2:
      Configured value < 255 : the time value is equal to the
      configured value (units in 100ms)
      Configured value >= 255 : the time value is 255 (units in
      100ms)
    
    MLDv1:
      Configured value < 374 : the time value is equal to the
      configured value (units in 100ms)
      Configured value >= 374 : the time value is 374 (units in
      100ms)
    
    IGMPv3 & MLDv2:
      Configured value < 128 : the time value is equal to the
      configured value (units in 100ms)
      Configured value >= 128 : the time value is calculated from
      the data node value. It is the lowest discrete value higher
      or equal to the data node value.
      The supported set of discrete values are calculated from a
      floating point calculation 'mantissa * (2 power(exponent))'
      for which the mantissa is a number from 16 to 31 and the
      exponent is a number from 3 to 10.";
                  reference
                    "RFC 2710 Section 7.3;
                     RFC 2933 Section 4 - igmpInterfaceQueryMaxResponseTime;
                     RFC 3376 Section 8.3;
                     RFC 3810 Section 5.1.9;
                     RFC 5519 Section 5 -
                    mgmdRouterInterfaceQueryMaxResponseTime";
    
                }
    
                leaf last-member-query-interval {
                  when
                    "../immediate-leave = "disabled"";
                  type uint32 {
                    range "2..31744";
                  }
                  units "0.1 seconds";
                  default "10";
                  description
                    "The last member query interval is the max response time
    inserted into MGMD Group-Specific Query messages sent in
    response to leaves, and is also the amount of time between
    MGMD Group-Specific Query messages.";
                  reference
                    "RFC 2710 Section 7.8;
                     RFC 3376 Section 8.8;
                     RFC 5519 Section 5 - mgmdRouterLastMemberQueryInterval";
    
                }
    
                leaf last-member-query-count {
                  when
                    "../immediate-leave = "disabled"";
                  type uint32 {
                    range "1..255";
                  }
                  default "2";
                  description
                    "The number of unanswered MGMD Group-Specific Query messages
    sent out before it is assumed that there are no local members
    interested in the IP multicast stream.
    
    This data node is applied to each interface on which the
    proxy generates MGMD Membership Query messages.";
                  reference
                    "RFC 3376 Section 8.9";
    
                }
    
                leaf startup-query-interval {
                  type uint32 {
                    range "0..31744";
                  }
                  units "seconds";
                  default "30";
                  description
                    "This variable represents the interval between MGMD General
    Query messages sent by a Querier on startup.";
                  reference
                    "RFC 3376 Section 8.6";
    
                }
    
                leaf startup-query-count {
                  type uint32 {
                    range "1..255";
                  }
                  default "2";
                  description
                    "The startup query count is the number of MGMD General Query
    messages sent out on startup, separated by the startup query
    interval.";
                  reference
                    "RFC 3376 Section 8.7";
    
                }
    
                leaf immediate-leave {
                  type enumeration {
                    enum "enabled" {
                      value 0;
                      description "Enabled.";
                    }
                    enum "disabled" {
                      value 1;
                      description "Disabled.";
                    }
                  }
                  default "disabled";
                  description
                    "Immediate leave controls the function by which an interface
    that receives a leave for a certain group might immediately
    delete the corresponding group record.
    
    Configuring immediate leave reduces the amount of time it
    takes for the switch to stop sending multicast traffic to an
    interface when the last host on that interface leaves the
    group.
    
    When immediate leave is disabled, the switch no longer tracks
    hosts. Instead, whenever it receives a leave from a host on
    an interface, it sends out a MGMD Group-Specific Query
    message to all hosts on that interface. If it does not
    receive any MGMD Membership Report message on the interface
    in response to the MGMD Group-Specific Query message within a
    set interval, it stops forwarding multicast traffic to the
    interface.";
                  reference
                    "ITU-T G.988 Clause 9.3.27 - Immediate Leave";
    
                }
    
                leaf robustness {
                  type uint32 {
                    range "1..255";
                  }
                  default "2";
                  description
                    "The robustness variable allows tuning for the expected packet
    loss on a subnet. If a subnet is expected to be lossy, the
    robustness variable may be increased. IGMP and MLD are robust
    to (robustness variable - 1) packet losses.";
                  reference
                    "RFC 3376 Section 8.1;
                     RFC 5519 Section 5 - mgmdRouterInterfaceRobustness";
    
                }
              }  // container interfaces-to-hosts-data
    
              container interface-to-router-data {
                description
                  "Data nodes that are applied to each interface facing away
                 from the multicast tree when the system is configured for
                 proxy mode.";
                leaf unsolicited-report-interval {
                  type uint32 {
                    range "1..255";
                  }
                  units "0.1 seconds";
                  default "10";
                  description
                    "The interval between repetitions of a host's initial report
    of interest in a multicast address.";
                  reference
                    "RFC 3376 Section 8.11;
                     RFC 3810 Section 9.11";
    
                }
    
                leaf robustness {
                  type uint32 {
                    range "1..255";
                  }
                  default "2";
                  description
                    "The robustness variable allows tuning for the expected packet
    loss on a subnet. If a subnet is expected to be lossy, the
    robustness variable may be increased. IGMP and MLD are robust
    to (robustness variable - 1) packet losses.";
                  reference
                    "RFC 3376 Section 8.1;
                     RFC 5519 Section 5 - mgmdHostInterfaceVersion3Robustness";
    
                }
              }  // container interface-to-router-data
            }  // list multicast-proxy-profile
    
            list multicast-vpn {
              key "name";
              description
                "Multicast Virtual Private Network (VPN). A multicast VPN
               defines the context of the multicast service. A service
               operator may choose to configure a single multicast VPN or
               multiple multicast VPN (e.g., open access environment).";
              leaf name {
                type bbf-yang:string-ascii64;
                description
                  "The name associated with a particular multicast VPN
                 (service context).";
              }
    
              leaf vpn-administrative-enabled {
                type boolean;
                default "true";
                description
                  "The administrative state of all MGMD functions in the
                 multicast VPN.
    
                 If 'false', all multicast functions in the multicast VPN
                 will stop working:
                 - ongoing multicast traffic (video data) will stop being
                   forwarded, which includes the forwarding to statically
                   configured host associations,
                 - the dynamic established multicast trees and host
                   associations will be cleared,
                 - no MGMD protocol messages will be sent,
                 - MGMD protocol messages coming from hosts and router
                   will not be processed and will be silently dropped.
    
                 If 'true', all multicast functions in the multicast VPN
                 will start working (unless overruled by other
                 administrative states):
                 - MGMD protocol messages coming from hosts and router
                   will be processed and dynamic multicast trees will be
                   built,
                 - multicast traffic (video data) will be forwarded
                   according the multicast trees and their host
                   associations.
    
                 Note that the MLD protocol is also used in the context of
                 some special IPv6 multicast addresses that are used in
                 specific IPv6 protocols such as the Neighbor Discovery
                 protocol. This administrative state does not affect the
                 processing of MLD messages for these specific multicast
                 addresses. In other words, it does not affect the
                 processing of MLD messages for the all-nodes multicast
                 address, nor for solicited-node multicast addresses
                 (addresses derived from a unicast address).";
              }
    
              leaf mode {
                type identityref {
                  base mgmd-mode;
                }
                mandatory true;
                description
                  "Identifies the MGMD mode to be applied for this VPN. The
                 MGMD mode specifies how IGMP/MLD messages are processed
                 to manage a multicast tree within the context of a Layer
                 2 forwarder.
    
                 Note that the MLD protocol is also used in the context of
                 some special IPv6 multicast addresses that are used in
                 specific IPv6 protocols such as the Neighbor Discovery
                 protocol. This mode does not affect the processing of MLD
                 messages for these specific multicast addresses. In other
                 words, it does not affect the processing of MLD messages
                 for the all-nodes multicast address, nor for solicited-
                 node multicast addresses (addresses derived from a
                 unicast address).";
              }
    
              leaf multicast-proxy-profile-name {
                when
                  "../mode = 'bbf-mgmd:proxy'";
                if-feature mgmd-proxy;
                type leafref {
                  path "/bbf-mgmd:multicast/bbf-mgmd:mgmd/bbf-mgmd:multicast-proxy-profile/bbf-mgmd:name";
                }
                description
                  "A reference to a MGMD proxy profile.";
              }
    
              leaf multicast-snoop-transparent-profile-name {
                when
                  "../mode = 'bbf-mgmd:snoop-transparent'";
                if-feature mgmd-snoop-transparent;
                type leafref {
                  path "/bbf-mgmd:multicast/bbf-mgmd:mgmd/bbf-mgmd:multicast-snoop-transparent-profile/bbf-mgmd:name";
                }
                description
                  "A reference to a MGMD snoop transparent profile.";
              }
    
              leaf multicast-snoop-with-proxy-reporting-profile-name {
                when
                  "../mode = 'bbf-mgmd:snoop-with-proxy-reporting'";
                if-feature mgmd-snoop-with-proxy-reporting;
                type leafref {
                  path "/bbf-mgmd:multicast/bbf-mgmd:mgmd/bbf-mgmd:multicast-snoop-with-proxy-reporting-profile/bbf-mgmd:name";
                }
                description
                  "A reference to a MGMD snoop with proxy reporting
                 profile.";
              }
    
              leaf ip-version {
                type inet:ip-version;
                default "ipv4";
                description
                  "The IP version identifies the type of IP addresses used
                 within this VPN.";
              }
    
              choice ip-to-host {
                when
                  "mode = 'bbf-mgmd:proxy' or mode = 'bbf-mgmd:"
                    + "snoop-with-proxy-reporting'";
                description
                  "Provides the mechanism to add IP addressing information
                 to the VPN. This data, if configured, shall be used in
                 MGMD Membership Query messages sent on host interfaces.
    
                 If not configured, and the 'ip-version' is 'ipv4', the
                 proxy or snooper with proxy reporting will generate MGMD
                 Membership Query messages with the IPv4 address
                 0.0.0.0.";
                case ip-address {
                  leaf ipv4-address {
                    when
                      "../ip-version = 'ipv4'";
                    type inet:ipv4-address;
                    default "0.0.0.0";
                    description
                      "The IPv4 address to be used as source IP address in
                     MGMD Membership Query messages when mode is proxy or
                     snoop-with-proxy-reporting.";
                  }
    
                  leaf ipv6-address {
                    when
                      "../ip-version = 'ipv6'";
                    type inet:ipv6-address;
                    default "::";
                    status deprecated;
                    description
                      "The IPv6 address to be used as as source IP address
                     in MGMD Membership Query messages when mode is proxy
                     or snoop-with-proxy-reporting.
    
                     As defined in the referenced RFC, the source IP
                     address shall be a link local address. Link local IP
                     addresses are calculated inside the device. Hence
                     there is no need to provide the possibility to
                     configure an address. Hence: deprecated.";
                    reference
                      "RFC 3590;
                       RFC 3810";
    
                  }
                }  // case ip-address
              }  // choice ip-to-host
    
              leaf unmatched-join-processing {
                type identityref {
                  base unmatched-join-processing;
                }
                default "unmatched-join-discard";
                description
                  "This attribute specifies the multicast VPN behavior when
                 the system receives a join for a multicast channel for
                 which there is no explicit configuration in the
                 'multicast-channel' list.
    
                 When no multicast package is associated to a particular
                 multicast interface to a host, then an unmatched join is
                 a join on such an interface for a group address that is
                 not configured in the 'multicast-channel' list.
    
                 When a multicast package is associated to a particular
                 multicast interface to a host, then this package controls
                 authorization for all multicast channels for which there
                 is explicit configuration in the 'multicast-channel'
                 list. This means, a join for a multicast channel that
                 exists in the 'multicast-channel' list and is not part of
                 the host's package is never granted. Also in this case
                 this leaf controls the processing of joins for group
                 addresses for which there is no explicit configuration in
                 the 'multicast-channel' list.
    
                 This feature is useful in wholesale environments where
                 group address authorization is performed elsewhere. The
                 value of 'unmatched-join-discard' specifies that the
                 multicast switch will silently discard the unauthorized
                 joins; the other values specify how the multicast switch
                 shall process the unauthorized joins.";
                reference
                  "TR-101i2 R-238";
    
              }
    
              leaf network-interface-for-unmatched-reports {
                when
                  "../unmatched-join-processing = 'bbf-mgmd:"
                    + "unmatched-join-snoop-or-proxy'" {
                  description
                    "This leaf is provided at the condition the system shall
                   process unmatched MGMD Membership Reports according its
                   configured mode.";
                }
                type leafref {
                  path "../bbf-mgmd:multicast-network-interface/bbf-mgmd:name";
                }
                mandatory true;
                description
                  "The multicast network interface involved for multicast
                 group addresses for which there is no specific
                 configuration. It is the interface that is used to send
                 MGMD Membership Reports, and inherent it is also the
                 interface from which the system will receive the
                 related multicast frames.";
              }
    
              list multicast-interface-to-host {
                key "name";
                unique "vlan-sub-interface";
                description
                  "Configuration data for multicast interfaces to hosts.
                 A multicast interface to a host is connecting a MGMD host
                 to the multicast switch. A multicast interface to a host
                 is characterized by the need to perform some checks
                 before granting requests to join a multicast address.";
                leaf name {
                  type bbf-yang:string-ascii64;
                  must
                    "(count(../../bbf-mgmd:multicast-network-interface
                                  [bbf-mgmd:name = current()]) = 0)" {
                    error-message
                      "The name of a multicast interface to host can not "
                        + "be the name of a multicast network interface.";
                    description
                      "Only allow unique names over both the list of
                     multicast to network interfaces and the multicast
                     interfaces to host.";
                  }
                  description
                    "The name of the multicast interface to a host.";
                }
    
                leaf vlan-sub-interface {
                  type if:interface-ref;
                  must
                    "derived-from-or-self(/if:interfaces/if:interface
                      [if:name = current()]/if:type,
                      'bbfift:vlan-sub-interface')" {
                    error-message
                      "The referenced interface must have the type "
                        + "vlan-sub-interface.";
                    description
                      "The interface must be of the type
                     'vlan-sub-interface'.";
                  }
                  mandatory true;
                  description
                    "The VLAN sub-interface on a host interface.";
                }
    
                leaf data-path-vlan-sub-interface {
                  when
                    "../../unmatched-join-processing = 'bbf-mgmd:"
                      + "unmatched-join-forward'" {
                    description
                      "This leaf is an optional data node for the when the
                     system shall process unmatched MGMD Membership
                     Reports as regular data. In that condition the system
                     shall by default further process the message using
                     the VLAN sub-interface referenced by the leaf
                     'vlan-sub-interface'. Configuring the current leaf
                     overrules this default and sets another VLAN
                     sub-interface to be used when further processing the
                     MGMD message as data frame.";
                  }
                  type if:interface-ref;
                  must
                    "derived-from-or-self(/if:interfaces/if:interface
                      [if:name = current()]/if:type,
                      'bbfift:vlan-sub-interface')" {
                    error-message
                      "The referenced interface must have the type "
                        + "vlan-sub-interface.";
                    description
                      "The interface must be of the type VLAN
                     sub-interface.";
                  }
                  description
                    "The VLAN sub-interface to be used when the multicast
                   function needs knowledge on a related datapath. For
                   example for re-inserting MGMD Membership Reports for
                   multicast group addresses for which there is no
                   configuration. Further frame processing, including
                   VLAN tag popping and or pushing, is subject to
                   configuration of the referenced VLAN sub-interface.";
                }
    
                leaf interface-to-host-administrative-enabled {
                  type boolean;
                  default "true";
                  description
                    "The administrative state of MGMD functions for this
                   multicast to host interface.
    
                   If 'false', all multicast functions will stop working
                   for this interface:
                   - ongoing multicast traffic (video data) will stop
                     being forwarded to the host, which includes the
                     forwarding for statically configured associations,
                   - the dynamic established host associations will be
                     cleared,
                   - no MGMD protocol (Membership Query) messages will be
                     sent to the host,
                   - MGMD protocol messages (Membership Report) coming
                     from the host will not be processed and will be
                     silently dropped.
    
                   If 'true', all multicast functions on this interface to
                   the host will start working (unless overruled by other
                   administrative states):
                   - MGMD protocol messages coming from the host will be
                     processed and dynamic associations to trees will be
                     built,
                   - multicast traffic (video data) will be forwarded
                     according the associations for this host interface.";
                }
    
                leaf max-group-number {
                  type usage-limit;
                  default "no-limit";
                  description
                    "The maximum number of dynamic multicast groups that may
                   be replicated to the interface at any one time. Dynamic
                   refers to including all multicast groups requested via
                   MGMD Membership Reports, and excludes all the static
                   multicast branches. The default value 'no-limit' means
                   that no administrative limit is imposed.";
                }
    
                leaf maximum-concurrent-devices-per-channel {
                  type usage-limit;
                  default "2";
                  description
                    "The maximum number of concurrent devices allowed on
                   this host interface for a single multicast channel.
                   This is relevant in combination with host tracking.";
                }
    
                leaf multicast-rate-limit {
                  if-feature multicast-cac;
                  type uint32;
                  units "kilobits per second";
                  default "0";
                  description
                    "The multicast rate limit specifies the total bandwidth
                   available on the interface for multicast traffic. A
                   special value, 0, means there is no limit on the
                   bandwidth available.";
                }
    
                leaf multicast-rate-limit-exceed-action {
                  if-feature multicast-cac;
                  type rate-limit-action-enum;
                  default "best-effort";
                  description
                    "The multicast rate limit exceed action specifies how a
                   multicast switch shall act when the multicast CAC
                   concludes that accepting the MGMD request would result
                   in a situation that more bandwidth is needed than
                   available on the host interface, then this request can
                   be accepted, possibly resulting in frame loss, or the
                   request can be dropped.";
                }
    
                leaf-list multicast-package {
                  if-feature multicast-package;
                  type leafref {
                    path "../../bbf-mgmd:multicast-package/bbf-mgmd:name";
                  }
                  description
                    "References the packages of multicast channels to which
                   the host has a subscription. If a non-empty leaf-list
                   is associated to a multicast interface to a host, the
                   subscriber is only authorized to access the multicast
                   channels of each of the packages listed, under the
                   access condition described in each package. An empty
                   leaf-list means that the subscriber is not allowed to
                   access any multicast stream. A multicast interface to a
                   host with a non-existing leaf-list means the subscriber
                   is authorized to access to any multicast channels of
                   the VPN.";
                }
    
                action clear-host-interface-statistics {
                  description
                    "When the action is received, the statistics within the
                   multicast interface to a host are cleared.";
                }  // rpc clear-host-interface-statistics
              }  // list multicast-interface-to-host
    
              list multicast-network-interface {
                key "name";
                description
                  "The network topology dependent configuration data a
                 multicast switch needs to reach MGMD routers. This
                 basically provides the list of network interfaces via
                 which it can reach them and in case the multicast switch
                 acts as a proxy or as a snooper with proxy reporting it
                 also provides the IP address.";
                leaf name {
                  type bbf-yang:string-ascii64;
                  description
                    "The name of the multicast network interface.";
                }
    
                choice multicast-transport {
                  mandatory true;
                  description
                    "Provides the various choices for how multicast traffic
                   can be distributed up to the multicast switch.";
                  container single-uplink-interface-data {
                    description
                      "Contains the data for when the multicast has a
                       single VLAN sub-interface as network interface.";
                    leaf vlan-sub-interface {
                      type if:interface-ref;
                      must
                        "derived-from-or-self(/if:interfaces
                            /if:interface[if:name = current()]/if:type,
                            'bbfift:vlan-sub-interface')" {
                        error-message
                          "The referenced interface must have the type "
                            + "vlan-sub-interface.";
                        description
                          "The single uplink via which the multicast
                           traffic enters the switch shall be a VLAN
                           sub-interface on a network interface.";
                      }
                      description
                        "The VLAN sub-interface via which the multicast
                         channel is distributed to the multicast switch.";
                    }
                  }  // container single-uplink-interface-data
                }  // choice multicast-transport
    
                choice ip-layer {
                  when
                    "../mode = 'bbf-mgmd:proxy' or "
                      + "../mode = 'bbf-mgmd:snoop-with-proxy-reporting'";
                  description
                    "Provides the mechanism to add IP addressing information
                   to the multicast network interface.";
                  case ip-address {
                    leaf ipv4-address {
                      when
                        "../../ip-version = 'ipv4'";
                      type inet:ipv4-address;
                      default "0.0.0.0";
                      description
                        "The IPv4 address to be used as source IP address
                       when mode is proxy or snoop-with-proxy-reporting.";
                    }
    
                    leaf ipv6-address {
                      when
                        "../../ip-version = 'ipv6'";
                      type inet:ipv6-address;
                      default "::";
                      status deprecated;
                      description
                        "The IPv6 address to be used as source IP address
                       when mode is proxy or snoop-with-proxy-reporting.
    
                       As defined in the referenced RFC, the source IP
                       address shall be a link local address. Link local
                       ip addresses are calculated inside the device.
                       Hence there is no need to provide the possibility
                       to configure an address. Hence: deprecated.";
                      reference
                        "RFC 3590;
                         RFC 3810";
    
                    }
                  }  // case ip-address
                }  // choice ip-layer
    
                action clear-network-interface-statistics {
                  description
                    "When the action is received, the statistics within the
                   multicast network interface are cleared.";
                }  // rpc clear-network-interface-statistics
              }  // list multicast-network-interface
    
              list multicast-channel {
                key "name";
                unique "ipv4/group-ipv4-address ipv4/source-ipv4-address";
                unique "ipv6/group-ipv6-address ipv6/source-ipv6-address";
                description
                  "Management information of multicast channels for Any
                 Source Multicast (ASM) and Source Specific Multicast
                 (SSM) mode of operations. Multicast channels are uniquely
                 identified by the source and multicast group IP
                 address.";
                leaf name {
                  type bbf-yang:string-ascii64;
                  description
                    "The name associated with a particular multicast
                   channel.";
                }
    
                leaf network-interface {
                  type leafref {
                    path "../../bbf-mgmd:multicast-network-interface/bbf-mgmd:name";
                  }
                  mandatory true;
                  description
                    "The multicast network interface on which the multicast
                   channel is received.";
                }
    
                container ipv4 {
                  description
                    "Container for all IPv4 dependent configuration data.";
                  leaf source-ipv4-address {
                    when
                      "../../../ip-version = 'ipv4'";
                    type inet:ipv4-address;
                    default "0.0.0.0";
                    description
                      "The source IP address of the multicast channel. A
                     value '0.0.0.0' is used in the ASM mode of operation.
                     A value different of '0.0.0.0' is used in the SSM
                     mode of operation.";
                  }
    
                  leaf group-ipv4-address {
                    when
                      "../../../ip-version = 'ipv4'";
                    type inet:ipv4-address;
                    mandatory true;
                    description
                      "The group IP address of the multicast channel.";
                  }
    
                  leaf group-ipv4-address-end {
                    when
                      "../../../ip-version = 'ipv4'";
                    if-feature mgmd-group-ip-range;
                    type inet:ipv4-address;
                    description
                      "If the leaf 'group-ipv4-address-end' is not present,
                     then the configuration is for a single group address
                     as specified by the leaf 'group-ipv4-address'.
    
                     A 'group-ipv4-address-end' with a value lower than
                     the value of the leaf 'group-ipv4-address' is
                     invalid.
    
                     A 'group-ipv4-address-end' with a value greater than
                     the value of the leaf 'group-ipv4-address' is valid,
                     in which case the configurations apply to all the
                     group addresses starting from the value of the leaf
                     'group-ipv4-address' up to and including the value of
                     'group-ipv4-address-end'.";
                  }
                }  // container ipv4
    
                container ipv6 {
                  description
                    "Container for all IPv6 dependent configuration data.";
                  leaf source-ipv6-address {
                    when
                      "../../../ip-version = 'ipv6'";
                    type inet:ipv6-address;
                    default "::";
                    description
                      "The source IP address of the multicast channel. A
                     value '::' is used in the ASM mode of operation. A
                     value different of '::' is used in the SSM mode of
                     operation.";
                  }
    
                  leaf group-ipv6-address {
                    when
                      "../../../ip-version = 'ipv6'";
                    type inet:ipv6-address;
                    mandatory true;
                    description
                      "The group IP address of the multicast channel.";
                  }
    
                  leaf group-ipv6-address-end {
                    when
                      "../../../ip-version = 'ipv6'";
                    if-feature mgmd-group-ip-range;
                    type inet:ipv6-address;
                    description
                      "If the leaf 'group-ipv6-address-end' is not present,
                     then the configuration is for a single group address
                     as specified by the leaf 'group-ipv6-address'.
    
                     A 'group-ipv6-address-end' with a value lower than
                     the value of the leaf 'group-ipv6-address' is
                     invalid.
    
                     A 'group-ipv6-address-end' with a value greater than
                     the value of the leaf 'group-ipv6-address' is valid,
                     in which case the configuration apply to all the
                     group addresses starting from the value of the leaf
                     'group-ipv6-address' up to and including the value of
                     the leaf 'group-ipv6-address-end'.";
                  }
                }  // container ipv6
    
                leaf channel-rate {
                  if-feature multicast-cac;
                  type uint32;
                  units "kilobits per second";
                  default "0";
                  description
                    "The bandwidth of the multicast channel to be used at
                   CAC.";
                }
    
                leaf-list interface-to-host {
                  if-feature static-multicast-host-associations;
                  type leafref {
                    path "../../bbf-mgmd:multicast-interface-to-host/bbf-mgmd:name";
                  }
                  description
                    "The host interfaces that are associated to the
                   multicast channel by configuration. I.e. hosts that
                   will receive the multicast frames (video traffic) of
                   this multicast channel.";
                }
              }  // list multicast-channel
    
              list multicast-package {
                if-feature multicast-package;
                key "name";
                description
                  "Each entry contains the information related to a
                 multicast package, i.e., a package of multicast
                 channels.";
                leaf name {
                  type bbf-yang:string-ascii64;
                  description
                    "The name of a multicast package.";
                }
    
                list multicast-channel-admission-control {
                  key "multicast-channel-name";
                  description
                    "A list containing admission control data per
    multicast channel.";
                  leaf multicast-channel-name {
                    type leafref {
                      path "../../../bbf-mgmd:multicast-channel/bbf-mgmd:name";
                    }
                    description
                      "The name of the multicast channel.";
                  }
    
                  leaf access-right {
                    type enumeration {
                      enum "enabled" {
                        value 0;
                        description
                          "This multicast channel is allowed to be joined.";
                      }
                      enum "preview" {
                        value 1;
                        description
                          "This multicast channel is allowed to be previewed.";
                      }
                      enum "disabled" {
                        value 2;
                        description
                          "This multicast channel is not allowed to be joined.";
                      }
                    }
                    default "enabled";
                    description
                      "Defines the type of permission for hosts to access this
    multicast channel.";
                  }
    
                  container access-parameters {
                    description
                      "Access parameters for a multicast channel.";
                    leaf preview-parameter {
                      when
                        "../../access-right = 'preview'";
                      if-feature bbf-mgmd:multicast-preview;
                      type leafref {
                        path "/bbf-mgmd:multicast/bbf-mgmd:mgmd/bbf-mgmd:preview-parameters-profile/bbf-mgmd:name";
                      }
                      description
                        "The preview parameters setting for this multicast
    channel.";
                    }
                  }  // container access-parameters
                }  // list multicast-channel-admission-control
              }  // list multicast-package
    
              action clear-vpn-statistics {
                description
                  "When the action is received, the statistics within the
                 multicast VPN are cleared.";
              }  // rpc clear-vpn-statistics
            }  // list multicast-vpn
    
            action clear-global-statistics {
              description
                "When the action is received, the statistics of multicast
               functions within the system are cleared.";
            }  // rpc clear-global-statistics
          }  // container mgmd
        }  // container multicast
    
        container multicast-state {
          config false;
          description
            "State data nodes associated with multicast.";
          container mgmd {
            description
              "MGMD state data, i.e., operational data related to the IGMP
             and/or MLD protocols.";
            list multicast-vpn {
              key "name";
              description
                "Multicast Virtual Private Network (VPN). A VPN defines a
               the multicast service context.";
              leaf name {
                type bbf-yang:string-ascii64;
                description
                  "The name associated with a particular multicast VPN
                 (service context).";
              }
    
              leaf mode {
                type identityref {
                  base mgmd-mode;
                }
                mandatory true;
                description
                  "Identifies the MGMD mode to be applied for this VPN. The
                 MGMD mode specifies how MGMD protocol messages are
                 processed to manage a multicast tree within the context
                 of a Layer 2 forwarder.";
              }
    
              list multicast-interface-to-host {
                key "name";
                description
                  "Multicast interface to a host state data. A multicast
                 interface to a host is connecting a MGMD host to the
                 multicast switch.";
                leaf name {
                  type bbf-yang:string-ascii64;
                  description
                    "The name of the multicast interface to a host.";
                }
    
                container interface-to-host-rx-state-data {
                  description
                    "Contains all the counters for received MGMD messages
                   when the multicast switch operates as a proxy, a
                   snooper or a snooper with proxy reporting.";
                  leaf in-successful-join-requests {
                    type yang:counter32;
                    units "messages";
                    description
                      "Counts the total number of successful join requests received
    from hosts connected to the interface. This includes new
    joins (which make a new connection) and re-joins (which
    already have a connection).
    
    For MGMD version 2 it counts the number of Membership Report
    messages that resulted in a successful join.
    
    MGMD version 3 defines a Membership Report message to contain
    multiple group records. Within a group record there is a
    parameter 'multicast address' and a list of 'source
    addresses'. A tree is managed per (multicast address, source
    address) pair. Hence a join is a request that requests
    associating the interface to a tree. In case one Membership
    Report message results in requests for associating the
    interface to N trees, then this corresponds to N joins. For
    MGMD version 3 the counter result in-successful-join-requests
    counts the number of joins that in successfully associating
    the interface to a tree.";
                    reference
                      "TR-101i2 R-251 - 'Per port, per multicast VLAN counters',
                      Item 1";
    
                  }
    
                  leaf in-unsuccessful-join-requests {
                    type yang:counter32;
                    units "messages";
                    description
                      "Counts the total number of unsuccessful new join requests
    from hosts connected to the interface. The failures could be
    due to the following reasons: permission failure, bitrate
    failure, lack of resource or invalid group address.
    
    For MGMD version 2 it counts the number of Membership Report
    messages that failed to result in a successful join.
    
    MGMD version 3 defines a Membership Report message to contain
    multiple group records. Within a group record there is a
    parameter 'multicast address' and a list of 'source
    addresses'. A tree is managed per (multicast address, source
    address) pair. Hence a join is a request that requests
    associating the interface to a tree. In case one Membership
    Report message results in requests for associating the
    interface to N trees, then this corresponds to N joins. For
    MGMD version 3 the counter in-unsuccessful-join-requests
    counts the number of joins that did not result in
    successfully associating the interface to a tree.";
                  }
    
                  leaf in-leaves {
                    type yang:counter32;
                    units "messages";
                    description
                      "For MGMD version 2 it counts the number of Leave Group
    messages received on this interface, i.e., messages that are
    requesting to leave a multicast group address.
    
    MGMD version 3 defines a Membership Report message to contain
    multiple group records. Within a group record there is a
    parameter 'multicast address' and a list of 'source
    addresses'. A tree is managed per (multicast address, source
    address) pair. Hence a leave is a request that requests to
    remove the association from an interface to a tree. In case
    one Membership Report message results in requests for
    removing N associations from the interface from trees, then
    this corresponds to N leaves.";
                    reference
                      "TR-101i2 R-251 - 'Per port, per multicast VLAN counters',
                      Item 2";
    
                  }
    
                  leaf in-valid-messages {
                    type yang:counter32;
                    units "messages";
                    description
                      "For MGMD version 2 it counts the number of Membership Report
    messages plus the number of MGMD Leave Group messages
    received on this interface and that had valid formatting.
    
    For MGMD version 3 it also counts the number of Membership
    Report messages received on this interface and that had valid
    formatting.";
                  }
    
                  leaf in-invalid-messages {
                    type yang:counter32;
                    units "messages";
                    description
                      "Counts the number of invalid MGMD messages received on this
    interface.";
                    reference
                      "TR-101i2 R-251 - 'Per port, per multicast VLAN counters',
                      Item 5";
    
                  }
                }  // container interface-to-host-rx-state-data
    
                container interface-to-hosts-tx-state-data {
                  description
                    "Contains all the counters for generated MGMD messages
                   when the multicast switch operates as a proxy.
                   In that case it acts as a multicast router for this
                   interface, and generates MGMD Membership Query messages
                   itself.";
                  leaf out-specific-queries {
                    type yang:counter32;
                    units "messages";
                    description
                      "For MGMD version 2 it counts the number of sent MGMD
    Group-Specific Query messages.
    
    MGMD version 3 defines a Query message to contain a single
    group address' and a list of 'source addresses'. A tree is
    managed per group address, source address) pair. For MGMD
    version 3 a MGMD Group-Specific Query message is a Query
    message for which the group address is not the zero address.
    The counter out-specific-queries is incremented once for a
    sent ASM Group-Specific Query message (i.e., no source
    address), and is incremented with N for SSM Group-Specific
    Query messages that are sent to the router, where N is the
    number of source addresses in the Query message.";
                    reference
                      "TR-101i2 R-251 - 'Per port, per multicast VLAN counters',
                      Item 4";
    
                  }
    
                  leaf out-general-queries {
                    type yang:counter32;
                    units "messages";
                    description
                      "For MGMD version 2 it counts the number of sent MGMD General
    Query messages.
    
    MGMD version 3 defines a Query message to contain a single
    group address' and a list of 'source addresses'. For MGMD
    version 3 a MGMD General Query message is a Query message for
    which the group address is the zero address and there are no
    sources addresses. The counter out-generic-queries is
    incremented once per sent MGMD General Query message.";
                    reference
                      "TR-101i2 R-251 - 'Per port, per multicast VLAN counters',
                      Item 3";
    
                  }
                }  // container interface-to-hosts-tx-state-data
    
                leaf multicast-rate-limit-exceeded-count {
                  if-feature multicast-cac;
                  type yang:counter32;
                  units "messages";
                  description
                    "Counts the number of joins that exceeded, or would have
                   exceeded, the multicast rate limit, whether accepted or
                   denied.";
                }
    
                leaf current-multicast-bw-delivered {
                  if-feature multicast-cac;
                  type uint32;
                  units "kilobits per second";
                  description
                    "The device its best effort estimate of the actual
                   bandwidth currently being delivered or used.";
                }
    
                leaf number-active-multicast-channels {
                  type uint32;
                  description
                    "The total number of active multicast channels used by
                   the host.";
                }
              }  // list multicast-interface-to-host
    
              list multicast-network-interface {
                key "name";
                description
                  "Multicast network interface state data. A multicast
                 network interface is connecting the multicast switch to a
                 MGMD router.";
                leaf name {
                  type bbf-yang:string-ascii64;
                  description
                    "The name of the multicast network interface.";
                }
    
                choice multicast-transport {
                  mandatory true;
                  description
                    "Provides the various choices for how multicast traffic
                   can be distributed up to the multicast switch.";
                  container single-uplink-interface-to-router-state-data {
                    description
                      "Identifies the VLAN sub-interface via which the
                       multicast traffic is received in the multicast
                       switch, and contains all the counters for generated
                       and received MGMD messages when the multicast
                       switch operates as a proxy, has a single VLAN
                       sub-interface as network interface, and acts as a
                       multicast host for this interface.";
                    leaf vlan-sub-interface {
                      type if:interface-state-ref;
                      description
                        "The VLAN sub-interface via which the multicast
                         channel is received in the multicast switch.";
                    }
    
                    leaf out-joins {
                      type yang:counter32;
                      units "messages";
                      description
                        "For MGMD version 2 it counts the number of Membership Report
    messages sent on this interface, i.e., messages that are
    requesting to join a multicast group address.
    
    MGMD version 3 defines a Membership Report message to contain
    multiple group records. Within a group record there is a
    parameter 'multicast address' and a list of 'source
    addresses'. A tree is managed per (multicast address, source
    address) pair. Hence a join is a request that requests
    associating the interface to a tree. In case one Membership
    Report message results in requests for associating the
    interface to N trees, then this corresponds to N joins. For
    MGMD version 3 the counter counts the number of joins that
    are sent to the router.";
                      reference
                        "TR-101i2 R-251 - 'Per multicast VLAN counters', Item 2";
    
                    }
    
                    leaf out-leaves {
                      type yang:counter32;
                      units "messages";
                      description
                        "For MGMD version 2 it counts the number of Leave Group
    messages sent on this interface, i.e., messages that are
    requesting to leave a multicast group address.
    
    MGMD version 3 defines a Membership Report message to contain
    multiple group records. Within a group record there is a
    parameter 'multicast address' and a list of 'source
    addresses'. A tree is managed per (multicast address, source
    address) pair. Hence a leave is a request that requests to
    remove the association from an interface to a tree. In case
    one Membership Report message results in requests for
    removing N associations from trees for the interface, then
    this corresponds to N leaves.";
                      reference
                        "TR-101i2 R-251 - 'Per multicast VLAN counters', Item 4";
    
                    }
    
                    leaf in-general-queries {
                      type yang:counter32;
                      units "messages";
                      description
                        "For MGMD version 2 it counts the number of received General
    Query messages.
    
    MGMD version 3 defines a Query message to contain a single
    'group address' and a list of 'source addresses'. For MGMD
    version 3 a General Query message is a Query message for
    which the group address is  the zero address and there are no
    sources addresses. The counter in-general-queries is
    incremented once per received General Query message.";
                      reference
                        "TR-101i2 R-251 - 'Per multicast VLAN counters', Item 7";
    
                    }
    
                    leaf in-specific-queries {
                      type yang:counter32;
                      units "messages";
                      description
                        "For MGMD version 2 it counts the number of received
    Group-Specific Query messages.
    
    MGMD version 3 defines a Query message to contain a single
    'group address' and a list of 'source addresses'. A tree is
    managed per group address, source address) pair. For MGMD
    version 3 a Group-Specific Query message is a Query message
    for which the group address is not the zero address.  The
    counter in-specific-queries is incremented once for a
    received ASM Group-Specific Query message (i.e., no source
    address), and is incremented with N for SSM Group-Specific
    Query messages received to the router, where N is the number
    of source addresses in the Query message.";
                      reference
                        "TR-101i2 R-251 - 'Per multicast VLAN counters', Item 9";
    
                    }
    
                    leaf in-valid-messages {
                      type yang:counter32;
                      units "messages";
                      description
                        "For MGMD version 2 it counts the number of Query messages
    received on this interface and that had valid formatting.
    
    For MGMD version 3 it also counts the number of Query
    messages received on this interface and that had valid
    formatting.";
                    }
    
                    leaf in-invalid-message {
                      type yang:counter32;
                      units "messages";
                      description
                        "Counts the number of invalid messages received on the
    interface.";
                      reference
                        "TR-101i2 R-251 - 'Per multicast VLAN counters', Item 10";
    
                    }
    
                    leaf in-interface-wrong-version-queries {
                      type yang:counter32;
                      units "messages";
                      description
                        "The number of MGMD General Query messages received whose IGMP
    or MLD version does not match the version configured in the
    VPN its protocol version.
    
    Both IGMP and MLD require that all routers on a LAN be
    configured to run the same version.  Thus, if any MGMD
    General Query messages are received with the wrong version,
    this indicates a configuration error.";
                      reference
                        "RFC 5519 Section 5 - mgmdRouterInterfaceWrongVersionQueries";
    
                    }
    
                    leaf host-interface-version2-querier-time {
                      type yang:timeticks;
                      units "0.01 seconds";
                      description
                        "The time remaining until the host assumes that there are no
    MGMDv2 routers present on the interface. While this is
    non-zero, the host will reply to all MGMD Membership Query
    messages with version 2 Membership Reports. This variable
    applies to MGMDv3 hosts that are forced to run in v2 for
    compatibility with v2 hosts or routers present on the
    interface.";
                      reference
                        "RFC 3376 Section 7.2.1;
                         RFC 5519 Section 5 - mgmdHostInterfaceVersion2QuerierTimer";
    
                    }
                  }  // container single-uplink-interface-to-router-state-data
                }  // choice multicast-transport
              }  // list multicast-network-interface
    
              container multicast-proxy-or-snooper {
                description
                  "State data per multicast switch, being a proxy or a
                 snooper or a snooper with proxy reporting.";
                leaf number-active-groups {
                  type uint32;
                  description
                    "Counts the total number of active multicast channels in
                   the VPN.";
                  reference
                    "TR-101i2 R-251 - 'Per multicast VLAN counters',
                    Item 1";
    
                }
              }  // container multicast-proxy-or-snooper
    
              list active-channel {
                key "source-address group-address";
                description
                  "The active multicast channels state data. Active channels
                 are those for which the system maintains a multicast
                 tree. This includes the multicast channels with static
                 branches.";
                leaf source-address {
                  type inet:ip-address;
                  description
                    "The source IP Address of the of the active multicast
                   channel. The IPv4 address '0.0.0.0' or IPv6 address
                   '::' is used for ASM mode of operation.";
                }
    
                leaf group-address {
                  type inet:ip-address;
                  description
                    "The group IP Address of the active multicast channel.";
                  reference
                    "RFC 5519 Section 5 - mgmdHostCacheAddress";
    
                }
    
                leaf name {
                  type bbf-yang:string-ascii64;
                  description
                    "The name that identifies the multicast channel with
                   this source- and group-address in the configuration
                   data, if any.
    
                   In case the 'grant-unauthorized-membership-report' mode
                   of operation is used it can happen that an active
                   multicast tree is built for a not configured source /
                   group address combination. In that case the name will
                   be the empty string ''.";
                }
    
                leaf multicast-network-interface {
                  type leafref {
                    path "../../bbf-mgmd:multicast-network-interface/bbf-mgmd:name";
                  }
                  description
                    "The multicast network interface via which the multicast
                   channel is received.";
                }
    
                leaf number-active-interfaces-to-hosts {
                  type uint32;
                  description
                    "The total number of interfaces to hosts associated to
                   the tree of the multicast channel.";
                }
    
                list multicast-interface-to-host {
                  key "name";
                  description
                    "The multicast interfaces to a host joining the
                   multicast channel.";
                  leaf name {
                    type leafref {
                      path "../../../bbf-mgmd:multicast-interface-to-host/bbf-mgmd:name";
                    }
                    description
                      "Reference to a multicast interface to a host joining
                     this multicast channel.";
                  }
    
                  leaf-list host-reporter-address {
                    type inet:ip-address;
                    description
                      "On a single multicast interface to a host multiple
                     MGMD hosts can be active, each being identified with
                     a different source IP address. A multicast switch
                     supporting immediate leave inspects and records the
                     source IP address of each host sending a leave or
                     join. This enables the MGMD switch to track, for each
                     multicast group, the exact number and identity (i.e.,
                     IP address) of hosts receiving it.";
                    reference
                      "TR-101i2 R-246";
    
                  }
                }  // list multicast-interface-to-host
    
                leaf uptime {
                  type yang:timeticks;
                  units "0.01 seconds";
                  description
                    "The time elapsed since this multicast channel is
                   active.";
                  reference
                    "RFC 5519 Section 5 - mgmdHostCacheUpTime";
    
                }
              }  // list active-channel
            }  // list multicast-vpn
          }  // container mgmd
        }  // container multicast-state
      }  // module bbf-mgmd
    

© 2023 YumaWorks, Inc. All rights reserved.