2022-11- 10 Advanced Network Engineer (Thirty-six) IP Multicast Protocol-IGMP (v1, v2, v3), IGMP snooping, IGMP SSM Mapping, IGMP Proxy (agent)

Aware of multicast group members

In multicast communication, the multicast network needs to send multicast data to specific multicast group members. Therefore, the multicast network needs to know the locations of group members and the multicast groups that the group members have joined.

The methods for a multicast network to sense multicast group members include manual static configuration and dynamic sensing.

Manual static configuration

Staticly specify the interface connecting the multicast group members on the multicast router, and statically configure the group member addition information.

The manual static method has poor flexibility and a large configuration workload, but is relatively stable and can quickly establish multicast forwarding paths for newly online group members.

dynamic perception

Notifies the multicast network throughIGMP protocol. The multicast network senses the interface where the multicast group members are based on IGMP messages and adds group members to the group. information.

The dynamic sensing method is more flexible and simple to configure. The dynamic sensing method is generally used in existing networks.

IGMP Overview

IGMP (Internet Group Management Protocol, Internet Group Management Protocol) is a protocol responsible for IPv4 multicast member management in the TCP/IP protocol suite. It is used< a i=2>Establish and maintain multicast group membership relationships between the receiver host and its directly adjacent multicast router. Group members can send group-adding messages to the multicast network, allowing the multicast network to perceive the location of the group members and the multicast group they have added.

IGMP implements group member management functions by exchanging IGMP messages between multicast group members and multicast routers. IGMP messages are encapsulated in IP messages.

So far, there are three versions of IGMP: IGMPv1 IGMPv2 IGMPv3.

After the multicast router exchanges messages with group members, it will generateIGMP routing table entries and IGMP group entry.

IGMP routing table entries and IGMP group table entries will help the device generate multicast routing table entries.

IGMP group entries and routing table entries

The IGMP protocol generates IGMP routing table entries and IGMP group table entries. Multicast routing table entries need to be generated based on the information of IGMP routing table entries and IGMP group table entries.

IGMP group entry

The creation is triggered by the IGMP join message sent by the user host. It is used to maintain the group joining information and notify the multicast routing protocol (commonly known as the PIM protocol) to create the corresponding (*, G) entry.

IGMP routing table entry

Used to extend the outbound interface of multicast routing table entries.

IGMP entries and multicast routing entries

Onlast-hop multicast router (multicast leaf router), multicast routing Tablecan be based on IGMP routing table entry, IGMP group table entry a>). PIM routing table is formed after summarizing the multicast protocol routing table (

IGMP routing table entries and IGMP group table entries can providemulticast group address informationand. Outbound interface information

IGMPv1 overview

IGMPv1 is mainly based onquery and response mechanism to complete multicast group management.

The query and response mechanism is implemented by two types of messages:

General Query message (General Query): Query message sent by the querier to all hosts and routers on the shared network, used forQuery which multicast groups have members.

Membership report message (Report): a report message sent by the host to the querier, used for to apply to join a certain groupcast Group or reply query message.

Since IGMP messages are multicast messages, only one multicast router in a multi-access network needs to send query messages. This multicast router is calledIGMP Querier (Querier).

IGMPv1 message format

IGMPv1 general group query message and membership report message are both multicast messages.

The format of the IGMPv1 general group query message is similar to that of the membership report message.

IGMPv1 group member adding mechanism

Through general group query messages and membership report messages, the IGMP querier can learn which multicast groups have members in the network segment.

1 The IGMP querier sends a general group query with the destination address 224.0.0.1 (indicating all hosts and routers in the same network segment) message; the group member that receives the query message starts the timer. General group query messages are sent periodically. The sending period can be configured through commands. By default, every Sent every 60 seconds. If group member 1 and group member 2 are members of multicast group G1, timer-G1 is started locally. By default, the timer range is a random value between 0 and 10 seconds.

2 The group member whose first timer expires sends a report message for the group.

3 After receiving the report message of multicast group member 1, the IGMP querier learns that there are members of multicast group G1 in this network segment, and then generates an IGMP group The table entry is the same as (*, G1) IGMP routing table entry, "*" represents any multicast source. Once the data of multicast group G1 in the network reaches the router, it will be forwarded to this network segment.

Membership report message suppression mechanism

General query messages are sent periodically. The sending period can be configured through commands. By default, it is sent every 60 seconds. If group member 1 and group member 2 are members of multicast group G1, timer-G1 is started locally. By default, the timer range is a random value between 0 and 10 seconds.

Assume that Timer-G1 on group member 1 times out first, and group member 1 sends a report message with the destination address G1 to the network segment. When group member 2 who also wants to join group G1 receives this report message, it stops timer-G1 and no longer sends report messages for G1. In this way, report packets are suppressed, which can reduce traffic on the network segment.
 

IGMPv1 querier election mechanism

General group query is a multicast message, so only one querier is needed in the same network segment to query the group joining information of all group members.

IGMPv1 does not have an IGMP-based querier election mechanism, so it needs to rely onmulticast routing protocol ( PIM) performs IGMP querier election.

IGMPv1 will elect the only multicast routing protocol (PIM)Multicast information forwarder (Assert Winner or DR) as IGMPv1 Queryer, responsible for group membership query of this network segment.

Both queriers and non-queriers can receive membership reports (destination address 224.0.0.1), so both can form IGMP routing tables and IGMP group entries.
 

IGMPv1 group member leaving mechanism

IGMPv1 does not specifically define a leave group message. When a multicast group member leaves the multicast group, they will no longer respond to general group query messages.

When there are no members of a specific group in the network segment, members of the specific group will no longer send report messages, and the IGMP querier will not receive report messages from the specific group members. (The default value is 130s), deletes the multicast forwarding entry corresponding to the specific group.

IGMPv2 overview

IGMPv1 flaws

1 IGMPv1 uses a timeout mechanism to leave the group, and group members can only leave the group silently. Before the timeout period, multicast traffic will still be forwarded by the multicast router.

2 IGMPv1 querier election must rely on the PIM protocol, resulting in querier election being inflexible.

Improvements to IGMPv2

IGMPv2 adds a leave group mechanism.

IGMPv2 adds a querier election mechanism.

IGMPv2 is compatible with IGMPv1.

IGMPv2 message format

In order to improve the group member leaving mechanism, IGMPv2 adds two new messages

Member Leave Message (Leave): A message that a member actively sends to the querier when leaving a multicast group, used to announce itself Lefta certain multicast group. The destination address of the member leave message is 224.0.0.2.

Group-Specific Query: A query message sent by the querier to the specified multicast group in the shared network segment, used to query the multicast group whether members exist. The destination address of the specific group query message is the group address of the queried multicast group.

IGMPv2 message

Field description

Type: message type. This field has four values.
1 0x11: Indicates query message. IGMPv2 query messages include general group query messages and group-specific query messages.
2 0x12: Indicates IGMPv1 membership report message.
3 0x16: Indicates IGMPv2 membership report message.
4 0x17: Indicates member leaving message.

Max Response Time: Indicates the maximum time for the host to respond to queries and return reports.
For universal group queries, the maximum response time defaults to 10 seconds.
For group-specific queries, the maximum response time defaults to 1 second.

Group Address: Group address.
In the general group query message, the group address is set to 0.
In the specific group query message, the group address is the group address that needs to be queried.
In membership report or group leaving messages, the group address is the address of the group that needs to be reported or left.

Packet Capture Observation: NormalGroup Query Message

1 IGMP version is 2

2 The message type is query message (0x11).

3 Maximum response time is 10.

4 Checksum.

5 Checksum status.

6 multicast group address: 0.0.0.0 (The address is all 0, indicating a normal query message)

Packet Capture Observation: Membership Messages

1 The message type is IGMPv2 membership message (0x16).

2 Maximum response time 0 seconds.

3 Multicast group address: 224.0.1.1

IGMPv2 querier election mechanism

IGMPv2 uses an independent querier election mechanism. When there are multiple multicast routers on a shared network segment, the router with the smallest IP address Become a queryer.

A timer will be started on all non-queriers (ie, Other Querier Present Timer). Before the timer times out, if a query message from the querier is received, the timer will be reset; otherwise, the original querier will be considered invalid and a new querier election process will be initiated.

IGMPv2 group member leaving mechanism 

IGMPv2 uses member leave messages and group-specific query messages to accelerate the detection of IGMPv2 group member departures.

1 MulticastGroup members to all multicast routers (destination addresses) in the local network segment For 224.0.0.2)SendLeave message for group G1.

2 The querier receives the leave message and willsend itSpecific group query message for group G1. The sending interval and sending times can be configured through commands. By default, it is sent every 1 second, and is sent twice in total.. At the same time, the queryer starts the group membership timer (Timer-Membership = sending interval x number of sending times).

3 If there are other members of group G1 in this network segment, these members will After receiving the specific group query message sent by the querier, the report message for group G1 will be sent immediately. After receiving the report message for group G1, the querier will continue to maintain the group membership.

4 If does not exist other members of group G1, the querier will not A report message for group G1 will be received. After the Timer-Membership times out, the querier will delete the IGMP group entry corresponding to (*, G1) . When the multicast data of group G1 reaches the querier, the querier will not forward it downstream.

Packet capture and observation:Member leaving message

1 Message type: member leaving message (0x17)

Packet capture and observation:Specific group query message

1 The message type is query message (0x11).

2 Multicast group address: 224.0.1.1 (The address is not all 0, which means it is a specific group query message)

IGMPv3 overview

For security reasons, multicast group members can only choose to receive multicast data from specific multicast sources. Group members need to tell the multicast network which specific multicast sources they want to receive multicast traffic from.

Neither IGMPv1 nor IGMPv2 messages can carry multicast source information, so they cannot be used with SSM (you can use the SSM Mapping function to solve this problem).

IGMPv3 was mainly developed to cooperate with the SSM (Source-Specific Multicast) model. It provides the ability to carry multicast source information in the message, that is, the host can Source to select.
 

Similar parts of IGMPv3 and IGMPv2

1 The querier election mechanism is the same: the querier is the one with the smaller IP address.

2 Usegeneral group query message to query group member addition information.

3 Usespecific group query message to query the survival status of specific multicast members.

The difference between IGMPv3 and IGMPv2

1 In addition to the general group query message and the specific group query message, the IGMPv3 query message also adds the specific source group query message (Group-and-Source- Specific Query).

2 The IGMPv3 membership report message not only contains the multicast group that the host wants to join, but also contains the data from which multicast sources the host wants to receive.

3 Since different members of the same multicast group may wish to receive multicasts from different sources, IGMPv3 does not require a membership report message suppression mechanism.

4 IGMPv3 does not define a special member leave message. Member departure is communicated through a specific type of report message.
 

IGMPv3 message

Query message

There are three types of IGMPv3 query messages:

1 General Query message (General Query). The function of this message is the same as that of the general group query message in IGMPv1 and IGMPv2.

2 Group-Specific Query. The function of this message is the same as that of the specific group query message in IGMPv2.

3 Group-and-Source-Specific Query . This message is used toquery whether members of the group are willing to receive data sent by a specific source. Specific source group query achieves this purpose by carrying one or more multicast source addressesin the message.

Query message type IGMPv1 IGMPv2 IGMPv3
General query message
Specific group query message
Specific source group query message

Message format

Field description

Type: Message type, the value is 0x11.

Max Response Code: Maximum response time. After receiving the general group query message sent by the IGMP querier, the member host needs to respond within the maximum response time.

Group Address: Multicast group address. In the general group query message, this field is set to 0; in the specific group query message and the specific source group query message, this field is the multicast group address to be queried.

Number of Sources: The number of multicast sources included in the packet. For general group query messages and specific group query messages, this field is 0; for specific source group query messages, this field is non-0. The size of this parameter is limited by the MTU size of the network.

Source Address: Multicast source address, the number of which is limited by the value of the Number of Sources field.

Packet capture and observation:Specific source group query message

1 IGMP version 3.

2 The message type is query message.

3 Maximum response time is 1 second.

4 Checksum.

5 Checksum status.

6 Multicast group address: 224.0.1.1 (indicates the multicast group address that needs to be queried).

7 S bit: 0 (all other routers that receive this query message start the timer refresh process).

8 The robustness variable of the querier is 2 (indicating that the query response message should be sent 2 times).

9 The query interval is 60 seconds.

10 Number of multicast source addresses: 1

11 Multicast source address: 192.168.0.1 (indicates the multicast source address that needs to be queried).

membership report message

In addition tonotifying the group members’ joining information, the that group members wish to receive. Announce the multicast source informationIGMPv3 membership report message can also

Two modes for advertising multicast sources

INCLUDE: Desiresto receivemulticast traffic from a specific multicast source

EXCLUDE: Want tofiltermulticast traffic from a specific multicast source

The relationship between the membership report messagethe multicast group information and the multicast source information willbe recorded in the group record (Group Record) field, sent to the IGMP querier. The destination address of the IGMPv3 membership report message is 224.0.0.22.

Message format

In IGMPv3, a membership report message can carry multiple multicast group information, while in previous versions (IGMPv1, IGMPv2), a membership report can only carry one multicast group. In this way, the number of messages in IGMPv3 is greatly reduced.

Group Record format

Membership report message field description

Field length describe
Type 8 bits

Type = 0x22 Membership Report

Reserved 8 bits Reserved fields are filled with 0 when sent and are not processed in any way when received.
Checksum 16 bits The checksum is the negation and summation of the entire IGMP message in 16-bit segments. In order to calculate the checksum, the checksum field must first be set to zero. When a piece of data is received, the checksum must be verified before processing.
Reserved 16 bits The T reserved field is filled with 0 when sent and is not processed in any way when received.
Number of Group Records (M) 16 bits This field indicates how many group records are included in the report message.
Group Record lengthen

A host may need to order multicast services from multiple multicast addresses. Each record contains information such as the source address list corresponding to one of the multicast addresses. It is affected by the size of Number_of_Group_Records.

Each group record field is an entire block of data that contains information about the sender's membership in a multicast group on the report sending interface.

Record Type 8 bits

Type of Group Record message.

Current status report:

  • MODE_IS_INCLUDE: Receive multicast data sent to the group from sources included in the source address list. If the specified source address list is empty, the message is an invalid message.
  • MODE_IS_EXCLUDE: Do not receive multicast data sent to this group from sources included in the source address list.

Filter mode change report:

  • CHANGE_TO_INCLUDE_MODE: The filtering mode is converted from EXCLUDE to INCLUDE, and the data sent to the multicast group by the new multicast source included in the source address list is received. If the specified source address list is empty, the host leaves the multicast group.
  • CHANGE_TO_EXCLUDE_MODE: The filtering mode is converted from INCLUDE to EXCLUDE, and multicast data sent to the group by the new multicast source in the source address list is rejected.

Source list change report:

  • ALLOW_NEW_SOURCES: Indicates that on the existing basis, it is necessary to receive multicast data sent to the multicast group from sources included in the source address list. If the current correspondence is INCLUDE, add these multicast sources to the existing source list; if the current correspondence is EXCLUDE, delete these multicast sources from the existing blocking source list.
  • BLOCK_OLD_SOURCES: Indicates that on the existing basis, multicast data sent to the multicast group from the source multicast source included in the source address list will no longer be received. If the current correspondence is INCLUDE, delete these multicast sources from the existing source list; if the current correspondence is EXCLUDE, add these multicast sources to the existing source list.
To Data Len 8 bits The auxiliary data length contains the actual length of the auxiliary data in the group record, and its unit is a 32-bit word. It may be 0, which means that the auxiliary data does not exist.
Number of Sources (N) 16 bits The Number of Sources (N) field indicates how many source addresses exist in the group record.
Multicast Address 32 bits The multicast address field indicates the multicast IP address to which this group record belongs.
Source Address [i] 32 bits The source address [i] field is an array containing n unicast addresses. n is the value of the source number (N) field of the record.
Additional Data lengthen 附加数据。如果收到的报告中的IP首部的数据报长度字段标明在最后一个组记录后面有附加的数据存在。IGMPv3的实现必须在计算和验证校验和的时候包含这些附加数据,但是同时必须忽略这些附加数据。当发送一个报告时,一个IGMPv3的实现在最后一个组记录后面不能包含附加数据

抓包观察:成员关系报告报文

1 IGMP版本:3

2 报文类型为成员关系报文。

3 保留字段。

4 校验和。

5 校验和状态。

6 保留字段。

7 包含的组记录数量。

8 组记录

9 记录类型:Mode Is Include(表示接收源地址列表中的源地址发往该组播地址的数据)

10 辅助数据长度。

11 本记录中源地址列表中的源地址数量为1。

12 组播组地址:224.0.1.1。

13 组播源地址:192.168.0.1。

IGMPv3组成员加组机制

相比IGMPv2的加组机制,IGMPv3的成员关系报告报文能够携带组播源信息; IGMPv3成员关系报告报文没有成员关系报告报文抑制机制。

IGMPv3组成员离组机制

IGMPv3没有专门的成员离开报文,成员离开需要借助组成员关系报告实现。

IGMP查询器在收到改变源组对应关系的成员关系报告后,会发送特定源组查询报文,确认是否还有组成员存在。

配置举例:PIM-SM(SSM)、IGMPv3协议组播网络

需求:PC1接收组播源1的流量,PC2接收组播源2的流量。

组播源1与组播源2使用相同的组播组地址,不同的组播源地址。

组播源1配置

 

组播源2配置

 

路由器R1配置

#
 sysname R1
#
 board add 0/4 4GET 
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
 ip address 192.168.0.254 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ip address 10.1.0.1 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/2
 ip address 10.1.1.1 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet4/0/0
 ip address 192.168.2.254 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
ospf 1 router-id 1.1.1.1 
 silent-interface GigabitEthernet0/0/0
 silent-interface GigabitEthernet4/0/0
 area 0.0.0.0 
#

路由器R2配置

#
 sysname R2
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
 ip address 10.1.0.2 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ip address 10.1.2.2 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
 pim sm
 ospf enable 1 area 0.0.0.0
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
#
pim
 c-bsr hash-length 32
 c-bsr priority 100
 c-bsr LoopBack0
 c-rp LoopBack0 priority 100
#

路由器R3配置

#
 sysname R3
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
 ip address 10.1.0.3 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ip address 10.1.3.3 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
 pim sm
 ospf enable 1 area 0.0.0.0
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
#
pim
 c-bsr hash-length 32
 c-bsr priority 200
 c-bsr LoopBack0
 c-rp LoopBack0 priority 200
#

路由器R4配置

#
 sysname R4
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
 ip address 10.1.2.4 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ip address 10.1.3.4 255.255.255.0 
 pim sm
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/2
 ip address 192.168.1.254 255.255.255.0 
 igmp enable
 igmp version 3                    //配置IGMP版本3
 ospf enable 1 area 0.0.0.0
#
ospf 1 router-id 4.4.4.4 
 silent-interface GigabitEthernet0/0/2
 area 0.0.0.0 
#

交换机SW1不做配置。

PC1配置

PC2配置

 

测试过程略。

PS:本拓扑存在交换机会无差别泛洪组播流量的问题,因此需要下面介绍的IGMP Snooping技术解决问题。

IGMP各版本间的差异

机制

IGMPv1

IGMPv2

IGMPv3

查询器选举

依靠其他协议

自己选举

自己选举

成员离开方式

静默离开

主动离开

主动离开

特定组查询

不支持

支持

支持

指定源、组

不支持

不支持

支持

版本兼容性

IGMPv1

IGMPv1、IGMPv2

IGMP Snooping

概述

当组播数据从最后一跳路由器发往组播组成员时,往往会经过交换机。由于组播数据的目的MAC地址是组播MAC地址,默认情况下交换机将泛洪此类数据帧,有可能导致不同组的组播流量会被别组的成员接收。

IGMP Snooping功能可以控制组播流量在以太网的泛洪范围,实现组播数据在数据链路层的转发和控制,避免不同组的组播流量被别组成员接收

配置IGMP Snooping后,二层组播设备可以侦听和分析组播用户和上游路由器之间的IGMP报文,根据这些信息建立二层组播转发表项,控制组播数据报文转发。这样就防止了组播数据在二层网络中的广播。 

二层组播转发表项中存在的两类接口

路由器端口(Router Port)

二层组播设备上朝向三层组播设备(DR或IGMP查询器)一侧的接口,二层组播设备从此接口接收组播数据报文。

由协议生成的路由器端口叫做动态路由器端口。收到源地址不为0.0.0.0的IGMP普遍组查询报文或PIM Hello报文(三层组播设备的PIM接口向外发送的用于发现并维持邻居关系的报文)的接口都将被视为动态路由器端口。

手工配置的路由器端口叫做静态路由器端口

成员端口(Member Port)

又称组播组成员端口,表示二层组播设备上朝向组播组成员一侧的端口,二层组播设备往此接口发送组播数据报文。

由协议生成的成员端口叫做动态成员端口。收到IGMP Report报文的接口,二层组播设备会将其标识为动态成员端口。

手工配置的成员端口叫做静态成员端口

IGMP Snooping工作原理

形成转发表项

IGMP Snooping设备通过监听IGMP报文,形成二层组播转发表,并决定接口类型。

当IGMP Snooping设备收到成员关系报告报文后,只将成员关系报告报文从路由器接口发送出去,从而避免其余组成员收到成员关系报告报文,不触发成员关系报告报文抑制机制。

路由器端口形成后会启动老化计时器(默认180s),当路由器端口收到新的普遍组查询后刷新该计时器。

成员端口形成后会启动老化计时器(默认180s),当成员端口收到新的成员关系报告报文后刷新该计时器。

维护转发表项

IGMP Snooping设备通过监听IGMP离开报文,IGMP成员关系报告报文决定特定端口是否还需要发送特定组播。

收到IGMP离开报文后,成员端口的老化定时器 = 健壮系数(默认2) x 特定组查询间隔(默认1s)。

IGMP SSM Mapping

概述

现网中存在部分只能运行IGMPv1与IGMPv2的老旧终端,在部署SSM模式的组播时,由于IGMPv1与IGMPv2报文中无法携带组播源信息,因此无法使用SSM模式的组播网络。

IGMP SSM Mapping通过静态的将组播源与组播组进行绑定使得IGMPv1与IGMPv2的组成员也能接入SSM组播网络

IGMP SSM Mapping工作原理

在IGMP查询器上静态配置SSM地址的映射规则,将IGMPv1或IGMPv2成员关系报告中的组信息映射为源组信息

配置了SSM Mapping规则后,当IGMP查询器收到来自成员主机的IGMPv1或IGMPv2报告报文时,首先检查该报文中所携带的组播组地址G,然后根据检查结果的不同分别进行处理。

一 如果G在ASM(Any-Source Multicast)范围内,则只提供ASM服务。

二  如果G在SSM组地址范围内(缺省情况下为232.0.0.0~232.255.255.255):

   1 如果路由器上没有G对应的SSM Mapping规则,则无法提供SSM服务,丢弃该报文。

   2 如果路由器上有G对应的SSM Mapping规则,则依据规则将报告报文中所包含的(*, G)信息映射为(G, INCLUDE, (S1, S2...))信息,提供SSM服务。

IGMP SSM Mapping不处理IGMPv3的报告报文。为了保证同一网段运行任意版本IGMP的主机都能得到SSM服务,需要在与成员主机所在网段相连的组播路由器接口上运行IGMPv3。

IGMP Proxy(代理)

概述

现网中可能存在一台IGMP查询器需要管理大量组成员的情况,大量成员主机频繁加入/离开组播组时,会产生大量的IGMP成员关系报告/离开报文,从而给IGMP查询器带来较大的处理压力

通过IGMP Proxy功能可减少IGMP查询器接收IGMP成员关系报告/离开报文的数量,减轻IGMP查询器压力。

IGMP Proxy通常被部署在IGMP查询器和成员主机之间的三层设备上。

IGMP Proxy设备将成员关系报告/离开报文汇聚后统一上送给IGMP查询器。

IGMP Proxy设备也可以代理IGMP查询器向成员主机发送查询报文,维护组成员关系,基于组成员关系进行组播转发。

IGMP Proxy定义了两类接口

主机接口(Host Interface):IGMP Proxy设备上配置IGMP Proxy功能的接口,该接口一般面向IGMP查询器

路由器接口(Router Interface):IGMP Proxy设备上配置IGMP功能的接口,该接口一般面向组成员

IGMP Proxy工作机制

成员加组

路由器接口作为IGMP接口,对下呈现为IGMP查询器,发送查询报文,处理成员关系报告报文,形成IGMP表项,并将成员关系报告从主机接口发送给上游的IGMP查询器

当新用户加入同一个组播组时IGMP Proxy设备不会再向IGMP查询器反馈成员关系报告报文,因此减少了成员关系报告报文数量。

IGMP代理设备收到某组播组的报告报文后,会在IGMP组表项中查找该组播组:如果没有找到相应的组播组,IGMP代理设备会向接入设备发送针对该组播组的报告报文,并在组播转发表中添加该组播组;如果找到相应的组播组,IGMP代理设备就不需要向接入设备发送报告报文

成员离组

当组成员离开时,IGMP Proxy通过IGMP离组机制确定是否有特定组播组的组成员,当确定已经没有组成员后才发送离开报文给上游IGMP查询器

IGMP代理设备收到某组播组G1的离开报文后,会向接收到该离开报文的接口发送一个特定组查询报文,检查该接口下是否还存在组播组G1的其他成员:

一 如果没有其他成员,在组播转发表中将该接口删除,然后判断组播组G1是否还有其他接口

   1 如果没有,IGMP代理设备再会向接入设备发送针对该组播组的离开报文;

   2 如果有,IGMP代理设备不向接入设备发送针对该组播组的离开报文

二 如果有其他成员,IGMP代理设备会继续向该接口转发组播数据。

相关命令

配置IGMP命令

开启接口的IGMP功能

[R1-GigabitEthernet0/0/0]igmp enable 

配置IGMP的版本(缺省值IGMPv2)

[R1-GigabitEthernet0/0/0]igmp version 3

配置设备根据源地址对IGMP报告/离开报文进行过滤

[R1]acl 2000

[R1-acl-basic-2000]rule permit source 192.168.0.1 0

[R1-GigabitEthernet0/0/1]igmp ip-source-policy 2000

配置当前接口可以维护IGMP组成员关系的最大个数

[R1-GigabitEthernet0/0/1]igmp limit 50

开启IGMP snopping功能

[R1]igmp-snooping enable 

配置接口静态加入组播组

[SW1-GigabitEthernet0/0/1]l2-multicast static-group group-address 224.0.1.1 vlan 1

配置接口下的组播组过滤策略

[SW1-GigabitEthernet0/0/1]igmp-snooping group-policy 2000 vlan 1

在VLAN下开启IGMP代理功能(需要先开启全局和VLAN下的IGMP snopping功能)

[SW1]igmp-snooping enable 

[SW1-vlan10]igmp-snooping enable 

[SW1-vlan10]igmp-snooping proxy 

开启IGMP SSM Mapping功能 

[R1-GigabitEthernet0/0/0]igmp ssm-mapping enable 

在IGMP视图下配置静态SSM映射关系(例如:组播地址为224.0.1.1/32 特定源地址为10.1.0.1)

[R1-igmp]ssm-mapping 224.0.1.1 32 10.1.0.1

查看IGMP信息命令

查看接口的IGMP配置和运行信息

<R1>display igmp interface 

查看加入组播组的成员信息

<R1>display igmp group 

查看二层组播转发表

<SW1>display l2-multicast forwarding-table vlan 10

查看IGMP SSM Mapping静态映射关系

<R1>display igmp ssm-mapping interface 

Guess you like

Origin blog.csdn.net/x629242/article/details/127791728