Skip to content
Ask AI

Multicast VLAN Configuration

When users in different VLANs have the same multicast data requirements, the upstream router needs to send multiple copies of the same multicast packet, each carrying a different VLAN, to different VLANs. With multicast VLAN functionality deployed on Layer 2 devices, the upstream router no longer needs to replicate the multicast stream in each user VLAN. Instead, the data stream is duplicated within the multicast VLAN and then sent to the Layer 2 devices. This approach avoids unnecessary duplication of multicast streams on the upstream router, saving network bandwidth and reducing the burden on the upstream router.

In a multicast VLAN, VLANs are divided into multicast VLANs and user VLANs. The multicast VLAN is the VLAN to which the interfaces connected to multicast sources belong, used to aggregate multicast streams. The user VLAN is the VLAN to which multicast member hosts belong, used to receive multicast traffic from the multicast VLAN. Multiple user VLANs can be bound to a multicast VLAN.

The implementation process of multicast VLAN functionality consists of two parts: protocol message forwarding and multicast data forwarding:

Protocol Message Forwarding

  • Replace the Tag of IGMP Report messages from user VLANs with the Tag of the corresponding multicast VLAN and send them out from the router ports of the multicast VLAN.
  • Replace the Tag of IGMP Query messages from the multicast VLAN with the Tag of the corresponding user VLAN and send them out from the member ports of the user VLAN.
  • Merge the learned entries from IGMP Snooping in user VLANs into the multicast VLAN.

Multicast Data Forwarding

  • If the forwarding table entry corresponding to the multicast VLAN is found, the outgoing ports and outgoing port VLAN IDs can be determined. Then, the data packet is copied and sent to each member port in each user VLAN.
  • If the corresponding forwarding table entry is not found, the data packet will be discarded or broadcast according to user policy.
OperationCommandDescription
Enter the system configuration viewconfigure
Configure the multicast vlanigmp-snooping mvlan
multicast-vlan user-vlan
multicast-vlan: Multicast VLAN
user-vlan: User VLAN, supports configuring multiple VLANs separated by commas ’,’ or configuring a range using ’-‘
OperationCommand
View multicast VLAN configurationshow vlan igmp-snooping mvlan

Network requirements

The service VLAN used to transmit multicast data between Router and Device is VLAN 10, while the downstream user hosts belong to VLAN 100 and VLAN 200 respectively, and all need to receive multicast data from Multicast Source. By configuring the multicast VLAN one-to-one multifunction based on user VLANs, for multiple copies of the same multicast demand from different user hosts, Router only needs to send one copy of multicast data to VLAN 10, reducing the bandwidth waste between Router and Device.

Procedure

  1. Create a VLAN and enable IGMP Snooping
sonic(config)# vlan 100
sonic(config-vlan-100)# igmp snooping enable
sonic(config)# vlan 200
sonic(config-vlan-200)# igmp snooping enable
  1. Create a multicast VLAN and enable IGMP Snooping
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp snooping enable
  1. Add the interface to the specified VLAN
sonic(config)# vlan 100
sonic(config)# vlan 200
sonic(config)# vlan 10
sonic(config)# interface ethernet 1
sonic(config-if-1) switchport access vlan 100
sonic(config)# interface ethernet 2
sonic(config-if-2) switchport access vlan 100
sonic(config)# interface ethernet 3
sonic(config-if-3) switchport access vlan 200
sonic(config)# interface ethernet 4
sonic(config-if-4) switchport access vlan 200
sonic(config)# interface ethernet 50
sonic(config-if-50) switchport access vlan 10
  1. Bind user Vlan100, Vlan200 under multicast VLAN
sonic(config)# vlan mvlan 20 200,201

Verify configuration

View multicast VLAN configuration

sonic# show vlan mvlan
+-------------+-------------+
| MVLAN ID | UVLAN IDS |
+=============+=============+
| 20 | 200 |
| | 100 |
+-------------+-------------+