Example: Configuring the VLAN-based MLD snooping querier

Network configuration

As shown in Figure 87:

To prevent the switches from flooding unknown IPv6 packets in the VLAN, enable all the switches to drop unknown IPv6 multicast packets.

Figure 87: Network diagram

Procedure

  1. Configure Switch A:

    # Enable the MLD snooping feature.

    <SwitchA> system-view
    [SwitchA] mld-snooping
    [SwitchA-mld-snooping] quit
    

    # Create VLAN 100, and assign HundredGigE 1/0/1 through HundredGigE 1/0/3 to the VLAN.

    [SwitchA] vlan 100
    [SwitchA-vlan100] port hundredgige 1/0/1 to hundredgige 1/0/3
    

    # Enable MLD snooping, and enable dropping unknown IPv6 multicast data for VLAN 100.

    [SwitchA-vlan100] mld-snooping enable
    [SwitchA-vlan100] mld-snooping drop-unknown
    

    # Configure Switch A as the MLD snooping querier.

    [SwitchA-vlan100] MLD-snooping querier
    [SwitchA-vlan100] quit
    
  2. Configure Switch B:

    # Enable the MLD snooping feature.

    <SwitchB> system-view
    [SwitchB] mld-snooping
    [SwitchB-mld-snooping] quit
    

    # Create VLAN 100, and assign HundredGigE 1/0/1 through HundredGigE 1/0/4 to the VLAN.

    [SwitchB] vlan 100
    [SwitchB-vlan100] port hundredgige 1/0/1 to hundredgige 1/0/4
    

    # Enable MLD snooping, and enable dropping unknown IPv6 multicast data for VLAN 100.

    [SwitchB-vlan100] mld-snooping enable
    [SwitchB-vlan100] mld-snooping drop-unknown
    [SwitchB-vlan100] quit
    
  3. Configure Switch C:

    # Enable the MLD snooping feature.

    <SwitchC> system-view
    [SwitchC] mld-snooping
    [SwitchC-mld-snooping] quit
    

    # Create VLAN 100, and assign HundredGigE 1/0/1 through HundredGigE 1/0/3 to the VLAN.

    [SwitchC] vlan 100
    [SwitchC-vlan100] port hundredgige 1/0/1 to hundredgige 1/0/3
    

    # Enable MLD snooping, and enable dropping unknown IPv6 multicast data for VLAN 100.

    [SwitchC-vlan100] mld-snooping enable
    [SwitchC-vlan100] mld-snooping drop-unknown
    [SwitchC-vlan100] quit
    
  4. Configure Switch D:

    # Enable the MLD snooping feature.

    <SwitchD> system-view
    [SwitchD] mld-snooping
    [SwitchD-mld-snooping] quit
    

    # Create VLAN 100, and assign HundredGigE 1/0/1 and HundredGigE 1/0/2 to the VLAN.

    [SwitchD] vlan 100
    [SwitchD-vlan100] port hundredgige 1/0/1 to hundredgige 1/0/2
    

    # Enable MLD snooping, and enable dropping unknown IPv6 multicast data for VLAN 100.

    [SwitchD-vlan100] mld-snooping enable
    [SwitchD-vlan100] mld-snooping drop-unknown
    [SwitchD-vlan100] quit
    

Verifying the configuration

# Display statistics for MLD messages and IPv6 PIM hello messages learned through MLD snooping on Switch B.

[SwitchB] display mld-snooping statistics
Received MLD general queries:  3
Received MLDv1 specific queries:  0
Received MLDv1 reports:  12
Received MLD dones:  0
Sent     MLDv1 specific queries:  0
Received MLDv2 reports:  0
Received MLDv2 reports with right and wrong records:  0
Received MLDv2 specific queries:  0
Received MLDv2 specific sg queries:  0
Sent     MLDv2 specific queries:  0
Sent     MLDv2 specific sg queries:  0 
Received IPv6 PIM hello:  0
Received error MLD messages:  0

The output shows that all switches except Switch A can receive the MLD general queries after Switch A acts as the MLD snooping querier.