A kind of implementation method of precise relay IP specific source multicasting data
Technical field
The present invention relates to communication field, be specifically related to a kind of implementation method of precise relay IP specific source multicasting data.
Background technology
IGMP (Internet group Management Protocol, IGMP) be TCP/IP (Transmission Control Protocol/Internet Protocol, transmission control protocol/Internet Interconnection agreement) be responsible for the agreement of IP multicast member management in protocol suite, be used for IP main frame and and the multicast router of its direct neighbor between set up, safeguard multicast member relation.IGMP V3 is the third edition of multicast protocol, on the basis of compatible and succession IGMP V1 and IGMP V2, has increased the control to multicast source.IGMP V3 has increased filtered model for multicast source, and (filtered model comprises INCLUDE, EXCLUDE, and wherein IN CLUDE explicitly calls for the multicast information receiving from certain specific multicast source, or claims to comprise pattern; EXCLUDE explicitly calls for the multicast information of refusal from certain specific multicast source, or claims eliminating pattern), make multicast member in adding certain multicast group, can explicitly call for and receive or refuse the multicast information from certain specific multicast source.
In IGMP V1/V2, main frame, according to multicast group address, just can receive the active multicast traffic stream of this multicast group.IGMP V3 agreement can be filtered the multicast data flow of particular source, the main frame with Source-Filtered Multicast function (SFM) uses this main frame of IGMP V3 report notice upstream equipment to want the multicast group adding, and also notices the address of the multicast source of the desired reception of this main frame simultaneously.The equipment of operation IGMP V3 agreement, report to set up multicast list by processing the IGMP V3 receiving from upstream device, in multicast list, comprise INCLUDE list or EXCLUDE list, wherein the former has specified the address of the multicast source of the desired reception of this main frame, and the latter has specified that this main frame do not wish the address of multicast source receiving, then, equipment issues Hardware I P multicast forwarding list item according to these multicast lists, thereby the multicast traffic stream of particular source is correctly forwarded.
IGMP V3 report can comprise one or more groups of records.In each group record, include group record type, multicast group address and multicast source address list, wherein organize record type and be divided into six types:
1, IS_IN only represents to accept to mail to from the source list of designated multicast group the multicast packet of this multicast group;
2, IS_EX only represents to accept to mail to from the multicast source outside the source list of designated multicast group the multicast packet of this multicast group;
3, TO_IN represents that the filtered model between multicast group and multicast source list changes INCLUDE into by EXCLUDE;
4, TO_EX represents that the filtered model between multicast group and multicast source list changes EXCLUDE into by INCLUDE;
5, ALLOW is illustrated on the basis of standing state, also wishes from some multicast source receiving multicast data.If current filtered model is INCLUDE, in existing multicast source list, add these multicast sources; If current filtered model is EXCLUDE, from existing multicast source list, delete these multicast sources;
6, BLOCK is illustrated on the basis of standing state, no longer need to be from some multicast source receiving multicast data.If current filtered model is INCLUDE, from existing multicast source list, delete these multicast sources; If current filtered model is EXCLUDE, in existing multicast source list, add these multicast sources.
According to the description of IGMP V3RFC document, the multicast list that IGMP V3 agreement is set up, for all IGMP messages carry out the result of COMPREHENSIVE CALCULATING, this list item requires to meet to greatest extent the demand of upstream device to multicast source, like this, upstream device will receive that it does not wish to receive, and other upstream device requires the data flow of the multicast source receiving, and can not accomplish accurately to control the forwarding of multicast data flow.
In existing technology, the multicast list that in PON equipment, IGMP V3 protocol module is safeguarded, is that the information of IGMP message that each PON interface is received gathers, and requires multicast list can meet to greatest extent the demand of all PON interfaces to multicast source.If the filtered model when multicast group is EXCLUDE, PON interface 1 requires to block multicast source S1, and PON interface 2 requires to accept the multicast data flow of source S1, according to the handling process to message of agreement, PON interface 1 and PON interface 2 can be received the multicast source of source S1, therefore, existing technology can not be controlled accurately to multicast data flow.
In addition, realize IGMP V3 agreement, need to realize the active multicast data flow except blockage source list under EXCLUDE pattern by foundation (multicast group, 0, PON mouth) and pass through.PON equipment is in the time of forwarding multicasting flow data, and first the forwarding-table item of coupling (multicast group, multicast source, PON mouth) carries out forwarding data, and coupling is not then mated (multicast group, 0, PON mouth) forwarding-table item again.Therefore, when having (multicast group, multicast source, PON mouth 1) and (multicast group, 0, PON mouth 2) when two forwarding-table items, the multicast data flow in this source only can forward from PON mouth 1, and can not pass through from PON mouth 2, like this, just can not meet the requirement of IGMP V3 protocol function.
Summary of the invention
The present invention provides a kind of implementation method of precise relay IP specific source multicasting data according to the deficiencies in the prior art, concrete scheme is as follows:
An implementation method for precise relay IP specific source multicasting data, provides some PON interfaces, wherein, transmits with PON interface and transmits Hardware I P multicast list is safeguarded according to multicast group;
Wherein, described multicast group is transmitted comprehensive and is safeguarded the multicast group information of collecting from all PON interfaces, and described multicast group is transmitted and comprised: multicast group address, multicast group filtered model, group timer, multicast source list, source timer and PON interface list;
Described PON interface is transmitted the information for recording multicast group corresponding on each described PON interface, and described PON interface is transmitted and comprised: multicast group, PON interface filtered model, multicast source list, multicast source timer.
Above-mentioned method, wherein, transmit according to multicast group the mode that described Hardware I P multicast list is safeguarded and be:
Increase the list item of forbidding of multicast source, and/or
Delete the list item of forbidding of multicast source.
Above-mentioned method, wherein, transmit according to multicast group the step that Hardware I P multicast list is safeguarded and be:
The IGMP message receiving according to each described PON interface, and the variation of group timer and source timer, calculate group record and change, and change Hardware I P multicast list is safeguarded according to group record.
Above-mentioned method, wherein, according to multicast source list variation and multicast group filtered model/or multicast group filtered model change Hardware I P multicast list safeguarded.
Above-mentioned method, wherein, when Hardware I P multicast list maintenance according to multicast source list variation, if the multicast source of forbidding changes the multicast source of forwarding into, deletes the hardware forwarding table item of the multicast source of forbidding.
Above-mentioned method, wherein, according to multicast source, list changes when Hardware I P multicast list is safeguarded, if the multicast source forwarding changes the multicast source of forbidding into, adds the hardware forwarding table item of the multicast source forwarding.
Above-mentioned method, wherein, when Hardware I P multicast list maintenance according to multicast group filtered model, if the group filtered model that multicast group is transmitted, for comprising pattern, does not add hardware multicast forwarding-table item.
Above-mentioned method, wherein, when Hardware I P multicast list maintenance according to multicast group filtered model, if the group filtered model that multicast group is transmitted is eliminating pattern, for the null multicast source of source timer, adds hardware multicast forwarding-table item.
Above-mentioned method, wherein, when Hardware I P multicast list maintenance according to multicast group filtered model, if the group filtered model that multicast group is transmitted is eliminating pattern, the result of calculation of transmitting according to comprehensive each PON interface, originally the multicast data flow that can pass through is blocked, and add hardware multicast forwarding-table item; Otherwise, allow original multicast data flow of blocking to pass through, and delete hardware multicast forwarding-table item.
Above-mentioned method, wherein, when Hardware I P multicast list maintenance according to the variation of multicast group filtered model, if the group filtered model that multicast group is transmitted when comprising Mode change and be eliminating pattern, is left intact.
Above-mentioned method, wherein, when Hardware I P multicast list maintenance according to the variation of multicast group filtered model, if the group filtered model that multicast group is transmitted by getting rid of Mode change when comprising pattern, delete the Hardware I P multicast forwarding list item of the null multicast source of active timer.
Above-mentioned method, wherein, transmit according to PON interface the mode that Hardware I P multicast list is safeguarded and be:
Increase the forwarding-table item in specific multicast source, and/or
Delete the forwarding-table item in specific multicast source.
Above-mentioned method, wherein, transmitting according to multicast group the step that hardware multicast list item is safeguarded is: the IGMP message receiving according to each described PON interface, and the variation of group timer and source timer, safeguard that the PON interface of self transmits, and change Hardware I P multicast list is safeguarded according to group record.
Above-mentioned method, wherein, the multicast source list variation in transmitting according to PON interface respectively and multicast group filtered model/or multicast group filtered model change hardware multicast list item safeguarded.
Above-mentioned method, wherein, multicast source list in transmitting according to PON interface changes when hardware multicast list item is safeguarded, if the multicast source of forbidding changes the multicast source of forwarding into, the all PON interfaces of traversal except the PON interface of reception IGMP message, in the time that the multicast source of other certain PON interfaces does not comprise the multicast source of forbidding, add the hardware multicast forwarding-table item of this multicast source.
Above-mentioned method, wherein, multicast source list in transmitting according to PON interface changes when hardware multicast list item is safeguarded, if the multicast source forwarding changes the multicast source of forbidding into, the all PON interfaces of traversal except the PON interface of reception IGMP message, in the time that the multicast source of certain PON interface does not comprise the multicast source of forwarding, delete the hardware multicast forwarding-table item of this multicast source.
Above-mentioned method, wherein, when multicast group filtered model in transmitting according to PON interface is safeguarded hardware multicast list item, the PON interface filtered model of transmitting when PON interface, for comprising pattern, adds the hardware multicast forwarding-table item of all multicast sources in multicast source list.
Above-mentioned method, wherein, when multicast group filtered model in transmitting according to PON interface is safeguarded hardware multicast list item, the PON interface filtered model of transmitting when PON interface is eliminating pattern, add the hardware multicast forwarding-table item that source timer is greater than zero multicast source, do not add hardware multicast forwarding-table item for the null multicast source of source timer simultaneously.
Above-mentioned method, wherein, after the PON interface of reception IGMP message is processed message, and need to forward the multicast data flow of a new multicast source time, first all PON interface of traversal except the PON interface of reception IGMP message, if the filtered model of certain PON interface is eliminating pattern, and the source list of this PON interface is not while comprising this new multicast source, add the hardware multicast forwarding-table item of this PON interface, and the last hardware multicast forwarding-table item that adds the PON interface that receives IGMP message.
Above-mentioned method, wherein, when receiving after the PON interface source timer expiry of IGMP message, and need to forbid forwarding the multicast data flow in certain specific multicast source time, first travel through other all PON interfaces except the PON interface of reception IGMP message, judge and in the multicast source list of other PON interface, whether comprise this specific multicast source, and whether the source timer of multicast source is greater than zero;
If the source timer that the multicast source list of other PON interface comprises this specific multicast source and this multicast source is greater than zero, the hardware multicast forwarding-table item of direct delete interface port, otherwise, travel through all PON interfaces, in the time that the pattern of certain PON interface is eliminating pattern, delete the hardware multicast forwarding-table item of this PON interface.
Above-mentioned method, wherein, multicast group filtered model in transmitting according to PON interface changes when Hardware I P multicast list is safeguarded, if receive the filtered model of PON interface of IGMP message when comprising Mode change and be eliminating pattern, the all PON interfaces of traversal except the PON interface of reception IGMP message, and the source timer of obtaining is greater than zero and the source list of unduplicated multicast source composition, if the multicast source address in the list of source is not included in the source list of the PON interface that receives IGMP message, add hardware multicast forwarding-table item, finally, add the hardware multicast forwarding-table item that allows all multicast sources pass through.
Above-mentioned method, wherein, multicast group filtered model in transmitting according to PON interface changes when hardware multicast list item is safeguarded, when the filtered model of PON interface that receives IGMP message is by getting rid of Mode change when comprising pattern, the all PON interfaces of traversal except the PON of reception IGMP message connects, and the source timer of obtaining is greater than zero and the source list of unduplicated multicast source composition, if the multicast source address in the list of source is not included in the source list of the PON interface that receives IGMP message, delete hardware multicast forwarding-table item, finally, the hardware multicast forwarding-table item that deletion allows all multicast sources pass through.
The present invention can safeguard Hardware I P multicast forward table according to multicast forwarding list item or PON interface forwarding-table item respectively, by two-stage multicast list, can control accurately the multicast data flow of particular source, solve the longest match principle because of three layers of list item, cause EXCLUDE the infirm problem of hardware multicast list item of active forwarding, and then realized the correct forwarding of multicast packet.
Brief description of the drawings
By reading the detailed description of non-limiting example being done with reference to the following drawings, it is more obvious that the present invention and feature thereof, profile and advantage will become.In whole accompanying drawings, identical mark is indicated identical part.Deliberately proportionally do not draw accompanying drawing, focus on illustrating purport of the present invention.
Fig. 1 is that hardware group is transmitted included information schematic diagram;
Fig. 2 is that PON interface is transmitted included information schematic diagram;
Fig. 3 is that multicast group is transmitted included information schematic diagram;
Fig. 4 is that the present invention transmits the workflow diagram that upgrades hardware multicast forwarding-table item according to multicast group;
Fig. 5 is that the present invention transmits the operational flowchart to hardware multicast forwarding-table item according to PON interface.
Embodiment
In the following description, a large amount of concrete details have been provided to more thorough understanding of the invention is provided.But, it is obvious to the skilled person that the present invention can be implemented without one or more these details.In other example, for fear of obscuring with the present invention, be not described for technical characterictics more well known in the art.
In order thoroughly to understand the present invention, will detailed step and detailed interface be proposed in following description, to explain technical scheme of the present invention.Preferred embodiment of the present invention is described in detail as follows, but except these are described in detail, the present invention can also have other execution modes.
The invention provides a kind of implementation method of precise relay IP specific source multicasting data, transmit with PON interface and transmit Hardware I P multicast list is safeguarded according to multicast group.In the present invention, hardware multicast forwarding-table item is divided into three types: multicast group is blocked the list item (multicast group address of particular source, multicast source address, 0), multicast group allows all multicast sources by the list item (multicast group address of particular port, 0, PON) and multicast group allow specific multicast source by the list item (multicast group address, multicast source address, PON) of particular port.
Therefore, mainly comprise two kinds of situations for the operation of hardware multicast forwarding-table item: transmit and safeguard that multicast group forbids the list item of multicast source according to multicast group; Transmit and safeguard that multicast group forwards the list item in all multicast sources or specific multicast source according to PON interface.Because multicast forward table is the set that each PON interface is transmitted, in the time that the multicast group in this list item does not need to receive certain multicast source, represent that all PON interfaces do not need to forward the multicast data flow in this source, therefore, issue the list item that multicast group is blocked this multicast source herein; PON interface is transmitted, and has reflected the multicast group state of this interface, transmits according to this hardware multicast forwarding-table item that issues each PON interface, mainly contains two kinds: multicast group the active particular source of all passing through this port and multicast group by this port.
Transmit according to multicast group, hardware multicast forwarding-table item mainly contains two kinds of operations: increase multicast source forbid list item and delete multicast source forbid list item (multicast group address, multicast source address, 0).Transmit according to PON interface, hardware multicast forwarding-table item mainly contains four kinds of operations: increase the forwarding-table item in specific multicast source and delete the forwarding-table item (multicast group address in specific multicast source, multicast source address, PON mouth), and increase the forwarding-table item of all multicast sources and delete the forwarding-table item (multicast group address of all multicast sources, 0, PON mouth).
Shown in Fig. 1, hardware group is transmitted and is comprised multicast group address, multicast source address and PON interface.Multicast group is transmitted comprehensive and is safeguarded the multicast group information of collecting from all PON interfaces, and shown in Fig. 2, multicast group is transmitted and comprised: multicast group address, multicast group filtered model, group timer, multicast source list, source timer and PON interface list.PON interface is transmitted the information for recording multicast group corresponding on each PON interface, and shown in Fig. 3, PON interface is transmitted and comprised: multicast group, PON interface filtered model, multicast source list, multicast source timer.
In an embodiment of the present invention, preferred, transmit according to multicast group the mode that Hardware I P multicast list is safeguarded and be: increase the list item of forbidding of multicast source, and/or delete the list item of forbidding of multicast source.
In an embodiment of the present invention, preferably, transmitting according to multicast group the step that Hardware I P multicast list is safeguarded is: the IGMP message receiving according to each PON interface, and the variation of group timer and source timer, calculate group record and change, and change hardware multicast list item is safeguarded according to group record.Further preferred, according to multicast source list variation and multicast group filtered model/or multicast group filtered model change Hardware I P multicast list safeguarded, can be with reference to shown in Fig. 4.
Concrete, when Hardware I P multicast list maintenance according to multicast source list variation, if the multicast source of forbidding changes the multicast source of forwarding into, delete the hardware forwarding table item (group address, source address, 0) of this multicast source of forbidding.
Concrete, when Hardware I P multicast list maintenance according to multicast source list variation, if the multicast source forwarding changes the multicast source of forbidding into, add the hardware forwarding table item (group address, source address, 0) of the multicast source of this forwarding.
Concrete, when Hardware I P multicast list maintenance according to multicast group filtered model, if the group filtered model that multicast group is transmitted, for comprising pattern, does not add hardware multicast forwarding-table item.
Concrete, when Hardware I P multicast list maintenance according to multicast group filtered model, if the group filtered model that multicast group is transmitted is eliminating pattern, for the null multicast source of source timer, add hardware multicast forwarding-table item (multicast group address, multicast source address, 0).
Concrete, when Hardware I P multicast list maintenance according to multicast group filtered model, if the group filtered model that multicast group is transmitted is eliminating pattern, the result of calculation of transmitting according to comprehensive each PON interface, originally the multicast data flow that can pass through is blocked, and add hardware multicast forwarding-table item (multicast group address, multicast source address, 0); Otherwise, allow original multicast data flow of blocking to pass through, and delete hardware multicast forwarding-table item (multicast group address, multicast source address, 0).
Concrete, when Hardware I P multicast list maintenance according to the variation of multicast group filtered model, if the group filtered model that multicast group is transmitted when comprising Mode change and be eliminating pattern, is left intact.
Concrete, when Hardware I P multicast list maintenance according to the variation of multicast group filtered model, if the group filtered model that multicast group is transmitted is by getting rid of Mode change when comprising pattern, delete the Hardware I P multicast forwarding list item (multicast group address of the null multicast source of active timer, multicast source address, 0).
In an embodiment of the present invention, preferred, transmit according to PON interface the mode that Hardware I P multicast list is safeguarded and be: increase the forwarding-table item in specific multicast source, and/or delete the forwarding-table item in specific multicast source.
In an embodiment of the present invention, preferably, transmitting according to PON interface the step that hardware multicast list item is safeguarded is: the IGMP message receiving according to each PON interface, and the variation of group timer and source timer, safeguard that the PON interface of self transmits, and change Hardware I P multicast list is safeguarded according to group record.Further preferred, the multicast source list variation in transmitting according to PON interface respectively and multicast group filtered model/or multicast group filtered model change hardware multicast list item safeguarded, can be with reference to shown in Fig. 5.
Concrete, multicast source list in transmitting according to PON interface changes when hardware multicast list item is safeguarded, if the multicast source of forbidding changes the multicast source of forwarding into, the all PON interfaces of traversal except the PON interface of reception IGMP message, in the time that the multicast source of other certain PONi interfaces does not comprise the multicast source of forbidding, add the hardware multicast forwarding-table item (group address of this multicast source, source address, PONi), finally add the hardware multicast forwarding-table item (group address of this multicast source, source address, PON).
Concrete, multicast source list in transmitting according to PON interface changes when hardware multicast list item is safeguarded, if the multicast source forwarding changes the multicast source of forbidding into, the all PON interfaces of traversal except the PON interface of reception IGMP message, in the time that the multicast source of certain PONi interface does not comprise the multicast source of forwarding, delete the hardware multicast forwarding-table item (group address of this multicast source, source address, PONi mouth), finally delete the hardware multicast forwarding-table item (group address of this multicast source, source address, PON mouth).
Concrete, when multicast group filtered model in transmitting according to PON interface is safeguarded hardware multicast list item, the PON interface filtered model of transmitting when PON interface is for comprising pattern, add the hardware multicast forwarding-table item (multicast group address of all multicast sources in multicast source list, multicast source address, port).
Concrete, when multicast group filtered model in transmitting according to PON interface is safeguarded hardware multicast list item, the PON interface filtered model of transmitting when PON interface is eliminating pattern, add the hardware multicast forwarding-table item (multicast group address that source timer is greater than zero multicast source, multicast source address, PON mouth), do not add hardware multicast forwarding-table item for the null multicast source of source timer simultaneously.
Concrete, after the PON interface of reception IGMP message is processed message, and need to forward the multicast data flow of a new multicast source time, first all PON interface of traversal except the PON interface of reception IGMP message, if certain PON[j] filtered model of interface is eliminating pattern, and when the source list of this PON interface does not comprise this new multicast source, add this PON[j] the hardware multicast forwarding-table item (multicast group address of interface, multicast source address, PON[j] mouthful), and the last hardware multicast forwarding-table item (multicast group address that adds the PON interface that receives IGMP message, multicast source address, PON mouth).
Concrete, when receiving after the PON interface source timer expiry of IGMP message, and need to forbid forwarding the multicast data flow in certain specific multicast source time, first travel through other all PON interfaces except the PON interface of reception IGMP message, judge and in the multicast source list of other PON interface, whether comprise this specific multicast source, and whether the source timer of multicast source is greater than zero; If the source timer that the multicast source list of other PON interface comprises this specific multicast source and this multicast source is greater than zero, the hardware multicast forwarding-table item (multicast group address of direct delete interface port, multicast source address, PON), otherwise, travel through all PON interfaces, as certain PON[j] pattern of interface is while being eliminating pattern, delete this PON[j] the hardware multicast forwarding-table item of interface (multicast group address, multicast source address, PON[j]).
Concrete, multicast group filtered model in transmitting according to PON interface changes when Hardware I P multicast list is safeguarded, if receive the filtered model of PON interface of IGMP message when comprising Mode change and be eliminating pattern, the all PON interfaces of traversal except the PON interface of reception IGMP message, and the source timer of obtaining is greater than zero and unduplicated multicast source composition source list LISTA, if the multicast source address S[i in source list LISTA] be not included in the source list of the PON interface that receives IGMP message, add hardware multicast forwarding-table item (multicast group address, S[i], PON), finally, add the hardware multicast forwarding-table item (multicast group address that allows all multicast sources pass through, 0, PON).
Concrete, multicast group filtered model in transmitting according to PON interface changes when hardware multicast list item is safeguarded, when the filtered model of PON interface that receives IGMP message is by getting rid of Mode change when comprising pattern, the all PON interfaces of traversal except the PON of reception IGMP message connects, and the source timer of obtaining is greater than zero and the source list LISTA of unduplicated multicast source composition, if the multicast source address S[i in source list LISTA] be not included in the source list of the PON interface that receives IGMP message, delete hardware multicast forwarding-table item (multicast group address, S[i], PON), finally, hardware multicast forwarding-table item (the multicast group address that deletion allows all multicast sources pass through, 0, PON).
In sum, because the present invention has adopted as above technical scheme, by two-stage multicast list, can control accurately the multicast data flow of particular source, solve the longest match principle because of three layers of list item, cause EXCLUDE the infirm problem of hardware multicast list item of active forwarding, and then realized the correct forwarding of multicast packet.
Above preferred embodiment of the present invention is described.It will be appreciated that, the present invention is not limited to above-mentioned specific implementations, and the equipment of wherein not describing in detail to the greatest extent and interface are construed as to be implemented with the common mode in this area; Any those of ordinary skill in the art, do not departing from technical solution of the present invention scope situation, all can utilize method and the technology contents of above-mentioned announcement to make many possible variations and modification to technical solution of the present invention, or being revised as the equivalent embodiment of equivalent variations, this does not affect flesh and blood of the present invention.Therefore, every content that does not depart from technical solution of the present invention,, all still belongs in the scope of technical solution of the present invention protection any simple modification made for any of the above embodiments, equivalent variations and modification according to technical spirit of the present invention.