29
[RouterA-Ten-GigabitEthernet1/1/5] quit
# Enable PIM-DM on Ten-GigabitEthernet 1/1/6.
[RouterA] interface ten-gigabitethernet 1/1/6
[RouterA-Ten-GigabitEthernet1/1/6] pim dm
[RouterA-Ten-GigabitEthernet1/1/6] quit
3. Configure Switch A:
# Enable IGMP snooping globally.
<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit
# Create VLAN 100, and assign Ten-GigabitEthernet 1/1/5 through Ten-GigabitEthernet 1/1/8
to the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port ten-gigabitethernet 1/1/5 to ten-gigabitethernet 1/1/8
# Enable IGMP snooping, and enable dropping unknown multicast data for VLAN 100.
[SwitchA-vlan100] igmp-snooping enable
[SwitchA-vlan100] igmp-snooping drop-unknown
[SwitchA-vlan100] quit
# Configure a multicast group filter so that the hosts in VLAN 100 can join only the multicast group
224.1.1.1.
[SwitchA] acl number 2001
[SwitchA-acl-basic-2001] rule permit source 224.1.1.1 0
[SwitchA-acl-basic-2001] quit
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] group-policy 2001 vlan 100
[SwitchA-igmp-snooping] quit
Verifying the configuration
# Send IGMP reports from Host A and Host B to join the multicast groups 224.1.1.1 and 224.2.2.2.
(Details not shown.)
# Display information about the dynamic IGMP snooping forwarding entries in VLAN 100 on Switch A.
[SwitchA] display igmp-snooping group vlan 100
Total 1 entries.
VLAN 100: Total 1 entries.
(0.0.0.0, 224.1.1.1)
Host slots (0 in total):
Host ports (2 in total):
XGE1/1/7 (00:03:23)
XGE1/1/8 (00:04:10)
The output shows the following:
• Host A and Host B have joined the multicast group 224.1.1.1 through the member ports
Ten-GigabitEthernet 1/1/8 and Ten-GigabitEthernet 1/1/7 on Switch A, respectively.
• Host A and Host B have failed to join the multicast group 224.2.2.2.
The multicast group filter has taken effect.