The mld-snooping group-policy command configures an IPv6 multicast group policy in a VLAN.
The undo mld-snooping group-policy command deletes an IPv6 multicast group policy from a VLAN.
By default, no IPv6 multicast group policy is available in a VLAN, and hosts in the VLAN can join any IPv6 multicast group.
Parameter |
Description |
Value |
---|---|---|
acl6-number |
Specifies the number of an IPv6 ACL that defines a range of multicast groups. A basic or advanced ACL can be used in an IPv6 multicast group policy. |
The value is an integer that ranges from 2000 to 3999. |
mld-version | Applies the multicast group policy only to the MLD messages of the specified version. If this parameter is not specified, the multicast group policy applies to all MLD messages. |
The value is 1 or 2.
|
Usage Scenario
An IPv6 multicast group policy controls the multicast programs that users can order on a Layer 2 device with MLD snooping enabled. When a user orders a multicast program, the user host sends a Report message, requesting to join the multicast group. When the Layer 2 device receives the message, it checks whether the multicast group matches the multicast group policy applied to the VLAN. If the Report messages match the filter rule, the Layer 2 device allows the hosts in the VLAN to join the group and forwards the Report messages. If the Report messages do not match the filter rule, the Layer 2 device prevents the hosts from joining the group and drops the Report messages.
Prerequisites
MLD snooping has been enabled globally using the mld-snooping enable command.
Precautions
An IPv6 multicast group policy can also be configured in the interface view using the mld-snooping group-policy (interface view) command to control the multicast groups that users in one or more VLANs on the interface can join. An IPv6 multicast group policy configured in the interface view controls the multicast groups that users in one or more VLANs on the interface can join. If you configure multicast group policies for the same VLAN in the interface view and VLAN view, the system first uses the policy configured in the interface view and then the policy configured in the VLAN view to determine the groups that user hosts can join.
<HUAWEI> system-view [HUAWEI] acl ipv6 number 2001 [HUAWEI-acl6-basic-2001] rule deny source ff1e::1/32 [HUAWEI-acl6-basic-2001] quit [HUAWEI] mld-snooping enable [HUAWEI] vlan 4 [HUAWEI-vlan4] mld-snooping enable [HUAWEI-vlan4] mld-snooping group-policy 2001
<HUAWEI> system-view [HUAWEI] acl ipv6 number 2001 [HUAWEI-acl6-basic-2001] rule permit source ff1e::1/32 [HUAWEI-acl6-basic-2001] quit [HUAWEI] mld-snooping enable [HUAWEI] vlan 4 [HUAWEI-vlan4] mld-snooping enable [HUAWEI-vlan4] mld-snooping group-policy 2001