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

Command Reference

S7700 and S9700 V200R011C10

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).
VLAN-based IGMP Snooping Configuration Commands

VLAN-based IGMP 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.

dhcp-snooping user-offline remove igmp-snooping

Function

The dhcp-snooping user-offline remove igmp-snooping command enables the switch to delete the IGMP snooping entries of DHCP snooping users immediately after the users go offline.

The undo dhcp-snooping user-offline remove igmp-snooping command restores the default configuration.

By default, the switch does not delete the IGMP snooping entries of DHCP snooping users immediately after the users go offline.

Format

dhcp-snooping user-offline remove igmp-snooping

undo dhcp-snooping user-offline remove igmp-snooping

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, when IGMP snooping is enabled for DHCP snooping users, the switch does not delete the IGMP snooping entry of a user immediately after the user goes offline. The multicast flow requested by the user is still transmitted until the IGMP snooping entry of the user ages out.

The dhcp-snooping user-offline remove igmp-snooping command enables the switch to delete the IGMP snooping entry of a DHCP snooping user immediately after the user goes offline, terminating the multicast flow requested by the user.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Example

# Enable the system to delete IGMP snooping entries of DHCP snooping users immediately after the users go offline.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] dhcp-snooping user-offline remove igmp-snooping

display igmp-snooping

Function

The display igmp-snooping command displays the IGMP snooping running parameters.

Format

display igmp-snooping [ vlan [ vlan-id ] ]

Parameters

Parameter

Description

Value

vlan [ vlan-id ]

Displays the IGMP snooping running parameters in a specified VLAN. If this parameter is not specified, the system displays the IGMP running parameters in all VLANs with IGMP 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 IGMP snooping running parameters.

To view the IGMP snooping configuration, run the display igmp-snooping configuration command.

Precautions

This command can display the IGMP snooping running parameters in a VLAN only when at least one interface in the VLAN is in Up state and IGMP snooping enabled in the VLAN. To enable IGMP snooping in a VLAN, run the igmp-snooping enable (VLAN view) command.

Example

# Display the IGMP snooping running parameters.

<HUAWEI> display igmp-snooping
  IGMP Snooping Information for VLAN 3
   IGMP Snooping is Enabled
   IGMP Version is Set to default 2
   IGMP Query Interval is Set to default 60s
   IGMP Max Response Interval is Set to default 10s
   IGMP Robustness is Set to default 2
   IGMP Last Member Query Interval is Set to default 1s
   IGMP Router Port Aging Interval is Set to 180s or holdtime in hello
   IGMP Filter Group-Policy is not set
   IGMP Prompt Leave Disable
   IGMP Router Alert is Not Required
   IGMP Send Router Alert Enable
   IGMP Proxy Disable
   IGMP Report Suppress Disable
   IGMP Suppress Time is set to default 10 seconds
   IGMP Querier Disable
   IGMP Router Port Learning Enable
   IGMP SSM-Mapping Disable
   IGMP Suppress-dynamic-join Disable
Table 8-115  Description of the display igmp-snooping command output

Item

Description

IGMP Snooping Information for VLAN 3

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

IGMP Snooping is Enabled

IGMP snooping is enabled in the VLAN.

By default, IGMP snooping is disabled in a VLAN. IGMP snooping can be enabled in a VLAN using the igmp-snooping enable (VLAN view) command.

IGMP Version is Set to default 2

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

In this example, the default version 2 is displayed, indicating that both IGMPv1 and IGMPv2 messages can be processed. This parameter is configured using the igmp-snooping version command.

IGMP Query Interval is Set to default 60s

Interval at which IGMP General Query messages are sent.

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

IGMP Max Response Interval is Set to default 10s

Maximum response time for IGMP General Query messages.

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

IGMP Robustness is Set to default 2

IGMP robustness variable,

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

IGMP Last Member Query Interval is Set to default 1s

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

In this example, the default value (1 second) is displayed. This parameter is configured using the igmp-snoopig lastmember-queryinterval command.

IGMP 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 igmp-snooping router-aging-time command.

IGMP 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 igmp-snooping group-policy command.

IGMP Prompt Leave Disable

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

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

IGMP Router Alert is Not Required

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

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

IGMP Send Router Alert Enable

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

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

IGMP Router Port Learning Enable

Router port learning is enabled (default configuration).

Router port learning can be enabled using the igmp-snooping router-learning command.

IGMP Proxy Disable

IGMP snooping proxy is disabled (default configuration).

IGMP snooping proxy can be enabled using the igmp-snooping proxy command.

IGMP Report Suppress Disable

IGMP message suppression is disabled (default configuration).

IGMP message suppression can be enabled using the igmp-snooping report-suppress command.

IGMP Suppress Time is set to default 10 seconds

IGMP message suppression time.

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

IGMP Querier Disable

IGMP snooping querier is disabled (default configuration).

IGMP snooping querier can be enabled using the igmp-snooping querier enable command.

IGMP SSM-Mapping Disable

IGMP snooping SSM mapping is disabled (default configuration).

IGMP snooping SSM mapping can be enabled using the igmp-snooping ssm-mapping enable command.

IGMP Suppress-dynamic-join Disable

Report and Leave messages received in the VLAN can be forwarded to the upstream multicast device with static multicast groups configured (default configuration).

This function can be disabled using the igmp-snooping static-group suppress-dynamic-join command.

display igmp-snooping configuration

Function

The display igmp-snooping configuration command displays the IGMP snooping configuration.

Format

display igmp-snooping [ vlan [ vlan-id ] ] configuration

Parameters

Parameter Description Value
vlan [ vlan-id ] Displays the IGMP snooping configuration in a specified VLAN. If this parameter is not specified, the system displays the IGMP 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 IGMP snooping configuration so that you can check whether the IGMP snooping configuration made in the system is proper.

To check all IGMP snooping running parameters, run the display igmp-snooping command.

Prerequisites

The IGMP snooping configuration in a VLAN can be displayed as long as IGMP snooping parameters have been configured in the VLAN, no matter whether the VLAN contains interfaces in Up state.

Global IGMP snooping must be enabled using the igmp-snooping enable (system view) command before any IGMP snooping configuration is performed.

Example

# Display the IGMP snooping configuration in all VLANs.

<HUAWEI> display igmp-snooping configuration
 IGMP Snooping Configuration for VLAN 7
     igmp-snooping enable
     igmp-snooping version 3
     igmp-snooping ssm-mapping enable
     igmp-snooping ssm-policy 2000
     igmp-snooping ssm-mapping 232.1.1.0 255.255.255.0 10.1.2.1
Table 8-116  Description of the display igmp-snooping configuration command output

Item

Description

IGMP Snooping Configuration for VLAN 7

The following information displayed is the IGMP snooping configuration in VLAN 7.

igmp-snooping enable

IGMP snooping is enabled in the VLAN.

By default, IGMP snooping is disabled in a VLAN. IGMP snooping can be enabled in a VLAN using the igmp-snooping enable (VLAN view) command.

igmp-snooping version 3

Messages of IGMPv1, IGMPv2, and IGMPv3 can be processed in the VLAN.

By default, IGMPv1 and IGMPv2 messages can be processed in a VLAN. This parameter is configured using the igmp-snooping version command.

igmp-snooping ssm-mapping enable

IGMP snooping SSM mapping is enabled in the VLAN.

By default, IGMP snooping SSM mapping is disabled in a VLAN. IGMP snooping SSM mapping can be enabled using the igmp-snooping ssm-mapping enable command.

igmp-snooping ssm-policy 2000

The SSM mapping policy that references ACL 2000 is configured in the VLAN.

By default, no SSM group policy is applied to a VLAN. An SSM group policy is configured using the igmp-snooping ssm-policy command.

igmp-snooping ssm-mapping 232.1.1.0 255.255.255.0 10.1.2.1

In the SSM mapping policy, multicast group addresses 232.1.1.0 through 232.1.1.255 are mapped to multicast source 10.1.2.1.

By default, group-source mapping is configured in a VLAN. A group-source mapping is configured using the igmp-snooping ssm-mapping command.

display igmp-snooping port-info

Function

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

Format

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

Parameters

Parameter

Description

Value

vlan vlan-id

Displays information about 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 ranging from 1 to 4094.

group-address group-address

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

The value ranges from 224.0.1.0 to 239.255.255.255, in dotted decimal notation.

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

When the switch with IGMP snooping enabled receives IGMP messages exchanged between hosts and a Layer 3 device, the switch maintains a Layer 2 multicast forwarding table based on information in the messages. The display igmp-snooping port-info command shows member ports in the Layer 2 multicast forwarding table. According to the command output, you can know which downlink ports of the switch have multicast users connected, and control multicast services conveniently.

Precautions

This command can display information about multicast group member ports in a VLAN only when IGMP snooping has been enabled in the VLAN using the igmp-snooping enable (VLAN view) command, and at least one interface in the VLAN is in Up state. If interfaces in the VLAN are dynamic group member ports, the command can display information about these member ports only after they receive IGMP Report messages and before their aging time expires.

Example

# Display information about multicast group member ports in VLAN 7.

<HUAWEI> display igmp-snooping port-info vlan 7
-----------------------------------------------------------------------
                    (Source, Group)    Port                         Flag
 Flag: S:Static     D:Dynamic     M: Ssm-mapping 
-----------------------------------------------------------------------
VLAN 7, 5 Entry(s)
                      (*,226.1.1.1)    GE1/0/1                       -D-
                                                1 port(s)
               (10.1.1.1,226.1.1.2)    GE1/0/1                       --M 
                                                1 port(s)
               (10.1.1.1,226.1.1.3)    GE1/0/1                       --M 
                                                1 port(s)
                     (*, 227.1.1.2)    GE1/0/1                       S--         
                                                1 port(s)
                     (*, 227.1.1.3)    GE1/0/1                       S--         
                                                1 port(s)
-----------------------------------------------------------------------
Table 8-117  Description of the display igmp-snooping port-info command output

Item

Description

(Source, Group)

(S, G) entry, specifying the multicast source and multicast group. Multicast data is sent from multicast source S to group G. If S is displayed as *, multicast data may be sent from any multicast source. If S is displayed as an IP address, multicast data is sent from this IP address.

Port

Member port.

Flag

Type of a member port, which can be:
  • S: static member port, which is configured using the l2-multicast static-group command
  • D: dynamic member port learned through IGMP snooping
  • M: member port established through SSM mapping

VLAN 7, 5 Entry(s)

VLAN ID and the number of entries in the VLAN.

# Display detailed information about all multicast group member ports.

<HUAWEI> display igmp-snooping port-info verbose
                                                                                
The port information of Group 239.255.255.250 on VLAN 22:                       
    Time of this group has been up : 00:01:22                                   
                                                                                
  The port information of (10.1.1.2, 239.255.255.250):                           
    Time of this source has been up : 00:01:22                                  
    Port Table on this source(10.1.1.2):                                         
      No.1                                                                      
        Port name : GE1/0/1
        Time of this port has been up as a host-port : 00:01:22                 
        Remain time of port expire as dynamic host-port : 00:02:58              
        Version2-host-present-timer-expiry: 00:04:14
        Host-port flags : Dynamic                                               
                                                                                
The port information of Group 227.1.1.1 on VLAN 200:                            
    Time of this group has been up : 1d:05h                                     
                                                                                
  The port information of (0.0.0.0, 227.1.1.1):                                 
    Time of this source has been up : 1d:05h                                    
    Port Table on this source(0.0.0.0):                                         
      No.1                                                                      
        Port name : GE1/0/1
        Time of this port has been up as a host-port : 1d:05h                   
        Remain time of port expire as dynamic host-port : NA                    
        Host-port flags : Static                                                
Table 8-118  Description of the display igmp-snooping port-info verbose command output

Item

Description

The port information of Group 239.255.255.250 on VLAN 22

Information about member ports of multicast group 239.255.255.250 in VLAN 22.

Time of this group has been up

Time that elapsed since the multicast group was set up.

The port information of (10.1.1.2, 239.255.255.250)

Information about member ports of a specified (S, G).

Time of this source has been up

Time that elapsed since the multicast source was set up.

Port Table on this source

List of member ports of the specified multicast source.

No.1

First member port.

Port name

Type and number of the first member port.

Time of this port has been up as a host-port

Time that elapsed since the first member port was bound to a source or (S, G).

Remain time of port expire as dynamic host-port

Aging time of the first member port. This field displays "NA" for a static member port.

The aging time of a dynamic member port is calculated using the following formula: Aging time = Robustness variable x General query interval + Maximum response time for General Query messages. The robustness variable is configured using the igmp-snooping robust-count command. The general query interval is configured using the igmp-snooping query-interval command. The maximum response time for General Query messages is configured using the igmp-snooping max-response-time command.

Version2-host-present-timer-expiry

Aging time of the IGMPv2 host.

Host-port flags

Type of a member port, which can be:
  • Static: static member
  • Dynamic: dynamic member port learned through IGMP snooping
  • Mapping: member port established through SSM mapping

display igmp-snooping host-tracking

Function

The display igmp-snooping host-tracking command displays information about group member hosts.

Format

display igmp-snooping host-tracking [ vlan vlan-id [ group-address group-address ] ] [ interface interface-type interface-number ]

Parameters

Parameter

Description

Value

vlan vlan-id

Displays information about group member hosts in a specified VLAN. If this parameter is not specified, the command displays information about group member hosts in all VLANs.

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

group-address group-address

Displays information about member hosts of a specified multicast group. If this parameter is not specified, the command displays information about member hosts of all multicast groups.

The value ranges from 224.0.1.0 to 239.255.255.255, in dotted decimal notation.

interface interface-type interface-number
Displays information about group member hosts on a specified interface. If this parameter is not specified, the command displays information about group member hosts on all interfaces.
  • interface-type specifies the interface type.

  • interface-number specifies the interface number.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

IGMP snooping creates and maintains a Layer 2 multicast forwarding table by listening to IGMP messages exchanged between hosts and an upstream Layer 3 device. You can use this command to view information about member hosts in the Layer 2 multicast forwarding table. The command output shows which hosts under group member ports are using multicast services, helping you manage multicast services.

Precautions

If no forwarding entry is available for a member host, the command does not display information about this host.

Example

# Display information about group member hosts.

<HUAWEI> display igmp-snooping host-tracking
--------------------------------------------------------------------------------
 VLAN                       (Source, Group)       Interface         Reporter    
--------------------------------------------------------------------------------
 100                         (*, 225.0.0.2)       GE1/0/1          192.85.1.3
 100                         (*, 225.0.0.1)       GE1/0/1          10.10.5.2
--------------------------------------------------------------------------------
Table 8-119  Description of the display igmp-snooping host-tracking command output

Item

Description

VLAN

VLAN ID.

(Source, Group)

(S, G) entry, indicating that data is sent from multicast source S to group G. If Source is displayed as *, multicast data may be sent from any multicast source. If Source is displayed as an IP address, multicast data is sent from this IP address.

Interface

Group member interface.

Reporter

Host IP address.

display igmp-snooping qinq-port-info

Function

The display igmp-snooping qinq-port-info command displays multicast group membership on a QinQ or dot1q termination sub-interface.

Format

display igmp-snooping qinq-port-info interface interface-type interface-number [ group-address group-address ]

Parameters

Parameter

Description

Value

interface interface-type interface-number

Displays multicast group membership of a specified interface.

-

group-address group-address

Displays group membership of a specified multicast group. If this parameter is not specified, the command displays group membership of all multicast groups on the specified interface.

The value ranges from 224.0.1.0 to 239.255.255.255, in dotted decimal notation.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

This command is used to check group membership on a QinQ or dot1q termination sub-interface.

Example

# Display group membership of all multicast groups on QinQ termination sub-interface GE1/0/18.1.

<HUAWEI> display igmp-snooping qinq-port-info interface GigabitEthernet 1/0/18.1
Interface GigabitEthernet1/0/18.1, 1 Group(s)                                  
 (Source,Group)                            PE-VID/CE-VID LiveTime           Flag
 -------------------------------------------------------------------------------
 (*,225.0.0.1)                             1001/0        --                 S-
 (*,225.0.0.2)                             1001/0        00:00:23           -D-
Table 8-120  Description of the display igmp-snooping qinq-port-info command output

Item

Description

Interface GigabitEthernet1/0/18.1, 1 Group(s)

Group membership on a termination sub-interface.

(Source, Group)

(S, G) entry. If S is displayed as *, multicast data may be sent from any multicast source. If S is displayed as an IP address, multicast data is sent from this IP address.

PE-VID/CE-VID

Outer VLAN ID and inner VLAN ID.

LiveTime

Time elapsed since the group is discovered, in any of the following formats:
  • If the time is shorter than or equal to 24 hours, the format is hh:mm:ss.
  • If the time is longer than 24 hours but shorter than or equal to one week, the format is day:hour.
  • If the time is longer than one week, the format is week:day.

-- indicates that the group Up time is not obtained.

Flag

Type of a member port, which can be:
  • S: static member port, which is configured using the igmp static-group command
  • D: dynamic member port learned through IGMP snooping
  • M: member port established through SSM mapping

display igmp-snooping querier

Function

The display igmp-snooping querier command displays whether the IGMP snooping querier function is enabled in a VLAN.

Format

display igmp-snooping querier vlan [ vlan-id ]

Parameters

Parameter

Description

Value

vlan [ vlan-id ]

Displays whether the IGMP snooping querier function is enabled in a specified VLAN. If vlan-id is not specified, the system displays status of the IGMP snooping querier function 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

You can configure an IGMP snooping querier on the switch to send IGMP Query messages in place of the upstream Layer 3 device in the following situations:
  • The Layer 3 device cannot send IGMP messages for some reasons, for example, IGMP is not enabled on the Layer 3 device.
  • The Layer 3 device uses static multicast forwarding entries and does not need to learn multicast forwarding entries.
You can use the display igmp-snooping querier command to check in which VLANs the IGMP snooping querier function is enabled.

Precautions

The querier function is disabled in a VLAN by default after IGMP snooping is enabled in the VLAN. To enable the querier function, run the igmp-snooping querier enable command.

Example

# Display the status of the IGMP snooping querier function in all VLANs.

<HUAWEI> display igmp-snooping querier vlan
 VLAN              Querier-state
-----------------------------------------------
 10                 Enable
 20                 Disable
 30                 Disable
-----------------------------------------------
 total entry 3
Table 8-121  Description of the display igmp-snooping querier vlan command output

Item

Description

VLAN

VLAN ID.

Querier-state

Querier status in a VLAN.
  • Disable: The IGMP snooping querier function is disabled in the VLAN.
  • Enable: The IGMP snooping querier function is enabled in the VLAN.

total entry 3

Number of VLANs in which the querier status is displayed.

display igmp-snooping router-port

Function

The display igmp-snooping router-port command displays information about the router ports in a specified VLAN, including static and dynamic router ports.

Format

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

Parameters

Parameter

Description

Value

vlan [ vlan-id ]

Displays information about the router ports in a specified VLAN. If vlan-id is not specified, the command 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 connects the switch to an upstream Layer 3 multicast device. The router port can be statically configured or dynamically generated after the interface receives an IGMP Query message or a PIM Hello message.

You can run the display igmp-snooping router-port command to view the type, name, lifetime, and aging time of a router port.

Precautions

This command can display information about router ports in a VLAN only when IGMP snooping has been enabled in the VLAN using the igmp-snooping enable (VLAN view) command, and at least one interface in the VLAN is in Up state.

Example

# Display information about router ports in VLAN 2.

<HUAWEI> display igmp-snooping router-port vlan 2
Port Name                 UpTime      Expires     Flags
--------------------------------------------------------------
VLAN 2, 2 router-port(s)
GE1/0/1                   03:28:16    00:01:20    DYNAMIC
GE1/0/2                   2d:10h      --          STATIC
Table 8-122  Description of the display igmp-snooping router-port command output

Item

Description

Port Name

Type and number of a router port.

UpTime

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. This parameter is configured using the igmp-snooping router-aging-time command.
  • For a static router port, "--" is displayed, indicating that the static router does not age.

Flags

Type of the router port, which can be:

display igmp-snooping statistics

Function

The display igmp-snooping statistics command displays IGMP snooping statistics.

Format

display igmp-snooping statistics vlan [ vlan-id ]

Parameters

Parameter Description Value
vlan [ vlan-id ]

Displays IGMP snooping statistics in a specified VLAN.

  • If vlan-id is not specified, the system displays IGMP snooping statistics in all VLANs.
  • If vlan-id is specified, the system displays statistics about IGMP messages in the specified VLAN, but does not display the counts of IGMP snooping events that occur in the VLAN.
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 IGMP snooping configuration, you can use the display igmp-snooping statistics command to view IGMP snooping statistics, including the number of IGMP messages sent, number of IGMP 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 IGMP snooping statistics help you identify the cause of the fault.

Precautions

This command displays IGMP snooping statistics only when IGMP snooping has been enabled globally using the igmp-snooping enable (VLAN view) command.

Example

# Display IGMP snooping statistics in all VLANs.
<HUAWEI> display igmp-snooping statistics vlan
 IGMP Snooping Events Counter
     Recv VLAN Up Event Times      3
     Recv VLAN Down Event Times    0
     Recv VLAN Del Event Times     0
     Recv Port Up Event Times      2
     Recv Port Down Event Times    0
     Recv Port Del Event Times     0
     Recv Port Inc Event Times     0
     Recv Port Exc Event Times     0
     Recv MSTP Block Event Times   0
     Recv MSTP Forward Event Times 0
     Recv LINK Change Event Times  0
 IGMP Snooping Packets Counter
   Statistics for VLAN 10
     Recv V1 Report          0
     Recv V2 Report          0
     Recv V3 Report          0
     Recv V1 Query           0
     Recv V2 Query           0
     Recv V3 Query           0
     Recv General Query     0
     Recv Leave              0
     Recv Pim Hello          0
     Send Query(S=0)         0
     Send Query(S!=0)        0
     Suppress Report         0
     Suppress Leave          0
     Proxy Send General Query               0
     Proxy Send Group-Specific Query        0
     Proxy Send Group-Source-Specific Query 0

# Display IGMP snooping statistics in VLAN 10.

<HUAWEI> display igmp-snooping statistics vlan 10
 IGMP Snooping Packets Counter
   Statistics for VLAN 10
     Recv V1 Report  16
     Recv V2 Report  8768
     Recv V3 Report  0
     Recv V1 Query   0
     Recv V2 Query   2243
     Recv V3 Query   0
     Recv Leave      215
     Recv Pim Hello  0
     Send Query(S=0) 0
     Send Query(S!=0)529
     Suppress Report         0
     Suppress Leave          0
     Proxy Send General Query               0
     Proxy Send Group-Specific Query        0
     Proxy Send Group-Source-Specific Query 0
Table 8-123  Description of the display igmp-snooping statistics command output

Item

Description

IGMP Snooping Events Counter

Statistics on IGMP snooping events, including changes in interface status, changes in VLAN status, interfaces joining or leaving VLANs, and MSTP 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 status change events.

IGMP Snooping Packets Counter

Statistics on IGMP Snooping packets.

Statistics for VLAN 10

Packet statistics in VLAN 10.

Recv V1 Report

Number of IGMPv1 Report messages received.

Recv V2 Report

Number of IGMPv2 Report messages received.

Recv V3 Report

Number of IGMPv3 Report messages received.

Recv V1 Query

Number of IGMPv1 Query messages received.

Recv V2 Query

Number of IGMPv2 Query messages received.

Recv V3 Query

Number of IGMPv3 Query messages received.

Recv General Query

Interval for sending IGMP General Query messages.

Recv Leave

Number of IGMP Leave messages received.

Recv Pim Hello

Number of PIM Hello messages received.

Send Query(S=0)

Number of IGMP Query messages sent with the source address 0.0.0.0.

Send Query(S!=0)

Number of IGMP Query messages sent with source addresses other than 0.0.0.0.

Suppress Report

Number of duplicate IGMP Report messages dropped.

Suppress Leave

Number of duplicate IGMP Leave messages dropped.

Proxy Send General Query

Number of General Query messages sent by the IGMP snooping proxy.

Proxy Send Group-Specific Query

Number of Group-Specific Query messages sent by the IGMP snooping proxy.

Proxy Send Group-Source-Specific Query

Number of Group-Source-Specific Query messages sent by the IGMP snooping proxy.

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-124  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 l2-multicast forwarding-table vlan

Function

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

Format

display l2-multicast forwarding-table vlan [ vlan-id [ [ source-address source-address ] group-address { group-address | router-group } ] ]

Parameters

Parameter

Description

Value

vlan-id

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

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

source-address source-address

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

The value is in dotted decimal notation.

group-address group-address

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

The value ranges from 224.0.1.0 to 239.255.255.255 in dotted decimal notation.

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 IGMP snooping configuration, you can use the display l2-multicast forwarding-table command to view the Layer 2 multicast 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 IGMP snooping version is set to v3 in a VLAN or when the IGMP snooping version is set to v2 or v1 but SSM mapping is configured, the display l2-multicast forwarding-table command displays (S, G) entries.

Precautions

This command displays Layer multicast forwarding entries in a VLAN only when the VLAN is in Up state (At least one interface in the VLAN is in Up state. If interfaces in the VLAN are dynamic group member ports, the interfaces must have received IGMP Report messages and have not been aged out.)

Example

# Display multicast forwarding entries in VLAN 10.

<HUAWEI> display l2-multicast 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
                      (*, 225.1.1.6)    GigabitEthernet1/0/1            10
                                        GigabitEthernet1/0/2            10
                   (*, 235.80.68.83)    GigabitEthernet1/0/1            10            
                                        GigabitEthernet1/0/2            10 
--------------------------------------------------------------------------------
Table 8-125  Description of the display l2-multicast 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.

Total Group(s)

Total number of multicast forwarding entries.

display l2-multicast forwarding-table statistics

Function

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

Format

display l2-multicast 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 IGMP 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 l2-multicast 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-126  Description of the display l2-multicast 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.

igmp-snooping enable (system view)

Function

The igmp-snooping enable command enables IGMP snooping globally or in specified VLANs.

The undo igmp-snooping enable command disables IGMP snooping globally or in specified VLANs.

By default, IGMP snooping is disabled globally and in a VLAN.

Format

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

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

Parameters

Parameter Description Value
vlan vlan-id1 [ to vlan-id2 ]

Enables IGMP snooping in a VLAN or in multiple VLANs.

vlan-id1 and vlan-id2 identify a range of VLAN IDs.

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

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

Disables IGMP snooping in all VLANs.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

IGMP snooping runs on a Layer 2 device between a Layer 3 multicast device and hosts. By listening on the multicast protocol packets exchanged between the Layer 3 device and hosts, IGMP snooping maintains a multicast forwarding table to control Layer 2 multicast forwarding.

Before configuring IGMP snooping parameters, run the igmp-snooping enable command in the system view to enable IGMP snooping globally. Other IGMP snooping configuration commands can be used only after IGMP snooping is enabled globally.

You can enable IGMP snooping in multiple VLANs by using the igmp-snooping enable command in the system view.

Prerequisites

To enable IGMP snooping in multiple VLANs, ensure that IGMP snooping has been enabled globally.

Precautions

If you run the igmp-snooping enable vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> command multiple times, all the configurations take effect.

When you run the undo igmp-snooping enable command in the system view, the system displays a message, asking you whether to disable IGMP snooping globally. When you disable IGMP snooping globally, all the IGMP snooping configurations are deleted. When you run the igmp-snooping enable command to enable IGMP snooping globally again, the switch uses the default IGMP snooping configuration.

The igmp snooping enable command in a VLAN and the igmp on-demand configuration of the VLANIF interface are mutually exclusive.

After global IGMP snooping is enabled on a switch, the switch sends all the IGMP messages received from a VLAN to the CPU for processing. If the multicast service is not configured in a VLAN and you want the switch to directly forward the IGMP messages of this VLAN without sending them to the CPU, run the protocol-transparent command in the VLAN view to enable transparent transmission of protocol packets.

Example

# Enable IGMP snooping globally.
<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
# Enable IGMP snooping in multiple VLANs.
<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan batch 2 to 10
[HUAWEI] igmp-snooping enable vlan 2 to 10

igmp-snooping enable (VLAN view)

Function

The igmp-snooping enable command enables IGMP snooping in a VLAN.

The undo igmp-snooping enable command disables IGMP snooping in a VLAN.

By default, IGMP snooping is disabled in a VLAN.

Format

igmp-snooping enable

undo igmp-snooping enable

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, IGMP snooping is not enabled in a VLAN after being enabled in the system view. To enable IGMP snooping in a VLAN, run the igmp-snooping enable command in the VLAN view.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Configuration Impact

After IGMP snooping is enabled in a VLAN, this function takes effect only on interfaces in this VLAN.

Precautions

The igmp snooping enable command in a VLAN and the igmp on-demand configuration of the VLANIF interface are mutually exclusive.

Example

# Enable IGMP snooping in VLAN 2.

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

igmp-snooping fast-switch enable

Function

The igmp-snooping fast-switch enable command enables fast multicast forwarding path switching upon STP topology changes.

The undo igmp-snooping fast-switch enable command disables fast multicast forwarding path switching upon STP topology changes.

By default, fast multicast forwarding path switching upon STP topology changes is disabled.

Format

igmp-snooping fast-switch enable

undo igmp-snooping fast-switch enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the Layer 2 network topology changes, multicast forwarding paths may change. You can configure the switch to send Query messages upon topology changes using the igmp-snooping send-query enable command. In this way, multicast data flows can be switched to new forwarding paths quickly after the Layer 2 network topology changes. However, the downstream device may not receive the Query message immediately after convergence of the Layer 2 network, because the Query message is sent after a certain interval (60s by default). As a result, multicast traffic cannot be quickly switched to the new forwarding paths.

If the Layer 2 network is running the Spanning Tree Protocol (STP), you can enable fast multicast forwarding path switching upon STP topology changes. When the STP topology changes, this function quickly changes the ports in Forwarding state into router ports to direct multicast data flows to the new forwarding paths.

Prerequisite

Global IGMP snooping has been enabled using the igmp-snooping enable (system view) command.

Precautions

  • This function takes effect only when STP is used as the loop prevention protocol on a Layer 2 network and the STP operation mode is MSTP, RSTP, or STP.
  • With this function configured, the switch sets all ports in Forwarding state as router ports when the STP topology changes. In this case, multicast data flows are forwarded to all the router ports before the router ports are aged. This will cause increase in multicast traffic on the network.

Example

# Enable fast multicast forwarding path switching upon STP topology changes.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] igmp-snooping fast-switch enable

igmp-snooping group-policy (VLAN view)

Function

The igmp-snooping group-policy command configures a multicast group policy in a VLAN.

The undo igmp-snooping group-policy command deletes the multicast group policy from a VLAN.

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

Format

igmp-snooping group-policy acl-number [ version version-number ] [ default-permit ]

undo igmp-snooping group-policy

Parameters

Parameter

Description

Value

acl-number

Specifies the number of an ACL used to restrict the range of groups users can join.

A basic or advanced ACL can be used in a multicast group policy.

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

version version-number

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

The value is an integer that ranges from 1 to 3.
  • 1: IGMPv1
  • 2: IGMPv2
  • 3: IGMPv3

default-permit

Configures the multicast group policy to permit all groups by default. That is, if the referenced ACL has no rules, the multicast group policy allows hosts in the VLAN to join all groups.

-

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A multicast group policy controls the multicast programs that users can order on a switch with IGMP snooping enabled. In multicast applications, user hosts send IGMP Report messages to join a group when they order programs of this group. When the upstream Layer 2 device receives the Report messages, it processes the Report messages differently depending on whether the group policy configured in the VLAN has the default-permit keyword specified:
  • If default-permit is not specified, the group policy prevents hosts in the VLAN from joining any group by default. A filter rule must be configured by specifying the permit keyword in the rule command. 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.
  • If default-permit is specified, the group policy allows hosts in the VLAN to join all groups by default. A filter rule must be configured by specifying the deny keyword in the rule command. If the Report messages match the filter rule, the Layer 2 device prevents the hosts in the VLAN from joining the group and drops the Report messages. If the Report messages do not match the filter rule, the Layer 2 device allows the hosts to join the group and forwards the Report messages.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

The configuration takes effect only when both the following conditions are met:
  • IGMP snooping is enabled in the VLAN using the igmp-snooping enable (VLAN view) command.
  • The ACL referenced in the policy exists and has filtering rules configured.

Example

# Prevent hosts in VLAN 2 from joining group 225.1.1.123.
<HUAWEI> system-view
[HUAWEI] acl number 2000
[HUAWEI-acl-basic-2000] rule deny source 225.1.1.123 0
[HUAWEI-acl-basic-2000] quit
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] igmp-snooping enable
[HUAWEI-vlan2] igmp-snooping group-policy 2000 default-permit
# Allow hosts in VLAN 2 to join group 225.1.1.123.
<HUAWEI> system-view
[HUAWEI] acl number 2000
[HUAWEI-acl-basic-2000] rule permit source 225.1.1.123 0
[HUAWEI-acl-basic-2000] quit
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] igmp-snooping enable
[HUAWEI-vlan2] igmp-snooping group-policy 2000

igmp-snooping lastmember-queryinterval

Function

The igmp-snooping lastmember-queryinterval command sets the last member query interval in a VLAN, that is, the interval at which Group-Specific Query messages are sent in the VLAN.

The undo igmp-snooping lastmember-queryinterval command restores the default last member query interval in a VLAN.

By default, Group-Specific Query messages are sent in a VLAN at intervals of 1 second.

Format

igmp-snooping lastmember-queryinterval lastmember-queryinterval

undo igmp-snooping lastmember-queryinterval

Parameters

Parameter

Description

Value

lastmember-queryinterval

Specifies the interval at which IGMP Group-Specific Query messages are sent.

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

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By setting the last member query interval, you can:

  • Configure the switch to send IGMP Group-Specific Query messages at intervals when the querier function is enabled.

  • Change the aging time of multicast group member ports.

    When the switch receives an IGMP Leave 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 = Last member query interval x Last member query count. The igmp-snooping lastmember-queryinterval command sets the last member query interval. The last member query count is set by the igmp-snooping robust-count command.

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

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

The switch sets the maximum response time field in the Group-Specific Query message to the configured last member query interval. Therefore, the maximum response time for Group-Specific Query messages is the same as the interval at which Group-Specific Query messages are sent.

The configuration takes effect only when all the following conditions are met:
  • IGMP snooping is enabled in the VLAN using the igmp-snooping enable (VLAN view) command.

  • The IGMP message version is set to v2 or v3 messages in the VLAN. (Hosts running IGMPv1 do not send Leave messages when they leave a multicast group.)

Example

# Set the last member query interval in VLAN 3 to 4 seconds.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] igmp-snooping lastmember-queryinterval 4

igmp-snooping learning

Function

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

The undo igmp-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

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

undo igmp-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.
  • to 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

Ethernet interface view, 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 port is a user-side interface that connects to multicast group members. Group memberships can be learned dynamically or configured statically. After IGMP 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 port when it receives an IGMP Report message.

If users connected to an interface need to receive data of a fixed multicast group, the interface can be statically bound to the multicast group. In this case, run the undo igmp-snooping learning command on the interface to disable learning of group memberships. This reduces the system resources used for protocol packet exchange.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

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

If you run the undo igmp-snooping learning command multiple times, all the configurations take effect.

Example

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

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] quit
[HUAWEI] vlan 4
[HUAWEI-vlan4] igmp-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 igmp-snooping learning vlan 3 to 4

igmp-snooping max-response-time

Function

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

The undo igmp-snooping max-response-time command restores the default maximum response time for IGMP General Query messages in a VLAN.

By default, the maximum response time for IGMP General messages in a VLAN is 10 seconds.

Format

igmp-snooping max-response-time max-response-time

undo igmp-snooping max-response-time

Parameters

Parameter

Description

Value

max-response-time

Specifies the maximum response time for IGMP 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 IGMP snooping parameters helps improve the multicast forwarding performance. By setting the maximum response time for IGMP General Query messages, you can:

  • Control the deadline for a host to send an IGMP Report message. When hosts are required to respond to IGMP General Query messages quickly, set a short maximum response time. To avoid congestion caused by a large number of IGMP messages sent by hosts, set a long maximum response time.
  • Adjust the aging time of member ports. When the switch receives a Report message, it starts the aging timer for the 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 igmp-snooping max-response-time command sets the maximum response time. The General query count is set by the igmp-snooping robust-count command, and the general query interval is set by the igmp-snooping query-interval command.

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

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

Perform the following operations to improve multicast performance:

Precautions

The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.

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

Example

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

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

igmp-snooping prompt-leave

Function

The igmp-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 igmp-snooping prompt-leave command disables the fast leave function in a VLAN.

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

Format

igmp-snooping prompt-leave [ group-policy acl-number [ default-permit ] ]

undo igmp-snooping prompt-leave

Parameters

Parameter

Description

Value

group-policy

Specifies a multicast group policy that allows member ports to fast leave some multicast groups. Before using this parameter, create an ACL and configure filter rules in the ACL.

-

acl-number

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

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

default-permit

Configures the multicast group policy to permit all groups by default. That is, if the referenced ACL has no rules, the multicast group policy allows hosts in the VLAN to fast leave all groups.

-

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 an IGMP Leave 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

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) 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 all the following conditions are met:
  • IGMP snooping is enabled in the VLAN using the igmp-snooping enable (VLAN view) command.
  • IGMPv2 or IGMPv3 messages can be processed in the VLAN.
  • 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. The ACL rules filter groups in different ways depending on whether default-permit is specified in the command:
    • If default-permit is not specified in the command, the group policy prevents member ports in the VLAN from fast leaving any group by default. Specify the permit keyword in the rule command to allow member ports in the VLAN to fast leave the specified groups.
    • If default-permit is specified in the command, the group policy allows member ports in the VLAN to fast leave all groups by default. Specify the deny keyword in the rule command to prevent member ports in the VLAN from fast leaving the specified groups.

Example

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

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] igmp-snooping enable
[HUAWEI-vlan2] igmp-snooping prompt-leave
# Allow member ports in VLAN 3 to fast leave group 225.1.1.123.
<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] acl number 2000
[HUAWEI-acl-basic-2000] rule permit source 225.1.1.123 0
[HUAWEI-acl-basic-2000] quit
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] igmp-snooping prompt-leave group-policy 2000
# Prevent member ports in VLAN 3 from fast leaving group 225.1.1.123.
<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] acl number 2000
[HUAWEI-acl-basic-2000] rule deny source 225.1.1.123 0
[HUAWEI-acl-basic-2000] quit
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] igmp-snooping prompt-leave group-policy 2000 default-permit

igmp-snooping host-based prompt-leave

Function

The igmp-snooping host-based prompt-leave command enables host-based fast leave in a VLAN.

The undo igmp-snooping host-based prompt-leave command disables host-based fast leave in a VLAN.

By default, host-based fast leave is disabled.

Format

igmp-snooping host-based prompt-leave

undo igmp-snooping host-based prompt-leave

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The host-based fast leave function enables a switch to delete a host from the host list of a group immediately after receiving an IGMP Leave message from the host. If the deleted host is the last receiver host connected to the member port, the switch deletes the forwarding entry of the group from the port, without waiting the aging timer of the port to expire. This conserves bandwidth and system resources.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command, then IGMP snooping has been enabled in the VLAN using the igmp-snooping enable (VLAN view) command.

Precautions

If a group member port is connected to multiple receiver hosts, the forwarding entry of the multicast group will be deleted without waiting for aging of the port only when the last receiver host leaves the group.

The configuration takes effect only when the switch can process IGMPv2 or IGMPv3 packets in the VLAN.

Example

# Enable host-based fast leave in VLAN 2.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] igmp-snooping enable
[HUAWEI-vlan2] igmp-snooping host-based prompt-leave

igmp-snooping proxy

Function

The igmp-snooping proxy command enables IGMP snooping proxy in a VLAN.

The undo igmp-snooping proxy command disables IGMP snooping proxy in a VLAN.

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

Format

igmp-snooping proxy

undo igmp-snooping proxy

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After IGMP snooping is enabled on a switch, the switch forwards Query messages from the upstream IGMP querier and Report/Leave messages from downstream hosts without changing the messages. When there are a large number of hosts on a network, redundant IGMP messages overload the upstream device. Enabling the IGMP snooping proxy function on the switch can solve this problem. This function allows the switch to send IGMP Query messages in place of the upstream Layer 3 device and send Report/Leave messages in place of downstream hosts, conserving link bandwidth between the Layer 3 device and switch. The switch sends IGMP Report/Leave messages 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 IGMP 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 Leave 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 IGMP is not enabled, for example, the Layer 3 device has only static multicast groups. In this case, the switch cannot create or maintain group memberships even though IGMP snooping is enabled. The IGMP snooping proxy function enables the switch to send Query messages to downstream hosts. For the hosts, the switch is a querier.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Configuration Impact

If IGMP is enabled on the upstream Layer 3 device, enabling the IGMP snooping proxy function on the switch may affect the querier election result, because the General Query messages sent by the switch have a smaller source IP address than the General Query messages sent by the Layer 3 device. To solve this problem, run the igmp-snooping proxy-uplink-port command to prevent the switch from sending Query messages to the uplink interface connected to the upstream device. Alternatively, run the igmp-snooping send-query source-address command to set a large source IP address for Query messages.

Precautions

  • The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.

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

  • After enabling IGMP snooping proxy in a VLAN, do not enable IGMP snooping querier or IGMP message suppression in the VLAN because these functions conflict.

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

Example

# Enable IGMP snooping proxy in VLAN 100.

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

igmp-snooping querier enable

Function

The igmp-snooping querier enable command enables the IGMP snooping querier function in a VLAN.

The undo igmp-snooping querier enable command disables the IGMP snooping querier function in a VLAN.

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

Format

igmp-snooping querier enable

undo igmp-snooping querier enable

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

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

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

Perform the following operations as required on your network:

Configuration Impact

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

Precautions

  • The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.

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

  • The IGMP snooping proxy and IGMP snooping querier functions cannot be enabled in the same VLAN.

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

Example

# Enable the querier function in VLAN 3.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] igmp-snooping querier enable
Warning: Please confirm that no other querier is configured on the network, otherwise this command may cause querier re-election, continue? [Y/N]:y

igmp-snooping query-interval

Function

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

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

By default, the general query interval is 60 seconds.

Format

igmp-snooping query-interval query-interval

undo igmp-snooping query-interval

Parameters

Parameter

Description

Value

query-interval

Specifies the interval at which IGMP General Query messages are sent.

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

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By setting the general query interval, you can:

  • Configure the switch to send IGMP General Query messages at intervals to maintain memberships of interfaces. When a shorter interval is configured, the switch is more sensitive to multicast membership changes, but more bandwidth and system resources are consumed.

  • Change the aging time of multicast member ports.

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

The general query interval affects the aging time of group member ports. A shorter general query interval results in a shorter aging time of group member ports and therefore a faster update speed of Layer 2 multicast entries. However, when there are many downstream users connected to a device, a short general query interval can cause flapping of multicast entries, leading to a high CPU usage on the device. Therefore, the default general query interval is recommended. If you need to change the interval to suit service deployment, set the value according to the following table.
Number of IGMP Messages Sent from Downstream Users Within Maximum Response Time Minimum General Query Interval Reference Value (Seconds)
1 to 1024 10
1024 to 2048 20
2048 to 5120 40
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 IGMP and IGMP snooping general query intervals). On Huawei modular switches, the default values of the IGMP general query interval and IGMP snooping general query interval are both 60 seconds.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

  • The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP 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 general query interval in VLAN 3 to 100 seconds.

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

igmp-snooping report-suppress

Function

The igmp-snooping report-suppress command enables suppression of IGMP Report and Leave messages in a VLAN.

The undo igmp-snooping report-suppress command disables suppression of IGMP Report and Leave messages in a VLAN.

By default, IGMP Report and Leave message suppression is disabled in a VLAN.

Format

igmp-snooping report-suppress

undo igmp-snooping report-suppress

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a Layer 2 device receives an IGMP Membership Report message (Report or Leave 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 IGMP 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.
  • A host running IGMPv2 or IGMPv3 sends a Leave message when leaving a multicast group. When a multicast group has multiple members in a VLAN, the Layer 3 device receives duplicate Leave messages from the member hosts.
After Report message suppression is enabled on a Layer 2 device, the device forwards only one IGMP Membership Report message to the upstream device in the following scenarios:
  • When the first member joins a multicast group or a host sends a Report message in response to an IGMP 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 Leave message to the upstream device. The upstream device then deletes the matching forwarding entry.

This reduces the number of IGMP messages on the network.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Configuration Impact

  • The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.

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

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

  • The functions of IGMP snooping proxy and IGMP message suppression cannot be configured in the same VLAN.

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

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

Example

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

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

igmp-snooping require-router-alert

Function

The igmp-snooping require-router-alert command configures the switch to drop the IGMP messages without the Router-Alert option in the IP header received from a VLAN.

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

By default, the switch does not check the Router-Alert option of IGMP messages and processes all the received IGMP messages, regardless of whether they carry the Router-Alert option in the IP header.

Format

igmp-snooping require-router-alert

undo igmp-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 IGMP messages contain the Router-Alert option and sends all the IGMP messages to the upper-layer routing protocol. After the igmp-snooping require-router-alert command is executed, the switch checks each IGMP message for the Router-Alert option and discards those IGMP messages without this option. This improves device performance, reduces cost, and enhances security of the upper-layer routing protocol

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.

Example

# Configure the switch to forward only the IGMP messages with the Router-Alert option in the IP header received from VLAN 3.

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

igmp-snooping robust-count

Function

The igmp-snooping robust-count command sets the IGMP robustness variable in a VLAN, which specifies how many times IGMP Query messages are sent.

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

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

Format

igmp-snooping robust-count robust-count

undo igmp-snooping robust-count

Parameters

Parameter

Description

Value

robust-count

Specifies the IGMP robustness variable in a VLAN.

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

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

  • Specify the number of times the querier sends a Group-Specific Query message, which prevents packet loss on the network.

    When receiving an IGMP Leave message for a multicast group, the switch sends a Group-Specific Query message a certain number of times (specified by the IGMP robustness variable) to check whether this group has any other members. If the quality of transmission links is low, increase the IGMP robustness variable.

  • Change the aging time of multicast group member ports.

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

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

Perform the following operations to optimize multicast service performance:

Precautions

The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.

Example

# Set the IGMP robustness variable to 5 in VLAN 3.

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

igmp-snooping router-aging-time

Function

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

The undo igmp-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

igmp-snooping router-aging-time router-aging-time

undo igmp-snooping router-aging-time

Parameters

Parameter

Description

Value

router-aging-time

Specifies the aging time of dynamic router ports in a VLAN.

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 the network, it takes a longer time to transmit Query messages from the IGMP querier to the switch. If a router port on the switch ages in this period, the switch does not send Report or Leave messages to router ports. As a result, multicast data forwarding may be interrupted. Therefore, set a long aging time for the router port if the network is unstable.

When a dynamic router port on the switch receives an IGMP Query message or a PIM Hello message, the switch resets the aging time of the router port.

  • If the router port receives an IGMP Query message, the switch sets the remaining aging time of the interface to the configured value.

  • If the router port receives a PIM Hello message, the switch sets the aging time of the interface to the holdtime value.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

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

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] igmp-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] igmp-snooping router-aging-time 300

igmp-snooping router-learning (interface view)

Function

The igmp-snooping router-learning command enables router port learning on an interface.

The undo igmp-snooping router-learning command disables router port learning on an interface.

By default, router port learning is enabled on an interface.

Format

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

undo igmp-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

Ethernet interface view, 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 IGMP snooping considers an interface as a dynamic router port when the interface receives an IGMP General Query message with any source IP address except 0.0.0.0 or a PIM Hello message. If the switch does not need to receive Query messages or PIM Hello messages from a VLAN, disable router port learning in the VLAN. A router port provides the following functions:

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

By default, router port learning is enabled on an interface. To prevent an interface from becoming a router port, disable router port learning on the interface.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

After router port learning is disabled on an interface, the interface no longer listens on IGMP Query or PIM Hello messages. Run the igmp-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 IGMP snooping has been enabled in these VLANs using the igmp-snooping enable (VLAN view) command.

You can also disable router port learning by running the undo igmp-snooping router-learning (VLAN view) command. The undo igmp-snooping router-learning (VLAN view) command is the same as the undo igmp-snooping router-learning (interface view) command only except for the scopes they take effect. The command used in the VLAN view disables router port learning on all interfaces in a VLAN, whereas the command used in the interface view disables router port learning on a specific interface in a VLAN.

Example

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

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

igmp-snooping router-learning (VLAN view)

Function

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

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

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

Format

igmp-snooping router-learning

undo igmp-snooping router-learning

Parameters

None

Views

VLAN 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 IGMP snooping considers an interface as a dynamic router port when the interface receives an IGMP General Query message with any source IP address except 0.0.0.0 or a PIM Hello message. If the switch does not need to receive Query messages or PIM Hello messages from a VLAN, disable router port learning in the VLAN. A router port provides the following functions:

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

By default, router port learning is enabled on an interface. To prevent interfaces in a VLAN from becoming a router port, disable router port learning in the VLAN.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

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

Precautions

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

You can also disable router port learning by running the undo igmp-snooping router-learning (interface view) command. The undo igmp-snooping router-learning (interface view) command is the same as the undo igmp-snooping router-learning (VLAN view) command only except for the scope they take effect. The command used in the VLAN view disables router port learning on all interfaces in a VLAN, whereas the command used in the interface view disables router port learning on a specific interface in a VLAN.

When inter-VLAN multicast replication is enabled on the switch, enable router port learning in user VLANs.

Example

# Disable router port learning in VLAN 3.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] undo igmp-snooping router-learning

igmp-snooping send-query enable

Function

The igmp-snooping send-query enable command enables the switch to send IGMP General Query messages to non-router ports when receiving topology change events.

The undo igmp-snooping send-query enable command disables the switch from sending IGMP General Query messages to non-router ports.

By default, the switch does not send IGMP General Query messages to non-router ports when receiving topology change events.

Format

igmp-snooping send-query enable

undo igmp-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 IGMP General Query messages in this case. A network topology change triggers recalculation of the ring network protocol used (such as STP, MSTP, RRPP, SEP, and Smart Link), but multicast data packets cannot be switched to the new path immediately. To enable multicast data flows to be switched to the new forwarding path immediately after a network topology change, configure the switch to send IGMP General Query messages upon topology changes.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

This command is used on a ring network. When the ring network topology changes, the switch sends IGMP General Query messages with source IP address 192.168.0.1. When this address has been occupied by another device on the network, run the igmp-snooping send-query source-address command to set the source IP address to 0.0.0.0.

Precautions

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

Example

# Configure the switch to send IGMP General Query messages upon topology changes.

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

igmp-snooping send-query source-address

Function

The igmp-snooping send-query source-address command sets the source IP address of IGMP Query messages.

The undo igmp-snooping send-query source-address command restores the default source IP address of IGMP Query messages.

By default, the source IP address of IGMP Query messages is 192.168.0.1.

Format

igmp-snooping send-query source-address ip-address

undo igmp-snooping send-query source-address

Parameters

Parameter

Description

Value

ip-address

Specifies the source IP address of IGMP Query messages.

The value is in dotted decimal notation.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

IGMP Query messages include General Query messages, Group-Specific Query messages, and Group-and-Source-Specific Query messages. A Layer 2 device sends two types of IGMP General Query messages:

By default, IGMP Query messages sent from a Layer 2 device use the source IP address 192.168.0.1. When this IP address is used by another device on the network, run the igmp-snooping send-query source-address command to change the source IP address of IGMP Query messages.

When multiple Layer 2 devices exist on a shared network, you can set source IP addresses of IGMP 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 IP address of IGMP Query messages for each device.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Example

# Set the source IP address of IGMP Query messages sent by the switch to 192.168.0.2.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] igmp-snooping send-query source-address 192.168.0.2

igmp-snooping send-router-alert

Function

The igmp-snooping send-router-alert command configures the switch to send IGMP messages with the Router-Alert option in the IP header to a VLAN.

The undo igmp-snooping send-router-alert command configures the switch to send IGMP messages without the Router-Alert option in the IP header to a VLAN.

By default, the switch sends IGMP messages with the Router-Alert option in the IP header.

Format

igmp-snooping send-router-alert

undo igmp-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 IGMP messages with the Router-Alert option. If some devices in the same VLAN as the switch can process only the IGMP messages without the Router-Alert option, use the undo igmp-snooping send-router-alert command to configure the switch to send IGMP messages without the Router-Alert option.

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

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

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

Example

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

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

igmp-snooping ssm-mapping

Function

The igmp-snooping ssm-mapping command configures the mapping between a multicast group and a multicast source in a VLAN.

The undo igmp-snooping ssm-mapping command deletes the mapping between a multicast group and a multicast source in a VLAN.

By default, no mappings between multicast groups and multicast sources exist in a VLAN.

Format

igmp-snooping ssm-mapping group-address { group-mask | mask-length } source-address

undo igmp-snooping ssm-mapping group-address { group-mask | mask-length } source-address

Parameters

Parameter

Description

Value

group-address

Specifies the IP address of a multicast group.

The value is in dotted decimal notation, and the value range is specified by the igmp-snooping ssm-policy command..

group-mask

Specifies the mask of the multicast group address.

The value is in dotted decimal notation.

mask-length

Specifies the mask length of the multicast group address.

The value is an integer that ranges from 4 to 32.

source-address

Specifies the IP address of the multicast source mapped to a multicast group.

The value is in dotted decimal notation.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The SSM mapping mechanism converts IGMPv1 and IGMPv2 Report messages into messages with (S, G) information. This mechanism enables hosts that do not support IGMPv3 to work with SSM. To use this mechanism, enable SSM mapping and configure mappings between a multicast group G and multicast sources such as S1, S2 on the Layer 2 device connected to user hosts. When the Layer 2 device receives IGMPv1 and IGMPv2 Report messages for a multicast group, it checks the group address of the messages. If the group address is in the SSM group range, the Layer 2 device converts the messages into one or more IGMPv3 IS_IN (S1, S2...) messages with the group address G.

Prerequisites

Precautions

Before configuring the mapping between a multicast group and a multicast source:

Example

# Map multicast groups 238.1.1.1 through 238.1.1.255 to multicast source 10.1.1.1 in VLAN 10.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 10
[HUAWEI-vlan10] igmp-snooping enable
[HUAWEI-vlan10] igmp-snooping version 3
[HUAWEI-vlan10] igmp-snooping ssm-mapping enable
[HUAWEI-vlan10] igmp-snooping ssm-mapping 238.1.1.0 24 10.1.1.1

igmp-snooping ssm-mapping enable

Function

The igmp-snooping ssm-mapping enable command enables Source-Specific Multicast (SSM) mapping in a VLAN.

The undo igmp-snooping ssm-mapping enable command disables SSM mapping in a VLAN.

By default, SSM mapping is disabled in a VLAN.

Format

igmp-snooping ssm-mapping enable

undo igmp-snooping ssm-mapping enable

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On an SSM network, hosts running IGMPv1 or IGMPv2 cannot select multicast sources when they join a multicast group. To provide SSM services for these hosts, enable SSM mapping on the Layer 2 devices connected to the hosts.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

Run the igmp-snooping ssm-mapping command to configure group-source mappings.

Precautions

  • If IGMP snooping is disabled in the specified VLAN, the configuration succeeds but does not take effect until IGMP snooping is enabled in the VLAN. To enable IGMP snooping in a VLAN, run the igmp-snooping enable (VLAN view) command.

  • SSM mapping is applicable only to the VLANs where IGMP snooping can process IGMPv3 messages. To set the IGMP message version to v3, use the igmp-snooping version command in the VLAN.

  • If the multicast group address is an Any-Source Multicast (ASM) address, configure an SSM group policy to add the multicast group address to the SSM group range using the igmp-snooping ssm-policy command in the VLAN view.

  • If the inter-VLAN multicast replication function is configured, you only need to configure SSM mapping in the multicast VLAN.

Example

# Enable SSM mapping in VLAN 10.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 10
[HUAWEI-vlan10] igmp-snooping enable
[HUAWEI-vlan10] igmp-snooping version 3
[HUAWEI-vlan10] igmp-snooping ssm-mapping enable

igmp-snooping ssm-policy

Function

The igmp-snooping ssm-policy command configures an SSM group policy in a VLAN to specify the range of SSM groups.

The undo igmp-snooping ssm-policy command deletes the SSM group policy from a VLAN.

By default, no SSM group policy is available in a VLAN.

Format

igmp-snooping ssm-policy basic-acl-number

undo igmp-snooping ssm-policy

Parameters

Parameter

Description

Value

basic-acl-number

Specifies the number of a basic ACL that defines the range of SSM groups.

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

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

SSM allows multicast group addresses in the range of 232.0.0.0 to 232.255.255.255. If hosts need to join multicast groups out of this range or they are allowed to join only some of multicast groups in the range, configure an SSM group range for the hosts.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

Enable SSM mapping and configure SSM mapping in the VLAN. The multicast group in the SSM mapping must be in the SSM group range.

Precautions

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

This command must reference an ACL. Before using this command, create an ACL and configure rules for the ACL. By default, the ACL applied to an SSM group policy denies all multicast groups. Therefore, to exclude specific group addresses from the SSM group address range, use a rule permit source any rule with deny rules in the ACL. For details about ACL configuration commands, see ACL Configuration Commands.

Example

# Specify multicast group 225.1.1.123 as an SSM group in VLAN 3.

<HUAWEI> system-view
[HUAWEI] acl number 2000
[HUAWEI-acl-basic-2000] rule permit source 225.1.1.123 0
[HUAWEI-acl-basic-2000] quit
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 3
[HUAWEI-vlan3] igmp-snooping enable
[HUAWEI-vlan3] igmp-snooping ssm-policy 2000

igmp-snooping static-group suppress-dynamic-join

Function

The igmp-snooping static-group suppress-dynamic-join command disables a device from forwarding IGMP Report and Leave messages that are received from a VLAN and contain a static group address to upstream Layer 3 devices configured with the static group address.

The undo igmp-snooping static-group suppress-dynamic-join command enables a device to forward IGMP Report and Leave messages that are received from a VLAN and contain a static group address to upstream Layer 3 devices configured with the static group address.

By default, a device forwards IGMP Report and Leave messages that are received from a VLAN and contain a static group address to upstream Layer 3 devices configured with the static group address.

Format

igmp-snooping static-group suppress-dynamic-join

undo igmp-snooping static-group suppress-dynamic-join

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the upstream Layer 3 multicast device is a non-Huawei device and a static group is configured on its interface connected to the device, users cannot dynamically join or leave the multicast group. You must disable the device from sending Report and Leave messages that contain static group addresses to the Layer 3 multicast device.

This function takes effect only for IGMPv1 and IGMPv2 message and is invalid for IGMPv3 messages.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

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

Example

# Disable a device from forwarding IGMP Report and Leave messages that are received from VLAN 10 and contain a static group address to upstream Layer 3 devices configured with the static group address.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 10
[HUAWEI-vlan10] igmp-snooping enable
[HUAWEI-vlan10] igmp-snooping static-group suppress-dynamic-join

igmp-snooping static-router-port

Function

The igmp-snooping static-router-port command configures an interface as a static router port in specified VLANs.

The undo igmp-snooping static-router-port command cancels the router port configuration in specified VLANs.

By default, an interface is not a static router port.

Format

igmp-snooping static-router-port vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

undo igmp-snooping static-router-port vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

Parameters

Parameter

Description

Value

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

Specifies VLAN IDs. This parameter specifies in which VLANs the current interface functions as a router port.
  • vlan-id1 specifies the first VLAN ID.
  • to vlan-id2 specifies the last VLAN ID. If to vlan-id2 is not specified, the interface functions as a router port only in the VLAN specified by vlan-id1.

The value is an integer that ranges 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

Cancels the static router port configuration in all VLANs on the interface.

-

Views

Ethernet interface view, 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 forwarding IGMP Report/Leave messages for a long time, configure the interface as a static router port.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

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

If you run the igmp-snooping static-router-port command multiple times, all the configurations take effect.

Example

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

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

igmp-snooping suppress-time

Function

The igmp-snooping suppress-time command sets the IGMP message suppression time in a VLAN.

The undo igmp-snooping suppress-time command restores the default IGMP message suppression time in a VLAN.

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

Format

igmp-snooping suppress-time suppress-time

undo igmp-snooping suppress-time

Parameters

Parameter

Description

Value

suppress-time

Specifies the IGMP message suppression time in a VLAN.

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

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To reduce the IGMP messages sent from a Layer 2 device to the upstream Layer 3 device and protect the Layer 3 device from attacks, enable the Layer 2 device to suppress IGMP Report and IGMP Leave messages sent by hosts in a VLAN. After this function is enabled, the Layer 2 device processes IGMP Report and IGMP Leave messages as follows:

  • After receiving an IGMP Report/Leave message and forwarding the message, the Layer 2 device does not forward the same type of messages to the router port within the suppression time.
  • If the Layer 2 device receives an IGMP General Query message or Group-Specific message, it does not suppress the first IGMP Report message that responds to the General Query message. In addition, the Layer 2 device resets the suppression timer when it receives the first IGMP Report message.

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Follow-up Procedure

Run the igmp-snooping max-response-time command to set the maximum response time for General Query messages. It is recommended that the suppression time be the same as the maximum response time for IGMP Query messages in a VLAN.

Precautions

The configuration takes effect only after you run the igmp-snooping enable (VLAN view) command to enable IGMP snooping in the VLAN.

The configured suppression time is invalid for IGMPv3 messages.

Example

# Set the IGMP message suppression time in VLAN 2 to 15 seconds.

<HUAWEI> system-view
[HUAWEI] igmp-snooping enable
[HUAWEI] vlan 2
[HUAWEI-vlan2] igmp-snooping enable
[HUAWEI-vlan2] igmp-snooping suppress-time 15

igmp-snooping version

Function

The igmp-snooping version command configures the version of IGMP messages that IGMP snooping can process in a VLAN.

The undo igmp-snooping version command restores the default IGMP message version.

By default, IGMP snooping can process IGMPv1 and IGMPv2 messages in a VLAN.

Format

igmp-snooping version version

undo igmp-snooping version

Parameters

Parameter

Description

Value

version

Specifies the version of IGMP messages that can be processed in a VLAN.

The value is an integer ranging from 1 to 3.
  • 1: indicates that IGMP snooping processes only IGMPv1 messages.
  • 2: indicates that IGMP snooping processes IGMPv1 and IGMPv2 messages.
  • 3: indicates that IGMP snooping processes IGMPv1, IGMPv2, and IGMPv3 messages.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

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

Prerequisites

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

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

When MAC address-based forwarding is used in a VLAN, the IGMP message version cannot be set to IGMPv3.

This command cannot be used in user VLANs of a multicast VLAN.

If the IGMP message version is changed from IGMPv3 to IGMPv2, the system deletes all the dynamic IGMP snooping entries when the aging time expires and processes static IGMP snooping entries as follows:
  • Does not delete static entries that have only multicast groups and no multicast sources.
  • Deletes the static entries that have both multicast groups and multicast sources. When the IGMP message version is restored to IGMPv3, the system restores these entries.

Example

# Set the version of the IGMP messages that can be processed by IGMP snooping to IGMPv1 in VLAN 2.

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

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

l2-multicast static-group

Function

The l2-multicast static-group command configures static group memberships on an interface.

The undo l2-multicast static-group command deletes static group memberships from an interface.

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

Format

# Configure a single static multicast group:

l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

undo l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address vlan { all | { vlan-id1 [ to vlan-id2 ] } &<1-10> }

# Configure a series of static multicast groups:

l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address1 to group-ip-address2 vlan vlan-id

undo l2-multicast static-group [ source-address source-ip-address ] group-address group-ip-address1 to group-ip-address2 vlan vlan-id

undo l2-multicast static-group [ source-address source-ip-address ] group-address all vlan { all | { vlan-id1 [ to vlan-id2 ] } &<1-10> }

Parameters

Parameter

Description

Value

source-address source-ip-address

Specifies the IP address of a multicast source.

The value of source-ip-address can be any Class A, Class B, or Class C address, in dotted decimal notation.

group-address group-ip-address

Specifies the IP address of a multicast group.

The value of group-ip-address ranges from 224.0.1.0 to 239.255.255.255 in dotted decimal notation.

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

Specifies the VLANs that the interface belongs to. vlan-id1 [ to vlan-id2 ] specifies a range of VLAN IDs.
  • vlan-id1 specifies the first VLAN ID.
  • to vlan-id2 specifies the last VLAN ID. If to vlan-id2 is not specified, the interface is bound only to the multicast group in the VLAN specified by vlan-id1.

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

vlan-id2 must be larger than vlan-id1.

all

Deletes all group memberships from the interface.
  • In group-address all, all indicates that the interface is removed from all multicast groups.
  • In vlan { all | {vlan-id1 [ to vlan-id2 ] } &<1-10> }, all indicates that the interface is removed from multicast groups in all VLANs.

-

group-ip-address1 to group-ip-address2

Configures multiple static group memberships on the interface. group-ip-address1 and group-ip-address2 identify a range of multicast group addresses.

The value ranges from 224.0.1.0 to 239.255.255.255, in dotted decimal notation.

The values of group-ip-address1 and group-ip-address2 must be in the same network segment (with a 24-bit mask).

Views

Ethernet interface view, 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 protocols, you can configure static Layer 2 multicast forwarding entries by binding interfaces to multicast groups. After an interface is statically bound to a multicast group, users connected to this interface can receive multicast data of the multicast group over a long time. The interface then becomes a static member interface.

Configuring static member interfaces has the following advantages:

  • 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

IGMP snooping has been enabled globally using the igmp-snooping enable (system view) command.

Precautions

The configuration takes effect only when both the following conditions are met:
  • IGMP snooping is enabled in the specified VLANs using the igmp-snooping enable (VLAN view).
  • The specified VLANs have been created and the interface has been added to these VLANs.
  • The specified group address is not a reserved group address.

Example

# Configure a static multicast group 224.1.1.1 on GE1/0/1 in VLAN 2.

<HUAWEI> system-view
[HUAWEI] igmp-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] l2-multicast static-group group-address 224.1.1.1 vlan 2

# Configure static multicast groups 224.1.1.1 to 224.1.1.3 on GE1/0/1 in VLAN 2.

<HUAWEI> system-view
[HUAWEI] igmp-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] l2-multicast static-group group-address 224.1.1.1 to 224.1.1.3 vlan 2

# Delete static multicast group 224.1.1.1 from GE1/0/1 in all VLANs.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] undo l2-multicast static-group group-address 224.1.1.1 vlan all

multicast drop-unknown

Function

The multicast drop-unknown command configures the switch to drop 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 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 dropped, including the protocol packets that are transparently transmitted within the VLAN and use the reserved multicast address.

Example

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

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

Ethernet interface view, 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 igmp-snooping group

Function

The reset igmp-snooping group command deletes dynamic group memberships learned by IGMP snooping.

Format

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

Parameters

Parameter

Description

Value

all

Deletes all dynamic group memberships learned by IGMP snooping.

-

vlan { all | vlan-id }

Deletes the dynamic group memberships of a specified VLAN. If all is specified, the system deletes IGMP dynamic group memberships of all VLANs.

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

source-address source-address

Deletes the dynamic group memberships of a specified source address.

The multicast source address is a Class A, Class B, or Class C IP address on a nature network segment. The value is in dotted decimal notation.

group-address group-address

Deletes the dynamic group memberships of a specified group address.

The value of group-address ranges from 224.0.1.0 to 239.255.255.255 in dotted decimal notation.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When multicast groups on a network change, 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 igmp-snooping group command to delete existing group memberships.

Precautions

Deleting group memberships in a VLAN temporarily interrupts multicast forwarding in the VLAN. The switch generates new forwarding entries only when receiving IGMP 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 IGMP snooping enabled and is invalid for a VLAN if IGMP is enabled on the corresponding VLANIF interface.

Example

# Delete all dynamic group memberships learned by IGMP snooping.

<HUAWEI> reset igmp-snooping group all

# Delete dynamic group memberships in VLAN 3.

<HUAWEI> reset igmp-snooping group vlan 3

reset igmp-snooping statistics

Function

The reset igmp-snooping statistics command clears IGMP snooping statistics.

Format

reset igmp-snooping statistics { all | vlan { all | vlan-id } }

Parameters

Parameter

Description

Value

all

Clears all the IGMP snooping statistics.

-

vlan { all | vlan-id }

Clears IGMP snooping statistics of a specified VLAN. If all is specified, the system clears IGMP snooping statistics of all VLANs.

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

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

Precautions

The cleared IGMP snooping statistics cannot be restored.

Example

# Clear IGMP snooping statistics of VLAN 2.

<HUAWEI> reset igmp-snooping statistics vlan 2
Translation
Download
Updated: 2019-10-18

Document ID: EDOC1000178288

Views: 25574

Downloads: 109

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