CN102355358B - Method and device for realizing multicast - Google Patents
Method and device for realizing multicast Download PDFInfo
- Publication number
- CN102355358B CN102355358B CN201110225913XA CN201110225913A CN102355358B CN 102355358 B CN102355358 B CN 102355358B CN 201110225913X A CN201110225913X A CN 201110225913XA CN 201110225913 A CN201110225913 A CN 201110225913A CN 102355358 B CN102355358 B CN 102355358B
- Authority
- CN
- China
- Prior art keywords
- multicast
- message
- vlan
- user
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000012545 processing Methods 0.000 claims description 31
- 230000004044 response Effects 0.000 claims description 9
- 238000004321 preservation Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 6
- 230000032683 aging Effects 0.000 description 4
- 230000010076 replication Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明公开了一种组播实现的方法,该方法包括:收到IGMP Report报文时,将IGMP Report报文携带的用户VLAN和组播组IP地址,以及报文接收端口和与该组播IP地址绑定的组播VLAN进行绑定保存;收到IGMP Leave报文时,只向既定端口上的相应VLAN发送IGMP Query报文即可。基于同样的构思,本发明还提出一种设备,在配置简单的情况下,提高了用户侧带宽的利用率,减轻了网络侧带宽压力。
The invention discloses a method for realizing multicast. The method includes: when receiving an IGMP Report message, the user VLAN and the multicast group IP address carried in the IGMP Report message, as well as the message receiving port and the multicast The multicast VLAN bound to the IP address is bound and saved; when receiving the IGMP Leave message, it only needs to send the IGMP Query message to the corresponding VLAN on the specified port. Based on the same idea, the present invention also proposes a device, which improves the utilization rate of bandwidth on the user side and reduces bandwidth pressure on the network side under the condition of simple configuration.
Description
技术领域 technical field
本发明涉及通信领域技术,特别涉及一种组播实现的方法和设备。The invention relates to the technology in the communication field, in particular to a method and equipment for realizing multicast.
背景技术 Background technique
通过组播可以在组播源和用户之间实现高效的点到多点网络连接:组播源同时向属于同一组播组的多个用户传输相同的组播数据。但是,这样的数据在骨干网和通过接入网复制点以前只传输一份。进入接入网后,组播数据在复制点进行复制,变成多份相同的数据,送达不同接收者。Multicast can realize efficient point-to-multipoint network connection between multicast source and users: multicast source simultaneously transmits the same multicast data to multiple users belonging to the same multicast group. However, only one copy of such data is transmitted before the backbone network and through the access network replication point. After entering the access network, the multicast data is replicated at the replication point to become multiple copies of the same data and delivered to different receivers.
组播的实现依赖于组播协议报文(IGMP报文)交互。用户通过发送组播协议报告报文(IGMP Report报文),告诉交换机希望加入并接收某个特定组播源的信息,交换机主动学习这样的请求,并保存用户和组播组的对应关系;同样,用户通过发送组播协议离开报文(IGMP Leave报文),告知交换机要退出特定组播组。为了不影响其它用户对组播数据的接收,交换机在收到组播离开报文后需要向该组播组发送组播协议查询报文(IGMP Query报文),以确认该组播组内是否还有其它用户。如果没有,交换机将不再维护相应的用户/组播组对应关系,并通知路由器不要再发送该组播数据。The realization of multicast depends on the interaction of multicast protocol packets (IGMP packets). By sending a multicast protocol report message (IGMP Report message), the user tells the switch that he wants to join and receive information from a specific multicast source, and the switch actively learns such a request and saves the corresponding relationship between the user and the multicast group; , the user informs the switch to leave a specific multicast group by sending a multicast protocol leave message (IGMP Leave message). In order not to affect the reception of multicast data by other users, the switch needs to send a multicast protocol query message (IGMP Query message) to the multicast group after receiving the multicast leave message to confirm whether There are other users. If not, the switch will no longer maintain the corresponding user/multicast group correspondence, and notify the router not to send the multicast data.
现有组播离开功能的实现都基于端口,当交换机从某端口接收到IGMPLeave报文时,直接将该端口和组播组的对应关系从组播转发表项中删除。当端口下只有一个用户时,这样的处理策略自然可以节约带宽。但是,如果该端口下配置了多个VLAN,并且每个VLAN下都有若干个组播用户,交换机就需要对该端口下是否仍有其它组播用户进行确认查询,这将不可避免地造成用户侧带宽浪费。The realization of the existing multicast leave function is based on the port. When the switch receives the IGMPLeave message from a certain port, it directly deletes the corresponding relationship between the port and the multicast group from the multicast forwarding entry. When there is only one user on the port, such a processing strategy can naturally save bandwidth. However, if multiple VLANs are configured under the port, and there are several multicast users under each VLAN, the switch needs to check whether there are other multicast users under the port, which will inevitably cause user Wasted side bandwidth.
参见图1,图1为基于端口实现组播离开示意结构图。图1中,交换机103在用户侧的端口1(Port 1)到Port n下分别配置了多个VLAN,每个VLAN下有若干(大于1个)组播用户。交换机103通过路由器102与服务器103相连。假设User 1向交换机发送了IGMP Leave报文,此时,交换机只知道在其port 1口收到了该报文,但报文具体来自哪个VLAN中的用户是区分不出来的。在这种情况下,交换机需要向port 1口所有VLAN包含的所有用户都发送一份IGMP Query报文,以确定该端口下是否还有其他的组播用户在接收IGMP Leave报文所携带的组播组的服务。如果在port 1下配置了n个VLAN,并且每个VLAN下存在m个用户,那么交换机需要发送的IGMPQuery报文的数目即为(m X n)个。最大VLAN通常可以取到4094个,同一VLAN下用户的数目是不可确定的,因此,(m X n)可能是个很大的值,而且用户可能频繁加入离开某个组播组,所以大量的IGMP Query报文极大地浪费了复制点以后用户侧的宝贵带宽,违背了组播协议设计的初衷。Referring to FIG. 1 , FIG. 1 is a schematic structural diagram for realizing multicast leaving based on ports. Among Fig. 1, switch 103 has configured a plurality of VLANs under port 1 (Port 1) to Port n of user side respectively, and there are several (greater than 1) multicast users under each VLAN. The switch 103 is connected to the server 103 through the router 102 . Assume that User 1 sends an IGMP Leave message to the switch. At this time, the switch only knows that the message has been received at its port 1, but it cannot be distinguished which VLAN the message comes from. In this case, the switch needs to send an IGMP Query message to all users contained in all VLANs on port 1 to determine whether there are other multicast users receiving the group information carried in the IGMP Leave message under this port. group service. If n VLANs are configured under port 1, and there are m users under each VLAN, then the number of IGMPQuery messages that the switch needs to send is (m X n). The maximum number of VLANs can usually be 4094. The number of users in the same VLAN is uncertain, so (m X n) may be a very large value, and users may frequently join and leave a certain multicast group, so a large number of IGMP Query packets greatly waste the precious bandwidth on the user side after the replication point, which violates the original design intention of the multicast protocol.
由上可知,现有组播离开功能的实现造成了用户侧带宽的浪费。It can be seen from the above that the implementation of the existing multicast leave function causes a waste of user-side bandwidth.
发明内容 Contents of the invention
有鉴于此,本发明提供一种组播实现的方法和设备,在配置简单的情况下,提高了用户侧带宽的利用率。In view of this, the present invention provides a method and device for implementing multicast, which improves the utilization rate of user-side bandwidth under the condition of simple configuration.
为解决上述技术问题,本发明的技术方案是这样实现的:In order to solve the problems of the technologies described above, the technical solution of the present invention is achieved in the following way:
一种组播实现的方法,该方法包括:收到用户侧发来的组播协议报告IGMP Report报文时,将所述IGMP Report报文的报文接收端口、携带的用户虚拟局域网VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN进行绑定保存;A method for realizing multicast, the method comprising: when receiving a multicast protocol report IGMP Report message sent by a user side, the message receiving port of the IGMP Report message, the carried user's virtual local area network VLAN and group The multicast group IP address and the multicast VLAN bound to the multicast group IP address are bound and saved;
收到用户侧发来的IGMP Leave报文时,如果在所述绑定保存的信息中查找到所述IGMP Leave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN,则生成IGMP Query报文并向所述IGMP Leave报文的报文接收端口上的用户VLAN范围内所有用户发送所请求离开组播组IP地址的组播协议查询IGMP Query报文。When receiving the IGMP Leave message sent by the user side, if the message receiving port, the carried user VLAN and the multicast group IP address of the IGMP Leave message are found in the information saved in the binding, and the The multicast VLAN bound by the multicast group IP address generates an IGMP Query message and sends a request to leave the multicast group IP address to all users in the user VLAN range on the message receiving port of the IGMP Leave message. Multicast protocol query IGMP Query message.
其中,将所述IGMP Report报文的报文接收端口、携带的VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN进绑定行保存之后,所述方法进一步包括:Wherein, after the message receiving port of the IGMP Report message, the carried VLAN and the multicast group IP address, and the multicast VLAN bound with the multicast group IP address are bound and saved, the method further include:
从网络侧获取用户侧需要的组播数据流,并根据绑定保存的报文接收端口和用户VLAN,将所述组播数据流复制并发送给用户侧相应用户。Obtain the multicast data flow required by the user side from the network side, and copy and send the multicast data flow to the corresponding user on the user side according to the message receiving port and user VLAN stored in the binding.
所述方法进一步包括:The method further comprises:
如果在预设查询超时时间和查询超时次数内收到所发送IGMP Query报文的用户响应,则继续向该绑定保存的报文接收端口上的用户VLAN范围内发送该组播流,否则,删除所述绑定保存的报文接收端口、用户VLAN、组播组IP地址和组播VLAN。If the user response of the sent IGMP Query message is received within the preset query timeout time and query timeout times, continue to send the multicast stream to the user VLAN range on the message receiving port saved by the binding, otherwise, Delete the message receiving port, user VLAN, multicast group IP address and multicast VLAN stored in the binding.
所述的方法进一步包括:预先建立组播转发表项,将所述报文接收端口、用户VLAN、组播组IP地址和组播VLAN绑定保存在所述组播转发表项中。The method further includes: pre-establishing a multicast forwarding entry, and storing the message receiving port, user VLAN, multicast group IP address and multicast VLAN binding in the multicast forwarding entry.
所述查找到绑定保存的所述IGMP Leave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN的方法为:The method for finding the message receiving port of the IGMP Leave message bound and saved, the carried user VLAN and the multicast group IP address, and the multicast VLAN bound with the multicast group IP address is:
根据所述IGMP Leave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN,在所述组播转发表项中查找到绑定保存的相应报文接收端口、用户VLAN、组播组IP地址和组播VLAN。According to the message receiving port of the IGMP Leave message, the carried user VLAN and multicast group IP address, and the multicast VLAN bound with the multicast group IP address, find out in the multicast forwarding table item Bind and save the corresponding message receiving port, user VLAN, multicast group IP address and multicast VLAN.
一种组播实现的设备,所述设备包括:第一接收单元、存储单元、第二接收单元、处理单元和发送单元;A device for implementing multicast, the device comprising: a first receiving unit, a storage unit, a second receiving unit, a processing unit, and a sending unit;
所述第一接收单元,与所述存储单元相连,用于接收用户侧发来的组播协议报告IGMP Report报文;The first receiving unit is connected to the storage unit and is used to receive the multicast protocol report IGMP Report message sent by the user side;
所述存储单元,与所述处理单元相连,用于将所述第一接收单元接收到IGMP Report报文的报文接收端口、携带的用户虚拟局域网VLAN和组播组IP地址,以及与该地址绑定的组播VLAN进行绑定保存;The storage unit is connected to the processing unit, and is used for receiving the message receiving port of the IGMP Report message by the first receiving unit, the carried user virtual local area network VLAN and the multicast group IP address, and the address The bound multicast VLAN is bound and saved;
所述第二接收单元,与所述处理单元相连,用于接收用户侧发来的组播协议离开IGMP Leave报文;The second receiving unit is connected to the processing unit and is used to receive the IGMP Leave message from the multicast protocol sent by the user side;
所述处理单元,与所述发送单元相连,用于根据所述第二接收单元接收的所述IGMP Leave报文,在所述存储单元绑定保存的信息中查找到所述IGMP Leave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN时,生成组播协议查询IGMP Query报文;The processing unit is connected to the sending unit, and is used to find the information of the IGMP Leave message in the information bound and saved by the storage unit according to the IGMP Leave message received by the second receiving unit When the message receiving port, the carried user VLAN and multicast group IP address, and the multicast VLAN bound with the multicast group IP address generate a multicast protocol query IGMP Query message;
所述发送单元,将所述处理单元生成的IGMP Query报文向所述IGMPLeave报文的报文接收端口上的用户VLAN范围内所有用户发送所请求离开组播组IP地址的组播协议查询IGMP Query报文。The sending unit sends the IGMP Query message generated by the processing unit to all users in the user VLAN range on the message receiving port of the IGMPLeave message to send the multicast protocol query IGMP requesting to leave the multicast group IP address Query message.
其中,所述第一接收单元,与所述处理单元相连,进一步用于从网络侧获取用户侧需要的组播数据流;Wherein, the first receiving unit is connected to the processing unit, and is further used to obtain the multicast data stream required by the user side from the network side;
所述处理单元,进一步用于,将所述第一接收单元获取的组播数据流,根据绑定保存的报文接收端口和用户VLAN进行复制;The processing unit is further configured to copy the multicast data stream acquired by the first receiving unit according to the message receiving port and user VLAN stored in the binding;
所述发送单元,进一步用于将所述处理单元复制的组播数据流发送给用户侧相应用户。The sending unit is further configured to send the multicast data stream copied by the processing unit to a corresponding user on the user side.
所述处理单元,进一步用于所述第二接收单元如果在预设查询超时时间和查询超时次数内未收到所述IGMP Query报文的用户响应,删除所述存储单元绑定保存的报文接收端口、用户VLAN、组播组IP地址和组播VLAN;The processing unit is further configured to delete the message bound and saved by the storage unit if the second receiving unit does not receive the user response of the IGMP Query message within the preset query timeout time and the number of query timeout times Receive port, user VLAN, multicast group IP address and multicast VLAN;
所述发送单元,用于所述第二接收单元如果在预设查询超时时间和查询超时次数内收到所发送IGMP Query报文的用户响应,则继续向该报文接收端口上的用户VLAN范围内发送该组播流。The sending unit is used for the second receiving unit to continue sending messages to the user VLAN range on the message receiving port if the user response of the sent IGMP Query message is received within the preset query timeout time and query timeout times. Send the multicast stream within.
所述存储单元,进一步用于建立组播转发表项,将报文接收端口、用户VLAN、组播组IP地址和组播VLAN绑定保存在该组播转发表项中。The storage unit is further used to establish a multicast forwarding entry, and store the message receiving port, user VLAN, multicast group IP address and multicast VLAN binding in the multicast forwarding entry.
所述处理单元,用于根据所述IGMP Leave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN,在所述存储单元中的组播转发表项中查找到绑定保存的相应报文接收端口、用户VLAN、组播组IP地址和组播VLAN。The processing unit is configured to, according to the message receiving port of the IGMP Leave message, the carried user VLAN and the multicast group IP address, and the multicast VLAN bound with the multicast group IP address, in the storage The corresponding message receiving port, user VLAN, multicast group IP address and multicast VLAN stored in the binding are found in the multicast forwarding table item in the unit.
综上所述,本发明在收到IGMP Report报文时,将IGMP Report报文携带的用户VLAN和组播组IP地址,以及报文接收端口和与该组播IP地址绑定的组播VLAN进行绑定保存;收到IGMP Leave报文时,只向既定端口上的相应VLAN发送IGMP Query报文即可。在配置简单的情况下,提高了用户侧带宽的利用率。In summary, when the present invention receives the IGMP Report message, the user VLAN and the multicast group IP address carried by the IGMP Report message, as well as the message receiving port and the multicast VLAN bound with the multicast IP address Save the binding; when receiving the IGMP Leave message, only send the IGMP Query message to the corresponding VLAN on the specified port. In the case of simple configuration, the utilization rate of bandwidth on the user side is improved.
附图说明 Description of drawings
图1为基于端口实现组播离开示意结构图;Fig. 1 is a schematic structural diagram of implementing multicast departure based on ports;
图2为本发明实现组播的方法流程示意图;Fig. 2 is a schematic flow diagram of a method for realizing multicast in the present invention;
图3为本发明具体实施例实现组播的方法流程示意图;Fig. 3 is a schematic flow diagram of a method for realizing multicast according to a specific embodiment of the present invention;
图4为本发明实现组播的设备的结构示意图。FIG. 4 is a schematic structural diagram of a device for realizing multicast according to the present invention.
具体实施方式 Detailed ways
为使本发明的目的、技术方案及优点更加清楚明白,以下参照附图并举实施例,对本发明所述方案作进一步地详细说明。In order to make the object, technical solution and advantages of the present invention clearer, the solutions of the present invention will be further described in detail below with reference to the accompanying drawings and examples.
实现本发明的设备只要具有组播功能即可,如具有组播功能的交换机、路由器、HUB、epon等。在下文方法实施例的具体描述中,为了描述方便以交换机为例,且该交换机具有组播功能。The device for realizing the present invention only needs to have the multicast function, such as a switch, router, HUB, epon, etc. with the multicast function. In the specific description of the method embodiments below, a switch is taken as an example for convenience of description, and the switch has a multicast function.
参见图2,图2为本发明实现组播的方法流程示意图。具体步骤为:Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a method for implementing multicast in the present invention. The specific steps are:
步骤201,交换机收到用户侧发来的IGMP Report报文时,将该IGMPReport报文的报文接收端口、携带的用户虚拟局域网VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN进行绑定保存。Step 201, when the switch receives the IGMP Report message sent by the user side, the message receiving port of the IGMPReport message, the user's virtual local area network VLAN and the multicast group IP address carried, and the multicast group IP address are bound Bind and save the specified multicast VLAN.
本步骤中将相关信息绑定保存之后,从网络侧获取用户侧需要的组播数据流,并根据保存的报文接收端口和用户VLAN,将获取的组播数据流复制并发送给用户侧相应用户。After the relevant information is bound and saved in this step, obtain the multicast data flow required by the user side from the network side, and copy and send the obtained multicast data flow to the corresponding user side according to the saved message receiving port and user VLAN. user.
步骤202,交换机收到用户侧发来的IGMP Leave报文时,如果在绑定保存的信息中查找到所述IGMP Leave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN,则生成IGMPQuery报文并向IGMP Leave报文的报文接收端口上的用户VLAN范围内所有用户发送所请求离开组播组IP地址的IGMP Query报文。Step 202, when the switch receives the IGMP Leave message sent by the user side, if the message receiving port, the carried user VLAN and the multicast group IP address of the IGMP Leave message are found in the information saved in the binding, And the multicast VLAN bound with the multicast group IP address, then generate an IGMPQuery message and send the requested IGMP request to leave the multicast group IP address to all users in the user VLAN range on the message receiving port of the IGMP Leave message. Query message.
本步骤中向用户侧发送了IGMP Query报文之后,如果在预设查询超时时间和查询超时次数内收到所发送IGMP Query报文的用户响应,则继续向该报文接收端口上的用户VLAN范围内发送该组播流,否则,删除绑定保存的对应的报文接收端口、用户VLAN、组播组IP地址和组播VLAN。After sending the IGMP Query message to the user side in this step, if the user response of the sent IGMP Query message is received within the preset query timeout time and query timeout times, then continue to send the message to the user VLAN on the message receiving port. Send the multicast stream within the range, otherwise, delete the corresponding message receiving port, user VLAN, multicast group IP address and multicast VLAN stored in the binding.
下面通过具体实施例,参照附图详细说明组播实现的整个过程。The whole process of implementing multicast will be described in detail below through specific embodiments with reference to the accompanying drawings.
参见图3,图3为本发明具体实施例实现组播的方法流程示意图。其具体步骤为:Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a method for implementing multicast according to a specific embodiment of the present invention. The specific steps are:
步骤301,开始。
步骤302,交换机配置组播组IP地址与组播VLAN的绑定关系。In
目前的组播业务多为付费业务,必须对用户的访问权限进行控制,在没有获得权限以前,用户不能够访问特定的组播业务。这种限制还可以进一步扩展到不同的组播服务提供商,将不同提供商提供的组播业务与不同的组播VLAN进行绑定,不同组播业务对应不同组播IP地址,从而隔离不同组播源,提高组播业务的可管理性和可运营性。Most of the current multicast services are paid services, and the user's access authority must be controlled. Before obtaining the authority, the user cannot access a specific multicast service. This limitation can be further extended to different multicast service providers, and the multicast services provided by different providers are bound to different multicast VLANs. Different multicast services correspond to different multicast IP addresses, thereby isolating different groups. broadcast source, improving the manageability and operability of multicast services.
步骤303,交换机配置组播相关属性。In
组播功能的实现,还依赖于一些辅助功能,例如组播转发表项老化时间,查询超时时间,查询超时次数等。这些参数都可以根据实际应用预先设定。The realization of the multicast function also depends on some auxiliary functions, such as the aging time of multicast forwarding entries, query timeout time, query timeout times, etc. These parameters can all be preset according to actual applications.
步骤304,开启组播功能。
交换机开启组播功能,组播任务或进程将对组播协议报文进行监听。The switch enables the multicast function, and the multicast task or process will monitor the multicast protocol packets.
步骤302到步骤304同现有技术,这里不再赘述。
步骤305,收到组播协议报文。
交换机收到组播协议报文,并对其进行解析。The switch receives the multicast protocol packet and analyzes it.
步骤306,判断收到的组播协议报文是否是IGMP Report报文,如果是,则执行步骤307;否则,执行步骤310。
步骤307,交换机建立组播转发表项。In
本步骤中建立的表项参见表1,表1为本发明组播转发表项。For the entries established in this step, refer to Table 1, and Table 1 is the multicast forwarding entries of the present invention.
表1Table 1
表1中,报文接收端口为接收IGMP Report报文的端口号;用户VLAN为IGMP Report报文携带的VLAN号;组播组ip地址为步骤302中配置的组播组ip地址;组播VLAN为步骤302中配置的组播VLAN号;其他为使用者根据实际需要保存其它信息所用。In table 1, the message receiving port is the port number receiving the IGMP Report message; the user VLAN is the VLAN number carried by the IGMP Report message; the multicast group ip address is the multicast group ip address configured in
以图1为例,假设user 1向交换机请求组播组ip地址为239.1.1.2的组播数据流,向交换机发送IGMP Report报文。而user 1所在的用户VLAN为VLAN 1,Report报文的接收端口为port 1,组播组239.1.1.2的数据流配置在VLAN 200,因此user 1向交换机发送的IGMP Report报文携带用户VLAN为VLAN1,组播组IP地址为239.1.1.2,通过交换机的端口port 1进入交换机,通过组播组IP地址在交换机上查找到绑定的组播VLAN200。Take Figure 1 as an example, assuming that user 1 requests the multicast data flow of the multicast group IP address 239.1.1.2 from the switch, and sends an IGMP Report message to the switch. The user VLAN where user 1 is located is VLAN 1, the receiving port of the Report message is port 1, and the data flow of the multicast group 239.1.1.2 is configured in VLAN 200, so the IGMP Report message sent by user 1 to the switch carries the user VLAN as VLAN1, the multicast group IP address is 239.1.1.2, enter the switch through port 1 of the switch, and find the bound multicast VLAN200 on the switch through the multicast group IP address.
交换机收到user 1发来的IGMP Report报文,将报文解析,将IGMP Report报文携带的用户VLAN和组播组ip地址,以及报文接收端口和在交换机上获得的与组播IP地址绑定的组播VLAN绑定存储于组播组转发表中。参见表2,表2为本发明具体实施例组播转发表项。The switch receives the IGMP Report message sent by user 1, parses the message, and converts the user VLAN and multicast group ip address carried in the IGMP Report message, as well as the message receiving port and the multicast IP address obtained on the switch The bound multicast VLAN binding is stored in the multicast group forwarding table. Referring to Table 2, Table 2 is the multicast forwarding entry of the specific embodiment of the present invention.
表2Table 2
如果其它VLAN的用户发来IGMP Report报文,交换机也将IGMP Report报文携带的各上述信息存储于交换机建立的组播组转发表中。对于不同组播VLAN或用户端口等,交换机统一维护一张组播转发表项,也可以分别维护不同组播转发表,根据使用者方便具体实施。If users of other VLANs send IGMP Report messages, the switch will also store the above information carried in the IGMP Report messages in the multicast group forwarding table established by the switch. For different multicast VLANs or user ports, etc., the switch maintains one multicast forwarding table item uniformly, or maintains different multicast forwarding tables separately, according to the convenience of the user.
组播转发表项建立后,为该组播表项设置定时器,记录相应组播转发表项老化时间。在老化时间内,如果收到用户侧发来的IGMP Report报文,且该IGMP Report报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播IP地址绑定的组播VLAN在组播转发表项中已被绑定保存,则更新相应组播转发表项的老化时间;否则,删除相应组播转发表项。After the multicast forwarding entry is established, a timer is set for the multicast entry to record the aging time of the corresponding multicast forwarding entry. During the aging time, if an IGMP Report message from the user side is received, and the message receiving port of the IGMP Report message, the carried user VLAN and multicast group IP address, and the binding with the multicast IP address If the multicast VLAN has been bound and stored in the multicast forwarding entry, update the aging time of the corresponding multicast forwarding entry; otherwise, delete the corresponding multicast forwarding entry.
步骤308,交换机向网络侧请求组播数据流。
将相应信息绑定存储在组播转发表项后,交换机向网络侧发送IGMPReport报文,请求其用户需要的组播数据流。在多个用户申请同一个组播组的情况下,交换机还可以启用proxy功能,对多个Report报文进行合并处理。After binding and storing the corresponding information in the multicast forwarding table entry, the switch sends an IGMPReport message to the network side to request the multicast data flow required by its users. When multiple users apply for the same multicast group, the switch can also enable the proxy function to combine multiple Report messages.
步骤309,收到网络侧发来的组播数据流,根据组播转发表项复制组播数据流并发送给相应用户。执行步骤314。
组播数据流复制的依据是组播转发表项中绑定保存的报文接收端口和用户VLAN。以图1为例,将user 1请求的组播数据流复制并发送给port1上的VLAN1下的各用户。The basis of multicast data stream duplication is the message receiving port and user VLAN bound and saved in the multicast forwarding entry. Taking Figure 1 as an example, the multicast data stream requested by user 1 is copied and sent to each user under VLAN1 on port1.
步骤310,交换机判断收到的组播协议报文是否为IGMP leave报文,如果是,执行步骤311;否则,执行步骤314。
步骤311,交换机如果查找到对应组播转发表项,根据报文接收端口、用户VLAN和IGMP Leave报文请求离开的组播组IP地址生成并发送IGMPQuery报文。Step 311, if the switch finds the corresponding multicast forwarding entry, it generates and sends an IGMPQuery message according to the message receiving port, the user VLAN and the multicast group IP address that the IGMP Leave message requests to leave.
当交换机收到IGMP Leave报文,将根据报文接收端口和IGMP Leave报文携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN,在组播转发表项中查找,如果查找到上述绑定保存信息对应的组播转发表项存在,则生成IGMP Query报文,并向该IGMP Leave报文的报文接收端口上的对应的用户VLAN范围内所有用户发送所请求离开组播组IP地址的IGMP Query报文;例如,组播转发表项中的Report报文接收端口为port1,对应的用户VLAN为VLAN1,则该IGMP Query报文在port1端口上的VLAN1范围内发送。When the switch receives the IGMP Leave message, it will perform multicast forwarding according to the receiving port of the message and the user VLAN and multicast group IP address carried in the IGMP Leave message, as well as the multicast VLAN bound to the multicast group IP address. If it is found that the multicast forwarding table entry corresponding to the above binding storage information exists, an IGMP Query message will be generated and sent to all users within the corresponding user VLAN range on the message receiving port of the IGMP Leave message. The user sends an IGMP Query message requesting to leave the IP address of the multicast group; for example, the receiving port of the Report message in the multicast forwarding entry is port1, and the corresponding user VLAN is VLAN1, then the IGMP Query message is sent on port1 sent within the range of VLAN1.
步骤312,在预设查询超时时间和查询超时次数内是否收到所发送IGMPQuery报文的用户响应,如果是,执行步骤305;否则,执行步骤313。
根据组播转发表项中的Report报文接收端口对应的用户VLAN范围内是否有用户回应查询,判定该范围内是否仍存在该组播组的用户。According to whether there is a user responding to the query in the user VLAN range corresponding to the Report message receiving port in the multicast forwarding entry, it is determined whether there is still a user of the multicast group in the range.
步骤313,交换机将对应组播的组播转发表项删除。
在预设查询超时时间和查询超时次数内,交换机没有收到组播转发表项中的Report报文接收端口上对应的用户VLAN范围内用户回应查询报文,则删除该对应的组播转发表项。并通知网络侧,对该组播转发表项中端口对应的用户VLAN及对应的组播不再处理。例如,组播转发表项中的Report报文接收端口为port1,对应的用户VLAN为VLAN1,组播组ip地址为239.1.1.2,则通知网络侧不再处理port1上VLAN1的组播为239.1.1.2的报文。Within the preset query timeout time and the number of query timeouts, if the switch does not receive a query message from a user in the corresponding user VLAN on the receiving port of the Report message in the multicast forwarding table entry, the corresponding multicast forwarding table will be deleted. item. And notify the network side that the user VLAN corresponding to the port in the multicast forwarding entry and the corresponding multicast are no longer processed. For example, if the receiving port of the Report message in the multicast forwarding entry is port1, the corresponding user VLAN is VLAN1, and the multicast group ip address is 239.1.1.2, then the network side is notified not to process the multicast of VLAN1 on port1 as 239.1. 1.2 message.
步骤314,结束。
基于同样的发明构思,本发明还提出一种实现组播的设备。该设备具有组播功能。参见图4,图4为本发明实现组播的设备的结构示意图。该设备包括:第一接收单元401、存储单元402、第二接收单元403、处理单元404和发送单元405。Based on the same inventive idea, the present invention also proposes a device for realizing multicast. The device has multicast function. Referring to FIG. 4, FIG. 4 is a schematic structural diagram of a device for realizing multicast according to the present invention. The device includes: a first receiving unit 401 , a storage unit 402 , a second receiving unit 403 , a processing unit 404 and a sending unit 405 .
第一接收单元401,与存储单元402相连,用于接收用户侧发来的IGMPReport报文。The first receiving unit 401 is connected to the storage unit 402 and configured to receive the IGMPReport message sent from the user side.
存储单元402,与处理单元404相连,用于将第一接收单元401接收到IGMPReport报文的报文接收端口、携带的用户虚拟局域网VLAN和组播组IP地址,以及与该地址绑定的组播VLAN进行绑定保存。The storage unit 402 is connected with the processing unit 404, and is used for receiving the message receiving port of the IGMPReport message by the first receiving unit 401, the carried user virtual local area network VLAN and the multicast group IP address, and the group bound to the address Broadcast VLAN for binding and saving.
第二接收单元403,与处理单元404相连,用于接收用户侧发来的组播协议离开IGMP Leave报文。The second receiving unit 403 is connected with the processing unit 404, and is used for receiving the multicast protocol IGMP Leave message sent from the user side.
处理单元404,与发送单元405相连,用于根据第二接收单元403接收的IGMP Leave报文,在存储单元402绑定保存的信息中查找到所述IGMPLeave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN时,生成组播协议查询IGMP Query报文。The processing unit 404 is connected to the sending unit 405, and is used to find the message receiving port of the IGMPLeave message and the carried message in the information stored in the storage unit 402 according to the IGMP Leave message received by the second receiving unit 403. When the user VLAN, multicast group IP address, and the multicast VLAN bound to the multicast group IP address are generated, a multicast protocol query IGMP Query message is generated.
发送单元405,将处理单元404生成的IGMP Query报文向IGMP Leave报文的报文接收端口上的用户VLAN范围内所有用户发送所请求离开组播组IP地址的IGMP Query报文。Sending unit 405 sends the IGMP Query message that the request leaves the multicast group IP address to all users in the user VLAN range on the message receiving port of the IGMP Leave message by the IGMP Query message generated by the processing unit 404.
较佳地,Preferably,
第一接收单元401,与处理单元404相连,进一步用于从网络侧获取用户侧需要的组播数据流。The first receiving unit 401 is connected to the processing unit 404, and is further configured to obtain the multicast data stream required by the user side from the network side.
处理单元404,进一步用于,将第一接收单元401获取的组播数据流,根据保存的报文接收端口和用户VLAN进行复制。The processing unit 404 is further configured to copy the multicast data flow acquired by the first receiving unit 401 according to the saved message receiving port and user VLAN.
发送单元405,进一步用于将处理单元404复制的组播数据流发送给用户侧相应用户。The sending unit 405 is further configured to send the multicast data stream copied by the processing unit 404 to a corresponding user on the user side.
较佳地,Preferably,
处理单元404,进一步用于第二接收单元403如果在预设查询超时时间和查询超时次数内未收到IGMP Query报文的用户响应,删除存储单元402绑定保存的对应的报文接收端口、用户VLAN、组播组IP地址和组播VLAN。The processing unit 404 is further used for the second receiving unit 403 to delete the corresponding message receiving port, the corresponding message receiving port, and User VLAN, multicast group IP address and multicast VLAN.
发送单元405,用于第二接收单元403如果在预设查询超时时间和查询超时次数内收到所发送IGMP Query报文的用户响应,则继续向该报文接收端口上的用户VLAN范围内发送该组播流。The sending unit 405 is used for the second receiving unit 403 to continue to send the IGMP Query message to the user VLAN range on the message receiving port if the second receiving unit 403 receives the user response of the sent IGMP Query message within the preset query timeout time and query timeout times. The multicast stream.
较佳地,Preferably,
存储单元402,进一步用于建立组播转发表项,将报文接收端口、用户VLAN、组播组IP地址和组播VLAN绑定保存在该组播转发表项中。The storage unit 402 is further configured to establish a multicast forwarding entry, and store the message receiving port, user VLAN, multicast group IP address and multicast VLAN binding in the multicast forwarding entry.
较佳地,Preferably,
处理单元404,用于根据IGMP Leave报文的报文接收端口、携带的用户VLAN和组播组IP地址,以及与该组播组IP地址绑定的组播VLAN,在存储单元402中的组播转发表项中查找到保存的相应报文接收端口、用户VLAN、组播组IP地址和组播VLAN。Processing unit 404, for according to the message receiving port of IGMP Leave message, carried user VLAN and multicast group IP address, and the multicast VLAN bound with this multicast group IP address, the group in storage unit 402 Find the corresponding message receiving port, user VLAN, multicast group IP address and multicast VLAN saved in the broadcast forwarding table entry.
综上所述,本发明在具有组播功能的设备设备收到IGMP Report报文时,无需额外手动配置,将报文接收端口、用户VLAN、组播组IP地址以及该地址绑定的组播VLAN存储于组播转发表项中。当设备获取用户侧请求的组播数据流时,根据组播转发表项进行复制并发送给用户侧相应用户,因此,将组播数据复制点从路由器降至设备,降低接入网负担。当设备设备收到IGMPleave报文时,根据组播转发表项发送IGMP Query报文,以更小的粒度区分用户,缩小IGMP Query报文发送范围,在配置简单的情况下,提高了用户侧带宽的利用率。To sum up, when the device with multicast function receives the IGMP Report message, the present invention does not need additional manual configuration, and the message receiving port, user VLAN, multicast group IP address and the multicast address bound to the address VLANs are stored in multicast forwarding entries. When the device obtains the multicast data stream requested by the user side, it copies it according to the multicast forwarding table entry and sends it to the corresponding user on the user side. Therefore, the multicast data replication point is lowered from the router to the device, reducing the burden on the access network. When the device receives the IGMPleave message, it sends the IGMP Query message according to the multicast forwarding table item, distinguishes users with a smaller granularity, reduces the sending range of the IGMP Query message, and improves the bandwidth of the user side under the condition of simple configuration utilization rate.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110225913XA CN102355358B (en) | 2011-08-08 | 2011-08-08 | Method and device for realizing multicast |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110225913XA CN102355358B (en) | 2011-08-08 | 2011-08-08 | Method and device for realizing multicast |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102355358A CN102355358A (en) | 2012-02-15 |
| CN102355358B true CN102355358B (en) | 2013-09-25 |
Family
ID=45578855
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201110225913XA Expired - Fee Related CN102355358B (en) | 2011-08-08 | 2011-08-08 | Method and device for realizing multicast |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102355358B (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102594686A (en) * | 2012-02-20 | 2012-07-18 | 深圳市共进电子股份有限公司 | Implementing method of multicast terminal on rapid departure from multicast |
| CN103095472B (en) * | 2013-01-09 | 2018-02-13 | 上海斐讯数据通信技术有限公司 | A kind of method that travelling across VLAN multicast is realized under PON system |
| CN103259675B (en) * | 2013-04-11 | 2016-04-13 | 深圳市共进电子股份有限公司 | The implementation method that a kind of interactive network TV service message is isolated between port |
| CN104079418B (en) * | 2014-05-28 | 2018-07-31 | 上海斐讯数据通信技术有限公司 | A kind of processing method of simplified multicast message |
| CN106301814A (en) * | 2015-06-08 | 2017-01-04 | 中兴通讯股份有限公司 | A kind of method and device realizing multicast service |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1543132A (en) * | 2003-04-29 | 2004-11-03 | 华为技术有限公司 | Realization method of multicast across virtual local area network |
| CN1996956A (en) * | 2006-12-20 | 2007-07-11 | 杭州华为三康技术有限公司 | L3 network device and method for multi-cast cross-VLAN forwarding |
| CN101083546A (en) * | 2007-07-18 | 2007-12-05 | 中兴通讯股份有限公司 | Multicasting management approach of switch equipment |
| US7512146B1 (en) * | 2006-01-31 | 2009-03-31 | Garrettcom, Inc. | Method and apparatus for layer 2 multicast traffic management |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1010759B (en) * | 1988-05-26 | 1990-12-12 | 宋培伦 | Wood branding technology |
| US8121124B2 (en) * | 2009-06-16 | 2012-02-21 | Calix, Inc. | Applying adaptive thresholds to multicast streams within computer networks |
-
2011
- 2011-08-08 CN CN201110225913XA patent/CN102355358B/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1543132A (en) * | 2003-04-29 | 2004-11-03 | 华为技术有限公司 | Realization method of multicast across virtual local area network |
| US7512146B1 (en) * | 2006-01-31 | 2009-03-31 | Garrettcom, Inc. | Method and apparatus for layer 2 multicast traffic management |
| CN1996956A (en) * | 2006-12-20 | 2007-07-11 | 杭州华为三康技术有限公司 | L3 network device and method for multi-cast cross-VLAN forwarding |
| CN101083546A (en) * | 2007-07-18 | 2007-12-05 | 中兴通讯股份有限公司 | Multicasting management approach of switch equipment |
Non-Patent Citations (2)
| Title |
|---|
| 交换式以太网上的多播协议;王军、吴志美;《软件学报》;20031231;第14卷(第3期);全文 * |
| 尹海春.二层以太网交换机上组播协议的实现.《江南大学学报(自然科学版)》.2003,第2卷(第4期),全文. * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102355358A (en) | 2012-02-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100531040C (en) | Method and apparatus for realizing multicasting virtual private network binding | |
| US8539088B2 (en) | Session monitoring method, apparatus, and system based on multicast technologies | |
| CN104954281B (en) | Communication means, system, resource pool management system, interchanger and control device | |
| CN100442776C (en) | The Method of Realizing Multicast Forwarding on Layer 3 Switch | |
| US20070253409A1 (en) | Method for Realizing the Multicast Service | |
| CN100583801C (en) | A method, system and switching device for dynamically establishing multicast virtual LAN | |
| CN114258663A (en) | Method and apparatus for adding notifications related to user equipment multicast group and leave | |
| CN100477591C (en) | Method for realizing controllable multicast service | |
| CN102355358B (en) | Method and device for realizing multicast | |
| WO2007054006A1 (en) | A base station of wideband wireless access system and a method for realizing group-broadcast service | |
| WO2007059679A1 (en) | A method for processing the abnormal multicast service and a network equipment thereof | |
| CN106411750B (en) | Data distribution method and system | |
| CN101222425A (en) | Multicast forwarding method and multicast router | |
| US20050281265A1 (en) | Multicast packet routing arrangements for group-membership handling | |
| WO2020083095A1 (en) | Reverse path check method, apparatus and device, and storage medium | |
| KR101491397B1 (en) | Efficient multicasting in a distributed system architecture | |
| US9277014B2 (en) | Handling of auxiliary NAS | |
| CN104113513B (en) | A kind of detecting host method, apparatus and system | |
| US20170373927A1 (en) | Managing multicast scaling | |
| CN100527680C (en) | Method and device for automatically identifying multicast agent device interface types | |
| CN102347906B (en) | Multi-cast method and multi-cast network system | |
| WO2014169856A1 (en) | Multicast communication method and aggregation switch | |
| CN115277542A (en) | Method and network equipment for sharing multicast stream load | |
| WO2017206369A1 (en) | Method, device and system for data transmission, physical residential gateway and access node | |
| WO2012146139A1 (en) | Message filtering method and access device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130925 |