igmp-snooping group-policy (interface view)
Function
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.
Format
igmp-snooping group-policy acl-number [ version version-number ] vlan vlan-id1 [ to vlan-id2 ] [ default-permit ]
undo igmp-snooping group-policy acl-number vlan vlan-id1 [ version version-number | to vlan-id2 ]
undo igmp-snooping group-policy acl-number version version-number vlan vlan-id1 [ to vlan-id2 ] [ default-permit ]
Parameters
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. |
default-permit |
Configures the multicast group policy to permit all groups by default. That is, if the referenced ACL has no rules, the multicast group policy allows hosts in the specified VLANs to join all groups. |
- |
Usage Guidelines
Usage Scenario
- If default-permit is not specified, the group policy prevents hosts in the specified VLANs from joining any group by default. A filter rule must be configured by specifying the permit keyword in the rule command. If the Report messages match the filter rule, the Layer 2 device allows the hosts in the VLANs 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.
- If default-permit is specified, the group policy allows hosts in the specified VLANs to join all groups by default. A filter rule must be configured by specifying the deny keyword in the rule command. If the Report messages match the filter rule, the Layer 2 device prevents the hosts in the VLANs from joining the group and drops the Report messages. If the Report messages do not match the filter rule, the Layer 2 device allows the hosts to join the group and forwards the Report messages.
Prerequisites
IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.
Precautions
- IGMP snooping is enabled in the specified VLANs using the igmp-snooping enable (VLAN view) command.
- The ACL referenced in the policy exists and has filtering rules configured.
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.
Example
<AC6605> system-view [AC6605] acl number 2000 [AC6605-acl-basic-2000] rule permit source 225.1.1.123 0 [AC6605-acl-basic-2000] quit [AC6605] igmp-snooping enable [AC6605] vlan 20 [AC6605-vlan20] igmp-snooping enable [AC6605-vlan20] quit [AC6605] vlan 21 [AC6605-vlan21] igmp-snooping enable [AC6605-vlan21] quit [AC6605] interface gigabitethernet 0/0/1 [AC6605-GigabitEthernet0/0/1] port hybrid untagged vlan 20 to 21 [AC6605-GigabitEthernet0/0/1] igmp-snooping group-policy 2000 vlan 20 to 21