CN101232510A - Method and system for realizing multicasting of multi-network port devices - Google Patents
Method and system for realizing multicasting of multi-network port devices Download PDFInfo
- Publication number
- CN101232510A CN101232510A CNA2008101011525A CN200810101152A CN101232510A CN 101232510 A CN101232510 A CN 101232510A CN A2008101011525 A CNA2008101011525 A CN A2008101011525A CN 200810101152 A CN200810101152 A CN 200810101152A CN 101232510 A CN101232510 A CN 101232510A
- Authority
- CN
- China
- Prior art keywords
- port
- multicast
- message
- address
- network
- 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.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明涉及一种多网口设备组播的实现方法,包括:步骤1,在多网口设备上将一个或多个组播地址映射到一个端口号,用于避免组播目的机接收相同的报文;步骤2,当所述端口号对应的端口状态发生变化时,将所述一个或多个组播地址更新到相应的端口号,用于避免因所述端口号对应的端口状态发生变化导致无法发送工GMP报文。本发明采用固定的算法,实现了组播地址和有效物理端口的对应,使得某一个组播地址的IGMP Report报文始终从一个物理端口发送出去。
The present invention relates to a multicast implementation method of a multi-network port device, comprising: step 1, mapping one or more multicast addresses to a port number on the multi-network port device, so as to prevent the multicast destination machine from receiving the same message; step 2, when the port state corresponding to the port number changes, update the one or more multicast addresses to the corresponding port number, so as to avoid the port state corresponding to the port number from changing As a result, the GMP message cannot be sent. The invention adopts a fixed algorithm to realize the correspondence between the multicast address and the effective physical port, so that the IGMP Report message of a certain multicast address is always sent out from one physical port.
Description
技术领域technical field
本发明涉及组播,尤其涉及一种多网口设备组播的实现方法及系统。The present invention relates to multicast, in particular to a multicast implementation method and system for multi-network port devices.
背景技术Background technique
对于通用的服务器或客户端,如果其存在两个或两个以上的对外端口,并且希望这些端口都同时加入同一个组播组时,组网图如图1所示。此时在L2交换机(Switch)上开启IGMP Snooping功能,就会导致交换机上两个端口都会监听到同一个组播组的互联网组管理协议(IGMP)报告(Report)报文,而此时从组播源发出的组播业务报文就会有相同的两份被发送到同一个组播目的机。For a general server or client, if there are two or more external ports and it is desired that these ports all join the same multicast group at the same time, the networking diagram is shown in Figure 1. At this time, if the IGMP Snooping function is enabled on the L2 switch (Switch), both ports on the switch will listen to the Internet Group Management Protocol (IGMP) report (Report) message of the same multicast group. The same two copies of the multicast service message sent by the broadcast source will be sent to the same multicast destination machine.
针对这样的组网,通常的做法是需要借助第三方协议,将同一设备上两个端口进行聚合,从而来避免组播目的机收到重复报文。For this kind of networking, the usual practice is to use a third-party protocol to aggregate the two ports on the same device, so as to prevent the multicast destination from receiving duplicate messages.
这种处理上的缺点是需要借助其他协议(如端口聚合等)来实现,但并不是所有设备都是支持类似端口聚合这样的协议的,当无法进行端口聚合时,组播目的机就会收到双份(或多份)的报文,只能通过上层协议来进行取舍,严重影响处理性能,无法满足特定条件下的需求。另外,对于实时性要求比较高的场合来说,端口聚合这样的协议也无法满足特定的要求。The disadvantage of this processing is that other protocols (such as port aggregation, etc.) need to be used to realize it, but not all devices support such protocols as port aggregation. When port aggregation cannot be performed, the multicast destination machine will receive For double (or multiple) messages, the choice can only be made through the upper-layer protocol, which seriously affects the processing performance and cannot meet the requirements under specific conditions. In addition, for occasions with relatively high real-time requirements, protocols such as port aggregation cannot meet specific requirements.
尤其对于通讯设备而言,如图2所示,通常是由接口线卡、交换线卡、协议处理线卡及连接这些线卡的背板组成。交换线卡是二层以太网的交换中心,功能相当于一个L2 Switch;接口线卡主要负责接收外部用户的请求,然后转给网元内的协议处理线卡进行处理;协议处理线卡有多种,分别处理不同类型的业务报文,如语音解码、实时数据传输等等。接口线卡响应外部用户请求的部分,称之为外部用户面,由接口线卡转给网元内的协议处理线卡处理的部分,称为内部用户面。Especially for communication equipment, as shown in FIG. 2 , it usually consists of an interface line card, a switching line card, a protocol processing line card, and a backplane connecting these line cards. The switching line card is the switching center of the
在图3所示的常见组网中,对于外部用户面,由于其连接的外部网络均为标准以太网,所以建议采用端口聚合协议进行互联;对于内部用户面,由于不支持端口聚合协议,所以如果实现组播方案就需要对重复的报文进行适当处理,影响性能。In the common networking shown in Figure 3, for the external user plane, since the external network connected to it is standard Ethernet, it is recommended to use the port aggregation protocol for interconnection; for the internal user plane, since the port aggregation protocol is not supported, the If the multicast solution is implemented, repeated packets need to be properly processed, which affects performance.
发明内容Contents of the invention
为了解决上述的技术问题,提供了一种多网口设备组播的实现方法及系统,其目的在于,在不需要进行端口聚合的情况下,能够完成很好的负荷分担,当端口状态发生变化时,能够很快的进行切换,极小的影响业务。In order to solve the above-mentioned technical problems, a method and system for implementing multicasting of multi-network port devices are provided. The purpose is to achieve good load sharing without port aggregation. , the switchover can be performed very quickly, with minimal impact on services.
本发明提供了一种多网口设备组播的实现方法,包括:The invention provides a method for realizing multicasting of multi-network port devices, including:
步骤1,在多网口设备上将一个或多个组播地址映射到一个端口号,用于避免组播目的机接收相同的报文;Step 1, map one or more multicast addresses to a port number on the multi-network port device to prevent the multicast destination from receiving the same message;
步骤2,当所述端口号对应的端口状态发生变化时,将所述一个或多个组播地址更新到相应的端口号,用于避免因所述端口号对应的端口状态发生变化导致无法发送IGMP报文。
步骤1中,还设置组播地址与端口号的映射关系表。In step 1, a mapping relationship table between multicast addresses and port numbers is also set.
步骤1中,组播地址为协议处理线卡加入的组播IP地址,所述映射为依据组播IP地址及端口状态进行计算端口号。In step 1, the multicast address is the multicast IP address joined by the protocol processing line card, and the mapping is to calculate the port number based on the multicast IP address and port status.
步骤1中,端口号为组播地址除以协议处理线卡最大端口数的余数对应的可用端口的端口号。In step 1, the port number is the port number of the available port corresponding to the remainder of dividing the multicast address by the maximum number of ports of the protocol processing line card.
步骤1还包括:Step 1 also includes:
步骤51,接收到等待加入组播组的消息时,将该消息加入组播组,并检查该组播组是否存在,如果存在,则执行步骤53,否则执行步骤52;Step 51, when receiving the message waiting to join the multicast group, add the message to the multicast group, and check whether the multicast group exists, if it exists, then execute step 53, otherwise execute step 52;
步骤52,根据组播地址计算端口号,并将该组播地址与端口号的映射关系加入组播地址与端口号的映射关系表,执行步骤53;Step 52, calculate the port number according to the multicast address, and add the mapping relationship between the multicast address and the port number to the mapping relationship table between the multicast address and the port number, and perform step 53;
步骤53,设置IGMP报文类型为报告,加入到报文发送队列;Step 53, setting the IGMP message type as a report, adding to the message sending queue;
步骤54,检查发送队列,准备发送IGMP报文。Step 54, check the sending queue, and prepare to send the IGMP message.
步骤1还包括:Step 1 also includes:
步骤61,接收到等待离开组播组的消息时,并检查该组播组是否存在,如果存在,则执行步骤62,否则不进行任何处理;Step 61, when receiving the message waiting to leave the multicast group, and check whether the multicast group exists, if it exists, then execute step 62, otherwise do not carry out any processing;
步骤62,根据组播组地址删除组播地址与端口号的映射关系;Step 62, delete the mapping relationship between the multicast address and the port number according to the multicast group address;
步骤63,设置IGMP报文类型为离开,加入到报文发送队列;Step 63, setting the IGMP message type as leaving, adding to the message sending queue;
步骤64,检查发送队列,准备发送IGMP报文。Step 64, check the sending queue, and prepare to send the IGMP message.
端口状态包括端口可用和端口不可用。Port status includes port available and port unavailable.
步骤2中,当端口状态为端口不可用时,在其余可用的端口中选择一个端口的端口号作为相应的端口号。In
步骤2中,其余可用的端口通过轮询的方式排列。In
本发明提供了多网口设备组播的实现系统,包括:The invention provides a system for realizing multicasting of multi-network port devices, including:
组播地址与端口号映射模块,用于在多网口设备上将一个或多个组播地址映射到一个端口号,以避免组播目的机接收相同的报文;The multicast address and port number mapping module is used to map one or more multicast addresses to a port number on the multi-network port device, so as to prevent the multicast destination from receiving the same message;
组播地址与端口号映射更新模块,用于当所述端口号对应的端口状态发生变化时,将所述一个或多个组播地址更新到相应的端口号,以避免因所述端口号对应的端口状态发生变化导致无法发送IGMP报文。The multicast address and port number mapping update module is used to update the one or more multicast addresses to the corresponding port numbers when the state of the port corresponding to the port number changes, so as to avoid The status of the port changes, so IGMP packets cannot be sent.
本发明的多网口设备组播实现方法采用固定的算法,实现了组播地址和有效物理端口的对应,使得某一个组播地址的IGMP Report报文始终从一个物理端口发送出去;当存在多个组播地址时,又能够实现很好的负荷分担;同时端口状态的变化对业务影响极小。The multicast implementation method of multi-network port equipment of the present invention adopts a fixed algorithm to realize the correspondence between multicast addresses and effective physical ports, so that the IGMP Report message of a certain multicast address is always sent out from one physical port; when there are multiple When using multiple multicast addresses, it can achieve good load sharing; at the same time, changes in port status have minimal impact on services.
附图说明Description of drawings
图1是现有技术中常见组网示意图;FIG. 1 is a schematic diagram of common networking in the prior art;
图2是现有技术中通讯处理设备结构示意图;Fig. 2 is a schematic structural diagram of communication processing equipment in the prior art;
图3是现有技术中通讯处理设备组网示意图;Fig. 3 is a schematic diagram of networking of communication processing equipment in the prior art;
图4是本发明的多网口设备组播实现方法流程示意图;Fig. 4 is a schematic flow diagram of a multicast implementation method of multi-network port devices of the present invention;
图5是本发明的多网口设备组播实现系统结构图。Fig. 5 is a structural diagram of the multicast implementation system of multi-network port devices in the present invention.
具体实施方式Detailed ways
本发明中,在多网口设备上建立、维护一张组播组地址和端口号的对应关系表,可以是一个组播组地址对应一个端口号或者多个组播组地址对应一个端口号;其中,组播组地址就是一系列该协议处理线卡加入的组播IP地址;而端口号是根据不同的组播IP地址以及结合端口目前的状态按照一定的方法计算出来的端口号,这些端口号直接对应到协议处理线卡的物理端口号,在组播组往外发送IGMP Report报文时选择使用。In the present invention, a multicast group address and port number correspondence table is established and maintained on the multi-network port device, which may be that a multicast group address corresponds to a port number or multiple multicast group addresses correspond to a port number; wherein, The multicast group address is a series of multicast IP addresses that the protocol processes line cards to join; and the port number is calculated according to a certain method based on different multicast IP addresses and the current state of the port. These port numbers directly Corresponding to the physical port number of the protocol processing line card, it is selected to be used when the multicast group sends out IGMP Report messages.
上述多网口设备组播实现方法中,当所述协议处理线卡的端口状态发生变化时,会对表中对应与该变化的端口的条目进行适当的更新,结合组播地址,计算并换成一个可用的端口号。In the multicast implementation method of the above-mentioned multi-network port device, when the port status of the protocol processing line card changes, the entry corresponding to the changed port in the table will be appropriately updated, and the multicast address is calculated and replaced. into an available port number.
本发明的多网口设备组播实现方法流程图如图4,具体包括下面几个步骤:The multi-network port device multicast implementation method flow chart of the present invention is shown in Figure 4, specifically including the following steps:
步骤401,初始化组播地址和端口映射表,如内存的分配和初始化等;
步骤402,进入消息处理函数,等待如加入组播组,离开组播组的消息。当收到加入组播组消息,则转入步骤403;当收到离开组播组消息,则转入步骤406;
步骤403,根据组播地址查表,看表项中是否已经存在同样的组播组了;如果存在,则转入步骤405;如果不存在,则转入步骤404;
步骤404,根据组播地址计算端口号;然后连同组播地址写入组播地址/端口映射表中;
上述步骤中计算端口号的方法是:The method of calculating the port number in the above steps is:
端口号=组播地址/协议处理线卡最大端口数的余数;Port number = the remainder of the multicast address/protocol processing line card maximum port number;
步骤405,设置IGMP报文类型为Report,加入到报文发送队列中;
步骤406,同功能上面步骤403;如果存在,则转步骤407;如果不存在,则不处理;
步骤407,根据组播地址查找组播地址/端口映射关系表,将查到的条目删除掉;
步骤408,设置IGMP报文类型为离开(Leave),加入到报文发送队列中;
步骤409,检查发送队列,如果有报文,则逐个的取出组播地址和出端口,准备进行发送;
步骤410,对于需要发送IGMP报文的组播地址,看端口映射表中对应的端口是否有效;如果有效,则转步骤412;如果无效,则转步骤411;
步骤411,选择一个有效的物理端口号替换表项中无效的端口号;
上述步骤中选择有效端口号的方法是:The method for selecting a valid port number in the above steps is:
将有效端口号按照轮询的方式映射到端口数组中,此数组的最大条目对应协议处理线卡的最大端口数;Map the effective port number to the port array in a polling manner, and the maximum entry of this array corresponds to the maximum number of ports of the protocol processing line card;
假设,协议处理线卡目前最大端口数为4个,则可以定义一个端口数组为aucPortIndex[4];Assuming that the current maximum port number of the protocol processing line card is 4, you can define a port array as aucPortIndex[4];
如果此时可用的端口数是4个,端口编号分别为1、2、3、4;则对应到数组中的值为{1,2,3,4};If the number of ports available at this time is 4, and the port numbers are 1, 2, 3, 4 respectively; then the corresponding values in the array are {1, 2, 3, 4};
如果此时可用的端口数是1个(假如可用的端口号为2);则对应到数组中的值为{2,2,2,2};If the number of ports available at this time is 1 (if the available port number is 2); then the value corresponding to the array is {2, 2, 2, 2};
如果此时可用的端口数是2个(假如可用的端口号为1,4);则对应到数组中的值为{1,4,1,4};If the number of ports available at this time is 2 (if the available port numbers are 1, 4); then the values corresponding to the array are {1, 4, 1, 4};
如果此时可用的端口数是3个(假如可用的端口号为1,2,3);则对应到数组中的值为{1,2,3,1};If the number of ports available at this time is 3 (if the available port numbers are 1, 2, 3); then the values corresponding to the array are {1, 2, 3, 1};
可用端口映射的原则是轮询,但尽量要求均匀分配到数组中。因此有效端口号的选择方法如下:The principle of available port mapping is round robin, but it is required to be evenly distributed in the array as far as possible. Therefore, the selection method of the effective port number is as follows:
有效端口号=aucPortIndex[组播地址MOD协议处理线卡最大端口数];Effective port number = aucPortIndex[maximum number of ports of multicast address MOD protocol processing line card];
步骤412,从有效端口发送IGMP报文。
当端口物理状态由UP变化为DOWN时,检查一下组播地址/端口映射关系表中有没有端口号对应这个端口的,如果有,则转到上面步骤405,向外面发送一下Report报文,对改端口进行更新。When the physical status of the port changes from UP to DOWN, check whether there is a port number corresponding to this port in the multicast address/port mapping relationship table, if so, go to the
通过上面的一些步骤,可以保证多网口设备和L2 Switch对接时,如图3那样的组网,不会导致协议处理线卡收到重复的组播报文。而且当某一个或几个端口状态发生变化时,能够很快的完成端口切换,减少业务的丢包。Through the above steps, it can be ensured that when the multi-network port device is connected to the L2 Switch, the network shown in Figure 3 will not cause the protocol processing line card to receive repeated multicast packets. Moreover, when the status of one or several ports changes, port switching can be completed quickly, reducing service packet loss.
为了实现本发明提供的多网口设备组播的实现方法,本发明提供了一种多网口设备组播的实现系统500,如图5所示,包括:In order to realize the implementation method of multicasting of multi-network port devices provided by the present invention, the present invention provides a system 500 for realizing multicasting of multi-network port devices, as shown in FIG. 5 , including:
组播地址与端口号映射模块501,用于在多网口设备上将一个或多个组播地址映射到一个端口号,以避免组播目的机接收相同的报文;The multicast address and port number mapping module 501 is used for mapping one or more multicast addresses to a port number on the multi-network port device, so as to prevent the multicast destination machine from receiving the same message;
组播地址与端口号映射更新模块502,用于当所述端口号对应的端口状态发生变化时,将所述一个或多个组播地址更新到相应的端口号,以避免因所述端口号对应的端口状态发生变化导致无法发送IGMP报文。The multicast address and port number mapping update module 502 is used to update the one or more multicast addresses to the corresponding port numbers when the state of the port corresponding to the port number changes, so as to avoid The status of the corresponding port changes, so IGMP packets cannot be sent.
本领域的技术人员在不脱离权利要求书确定的本发明的精神和范围的条件下,还可以对以上内容进行各种各样的修改。因此本发明的范围并不仅限于以上的说明,而是由权利要求书的范围来确定的。Various modifications can be made to the above contents by those skilled in the art without departing from the spirit and scope of the present invention defined by the claims. Therefore, the scope of the present invention is not limited to the above description, but is determined by the scope of the claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNA2008101011525A CN101232510A (en) | 2008-02-28 | 2008-02-28 | Method and system for realizing multicasting of multi-network port devices |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNA2008101011525A CN101232510A (en) | 2008-02-28 | 2008-02-28 | Method and system for realizing multicasting of multi-network port devices |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN101232510A true CN101232510A (en) | 2008-07-30 |
Family
ID=39898683
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNA2008101011525A Pending CN101232510A (en) | 2008-02-28 | 2008-02-28 | Method and system for realizing multicasting of multi-network port devices |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101232510A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103647720A (en) * | 2013-12-26 | 2014-03-19 | 迈普通信技术股份有限公司 | Method and device for processing internet group management protocol (IGMP) Snooping |
| CN104348737A (en) * | 2013-08-02 | 2015-02-11 | 华为技术有限公司 | Multicast message transmission method and switches |
| CN104883630A (en) * | 2015-05-08 | 2015-09-02 | 烽火通信科技股份有限公司 | Adaptive system and method of multicast cascade connection in PON system |
| CN105978780A (en) * | 2016-05-10 | 2016-09-28 | 浙江宇视科技有限公司 | Port switching method and device |
-
2008
- 2008-02-28 CN CNA2008101011525A patent/CN101232510A/en active Pending
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104348737A (en) * | 2013-08-02 | 2015-02-11 | 华为技术有限公司 | Multicast message transmission method and switches |
| CN104348737B (en) * | 2013-08-02 | 2018-01-23 | 华为技术有限公司 | The transmission method and interchanger of a kind of multicast message |
| CN103647720A (en) * | 2013-12-26 | 2014-03-19 | 迈普通信技术股份有限公司 | Method and device for processing internet group management protocol (IGMP) Snooping |
| CN103647720B (en) * | 2013-12-26 | 2017-04-26 | 迈普通信技术股份有限公司 | Method and device for processing internet group management protocol (IGMP) Snooping |
| CN104883630A (en) * | 2015-05-08 | 2015-09-02 | 烽火通信科技股份有限公司 | Adaptive system and method of multicast cascade connection in PON system |
| CN104883630B (en) * | 2015-05-08 | 2018-11-06 | 烽火通信科技股份有限公司 | The cascade adaption system of multicast and method in PON system |
| CN105978780A (en) * | 2016-05-10 | 2016-09-28 | 浙江宇视科技有限公司 | Port switching method and device |
| CN105978780B (en) * | 2016-05-10 | 2020-01-14 | 浙江宇视科技有限公司 | Port switching method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102160328B (en) | Central controller for coordinating multicast message transmissions in distributed virtual network switch environment | |
| CN104054302B (en) | The network equipment, address resolution method, network and cache table minishing method | |
| CN104426815B (en) | Method and system, OF controller and the OF interchanger of flow table issuance in a kind of SDN | |
| CN107948076B (en) | Method and device for forwarding message | |
| CN101573913A (en) | Method and apparatus for improved multicast routing | |
| CN101150502A (en) | A kind of NAT-PT equipment and its load sharing method | |
| CN101286990A (en) | Layer 2 multicast forwarding method and device | |
| US11394635B2 (en) | Aggregated bit index explicit replication networking system | |
| WO2022253087A1 (en) | Data transmission method, node, network manager, and system | |
| CN101075201A (en) | Method for realizing unified universal message bus between different assembly process | |
| CN105556916A (en) | Network flow information statistics method and apparatus | |
| WO2021082812A1 (en) | Message sending method and first network device | |
| CN101052006B (en) | Method for sending message and interface board and router for realizing the method | |
| WO2016184283A1 (en) | Data stream management method and system for virtual machine | |
| CN110391919A (en) | Flux of multicast retransmission method, device, electronic equipment | |
| CN101286866A (en) | Method and system for implementing multicast based on high-speed peripheral component extended interface switching network | |
| US20050195817A1 (en) | Switching device and multicast packet processing method therefor | |
| CN101232510A (en) | Method and system for realizing multicasting of multi-network port devices | |
| CN104113513B (en) | A kind of detecting host method, apparatus and system | |
| CN100456684C (en) | Method and network device for realizing multicast service | |
| CN103004157B (en) | Interface register method and device for network device to join cluster system | |
| CN103379031B (en) | Equipment connection method, system and apparatus | |
| WO2021147357A1 (en) | Method, device, and system for distributing routing information | |
| CN102843253A (en) | Multi-sub-rack communication device and method and device of communication of multi-sub-rack communication device | |
| CN101009692A (en) | Hardware address parsing method and communication processing device, and message processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C12 | Rejection of a patent application after its publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20080730 |