< Home

Example for Configuring an IGMP Snooping Querier in a VLAN

Networking Requirements

On a Layer 2 network shown in Figure 1, multicast sources Source1 and Source2 send multicast data to multicast groups 224.1.1.1 and 225.1.1.1. HostA and HostC expect to receive data of group 224.1.1.1 for a long time, whereas HostB and HostD expect to receive data of group 225.1.1.1 for a long time. All the hosts run IGMPv2.

Figure 1 Network diagram for IGMP snooping querier configuration

Configuration Roadmap

To meet the preceding requirements, enable IGMP snooping on the four switches and configure an IGMP snooping querier. Enable all the switches to discard unknown multicast packets. In this way, the switches will not broadcast multicast data in a VLAN when they have no matching Layer 2 multicast forwarding entries. The configuration roadmap is as follows:

  1. On all the switches, create a VLAN and add interfaces to the VLAN according to Figure 1.
  2. Enable IGMP snooping globally and in the VLAN on all the switches.
  3. Configure SwitchA as an IGMP snooping querier.
  4. Enable all the switches to discard unknown multicast packets.

Procedure

  1. On all the switches, create a VLAN and add interfaces to the VLAN.

    # Configure SwitchA. The configurations of SwitchB, SwitchC and SwitchD are similar to the configuration of SwitchA, and are not provided here.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan 10
    [SwitchA-vlan10] quit
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/1] port hybrid pvid vlan 10
    [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 10
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/2] port hybrid pvid vlan 10
    [SwitchA-GigabitEthernet0/0/2] port hybrid untagged vlan 10
    [SwitchA-GigabitEthernet0/0/2] quit
    [SwitchA] interface gigabitethernet 0/0/3
    [SwitchA-GigabitEthernet0/0/3] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/3] port hybrid pvid vlan 10
    [SwitchA-GigabitEthernet0/0/3] port hybrid untagged vlan 10
    [SwitchA-GigabitEthernet0/0/3] quit

  2. Enable IGMP snooping globally and in the VLAN on all the switches.

    # Configure SwitchA. The configurations of SwitchB, SwitchC and SwitchD are similar to the configuration of SwitchA, and are not provided here.

    [SwitchA] igmp-snooping enable
    [SwitchA] vlan 10
    [SwitchA-vlan10] igmp-snooping enable
    [SwitchA-vlan10] quit

  3. Configure SwitchA as an IGMP snooping querier.

    [SwitchA] vlan 10
    [SwitchA-vlan10] igmp-snooping querier enable
    [SwitchA-vlan10] quit

  4. Enable all the switches to discard unknown multicast packets.

    # Configure SwitchA. The configurations of SwitchB, SwitchC and SwitchD are similar to the configuration of SwitchA, and are not provided here.

    [SwitchA] vlan 10
    [SwitchA-vlan10] multicast drop-unknown
    [SwitchA-vlan10] quit
    

  5. Verify the configuration.

    # When the IGMP snooping querier begins to work, all the switches except the IGMP snooping querier receive IGMP General Query messages. Run the display igmp-snooping statistics vlan 10 command on SwitchB to view IGMP message statistics. The command output is as follows:

    [SwitchB] display igmp-snooping statistics vlan 10
     IGMP Snooping Packets Counter
       Statistics for VLAN 10
         Recv V1 Report          0
         Recv V2 Report          32
         Recv V3 Report          0
         Recv V1 Query           0
         Recv V2 Query       30
         Recv V3 Query           0
         Recv Leave              0
         Recv Pim Hello          0
         Send Query(S=0)         0
         Send Query(S!=0)        0
         Suppress Report         0
         Suppress Leave          0
         Proxy Send General Query               0
         Proxy Send Group-Specific Query        0
         Proxy Send Group-Source-Specific Query 0

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 10
    #
    igmp-snooping enable
    #
    vlan 10
     multicast drop-unknown
     igmp-snooping enable
     igmp-snooping querier enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 10
    #
    igmp-snooping enable
    #
    vlan 10
     multicast drop-unknown
     igmp-snooping enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/4
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 10
    #
    igmp-snooping enable
    #
    vlan 10
     multicast drop-unknown
     igmp-snooping enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    vlan batch 10
    #
    igmp-snooping enable
    #
    vlan 10
     multicast drop-unknown
     igmp-snooping enable
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >