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

How to Deploy Multicast Features on Campus Networks - IGMP Snooping

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).
How to Deploy Multicast Features on Campus Networks – IGMP Snooping

How to Deploy Multicast Features on Campus Networks – IGMP Snooping

Introduction

This chapter describes the method of configuring IGMP snooping on a switching network. IGMP snooping is disabled by default. A LAN switch floods received multicast packets in a broadcast domain before IGMP snooping is enabled. Therefore, there will be a waste of bandwidth if many multicast servers send multicast traffic to a network.

Prerequisites

This chapter describes the method of configuring IGMP snooping on Huawei S series switches. The commands may vary depending on the product model and version. For the detailed configuration method, see the configuration guide of the specific model and version.

Why Do I Need to Deploy IGMP Snooping?

On a Layer 2 campus network, multicast traffic is broadcast when Internet Group Management Protocol (IGMP) snooping is not deployed. A switch uses the MAC address table to accurately forward packets based on ports. The MAC address table records source MAC addresses a switch learns from received packets. A multicast MAC address, however, must be the destination MAC address of a multicast packet. Therefore, there is no multicast MAC address entry in the MAC address table, and multicast packets can only be broadcast by the switch as unknown flows. This causes bandwidth waste of the Layer 2 network. When a large number of multicast flows need to be forwarded on the network, congestion can easily occur.

You can choose either of the following methods to address this problem:

  • Configure static multicast MAC address entries on the switch to bind multicast MAC addresses to ports. However, this method is inflexible, because each multicast address entry needs to be manually configured. The configuration command is as follows:

    mac-address multicast mac-address interface { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-10> vlan vlan-id

  • Configure the Layer 2 multicast protocol IGMP snooping so that the switch ports can listen to IGMP packets and dynamically generate Layer 2 multicast forwarding entries. For the support and configuration details of basic IGMP snooping functions, see the Multicast Feature Support of S Series Switches.

Multicast Address

IPv4 Multicast Addresses

An IPv4 multicast address is usually used as a destination address for communication between a multicast source and multicast group members. An IPv4 address is 32 bits long, and the first four bits of a Class D IP address are 1110. Therefore, multicast IP addresses range from 224.0.0.0 to 239.255.255.255. The multicast IP addresses are grouped into the following segments:

  • 224.0.0.0-224.0.0.255: Permanent multicast group addresses that are reserved by the IANA for routing protocols. The addresses identify a group of network devices and are not used for multicast forwarding.
  • 224.0.1.0-231.255.255.255, 233.0.0.0-238.255.255.255: ASM group addresses that are valid on the entire network.
  • 232.0.0.0-232.255.255.255: Default SSM group addresses that are valid on the entire network.
  • 239.0.0.0-239.255.255.255: Administrative multicast addresses that are valid only in the local administrative domain. Different administrative domains can use the same administrative multicast addresses.

Mapping Between IPv4 Multicast Addresses and Multicast MAC Addresses

As defined by the IANA, the leftmost 24 bits of an IPv4 multicast MAC address are 0x01005e, the 25th bit is 0, and the rightmost 23 bits are the same as the rightmost 23 bits of a multicast IPv4 address. For example:

  • The IPv4 multicast address 224.0.1.1 is mapped to the multicast MAC address 01-00-5E-00-01-01.
  • The IPv4 multicast address 225.0.1.1 is mapped to the multicast MAC address 01-00-5E-00-01-01.

As shown in the example, different IPv4 multicast addresses may be mapped to the same multicast MAC address. The first four bits of an IPv4 multicast address are fixed as 1110. Among the last 28 bits, only 23 bits are mapped to a MAC address, and 5 bits are lost. As a result, 32 multicast IP addresses can be mapped to one multicast MAC address. If Layer 2 multicast packets are forwarded based on multicast MAC addresses, the multicast group members that do not send Report messages may also receive the data destined for the multicast group.

IGMP

IP multicast routing transmits packets from a source to a group of receivers. In the multicast communications model, the sender only needs to send data to a specified destination address and does not need to know the exact locations of the receivers. To forward multicast data packets to the receivers, the multicast router connected to the network segment of receiver hosts must know which receiver hosts are present on the network segment and ensure that these hosts have joined the specific group. IGMP implements this by setting up and maintaining membership between receiver hosts and directly connected multicast routers.

There are three IGMP versions. IGMPv1 defines the group membership query and report processes. IGMPv2 extends IGMPv1 by adding the querier election and member leave mechanisms. IGMPv3 extends IGMPv2 by allowing hosts to specify the multicast sources they do or do not want to receive data from.

IGMPv1

Figure 1-1 shows the IGMPv1 message format, and Table 1-1 describes the message fields.

Figure 1-1 IGMPv1 message format

Table 1-1 Fields in an IGMPv1 message

Field

Description

Version

In IGMPv1 messages, this field is set to 1.

Type

The two message type options are:

  • 0x1: General Query message
  • 0x2: Report message

Unused

In IGMPv1 messages, this field is set to 0 by the sender and is ignored by the receiver.

Checksum

Checksum of an IGMP message.

Group Address

In a General Query message, this field is set to 0. In a Membership Report message, this field is set to the address of the group that the member requests to join.

IGMPv1 is implemented as follows: The IGMP querier periodically sends General Query messages with the destination address being 224.0.0.1 (indicating all hosts and routers on the network segment). Each member host in the multicast group needs to send a Report message. Otherwise, the Layer 3 network device will stop forwarding multicast data to the multicast group, if the IGMP querier interface does not receive response from any host in the multicast group within a specified period. The Layer 3 network device creates a multicast forwarding entry for each multicast source. The outbound interface list of each multicast forwarding entry is generated based on IGMP Report messages. If an outbound interface does not receive IGMP Report messages within a specified period, the outbound interface is deleted from the outbound interface list.

IGMPv2

Figure 1-2 shows the IGMPv2 message format, and Table 1-2 describes the message fields.

Figure 1-2 IGMPv2 message format
Table 1-2 Fields in an IGMPv2 message

Field

Description

Type

The four message type options are:

0x11: Query message. IGMPv2 Query messages include General Query and Group-Specific Query messages.

0x12: IGMPv1 Report message

0x16: IGMPv2 Report message

0x17: Leave message

Max Response Time

After receiving a General Query message, hosts must respond with a Report message within the maximum response time. This field is valid only in IGMP Query messages.

Checksum

Checksum of an IGMP message.

Group Address

The group address is set differently in different types of messages:

In a General Query message, this field is set to 0.

In a Group-Specific Query message, this field is set to the address of the queried group.

In a Report or Leave message, this field is set to the address of the group that the host wants to join or leave.

IGMPv2 differs from IGMPv1 in the following ways:

  • In addition to General Query and Report messages IGMPv2 defines two new message types:
    • Leave message: sent by a host to notify the querier on the local network segment that it has left a group.
    • Group-Specific Query message: sent by a querier to a specified group on the local network segment to check whether the group has members.
  • IGMPv2 adds a new field to General Query messages: Max Response Time. This field can be configured to control hosts' response speed to Query messages.

IGMPv3

IGMPv3 was developed to support the source-specific multicast (SSM) model. IGMPv3 messages can carry multicast source information so that hosts can receive data sent from a specific source.

IGMPv3 defines two message types: Query and Report. IGMPv3 messages carry the multicast source address information, which means more fields need to be defined, so IGMPv3 implementation is more complex. For details, see Changes in IGMPv3 under IGMP Configuration > Understanding IGMP in the Configuration Guide - IP Multicast Configuration Guide.

Compatibility Between IGMPv1 and IGMPv2

IGMPv2 is compatible with IGMPv1. On a network segment running IGMPv1 and IGMPv2, only one Layer 3 device can act as an IGMP querier to send Query messages. In IGMPv1, an IGMP querier is elected by the Protocol Independent Multicast (PIM) protocol. In IGMPv2, the Layer 3 device with the smallest IP address is elected as the IGMP querier.

A Layer 3 device and downstream hosts exchange IGMP messages as follows:

  • Scenario 1: A Layer 3 device runs IGMPv1 and connects to both IGMPv1 and IGMPv2 hosts in the downstream direction.

    The Layer 3 device cannot parse IGMPv2 Report messages. Therefore, all hosts can only send IGMPv1 Report messages.

  • Scenario 2: A Layer 3 device runs IGMPv2 and connects to both IGMPv1 and IGMPv2 hosts in the downstream direction.

    IGMPv1 hosts cannot parse IGMPv2 General Query messages and Group-Specific Query messages. Therefore, the Layer 3 device can only use IGMPv1, and the fast leave mechanism based on Specified-Group Query also stops functioning.

  • Scenario 3: Both IGMPv1 and IGMPv2 Layer 3 devices are configured on a network segment.

    IGMPv1 Layer 3 devices cannot listen to protocol packets of IGMPv2 Layer 3 devices. Therefore, IGMPv2 Layer 3 devices must be configured to use IGMPv1. Otherwise, the IGMP querier may not be elected.

Compatibility Between IGMPv1/IGMPv2 and IGMPv3

IGMPv3 is compatible with IGMPv1 and IGMPv2. On a network segment that runs all IGMP versions, only one Layer 3 device (IGMP querier) can send Query messages. In IGMPv1, an IGMP querier is elected by the multicast routing protocol PIM. In IGMPv2 and IGMPv3, the Layer 3 device with the smallest IP address is elected as the IGMP querier.

A Layer 3 device and downstream hosts exchange IGMP messages as follows:

  • Scenario 1: A Layer 3 device runs IGMPv1/IGMPv2 and connects to both IGMPv1/IGMPv2 and IGMPv3 hosts.

    The Layer 3 device cannot parse IGMPv3 Report messages. Therefore, all hosts can only send IGMPv1/IGMPv2 Report messages.

  • Scenario 2: A Layer 3 device runs IGMPv3 and connects to both IGMPv1/IGMPv2 and IGMPv3 hosts.

    IGMPv1/IGMPv2 hosts cannot parse IGMPv3 General Query messages and Host Membership Query messages. The Layer 3 device must run the earliest IGMP version that the hosts run on the current network segment. That is, if there are both IGMPv2 and IGMPv3 hosts on the network segment, the Layer 3 device must use IGMPv2. If IGMPv1, IGMPv2, and IGMPv3 hosts co-exist, the Layer 3 device must use IGMPv1.

  • Scenario 3: Layer 3 devices on a network segment run all IGMP versions.

A Layer 3 device running an earlier version cannot listen to protocol packets of a Layer 3 device running a later version. Therefore, all Layer 3 devices must be configured with the same IGMP version, and the configured version must be the earliest version running on all Layer 3 devices.

How to Configure IGMP on S Series Switches?

As shown in Figure 1-3, users are located on network segments N1 and N2. On the PIM network, SwitchA connects to network segment N1, whereas SwitchB and SwitchC connect to network segment N2. The PIM network uses multicast group addresses 225.1.1.1 to 225.1.1.5 to transmit video streams. HostA on N1 and HostC on N2 want to receive video streams in multicast mode.

Figure 1-3 Networking diagram for configuring basic IGMP functions

The procedure for configuring basic IGMP functions is as follows:

  • Configure IP addresses and unicast routing protocols for interfaces on each switch, so the switches can communicate with each other at the network layer.
  • Enable IP multicast routing on each switch.
    multicast routing-enable
  • Configure the multicast routing protocol PIM. The following uses PIM-SM configuration as an example.
    1. Enable PIM-SM on the interfaces of each switch.
      pim sm
    2. Configure an interface on the aggregation device (for example, VLANIF40 on SwitchD) as an RP interface. The following uses the configuration of a static RP in the PIM view as an example.
      static-rp 192.168.4.1
  • Enable IGMP on the interface connected to the user network segment, and configure the IGMP version.
    igmp enable
    igmp version { 1 | 2 | 3 }         //An S series switch runs IGMPv2 by default. 

Take configuration of SwitchA as an example. The configuration file is as follows:

# 
sysname SwitchA 
# 
vlan batch 10 to 11 
# 
multicast routing-enable 
# 
interface Vlanif10 
 ip address 10.110.1.1 255.255.255.0 
 pim sm 
 igmp enable 
 # 
interface Vlanif11 
 ip address 192.168.1.1 255.255.255.0 
 pim sm 
# 
 port hybrid pvid vlan 10 
 port hybrid untagged vlan 10 
# 
 port trunk allow-pass vlan 11 
# 
ospf 1 
 area 0.0.0.0 
   network 10.110.1.0 0.0.0.255 
   network 192.168.1.0 0.0.0.255 
# 
pim 
 static-rp 192.168.4.1  
#

To check the IGMP configuration and running status on an interface, run the display igmp interface command.

display igmp interface vlanif 10 
   Interface information 
    Vlanif10(10.110.1.1): 
     IGMP is enabled      //IGMP is enabled. 
     IGMP group policy: -  
     IGMP limit: -  
     Value of query interval for IGMP (negotiated): - 
     Value of query interval for IGMP (configured): 60 s  
     Value of other querier timeout for IGMP: 0 s  
     Value of maximum query response time for IGMP: 10 s 
     Querier for IGMP: 10.110.1.1 (this router)

To view the PIM-SM multicast routing table on a switch, run the display pim routing-table command.

display pim routing-table 
 VPN-Instance: public net 
 Total 1 (*, G) entry; 1 (S, G) entry 
 (*, 225.1.1.1) 
        RP: 192.168.4.1 
        Protocol: pim-sm, Flag: WC 
        UpTime: 00:21:35 
        Upstream interface: Vlanif11 
              Upstream neighbor: 192.168.1.2 
              RPF prime neighbor: 192.168.1.2 
        Downstream interface(s) information: 
        Total number of downstreams: 1 
              1: Vlanif10 
                     Protocol: igmp, UpTime: 00:21:35, Expires: - 
 (10.3.5.2, 225.1.1.1)     //A multicast routing entry is generated, with the multicast source address being 10.3.5.2 and multicast group address being 225.1.1.1. 
        RP: 192.168.4.1 
        Protocol: pim-sm, Flag: SPT ACT 
        UpTime: 00:42:46 
        Upstream interface: Vlanif11 
              Upstream neighbor: 192.168.1.2 
              RPF prime neighbor: 192.168.1.2 
       Downstream interface(s) information: 
       Total number of downstreams: 1 
              1: Vlanif10          //The interface of the IGMP querier connected to member hosts is in the outbound interface list of the multicast routing entry.

IGMP Snooping

IGMP snooping is a basic Layer 2 multicast function that forwards and controls multicast traffic at the data link layer. After IGMP snooping is enabled on a Layer 2 switch, it listens to IGMP messages exchanged between the upstream Layer 3 device and hosts. It analyzes packet information (such as packet type, multicast group address, and receiving interface) to set up and maintain a Layer 2 multicast forwarding table, and forwards multicast packets based on the Layer 2 multicast forwarding table.

Port Roles in IGMP Snooping

As shown in Figure 1-4, the Layer 3 device Router receives data from the multicast source and forwards the data to the downstream devices. IGMP snooping is configured on the Layer 2 multicast devices SwitchA and SwitchB. HostA, HostB, and HostC are receiver hosts (multicast group members).

Figure 1-4 IGMP snooping ports

Table 1-3 describes the IGMP snooping port roles shown in Figure 1-4.

Table 1-3 IGMP snooping port roles

Port Role

Functions

How the Port Is Generated

Router port

Ports marked as blue circles on SwitchA and SwitchB

A router port receives multicast packets from a Layer 3 multicast device such as a designated router (DR) or IGMP querier.

  • A dynamic router port is generated by IGMP snooping. A port becomes a dynamic router port when it receives an IGMP General Query message or PIM Hello message with any source address except 0.0.0.0. The PIM Hello messages are sent from the PIM port on a Layer 3 multicast device to discover and maintain neighbor relationships.
  • A static router port is manually configured.

Member port

Ports marked as yellow squares on SwitchA and SwitchB

A member port is a user-side port connected to group members. A Layer 2 multicast device sends multicast data to receiver hosts through member ports.

  • A dynamic member port is generated by IGMP snooping. A Layer 2 multicast device sets a port as a dynamic member port when the port receives an IGMP Report message. The aging time of a dynamic member port is calculated using the following formula: Aging time = IGMP robustness variable x Interval for sending General Query messages + Maximum response time for General Query messages
  • A static member port is manually configured.

Router ports and member ports are outbound interfaces in Layer 2 multicast forwarding entries. A router port is an upstream interface, while a member port is a downstream interface. Port information learned through protocol packets is saved as dynamic entries. Manually configured port information is saved as static entries.

IGMP Snooping Proxy

A device configured with IGMP snooping proxy acts as a host for its upstream devices and as a querier for its downstream hosts. The command for configuring the IGMP snooping proxy function is igmp-snooping proxy. IGMP snooping proxy is used in the following scenarios:

  • When IGMP is disabled on a Layer 3 device (for example, when only a static multicast group is configured), no IGMP querier is available on the network to maintain multicast group memberships. In this scenario, IGMP snooping proxy can be configured on a Layer 2 device so the device can function as an IGMP querier to send IGMP Query messages. This function can also be implemented by configuring the igmp-snooping querier enable command on the device.
  • When IGMP is enabled on the network, IGMP snooping proxy can be deployed on a Layer 2 device to allow the device to send IGMP Report/Leave messages to its upstream Layer 3 device on behalf of user hosts. As a result, the Layer 3 device receives fewer IGMP Report and Leave messages. This function can also be implemented by configuring the igmp-snooping report-suppress command on the Layer 2 device.

Unknown Multicast Flows

On a Layer 2 device running IGMP snooping, multicast flows that are not requested by users are considered unknown multicast flows. Multicast flows are considered unknown if they do not match any entry in the Layer 2 multicast forwarding table or if they match multicast forwarding entries with an empty outbound interface list. The default method that an S series switch uses to process unknown multicast flows depends on whether IGMP snooping is enabled and which Layer 2 multicast forwarding mode is used:

  • If IGMP snooping is not enabled on an S series switch, the switch broadcasts unknown multicast flows.
  • After IGMP snooping is enabled on an S series switch, the switch processes unknown multicast flows in different ways depending on the software version
Table 1-4 Mode of processing unknown multicast flows after IGMP snooping is enabled

Software Version

Processing Mode

V200R011 and earlier

  • The following switch models broadcast unknown multicast flows in the corresponding VLAN: S2700SI, S2710SI, S2720EI, S2750EI, S3700SI, S5700LI, S5700S-LI, S5700-C-LI, S5700-X-LI, S5720LI, S5720S-LI, S5700SI, S6720LI, S6720S-LI, S5720SI, S5720I-SI, S5720S-SI, S5730SI, S5730S-EI, S6720SI, S6720S-SI
  • The other models broadcast unknown multicast flows in the corresponding VLAN in MAC address-based forwarding mode and drops unknown multicast flows in IP address-based forwarding mode.

V200R012C00 and later

  • The following switch models broadcast unknown multicast flows in the corresponding VLAN: S2720EI, S2750EI, S5700S-LI, S5700LI, S5710-X-LI
  • The other models broadcast 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 downstream hosts of a Layer 2 device run a later IGMP version than the version specified in the igmp-snooping version { 1 | 2 | 3 } command configured on the Layer 2 device, the Layer 2 device cannot parse IGMP packets of the hosts and therefore cannot generate Layer 2 multicast entries. The multicast packets sent from the upstream device are also processed as unknown multicast flows.

How to Configure IGMP Snooping on S Series Switches?

As shown in Figure 1-5, the Router runs IGMPv2 and connects to user hosts through a Layer 2 switch. The multicast source (Source) sends multicast data to the groups 225.1.1.1 to 225.1.1.3. HostA, HostB, and HostC are three receivers on the network.

Figure 1-5 Network diagram for configuring IGMP snooping

The procedure for configuring IGMP snooping is as follows:

  • Create a VLAN on the Switch and add related interfaces to the VLAN.
  • Enable IGMP snooping globally and in the VLAN.
    [Switch] igmp-snooping enable 
    [Switch] vlan 10 
    [Switch-vlan10] igmp-snooping enable

The configuration file is as follows:

sysname Switch 
# 
vlan batch 10 
# 
igmp-snooping enable 
# 
vlan 10 
 igmp-snooping enable 
 # 
interface GigabitEthernet0/0/1 
 port hybrid pvid vlan 10 
 port hybrid untagged vlan 10 
# 
interface GigabitEthernet0/0/2 
 port hybrid pvid vlan 10 
 port hybrid untagged vlan 10 
# 
interface GigabitEthernet0/0/3 
 port hybrid pvid vlan 10 
 port hybrid untagged vlan 10 
# 

Check the Layer 2 multicast forwarding table on the Switch.

[Switch] display l2-multicast forwarding-table vlan 10 
VLAN ID : 10, Forwarding Mode : IP  
Total Group(s) : 5 
------------------------------------------------------------------------ 
                     (Source, Group)      Interface             Out-Vlan 
------------------------------------------------------------------------ 
                    the router-port       GigabitEthernet0/0/3        10 
                     (*, 225.1.1.1)       GigabitEthernet0/0/1        10 
                                          GigabitEthernet0/0/2        10 
                                          GigabitEthernet0/0/3        10 
                     (*, 225.1.1.2)       GigabitEthernet0/0/1        10 
                                          GigabitEthernet0/0/2        10 
                                          GigabitEthernet0/0/3        10 
                     (*, 225.1.1.3)       GigabitEthernet0/0/1        10 
                                          GigabitEthernet0/0/2        10 
                                          GigabitEthernet0/0/3        10 
------------------------------------------------------------------------

Related Information

Huawei S Series Switch Configuration Guide – IP Multicast

Multicast Feature Support of S Series Switches

Translation
Download
Updated: 2019-06-29

Document ID: EDOC1100090435

Views: 249

Downloads: 7

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