IPv6 group policy configuration example
Network requirements
As shown in Figure 44, Router A runs MLDv1 and acts as the MLD querier. Switch A runs MLDv1 snooping.
Configure an IPv6 multicast group policy on Switch A so that Host A and Host B receive IPv6 multicast data for only IPv6 multicast group FF1E::101.
Figure 44: Network diagram
Configuration procedure
Assign an IPv6 address and prefix length to each interface according to Figure 44. (Details not shown.)
Configure Router A:
# Enable IPv6 multicast routing.
<RouterA> system-view [RouterA] ipv6 multicast routing [RouterA-mrib6] quit
# Enable MLD on FortyGigE 1/0/1.
[RouterA] interface fortygige 1/0/1 [RouterA-FortyGigE1/0/1] mld enable [RouterA-FortyGigE1/0/1] quit
# Enable IPv6 PIM-DM on FortyGigE 1/0/2.
[RouterA] interface fortygige 1/0/2 [RouterA-FortyGigE1/0/2] ipv6 pim dm [RouterA-FortyGigE1/0/2] quit
Configure Switch A:
# Enable MLD snooping globally.
<SwitchA> system-view [SwitchA] mld-snooping [SwitchA-mld-snooping] quit
# Create VLAN 100, and assign FortyGigE 1/0/1 through FortyGigE 1/0/4 to the VLAN.
[SwitchA] vlan 100 [SwitchA-vlan100] port fortygige 1/0/1 to fortygige 1/0/4
# Enable MLD snooping, and enable dropping IPv6 unknown multicast data packets for VLAN 100.
[SwitchA-vlan100] mld-snooping enable [SwitchA-vlan100] mld-snooping drop-unknown [SwitchA-vlan100] quit
# Configure an IPv6 multicast group policy so that hosts in VLAN 100 can join only IPv6 multicast group FF1E::101.
[SwitchA] acl ipv6 number 2001 [SwitchA-acl6-basic-2001] rule permit source ff1e::101 128 [SwitchA-acl6-basic-2001] quit [SwitchA] mld-snooping [SwitchA–mld-snooping] group-policy 2001 vlan 100 [SwitchA–mld-snooping] quit
Verifying the configuration
# Send MLD reports from Host A and Host B to join IPv6 multicast groups FF1E::101 and FF1E::202. (Details not shown.)
# Display dynamic MLD snooping forwarding entries in VLAN 100 on Switch A.
[SwitchA] display mld-snooping group vlan 100 Total 1 entries. VLAN 100: Total 1 entries. (::, FF1E::101) Host slots (0 in total): Host ports (2 in total): FGE1/0/3 (00:03:23) FGE1/0/4 (00:04:10)
The output shows the following information:
Host A and Host B have joined IPv6 multicast group FF1E::101 through FortyGigE 1/0/4 and FortyGigE 1/0/3 on Switch A, respectively.
Host A and Host B have not joined IPv6 multicast group FF1E::202.