Example: Configuring port-based IPv6 multicast VLAN

Network configuration

As shown in Figure 95:

Configure a port-based IPv6 multicast VLAN on Switch B to meet the following requirements:

Figure 95: Network diagram

Procedure

  1. Configure Switch A:

    # Enable IPv6 multicast routing.

    <SwitchA> system-view
    [SwitchA] ipv6 multicast routing
    [SwitchA-mrib6] quit
    

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

    [SwitchA] vlan 20
    [SwitchA-vlan20] port hundredgige 1/0/2
    [SwitchA-vlan20] quit
    

    # Assign an IPv6 address to VLAN-interface 20, and enable IPv6 PIM-DM on the interface.

    [SwitchA] interface vlan-interface 20
    [SwitchA-Vlan-interface20] ipv6 address 1::2 64
    [SwitchA-Vlan-interface20] ipv6 pim dm
    [SwitchA-Vlan-interface20] quit
    

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

    [SwitchA] vlan 10
    [SwitchA-vlan10] port hundredgige 1/0/1
    [SwitchA-vlan10] quit
    

    # Assign an IPv6 address to VLAN-interface 10, and enable MLD on the interface.

    [SwitchA] interface vlan-interface 10
    [SwitchA-Vlan-interface10] ipv6 address 2001::1 64
    [SwitchA-Vlan-interface10] mld enable
    [SwitchA-Vlan-interface10] quit
    
  2. Configure Switch B:

    # Enable the MLD snooping feature.

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

    # Create VLAN 10, assign HundredGigE 1/0/1 to the VLAN, and enable MLD snooping for the VLAN.

    [SwitchB] vlan 10
    [SwitchB-vlan10] port hundredgige 1/0/1
    [SwitchB-vlan10] mld-snooping enable
    [SwitchB-vlan10] quit
    

    # Create VLAN 2, and enable MLD snooping for the VLAN.

    [SwitchB] vlan 2
    [SwitchB-vlan2] mld-snooping enable
    [SwitchB-vlan2] quit
    

    # Create VLAN 3, and enable MLD snooping for the VLAN.

    [SwitchB] vlan 3
    [SwitchB-vlan3] mld-snooping enable
    [SwitchB-vlan3] quit
    

    # Create VLAN 4, and enable MLD snooping for the VLAN.

    [SwitchB] vlan 4
    [SwitchB-vlan4] mld-snooping enable
    [SwitchB-vlan4] quit
    

    # Configure HundredGigE 1/0/2 as a hybrid port, and configure VLAN 2 as the PVID of the hybrid port.

    [SwitchB] interface hundredgige 1/0/2
    [SwitchB-HundredGigE1/0/2] port link-type hybrid
    [SwitchB-HundredGigE1/0/2] port hybrid pvid vlan 2
    

    # Assign HundredGigE 1/0/2 to VLAN 2 and VLAN 10 as an untagged VLAN member.

    [SwitchB-HundredGigE1/0/2] port hybrid vlan 2 untagged
    [SwitchB-HundredGigE1/0/2] port hybrid vlan 10 untagged
    [SwitchB-HundredGigE1/0/2] quit
    

    # Configure HundredGigE 1/0/3 as a hybrid port, and configure VLAN 3 as the PVID of the hybrid port.

    [SwitchB] interface hundredgige 1/0/3
    [SwitchB-HundredGigE1/0/3] port link-type hybrid
    [SwitchB-HundredGigE1/0/3] port hybrid pvid vlan 3
    

    # Assign HundredGigE 1/0/3 to VLAN 3 and VLAN 10 as an untagged VLAN member.

    [SwitchB-HundredGigE1/0/3] port hybrid vlan 3 untagged
    [SwitchB-HundredGigE1/0/3] port hybrid vlan 10 untagged
    [SwitchB-HundredGigE1/0/3] quit
    

    # Configure HundredGigE 1/0/4 as a hybrid port, and configure VLAN 4 as the PVID of the hybrid port.

    [SwitchB] interface hundredgige 1/0/4
    [SwitchB-HundredGigE1/0/4] port link-type hybrid
    [SwitchB-HundredGigE1/0/4] port hybrid pvid vlan 4
    

    # Assign HundredGigE 1/0/4 to VLAN 4 and VLAN 10 as an untagged VLAN member.

    [SwitchB-HundredGigE1/0/4] port hybrid vlan 4 untagged
    [SwitchB-HundredGigE1/0/4] port hybrid vlan 10 untagged
    [SwitchB-HundredGigE1/0/4] quit
    

    # Configure VLAN 10 as an IPv6 multicast VLAN.

    [SwitchB] ipv6 multicast-vlan 10
    

    # Assign HundredGigE 1/0/2 and HundredGigE 1/0/3 to VLAN 10.

    [SwitchB-ipv6-mvlan-10] port hundredgige 1/0/2 to hundredgige 1/0/3
    [SwitchB-ipv6-mvlan-10] quit
    

    # Assign HundredGigE 1/0/4 to VLAN 10.

    [SwitchB] interface hundredgige 1/0/4
    [SwitchB-HundredGigE1/0/4] ipv6 port multicast-vlan 10
    [SwitchB-HundredGigE1/0/4] quit
    

Verifying the configuration

# Display information about IPv6 multicast VLANs on Switch B.

[SwitchB] display ipv6 multicast-vlan
Total 1 IPv6 multicast VLANs.

IPv6 multicast VLAN 10:
  Sub-VLAN list(0 in total):
  Port list(3 in total):
    HGE1/0/2
    HGE1/0/3
    HGE1/0/4

# Display dynamic MLD snooping forwarding entries on Switch B.

[SwitchB] display mld-snooping group
Total 1 entries.

VLAN 10: Total 1 entries.
  (::, FF1E::101)
    Host slots (0 in total):
    Host ports (3 in total):
      HGE1/0/2         (00:03:23)
      HGE1/0/3         (00:04:07)
      HGE1/0/4         (00:04:16)

The output shows that MLD snooping maintains the user ports in the multicast VLAN (VLAN 10). Switch B will forward the IPv6 multicast data of VLAN 10 through these user ports.