37
[RouterA] interface hundredgige 1/0/1
[RouterA-HundredGigE1/0/1] igmp enable
[RouterA-HundredGigE1/0/1] quit
# Enable PIM-DM on HundredGigE 1/0/2.
[RouterA] interface hundredgige 1/0/2
[RouterA-HundredGigE1/0/2] pim dm
[RouterA-HundredGigE1/0/2] quit
3.
Configure Switch A:
# Enable IGMP snooping globally.
<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit
# Create VLAN 100, and assign HundredGigE 1/0/1 through HundredGigE 1/0/4 to the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port hundredgige 1/0/1 to hundredgige 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 HundredGigE 1/0/3 and HundredGigE 1/0/4 as simulated member hosts of
multicast group 224.1.1.1.
[SwitchA] interface hundredgige 1/0/3
[SwitchA-HundredGigE1/0/3] igmp-snooping host-join 224.1.1.1 vlan 100
[SwitchA-HundredGigE1/0/3] quit
[SwitchA] interface hundredgige 1/0/4
[SwitchA-HundredGigE1/0/4] igmp-snooping host-join 224.1.1.1 vlan 100
[SwitchA-HundredGigE1/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 brief 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):
HGE1/0/3 (00:03:23)
HGE1/0/4 (00:04:10)