Example for Configuring 1-to-N Multicast Replication Based on User VLANs
Networking Requirements
In Figure 4-4, service VLAN 10 is used to transmit multicast data between RouterA and SwitchA. HostA, HostB, and HostC belong to VLAN 100, VLAN 200, and VLAN 300, respectively. All of them want to receive multicast data from Source.
You can configure 1-to-N multicast replication based on user VLANs, so that RouterA only needs to copy and send multicast data to VLAN 10 in response to the same multicast data request from different user hosts. This reduces bandwidth consumption between RouterA and SwitchA.
Configuration Roadmap
The configuration roadmap is as follows:
- Enable Internet Group Management Protocol (IGMP) snooping in the system view.
- Create user VLANs and enable IGMP snooping in the user VLANs.
- Create a multicast VLAN and enable IGMP snooping in the multicast VLAN.
- Bind the user VLANs to the multicast VLAN.
- Add the network-side interface and user-side interfaces to the VLANs as hybrid interfaces.
Procedure
- Enable IGMP snooping in the system view.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] igmp-snooping enable
- Create user VLANs and enable IGMP snooping in the user VLANs.
[SwitchA] vlan 100 [SwitchA-vlan100] igmp-snooping enable [SwitchA-vlan100] quit [SwitchA] vlan 200 [SwitchA-vlan200] igmp-snooping enable [SwitchA-vlan200] quit [SwitchA] vlan 300 [SwitchA-vlan300] igmp-snooping enable [SwitchA-vlan300] quit
- Create a multicast VLAN and enable the IGMP snooping and IGMP snooping querier functions in the multicast VLAN.
It is recommended that you configure igmp-snooping querier enable in the multicast VLAN view. If RouterA is the gateway with IGMP enabled, you do not need to perform this configuration.
[SwitchA] vlan 10 [SwitchA-vlan10] igmp-snooping enable [SwitchA-vlan10] igmp-snooping querier enable [SwitchA-vlan10] multicast-vlan enable
- Bind user VLANs 100, 200, and 300 to multicast VLAN 10.
[SwitchA-vlan10] multicast-vlan user-vlan 100 200 300 [SwitchA-vlan10] quit
- Add interfaces to the VLANs as hybrid interfaces.
# Add GE0/0/1 to multicast VLAN 10.
[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
# Add GE0/0/2, GE0/0/3, and GE0/0/4 to user VLANs 100, 200, and 300 respectively.
[SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type hybrid [SwitchA-GigabitEthernet0/0/2] port hybrid pvid vlan 100 [SwitchA-GigabitEthernet0/0/2] port hybrid untagged vlan 100 [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 200 [SwitchA-GigabitEthernet0/0/3] port hybrid untagged vlan 200 [SwitchA-GigabitEthernet0/0/3] quit [SwitchA] interface gigabitethernet 0/0/4 [SwitchA-GigabitEthernet0/0/4] port link-type hybrid [SwitchA-GigabitEthernet0/0/4] port hybrid pvid vlan 300 [SwitchA-GigabitEthernet0/0/4] port hybrid untagged vlan 300 [SwitchA-GigabitEthernet0/0/4] quit
- Verify the configuration. View information about the multicast VLAN and user VLANs on SwitchA.
[SwitchA] display multicast-vlan vlan Total multicast vlan 1 multicast-vlan user-vlan number snooping-state ---------------------------------------------------------------- 10 3 IGMP Enable/MLD Disable
[SwitchA] display user-vlan vlan Total user vlan 3 user-vlan snooping-state multicast-vlan snooping-state ----------------------------------------------------------------------------- 100 IGMP Enable/MLD Disable 10 IGMP Enable/MLD Disable 200 IGMP Enable/MLD Disable 10 IGMP Enable/MLD Disable 300 IGMP Enable/MLD Disable 10 IGMP Enable/MLD Disable
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 10 100 200 300 # igmp-snooping enable # vlan 10 igmp-snooping enable multicast-vlan enable igmp-snooping querier enable multicast-vlan user-vlan 100 200 300 vlan 100 igmp-snooping enable vlan 200 igmp-snooping enable vlan 300 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 100 port hybrid untagged vlan 100 # interface GigabitEthernet0/0/3 port link-type hybrid port hybrid pvid vlan 200 port hybrid untagged vlan 200 # interface GigabitEthernet0/0/4 port link-type hybrid port hybrid pvid vlan 300 port hybrid untagged vlan 300 # return