The mld-snooping group-policy command configures an IPv6 multicast group policy on an interface.
The undo mld-snooping group-policy command deletes an IPv6 multicast group policy from an interface.
By default, no IPv6 multicast group policy is available on an interface, and hosts connected to the interface can join any IPv6 multicast group.
mld-snooping group-policy acl6-number vlan vlan-id [ version mld-version ]
undo mld-snooping group-policy [ acl6-number ] vlan vlan-id
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. |
vlan vlan-id |
Applies the IPv6 multicast group policy to a specified VLAN on an interface. |
The value is an integer that ranges from 1 to 4094. |
version mld-version | Specifies an MLD version. The multicast group policy is applied only to the MLD messages of this version. If this parameter is not specified, the multicast group policy applies to all MLD messages. |
The value is 1 or 2.
|
MultiGE interface view, Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view
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 interface. 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
The interface has been added to the specified VLAN.
An IPv6 multicast group policy can also be configured in the VLAN view (using the mld-snooping group-policy (VLAN view) command) to control the multicast groups that users in the VLAN 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 2000 [HUAWEI-acl6-basic-2000] rule deny source ff1c::3/32 [HUAWEI-acl6-basic-2000] quit [HUAWEI] mld-snooping enable [HUAWEI] vlan 10 [HUAWEI-vlan10] mld-snooping enable [HUAWEI-vlan10] quit [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [HUAWEI-GigabitEthernet0/0/1] mld-snooping group-policy 2000 vlan 10
<HUAWEI> system-view [HUAWEI] acl ipv6 number 2000 [HUAWEI-acl6-basic-2000] rule permit source ff1c::3/32 [HUAWEI-acl6-basic-2000] quit [HUAWEI] mld-snooping enable [HUAWEI] vlan 10 [HUAWEI-vlan10] mld-snooping enable [HUAWEI-vlan10] quit [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [HUAWEI-GigabitEthernet0/0/1] mld-snooping group-policy 2000 vlan 10