l2-multicast forwarding-mode
Function
The l2-multicast forwarding-mode command configures the forwarding mode of multicast data in a VLAN.
The undo l2-multicast forwarding-mode command restores the default forwarding mode of multicast data.
By default, multicast data is forwarded in a VLAN based on IP addresses.
Parameters
Parameter | Description | Value |
---|---|---|
ip | Forwards multicast data based on IP addresses. |
- |
mac | Forwards multicast data based on MAC addresses. |
- |
Usage Guidelines
Usage Scenario
After Layer 2 multicast is enabled on a Layer 2 device, the Layer 2 device maintains a Layer 2 multicast forwarding table. When receiving a multicast packet, the Layer 2 device searches the Layer 2 multicast forwarding table for the outbound interface based on the multicast address of the packet. The Layer 2 device determines the outbound interface based on the IP multicast address or IP multicast MAC address, depending on the configured Layer 2 multicast forwarding mode.
Multiple multicast IP addresses may be mapped to one MAC address. If multicast data is forwarded based on MAC addresses, multicast data may be sent to the users who do not order the multicast data. To prevent this problem, use the IP address-based forwarding mode on devices with Layer 3 functions.
Configuration Impact
- The IGMP snooping version cannot be set to IGMPv3 on an IPv4 network.
- The MLD snooping version cannot be set to MLDv2 on an IPv6 network.
Precautions
- On an IPv4 network, run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.
- On an IPv6 network, run the mld-snooping enable command to enable MLD snooping in the VLAN.
Example
# After IGMP snooping is enabled globally, configure the wireless access controller to forward multicast data in VLAN 100 based on MAC addresses.
<AC6605> system-view [AC6605] igmp-snooping enable [AC6605] vlan 100 [AC6605-vlan100] l2-multicast forwarding-mode mac [AC6605-vlan100] igmp-snooping enable
# After MLD snooping is enabled globally, configure the wireless access controller to forward multicast data in VLAN 100 based on MAC addresses.
<AC6605> system-view [AC6605] mld-snooping enable [AC6605] vlan 100 [AC6605-vlan100] l2-multicast forwarding-mode mac [AC6605-vlan100] mld-snooping enable