Example: Configuring sub-VLAN-based IPv6 multicast VLAN
Network configuration
As shown in Figure 94:
Layer 3 device Switch A runs MLD and acts as the MLD querier. Layer 2 device Switch B runs MLDv1 snooping.
The IPv6 multicast source sends IPv6 multicast data to IPv6 multicast group FF1E::101. Receivers Host A, Host B, and Host C belong to VLAN 2, VLAN 3, and VLAN 4, respectively.
Configure a sub-VLAN-based IPv6 multicast VLAN on Switch B to meet the following requirements:
Switch A sends the IPv6 multicast data to Switch B through the IPv6 multicast VLAN.
Switch B forwards the IPv6 multicast data to the receivers in different user VLANs.
Figure 94: Network diagram
Procedure
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.
[SwitchA] vlan 10 [SwitchA-vlan10] quit
# Configure HundredGigE 1/0/1 as a hybrid port, and assign the port to VLAN 10 as a tagged VLAN member.
[SwitchA] interface hundredgige 1/0/1 [SwitchA-HundredGigE1/0/1] port link-type hybrid [SwitchA-HundredGigE1/0/1] port hybrid vlan 10 tagged [SwitchA-HundredGigE1/0/1] 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
Configure Switch B:
# Enable the MLD snooping feature.
<SwitchB> system-view [SwitchB] mld-snooping [SwitchB-mld-snooping] quit
# Create VLAN 2, assign HundredGigE 1/0/2 to the VLAN, and enable MLD snooping for the VLAN.
[SwitchB] vlan 2 [SwitchB-vlan2] port hundredgige 1/0/2 [SwitchB-vlan2] mld-snooping enable [SwitchB-vlan2] quit
# Create VLAN 3, assign HundredGigE 1/0/3 to the VLAN, and enable MLD snooping for the VLAN.
[SwitchB] vlan 3 [SwitchB-vlan3] port hundredgige 1/0/3 [SwitchB-vlan3] mld-snooping enable [SwitchB-vlan3] quit
# Create VLAN 4, assign HundredGigE 1/0/4 to the VLAN, and enable MLD snooping for the VLAN.
[SwitchB] vlan 4 [SwitchB-vlan4] port hundredgige 1/0/4 [SwitchB-vlan4] mld-snooping enable [SwitchB-vlan4] quit
# Create VLAN 10, and enable MLD snooping for the VLAN.
[SwitchB] vlan 10 [SwitchB-vlan10] mld-snooping enable [SwitchB-vlan10] quit
# Configure HundredGigE 1/0/1 as a hybrid port, and assign the port to VLAN 10 as a tagged VLAN member.
[SwitchB] interface hundredgige 1/0/1 [SwitchB-HundredGigE1/0/1] port link-type hybrid [SwitchB-HundredGigE1/0/1] port hybrid vlan 10 tagged [SwitchB-HundredGigE1/0/1] quit
# Configure VLAN 10 as an IPv6 multicast VLAN, and assign VLAN 2 through VLAN 4 as sub-VLANs to multicast VLAN 10.
[SwitchB] ipv6 multicast-vlan 10 [SwitchB-ipv6-mvlan-10] subvlan 2 to 4 [SwitchB-ipv6-mvlan-10] quit
Verifying the configuration
# Display information about all IPv6 multicast VLANs on Switch B.
[SwitchB] display ipv6 multicast-vlan Total 1 IPv6 multicast VLANs. IPv6 multicast VLAN 10: Sub-VLAN list(3 in total): 2-4 Port list(0 in total):
# Display information about IPv6 multicast groups in IPv6 multicast VLANs on Switch B.
[SwitchB] display ipv6 multicast-vlan group Total 1 entries. IPv6 multicast VLAN 10: Total 1 entries. (::, FF1E::101) Sub-VLANs (3 in total): VLAN 2 VLAN 3 VLAN 4
The output shows that IPv6 multicast group FF1E::101 belongs to IPv6 multicast VLAN 10. IPv6 multicast VLAN 10 contains sub-VLANs VLAN 2 through VLAN 4. Switch B will replicate the IPv6 multicast data of VLAN 10 to VLAN 2 through VLAN 4.