- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-IGMP snooping configuration | 271.11 KB |
Basic concepts in IGMP snooping
IGMP snooping configuration task list
Configuring basic IGMP snooping functions
Specifying the IGMP snooping version
Setting the maximum number of IGMP snooping forwarding entries
Configuring parameters for IGMP queries and responses
Configuring IGMP snooping port functions
Setting aging timers for dynamic ports
Enabling IGMP snooping fast-leave processing
Configuring IGMP snooping policies
Configuring a multicast group filter
Enabling dropping unknown multicast data in a VLAN
Setting the maximum number of multicast groups on a port
Enabling the multicast group replacement function
Displaying and maintaining IGMP snooping
IGMP snooping configuration examples
Group policy configuration example
Static port configuration example
Layer 2 multicast forwarding cannot function
Multicast group filter does not work
Overview
IGMP snooping enables Layer 2 switches to establish a Layer 2 multicast forwarding table instead of flooding all multicast packets. To populate the Layer 2 multicast forwarding table, IGMP snooping listens to IGMP messages exchanged between a Layer 3 multicast device and hosts.
As shown in Figure 1, without IGMP snooping enabled, the Layer 2 switch floods multicast packets to all devices. With IGMP snooping enabled, the Layer 2 switch forwards multicast packets of known multicast groups to only the receivers that require the data at Layer 2. This feature improves bandwidth efficiency, enhances multicast security, and helps per-host accounting for multicast users.
Figure 1 Multicast packet transmission without and with IGMP snooping
The switch operates in IRF or standalone (the default) mode. For more information about the IRF mode, see IRF Configuration Guide.
Basic concepts in IGMP snooping
IGMP snooping related ports
As shown in Figure 2, IGMP snooping runs on Switch A and Switch B, and Host A and Host C are receiver hosts as members of a multicast group.
Figure 2 IGMP snooping related ports
The following describes the ports involved in IGMP snooping:
· Router port—Layer 3 multicast device-side port. Layer 3 multicast devices include designated routers (DRs) and IGMP queriers. In Figure 2, GigabitEthernet 3/0/1 of Switch A and Switch B are the router ports. A switch registers all its router ports in the router port list.
Do not confuse the "router port" in IGMP snooping with the "routed interface" commonly known as the "Layer 3 interface." The router port in IGMP snooping is the Layer 2 interface.
· Member port—Multicast receiver-side port. In Figure 2, GigabitEthernet 3/0/2 and GigabitEthernet 3/0/3 of Switch A and GigabitEthernet 3/0/2 of Switch B are the member ports. A switch registers all its member ports in the IGMP snooping forwarding table.
Unless otherwise specified, router ports and member ports in this document include both static and dynamic router ports and member ports.
|
NOTE: With IGMP snooping, all ports that receive PIM hello messages or IGMP general queries with the source addresses other than 0.0.0.0 are dynamic router ports. For more information about PIM hello messages, see "Configuring PIM." |
Aging timers for dynamic ports in IGMP snooping
Timer |
Description |
Message received before the timer expires |
Action after the timer expires |
Dynamic router port aging timer. |
For each dynamic router port, the switch sets an aging timer. When the timer expires, the dynamic router port ages out. |
IGMP general query with the source address other than 0.0.0.0 or PIM hello message. |
The switch removes the port from its router port list. |
Dynamic member port aging timer. |
When a port dynamically joins a multicast group, the switch starts an aging timer for the port. When the timer expires, the dynamic member port ages out. |
IGMP membership report. |
The switch removes the port from the IGMP snooping forwarding table. |
|
NOTE: In IGMP snooping, only dynamic ports age out. Static ports never age out. |
How IGMP snooping works
An IGMP snooping-enabled switch performs different actions when it receives different IGMP messages.
The ports in this section are dynamic ports. For information about how to configure and remove static ports, see "Configuring static ports."
When receiving a general query
The IGMP querier periodically sends IGMP general queries to all hosts and routers identified by the address 224.0.0.1 on the local subnet to determine whether any active multicast group members exist on the subnet.
After receiving an IGMP general query, the switch forwards the query to all ports in the VLAN except the port that received the query. The switch also performs one of the following actions:
· If the receiving port is a dynamic router port in the router port list, the switch restarts the aging timer for the port.
· If the receiving port does not exist in the router port list, the switch adds the port to the router port list, and starts an aging timer for the port.
When receiving a membership report
A host sends an IGMP report to the IGMP querier for the following purposes:
· Responds to queries if the host is a multicast group member.
· Applies for a multicast group membership.
After receiving an IGMP report from the host, the switch forwards it through all the router ports in the VLAN, resolves the address of the reported multicast group, and performs one of the following actions:
· If no forwarding entry matches the group address, the switch creates a forwarding entry for the group, adds the receiving port as a dynamic member port to the forwarding entry, and starts an aging timer for the port.
· If a forwarding entry matches the group address, but the receiving port is not in the forwarding entry for the group, the switch adds the port as a dynamic member port to the forwarding entry, and starts an aging timer for the port.
· If a forwarding entry matches the group address and the receiving port is in the forwarding entry for the group, the switch restarts the aging timer for the port.
In an application with a group filter configured on an IGMP snooping-enabled switch, when a user requests a multicast program, the user's host initiates an IGMP report. After receiving this report, the switch resolves the multicast group address in the report and looks up the ACL. If a match is found to permit the port that received the report to join the multicast group, the switch creates an IGMP snooping forwarding entry for the multicast group and adds the port to the forwarding entry. Otherwise, the switch drops this report, in which case the multicast data for the multicast group is not sent to this port, and the user cannot retrieve the program.
A switch does not forward an IGMP report through a non-router port. If the switch forwards a report message through a member port, the IGMP report suppression mechanism causes all attached hosts that monitor the reported multicast address to suppress their own reports. In this case, the switch cannot determine whether the reported multicast group still has active members attached to that port. For more information about the IGMP report suppression mechanism, see "Configuring IGMP."
When receiving a leave message
An IGMPv1 host silently leaves a multicast group, and the switch is not notified of the leave. However, because the host stops sending IGMP reports as soon as it leaves the multicast group, the switch removes the port that connects to the host from the forwarding entry for the multicast group when the aging timer for the port expires.
An IGMPv2 or IGMPv3 host sends an IGMP leave message to the multicast router when it leaves a multicast group.
When the switch receives an IGMP leave message on a dynamic member port, the switch first examines whether a forwarding entry matches the group address in the message, and, if a match is found, whether the forwarding entry for the group contains the dynamic member port.
· If no forwarding entry matches the group address, or if the forwarding entry does not contain the port, the switch directly discards the IGMP leave message.
· If a forwarding entry matches the group address and the forwarding entry contains the port, the switch forwards the leave message to all router ports in the VLAN. Because the switch does not know whether any other hosts attached to the port are still listening to that group address, the switch does not immediately remove the port from the forwarding entry for that group. Instead, it adjusts the aging timer for the port.
After receiving the IGMP leave message, the IGMP querier resolves the multicast group address in the message and sends an IGMP group-specific query to the multicast group through the port that received the leave message. After receiving the IGMP group-specific query, the switch forwards it through all its router ports in the VLAN and all member ports of the multicast group. The switch also performs the following judgment for the port that received the IGMP leave message:
· If the port (assuming that it is a dynamic member port) receives an IGMP report in response to the group-specific query before its aging timer expires, it indicates that some host attached to the port is receiving or expecting to receive multicast data for the multicast group. The switch restarts the aging timer for the port.
· If the port receives no IGMP report in response to the group-specific query before its aging timer expires, it indicates that no hosts attached to the port are still listening to that group address. The switch removes the port from the forwarding entry for the multicast group after the aging timer for the port expires.
Protocols and standards
RFC 4541, Considerations for Internet Group Management Protocol (IGMP) and Multicast Listener Discovery (MLD) Snooping Switches
IGMP snooping configuration task list
Task at a glance |
|
Configuring basic IGMP snooping functions · (Required.) Enabling IGMP snooping · (Optional.) Specifying the IGMP snooping version · (Optional.) Setting the maximum number of IGMP snooping forwarding entries · (Optional.) Configuring parameters for IGMP queries and responses |
|
Configuring IGMP snooping port functions · (Optional.) Setting aging timers for dynamic ports · (Optional.) Configuring static ports · (Optional.) Enabling IGMP snooping fast-leave processing |
|
Configuring IGMP snooping policies · (Optional.) Configuring a multicast group filter · (Optional.) Enabling dropping unknown multicast data in a VLAN · (Optional.) Setting the maximum number of multicast groups on a port · (Optional.) Enabling the multicast group replacement function |
|
For IGMP snooping, the configurations made on a Layer 2 aggregate interface do not interfere with the configurations on its member ports, and they do not take part in aggregation calculations. The configuration made on a member port of the aggregate group takes effect after the port leaves the aggregate group.
Configuring basic IGMP snooping functions
Before you configure basic IGMP snooping functions, complete the following tasks:
· Configure the corresponding VLANs.
· Determine the IGMP snooping version.
· Determine the IGMP last-member query interval.
· Determine the maximum response delay for IGMP general queries.
Enabling IGMP snooping
When you enable IGMP snooping, follow these guidelines:
· You must enable IGMP snooping globally before you enable it for a VLAN.
· IGMP snooping for a VLAN works only on the ports in that VLAN.
· If you execute the igmp enable command or the pim sm command on the VLAN interface, IGMP snooping does not take effect in this VLAN.
To enable IGMP snooping:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable IGMP snooping globally and enter IGMP-snooping view. |
igmp-snooping |
By default, IGMP snooping is disabled. |
3. Return to system view. |
quit |
N/A |
4. Enter VLAN view. |
vlan vlan-id |
N/A |
5. Enable IGMP snooping for the VLAN. |
igmp-snooping enable |
By default, IGMP snooping for a VLAN is disabled. |
Specifying the IGMP snooping version
Different versions of IGMP snooping can process different versions of IGMP messages.
· IGMPv2 snooping can process IGMPv1 and IGMPv2 messages, but it floods IGMPv3 messages in the VLAN instead of processing them.
· IGMPv3 snooping can process IGMPv1, IGMPv2, and IGMPv3 messages.
If you change IGMPv3 snooping to IGMPv2 snooping, the device does the following:
· Clears all IGMP snooping forwarding entries that are dynamically added.
· Keeps static IGMPv3 snooping forwarding entries (*, G).
· Clears static IGMPv3 snooping forwarding entries (S, G), which will be restored when IGMP snooping is switched back to IGMPv3 snooping.
For more information about static IGMP snooping forwarding entries, see "Configuring static ports."
To specify the IGMP snooping version:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter VLAN view. |
vlan vlan-id |
N/A |
3. Specify the version of IGMP snooping. |
igmp-snooping version version-number |
The default setting is IGMPv2 snooping. |
Setting the maximum number of IGMP snooping forwarding entries
You can modify the maximum number of IGMP snooping forwarding entries. When the number of forwarding entries on the device reaches the upper limit, the device does not automatically remove any existing entries or create new entries until some entries time out or are removed. In this case, H3C recommends that you manually remove the excessive entries.
To set the maximum number of IGMP snooping forwarding entries:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter IGMP-snooping view. |
igmp-snooping |
N/A |
3. Set the maximum number of IGMP snooping forwarding entries. |
entry-limit limit |
The default setting is 4294967295. |
Configuring parameters for IGMP queries and responses
When a multicast listening host receives an IGMP query (general query or group-specific query), it starts a timer for each multicast group that it has joined. This timer is initialized to a random value in the range of 0 to the maximum response time advertised in the IGMP query message. When the timer value decreases to 0, the host sends an IGMP report to the multicast group.
To speed up the response of hosts to IGMP queries and avoid simultaneous timer expirations causing IGMP report traffic bursts, you must properly set the maximum response time.
· The maximum response time for IGMP general queries is set by the max-response-time command.
· The maximum response time for IGMP group-specific queries is the same as the IGMP last-member query interval, which is set by the last-member-query-interval command.
You can configure parameters for IGMP queries and responses either for the current VLAN in VLAN view or globally for all VLANs in IGMP-snooping view. If the two configurations are made in both VLAN view and IGMP-snooping view, the configuration made in VLAN view takes priority.
Configuring parameters for IGMP queries and responses globally
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter IGMP-snooping view. |
igmp-snooping |
N/A |
3. Set the maximum response time for IGMP general queries. |
max-response-time interval |
The default setting is 10 seconds. |
4. Set the IGMP last-member query interval. |
last-member-query-interval interval |
The default setting is 1 second. |
Configuring parameters for IGMP queries and responses in a VLAN
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter VLAN view. |
vlan vlan-id |
N/A |
3. Set the maximum response time for IGMP general queries in the VLAN. |
igmp-snooping max-response-time interval |
The default setting is 10 seconds. |
4. Set the IGMP last-member query interval. |
igmp-snooping last-member-query-interval interval |
The default setting is 1 second. |
Configuring IGMP snooping port functions
Before you configure IGMP snooping port functions, complete the following tasks:
· Enable IGMP snooping for the VLAN.
· Determine the aging timer for dynamic router ports.
· Determine the aging timer for dynamic member ports.
· Determine the addresses of the multicast group and multicast source.
Setting aging timers for dynamic ports
When you set aging timers for dynamic ports, follow these guidelines:
· If the memberships of multicast groups frequently change, you can set a relatively small value for the aging timer of the dynamic member ports. If the memberships of multicast groups rarely change, you can set a relatively large value.
· If a dynamic router port receives a PIMv2 hello message, the aging timer for the port is the timer in the hello message rather than the timer configured by using the router-aging-time command or the igmp-snooping router-aging-time command.
· You can set the aging timers for dynamic ports either for the current VLAN in VLAN view or globally for all VLANs in IGMP-snooping view. If the configurations are made in both VLAN view and IGMP-snooping view, the configuration made in VLAN view takes priority.
Setting the aging timers for dynamic ports globally
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter IGMP-snooping view. |
igmp-snooping |
N/A |
3. Set the aging timer for dynamic router ports globally. |
router-aging-time interval |
The default setting is 260 seconds. |
4. Set the global aging timer for dynamic member ports globally. |
host-aging-time interval |
The default setting is 260 seconds. |
Setting the aging timers for the dynamic ports in a VLAN
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter VLAN view. |
vlan vlan-id |
N/A |
3. Set the aging timer for the dynamic router ports in the VLAN. |
igmp-snooping router-aging-time interval |
The default setting is 260 seconds. |
4. Set the aging timer for the dynamic member ports in the VLAN. |
igmp-snooping host-aging-time interval |
The default setting is 260 seconds. |
Configuring static ports
If all hosts attached to a port are interested in the multicast data addressed to a particular multicast group or the multicast data that a particular multicast source sends to a particular group, you can configure the port as a static member port for the specified multicast group or the specified multicast source and group.
You can also configure a port as a static router port, through which the switch can forward all the multicast traffic it receives.
When you configure static ports, follow these guidelines:
· A static member port does not respond to queries from the IGMP querier. When you configure a port as a static member port or cancel this configuration on the port, the port does not send unsolicited IGMP reports or IGMP leave messages.
· Static member ports and static router ports never age out. To remove such a port, use the corresponding undo command.
To configure static ports:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view. |
interface interface-type interface-number |
N/A |
3. Configure the port as a static member port. |
igmp-snooping static-group group-address [ source-ip source-address ] vlan vlan-id |
By default, a port is not a static member port. |
4. Configure the port as a static router port. |
igmp-snooping static-router-port vlan vlan-id |
By default, a port is not a static router port. |
Enabling IGMP snooping fast-leave processing
The IGMP snooping fast-leave processing feature enables the switch to process IGMP leave messages quickly. When a port that is enabled with the IGMP snooping fast-leave processing feature receives an IGMP leave message, the switch immediately removes that port from the forwarding entry for the multicast group specified in the message. Then, when the switch receives IGMP group-specific queries for that multicast group, it does not forward them to that port.
When you enable the IGMP snooping fast-leave processing feature, follow these guidelines:
· In a VLAN, you can enable IGMP snooping fast-leave processing on ports that have only one receiver host attached. If a port has multiple hosts attached, you should not enable IGMP snooping fast-leave processing on this port. Otherwise, other receiver hosts attached to this port in the same multicast group cannot receive the multicast data destined to this group.
· You can enable IGMP snooping fast-leave processing either for the current port in proper interface view or globally for all ports in IGMP-snooping view. If the configurations are made both in interface view and IGMP-snooping view, the configuration made in interface view takes priority.
To enable IGMP snooping fast-leave processing globally:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter IGMP-snooping view. |
igmp-snooping |
N/A |
3. Enable IGMP snooping fast-leave processing globally. |
fast-leave [ vlan vlan-list ] |
By default, fast-leave processing is disabled. |
To enable IGMP snooping fast-leave processing on a port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view. |
interface interface-type interface-number |
N/A |
3. Enable IGMP snooping fast-leave processing on the port. |
igmp-snooping fast-leave [ vlan vlan-list ] |
By default, fast-leave processing is disabled. |
Configuring IGMP snooping policies
Before you configure IGMP snooping policies, complete the following tasks:
· Enable IGMP snooping for the VLAN.
· Determine the ACL used as the multicast group filter.
· Determine the maximum number of multicast groups that a port can join.
Configuring a multicast group filter
When you configure a multicast group filter, follow these guidelines:
· This configuration is effective for the multicast groups that a port dynamically joins. If you configure the port as a static member port for a multicast group, this configuration is not effective for the multicast group.
· You can configure a multicast filter either for the current port in proper interface view or globally for all ports in IGMP-snooping view. If the configurations are made in both interface view and IGMP-snooping view, the configuration made in interface view takes priority.
Configuring a multicast group filter globally
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter IGMP-snooping view. |
igmp-snooping |
N/A |
3. Configure a multicast group filter globally. |
group-policy acl-number [ vlan vlan-list ] |
By default, no multicast group filter is configured, which means a host can join any valid multicast group. |
Configuring a multicast group filter on a port
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view. |
interface interface-type interface-number |
N/A |
3. Configure a multicast group filter on a port. |
igmp-snooping group-policy acl-number [ vlan vlan-list ] |
By default, no multicast group filter is configured on a port, which means the hosts on this port can join any valid multicast group. |
Enabling dropping unknown multicast data in a VLAN
Unknown multicast data refers to multicast data for which no forwarding entries exist in the IGMP snooping forwarding table. When the switch receives such multicast data on a router port, one of the following occurs:
· When the function of dropping unknown multicast data is disabled, the switch floods unknown multicast data in the VLAN that the data belongs to.
· When the function of dropping unknown multicast data is enabled, the switch forwards unknown multicast data to other router ports instead of flooding it in the current VLAN.
To enable dropping unknown multicast data for a VLAN:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter VLAN view. |
vlan vlan-id |
N/A |
3. Enable dropping unknown multicast data for the VLAN. |
igmp-snooping drop-unknown |
By default, this function is disabled. Unknown multicast data is flooded. |
Setting the maximum number of multicast groups on a port
You can set the maximum number of multicast groups on a port to regulate the port traffic.
When you set the maximum number of multicast groups on a port, follow these guidelines:
· This configuration is effective for the multicast groups that a port dynamically joins. If you configure the port as a static member port for a multicast group, this configuration is not effective for the multicast group.
· If the number of multicast groups on a port exceeds the limit, the system removes all the forwarding entries related to that port from the IGMP snooping forwarding table. The receiver hosts attached to that port can join multicast groups again before the number of multicast groups on the port reaches the limit.
To set the maximum number of multicast groups on a port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view. |
interface interface-type interface-number |
N/A |
3. Set the maximum number of multicast groups on a port. |
igmp-snooping group-limit limit [ vlan vlan-list ] |
The default setting is 4294967295. |
Enabling the multicast group replacement function
When the number of multicast groups on a switch or a port exceeds the limit:
· If the multicast group replacement is enabled, the switch or the port replaces an existing multicast group with a newly joined multicast group.
· If the multicast group replacement is disabled, the switch or the port discards IGMP reports that are used for joining a new multicast group.
In some specific applications, such as channel switching, a newly joined multicast group must automatically replace an existing multicast group. In this case, the function of multicast group replacement must also be enabled so a user can switch from the current multicast group to a new group.
When you enable the multicast group replacement function, follow these guidelines:
· This configuration is effective for the multicast groups that a port dynamically joins. If you configure the port as a static member port for a multicast group, this configuration is not effective for the multicast group.
· You can enable the multicast group replacement function either for the current port in proper interface view or globally for all ports in IGMP-snooping view. If the configurations are made in both interface view and IGMP-snooping view, the configuration made in interface view takes priority.
To enable the multicast group replacement function globally:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter IGMP-snooping view. |
igmp-snooping |
N/A |
3. Enable the multicast group replacement function globally. |
overflow-replace [ vlan vlan-list ] |
By default, the multicast group replacement function is disabled. |
To enable the multicast group replacement function on a port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view. |
interface interface-type interface-number |
N/A |
3. Enable multicast group replacement function on a port. |
igmp-snooping overflow-replace [ vlan vlan-list ] |
By default, the multicast group replacement function is disabled. |
Displaying and maintaining IGMP snooping
Execute display commands in any view and reset commands in user view.
Command |
|
Display IGMP snooping status. |
display igmp-snooping [ global | vlan vlan-id ] |
Display information about dynamic IGMP snooping forwarding entries (in standalone mode). |
display igmp-snooping group [ group-address | source-address ] * [ vlan vlan-id ] [ verbose ] [ slot slot-number ] |
Display information about dynamic IGMP snooping forwarding entries (in IRF mode). |
display igmp-snooping group [ group-address | source-address ] * [ vlan vlan-id ] [ verbose ] [ chassis chassis-number slot slot-number ] |
Display information about static IGMP snooping forwarding entries (in standalone mode). |
display igmp-snooping static-group [ group-address | source-address ] * [ vlan vlan-id ] [ verbose ] [ slot slot-number ] |
Display information about static IGMP snooping forwarding entries (in IRF mode). |
display igmp-snooping static-group [ group-address | source-address ] * [ vlan vlan-id ] [ verbose ] [ chassis chassis-number slot slot-number ] |
Display information about dynamic router ports (in standalone mode). |
display igmp-snooping router-port [ vlan vlan-id ] [ slot slot-number ] |
Display information about dynamic router ports (n IRF mode). |
display igmp-snooping router-port [ vlan vlan-id ] [ chassis chassis-number slot slot-number ] |
Display information about static router ports (in standalone mode). |
display igmp-snooping static-router-port [ vlan vlan-id ] [ slot slot-number ] |
Display information about static router ports (in IRF mode). |
display igmp-snooping static-router-port [ vlan vlan-id ] [ chassis chassis-number slot slot-number ] |
Display statistics for the IGMP messages learned by IGMP snooping. |
display igmp-snooping statistics |
Display information about Layer 2 multicast forwarding entries (in standalone mode). |
display l2-multicast forwarding-table [ group group-address | source source-address ] * [ vlan vlan-id ] [ slot slot-number ] |
Display information about Layer 2 multicast forwarding entries (in IRF mode). |
display l2-multicast forwarding-table [ group group-address | source source-address ] * [ vlan vlan-id ] [ chassis chassis-number slot slot-number ] |
Display information about MAC address multicast forwarding entries (in standalone mode). |
display l2-multicast mac-forwarding-table [ mac-address ] [ vlan vlan-id ] [ slot slot-number ] |
Display information about MAC address multicast forwarding entries (in IRF mode). |
display l2-multicast mac-forwarding-table [ mac-address ] [ vlan vlan-id ] [ chassis chassis-number slot slot-number ] |
Remove the dynamic IGMP snooping forwarding entries for the specified multicast groups. |
reset igmp-snooping group { group-address [ source-address ] | all } [ vlan vlan-id ] |
Remove dynamic router ports. |
reset igmp-snooping router-port { all | vlan vlan-id } |
Clear statistics for the IGMP messages learned by IGMP snooping. |
reset igmp-snooping statistics |
IGMP snooping configuration examples
|
IMPORTANT: By default, Ethernet interfaces, VLAN interfaces, and aggregate interfaces are in the state of DOWN. To configure such an interface, use the undo shutdown command to bring it up first. |
Group policy configuration example
Network requirements
As shown in Figure 3, Router A runs IGMPv2 and serves as the IGMP querier, and Switch A runs IGMPv2 snooping.
To enable Host A and Host B to receive only the multicast data addressed to the multicast group 224.1.1.1, configure IGMP snooping on Switch A and enable the switch to drop unknown multicast data instead of flooding it in VLAN 100.
Configuration procedure
1. Assign an IP address and subnet mask to each interface according to Figure 3. (Details not shown.)
2. On Router A, enable IP multicast routing globally, enable IGMP on GigabitEthernet 3/0/1, and enable PIM-DM on each interface.
<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface GigabitEthernet 3/0/1
[RouterA-GigabitEthernet3/0/1] igmp enable
[RouterA-GigabitEthernet3/0/1] pim dm
[RouterA-GigabitEthernet3/0/1] quit
[RouterA] interface GigabitEthernet 3/0/2
[RouterA-GigabitEthernet3/0/2] pim dm
[RouterA-GigabitEthernet3/0/2] quit
3. Configure Switch A:
# Enable IGMP snooping globally.
<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit
# Create VLAN 100, assign GigabitEthernet 3/0/1 through GigabitEthernet 3/0/4 to the VLAN, and enable IGMP snooping and the function of dropping unknown multicast data for the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port GigabitEthernet 3/0/1 to GigabitEthernet 3/0/4
[SwitchA-vlan100] igmp-snooping enable
[SwitchA-vlan100] igmp-snooping drop-unknown
[SwitchA-vlan100] quit
# Configure a multicast group filter so that the hosts in VLAN 100 can join only the multicast group 224.1.1.1.
[SwitchA] acl number 2001
[SwitchA-acl-basic-2001] rule permit source 224.1.1.1 0
[SwitchA-acl-basic-2001] quit
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] group-policy 2001 vlan 100
[SwitchA-igmp-snooping] quit
Verifying the configuration
Assume that Host A and Host B want to join the multicast groups 224.1.1.1 and 224.2.2.2 to receive the multicast data from the multicast source.
# Display information about the dynamic IGMP snooping forwarding entries in VLAN 100 on Switch A.
[SwitchA] display igmp-snooping group vlan 100
Total 1 entries.
VLAN 100: Total 1 entries.
(0.0.0.0, 224.1.1.1)
Host slots (1 in total):
3
Host ports (2 in total):
GE3/0/3 (00:03:23)
GE3/0/4 (00:04:10)
The output shows that Host A and Host B have joined the multicast group 224.1.1.1(through the member ports GigabitEthernet 3/0/4/4 and GigabitEthernet 3/0/3 on Switch A), but the two hosts have failed to join the multicast group 224.2.2.2.
Static port configuration example
Network requirements
As shown in Figure 4, Router A runs IGMPv2 and serves as the IGMP querier, and Switch A, Switch B, and Switch C run IGMPv2 snooping.
Host A and host C are permanent receivers of multicast group 224.1.1.1. Configure GigabitEthernet 3/0/3 and GigabitEthernet 3/0/5 on Switch C as static member ports for multicast group 224.1.1.1 to enhance the reliability of multicast traffic transmission.
Suppose the STP runs on the network. To avoid data loops, the forwarding path from Switch A to Switch C is blocked under normal conditions, and multicast data flows to the receivers attached to Switch C only along the path of Switch A—Switch B—Switch C.
Configure GigabitEthernet 3/0/3 on Switch A as a static router port, so that multicast data can flow to the receivers nearly uninterruptedly along the path of Switch A—Switch C when the path of Switch A—Switch B—Switch C is blocked.
|
NOTE: If no static router port is configured, when the path of Switch A—Switch B—Switch C is blocked, at least one IGMP query-response cycle must be completed before the multicast data can flow to the receivers along the new path of Switch A—Switch C, so multicast delivery is interrupted during this process. |
For more information about the STP, see Layer 2—LAN Switching Configuration Guide.
Configuration procedure
1. Assign an IP address and subnet mask to each interface as shown in Figure 4. (Details not shown.)
2. On Router A, enable IP multicast routing globally, enable IGMP on GigabitEthernet 3/0/1, and enable PIM-DM on each interface.
<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface GigabitEthernet 3/0/1
[RouterA-GigabitEthernet3/0/1] igmp enable
[RouterA-GigabitEthernet3/0/1] pim dm
[RouterA-GigabitEthernet3/0/1] quit
[RouterA] interface GigabitEthernet 3/0/2
[RouterA-GigabitEthernet3/0/2] pim dm
[RouterA-GigabitEthernet3/0/2] quit
3. Configure Switch A:
# Enable IGMP snooping globally.
<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit
# Create VLAN 100, assign GigabitEthernet 3/0/1 through GigabitEthernet 3/0/3 to the VLAN, and enable IGMP snooping for the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port GigabitEthernet 3/0/1 to GigabitEthernet 3/0/3
[SwitchA-vlan100] igmp-snooping enable
[SwitchA-vlan100] quit
# Configure GigabitEthernet 3/0/3 as a static router port.
[SwitchA] interface GigabitEthernet 3/0/3
[SwitchA-GigabitEthernet3/0/3] igmp-snooping static-router-port vlan 100
[SwitchA-GigabitEthernet3/0/3] quit
4. Configure Switch B:
# Enable IGMP snooping globally.
<SwitchB> system-view
[SwitchB] igmp-snooping
[SwitchB-igmp-snooping] quit
# Create VLAN 100, assign GigabitEthernet 3/0/1 and Ethernet GigabitEthernet 3/0/2 to the VLAN, and enable IGMP snooping for the VLAN.
[SwitchB] vlan 100
[SwitchB-vlan100] port GigabitEthernet 3/0/1 GigabitEthernet 3/0/2
[SwitchB-vlan100] igmp-snooping enable
[SwitchB-vlan100] quit
5. Configure Switch C:
# Enable IGMP snooping globally.
<SwitchC> system-view
[SwitchC] igmp-snooping
[SwitchC-igmp-snooping] quit
# Create VLAN 100, assign GigabitEthernet 3/0/1 through GigabitEthernet 3/0/5 to the VLAN, and enable IGMP snooping for the VLAN.
[SwitchC] vlan 100
[SwitchC-vlan100] port GigabitEthernet 3/0/1 to GigabitEthernet 3/0/5
[SwitchC-vlan100] igmp-snooping enable
[SwitchC-vlan100] quit
# Configure GigabitEthernet 3/0/3 and GigabitEthernet 3/0/5 as static member ports for multicast group 224.1.1.1.
[SwitchC] interface GigabitEthernet 3/0/3
[SwitchC-GigabitEthernet3/0/3] igmp-snooping static-group 224.1.1.1 vlan 100
[SwitchC-GigabitEthernet3/0/3] quit
[SwitchC] interface GigabitEthernet 3/0/5
[SwitchC-GigabitEthernet3/0/5] igmp-snooping static-group 224.1.1.1 vlan 100
[SwitchC-GigabitEthernet3/0/5] quit
Verifying the configuration
# Display information about the static router ports in VLAN 100 on Switch A.
[SwitchA] display igmp-snooping static-router-port vlan 100
VLAN 100:
Router slots (1 in total):
3
Router ports (1 in total):
GE3/0/3
The output shows that GigabitEthernet 3/0/3 on Switch A has become a static router port.
# Display information about the static IGMP snooping forwarding entries in VLAN 100 on Switch C.
[SwitchC] display igmp-snooping static-group vlan 100
Total 1 entries.
VLAN 100: Total 1 entries.
(0.0.0.0, 224.1.1.1)
Host slots (1 in total):
3
Host ports (2 in total):
GE3/0/3
GE3/0/5
The output shows that GigabitEthernet 3/0/3 and GigabitEthernet 3/0/5 on Switch C have become static member ports of the multicast group 224.1.1.1.
Troubleshooting IGMP snooping
Layer 2 multicast forwarding cannot function
Symptom
Layer 2 multicast forwarding cannot function on the switch.
Analysis
IGMP snooping is not enabled.
Solution
1. Use the display igmp-snooping command to display IGMP snooping status.
2. If IGMP snooping is not enabled, use the igmp-snooping command in system view to enable IGMP snooping globally, and then use the igmp-snooping enable command in VLAN view to enable IGMP snooping for the VLAN.
3. If IGMP snooping is enabled globally but not enabled for the VLAN, use the igmp-snooping enable command in VLAN view to enable IGMP snooping for the VLAN.
Multicast group filter does not work
Symptom
Hosts can receive multicast data from multicast groups that are not permitted by the multicast group filter.
Analysis
· The ACL is incorrectly configured.
· The multicast group filter is not correctly applied.
· The function of dropping unknown multicast data is not enabled, so unknown multicast data is flooded.
Solution
1. Use the display acl command to verify that the configured ACL satisfies the multicast group filter requirements.
2. Use the display this command in IGMP-snooping view or in a corresponding interface view to verify that the correct multicast group filter has been applied. If not, use the group-policy or igmp-snooping group-policy command to apply the correct multicast group filter.
3. Use the display igmp-snooping command to verify that the function of dropping unknown multicast data is enabled. If not, use the drop-unknown or igmp-snooping drop-unknown command to enable the function of dropping unknown multicast data.