< Home

Example for Configuring Controllable Multicast

Networking Requirements

In Figure 1, multicast groups G1 (225.0.0.1), G2 (225.0.0.2), G3 (225.0.0.3), and G4 (225.0.0.4) exist on the network connected to the router. Users in VLAN 10 and VLAN 20 are allowed to watch only programs of G1 and G2, whereas users in VLAN 30 and VLAN 40 are allowed to watch all programs.

This example illustrates how to configure controllable multicast on an IPv4 network. Controllable multicast configuration on an IPv6 network is similar. You only need to replace Internet Group Management Protocol (IGMP) snooping with Multicast Listener Discovery (MLD) snooping on the IPv6 network.

Figure 1 Network diagram for controllable multicast configuration

Configuration Roadmap

You can configure controllable multicast on the switch. The configuration roadmap is as follows:

  1. Configure IGMP snooping on the switch.
  2. Configure controllable multicast.
    • Configure two multicast group lists L1 (G1, G2) and L2 (G3, G4).
    • Configure two multicast profiles P1 and P2.

Procedure

  1. Create user VLANs and add interfaces to these user VLANs.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 10 20 30 40
    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type hybrid
    [Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 10
    [Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 10
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] port link-type hybrid
    [Switch-GigabitEthernet0/0/2] port hybrid untagged vlan 20
    [Switch-GigabitEthernet0/0/2] port hybrid pvid vlan 20
    [Switch-GigabitEthernet0/0/2] quit
    [Switch] interface gigabitethernet 0/0/3
    [Switch-GigabitEthernet0/0/3] port link-type hybrid
    [Switch-GigabitEthernet0/0/3] port hybrid untagged vlan 30
    [Switch-GigabitEthernet0/0/3] port hybrid pvid vlan 30
    [Switch-GigabitEthernet0/0/3] quit
    [Switch] interface gigabitethernet 0/0/4
    [Switch-GigabitEthernet0/0/4] port link-type hybrid
    [Switch-GigabitEthernet0/0/4] port hybrid untagged vlan 40
    [Switch-GigabitEthernet0/0/4] port hybrid pvid vlan 40
    [Switch-GigabitEthernet0/0/4] quit
    

  2. Configure IGMP snooping.

    [Switch] igmp-snooping enable
    [Switch] vlan 10
    [Switch-vlan10] igmp-snooping enable
    [Switch-vlan10] quit
    [Switch] vlan 20
    [Switch-vlan20] igmp-snooping enable
    [Switch-vlan20] quit
    [Switch] vlan 30
    [Switch-vlan30] igmp-snooping enable
    [Switch-vlan30] quit
    [Switch] vlan 40
    [Switch-vlan40] igmp-snooping enable
    [Switch-vlan40] quit
    

  3. Configure controllable multicast.

    # Configure multicast groups.

    [Switch] btv
    [Switch-btv] multicast-group g1 ip-address 225.0.0.1
    [Switch-btv] multicast-group g2 ip-address 225.0.0.2
    [Switch-btv] multicast-group g3 ip-address 225.0.0.3
    [Switch-btv] multicast-group g4 ip-address 225.0.0.4

    # Configure multicast group lists.

    [Switch-btv] multicast-list l1
    [Switch-btv-list-l1] add multicast-group name g1
    [Switch-btv-list-l1] add multicast-group name g2
    [Switch-btv-list-l1] quit
    [Switch-btv] multicast-list l2
    [Switch-btv-list-l2] add multicast-group name g3
    [Switch-btv-list-l2] add multicast-group name g4
    [Switch-btv-list-l2] quit

    # Configure multicast profiles.

    [Switch-btv] multicast-profile p1
    [Switch-btv-profile-p1] add multicast-list name l1 watch
    [Switch-btv-profile-p1] quit
    [Switch-btv] multicast-profile p2
    [Switch-btv-profile-p2] add multicast-list name l1 watch
    [Switch-btv-profile-p2] add multicast-list name l2 watch
    [Switch-btv-profile-p2] quit
    [Switch-btv] quit

    # Apply multicast profiles to VLANs.

    [Switch] vlan 10
    [Switch-vlan10] attach multicast-profile p1
    [Switch-vlan10] quit
    [Switch] vlan 20
    [Switch-vlan20] attach multicast-profile p1
    [Switch-vlan20] quit
    [Switch] vlan 30
    [Switch-vlan30] attach multicast-profile p2
    [Switch-vlan30] quit
    [Switch] vlan 40
    [Switch-vlan40] attach multicast-profile p2
    [Switch-vlan40] quit

  4. Verify the configuration.

    [Switch] display multicast-profile-apply
    ------------------------------------------------------------------------------- 
      Vlan-id  Port                      SMAC                            Max-Users
                           Index               Profile-name
    ------------------------------------------------------------------------------- 
      Vlan10    --                        --                                 8       
                             1                   p1
      Vlan20    --                        --                                 8       
                             1                   p1
      Vlan30    --                        --                                 8       
                             2                   p2
      Vlan40    --                        --                                 8       
                             2                   p2
    
      Total: 4
    
    [Switch] display multicast-profile
     -----------------------------------------------------------------------------  
     Index        Profile-Name                    Multicast-list  Attach-User       
     -----------------------------------------------------------------------------  
      1              p1                               1               2
      2              p2                               2               2
    
     Total: 2  
    
    [Switch] display multicast-list
     -------------------------------------------------------------------------      
     Index        Multicast-list-name             Multicast-group                   
     -------------------------------------------------------------------------      
      1             l1                                     2                        
      2             l2                                     2                        
    
     Total: 2
    
    [Switch] display multicast-group 
    -------------------------------------------------------------------------      
     Index        Multicast-group-name              Address                         
     -------------------------------------------------------------------------      
      1           g1                               225.0.0.1              
      2           g2                               225.0.0.2              
      3           g3                               225.0.0.3              
      4           g4                               225.0.0.4              
    
     Total: 4

Configuration Files

  • Switch configuration file

    #
    sysname Switch
    # 
    vlan batch 10 20 30 40
    #
    igmp-snooping enable
    #
    btv
     multicast-group g1 ip-address 225.0.0.1
     multicast-group g2 ip-address 225.0.0.2
     multicast-group g3 ip-address 225.0.0.3
     multicast-group g4 ip-address 225.0.0.4
     multicast-list l1
      add multicast-group name g2
      add multicast-group name g1
     multicast-list l2
      add multicast-group name g4
      add multicast-group name g3
     multicast-profile p1
      add multicast-list name l1 watch
     multicast-profile p2
      add multicast-list name l1 watch
      add multicast-list name l2 watch
    #
    vlan 10
     igmp-snooping enable 
     attach multicast-profile p1
    vlan 20
     igmp-snooping enable 
     attach multicast-profile p1
    vlan 30
     igmp-snooping enable 
     attach multicast-profile p2
    vlan 40
     igmp-snooping enable 
     attach multicast-profile p2 
    #
    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 20
     port hybrid untagged vlan 20
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 30
     port hybrid untagged vlan 30
    #
    interface GigabitEthernet0/0/4
     port link-type hybrid
     port hybrid pvid vlan 40
     port hybrid untagged vlan 40
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >