Summary of the invention
The technical problem to be solved in the present invention provide a kind of can with the multicast packet received as required the IP address reproduction of multicast member become the equipment and the method for unicast data.
In order to address the above problem, the invention provides a kind of control transmitting multicast data equipment, be used for multicast data forwarding between multicast server and multicast member main frame, described equipment has
Multicast member IP address logging modle is used to write down the multicast member host IP address that sends Internet Group Management Protocol member relation report message to described equipment;
Module is replaced in multicast group IP address, is used for before described device forwards multicast packet multicast group IP address being replaced with the multicast member host IP address.
Further, described equipment can have the IP address mapping module, is used to set up and safeguards corresponding relation between multicast group IP address, described multicast member host IP address and the described device port.
In addition, described equipment can have list item static configuration module, be used for the corresponding relation between multicast group IP address, described multicast member host IP address and the described device port of described IP address mapping module maintenance is carried out static configuration, and list item is never aging.
Preferably, described equipment can also have switch module, is used to control the operating state of multicast member host IP address logging modle.
The present invention also provides a kind of method of controlling transmitting multicast data, is applied on the network equipment of multicast data forwarding message, comprises the following steps:
When multicast member when a certain port send a certain Internet Group Management Protocol member relation report message, the IP address of writing down this multicast member main frame;
When equipment is received the multicast message that multicast source issues, be that destination address structure unicast message is transmitted to this multicast member from above-mentioned port with the IP address of the multicast member main frame of record.
Another aspect of the present invention provides a kind of method of controlling transmitting multicast data, is applied on the network equipment that connects between multicast server and the multicast member main frame, comprises the steps:
(1) receiving internet igmpinternet member relation report message;
(2) extract described multicast member host IP address;
(3) set up mapping relations between described multicast member host IP address, multicast group IP address and the described network equipment port;
(4) the multicast group IP address of the multicast packet that will transmit replaces with corresponding multicast member host IP address;
(5) multicast packet after the described replacement of forwarding.
Wherein, the described mapping relations in the step (3) are the tables of data with multicast group IP address, device port, multicast member host IP address field;
Wherein, the described network equipment is supported the standard the Internet igmpinternet, and step (3) specifically comprises:
(31) check multicast group IP address record, then forward step (32) to if described record comprises the multicast group IP address that the message of reception contains, otherwise add described multicast group IP address;
(32) check and described multicast group IP address record corresponding ports record,, then forward step (33) to, otherwise add described multicast group IP address record corresponding ports record if described record comprises the port numbers record that the message of reception contains;
(33) check the corresponding multicast member host IP address of described port record, message contains the multicast member host IP address if described record comprises reception, then refreshing described multicast member host IP address ageing time stabs, otherwise add described multicast member host IP address record, and described multicast member host IP address ageing time stamp is set.
Wherein, described standard the Internet igmpinternet is the IGMPV2 agreement, comprises the steps: in the processing method of leave message in the described IGMPV2 agreement
A) the multicast member host IP address ageing time in the inspection multicast group address table is if ageing time is to then described multicast member host IP address being deleted;
B) check whether the multicast member host IP address tabulation under the pairing port numbers of multicast member host IP address is empty;
C) if empty,, otherwise finish this port numbers deletion;
D) check whether corresponding port number tabulation is empty under the pairing multicast group IP of the described port numbers address;
E) if empty,, otherwise finish the deletion of this multicast group IP address.
Compared with prior art, control transmitting multicast data equipment provided by the invention is because the IP address of having write down the multicast member main frame, and further corresponding mapping relations have been set up in these addresses and multicast group IP address and equipment corresponding ports, therefore can be when receiving the multicast packet that multicast source sends, according to mapping relations, multicast group IP address in these data is replaced to the IP address of multicast member main frame, thereby created condition for having realized the conversion that multicast flows to unicast data stream, equipment provided by the invention is linked into multicast source and do not support between the downstream plant of receiving multicast data of Internet Group Management Protocol, just can be good at solving the multicast data flow data mentioned in the background technology shock problem downstream plant.
Owing to adopted the means of in the multicast group address table, setting up main frame source IP address field in the multicast data forwarding method provided by the invention, the equipment end slogan that not only can add multicast group is noted, but also has also been write down in the IP address that will add member's main frame of multicast group.Like this, after access side device is received multicast data flow, according to the purpose group address in the multicast data flow, match " multicast group IP address " corresponding in the multicast group address table, find and number tabulation of this multicast group address corresponding port, again respectively according to pairing those main frame source IP addresss of port numbers, copy many parts of unicast streams, described clean culture refers to that source IP main frame sends clean culture IP message, the purpose IP address of this message is the unique host address in the IP network, that is to say to have only this purpose IP main frame could receive this message.This is called the transfer process that flows to unicast stream from multicast again, does not need the downstream plant of multicast access equipment must support multicast, thereby can adapt to various access networks.Make on these networks and can both enjoy the multicast data flow loaded service flexibly, and not necessarily require the equipment of access network all to support multicast protocol.
Secondly, be included in the step of setting up switch on its port in the control multicast data forwarding method provided by the invention, when switch opens, the main frame source IP address field in the multicast group IP address table enabled; Switch cuts out, promptly close the main frame source IP address field in the multicast group IP address table, be equivalent to the IGMP agreement this moment, existing standard agreement IGMP is not made any change, so just make access side device in the multicast of the present invention processing method can with existing IGMP protocol-compliant, solution flexibly is provided, can produced the problem of any butt joint.
Then, have only the user who has added multicast group just can receive this business owing to adopt processing ten thousand methods of access side device in the multicast of the present invention, other users are then unaffected, so both saved the bandwidth consumption of access network, improve network efficiency, also helped the flexible charging and the management of telecommunication department simultaneously.
At last, when access side device receives IGMP leave message, adopt the method for control transmitting multicast data provided by the invention, saved the process of IGMP protocol of I GMP group-specific query, thereby realized fast multicast, help realizing that for example the channel of IPTV (Internet Protocal TV, IP network TV) switches such application.
Embodiment
Further the specific embodiment of the present invention is described in detail below in conjunction with accompanying drawing.
Because the IP protocol massages is to E-Packet according to the IP address, support the equipment of multicast protocol can discern multicast group IP address, but do not support the equipment of multicast protocol then can only to E-Packet in the mode of broadcasting, for this reason, the invention provides a kind of solution is exactly to connect multicast source devices and do not support the access side device of multicast protocol equipment to improve existing, make it can write down the IP address of multicast member main frame, and can when multicast data forwarding, replace multicast ip address, thereby the multicast packet IP address of this device forwards can well be discerned by downstream plant, also just realized control transmitting multicast data.For this reason, general with reference to figure 2, the nucleus module structure of the equipment of control transmitting multicast data provided by the invention can be divided into:
IP address logging modle 201 is used for being used for the multicast member host IP address that links to each other with equipment;
IP address/IP address mapping block 202 is used for being used to setting up and safeguard the corresponding relation between multicast ip address, multicast member IP address and the device port;
Module 203 is replaced in the IP address, is used for being used for before described device forwards multicast packet multicast ip address being replaced with the IP address of multicast member main frame.
Further, control transmitting multicast data equipment provided by the invention can also have switch module, is used to control the operating state of multicast member IP address logging modle.The controlled function of switch module is similar to a switch, if described switch open, the writing function of then described main frame source IP address field enables, otherwise the writing function of described main frame source IP address field is closed.
It goes without saying that the division of above-mentioned module is the division on the logical concept, correlation module can further split, and also can merge into same module, and wherein, the realization that module is replaced in the IP address can be the method for software or hardware.If hardware approach needs to adopt improved ASIC (application-specific integrated circuit (ASIC)) forwarding chip, as long as this chip is supported the processing support to multicast data message.If adopt software approach, the multicast data message that needs the corresponding processing of increase to transmit is handled, and those skilled in the art can expect multiple implementation method easily, for example, replace IP address herein also can be encapsulation or the like again of IP address, does not repeat them here.
The method of control transmitting multicast data provided by the invention, its core concept is supporting that the multicast packet handling process is improved on the transmitting multicast data equipment, the IP address extraction and the storage of receiving multicast data member main frame will be needed, and utilize stored IP address when multicast data forwarding, the IP destination address of multicast data message to be replaced, thereby make and receive that the equipment of multicast data message also can be forwarded to correct purpose IP address smoothly when not supporting multicast, can learn thus, can conclude method provided by the invention and should have following committed step:
When described device port is received the Internet Group Management Protocol member relation report message of multicast member main frame transmission, the IP address of writing down this multicast member;
When described equipment is received the multicast message that multicast source issues, be that destination address structure unicast message is transmitted to this multicast member main frame from above-mentioned port with the IP address of the multicast member main frame of record.
Comprehensively above-mentioned, those skilled in the art can learn that every method with control transmitting multicast data of above-mentioned technical characterictic all drops within the present invention's scope required for protection.
Further, because the IP address of multicast member main frame can be from IGMP (Internet GroupManage Protocol, Internet Group Management Protocol) obtains in the member relation message of agreement, therefore in the specific embodiment of a method provided by the invention, utilize IGMP member relation report message to realize, and it is corresponding, the IGMP agreement has been carried out the expansion on the function, therefore, the retransmission method of control multicast packet provided by the invention can be called the IGMP agreement of enhancing, i.e. EIGMP (EnhancedIGMP).
The specific implementation method of this method is described below in conjunction with Fig. 3, Fig. 4, Fig. 5.
With reference to figure 3, at step S100, receiving internet igmpinternet member relation report message;
At step S200, from the message that receives, extract the multicast member host IP address; As previously mentioned, extracting the multicast member host IP address is for it is noted, so that get ready for the multicast circulation is changed to unicast stream.
At step S300, set up, safeguard the multicast member host IP address, the mapping relations between multicast group IP address and the network equipment port;
In the method provided by the present invention, in order to transmit the unicast stream data after the conversion accurately, the foundation of mapping relations and maintenance are critical step comparatively.The network equipment for the IGMP agreement of supporting standard, multicast group address and the relation that is connected the user port tabulation have been write down, as stated in the Background Art, in traditional realization, generally be to set up the group address table, this group address table contains " multicast group IP address " and reaches the tabulation of " port numbers " two-stage, and " port numbers " tabulation belongs to " multicast group IP address ", an i.e. multicast group IP address corresponding " port numbers " tabulation is as preceding two fields in the table 1.For this reason, in a kind of embodiment of the present invention, in the group address table, add row, belonged to " port numbers " field down, shown in the row of the 3rd in the table 1, the corresponding port numbers of multicast member host IP address.Table 1 has provided a concrete example.In table 1, multicast group IP address " 224.1.1.1 ", its corresponding end slogan is respectively 1,2,3, corresponding respectively again several multicast member host IP address below each port numbers.
Multicast group address | Port numbers | The multicast member host IP address |
224.1.1.1 | 1 | 220.1.1.1 |
220.1.1.2 |
2 | 220.1.2.1 |
220.1.2.2 |
3 | 220.1.3.1 |
220.1.3.2 |
Table 1
By table 1 as seen, for the processing of group address table, not only set up the mapping relations of multicast group address, port numbers and multicast member host IP address, make to transmit multicast packet after the conversion simple possible that becomes, simultaneously also make the multicast member host IP address be stored, be convenient to use.
Below will introduce and how set up and safeguard example group address table as shown in table 1, mainly be the IP address of how to add, deleting the multicast member main frame in table.Because in the present embodiment, the multicast member host IP address is to obtain from the member relation report message of IGMP agreement, therefore just relate to processing to IGMP agreement member relation report message in the IP address of adding the multicast member main frame, when the IP address of deletion multicast member main frame, be mainly concerned with processing to IGMP leave message, also be correspondingly processed to the list item of multicast member host IP address is aging simultaneously, narrate respectively below in conjunction with accompanying drawing.
With reference to figure 4, Fig. 4 shows the processing procedure of method provided by the present invention when receiving the IGMP member relation message that the multicast member main frame is sent.
This process may be summarized to be, and whether at first checks in " the multicast group IP address " of this equipment the record relevant for this multicast group IP address, if not then add this multicast group IP address address, has then and does not add, and down handles; Check then in " port numbers " tabulation of this multicast group IP address and then to add, have then and do not add, down handle whether relevant for the record of message sink mouth; Check the record that has on this port not about the multicast member host IP address that sends the report of IGMP member relation again, then do not add and be provided with the ageing time stamp of this multicast member host IP address, have the ageing time that then only need refresh this host IP address to stab and get final product.Preferably, the suggestion of ageing time stamp is set to the report of IGMP member relation and sends at interval 3 times.
With reference to figure 5, Fig. 5 show method provided by the present invention to multicast member host IP address in the group address table processing procedure when aging.
That is, the ageing time of finding any one " main frame source IP address " list item is once to deletion, and is preferred, do not send the group-specific query message, described IGMP group-specific query message refers to, when multicast router is received IGMP leave message from main frame, can send several group-specific query messages; If there is not response of host (referring to that main frame sends IGMP member relation report message), multicast router thinks that then all members of this multicast group leave, thereby deletes this multicast group.Hence one can see that adopts transmission group-specific query message, the Internet resources of meeting consumption multicast router and main frame.Therefore in order to realize fast multicast, as realizing the quick switching of IPTV (Internet Protocal TV, IP network TV) channel, suggestion does not send the group-specific query message.Check upper level " port numbers " simultaneously, whether see " main frame source IP address " tabulation that it hangs down for empty, empty then with the deletion from " port numbers " tabulation of this port numbers, otherwise finish; If deleted this port, then check its upper level " multicast group IP address ", see whether " port numbers " tabulation that it is hung down is empty, empty then with the deletion from " multicast group IP address " tabulation of this multicast group IP address.
Above-mentioned list item will cause the deletion of multicast member host IP address when aging, in addition, when receiving IGMP leave message, also relate to the deletion of multicast member host IP address, the processing that its processing procedure and list item are aging is basic identical, promptly when equipment when a port is received IGMP leave message, corresponding main frame source IP address is just deleted from " main frame source IP address " tabulation, suggestion needn't send the group-specific query message; Check upper level " port numbers " simultaneously, whether see " main frame source IP address " tabulation that it hangs down for empty, empty then with the deletion from " port numbers " tabulation of this port numbers, otherwise finish; If deleted this port, then check its upper level " multicast group IP address ", see whether " port numbers " tabulation that it is hung down is empty, empty then with the deletion from " multicast group IP address " tabulation of this multicast group IP address, finish.In addition, need to prove, for the IGMP agreement, if the IGMPV1 agreement, because do not support IGMP leave message, so do not relate to this part content.The processing here is primarily aimed at the IGMPV2 agreement.
At step S400, the multicast group IP address of the multicast packet that need are transmitted replaces with corresponding multicast member host IP address;
At step S500, transmit the multicast packet after replacing.
More than we have set forth basic thought and committed step, the formation etc. of control transmitting multicast data equipment provided by the present invention and method substantially, in the present invention, described port can be a logic port, it can be the port that physics exists, it also can be a virtual port, it can also be VLAN (virtual local area network, the VLAN) interface of current popular.For VLAN interface, then must forbid the transparent transmission of IGMP message in VLAN, promptly message takes in from the physical port of VLAN, again situation about forwarding from the another one port.
In addition, in method provided by the invention, can also come opening and closing to make main frame source IP address field in the multicast group address table by the step that increases similar switch.If main frame source IP address field is closed, promptly be illustrated in and have only two fields in the multicast group address table: multicast group address and port numbers, this just is equal to the IGMP agreement, in other words, be exactly not adopt method provided by the present invention, equipment is equal to the IGMP agreement for the processing of multicast message; If main frame source IP address field enables, promptly being illustrated in has three fields in the multicast group address table: multicast group address, port numbers and main frame source IP address, just devices illustrated adopts the processing method of described EIGMP agreement provided by the invention to handle multicast data flow.Thereby the foundation by similar switch step makes IGMP agreement and EIGMP protocol-compliant.
In addition, may support the multiple access of message for some the downlink side user network that connects the equipment of supporting the method that the invention provides, the IGMP member relation report that a main frame is sent, can be received by other main frames, want that the main frame that adds same multicast group exists if wherein have, it just can not send the IGMP member relation, makes access side device can't obtain the IP address of this main frame, and causes the imperfect of " multicast member host IP address ".This situation occurs, can adopt the equipment list item is carried out static configuration, make list item never aging, determine to increase or deletion by the keeper.
Can also revise the processing of multicast member host computer side, cancellation member relation report inhibit feature.The benefit of doing like this is the static configuration of carrying out equipment side without the keeper, convenient management; Certainly, its shortcoming is the modification that need relate to host computer side.
We will the invention provides the application of method by a concrete example explanation at last, at first, in the network shown in fig. 1, in multicast access equipment, set up multicast group address table as shown in table 1, supposing has a multicast group address " 224.1.1.1 " in this table, corresponding three port numbers " 1 " of this multicast group address " 224.1.1.1 ", " 2 " and " 3 ", the corresponding main frame source IP address of port numbers " 1 " is " 220.1.1.1 " and " 220.1.1.2 ", the corresponding main frame source IP address of port numbers " 2 " is " 220.1.2.1 " and " 220.1.2.2 ", and the corresponding main frame source IP address of port numbers " 3 " is " 220.1.3.1 " and " 220.1.3.2 ".
After if multicast access equipment receives the multicast data flow of upstream plant, group address in this multicast data flow is " 224.1.1.1 ", multicast access equipment has found list item " 224.1.1.1 " in the multicast group address field of multicast group address table, has found the IP address list of the main frame that adds this multicast group to be " 220.1.1.1 ", " 220.1.1.2 ", " 220.1.2.1 ", " 220.1.2.2 ", " 220.1.3.1 " and " 220.1.3.2 " according to this list item.Then with the IP address of these main frames as destination address, this multicast data flow is duplicated and is forwarded on these main frames.
If multicast access equipment receives an IGMP member relation report message, the group address in this message is " 224.1.1.1 ", port numbers " 1 ", and the IP address (main frame source IP address) that sends the main frame of this message is " 220.1.1.3 ".Multicast access equipment has found in the multicast group address table and the corresponding to list item of this group address " 224.1.1.1 ", this port numbers " 1 " also with " 224.1.1.1 " corresponding port number tabulation in, the IP address of main frame that sends this message is not in the corresponding multicast member host IP address tabulation of port numbers " 1 ", thereby in the multicast member host IP address tabulation that " 220.1.1.3 " insertion is corresponding with port numbers " 1 ", as shown in table 2.The ageing time stamp that " 220.1.1.3 " is set simultaneously is that 3 times IGMP member reports the transmission cycle.
Multicast group address | Port numbers | The main frame source IP address |
224.1.1.1 | 1 | 220.1.1.1 |
220.1.1.2 |
220.1.1.3 |
2 | 220.1.2.1 |
220.1.2.2 |
3 | 220.1.3.1 |
220.1.3.2 |
Table 2
Receive an IGMP leave message when multicast access equipment, the group address in this message is " 224.1.1.1 ", port numbers " 1 ", and the IP address (main frame source IP address) that sends the main frame of this message is " 220.1.1.3 ".Multicast access equipment is deleted " 220.1.1.3 " from the main frame source IP address field of multicast group address table; Find with " 220.1.1.3 " corresponding port number and be " 1 ", the main frame source IP address corresponding with port numbers " 1 " is " 220.1.1.1 " and " 220.1.1.2 ", that is to say the main frame source IP address tabulation corresponding not for empty with port numbers " 1 ", thereby end process.
Though described the present invention by embodiment, those of ordinary skills know, without departing from the spirit and substance in the present invention, just can make the present invention that many distortion and variation are arranged, and scope of the present invention is limited to the appended claims.