The l2-multicast static-group command configures static group memberships on an interface.
The undo l2-multicast static-group command deletes static group memberships from an interface.
By default, no static group membership is configured on an interface.
# Configure a single static multicast group:
l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
undo l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address vlan { all | { vlan-id1 [ to vlan-id2 ] } &<1-10> }
# Configure a series of static multicast groups:
l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address1 to group-ip-address2 vlan vlan-id
undo l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address1 to group-ip-address2 vlan vlan-id
undo l2-multicast static-group [ source-address source-ip-address ] group-address all vlan { all | { vlan-id1 [ to vlan-id2 ] } &<1-10> }
Parameter |
Description |
Value |
---|---|---|
source-address source-ip-address |
Specifies the IP address of a multicast source. |
The value of source-ip-address can be any Class A, Class B, or Class C address, in dotted decimal notation. |
group-address group-ip-address |
Specifies the IP address of a multicast group. |
The value of group-ip-address ranges from 224.0.1.0 to 239.255.255.255 in dotted decimal notation. |
vlan { vlan-id1 [ to vlan-id2 ] } |
Specifies the VLANs that the interface belongs to. vlan-id1 [ to vlan-id2 ] specifies a range of VLAN IDs.
|
The values of vlan-id1 and vlan-id2 are integers that range from 1 to 4094. vlan-id2 must be larger than vlan-id1. |
all |
Deletes all group memberships from the interface.
|
- |
group-ip-address1 to group-ip-address2 | Configures multiple static group memberships on the interface. group-ip-address1 and group-ip-address2 identify a range of multicast group addresses. |
The value ranges from 224.0.1.0 to 239.255.255.255, in dotted decimal notation. The values of group-ip-address1 and group-ip-address2 must be in the same network segment (with a 24-bit mask). |
MultiGE interface view, Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view
Usage Scenario
In addition to dynamic multicast forwarding entries generated by Layer 2 multicast protocols, you can configure static Layer 2 multicast forwarding entries by binding interfaces to multicast groups. After an interface is statically bound to a multicast group, users connected to this interface can receive multicast data of the multicast group over a long time. The interface then becomes a static member interface.
Configuring static member interfaces has the following advantages:
Prerequisites
IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.
Precautions
If a device is configured to forward Layer 2 multicast traffic on a network configured with MUX VLAN using the multicast-snooping mux-vlan enable command, the VLAN specified in the l2-multicast static-group command must not be a MUX VLAN (include principal VLAN and subordinate VLAN).
# Configure a static multicast group 224.1.1.1 on GE0/0/1 in VLAN 2.
<HUAWEI> system-view [HUAWEI] igmp-snooping enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 [HUAWEI-GigabitEthernet0/0/1] l2-multicast static-group group-address 224.1.1.1 vlan 2
# Configure static multicast groups 224.1.1.1 to 224.1.1.3 on GE0/0/1 in VLAN 2.
<HUAWEI> system-view [HUAWEI] igmp-snooping enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 [HUAWEI-GigabitEthernet0/0/1] l2-multicast static-group group-address 224.1.1.1 to 224.1.1.3 vlan 2
# Delete static multicast group 224.1.1.1 from GE0/0/1 in all VLANs.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo l2-multicast static-group group-address 224.1.1.1 vlan all