42
2.
Configure Device B:
# Enable IGMP snooping globally.
<DeviceB> system-view
[DeviceB] igmp-snooping
[DeviceB-igmp-snooping] quit
# Switch the link mode of GigabitEthernet 3/1/1 through GigabitEthernet 3/1/4 to Layer 2 mode,
create VLAN 100, add GigabitEthernet 3/1/1 through GigabitEthernet 3/1/4 to VLAN 100.
[DeviceB] interface GigabitEthernet 3/1/1
[DeviceB-GigabitEthernet3/1/1] port link-mode bridge
[DeviceB-GigabitEthernet3/1/1] quit
[DeviceB] interface GigabitEthernet 3/1/2
[DeviceB-GigabitEthernet3/1/2] port link-mode bridge
[DeviceB-GigabitEthernet3/1/2] quit
[DeviceB] interface GigabitEthernet 3/1/3
[DeviceB-GigabitEthernet3/1/3] port link-mode bridge
[DeviceB-GigabitEthernet3/1/3] quit
[DeviceB] interface GigabitEthernet 3/1/4
[DeviceB-GigabitEthernet3/1/4] port link-mode bridge
[DeviceB-GigabitEthernet3/1/4] quit
[DeviceB] vlan 100
[DeviceB-vlan100] port GigabitEthernet 3/1/1 to GigabitEthernet 3/1/4
# Enable IGMP snooping and the function of dropping unknown multicast packets in VLAN 100.
[DeviceB-vlan100] igmp-snooping enable
[DeviceB -vlan100] igmp-snooping drop-unknown
[DeviceB -vlan100] quit
The configuration on Device C and Device B is similar to that on Device B.
Verify the configuration
After the IGMP snooping querier starts to work, all the devices but the querier can receive IGMP general
queries. You can use the
display igmp-snooping statistics
command to display statistics for the received
IGMP messages.
# Display statistics for IGMP messages on Device B.
[DeviceB] display igmp-snooping statistics
Received IGMP general queries:3.
Received IGMPv1 reports:0.
Received IGMPv2 reports:12.
Received IGMP leaves:0.
Received IGMPv2 specific queries:0.
Sent IGMPv2 specific queries:0.
Received IGMPv3 reports:0.
Received IGMPv3 reports with right and wrong records:0.
Received IGMPv3 specific queries:0.
Received IGMPv3 specific sg queries:0.
Sent IGMPv3 specific queries:0.
Sent IGMPv3 specific sg queries:0.
Received error IGMP messages:0.