No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 V200R013C00 Command Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
MLD Snooping Configuration Commands

MLD Snooping Configuration Commands

Command Support

Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.

display l2-multicast forwarding-mode

Function

The display l2-multicast forwarding-mode command displays the Layer 2 multicast forwarding mode in VLANs.

Format

display l2-multicast forwarding-mode vlan [ vlan-id ]

Parameters

Parameter Description Value
vlan [ vlan-id ]

Displays the Layer 2 multicast forwarding mode in a specified VLAN. If vlan-id is not specified, the system displays the Layer 2 multicast forwarding mode in all VLANs.

The value is an integer ranging from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After Layer 2 multicast is enabled on the switch, the switch maintains a Layer 2 multicast forwarding table. When receiving a multicast packet, the switch searches the Layer 2 multicast forwarding table for the outbound interface based on the multicast address of the packet. The switch determines the outbound interface based on the IP multicast address or IP multicast MAC address, depending on the configured Layer 2 multicast forwarding mode.

To check which Layer 2 multicast forwarding mode is used, run the display l2-multicast forwarding-mode command.

Precautions

You can change the forwarding mode using the l2-multicast forwarding-mode command.

Example

# Display the Layer 2 multicast forwarding mode in all VLANs.

<HUAWEI> display l2-multicast forwarding-mode vlan
VLAN                   Forwarding-mode        Router-discard
------------------------------------------------------------
1                      IP                     disable
2                      IP                     disable
3                      MAC                    disable
Table 8-133  Description of the display l2-multicast forwarding-mode vlan command output

Item

Description

VLAN

VLAN ID.

Forwarding-mode

Forwarding mode used in a VLAN, which can be:
  • MAC address-based forwarding
  • IP address-based forwarding

This parameter can be configured using the l2-multicast forwarding-mode { ip | mac } command.

Router-discard

Whether the switch is configured not to forward multicast data packets to router ports in a VLAN.
  • enable: The switch does not forward multicast data packets to router ports in the VLAN.
  • disable: The switch forwards multicast data packets to router ports in the VLAN.

This function is configured using the l2-multicast router-port-discard command.

display mld-snooping

Function

The display mld-snooping command displays the MLD snooping running parameters in a VLAN.

Format

display mld-snooping [ vlan vlan-id ]

Parameters

Parameter

Description

Value

vlan vlan-id

Displays the MLD snooping running parameters in a specified VLAN. If this parameter is not specified, the system displays the MLD running parameters in all VLANs with MLD snooping configured.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

You can use this command to view the MLD snooping running parameters. If you run this command after configuring MLD snooping parameters, the command displays the configured parameter values.

To view the MLD snooping configuration, run the display mld-snooping configuration command.

Precautions

This command can display the MLD snooping configuration in a VLAN only when at least one interface in the VLAN is in Up state and MLD snooping is enabled in the VLAN.

Example

# Display the MLD snooping running parameters in VLAN 3.

<HUAWEI> display mld-snooping vlan 3
MLD Snooping Vlan Information for VLAN 3
   MLD Snooping is Enabled
   MLD Version is Set to default 1
   MLD Query Interval is Set to default 60s
   MLD Max Response Interval is Set to default 10s
   MLD Robustness is Set to default 2
   MLD Last Member Query Interval is Set to default 1s
   MLD Router Port Aging Interval is Set to 180s or holdtime in hello
   MLD Filter Group-Policy is not set
   MLD Prompt Leave Disable
   MLD Router Alert is Not Required
   MLD Send Router Alert Enable
   MLD Snooping proxy is disabled
   MLD Snooping report-suppress is disabled
   MLD Snooping Querier is disabled
Table 8-134  Description of the display mld-snooping vlan 3 command output

Item

Description

MLD Snooping Vlan Information for VLAN 3

The following information displayed is the MLD snooping running parameters in VLAN 3.

MLD Snooping is Enabled

MLD snooping is enabled in the VLAN.

By default, MLD snooping is disabled in a VLAN. MLD snooping can be enabled using the mld-snooping enable command.

MLD Version is Set to default 1

Version of MLD messages that can be processed in the VLAN.

In this example, the default version 1 is displayed. This parameter is configured using the mld-snooping version command.

MLD Query Interval is Set to default 60s

Interval at which MLD General Query messages are sent.

In this example, the default value (60 seconds) is displayed. This parameter is configured using the mld-snooping query-interval command.

MLD Max Response Interval is Set to default 10s

Maximum response time for MLD General Query messages.

In this example, the default value (10 seconds) is displayed. This parameter is configured using the mld-snooping max-response-time command.

MLD Robustness is Set to default 2

MLD robustness variable.

In this example, the default value 2 is displayed. This parameter is configured using the mld-snooping robust-count command.

MLD Last Member Query Interval is Set to default 1s

Interval at which MLD Group-Specific Query messages are sent.

In this example, the default value (1 second) is displayed. This parameter is configured using the mld-snooping last-listener-query-interval command.

MLD Router Port Aging Interval is Set to 180s or holdtime in hello

Aging time of a router port.

In this example, the default value (180 seconds or the holdtime value contained in PIM Hello messages) is displayed. This parameter is configured using the mld-snooping router-aging-time command.

MLD Filter Group-Policy is not set

Multicast group policy.

In this example, the default configuration is displayed. That is, no policy is configured. A multicast group policy is configured using the mld-snooping group-policy (VLAN view) command.

MLD Prompt Leave Disable

The fast leave function is disabled for interfaces in the VLAN (default configuration).

The fast leave function can be enabled using the mld-snooping prompt-leave command.

MLD Router Alert is Not Required

The switch does not require that MLD messages received from the VLAN contain the Router-Alert option in the IP header (default configuration).

The switch can be configured to discard MLD messages without the Router-Alert option using the mld-snooping require-router-alert command.

MLD Send Router Alert Enable

The switch sends MLD messages with the Router-Alert option to the VLAN (default configuration).

The switch can be configured to send MLD messages with the Router-Alert option using the mld-snooping send-router-alert command.

MLD Snooping proxy is disabled

MLD snooping proxy is disabled (default configuration).

MLD snooping proxy can be enabled using the mld-snooping proxy command.

MLD Snooping report-suppress is disabled

MLD snooping report suppression is disabled (default configuration).

MLD snooping report suppression can be enabled using the mld-snooping report-suppress command.

MLD Snooping Querier is disabled

MLD snooping querier is disabled (default configuration).

MLD snooping querier can be enabled using the mld-snooping querier enable command.

display mld-snooping configuration

Function

The display mld-snooping configuration command displays the MLD snooping configuration.

Format

display mld-snooping [ vlan vlan-id ] configuration

Parameters

Parameter

Description

Value

vlan vlan-id

Displays the MLD snooping configuration in a specified VLAN. If this parameter is not specified, the system displays the MLD snooping configuration in all VLANs.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

This command displays only the MLD snooping configuration so that you can check whether the MLD snooping configuration made in the system is proper.

To check all MLD snooping running parameters, run the display mld-snooping command.

Precautions

Before running the display mld-snooping configuration command, run the mld-snooping enable commands to enable IGMP snooping globally and in the VLAN. Otherwise, no information is displayed.

Example

# Display the MLD snooping configuration in all VLANs.

<HUAWEI> display mld-snooping configuration
 MLD Snooping Configuration for VLAN 20                                         
     mld-snooping enable                                                        
     mld-snooping version 2                                                     
 MLD Snooping Configuration for VLAN 90                                         
     mld-snooping enable                                                        
Table 8-135  Description of the display mld-snooping configuration command output

Item

Description

MLD Snooping Configuration for VLAN

The following information displayed is the MLD snooping configuration in a specific VLAN.

mld-snooping enable

MLD snooping is enabled in the VLAN.

By default, MLD snooping is disabled in a VLAN. MLD snooping can be enabled using the mld-snooping enable command.

mld-snooping version 2

MLDv1 and MLDv2 messages can be processed in the VLAN.

By default, only MLDv1 messages can be processed in a VLAN. This parameter is configured using the mld-snooping version command.

display mld-snooping forwarding-table

Function

The display mld-snooping forwarding-table command displays the Layer 2 multicast forwarding table.

Format

display mld-snooping forwarding-table vlan [ vlan-id [ [ source-address source-ipv6-address ] group-address { group-ipv6-address | router-group } ] ]

Parameters

Parameter

Description

Value

vlan [ vlan-id ]

Displays Layer 2 multicast forwarding entries in a specified VLAN. If vlan-id is not specified, information about the MLD snooping forwarding table of all VLANs.

The value is an integer that ranges from 1 to 4094.

source-address source-ipv6-address

Displays the forwarding entries of a specified Layer 2 multicast source.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.

group-address group-ipv6-address

Displays multicast forwarding entries of a specified Layer 2 multicast group.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. An IPv6 multicast address starts with FF.

router-group

Displays Layer 2 multicast forwarding entries of all router ports.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After completing MLD snooping configuration, you can use the display mld-snooping forwarding-table command to view the MLD snooping forwarding table. This command displays statically configured and dynamically learned multicast forwarding entries.

Each entry contains the multicast source, multicast group, list of outbound interfaces, and VLAN ID of multicast data packets. When the MLD snooping version is set to v2 in a VLAN or when the MLD snooping version is set to v2, the display mld-snooping forwarding-table command displays (S, G) entries.

Precautions

This command displays Layer 2 multicast forwarding entries in a VLAN only when at least one interface in the VLAN is in Up state.

Example

# Display multicast forwarding entries in VLAN 10.

<HUAWEI> display mld-snooping forwarding-table vlan 10
VLAN ID : 10, Forwarding Mode : IP
Total Group(s): 2                                              
------------------------------------------------------------------------------   
                     (Source, Group)    Interface                 Out-Vlan          
------------------------------------------------------------------------------  
                         Router-port    GigabitEthernet1/0/1            10            
              (*, ff1e:0:0:0:0:0:0:1)   GigabitEthernet1/0/1            10            
                                        GigabitEthernet1/0/2            10
              (*, ff1e:0:0:0:0:0:0:2)   GigabitEthernet1/0/1            10            
                                        GigabitEthernet1/0/2            10 
--------------------------------------------------------------------------------
Table 8-136  Description of the display mld-snooping forwarding-table command output

Item

Description

VLAN ID

VLAN ID of the forwarding entries.

Forwarding Mode

Multicast forwarding mode in the VLAN, which can be:
  • IP
  • MAC
The multicast forwarding mode is configured using the l2-multicast forwarding-mode command.

(Source, Group)

(S, G) entry, specifying the multicast source and multicast group. The Router-port field indicates a router port.

Interface

Outbound interface.

Out-Vlan

VLAN ID of packets.

Router-port

Router port in the VLAN.

Total Group(s)

Total number of multicast forwarding entries.

display mld-snooping port-info

Function

The display mld-snooping port-info command displays information about multicast group member ports.

Format

display mld-snooping port-info [ vlan vlan-id [ group-address ipv6-group-address ] ] [ verbose ]

Parameters

Parameter

Description

Value

vlan vlan-id

Displays multicast group member ports in a specified VLAN. If this parameter is not specified, the system displays multicast group member ports in all VLANs.

The value is an integer that ranges from 1 to 4094.

group-address ipv6-group-address

Displays member ports of a specified multicast group. If this parameter is not specified, the system displays member ports of all multicast groups.

The value is an IPv6 multicast address, which is a 32-digit hexadecimal number in X:X:X:X:X:X:X:X format. The first two digits are FF.

verbose

Displays detailed information about multicast group member ports. If this parameter is not specified, the system displays the summary of multicast group member ports.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

MLD snooping creates and maintains a Layer 2 multicast forwarding table by listening on MLD messages exchanged between hosts and a Layer 3 device. The display mld-snooping port-info command shows member ports in the Layer 2 multicast forwarding table. According to the command output, you can know which downlink interfaces have multicast users connected, and control multicast services conveniently.

Precautions

This command can display member port information only when MLD snooping is enabled globally and in a VLAN using the mld-snooping enable command and the VLAN is in Up state. If interfaces in the VLAN are dynamic group member ports, the command can display information about these member port information only after they receive MLD Report messages and before their aging time expires.

Example

# Display information about multicast group member ports.

<HUAWEI> display mld-snooping port-info
--------------------------------------------------------------------------------
                             (Source, Group)  Port                          Flag
                             Flag: S:Static    D:Dynamic
--------------------------------------------------------------------------------
VLAN 10, 1 Entry(s)
                     (*, ff1e:0:0:0:0:0:0:1)  GE1/0/1                      S--
                                                          1 port(s)
--------------------------------------------------------------------------------
Table 8-137  Description of the display mld-snooping port-info command output

Item

Description

(Source, Group)

An (S, G) entry, specifying the multicast source and multicast group.

Port

Multicast group member port.

Flag

Type of a member port, which can be:
  • S: static member port, which is configured using the mld-snooping static-group command
  • D: dynamic member port learned through MLD

display mld-snooping router-port

Function

The display mld-snooping router-port command displays information about router ports, including static and dynamic router ports.

Format

display mld-snooping router-port [ vlan vlan-id ]

Parameters

Parameter

Description

Value

vlan vlan-id

Displays the router interfaces in a specified VLAN. If this parameter is not specified, the system displays router ports in all VLANs.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

A router port is a switch port connected to an upstream Layer 3 multicast device. Router ports can be statically configured or dynamically created after receiving an MLD Query message or a PIM Hello message. A router port receives multicast data packets from the upstream multicast device and forwards the packets to group member ports.

The display mld-snooping router-port command displays information about router ports, including the type, name, age, and aging time of each router port.

Precautions

This command can display router port information only when MLD snooping is enabled globally and in a VLAN using the mld-snooping enable command and the VLAN is in Up state.

Example

# Display information about router ports.

<HUAWEI> display mld-snooping router-port
 Total Number of Router Port on VLAN 2 is 1
   Port Name             UpTime          Expires         Flags
   GE1/0/1               00:00:06        --              STATIC
Table 8-138  Description of the display mld-snooping router-port command output

Item

Description

Total Number of Router Port on VLAN 2 is 1

Number of router ports in VLAN 2.

Port Name

Type and number of a router port.

UpTime

Age of a router port, that is, time that elapsed since the interface became a router port.

Expires

Aging time of the router port.
  • The aging time is displayed for a dynamic router port.
  • For a static router interface, "--" is displayed, indicating that the interface will never age out.

Flags

Type of the router port, which can be:

display mld-snooping forwarding-table statistics

Function

The display mld-snooping forwarding-table statistics command displays statistics about Layer 2 multicast forwarding entries.

Format

display mld-snooping forwarding-table statistics [ slot slot-id ]

Parameters

Parameter

Description

Value

slot slot-id

Displays entry statistics in a specified slot.

The value is an integer and must be set according to the device configuration.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After configuring MLD snooping, you can use this command to view statistics about Layer 2 multicast forwarding entries.

Example

# Display statistics about Layer 2 multicast forwarding entries.

<HUAWEI> display mld-snooping forwarding-table statistics
---------------------------------------------------------------------
0 Stream entries are calculated in statistics
1 IP entries are calculated in statistics
0 MAC entries are calculated in statistics
1 VLAN entries are calculated in statistics
0 VPLS entries are calculated in statistics
---------------------------------------------------------------------
Table 8-139  Description of the display mld-snooping forwarding-table statistics command output

Item

Description

Stream entries are calculated in statistics

Number of unknown stream entries in a VLAN.

IP entries are calculated in statistics

Number of entries for IP address-based forwarding in a VLAN.

MAC entries are calculated in statistics

Number of entries for MAC address-based forwarding in a VLAN.

VLAN entries are calculated in statistics

Number of entries for IP address-based and MAC address-based forwarding in a VLAN.

VPLS entries are calculated in statistics

Number of entries for MAC address-based forwarding on a VPLS network.

display mld-snooping statistics

Function

The display mld-snooping statistics command displays MLD snooping statistics.

Format

display mld-snooping statistics [ vlan vlan-id ]

Parameters

Parameter

Description

Value

vlan vlan-id

Displays MLD snooping statistics in a specified VLAN. If this parameter is not specified, the system displays MLD snooping statistics in all VLANs.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After completing MLD snooping configuration, you can use the display mld-snooping statistics command to view MLD snooping statistics, including the number of MLD messages sent, number of MLD messages received, number of PIM Hello messages received in each VLAN, and number of Layer 2 events that have occurred in all VLANs. Layer 2 events include changes in interface status, changes in VLAN status, changes in VLAN member interfaces (interfaces join or leave VLANs), and MSTP events. When a multicast fault occurs, the MLD snooping statistics help you identify the cause of the fault.

Precautions

This command displays information only when global MLD snooping is enabled using the mld-snooping enable command.

Example

# Display MLD snooping statistics in all VLANs.

<HUAWEI> display mld-snooping statistics
MLD Snooping Events Counter
     Recv VLAN Up Event Times      1027
     Recv VLAN Down Event Times    5
     Recv VLAN Del Event Times     0
     Recv Port Up Event Times      12
     Recv Port Down Event Times    12
     Recv Port Del Event Times     0
     Recv Port Inc Event Times     3069
     Recv Port Exc Event Times     1023
     Recv MSTP Block Event Times   7
     Recv MSTP Forward Event Times 7
     Recv LINK Change Event Times  0
 MLD Snooping Packets Counter
   Statistics for VLAN 10
     Recv V1 Report 16
     Recv V2 Report 8768
     Recv V1 Query  0
     Recv V2 Query  2243
     Recv Done     215
     Recv Pim Hello 0
     Send Query(S=0) 0
     Send Query(S!=0)0
     Send General Query               0
     Send Group-Specific Query        0
     Send Group-Source-Specific Query 0

# Display MLD snooping in VLAN 20.

<HUAWEI> display mld-snooping statistics vlan 20
 MLD Snooping Packets Counter
   Statistics for VLAN 20
     Recv V1 Report  0
     Recv V2 Report  0
     Recv V1 Query   0
     Recv V2 Query   0
     Recv Done       0
     Recv Pim Hello  0
     Send Query(S=0) 0
     Send Query(S!=0)0
     Send General Query               0
     Send Group-Specific Query        0
     Send Group-Source-Specific Query 0
Table 8-140  Description of the display mld-snooping statistics command output

Item

Description

MLD Snooping Events Counter

Statistics about MLD snooping events.

Recv VLAN Up Event Times

Number of VLAN Up events.

Recv VLAN Down Event Times

Number of VLAN Down events.

Recv VLAN Del Event Times

Number of VLAN deletion events.

Recv Port Up Event Times

Number of interface Up events.

Recv Port Down Event Times

Number of interface Down events.

Recv Port Del Event Times

Number of interface deletion events.

Recv Port Inc Event Times

Number of times interfaces join VLANs.

Recv Port Exc Event Times

Number of times interfaces leave VLANs.

Recv MSTP Block Event Times

Number of times static groups fail to be created on interfaces that are blocked by MSTP and cannot forward multicast packets.

Recv MSTP Forward Event Times

Number of times static groups are successfully created on interfaces that are in MSTP forwarding state and can forward multicast packets normally.

Recv LINK Change Event Times

Number of link change events.

MLD Snooping Packets Counter

Statistics about MLD snooping packets.

Statistics for VLAN 10

Packet statistics in VLAN 10.

Recv V1 Report

Number of MLDv1 Report messages received.

Recv V2 Report

Number of MLDv2 Report messages received.

Recv V1 Query

Number of MLDv1 Query messages received.

Recv V2 Query

Number of MLDv2 Query messages received.

Recv Done

Number of MLD Leave messages received.

Recv Pim Hello

Number of PIM Hello messages received.

Send Query(S=0)

Number of MLD Query messages sent with the source address of ::.

Send Query(S!=0)

Number of MLD Query messages with sent source addresses other than ::.

Send General Query

Number of General Query messages sent.

Send Group-Specific Query

Number of Group-Specific Query messages sent.

Send Group-Source-Specific Query

Number of Group-Source-Specific Query messages sent.

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.

Format

l2-multicast forwarding-mode { ip | mac }

undo l2-multicast forwarding-mode mac

Parameters

Parameter Description Value
ip

Forwards multicast data based on IP addresses.

-
mac

Forwards multicast data based on MAC addresses.

-

Views

VLAN view

Default Level

2: Configuration level

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 require the multicast data. To prevent this problem, use the IP address-based forwarding mode on devices with Layer 3 functions.

Configuration Impact

When the Layer 2 multicast forwarding mode is set to MAC address-based forwarding in a VLAN:
  • 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.
  • The VLAN cannot be configured as a multicast VLAN.

Precautions

This command can only be used in VLANs with Layer 2 multicast snooping disabled. After running this command in a VLAN, enable Layer 2 multicast snooping in the VLAN for the configuration to take effect.

Example

# After IGMP snooping is enabled globally, configure the switch to forward multicast data in VLAN 100 based on MAC addresses.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 100
[HUAWEI-vlan100] l2-multicast forwarding-mode mac
[HUAWEI-vlan100] igmp-snooping enable

# After MLD snooping is enabled globally, configure the switch to forward multicast data in VLAN 100 based on MAC addresses.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 100
[HUAWEI-vlan100] l2-multicast forwarding-mode mac
[HUAWEI-vlan100] mld-snooping enable

l2-multicast router-port-discard

Function

The l2-multicast router-port-discard command disables the switch from sending multicast data to router ports in a VLAN.

The undo l2-multicast router-port-discard command restores the default configuration.

By default, multicast data can be forwarded to router ports in a VLAN.

Format

l2-multicast router-port-discard

undo l2-multicast router-port-discard

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In some scenarios, multicast data does not need to be forwarded to router ports in a VLAN. For example, when all interfaces on a switch are configured as static router ports in a VLAN, you can use this command to conserve bandwidth by preventing multicast data from being sent to these interfaces.

Precautions

This command can only be used in VLANs with Layer 2 multicast snooping disabled. After running this command in a VLAN, enable Layer 2 multicast snooping in the VLAN for the configuration to take effect.

Example

# Disable the switch from forwarding multicast data to router ports in VLAN 10 on an IPv4 network.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 10
[HUAWEI-vlan10] l2-multicast router-port-discard
[HUAWEI-vlan10] igmp-snooping enable

# Disable the switch from forwarding multicast data to router ports in VLAN 10 on an IPv6 network.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 10
[HUAWEI-vlan10] l2-multicast router-port-discard
[HUAWEI-vlan10] mld-snooping enable

mld-snooping enable

Function

The mld-snooping enable command enables MLD snooping globally or in a VLAN.

The undo mld-snooping enable command disables MLD snooping globally or in a VLAN.

By default, MLD snooping is disabled.

Format

# System view

mld-snooping enable [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]

undo mld-snooping enable [ vlan { all | { vlan-id1 [ to vlan-id2 ] } &<1-10> } ]

# VLAN view

mld-snooping enable

undo mld-snooping enable

Parameters

Parameter

Description

Value

vlan vlan-id1 [ to vlan-id2 ]

Disables MLD snooping on the specified VLANs. vlan-id1 and vlan-id2 identify a range of VLANs.

If VLAN IDs are specified, MLD snooping is enabled in the specified VLANs. If no VLAN ID is specified, MLD snooping is enabled globally.

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

Disables MLD snooping on all VLANs.

-

Views

System view, VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MLD snooping runs on a Layer 2 device between a Layer 3 multicast device and hosts, and listens on multicast protocol packets exchanged between the Layer 3 device and hosts to maintain a Layer 2 multicast forwarding table. The Layer 2 device manages and controls Layer 2 multicast forwarding based on this forwarding table.

Before configuring MLD snooping, enable global MLD snooping using the mld-snooping enable command in the system view. Other MLD snooping configuration commands can be used only after global MLD snooping is enabled.

You can enable MLD snooping in multiple VLANs by using the mld-snooping enable command in the system view.

Precautions

After MLD snooping is enabled in a VLAN, IPv6 Layer 3 multicast cannot be configured on the corresponding VLANIF interface. To use the two functions simultaneously, configure IPv6 Layer 3 multicast on the VLANIF interface before enabling MLD snooping in the VLAN.

After you run the undo mld-snooping enable command to disable global MLD snooping, all MLD snooping configurations on the switch are deleted. After you run the mld-snooping enable command to enable global MLD snooping again, the switch uses the default MLD snooping configuration.

Example

# Enable global MLD snooping.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable

# Enable MLD snooping in multiple VLANs in the system view.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] mld-snooping enable vlan 2 to 10
# Enable MLD snooping in VLAN 10.
<HUAWEI> system-view
[HUAWEI] vlan 10
[HUAWEI-vlan10] mld-snooping enable

mld-snooping group-policy (interface view)

Function

The mld-snooping group-policy command configures an IPv6 multicast group policy on an interface.

The undo mld-snooping group-policy command deletes an IPv6 multicast group policy from an interface.

By default, no IPv6 multicast group policy is available on an interface, and hosts connected to the interface can join any IPv6 multicast group.

Format

mld-snooping group-policy acl6-number vlan vlan-id [ version mld-version ]

undo mld-snooping group-policy [ acl6-number ] vlan vlan-id

Parameters

Parameter

Description

Value

acl6-number

Specifies the number of an IPv6 ACL that defines a range of multicast groups. A basic or advanced ACL can be used in an IPv6 multicast group policy.

The value is an integer that ranges from 2000 to 3999.

vlan vlan-id

Applies the IPv6 multicast group policy to a specified VLAN on an interface.

The value is an integer that ranges from 1 to 4094.

version mld-version

Specifies an MLD version. The multicast group policy is applied only to the MLD messages of this version. If this parameter is not specified, the multicast group policy applies to all MLD messages.

The value is 1 or 2.
  • 1: MLDv1
  • 2: MLDv2

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An IPv6 multicast group policy controls the multicast programs that users can order on a Layer 2 device with MLD snooping enabled. When a user orders a multicast program, the user host sends a Report message, requesting to join the multicast group. When the Layer 2 device receives the message, it checks whether the multicast group matches the multicast group policy applied to the interface. If the Report messages match the filter rule, the Layer 2 device allows the hosts in the VLAN to join the group and forwards the Report messages. If the Report messages do not match the filter rule, the Layer 2 device prevents the hosts from joining the group and drops the Report messages.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

The configured multicast group policy takes effect only when all the following conditions are met:
  • The interface has been added to the specified VLAN.

  • MLD snooping is enabled in the VLAN using the mld-snooping enable command.
  • The ACL specified in the command has been created and had filtering rules configured.

An IPv6 multicast group policy can also be configured in the VLAN view (using the mld-snooping group-policy (VLAN view) command) to control the multicast groups that users in the VLAN can join. An IPv6 multicast group policy configured in the interface view controls the multicast groups that users in one or more VLANs on the interface can join. If you configure multicast group policies for the same VLAN in the interface view and VLAN view, the system first uses the policy configured in the interface view and then the policy configured in the VLAN view to determine the groups that user hosts can join.

Example

# Allow hosts in VLAN 10 connected to GE1/0/1 to join IPv6 multicast group ff1c::3/32.
<HUAWEI> system-view
[HUAWEI] acl ipv6 number 2000
[HUAWEI-acl6-basic-2000] rule permit source ff1c::3/32
[HUAWEI-acl6-basic-2000] quit
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 10
[HUAWEI-vlan10] mld-snooping enable
[HUAWEI-vlan10] quit
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type trunk
[HUAWEI-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
[HUAWEI-GigabitEthernet1/0/1] mld-snooping group-policy 2000 vlan 10

mld-snooping group-policy (VLAN view)

Function

The mld-snooping group-policy command configures an IPv6 multicast group policy in a VLAN.

The undo mld-snooping group-policy command deletes an IPv6 multicast group policy from a VLAN.

By default, no IPv6 multicast group policy is available in a VLAN, and hosts in the VLAN can join any IPv6 multicast group.

Format

mld-snooping group-policy acl6-number [ version mld-version ]

undo mld-snooping group-policy

Parameters

Parameter

Description

Value

acl6-number

Specifies the number of an IPv6 ACL that defines a range of multicast groups. A basic or advanced ACL can be used in an IPv6 multicast group policy.

The value is an integer that ranges from 2000 to 3999.

mld-version

Applies the multicast group policy only to the MLD messages of the specified version. If this parameter is not specified, the multicast group policy applies to all MLD messages.

The value is 1 or 2.
  • 1: MLDv1
  • 2: MLDv2

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An IPv6 multicast group policy controls the multicast programs that users can order on a Layer 2 device with MLD snooping enabled. When a user orders a multicast program, the user host sends a Report message, requesting to join the multicast group. When the Layer 2 device receives the message, it checks whether the multicast group matches the multicast group policy applied to the VLAN. If the Report messages match the filter rule, the Layer 2 device allows the hosts in the VLAN to join the group and forwards the Report messages. If the Report messages do not match the filter rule, the Layer 2 device prevents the hosts from joining the group and drops the Report messages.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

The configured multicast group policy takes effect only when both the following conditions are met:
  • MLD snooping is enabled in the VLAN using the mld-snooping enable command.
  • The ACL specified in the command has been created and had filtering rules configured.

An IPv6 multicast group policy can also be configured in the interface view using the mld-snooping group-policy (interface view) command to control the multicast groups that users in one or more VLANs on the interface can join. An IPv6 multicast group policy configured in the interface view controls the multicast groups that users in one or more VLANs on the interface can join. If you configure multicast group policies for the same VLAN in the interface view and VLAN view, the system first uses the policy configured in the interface view and then the policy configured in the VLAN view to determine the groups that user hosts can join.

Example

# Allow hosts in VLAN 4 to join IPv6 multicast group ff1e::1/32.
<HUAWEI> system-view
[HUAWEI] acl ipv6 number 2001
[HUAWEI-acl6-basic-2001] rule permit source ff1e::1/32
[HUAWEI-acl6-basic-2001] quit
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 4
[HUAWEI-vlan4] mld-snooping enable
[HUAWEI-vlan4] mld-snooping group-policy 2001

mld-snooping last-listener-query-interval

Function

The mld-snooping last-listener-query-interval command sets the last listener query interval, that is, the interval at which Multicast-Address-Specific Query messages are sent in MLD snooping.

The undo mld-snooping last-listener-query-interval command restores the default interval.

By default, the last listener query interval is 1 second.

Format

mld-snooping last-listener-query-interval query-interval

undo mld-snooping last-listener-query-interval

Parameters

Parameter

Description

Value

query-interval

Specifies interval at which Multicast-Address-Specific Query messages are sent.

The value ranges from 1 to 5, in seconds.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By configuring the last listener query interval, you can:

  • Adjust the interval at which the querier sends Multicast-Address-Specific Query messages.

    When MLD snooping querier is enabled, you can use the mld-snooping last-listener-query-interval command to set the interval at which the querier sends Multicast-Address-Specific Query messages.

  • Change the aging time of member ports.

    When a Layer 2 device receives an MLD Done message from a host, it starts an aging timer for the corresponding member port. The aging time is calculated using the following formula: Aging time = Last listener query interval x Last listener query count. This command sets the last listener query interval in the formula. The last listener query count is set by the mld-snooping robust-count command.

    If the querier receives Report messages from other hosts within the aging time, it continues to maintain the memberships of the multicast group. If the querier does not receive any Report messages within the aging time, it stops maintaining memberships of the multicast group.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

The querier sets the maximum response time field in the Multicast-Address-Specific Query messages to the configured last listener query interval. Therefore, the maximum response time for Multicast-Address-Specific Query messages is the same as the interval at which Multicast-Address-Specific Query messages are sent.

The configuration takes effect only when both the following conditions are met:

Example

# Set the last listener query interval to 2 seconds in VLAN 4.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 4
[HUAWEI-vlan4] mld-snooping enable
[HUAWEI-vlan4] mld-snooping last-listener-query-interval 2

mld-snooping learning

Function

The mld-snooping learning command enables learning of multicast group memberships on an interface.

The undo mld-snooping learning command disables learning of multicast group memberships on an interface.

By default, learning of multicast group memberships is enabled on an interface.

Format

mld-snooping learning vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

undo mld-snooping learning vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

Parameters

Parameter

Description

Value

vlan { vlan-id1 [to vlan-id2 ] }

Enables learning of multicast group memberships in specified VLANs. The interface must have been added to the specified VLAN.

vlan-id1 [ to vlan-id2 ] specifies the range of VLAN IDs.
  • vlan-id1: specifies the first VLAN ID.
  • vlan-id2: specifies the last VLAN ID. If to vlan-id2 is not specified, learning of multicast group memberships is enabled only in the VLAN specified by vlan-id1.

The values of vlan-id1 and vlan-id2 are integers that range from 1 to 4094.

The value of vlan-id2 must be greater than the value of vlan-id1. The vlan-id1 and vlan-id2 parameters identify a range of VLANs.

all

Enables learning of multicast group memberships in all VLANs that an interface has joined.

-

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A group member interface is a user-side interface that connects to multicast group members. Group memberships can be learned dynamically or configured statically. After MLD snooping is enabled in a VLAN, all interfaces in the VLAN are enabled to learn forwarding entries from multicast packets. An interface is identified as a dynamic group member interface when it receives an MLD Report message.

Prerequisites

mld snooping has been enabled globally using the mld-snooping enable command.

Precautions

The configuration takes effect only when all the following conditions are met:
  • mld snooping is enabled in the VLAN using the mld-snooping enable command.
  • The interface belongs to the specified VLANs.

An interface can be statically bound to a multicast group using the mld-snooping static-group command. Then you can run the undo mld-snooping learning command on the interface to disable learning of group memberships. This reduces the system resources used for protocol packet exchange.

Example

# Disable learning of group memberships in VLAN 3 and VLAN 4 on GE1/0/1.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] quit
[HUAWEI] vlan 4
[HUAWEI-vlan4] mld-snooping enable
[HUAWEI-vlan4] quit
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type trunk
[HUAWEI-GigabitEthernet1/0/1] port trunk allow-pass vlan 3 to 4
[HUAWEI-GigabitEthernet1/0/1] undo mld-snooping learning vlan 3 to 4
Related Topics

mld-snooping max-response-time

Function

The mld-snooping max-response-time command sets the maximum response time for MLD General Query messages in a VLAN.

The undo mld-snooping max-response-time command restores the maximum response time for MLD General Query messages in a VLAN to the default value.

By default, the maximum response time for MLD Listener Query messages is 10 seconds.

Format

mld-snooping max-response-time max-response-time

undo mld-snooping max-response-time

Parameters

Parameter

Description

Value

max-response-time

Specifies the maximum response time for General Query messages.

The value is an integer that ranges from 1 to 25, in seconds. The default value is 10.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Setting MLD snooping parameters helps improve the multicast forwarding performance on the switch. By setting the maximum response time for MLD General messages, you can:

  • Control the deadline for a host to send a Report message. When hosts are required to respond to Query messages quickly, set a short maximum response time. To avoid congestion caused by a large number of Report messages sent by hosts, set a long maximum response time.
  • Adjust the aging time of member ports. When the switch receives a Report message from a host, it starts the aging timer for the corresponding member port. The aging time is calculated using the following formula: Aging time = General query count x General query interval + Maximum response time for General Query messages. This command sets the maximum response time in the formula. The number of times General Query messages are sent is set by the mld-snooping robust-count command, and the general query interval is set by the mld-snooping query-interval command.

The switch sets the maximum response time field in General Query messages to the value configured by the mld-snooping max-response-time command.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Follow-up Procedure

Perform the following operations to improve multicast performance:

Precautions

To make the configured maximum response time effective in a VLAN, run the mld-snooping enable command to enable MLD snooping in the VLAN.

The interval at which General Query messages are sent must be longer than the maximum response time for General Query messages. Otherwise, the switch will delete multicast memberships that should not be deleted.

Example

# Set the maximum response time for General Query messages in VLAN 3 to 20 seconds.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] mld-snooping max-response-time 20

mld-snooping prompt-leave

Function

The mld-snooping prompt-leave command enables the fast leave function in a VLAN so that member ports in the VLAN can fast leave multicast groups.

The undo mld-snooping prompt-leave command disables the fast leave function in a VLAN.

By default, the fast leave function is disabled in a VLAN.

Format

mld-snooping prompt-leave [ group-policy acl6-number ]

undo mld-snooping prompt-leave

Parameters

Parameter

Description

Value

group-policy acl6-number

Allows member ports to fast leave the multicast groups matching an ACL6. acl6-number specifies the number of an ACL6. A basic or advanced ACL6 can be used.

The value is an integer that ranges from 2000 to 3999.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The fast leave function enables the switch to delete the multicast forwarding entry of a multicast group from an interface immediately after the interface receives a Done message for the group. This function saves bandwidth and system resources because the switch does not need to wait until the aging timer of the interface expires.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

When an interface has more than one receiver connected, enabling the fast leave function interrupts multicast traffic of the other receivers in the multicast group. It is recommended that you enable this function only on interfaces with one receiver.

The configuration takes effect only when both the following conditions are met:
  • MLD snooping is enabled in the VLAN using the mld-snooping enable command.
  • If you do not specify group-policy when configuring the fast leave function, this function takes effect for all groups. To specify a group policy in the command, create an ACL and configure rules for the ACL before running the command. For details about ACL configuration commands, see ACL Configuration Commands in "Security Commands."

Example

# Allow member ports in VLAN 2 to fast leave all multicast groups.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] mld-snooping enable
[HUAWEI-vlan2] mld-snooping prompt-leave

# Allow member ports in VLAN 3 to fast leave multicast group 0xff13::0001:0002.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] acl ipv6 number 2000
[HUAWEI-acl6-basic-2000] rule permit source ff13::0001:0002 128
[HUAWEI-acl6-basic-2000] quit
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] mld-snooping prompt-leave group-policy 2000

mld-snooping proxy

Function

The mld-snooping proxy command enables Multicast Listener Discovery (MLD) snooping proxy in a VLAN.

The undo mld-snooping proxy command disables MLD snooping proxy in a VLAN.

By default, MLD snooping proxy is disabled in a VLAN.

Format

mld-snooping proxy

undo mld-snooping proxy

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After MLD snooping is enabled, the switch forwards Report messages to router ports and broadcasts Query messages in a VLAN. The MLD snooping proxy function allows the switch to send Query messages in place of the upstream Layer 3 device and send Report/Done messages in place of downstream hosts. This saves the bandwidth on the link between the Layer 3 device and switch. The switch sends a Report/Done message to the upstream Layer 3 device only in the following situations:
  • When the first member joins a multicast group or a host sends a Report message in response to an MLD Query message, the Layer 2 device forwards a Report message to the upstream device. The upstream device can create or maintain the matching forwarding entry based on the Report message.
  • When the last member of a multicast group leaves the group, the Layer 2 device forwards a Done message to the upstream device. The upstream device then deletes the matching forwarding entry.

An upstream Layer 3 device does not send Query messages as a querier when MLD is not enabled for some reasons, for example, the Layer 3 device has only static multicast groups. In this case, the switch cannot create or maintain group memberships even though MLD snooping is enabled. The MLD snooping proxy function enables the switch to send Query messages to downstream hosts. For the hosts, the switch is a querier.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Configuration Impact

If MLD is enabled on the upstream Layer 3 device, enabling the MLD snooping proxy function on the switch may affect the querier election result. This is because the General Query messages sent by the switch may have a smaller source IP address than the General Query messages sent by the Layer 3 device. Therefore, MLD snooping proxy is not recommended on an MLD-capable multicast network.

Precautions

  • The configuration takes effect only after you run the mld-snooping enable command to enable MLD snooping in the VLAN.

  • MLD snooping proxy cannot be enabled in a VLAN if the corresponding VLANIF interface has IPv6 Layer 3 multicast function (such as MLD and IPv6 PIM) enabled.

  • After MLD snooping proxy is enabled in a VLAN, MLD snooping querier and MLD message suppression cannot be enabled in the VLAN.

  • If multicast VLAN replication is configured on the switch, the MLD snooping proxy function cannot be enabled in user VLANs.

Example

# Enable MLD snooping proxy in VLAN 100.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 100
[HUAWEI-vlan100] mld-snooping enable
[HUAWEI-vlan100] mld-snooping proxy

mld-snooping querier enable

Function

The mld-snooping querier enable command enables the MLD snooping querier in a VLAN.

The undo mld-snooping querier enable command disables the MLD snooping querier in a VLAN.

By default, the MLD snooping querier is disabled in a VLAN.

Format

mld-snooping querier enable

undo mld-snooping querier enable

Parameters

None.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On an MLD-capable network, a Layer 3 multicast device functions as the querier to send MLD Query messages and maintain group memberships on the local network segment. If the Layer 3 multicast device does not run MLD or it uses only static multicast forwarding entries, it cannot function as a querier. You can enable MLD snooping querier on the downstream Layer 2 device so that the device can act as a querier to send MLD Query messages.

On a Layer 2 network that has no Layer 3 devices, multicast sources are connected to Layer 2 devices. MLD snooping querier needs to be enabled on the Layer 2 devices so that they can maintain multicast group memberships.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Follow-up Procedure

Perform the following operations as required on your network:

Configuration Impact

The MLD snooping querier does not participate in MLD querier election. However, the MLD snooping querier on an MLD-capable multicast network may affect the election result, because the Query messages sent by the MLD snooping querier may have a smaller source IP address than the Query messages sent by other devices. Therefore, the MLD snooping querier function is not recommended on an MLD-enabled multicast network.

Precautions

  • The configuration takes effect only after you run the mld-snooping_enable command to enable MLD snooping in the VLAN.

  • The MLD snooping querier function cannot be enabled in a VLAN if the corresponding VLANIF interface has IPv6 Layer 3 multicast function (such as MLD and IPv6 PIM) enabled.

  • The MLD snooping querier function and MLD snooping proxy cannot be enabled in the same VLAN.

  • If multicast VLAN replication is configured, the MLD snooping querier function cannot be enabled in user VLANs.

Example

# Enable the MLD snooping querier in VLAN 3.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] mld-snooping querier enable

mld-snooping query-interval

Function

The mld-snooping query-interval command sets the general query interval in a VLAN, that is, the interval at which MLD General Query messages are sent in the VLAN.

The undo mld-snooping query-interval command restores the default general query interval in a VLAN.

By default, MLD General Query messages are sent at an interval of 60 seconds.

Format

mld-snooping query-interval query-interval

undo mld-snooping query-interval

Parameters

Parameter

Description

Value

query-interval

Specifies the interval at which General Query messages are sent.

The value is an integer that ranges from 10 to 65535, in seconds.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By setting the MLD general query interval, you can:

  • Specify the interval at which the querier sends MLD General Query messages.

    When the querier function is enabled in a VLAN, you can use this command to set the general query interval. Then the querier sends General Query messages at the configured interval to maintain group memberships. The querier is more sensitive when it sends General Query messages at a smaller interval, but more bandwidth and resources are consumed.

  • Change the aging time of member ports.

    When receiving an MLD Report message from a host, the switch starts the aging timer for the corresponding member port. The aging time is calculated using the following formula: Aging time = General query count x General query interval + Maximum response time for General Query messages. The mld-snooping query-interval command sets the general query interval. The general query count is set by the mld-snooping robust-count command, and the maximum response time for General Query messages is set by the mld-snooping max-response-time command.

NOTE:

The default general query interval defined in RFC documents is 125 seconds, but some vendors define their own default general query intervals. It is recommended that all devices on a multicast network use the same general query intervals (including MLD and MLD snooping general query intervals). On Huawei modular switches, the default value of the MLD general query interval is 125 seconds, and the default value of the MLD snooping general query interval is 60 seconds.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

The configuration takes effect only after you run the mld-snooping_enable command to enable MLD snooping in the VLAN.

Use this command only when the switch can send MLD Query message. The switch can send MLD Query messages only when MLD snooping proxy is enabled using the mld-snooping proxy command, or MLD snooping querier is enabled using the mld-snooping querier enable command.

The interval at which General Query messages are sent must be longer than the maximum response time for General Query messages. Otherwise, the switch will delete multicast memberships that should not be deleted.

Example

# Set the general MLD query interval in VLAN 3 to 100 seconds.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] mld-snooping query-interval 100

mld-snooping report-suppress

Function

The mld-snooping report-suppress command enables suppression of MLD Report and Done messages in a VLAN.

The undo mld-snooping report-suppress command disables suppression of MLD Report and Done messages in a VLAN.

By default, MLD Report and Done message suppression is disabled in a VLAN.

Format

mld-snooping report-suppress

undo mld-snooping report-suppress

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a Layer 2 device receives an MLD Membership Report message (Report or Done message) from a group member, the Layer 2 device forwards the message to the directly connected Layer 3 device. A group member host sends a Membership Report message in the following situations:
  • When joining a multicast group, a host sends a Report message. When a multicast group has multiple members in a VLAN, the Layer 3 device receives duplicate Report messages from the member hosts.
  • When receiving an MLD General Query message, a host sends a Report message. Hosts use a timer to suppress duplicate Report messages on the same network segment. However, if the timer values on hosts are the same, the Layer 3 device can still receive duplicate Report messages.
  • When leaving a multicast group, a host sends a Done message. When a multicast group has multiple members in a VLAN, the Layer 3 device receives duplicate Done messages from the member hosts.

When MLD Report suppression is configured on the Layer 2 device, the Layer 2 device sends only one copy of MLD Report message when members join or leave a group. When the first member joins a multicast group or a host sends a Report message in response to a Query message, the Layer 2 device forwards a Report message to the upstream device. The upstream device can create or maintain the matching forwarding entry based on the Report message. When the last member of a multicast group leaves the group, the Layer 2 device forwards a Done message to the upstream device. The upstream device then deletes the matching forwarding entry. This reduces the number of MLD messages on the network.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping_enable command.

Precautions

  • The configuration takes effect only after you run the mld-snooping_enable command to enable MLD snooping in the VLAN.

  • When receiving a Done message from a group member, the device sends Group-Specific Query messages to check whether the group has other members on the network segment.

  • MLD Report message suppression cannot be configured in a VLAN if the corresponding VLANIF interface has IPv6 Layer 3 multicast function (such as MLD and IPv6 PIM) enabled.

  • MLD snooping proxy and MLD Report message suppression cannot be configured in the same VLAN.

  • If multicast VLAN replication is configured, the MLD message suppression function cannot be enabled in user VLANs.

  • The switch can suppress duplicate Report messages even when MLD message suppression is disabled. The default suppression time is 10 seconds. To change the suppression time, run the mld-snooping suppression-time suppression-time command. If suppression-time is set to 0, all membership packets are forwarded immediately.
  • This function cannot suppress MLDv2 packets.

Example

# Enable suppression of Report and Done messages in VLAN 2.

<HUAWEI>system view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] mld-snooping enable
[HUAWEI-vlan2] mld-snooping report-suppress

mld-snooping require-router-alert

Function

The mld-snooping require-router-alert command configures the switch to check the received MLD messages for the Router-Alert option and discard the MLD messages without the Router-Alert option.

The undo mld-snooping require-router-alert command restores the default configuration.

By default, the switch processes the received MLD messages regardless of whether the messages contain the Router-Alert option.

Format

mld-snooping require-router-alert

undo mld-snooping require-router-alert

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The Router-Alert option identifies the protocol messages that need to be processed by upper-layer routing protocols.

By default, the switch does not check whether MLD messages contain the Router-Alert option and sends all the MLD messages to the upper-layer routing protocol. After the mld-snooping require-router-alert command is executed, the switch checks each MLD message for the Router-Alert option and discards those MLD messages without this option. This improves device performance, reduces cost, and enhances security of the upper-layer routing protocol.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

If MLD snooping is disabled in the specified VLAN, the configuration succeeds but does not take effect until MLD snooping is enabled in the VLAN. To enable MLD snooping in a VLAN, run the mld-snooping enable command in the VLAN view.

Example

# Configure the switch to accept only MLD messages with the Router-Alert option in VLAN 3.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] mld-snooping require-router-alert

mld-snooping robust-count

Function

The mld-snooping robust-count command sets the MLD robustness variable in a VLAN.

The undo mld-snooping robust-count command restores the default MLD robustness variable in a VLAN.

By default, the MLD robustness variable in a VLAN is 2.

Format

mld-snooping robust-count robust-count

undo mld-snooping robust-count

Parameters

Parameter

Description

Value

robust-count

Specifies the MLD robustness variable.

The value is an integer that ranges from 2 to 5.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Setting MLD snooping parameters helps improve the multicast forwarding performance. By setting the MLD robustness variable, you can:

  • Set the last listener query count for the querier to prevent packet loss.

    When receiving an MLD Done message of a multicast group, the querier sends Multicast-Address-Specific Query messages a certain number of times specified by the robustness variable to check whether the multicast has members. If the quality of transmission links is low, increase the MLD robustness variable.

  • Change the aging time of member ports.

    When receiving an MLD Report message from a host, the switch starts the aging timer for the corresponding member port. The aging time is calculated using the following formula: Aging time = MLD robustness variable x General query interval + Maximum response time for General Query messages. The mld-snooping robust-count command sets the MLD robustness variable.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Follow-up Procedure

Perform the following operations to optimize multicast service performance:

Precautions

The configuration takes effect only after you run the mld-snooping_enable command to enable MLD snooping in the VLAN.

Example

# Set the robustness variable to 5 in VLAN 3.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] mld-snooping robust-count 5

mld-snooping router-aging-time

Function

The mld-snooping router-aging-time command sets the aging time of dynamic router ports in a VLAN.

The undo mld-snooping router-aging-time command restores the default aging time of dynamic router ports in a VLAN.

By default, the aging time of dynamic router ports in a VLAN is 180 seconds or equal to the holdtime value contained in PIM Hello messages.

Format

mld-snooping router-aging-time router-aging-time

undo mld-snooping router-aging-time

Parameters

Parameter

Description

Value

router-aging-time

Indicates the aging time of a router port.

The value is an integer that ranges from 1 to 1000, in seconds.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a short-term congestion occurs on a network, it takes a longer time to transmit Query messages from the MLD querier to a Layer 2 device. If a router port on the Layer 2 device ages out within this period, the Layer 2 device does not send Report or Done messages to the router port. As a result, multicast data forwarding may be interrupted. To solve this problem, set a longer aging time for router ports if the network is unstable.

When a dynamic router port receives an MLD Query message or PIM Hello message, the Layer 2 device sets the aging time of the router port as follows:
  • If the router port receives an MLD Query message, the Layer 2 device sets the aging time of the router port to the configured value.
  • If the router port receives a PIM Hello packet, the Layer 2 device sets the aging time of the router port to the Holdtime value contained in the PIM Hello packet.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

The configuration takes effect only after you run the mld-snooping_enable command to enable MLD snooping in the VLAN.

If the aging time of a router port is too short, the router port ages frequently, degrading system performance.

Example

# Set the aging time of router ports in VLAN 3 to 300 seconds.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] mld-snooping router-aging-time 300

mld-snooping router-learning

Function

The mld-snooping router-learning command enables router port learning in a VLAN.

The undo mld-snooping router-learning command disables router port learning in a VLAN.

By default, router port learning is enabled in a VLAN.

Format

mld-snooping router-learning vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

undo mld-snooping router-learning vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

Parameters

Parameter

Description

Value

vlan vlan-id1 [ to vlan-id2 ]

Enables an interface to function as a router port in the specified VLANs.

vlan-id1 and vlan-id2 are integers that range from 1 to 4094.

all

Enables an interface to function as a router port in all the VLANs.

-

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A router port is located on a Layer 2 device and connects to an upstream Layer 3 device (a multicast router or Layer 3 switch). A switch running MLD snooping considers an interface as a router port when the interface receives an MLD General Query message with any source IP address except 0.0.0.0 or a PIM Hello message. A router port provides the following functions:

  • Receives multicast data from the upstream device.
  • Forwards MLD Report/Done messages. MLD Report/Done messages received in a VLAN are forwarded only to router ports in the VLAN.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Follow-up Procedure

The switch does not listen on MLD Query messages in a VLAN after router port learning is disabled in the VLAN. To ensure normal multicast forwarding in the VLAN, run the mld-snooping static-router-port command to configure a static router port.

Precautions

This command takes effect only when the interface has been added to the specified VLANs and MLD snooping has been enabled in these VLANs using the mld-snooping enable command.

Example

# Disable router port learning on GE1/0/1 in VLAN 10.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 10
[HUAWEI-vlan10] mld-snooping enable
[HUAWEI-vlan10] quit
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] undo mld-snooping router-learning vlan 10

mld-snooping send-query enable

Function

The mld-snooping send-query enable command enables the switch to send MLD General Query messages to non-router ports when receiving Layer 2 topology change events.

The undo mld-snooping send-query enable command disables the switch from sending MLD General Query messages when receiving Layer 2 topology change events.

By default, the switch does not send MLD General Query messages when receiving Layer 2 topology change events.

Format

mld-snooping send-query enable

undo mld-snooping send-query enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the network topology changes, the switch receives a topology change event. By default, the switch does not send MLD General Query messages in this case. The network topology change triggers recalculation of the ring network protocol used (such as STP, MSTP, RRPP, SEP, and Smart Link). If the switch cannot respond to the topology change immediately, multicast data traffic cannot be switched to the new path in a timely manner. The mld-snooping send-query enable command enables the switch to send MLD General Query messages to update group memberships when the network topology changes. This ensures that multicast data traffic can be switched to the new transmission path.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Follow-up Procedure

This command is used on a ring network. When the ring network topology changes, the switch sends MLD General Query messages with source IPv6 address FE80::0. When this address has been occupied by another device on the network, run the mld-snooping send-query source-address command to set the source IPv6 address to FE80::.

Precautions

Use this command only when a ring network protocol is enabled on the switch.

Example

# Enable the switch to send MLD General Query messages to non-router ports when receiving Layer 2 topology change events.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] mld-snooping send-query enable

mld-snooping send-query source-address

Function

The mld-snooping send-query source-address command sets the source IPv6 address of MLD General Query.

The undo mld-snooping send-query source-address command restores source IPv6 address of MLD General Query messages.

By default, the source IPv6 address of MLD General Query messages is FE80::.

Format

mld-snooping send-query source-address ipv6-address

undo mld-snooping send-query source-address

Parameters

Parameter

Description

Value

ipv6-address

Specifies the source IPv6 address of MLD General Query messages.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X, and the network prefix must be FE80::/64.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A Layer 2 device sends two types of MLD General Query messages:

By default, MLD General Query messages sent from a Layer 2 device use the source IPv6 address FE80::. When this IPv6 address is used by another device on the network, run the mld-snooping send-query source-address command to change the source IPv6 address of MLD General Query messages.

When multiple Layer 2 devices exist on a shared network, you can set source IPv6 addresses of MLD Query messages to identify the devices. For example, when multiple devices with different performance need to participate in querier election, you must configure a different source IPv6 address of MLD Query messages for each device.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Example

# Set the source IPv6 address of MLD General Query messages to FE80::1.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] mld-snooping send-query source-address fe80::1

mld-snooping send-router-alert

Function

The mld-snooping send-router-alert command configures the switch to send MLD messages with the Router-Alert option in the IPv6 header to a VLAN.

The undo mld-snooping send-router-alert command configures the switch to send MLD messages without the Router-Alert option to a VLAN.

By default, the MLD messages sent by the switch contain the Router-Alert option.

Format

mld-snooping send-router-alert

undo mld-snooping send-router-alert

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The Router-Alert option identifies the protocol messages that need to be processed by upper-layer routing protocols.

By default, the switch sends MLD messages with the Router-Alert option. If some devices in the same VLAN as the switch can process only the MLD messages without the Router-Alert option, use the undo igmp-snooping send-router-alert command to configure the switch to send MLD messages without the Router-Alert option.

The switch adds the Router-Alert option only to locally originated MLD messages and does not add this option to MLD messages received from other devices.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

The configuration takes effect only after you run the mld-snooping_enable command to enable MLD snooping in the VLAN.

Example

# Configure the switch to send MLD messages that do not contain the Router-Alert option in the IPv6 header to VLAN 3.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] mld-snooping enable
[HUAWEI-vlan3] undo mld-snooping send-router-alert

mld-snooping static-group

Function

The mld-snooping static-group command configures static IPv6 group memberships on an interface.

The undo mld-snooping static-group command deletes the static IPv6 group memberships on an interface.

By default, no static IPv6 group membership is configured on an interface.

Format

mld-snooping static-group group-ipv6-address [ source source-ipv6-address ] vlan vlan-id

undo mld-snooping static-group { group-ipv6-address [ source source-ipv6-address ] vlan vlan-id | all }

Parameters

Parameter

Description

Value

group-ipv6-address

Specifies the IPv6 address of a multicast group.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. An IPv6 multicast address starts with FF.

source source-ipv6-address

Specifies the IPv6 address of a multicast source.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.

vlan vlan-id

Specifies a VLAN ID.

The value is an integer that ranges from 1 to 4094.

all

Deletes all static group memberships from an interface.

-

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In addition to dynamic multicast forwarding entries generated by Layer 2 multicast protocol, 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 keep receiving multicast data of the multicast group for a long time. The interface then becomes a static member interface.

Configuring static member interfaces has the following advantages:

  • Protects the system against attacks from protocol packets.
  • Reduces the network delay by directly forwarding multicast packets based on static forwarding entries.
  • Prevents unregistered users from receiving multicast flows, improving information security and protecting service providers' interests.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

The configuration takes effect only when both the following conditions are met:
  • MLD snooping is enabled in the specified VLAN using the mld-snooping enable command.
  • The specified VLAN has been created and the interface has been added to the VLAN.

Multicast group addresses starting with FFx1 or FFx2 (x is any value) cannot be configured as static multicast group addresses.

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 mld-snooping static-group command must not be a MUX VLAN (include principal VLAN and subordinate VLAN).

Example

# Statically bind GE1/0/1 in VLAN 2 to multicast group ff1a::1.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type trunk
[HUAWEI-GigabitEthernet1/0/1] port trunk allow-pass vlan 2
[HUAWEI-GigabitEthernet1/0/1] mld-snooping static-group ff1a::1 vlan 2

mld-snooping static-router-port

Function

The mld-snooping static-router-port command configures a static router port in a VLAN.

The undo mld-snooping static-router-port command deletes a static router port in a VLAN.

By default, no static router port is configured in a VLAN.

Format

mld-snooping static-router-port vlan vlan-id

undo mld-snooping static-router-port { all | vlan vlan-id }

Parameters

Parameter

Description

Value

vlan vlan-id

Specifies a VLAN ID. This parameter specifies in which VLAN the current interface functions as a router port.

The value is an integer that ranges from 1 to 4094.

all

Disables the interface from functioning as a router port in all VLANs.

-

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When an interface needs to keep receiving or forwarding multicast data packets for a long time, configure the interface as a static router port.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

This command takes effect only when the interface is added to the specified VLAN.

Example

# Configure GE1/0/1 as a router port in VLAN 2.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] mld-snooping static-router-port vlan 2

mld-snooping suppression-time

Function

The mld-snooping suppression-time command sets the MLD message suppression time.

The undo mld-snooping suppression-time command restores the default MLD message suppression time.

By default, the MLD message suppression time is 10 seconds.

Format

mld-snooping suppression-time suppression-time

undo mld-snooping suppression-time

Parameters

Parameter

Description

Value

suppression-time

Specifies the MLD message suppression time.

The value is an integer ranging from 0 to 300, in seconds. The value 0 indicates that MLD messages are not suppressed.

Views

system view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To protect an upstream Layer 3 device from attacks and reduce the load on the Layer 3 device, a Layer 2 device can suppress duplicate MLD Report messages. The default MLD message suppression time is 10 seconds. You can change the MLD message suppression time using the mld-snooping suppression-time command.

After you set the MLD message suppression time on a Layer 2 multicast device, the device acts as follows:

  • After the Layer 2 device receives an MLD Report message, it does not forward identical MLD Report messages to the router port within the suppression time.
  • If the Layer 2 device receives an MLD General Query message or Multicast-Address-Specific Query message within the suppression time, it does not suppress the first MLD Report message sent in response to the Query message. In addition, the Layer 2 device resets the suppression timer when it receives the first MLD Report message.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

You can run this command for MLDv1 Done and MLDv2 packets, but the command does not take effect.

Example

# Set the MLD message suppression time to 15 seconds.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] mld-snooping suppression-time 15

mld-snooping table limit

Function

The mld-snooping table limit command sets the maximum number of MLD snooping entries that can be learned on an interface.

The undo mld-snooping table limit command cancels the limit on the number of MLD snooping entries that can be learned on an interface.

By default, the number of multicast entries that an interface can learn is not limited.

Format

mld-snooping table limit limit vlan vlan-id

undo mld-snooping table limit [ limit ] vlan vlan-id

Parameters

Parameter

Description

Value

limit

Specifies the maximum number of MLD snooping entries that can be learned on an interface.

The value is an integer ranging from 1 to 1024.

vlan vlan-id

Specifies a VLAN ID.

The value is an integer ranging from 1 to 4094.

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The maximum number of MLD snooping entries on an interface limits the number of programs that users on the interface can order. You can set this limit to control the multicast data traffic on an interface.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Configuration Impact

If the number of multicast entries on the interface already exceeds the configured threshold, the number of multicast entries on the interface does not change and the interface cannot learn new multicast entries.

Precautions

The configuration takes effect only after you run the mld-snooping_enable command to enable MLD snooping in the VLAN.

Example

# Set the maximum number of MLD snooping entries that can be learned on GE1/0/1 in VLAN 5 to 100. (GE1/0/1 has been added to VLAN 5, and MLD snooping has been enabled globally and in VLAN 5.)

<HUAWEI> system view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 5
[HUAWEI-vlan5] mld-snooping enable
[HUAWEI-vlan5] quit
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] mld-snooping table limit 100 vlan 5
Related Topics

mld-snooping version

Function

The mld-snooping version command sets the version of MLD messages that MLD snooping can process in a VLAN.

The undo mld-snooping version command restores the default MLD message version.

By default, MLD snooping can process only MLDv1 messages.

Format

mld-snooping version version

undo mld-snooping version

Parameters

Parameter

Description

Value

version

Specifies the version of MLD messages that MLD snooping can process.

The value is 1 or 2.
  • 1: Only MLDv1 messages can be processed.
  • 2: Both MLDv1 and MLDv2 messages can be processed.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The MLD protocol maintains group memberships between Layer 3 multicast devices and hosts. MLD has two versions: v1 and v2. This command specifies the version of MLD messages that MLD snooping can process. Generally, configure the same version on the Layer 2 device as that on the upstream Layer 3 multicast device. If MLD is not enabled on the Layer 3 multicast device, configure the MLD message version on the Layer 2 device to be later than or equal to the MLD version running on downstream hosts.

When hosts in a VLAN run different MLD versions, run the mld-snooping version command to enable the Layer 2 device to process MLD messages sent from all the hosts.

Prerequisites

MLD snooping has been enabled globally using the mld-snooping enable command.

Precautions

If multicast forwarding in a VLAN is based on MAC addresses, the message version cannot be set to MLDv2.

The configuration takes effect only after you run the mld-snooping enable command to enable MLD snooping in the VLAN.

Example

# Set the MLD message version to 2 in VLAN 2.

<HUAWEI> system-view
[HUAWEI] mld-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] mld-snooping enable
[HUAWEI-vlan2] mld-snooping version 2

multicast drop-unknown

Function

The multicast drop-unknown command configures the switch to discard unknown multicast flows in a VLAN.

The undo multicast drop-unknown command restores the default measure taken for unknown multicast flows.

The default method that a switch uses to process unknown multicast flows depends on whether Layer 2 multicast is enabled and which Layer 2 multicast forwarding mode is used.

Format

multicast drop-unknown

undo multicast drop-unknown

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Unknown multicast flows are those that do not match any entry in the multicast forwarding table or match multicast forwarding entries with an empty outbound interface list. These flows are not requested by users. The default method that a switch uses to process unknown IPv6 multicast flows depends on whether Layer 2 multicast is enabled and which Layer 2 multicast forwarding mode is used:
  • If Layer 2 multicast is not enabled on the switch, the switch broadcasts unknown multicast flows in the corresponding VLAN.

  • If Layer 2 multicast is enabled, the switch broadcasts unknown multicast flows in the corresponding VLAN in MAC address-based forwarding mode and drops unknown multicast flows in IP address-based forwarding mode.

If a switch broadcasts unknown multicast flows in a VLAN, you can configure the switch to drop unknown multicast flows, reducing instant bandwidth usage.

Configuration Impact

After the multicast drop-unknown command is executed, all unknown IPv4 and IPv6 multicast packets are discarded, including the protocol packets that are transparently transmitted within the VLAN and use the reserved multicast address.

Example

# Discard unknown multicast flows in VLAN 10.
<HUAWEI> system-view
[HUAWEI] vlan 10
[HUAWEI-vlan10] multicast drop-unknown

multicast-snooping mux-vlan enable

Function

The multicast-snooping mux-vlan enable command enables a device to transmit Layer 2 multicast traffic on a network configured with MUX VLAN.

The undo multicast-snooping mux-vlan enable command disables a device from transmitting Layer 2 multicast traffic on a network configured with MUX VLAN.

By default, a device is disabled from transmitting Layer 2 multicast traffic on a network configured with MUX VLAN.

Format

multicast-snooping mux-vlan enable

undo multicast-snooping mux-vlan enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, on a network configured with MUX VLAN, Layer 2 multicast traffic cannot be transmitted between the principal VLAN and subordinate VLANs. You can run the multicast-snooping mux-vlan enable command to enable Layer 2 multicast traffic to be transmitted on the network configured with MUX VLAN.

Precautions

If a MUX VLAN is bound to a static multicast group using the l2-multicast static-group or mld-snooping static-group command, the multicast-snooping mux-vlan enable command cannot be executed. You must delete the association between the MUX VLAN and static multicast group before running the multicast-snooping mux-vlan enable command.

After the multicast-snooping mux-vlan enable command is configured, you cannot run the l2-multicast static-group or mld-snooping static-group command to bind a MUX VLAN to a static multicast group.

Example

# Enable a device to forward Layer 2 multicast traffic on a network configured with MUX VLAN.

<HUAWEI> system-view
[HUAWEI] multicast-snooping mux-vlan enable

multicast-source-deny

Function

The multicast-source-deny command discards multicast data packets sent from specified VLANs on an interface.

The undo multicast-source-deny command restores multicast forwarding in specified VLANs on an interface.

By default, multicast data packets from all VLANs are forwarded on an interface.

Format

multicast-source-deny [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]

undo multicast-source-deny [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]

Parameters

Parameter

Description

Value

vlan vlan-id1 [ to vlan-id2 ]

Specifies a VLAN ID.

  • vlan-id1 specifies the first VLAN ID.
  • to vlan-id2 specifies the last VLAN ID. vlan-id2 must be larger than vlan-id1. vlan-id1 and vlan-id2 specify a range of VLANs. If you do not specify to vlan-id2, only one VLAN is specified.

The value is an integer that ranges from 1 to 4094.

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After you run the multicast-source-deny command on an interface, multicast packets received from specified VLANs are discarded on the interface. You may need to use this command in the following scenarios:
  • A user-side interface receives multicast packets, but the switch does not need to receive multicast data packets from user-side interfaces. Discarding multicast data packets received on a user-side interface protects the system against forged multicast flows sent from malicious users.
  • Multiple multicast sources in different VLANs are connected to the switch through a Layer 2 network, but the switch only needs to receive multicast data from some of the multicast sources.
  • In some situations, for example, multicast services for users connected to an interface have expired and need to be stopped, the network administrator can use this command on this interface. Then multicast data packets from specified VLANs cannot be sent to the users.

Precautions

If you run the multicast-source-deny command multiple times, all the configurations take effect.

When using the multicast-source-deny command on an interface, ensure that the interface has been added to the specified VLANs. Otherwise, the configuration does not take effect.

This command can discard only multicast data packets that meet both of the following conditions:
  • The destination MAC address is an IP multicast MAC address (IPv4 MAC address starting with 0x01-00-5e or IPv6 multicast MAC address starting with 0x3333).
  • The packet encapsulation protocol is UDP.

Example

# Discard multicast data packets sent from VLANs 100 to 105 on GE1/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet1/0/1
[HUAWEI-GigabitEthernet1/0/1] multicast-source-deny vlan 100 to 105

reset mld-snooping group

Function

The reset mld-snooping group command deletes dynamic group memberships learned by MLD snooping.

Format

reset mld-snooping group { all | vlan vlan-id [ [ source-address source-ipv6-address ] group-address group-ipv6-address ] }

Parameters

Parameter

Description

Value

all

Deletes dynamic group memberships learned by MLD snooping.

-

vlan vlan-id

Deletes dynamic group memberships in a specified VLAN.

The value of vlan-id is an integer that ranges from 1 to 4094.

group-ipv6-address

Deletes the dynamic group memberships of a specified source address.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. An IPv6 multicast address starts with FF.

source-address source-ipv6-address

Deletes the dynamic group memberships of a specified source address.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When multicast groups change on a network, the switch generates new Layer 2 multicast forwarding entries until the aging time of member ports expire. To enable the switch to generate new multicast forwarding entries immediately, use the reset mld-snooping group command to delete old memberships.

Precautions

Deleting group memberships in a VLAN temporarily interrupts multicast forwarding in the VLAN. The switch generates new forwarding entries only when receiving MLD Report messages from hosts in the VLAN. The hosts can then receive multicast data.

This command cannot delete static group memberships.

This command is valid only for VLANs with MLD snooping enabled and is invalid for a VLAN if MLD is enabled on the corresponding VLANIF interface.

Example

# Delete dynamic group memberships in VLAN 2.

<HUAWEI> reset mld-snooping group vlan 2

reset mld-snooping statistics

Function

The reset mld-snooping statistics command clears MLD snooping statistics.

Format

reset mld-snooping statistics [ vlan vlan-id ]

Parameters

Parameter

Description

Value

vlan vlan-id

Clears the MLD snooping statistics in a specified VLAN.

The value is an integer that ranges from 1 to 4094.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To analyze the MLD snooping statistics collected in a certain period, run this command to clear the previous statistics. After a while, run the display mld-snooping statistics command to view the MLD snooping statistics.

Precautions

The cleared MLD snooping statistics cannot be restored.

Example

# Clear MLD snooping statistics in VLAN 2.

<HUAWEI> reset mld-snooping statistics vlan 2
Translation
Download
Updated: 2019-04-09

Document ID: EDOC1100065659

Views: 115588

Downloads: 83

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next