41
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] drop-unknown
[SwitchA-igmp-snooping] quit
# Create VLAN 100 and assign Ethernet 1/0/1 through Ethernet 1/0/3 to the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port ethernet 1/0/1 to ethernet 1/0/3
# Enable IGMP snooping in VLAN 100.
[SwitchA-vlan100] igmp-snooping enable
# Enable the IGMP snooping querier function in VLAN 100
[SwitchA-vlan100] igmp-snooping querier
# Set the source IP address of IGMP general queries and group-specific queries to 192.168.1.1
in VLAN 100.
[SwitchA-vlan100] igmp-snooping general-query source-ip 192.168.1.1
[SwitchA-vlan100] igmp-snooping special-query source-ip 192.168.1.1
[SwitchA-vlan100] quit
2.
Configure Switch B:
# Enable IGMP snooping and the function of dropping unknown multicast traffic globally.
<SwitchB> system-view
[SwitchB] igmp-snooping
[SwitchB-igmp-snooping] drop-unknown
[SwitchB-igmp-snooping] quit
# Create VLAN 100, and assign Ethernet 1/0/1 through Ethernet 1/0/4 to the VLAN.
[SwitchB] vlan 100
[SwitchB-vlan100] port ethernet 1/0/1 to ethernet 1/0/4
# Enable IGMP snooping in VLAN 100.
[SwitchB-vlan100] igmp-snooping enable
[SwitchB-vlan100] quit
Configurations on Switch C and Switch D are similar to the configuration on Switch B.
Verifying the configuration
After the IGMP snooping querier starts to work, all the switches but the querier can receive IGMP general
queries. By using the
display igmp-snooping statistics
command, you can display statistics for the IGMP
messages received. For example:
# Display IGMP message statistics on Switch B.
[SwitchB] 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.