The igmp-snooping group-policy command configures a multicast group policy in a VLAN.
The undo igmp-snooping group-policy command deletes the multicast group policy from a VLAN.
By default, no multicast group policy is available in a VLAN, and hosts in the VLAN can join any multicast group.
igmp-snooping group-policy acl-number [ version version-number ]
undo igmp-snooping group-policy
Parameter |
Description |
Value |
---|---|---|
acl-number |
Specifies the number of an ACL used to restrict the range of groups users can join. A basic or advanced ACL can be used in a multicast group policy. |
The value is an integer that ranges from 2000 to 3999. |
version version-number |
Applies the multicast group policy only to the IGMP messages of the specified version. If this parameter is not specified, the multicast group policy applies to all IGMP messages. |
The value is an integer that ranges from 1 to 3.
|
Usage Scenario
A multicast group policy controls the multicast programs that users can order on a switch with IGMP snooping enabled. When a user orders a multicast program, the user host sends a Report message, requesting to join the multicast group. After the switch receives the message, it checks whether the multicast group matches the multicast group policy applied to the VLAN. If the messages match the ACL, the switch allows user hosts in the VLAN to join the group and accepts the Report messages. If the messages do not match the ACL, the switch prevents the user hosts in the VLAN from joining the group.
Prerequisites
IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.
Precautions
A multicast group policy can also be configured in the interface view to control the multicast groups that users in one or more VLANs on the interface can join. A multicast group policy configured in the VLAN view controls the multicast groups that users in the VLAN 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.
A Dot1q termination sub-interface has been added to the VLAN.
The VLAN has a VE interface.
The VLAN is a super VLAN or a user VLAN.
<HUAWEI> system-view [HUAWEI] acl number 2000 [HUAWEI-acl-basic-2000] rule deny source 225.1.1.123 0 [HUAWEI-acl-basic-2000] quit [HUAWEI] igmp-snooping enable [HUAWEI] vlan 2 [HUAWEI-vlan2] igmp-snooping enable [HUAWEI-vlan2] igmp-snooping group-policy 2000
<HUAWEI> system-view [HUAWEI] acl number 2000 [HUAWEI-acl-basic-2000] rule permit source 225.1.1.123 0 [HUAWEI-acl-basic-2000] quit [HUAWEI] igmp-snooping enable [HUAWEI] vlan 2 [HUAWEI-vlan2] igmp-snooping enable [HUAWEI-vlan2] igmp-snooping group-policy 2000