Example for Adding an Interface to a Multicast Group Statically

This section provides an example for adding an interface to a multicast group statically.

Networking Requirements

On the network shown in Figure 1, GE 0/1/1 on DeviceA is connected to a router, and GE 0/1/2 on the DeviceA is connected to a switch. It is required that all the hosts in VLAN 3 should receive the multicast packets from the multicast group 225.0.0.1.

Figure 1 Networking diagram of adding an interface to a multicast group statically

Interfaces 1 and 2 in this example represent GE 0/1/1 and GE 0/1/2, respectively.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Create a VLAN.

  2. Add interfaces to the VLAN.

  3. Add an interface to a multicast group statically.

Data Preparation

To complete the configuration, you need the following data:

  • Multicast group address: 225.0.0.1

  • ID of the VLAN to which a switch and connected host devices belong: 3

  • GE 0/1/1 as the interface to a multicast group statically

Procedure

  1. Create a VLAN.

    # Create VLAN 3 on DeviceA.

    <DeviceA> system-view
    [~DeviceA] igmp-snooping enable
    [*DeviceA] vlan 3
    [*DeviceA-vlan3] igmp-snooping enable
    [*DeviceA-vlan3] commit
    [~DeviceA-vlan3] quit

  2. Add interfaces to the VLAN.

    # Configure GE 0/1/2 on Device A to allow data frames from VLAN 3 to pass through.

    [~DeviceA] interface gigabitethernet 0/1/2
    [~DeviceA-GigabitEthernet0/1/2] portswitch
    [*DeviceA-GigabitEthernet0/1/2] port trunk allow-pass vlan 3
    [*DeviceA-GigabitEthernet0/1/2] commit
    [~DeviceA-GigabitEthernet0/1/2] quit

    # Configure GE 0/1/1 on Device A to allow data frames from VLAN 3 to pass through.

    [~DeviceA] interface gigabitethernet 0/1/1
    [~DeviceA-GigabitEthernet0/1/1] portswitch
    [*DeviceA-GigabitEthernet0/1/1] port trunk allow-pass vlan 3
    [*DeviceA-GigabitEthernet0/1/1] commit
    [~DeviceA-GigabitEthernet0/1/1] quit

  3. Create GE 0/1/2 on DeviceA and add it to the multicast group 225.0.0.1 statically.

    [~DeviceA] interface gigabitethernet 0/1/2
    [~DeviceA-GigabitEthernet0/1/2] l2-multicast static-group group-address 225.0.0.1 vlan 3
    [*DeviceA-GigabitEthernet0/1/2] commit
    [~DeviceA-GigabitEthernet0/1/2] quit

  4. Verify the configuration.

    # After completing the configurations, run the display igmp-snooping port-info command on DeviceA to view information about member ports of the multicast group 225.0.0.1.

    [~DeviceA] display igmp-snooping port-info
     -----------------------------------------------------------------------------------
      Flag: S:Static     D:Dynamic     M:Ssm-mapping
            A:Active     P:Protocol    F:Fast-channel                                
                        (Source, Group)  Port                                      Flag
     -----------------------------------------------------------------------------------
     VLAN 3, 1 Entry(s)
                          (*, 225.0.0.1)                                            P--
                                          GE0/1/2                                   S--
                                                            1 port(s) include
     -----------------------------------------------------------------------------------

Configuration Files

  • DeviceA configuration file

    #
    sysname DeviceA
    #
    vlan batch 3
    #
    igmp-snooping enable
    #
    #
    vlan 3
    igmp-snooping enable
    #
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     portswitch
     port trunk allow-pass vlan 3
    #
    interface  GigabitEthernet0/1/2
     undo shutdown
     portswitch
     port trunk allow-pass vlan 3
     l2-multicast static-group group-address 225.0.0.1 vlan 3
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >