< Home

Example for Configuring MLD Snooping to Respond to Network Topology Changes

Networking Requirements

As shown in Figure 1, four switches on an IPv6 multicast network form a ring network to improve network reliability. The switches run STP to prevent routing loops. HostA and HostB need to receive multicast data from the multicast source.

Figure 1 Network diagram for configuring MLD snooping to respond to Layer 2 network topology changes

Configuration Roadmap

Enable MLD snooping and configure MLD snooping to respond to Layer 2 network topology changes on the switches.
  1. Configure STP on all switches.
  2. Create VLAN 10 on all switches and add interfaces to VLAN 10.
  3. Enable MLD snooping globally on all switches and in a VLAN.
  4. Enable MLD snooping of SwitchA to respond to Layer 2 network topology changes.

Procedure

  1. Configure STP on all switches.

    # Configure STP on SwitchA.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] stp enable
    

    The configurations of other switches are similar to the configuration of SwitchA, and are not mentioned here.

  2. Create VLAN 10 on all switches and add interfaces to VLAN 10.

    # Add interfaces on SwitchA to VLAN 10.

    [SwitchA] vlan 10
    [SwitchA-vlan10] quit
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/1] port hybrid pvid vlan 10
    [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 10
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/2] port hybrid pvid vlan 10
    [SwitchA-GigabitEthernet0/0/2] port hybrid untagged vlan 10
    [SwitchA-GigabitEthernet0/0/2] quit
    [SwitchA] interface gigabitethernet 0/0/3
    [SwitchA-GigabitEthernet0/0/3] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/3] port hybrid pvid vlan 10
    [SwitchA-GigabitEthernet0/0/3] port hybrid untagged vlan 10
    [SwitchA-GigabitEthernet0/0/3] quit

    The configurations of other switches are similar to the configuration of SwitchA, and are not mentioned here.

  3. Enable MLD snooping on all the switches.

    # Enable MLD snooping on SwitchA globally and in VLAN 10.

    [SwitchA] mld-snooping enable
    [SwitchA] vlan 10
    [SwitchA-vlan10] mld-snooping enable
    [SwitchA-vlan10] quit

    The configurations of other switches are similar to the configuration of SwitchA, and are not mentioned here.

  4. Enable MLD snooping of SwitchA to respond to Layer 2 network topology changes.

    [SwitchA] mld-snooping send-query enable
    [SwitchA] mld-snooping send-query source-address fe80::1
    

  5. Verify the configuration.

    1. Check whether multicast data is forwarded correctly.

      Check forwarding entries on SwitchB and SwitchD.
      [SwitchB] display mld-snooping forwarding-table vlan 10
      VLAN ID : 10, Forwarding Mode : IP                                      
      ------------------------------------------------------------------------
                           (Source, Group)    Interface               Out-Vlan
      ----------------------------------------------------------------------     
                               Router-port    GigabitEthernet0/0/2       10
                     (*, ff16:0:0:0:0:0:0:2)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:3)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:6)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
      ------------------------------------------------------------------------
      Total Group(s) : 3
      [SwitchD] display mld-snooping forwarding-table vlan 10
      VLAN ID : 10, Forwarding Mode : IP                                      
      ------------------------------------------------------------------------
                           (Source, Group)    Interface               Out-Vlan
      ----------------------------------------------------------------------     
                               Router-port    GigabitEthernet0/0/2       10
                     (*, ff16:0:0:0:0:0:0:2)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:3)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:6)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
      ------------------------------------------------------------------------
      Total Group(s) : 3

      The command output shows that the router port of SwitchB and SwitchD is GE0/0/2.

      # Check MLD packet statistics on SwitchA.

      [SwitchA] display mld-snooping statistics
       MLD Snooping Events Counter
           Recv VLAN Up Event Times      0
           Recv VLAN Down Event Times    0
           Recv VLAN Del Event Times     0
           Recv Port Up Event Times      0
           Recv Port Down Event Times    0
           Recv Port Del Event Times     0
           Recv Port Inc Event Times     0
           Recv Port Exc Event Times     0
           Recv MSTP Block Event Times   0
           Recv MSTP Forward Event Times 0
           Recv LINK Change Event Times  0
       MLD Snooping Packets Counter
         Statistics for VLAN 10
           Recv V1 Report  12
           Recv V2 Report  0
           Recv V1 Query   15
           Recv V2 Query   0
           Recv Done       0
           Recv Pim Hello  3
           Send Query(S=0) 0
           Send Query(S!=0)0
           Send General Query               0
           Send Group-Specific Query        0
           Send Group-Source-Specific Query 0

      The command output shows that SwitchA does not send Query messages.

    2. Run the display stp brief command on all Switches to check the interfaces that are blocked and the transmission path of multicast data.

      [SwitchB] display stp brief
       MSTID  Port                        Role  STP State     Protection              
         0    GigabitEthernet0/0/1        ALTE  DISCARDING    NONE                  
         0    GigabitEthernet0/0/2        ROOT  FORWARDING      NONE                  
         0    GigabitEthernet0/0/3        DESI  FORWARDING      NONE                  
      
      The command output shows that GE0/0/1 of SwitchB is blocked.

      The multicast data is forwarded to HostA over the path: SwitchA-SwitchC-SwitchB and to HostB over the path: SwitchA-SwitchD.

    3. Run the shutdown command on GE0/0/1 of SwitchC to shut down the interface, triggering a change of the STP network topology.
    4. Check whether HostA and HostB can still receive multicast data.

      Check forwarding entries on SwitchB and SwitchD.
      [SwitchB] display mld-snooping forwarding-table vlan 10
      VLAN ID : 10, Forwarding Mode : IP                                      
      ------------------------------------------------------------------------
                           (Source, Group)    Interface               Out-Vlan
      ----------------------------------------------------------------------     
                               Router-port    GigabitEthernet0/0/1       10
                     (*, ff16:0:0:0:0:0:0:2)  GigabitEthernet0/0/1       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:3)  GigabitEthernet0/0/1       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:6)  GigabitEthernet0/0/1       10
                                              GigabitEthernet0/0/3       10
      ------------------------------------------------------------------------
      Total Group(s) : 3
      [SwitchD] display mld-snooping forwarding-table vlan 10
      VLAN ID : 10, Forwarding Mode : IP                                      
      ------------------------------------------------------------------------
                           (Source, Group)    Interface               Out-Vlan
      ----------------------------------------------------------------------     
                               Router-port    GigabitEthernet0/0/2       10
                     (*, ff16:0:0:0:0:0:0:2)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:3)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
                     (*, ff16:0:0:0:0:0:0:6)  GigabitEthernet0/0/2       10
                                              GigabitEthernet0/0/3       10
      ------------------------------------------------------------------------
      Total Group(s) : 3

      The command output shows that the router port of SwitchB becomes GE0/0/1.

      # Check MLD packet statistics on SwitchA.

      [SwitchA] display mld-snooping statistics
       MLD Snooping Events Counter
           Recv VLAN Up Event Times      0
           Recv VLAN Down Event Times    0
           Recv VLAN Del Event Times     0
           Recv Port Up Event Times      0
           Recv Port Down Event Times    1
           Recv Port Del Event Times     0
           Recv Port Inc Event Times     1
           Recv Port Exc Event Times     2
           Recv MSTP Block Event Times   0
           Recv MSTP Forward Event Times 1
           Recv LINK Change Event Times  70
       MLD Snooping Packets Counter
         Statistics for VLAN 10
           Recv V1 Report 18
           Recv V2 Report 0
           Recv V1 Query  15
           Recv V2 Query  0
           Recv Done      0
           Recv Pim Hello 38
           Send Query(S=0) 8
           Send Query(S!=0)0
           Send General Query               0
           Send Group-Specific Query        0
           Send Group-Source-Specific Query 0

      The command output indicates that SwitchA has sent Query messages with source address 0.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 10
    #
    stp enable
    #
    mld-snooping enable
    mld-snooping send-query enable
    mld-snooping send-query source-address fe80:0:0:0:0:0:0:1
    #
    vlan 10
     mld-snooping enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
    
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 10
    #
    stp enable
    #
    mld-snooping enable
    #
    vlan 10
     mld-snooping enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
    
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 10
    #
    stp enable
    #
    mld-snooping enable
    #
    vlan 10
     mld-snooping enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
    
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    vlan batch 10
    #
    stp enable
    #
    mld-snooping enable
    #
    vlan 10
     mld-snooping enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
    
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic