Example: Configuring VLAN-based MLD snooping proxying
Network configuration
As shown in Figure 88, Router A runs MLDv1 and acts as the MLD querier. Switch A runs MLDv1 snooping. Configure MLD snooping proxying so that Switch A can perform the following actions:
Forward MLD report and done messages to Router A.
Respond to MLD queries sent by Router A and forward the queries to downstream hosts.
Figure 88: Network diagram
Procedure
Assign an IPv6 address and subnet mask to each interface, as shown in Figure 88. (Details not shown.)
Configure Router A:
# Enable IPv6 multicast routing.
<RouterA> system-view [RouterA] ipv6 multicast routing [RouterA-mrib6] quit
# Enable MLD and IPv6 PIM-DM on HundredGigE 1/0/1.
[RouterA] interface hundredgige 1/0/1 [RouterA-HundredGigE1/0/1] mld enable [RouterA-HundredGigE1/0/1] ipv6 pim dm [RouterA-HundredGigE1/0/1] quit
# Enable IPv6 PIM-DM on HundredGigE 1/0/2.
[RouterA] interface hundredgige 1/0/2 [RouterA-HundredGigE1/0/2] ipv6 pim dm [RouterA-HundredGigE1/0/2] quit
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/4 to the VLAN.
[SwitchA] vlan 100 [SwitchA-vlan100] port hundredgige 1/0/1 to hundredgige 1/0/4
# Enable MLD snooping and MLD snooping proxying for the VLAN.
[SwitchA-vlan100] mld-snooping enable [SwitchA-vlan100] mld-snooping proxy enable [SwitchA-vlan100] quit
Verifying the configuration
# Send MLD reports from Host A and Host B to join IPv6 multicast group FF1E::101. (Details not shown.)
# Display MLD snooping group entries on Switch A.
[SwitchA] display mld-snooping group Total 1 entries. VLAN 100: Total 1 entries. (::, FF1E::101) Host ports (2 in total): HGE1/0/3 (00:04:09) HGE1/0/4 (00:03:06)
The output shows that HundredGigE 1/0/3 and HundredGigE 1/0/4 are member ports of IPv6 multicast group FF1E::101. Host A and Host B will receive IPv6 multicast data for the group.
# Display MLD group membership information on Router A.
[RouterA] display mld group MLD groups in total: 1 HundredGigE1/0/1(2001::1): MLD groups reported in total: 1 Group address: FF1E::101 Last reporter: FE80::2FF:FFFF:FE00:1 Uptime: 00:00:31 Expires: 00:03:48
# Send an MLD done message from Host A to leave IPv6 multicast group FF1E::101. (Details not shown.)
# Display MLD snooping group entries on Switch A.
[SwitchA] display mld-snooping group Total 1 entries. VLAN 100: Total 1 entries. (::, FF1E::101) Host ports (1 in total): HGE1/0/3 ( 00:01:23 )
The output shows that HundredGigE 1/0/3 is the only member port of IPv6 multicast group FF1E::101. Only Host B will receive IPv6 multicast data for the group.