The group-policy statement enables you to filter unwanted IGMP reports at the interface level. When this statement is enabled on a router running IGMP version 2 (IGMPv2), after the router receives an IGMP report, the router compares the group against the specified group policy and performs the action configured in that policy (for example, rejects the report if the policy matches the defined address or network). When this statement is enabled on a router running IGMP version 3 (IGMPv3), after the router receives an IGMP report, the router compares the group against the specified group policy and performs the action configured in that policy (for example, rejects the report if the policy matches the defined address or network).
You define the policy to match only IGMP group addresses (for IGMPv2) by using the policy's route-filter statement to match the group address. You define the policy to match IGMP (source, group) addresses (for IGMPv3) by using the policy's route-filter statement to match the group address and the policy's source-address-filter statement to match the source address. For additional information about how to configure policies, see the JUNOS Policy Framework Configuration Guide.
To enable IGMP report filtering for an interface, include the group-policy statement:
-
group-policy [ policy-names ];
You can include this statement at the following hierarchy levels:
Configure IGMP report filtering on the interface where you prefer to not receive specific group or (source, group) reports:
- [edit]
- protocols {
-
- igmp {
-
- interface ge-1/1/1.0 {
- group-policy reject_policy;
- }
- }
- }
Configure either an IGMP version 2 or IGMP version 3 policy:
- policy-options { #IGMPv2 policy
-
- policy-statement reject_policy {
-
- from {
- router-filter 192.1.1.1/32 exact;
- }
- then reject;
- }
-
- policy-statement reject_policy { #IGMPv3
policy
-
- from {
- router-filter 192.1.1.1/32 exact;
- source-address-filter 10.1.0.0/16 orlonger;
- }
- then reject;
- }
- }