The igmp-snooping group-policy command configures a multicast group policy on an interface.
The undo igmp-snooping group-policy command deletes a multicast group policy from an interface.
By default, no multicast group policy is available on an interface, and hosts connected to the interface can join any multicast group.
igmp-snooping group-policy acl-number [ version version-number ] vlan vlan-id1 [ to vlan-id2 ]
undo igmp-snooping group-policy acl-number vlan vlan-id1 [ to vlan-id2 ]
undo igmp-snooping group-policy acl-number version version-number vlan vlan-id1 [ to vlan-id2 ]
undo igmp-snooping group-policy vlan { vlan-id1 [ to vlan-id2 ] | all }
Parameter |
Description |
Value |
---|---|---|
acl-number |
Specifies the number of the ACL that limits the multicast groups that hosts in a VLAN can join. |
The value is an integer ranging 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 ranging from 1 to 3.
|
vlan vlan-id1 [ to vlan-id2 ] |
Applies the multicast group policy to the specified VLANs on the interface. |
vlan-id1 and vlan-id2 are integers that range 1 from 4094. |
all |
Deletes multicast groups policies in all VLANs from the interface. |
- |
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
A multicast group policy controls the multicast programs that users can order on a device with IGMP snooping enabled. When a user orders a multicast program, the user host sends a Report message to the device, requesting to join the multicast group. The device checks whether the multicast group matches the ACL in the multicast group policy applied to the interface. If so, the device allows the user to join the multicast group. If not, the device drops the message and prohibits the user from joining the multicast 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 VLAN view to control the multicast groups that users in the VLAN can join. A 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 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 batch 20 to 30 [HUAWEI] igmp-snooping enable vlan 20 to 30 [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 20 to 30 [HUAWEI-GigabitEthernet0/0/1] igmp-snooping group-policy 2000 vlan 20 to 30
<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 batch 20 to 30 [HUAWEI] igmp-snooping enable vlan 20 to 30 [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 20 to 30 [HUAWEI-GigabitEthernet0/0/1] igmp-snooping group-policy 2000 vlan 20 to 30