Group policy and simulated joining configuration example(for VLANs)
Network requirements
As shown in Figure 14, Router A runs IGMPv2 and acts as the IGMP querier. Switch A runs IGMPv2 snooping.
Configure a multicast group policy and simulated joining to meet the following requirements:
Host A and Host B receive only the multicast data addressed to multicast group 224.1.1.1. Multicast data can be forwarded through Ten-GigabitEthernet 1/0/3 and Ten-GigabitEthernet 1/0/4 of Switch A uninterruptedly, even though Host A and Host B fail to receive the multicast data.
Switch A will drop unknown multicast data instead of flooding it in VLAN 100.
Figure 14: Network diagram
Configuration procedure
Assign an IP address and subnet mask to each interface, as shown in Figure 14. (Details not shown.)
Configure Router A:
# Enable IP multicast routing.
<RouterA> system-view [RouterA] multicast routing [RouterA-mrib] quit
# Enable IGMP on Ten-GigabitEthernet 1/0/1.
[RouterA] interface ten-gigabitethernet 1/0/1 [RouterA-Ten-GigabitEthernet1/0/1] igmp enable [RouterA-Ten-GigabitEthernet1/0/1] quit
# Enable PIM-DM on Ten-GigabitEthernet 1/0/2.
[RouterA] interface ten-gigabitethernet 1/0/2 [RouterA-Ten-GigabitEthernet1/0/2] pim dm [RouterA-Ten-GigabitEthernet1/0/2] quit
Configure Switch A:
# Enable the IGMP snooping feature.
<SwitchA> system-view [SwitchA] igmp-snooping [SwitchA-igmp-snooping] quit
# Create VLAN 100, and assign Ten-GigabitEthernet 1/0/1 through Ten-GigabitEthernet 1/0/4 to the VLAN.
[SwitchA] vlan 100 [SwitchA-vlan100] port ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/4
# 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 policy so that hosts in VLAN 100 can join only multicast group 224.1.1.1.
[SwitchA] acl basic 2001 [SwitchA-acl-ipv4-basic-2001] rule permit source 224.1.1.1 0 [SwitchA-acl-ipv4-basic-2001] quit [SwitchA] igmp-snooping [SwitchA-igmp-snooping] group-policy 2001 vlan 100 [SwitchA-igmp-snooping] quit
# Configure Ten-GigabitEthernet 1/0/3 and Ten-GigabitEthernet 1/0/4 as simulated member hosts of multicast group 224.1.1.1.
[SwitchA] interface ten-gigabitethernet 1/0/3 [SwitchA-Ten-GigabitEthernet1/0/3] igmp-snooping host-join 224.1.1.1 vlan 100 [SwitchA-Ten-GigabitEthernet1/0/3] quit [SwitchA] interface ten-gigabitethernet 1/0/4 [SwitchA-Ten-GigabitEthernet1/0/4] igmp-snooping host-join 224.1.1.1 vlan 100 [SwitchA-Ten-GigabitEthernet1/0/4] quit
Verifying the configuration
# Send IGMP reports from Host A and Host B to join multicast groups 224.1.1.1 and 224.2.2.2. (Details not shown.)
# Display information about dynamic IGMP snooping group entries for 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 ports (2 in total): XGE1/0/3 (00:03:23) XGE1/0/4 (00:04:10)
The output shows the following information:
Host A and Host B have joined multicast group 224.1.1.1 through the member ports Ten-GigabitEthernet 1/0/4 and Ten-GigabitEthernet 1/0/3 on Switch A, respectively.
Host A and Host B have failed to join multicast group 224.2.2.2.