Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment one
The flow chart of the querying method of the multicast forwarding path that Fig. 3 provides for the embodiment of the invention one, the method for present embodiment specifically comprises the steps:
Step 301, intermediate node receive the query message from management node;
Step 302, intermediate node form response message, the management address that is resolved to from query message management address field is set to the purpose IP address of response message, and the interface IP address that this machine is received query message is arranged in the multicast source address field of response message;
Step 303, intermediate node are provided with jumping figure value in the response message hop count field according to query message;
This jumping figure value is used to indicate the jumping figure relation between this intermediate node and the inquiry starting point, if the inquiry starting point is a management node, then the jumping figure value should be added one, if the inquiry starting point is a Designated Router, then can keep the jumping figure value constant.
Step 304, intermediate node send response message to management node, so that management node is according to response message record multicast forwarding path information.
The technical scheme of present embodiment is based on that the path trace technology realizes, promptly the multicast forwarding path hop-by-hop of forming along intermediate node sends query message and inquires about multicast forwarding path.In the present embodiment, further adopt each to jump intermediate node all produced and returned to management node response message after receiving query message technological means, make management node can write down in the multicast forwarding path and jump multicast forwarding path information between intermediate node, improved the reliability of path query to each from management node.Even the problem of certain intermediate node fault occurs, also can in time find, and the intermediate node of accurate fault location.
In the present embodiment, so-called management node, promptly the node at network manager place by this management node input path query order, triggers the multicast forwarding path inquiry.Typical path query order comprises node address to be checked at least, and node address to be checked can be multicast source address usually.When management node gets access to the path query order, and recognize node address to be checked when being multicast source address, as shown in Figure 4, carry out following step and produce query message:
Step 401, when receiving the path query order, management node produces query message;
Step 402, management node are arranged on the multicast source address in the path query order in the multicast source address field of query message;
Query message can be based on the PIM message that the PIM agreement is realized, wherein generally includes multicast source address field, multicast group address field, Designated Router address field, management address field and hop count field etc.Above-mentioned address field is respectively applied for the address of record multicast source address, multicast group address, Designated Router address and management node.Designated Router is the router that recipient's node directly links to each other, and also is the final jump node of multicast forwarding path.Hop count field is used to write down the jumping figure value, and promptly intermediate node is apart from the jumping figure between the Designated Router node, and default setting is zero when initial.If can know multicast group address and Designated Router address, then insert the relevant position in the query message when initial, if can't know, then can multicast group address be set to complete zero, i.e. " 0.0.0.0 ".Then can give tacit consent to management node in the time of can't knowing the Designated Router address and be Designated Router, with the address setting of management node in the Designated Router field of query message.
Step 403, management node are transmitted (ReversePath Forwarding according to multicast source address at the inverse path that prestores, abbreviation RPF) the outgoing interface address that this machine points to multicast source is obtained in inquiry in the table, and this machine is pointed to the outgoing interface address setting of multicast source in the management address field of query message;
The neighbours' interface IP address that points to multicast source is obtained in step 404a, management node inquiry in the RPF table, and the neighbours' interface IP address that points to multicast source is set to the purpose IP address of query message;
Above-mentioned RPF table is the database that is recorded in this locality and safeguards by behind singlecast router, the static multicast route integrated optimization, this database is used to check whether the multicast source inlet is legal, to confirm whether should be accepted and transmit from this multicast traffic stream that enters the mouth into.The prior art that is based on this RPF table can realize, not repeat them here.At least record following corresponding relation in the RPF table, promptly multicast source, this machine point to the outgoing interface address of multicast source and neighbours' interface IP address of sensing multicast source.The outgoing interface address that this machine points to multicast source is the address that this machine can be communicated with an interface of multicast source, the neighbours' interface IP address that points to multicast source is the address of an interface of the neighbor node of this machine, this machine can be communicated with multicast source from neighbor node by this interface, and this neighbor node is the neighbor node that connected by the outgoing interface address of pointing to multicast source of this machine just.
The IP header that carries this query message generally includes information such as purpose IP address and source IP address, source IP address can default setting in the address of this management node, i.e. address in the management address field in the query message.
Step 405, management node send query message to above-mentioned neighbor node according to the clean culture of purpose IP address.
This neighbor node is an intermediate node, can carry out above-mentioned step 301~step 304 after receiving query message.For proceeding the inquiry of multicast forwarding path, intermediate node is also carried out following step after receiving from the query message of management node, as shown in Figure 3:
Step 305, intermediate node judge whether the multicast source address in the query message is this machine directly-connected network host address, judge that promptly this multicast source is whether in the direct-connected network of this machine, if, then this intermediate node promptly is the direct-connected router of multicast source, this path query finishes, otherwise execution in step 306a;
In above-mentioned steps, when intermediate node because of making during this path query normal termination with multicast source is direct-connected, then intermediate node further produces another response message, can be to be set in the response message after the jumping figure value of query message that self is received adds two, the direct-connected interface IP address of self and multicast source is set to the source IP address of response message, other address field parameter constants, with the address setting of management node address field is the purpose IP address of response message, thereby sends this response message to the management node clean culture.The step that sends this response message be equally applicable in the subsequent embodiment when intermediate node and multicast source direct-connected, the situation of this path query end.
Step 306a, intermediate node add one with the jumping figure value in the query message;
Step 307, intermediate node are inquired about in the RPF table that prestores according to multicast source address and are obtained the neighbours' interface IP address that points to multicast source, and neighbours' interface IP address is set to the purpose IP address of query message;
Step 308, intermediate node clean culture send query message, and according to the purpose IP address after upgrading, this query message will be sent to the intermediate node of next jumping.
In the processing procedure of intermediate node to query message, except that jumping figure value and purpose IP address, the parameter constant of other fields, hop-by-hop sends.The intermediate node of hop-by-hop execution in step 301~step 308 repeatedly after receiving query message, all the response message clean culture is sent it back management node according to the address in the query message management address field, and the jumping figure value increases progressively, for management node record multicast forwarding path information.
After receiving the response message that intermediate node returns, management node can carry out record, the hop count field of management node resolution response message and multicast source address field, and the jumping figure value and the address that are resolved to carried out record as multicast forwarding path information.
Concrete, management node can be set up storehouse in advance and come storage sets multicast forwarding path information when producing query message, this storehouse comprises at least jumps numerical term and node address item, and the node address item is used for storing the address that parses from the multicast source address field of response message.For the intermediate node of each jumping, it is arranged on the interface IP address that this machine receives this query message in the multicast source address field of response message, so the address of having write down the hop-by-hop intermediate node in each response message multicast source address field.Management node can write down each address of jumping intermediate node respectively, and is the node of which jumping according to this intermediate node of jumping figure value record.
Adopt the technical scheme of present embodiment, can hop-by-hop record intermediate node and management node between multicast forwarding path, effectively improved the reliability of path query, the network manager that is more convenient in time and is accurately known multicast forwarding path information.
Embodiment two
Management node produces the flow chart of query message method in the querying method of the multicast forwarding path that Fig. 5 provides for the embodiment of the invention two, present embodiment can be realized based on embodiment one, and further comprise the situation that comprises the Designated Router address in the path query order, then the step of management node generation query message specifically comprises:
Step 401, when receiving the path query order, management node produces query message;
Step 402, management node are arranged on the multicast source address in the path query order in the multicast source address field of query message;
Step 403, management node point to the outgoing interface address setting of multicast source according to the multicast source address outgoing interface address that this machine sensing multicast source is obtained in inquiry in the RPF table that prestores in the management address field of query message with this machine;
In the present embodiment, the step 404a in the foregoing description one replaces with and carries out following step 404b:
Step 404b, management node judge whether comprise the Designated Router address in the path query order, if, then with the Designated Router address setting in the Designated Router field of query message, and the sign of second in query message position is set to the Designated Router sign, is purpose IP address with the Designated Router address setting;
In the above-mentioned steps second sign position is to be used to indicate whether current query message is to send to Designated Router, comprises Designated Router sign and two kinds of values of non-designated routers sign, can identify with " 1 ", " 0 ".Do not comprise the Designated Router address in the path query order if judge, then the second sign position is set to the non-designated routers sign, and follow-up implementation is identical with embodiment one.
Step 405, management node send query message, and according to purpose IP address, this query message will be sent to Designated Router.
When Designated Router received this query message as intermediate node, the step that the jumping figure value in the response message hop count field is set according to query message can be carried out following operation:
Whether the second sign position in step 3031, the intermediate node identification query message is the Designated Router sign, if not, then the jumping figure value in the query message is added in the hop count field that is arranged on response message after, if then the jumping figure value in the query message is set in the hop count field of response message as the jumping figure value.
After the query message of intermediate node reception from management node, this Designated Router is handled the process that this query message sends again, as shown in Figure 6, is specially and carries out following operation:
Step 305, intermediate node judge whether the multicast source address in the query message is this machine directly-connected network host address, judge that promptly this multicast source is whether in the direct-connected network of this machine, if, then this intermediate node promptly is the direct-connected router of multicast source, this path query finishes, otherwise execution in step 306b;
Step 306b, intermediate node judge whether the second sign position of query message is the Designated Router sign, if the jumping figure value that query message then is set remains unchanged, and the second sign position changed to the non-designated routers sign, if not, the jumping figure value that query message then is set adds one;
Step 307, intermediate node are inquired about in the RPF table that prestores according to the multicast source address in the query message and are obtained the neighbours' interface IP address that points to multicast source, and neighbours' interface IP address is set to the purpose IP address of query message;
Step 308, intermediate node clean culture send query message.
In the present embodiment, management node still can receive the response message that the hop-by-hop intermediate node returns, and comprises the response message that Designated Router returns.The hop count field of management node resolution response message and multicast source address field, and jumping figure value and the address that is resolved to be recorded in the storehouse as multicast forwarding path information.Because Designated Router keeps its jumping figure value constant when handling query message and response message, so management node can write down each intermediate node successively to the jumping figure between the Designated Router.
Embodiment three
The querying method of the multicast forwarding path that the embodiment of the invention three provides, present embodiment can the foregoing description one or embodiment two be the basis, and further comprise the RPT route method of inquiry based on the PIM-SM agreement.In the present embodiment, intermediate node forms after the response message, also comprises: when the first sign position that intermediate node is judged query message identify for shared tree, first sign of response message was set to shared tree and identifies.Be non-shared tree sign if judge the first sign position, then the sign of first in response message position is set to non-shared tree sign, in fact promptly keeps current response message consistent with the first sign position of current query message.
Comprised also that before intermediate node receives from the query message of management node management node produces the step of query message, as shown in Figure 7, idiographic flow is as follows:
Step 501, when receiving the path query order, management node produces query message;
Step 502, judge when comprising multicast group address in the path query order when management node, corresponding convergent point address is obtained in inquiry in the convergent point set that this locality prestores according to multicast group address;
In step 503, the management node query message first sign position is set to the shared tree sign, and with the convergent point address setting in the convergent point address field of query message;
Further increased by first sign position and the convergent point address field in the PIM message that present embodiment adopted, the first sign position can be shared tree sign or non-shared tree sign, being used to indicate this query message is inquiry RPT, still inquires about SPT, specifically can identify with " 1 ", " 0 ".
The outgoing interface address that this machine points to convergent point is obtained in the inquiry in the RPF table that prestores of step 504, management node, and this machine is pointed to the outgoing interface address setting of convergent point in the management address field of query message;
The neighbours' interface IP address that points to convergent point is obtained in the inquiry in the RPF table of step 505, management node, and the neighbours' interface IP address that points to convergent point is set to the purpose IP address of query message;
In the RPF table, also can inquire the relevant interface address that each node points to convergent point usually.
Step 506, management node send query message.
In above-mentioned steps 502,, in the convergent point set that this locality prestores, can inquire about the convergent point address of this multicast group correspondence when management node is judged when comprising multicast group address in the path query order.Because the network manager is difficult to directly know the address of convergent point usually, thus can be by the foundation of multicast group address as inquiry convergent point address, recognize and comprise multicast group address in the path query order and promptly be equivalent to recognize and comprise the convergent point address.When management node recognizes multicast group address, can gather the address of the convergent point of this multicast group correspondence of inquiry in (RP-set) at convergent point, " RP-set " information is the local whole net multicast group that stores and the ensemble of communication of RP corresponding relation.
In the present embodiment, specifically be to send query message as multicast source address, thereby realize the inquiry of RPT forward-path with the convergent point address.After intermediate node receives this query message, still can carry out the step 301~step 304 in the foregoing description one, return response message.When intermediate node produces response message, need to resolve the shared tree sign of obtaining from the first sign position of query message and be arranged on the first sign position of response message.
Perhaps, more preferably response message need not generate separately, and query message change parameter obtains and be based on, and promptly above-mentioned steps 302 is specially and carries out following operation:
Intermediate node changes to response with the type of message in query message sign from inquiry, with after changing query message message in response;
The management address that intermediate node is resolved to is set to the purpose IP address of response message, and the interface IP address that this machine is received query message is arranged in the multicast source address field of response message.
Can comprise the type of message position in the PIM protocol massages, promptly can distinguish this message by the sign of change type of message position is that query message still is response message.The type of message sign can comprise " inquiry ", " response " etc., can represent with concrete " 0 ", " 1 " parameter.
On the basis of technique scheme, management node is specifically as follows according to response message record multicast forwarding path information:
The hop count field of management node resolution response message, multicast source address field and first identify the position, and jumping figure value, address and the first sign place value that is resolved to is recorded in the storehouse as multicast forwarding path information.
In the present embodiment, can increase by the first sign position item in the storehouse that management node is preset, the first sign position that is used for the recording responses message, differentiation by the first sign position, can know that the address of being write down is the address of management node to the intermediate node between the RP, or management node is to the address of the intermediate node between the multicast source.
In the present embodiment,, sent after the response message, as shown in Figure 8, can also comprise the steps: in the query message of intermediate node reception from management node
Step 601, when the first sign position that intermediate node is judged query message identifies for shared tree, the convergent point address is obtained in parsing from query message;
In step 601, if the first sign position be non-shared tree when identifying, correspondingly there is not the convergent point address yet, intermediate node need not be discerned the convergent point address field.
Step 602, when judging the convergent point address for the interface IP address of this machine, intermediate node forms another response message, the jumping figure value of query message is added in the hop count field that is arranged on current response message after two, with the convergent point address setting in the multicast source address field of current response message, management address in the query message is set to the purpose IP address of current response message, and sends current response message.
In technique scheme, when if the convergent point address is the interface IP address of this this machine of intermediate node, promptly this intermediate node is the direct-connected router of convergent point, also there is a relation of jumping between this intermediate node and the convergent point, so the jumping figure value should be added two, multicast forwarding path information be jumped as one in the convergent point address carry out record.
Intermediate node receives the process that query message is encapsulated transmission again of being carried out after the query message from management node and can comprise the steps: as shown in Figure 9
Step 701, when the first sign position that intermediate node is judged query message identifies for shared tree, the convergent point address is obtained in parsing from query message;
Step 702, intermediate node judge whether the convergent point address is the interface IP address of this machine, if then execution in step 703, if not, then execution in step 704;
Step 703, intermediate node change to non-shared tree sign with the sign of first in query message position, the neighbours' interface IP address that points to multicast source is obtained in inquiry in the RPF table that prestores according to the multicast source address that comprises in the query message, the neighbours' interface IP address that points to multicast source is set to the purpose IP address of query message, the jumping figure value of query message is added two, and then execution in step 705;
Step 704, intermediate node add one with the jumping figure value of query message, obtain the neighbours' interface IP address that points to convergent point according to the inquiry in the RPF table that prestores of convergent point address, the neighbours' interface IP address that points to convergent point is set to the purpose IP address of query message, and then execution in step 705;
Step 705, intermediate node send query message.
Adopt technique scheme, intermediate node is divided into multiple situation when query message is handled, at first judge whether direct-connected convergent point of this machine, if, then the first sign position is changed to non-shared tree sign, so that the indication subsequent query is that convergent point is to the path between the multicast source.
In above-mentioned steps 502, when management node judge comprise multicast group address in the path query order after, can also comprise:
Management node judges whether comprise multicast source address in the path query order, if, then multicast source address is arranged in the multicast source address field of query message, if not, multicast source address then can be set be complete zero.Therefore, in query message, multicast source address may be comprised, also multicast source address may be do not comprised.
If can not from query message, resolve in the step 703 and obtain multicast source address, illustrate that then this needs inquiry RPT, this path query to convergent point promptly finishes.
The technical scheme of present embodiment goes for embodiment two equally, and the situation of the Designated Router that knows is promptly arranged, and can realize by the corresponding second sign position is set.
Embodiment four
The querying method of the multicast forwarding path that the embodiment of the invention four provides has been introduced preferred performance in the practical application respectively.
In concrete the application, comprise several query demands: the SPT in the inquiry multicast network; Inquiry is based on the RPT of PIM-SM agreement and the SPT between RP and the multicast source node.On this basis, also be divided into whether needing to specify definite Designated Router,, then management node can be defaulted as Designated Router if do not specify.
Above-mentioned different query demand can be distinguished by importing different path query orders:
For the situation of only inquiring about SPT, comprise multicast source address in the path query order at least, multicast group address and Designated Router address are option.A kind of command format can for:
“mtraceroute?source_ip[gourp_ip][dr_ip]”
Wherein, " source_ip " represents multicast source address, and " [gourp_ip] " represents multicast group address, and " [dr_ip] " represents the Designated Router address, and italic is represented as option.
For the situation of inquiry based on the RPT and the SPT of PIM-SM agreement, comprise multicast group address in the path query order at least, multicast source address and Designated Router address are option.Because the network manager is difficult to directly know the convergent point address usually, so comprise the multicast group address that can be used as inquiry convergent point address foundation in the path query order at least.A kind of command format can for:
“mtraceroute?group_ip[source_ip][dr_ip]”
Wherein, " group_ip " represents multicast group address.
Inquiry of being adopted and response message can realize that the PIM protocol massages is carried by the IP message based on the PIM protocol massages in the present embodiment, and the form of PIM protocol massages is as shown in table 1:
Table 1
0???????????????????1???????????????????2???????????????????3
0?1?2?3?4?5?6?7?8?9?0?1?2?3?4?5?6?7?8?9?0?1?2?3?4?5?6?7?8?9?0?1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PIM?ver|??Type?|????Hop?Limit??|??????CheckSum???????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|??????????????????????Source?Address?????????????????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|???????????????????????Group?Address?????????????????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|???????????????????????Admin?Address?????????????????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|????????????????????????RP?Address???????????????????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|?Hop?Number????|R|D|?????????Reserve?????????????????????????|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Wherein, " PIM ver " represents PIM version number, takies 4 bits (bit);
" Type " represents the particular type implication of message, takies 4bits, and " TYPE=10 " then this message is query message (request), sends with the clean culture form, and " TYPE=11 " then this message is response message (reply), sends with the clean culture form;
" Hop Limit " represents the count value of jumping figure restriction, takies 8bits, and the maximum of jumping figure restriction count value can artificially be set, and for example is set at " 255 ";
" CheckSum " represent verification and, take 16bits.Checksum field storage verification and, when information such as the type of message in this PIM protocol massages, address field, hop count field change, all need to recomputate verification and, to guarantee the correctness of message information.
" Source Address " represents the multicast source address field, takies 32bits;
" Group Address " represents the multicast group address field, takies 32bits;
" RP Address " represents the convergent point address field, takies 32bits;
" Admin Address " represents the management address field, takies 32bits;
" Hop Number " represents hop count field, takies 8bits, the jumping figure value of hop count field record queries message;
" R " represents the first sign position, takies 1bit." R " is changed to " 1 " interval scale shared tree sign, represent that this message is (*, G) path RPT query message, " R " is changed to the non-shared tree sign of " 0 " interval scale, represents that this message is (S, G) path SPT query message, (S wherein, G) two tuples are represented (multicast source, multicast group), and " * " is expressed as whole values;
" D " represents the second sign position, take 1bit, " D " is changed to " 1 " interval scale Designated Router sign, this confidential Designated Router as the recipient (DR) of expression is initiated the multicast forwarding path inquiry, " D " is changed to " 0 " interval scale non-designated routers sign, represent that this machine is the intermediate node of multicast forwarding path, can ignore this sign position.
" Reserve " takies 22bits for keeping item.
Technical scheme based on the PIM protocol massages is realized makes the technical scheme of present embodiment have favorable compatibility.
Based on above-mentioned setting situation, the querying method of the multicast forwarding path that present embodiment is performed is that example describes with multicast network shown in Figure 10, as shown in figure 10, comprise router R1~R6 in this multicast network, wherein, R1 is the direct-connected router of multicast source, and R6 is recipient's a direct-connected router, Designated Router just, R5 is a management node.The method of present embodiment specifically comprises the steps: as shown in figure 11
The path query order of step 11, management node receiving network managing person input produces the PIM protocol massages, and type of message is set to " TYPE=10 ", as query message, when initial in the query message jumping figure value of hop count field be set to zero;
Step 12, management node judge in this path query order whether comprise multicast group address, promptly be equivalent to judge whether to know the convergent point address and inquire about the RPT path, at the described command format of the foregoing description, specifically be to judge whether first address that occurs in the path query order is multicast group address, if, then execution in step 18, otherwise execution in step 13;
In concrete the application, it is multiple to judge that the implementation that whether comprises multicast group address in the path query order has, for example, according to the above-mentioned command format that provides, then think and comprise multicast group address if the address of judging first appearance is a multicast group address, perhaps, can also be to judge in the specific fields of path query order whether comprise multicast group address.
In step 13, the management node query message first sign position is set to non-shared tree sign, multicast source address in the path query order is arranged in the multicast source address field of query message, owing to do not comprise multicast group address in the path query order, according to the command format rule of setting, then should comprise multicast source address in this path query order, then execution in step 14;
Step 14, management node judge in this path query order whether comprise the Designated Router address, if then execution in step 110, otherwise execution in step 15;
In step 15, the management node query message second sign position is set to the non-designated routers sign, and the neighbours' interface IP address that points to multicast source is obtained in inquiry in the RPF table that prestores according to multicast source address;
Step 16, management node judge whether the neighbours' interface IP address that points to multicast source is the native interface address, if, proving that then this management node is the direct-connected router of multicast source, this path query finishes, otherwise execution in step 17;
Step 17, the outgoing interface address that this machine points to multicast source is obtained in management node inquiry in the RPF table that prestores, the outgoing interface address setting that this machine is pointed to multicast source is in the management address field of query message and be set to the source IP address of this query message, and the neighbours' interface IP address that points to multicast source is set to the purpose IP address of query message, then send this query message to this neighbor node clean culture, trigger intermediate node and carry out following step 21~213, and this sends the EO of query message, in the query message that this step sends, then can fill in multicast group address if can obtain multicast group address from the path query order, also can extend this as entirely zero, Designated Router address field and convergent point address field can extend this as complete zero;
In step 18, the management node query message first sign position is set to the shared tree sign, multicast group address is arranged in the multicast group address field of query message, convergent point address according to multicast group address this multicast group correspondence of inquiry from the convergent point set that this locality prestores, and in the convergent point address field of query message, then execution in step 19 with the convergent point address setting;
Step 19, management node judge in this path query order whether comprise the Designated Router address, if then execution in step 110, otherwise execution in step 112;
Whether step 110, management node identification Designated Router address is the native interface address, if execution in step 113 then, otherwise execution in step 111;
Step 111, in the management node query message second sign position is set to the Designated Router sign, the outgoing interface address that this machine points to Designated Router is obtained in inquiry in the RPF table that prestores, and this machine pointed to the outgoing interface address setting of Designated Router in the management address field of query message, and with the Designated Router address setting in the Designated Router field of query message, and be the purpose IP address of query message with the Designated Router address setting, source IP address can be set to the outgoing interface address that this machine points to Designated Router, then send this query message to the Designated Router clean culture, trigger intermediate node and carry out following step 21~213, and this sends the EO of query message;
In step 112, the management node query message second sign position is set to the non-designated routers sign, and then execution in step 113;
The neighbours' interface IP address that points to convergent point is obtained in the inquiry in the RPF table that prestores of step 113, management node, and judges whether this neighbours' interface IP address is the native interface address, if, prove that then this management node is RP, execution in step 115, if not, then execution in step 114;
In this step, for the directly-connected network of this locality, the RPF neighbor node that points to main frame on it is for empty in the RPF table, and promptly the address in the table is " 0.0.0.0 ".
The outgoing interface address that this machine points to convergent point is obtained in the inquiry in the RPF table that prestores of step 114, management node, and this machine pointed to the outgoing interface address setting of convergent point in the management address field of query message, and the neighbours' interface IP address that points to convergent point is set to the purpose IP address of this query message, source IP address can be set to the outgoing interface address that this machine points to convergent point, then send this query message to the neighbor node clean culture, trigger intermediate node and carry out following step 21~213, and this sends the EO of query message;
Step 115, management node judge whether comprise multicast source address in the path query order, if then expression should continue to inquire about the SPT between RP and the multicast source, should continue execution in step 116, if not, then RPT, this poll-final are only inquired about in expression;
Step 116, management node change to non-shared tree sign with the sign of first in query message position, the outgoing interface address that this machine points to multicast source is obtained in inquiry in the RPF table that prestores, and this machine is pointed to the outgoing interface address setting of multicast source in the management address field of query message;
The neighbours' interface IP address that points to multicast source is obtained in the inquiry in the RPF table that prestores of step 117, management node, and the neighbours' interface IP address that points to multicast source is set to the purpose IP address of query message, source IP address can be set to the outgoing interface address that this machine points to multicast source, then send this query message to the neighbor node clean culture, trigger intermediate node and carry out following step 21~213, and this sends the EO of query message.
For the directly-connected network of this locality, the RPF neighbor node that points to main frame on it is for empty in the RPF table, and promptly the address in the table is " 0.0.0.0 ", and whether can judge Designated Router address, convergent point address or multicast source address in view of the above is the direct-connected address of this machine.The address field of not mentioning especially in the above-mentioned steps can be set to complete zero.
In above-mentioned flow process, disturb result's correctness in order to get rid of other factors of network, for inquiry each time, management node can send a plurality of identical query messages at interval, for example, sends three, sends at interval and can be 0.5 second.
Based on technique scheme, the operation that intermediate node receives after the query message can comprise following flow process as shown in figure 12:
Step 21, intermediate node receive the query message from management node;
Step 22, intermediate node form response message, type of message in promptly can the PIM protocol massages is set to " TYPE=11 ", message in response, the management address that intermediate node is resolved to from query message management address field is set to the purpose IP address of response message, the interface IP address that this machine is received this query message is arranged in the multicast source address field of response message, and can this interface IP address be set to the source IP address of response message;
Whether the second sign position in step 23, the intermediate node identification query message is the Designated Router sign, if not, then the jumping figure value in the query message is added in the hop count field that is arranged on response message after, send this response message to management node subsequently, and execution in step 25, if, then this intermediate node is a Designated Router, jumping figure value in the query message is set in the hop count field of response message as the jumping figure value, sends this response message to management node subsequently, and execution in step 24;
Step 24, intermediate node encapsulate query message again, promptly keep the jumping figure value in the query message constant, and the sign position of second in the query message is set to the non-designated routers sign, and then execution in step 26;
Step 25, intermediate node encapsulate query message again, and the jumping figure value that is about in the query message adds one, and then execution in step 26;
Whether step 26, intermediate node are discerned the sign of first in this query message position is the shared tree sign, and if not, then execution in step 210, if then execution in step 27;
Whether the convergent point address that step 27, intermediate node are discerned in this query message is the native interface address, if, then the sign of first in query message position is changed to non-shared tree sign, execution in step 29, if not, then execution in step 28;
Step 28, intermediate node obtain the neighbours' interface IP address that points to convergent point according to the inquiry in the RPF table that prestores of convergent point address, and the neighbours' interface IP address that points to convergent point is set to the purpose IP address of query message, source IP address can be set to the interface IP address that this intermediate node receives query message, except that hop count field, other field parameters in the query message are constant, then send this query message, the EO of this intermediate node to the convergent point clean culture;
Step 29, intermediate node produces another response message, can be that type of message in the query message is set to " response ", the management address that is resolved to from query message is set to the purpose IP address of response message, with the convergent point address setting in the query message in the multicast source address field, and the jumping figure value in this query message is added two, the jumping figure value that is equivalent to the response message that will this centre message produces for the first time adds one again, the address setting that this machine is received this query message is a source IP address, send this response message to the management node clean culture, continue execution in step 210;
Step 210, intermediate node judge whether comprise multicast source address in the query message, if then execution in step 211, otherwise this path query EO;
The neighbours' interface IP address that points to multicast source is obtained in the inquiry in the RPF table that prestores of step 211, intermediate node;
Step 212, intermediate node judge whether the neighbours' interface IP address that points to multicast source is the interface IP address of this machine, if then this path query stops, and if not, then continues execution in step 213;
Step 213, intermediate node neighbours interface IP address are set to the purpose IP address of query message, jumping figure value in the query message adds one or add two, promptly adopt the jumping figure value in the last response message of this intermediate node, source IP address can be set to the interface IP address that intermediate node receives query message, then send this query message, the EO of this intermediate node to the multicast source clean culture.
Above-mentioned steps 21~213 will repeat, till judging the direct-connected router of arrival convergent point or arriving the direct-connected router of multicast source.
In technique scheme, when each intermediate node receives query message, be the shared tree sign if recognize the first sign position, can also at first check the correctness of query message information, confirm promptly whether the multicast group address that carries in the query message is consistent with information in the convergent point set that corresponding relation and this machine of convergent point address are safeguarded, if inconsistent this query message that then abandons, if consistent then continue according to above-mentioned flow performing.Adopt this technical scheme, can carry out consistency checking, determine that the convergent point information announcement is correct in the network multicast group on the multicast forwarding path and convergent point corresponding informance.
Embodiment five
On the basis of technical solutions of above embodiments, be record multicast forwarding path information, management node can be set up storehouse when initiating query message.This storehouse comprises at least jumps numerical term (Hop Number), node address item (Hop-IP) and the first sign position (R-bit), when initial, management node at first is recorded in the jumping figure value in the current query message, management address and the first sign position item in the storehouse.The hop count field that management node is promptly resolved wherein after receiving each response message is recorded as the jumping figure value, and the multicast source address item of resolving wherein is recorded in the node address item, and the parsing first sign position wherein is recorded in the first sign position item.Preferably, when setting up storehouse, set up a hop count device (hop) that is associated with the jumping numerical term.The hop count device is initially set to one, is about to hop count and thinks highly of the jumping figure value that is changed to current record and add one when receiving a response message.Because response message may not be to receive according to each order of jumping intermediate node, so stack manipulation specifically can be carried out following step, as shown in figure 13:
Step 31, management node are set up storehouse when sending query message, and start the hop count device, judge whether the sign of second in query message position is the Designated Router sign, if, the initial value of then setting the hop count device is zero, execution in step 33, otherwise execution in step 32;
Step 32, management node with the jumping figure value record in the query message in the jumping numerical term of storehouse, address in the query message management address field is recorded in the node address item of storehouse, the value record of the query message first sign position is identified in the item of position at first of storehouse, the jumping figure value that the initial value of setting hop count device equals in the query message adds one, perhaps also can be set to consistent with the jumping figure value of query message;
Step 33, when management node receives response message, judge jumping figure value in the response message whether greater than the value of hop count device, if then execution in step 34, if not, then execution in step 36;
Jumping figure value in step 34, the management node calculated response message and the difference between the hop count device value;
Step 35, management node are according to difference record multicast forwarding path information, the jumping numerical term of each bar multicast forwarding path information is with the jumping figure value that is incremented to the current response message, the in the end multicast source address in the current response message of record and the first sign place value in multicast forwarding path information, and hop count device value is updated to jumping figure value in the current response message; If difference only is one, promptly be equivalent to a multicast forwarding path information newly-built.
For example, the multicast forwarding path information of original record is (Hop Number, Hop-IP, R-bit), the multicast forwarding path information that receives the response message correspondence is (Hop Number+n, Hop-IP, R-bit), then successively the record (Hop Number+1, *, *) ..., (Hop Number+n-1, *, *), (Hop Number+n, Hop-IP, R-bit), hop count device value is updated to " HopNumber+n+1 ".
Step 36, management node are recorded to the multicast source address in this response message and the first sign position respectively in the node address item and the first sign position item of storehouse according to the jumping figure value in the current response message, and keep the value of hop count device constant.
The above-mentioned hop count device that sets can be associated with multicast source address, also can be associated with the convergent point address, can depend on whether the first sign position of query message is the shared tree sign.When the designated multicast source address, then the hop count device is associated with multicast source address; When designated multicast source address not, then the hop count device is associated with the convergent point address.
When receiving response message, can also carry out following operation:
Judge when whether the multicast source address address related with the hop count device in the response message mates unanimity, if it is consistent, then search for Unrecorded items such as whether there being the node address item in the storehouse such as (Hop Number, *, *), if there be not Unrecorded, then directly stop the hop count device, path query finishes, if there be Unrecorded, then can continue the wait-for-response message.
Further can for example be set at 30 seconds,, promptly think and the no result of inquiry finish this query script when time of looking into during higher limit for hop count device setting-up time higher limit.Can also set the jumping figure higher limit for the value of hop count device, for example be set at 255, when reaching the jumping figure higher limit, promptly think not have the path that can reach multicast source or convergent point, finish this query script.Then above-mentioned query script not only can fair termination, also can stop owing to timing or counting overflow.When management node is initiated path query, can correspondingly start timer (mtrace-timer), the numerical value of this timer of when management node receives response message, resetting.When timing reaches set point, do not receive response message yet, then can think overtimely, need to stop this path query.In concrete the application, can set and be limited to 30 seconds in the timing, and can design once to reach and restart timer in the timing in limited time, reach at twice and just stop path query in the timing in limited time.In above-mentioned steps,, also can restart timer one time when search exists in the storehouse node address item etc. not during entry.
On the basis of the above embodiment of the present invention, can also further in query message, increase count area, be used to store the count value (Hop Limit) of jumping figure restriction.Management node is provided with initial count value in the count area of query message when initiating query message.Initial count value can for example can be defaulted as " 255 " for artificial numerical value or other fixed values set.When intermediate node receives query message, and before sending query message, also comprise: intermediate node judges whether the count value in the query message count area is lower than the setting threshold value, if then abandon query message, if not, then the count value in the query message is subtracted one.This sets threshold value can be " zero " usually.
Adopt technique scheme, when the jumping figure that sends when query message has reached enough big numerical value, may form route loop, perhaps can't find correct path, promptly can think to have had routing issue in the topology owing to fault.By the count value that hop-by-hop successively decreases is set, can when taking place, routing issue in time stop path query, avoid increasing extra burden into network.
With multicast network shown in Figure 10 is example, as designated multicast source address " 192.168.1.10 ", and do not specify the Designated Router address, when the interface IP address " 192.168.8.1 " of management node is initiated inquiry, the multicast forwarding path information that storehouse write down is as shown in table 2, the path is R5-R4-R1, and multicast group address can be " 229.1.2.3 ":
Table 2
Jump numerical term |
The node address item |
The first sign position item |
??3 |
??192.168.1.10 |
??0 |
??2 |
??192.168.2.1 |
??0 |
??1 |
??192.168.7.1 |
??0 |
??0 |
??192.168.7.2 |
??0 |
As designated multicast source address " 192.168.1.10 ", and specify Designated Router address " 192.168.6.2 ", when the interface IP address " 192.168.8.1 " of management node is initiated inquiry, the multicast forwarding path information that storehouse write down is as shown in table 3, the path is R6-R3-R2-R1, and multicast group address can be " 229.1.2.3 ":
Table 3
Jump numerical term |
The node address item |
The first sign position item |
??4 |
??192.168.1.10 |
??0 |
Jump numerical term |
The node address item |
The first sign position item |
??3 |
??192.168.3.1 |
??0 |
??2 |
??192.168.4.1 |
??0 |
??1 |
??192.168.6.1 |
??0 |
??0 |
??192.168.6.2 |
??0 |
Technique scheme is inquired about SPT down applicable to the PIM-DM protocol infrastructure.
When the designated multicast group address is " 229.1.2.3 ", multicast source address " 192.168.1.10 ", and do not specify the Designated Router address, when the interface IP address " 192.168.8.1 " of management node is initiated inquiry, the multicast forwarding path information that storehouse write down is as shown in table 4, and the path is R5-R4-R3-R2-R1:
Table 4
Jump numerical term |
The node address item |
The first sign position item |
??6 |
??192.168.1.10 |
??0 |
??5 |
??192.168.3.1 |
??0 |
??4 |
??192.168.4.1 |
??0 |
??3 |
??192.168.100.100 |
??1 |
??2 |
??192.168.5.1 |
??1 |
??1 |
??192.168.7.1 |
??1 |
??0 |
??192.168.7.2 |
??1 |
When the designated multicast group address is " 229.1.2.3 ", multicast source address " 192.168.1.10 ", and specifying the Designated Router address is " 192.168.6.2 ", when the interface IP address " 192.168.8.1 " of management node is initiated inquiry, the multicast forwarding path information that storehouse write down is as shown in table 5, and the path is R6-R3-R2-R1:
Table 5
Jump numerical term |
The node address item |
The first sign position item |
??5 |
??192.168.1.10 |
??0 |
Jump numerical term |
The node address item |
The first sign position item |
??4 |
??192.168.3.1 |
??0 |
??3 |
??192.168.4.1 |
??0 |
??2 |
??192.168.100.100 |
??1 |
??1 |
??192.168.6.1 |
??1 |
??0 |
??192.168.6.2 |
??1 |
Technique scheme is inquired about RPT+SPT down applicable to the PIM-SM protocol infrastructure.
Adopt the technical scheme of various embodiments of the present invention, hop-by-hop node real-time response on the one hand, can be avoided because the entire path query manipulation failure that some intermediate node faults cause to return the address information of this machine, even break down node, also can accurately locate; On the other hand, prior art takes hop-by-hop to increase the multicast information of this machine, at last gather the mode that sends response message by first hop router, the defective of this mode is because maximum message segment limited length system, such as the Ethernet maximum message segment 1500 bytes can only be arranged, limited the multicast path information that can reflect in the message, if adopt fragment message to transmit one query information, then increased the burden of router processing fragment message, technical scheme of the present invention, each intermediate node only feeds back the address information of this machine, is subjected to the influence of maximum message segment length restriction little.
In addition, the technical scheme of various embodiments of the present invention not only can the searching and managing node or multicast recipient and multicast source between shortest path tree, shared tree between searching and managing node or multicast recipient and the convergent point easily, and the shortest path tree between convergent point and the multicast source, solved in the prior art owing to " RPT+SPT " based on the PIM-SM agreement often do not overlap with shortest path tree, be difficult to the directly problem of inquiry, reduced the difficulty of network manager supervising the network, investigation network failure, multicast forwarding path that can actual response reality.Owing to just switch to multicast source to the shortest path tree between the multicast recipient after when initial, can transmitting successfully based on the PIM-SM agreement, so the correct identification in " RPT+SPT " path can improve the reliability of multicast forwarding business by " RPT+SPT " path.
Adopt the technical scheme of the embodiment of the invention, can specified network in any router proceed to the shortest path tree of multicast source as Designated Router and the routing information of shared tree obtains.Can also carry out consistency checking to multicast group on the multicast forwarding path and convergent point corresponding informance, determine that the convergent point information announcement is correct in the network.Thereby really accomplish only at the enterprising line operate of management node, can know the multicast forwarding path information of all nodes in the whole network, comprise shortest path tree and shared tree, improved the controllability and the maintainability of multicast service in the network, significantly reduce maintenance cost and difficulty.
Embodiment six
The structural representation of the intermediate node of the realization multicast forwarding path inquiry that Figure 14 provides for the embodiment of the invention six, this intermediate node can be the network element device in the multicast forwarding network, specifically is router device.This intermediate node comprises: query message receiver module 141, response message form module 142, jumping figure value update module 143 and response message sending module 144.Wherein, query message receiver module 141 is used to receive the query message from management node; Response message forms module 142 and is used to form response message, the management address that is resolved to from described query message management address field is set to the purpose IP address of described response message, and the interface IP address that this machine is received described query message is arranged in the multicast source address field of described response message; Jumping figure value update module 143 is used for being provided with according to described query message the jumping figure value of described response message hop count field; Response message sending module 144 is used for sending described response message to described management node, so that described management node is according to described response message record multicast forwarding path information.
On the basis of present embodiment, jumping figure value update module preferably comprises: second a sign position recognition unit, the unit is set the first jumping figure value and the second jumping figure value is provided with the unit.Wherein, the second sign position recognition unit is used for discerning whether the second sign position of described query message is the Designated Router sign; The first jumping figure value is provided with the unit and is used for when the second sign position that recognizes described query message is not the appointment Router Distinguisher jumping figure value in the query message being added in the hop count field that is arranged on response message after; The second jumping figure value is provided with the unit and is used for when the second sign position that recognizes described query message identifies for Designated Router, the jumping figure value in the described query message is set in the hop count field of response message as the jumping figure value.
This intermediate node can further include: the first sign position judge module 145 and the first sign position are provided with module 146.Wherein, the first sign position judge module 145 is used to judge whether the first sign position of described query message is the shared tree sign; The first sign position is provided with module 146 and is used for when the first sign position of judging described query message identifies for shared tree, and the first sign position of described response message is set to the shared tree sign.
On the basis of said structure, this intermediate node can also comprise: convergent point address resolution module 147, native interface judge module 148 and convergent point response message form module 149.Wherein, convergent point address resolution module 147 is used for resolving from described query message and obtaining the convergent point address when the first sign position of judging described query message identifies for shared tree; Native interface judge module 148 is used to judge whether described convergent point address is the interface IP address of this machine; The convergent point response message forms module 149 and is used for formation response message when judging described convergent point address for the interface IP address of this machine, the jumping figure value of query message is added in the hop count field that is arranged on current response message after two, with the convergent point address setting in the multicast source address field of current response message, management address in the query message is set to the purpose IP address of current response message, and current response message is offered described response message sending module 144 sends.
This intermediate node can also comprise: query message first processing module 1410, query message second processing module 1411 and sending module 1412.Wherein, query message first processing module 1410 is used for when judging described convergent point address for the interface IP address of this machine, in the described query message first sign position is changed to non-shared tree sign, in transmitting, inquires about the inverse path that prestores the neighbours' interface IP address that obtains the sensing multicast source according to the multicast source address that comprises in the described query message, the neighbours' interface IP address that points to multicast source is set to the purpose IP address of query message, and the jumping figure value of query message is added two; Query message second processing module 1411 is used for when judging described convergent point address and be not the interface IP address of this machine, the jumping figure value of described query message is added one, inquire about the neighbours' interface IP address that obtains the sensing convergent point according to described convergent point address in the inverse path that prestores is transmitted, the neighbours' interface IP address that points to convergent point is set to the purpose IP address of query message; Sending module 1412 is used to send described query message.
The intermediate node that the embodiment of the invention provided can be carried out the querying method of the multicast forwarding path that the embodiment of the invention provides, and comprises the corresponding function module that relates in the method as intermediate node.
Adopt the technical scheme of present embodiment, can hop-by-hop record intermediate node and management node between multicast forwarding path, effectively improved the reliability of path query, the network manager that is more convenient in time and is accurately known multicast forwarding path information.In addition, by the first sign position is set, further inquiry is based on the RPT path of PIM-SM agreement.
Embodiment seven
The structural representation of the management node of the realization multicast forwarding path querying method that Figure 15 provides for the embodiment of the invention seven.This management node can be the network element device of initiating path query in the multicast forwarding network.This management node comprises: query message generation module 151, convergent point address lookup module 152, convergent point information setting module 153, management address are provided with module 154, purpose IP address setting module 155, query message sending module 156 and routing information logging modle 157.Wherein, query message generation module 151 is used for producing query message when receiving the path query order; Convergent point address lookup module 152 is used for when judging described path query order and comprise multicast group address, and corresponding convergent point address is obtained in inquiry in the convergent point set that this locality prestores according to described multicast group address; The first sign position that convergent point information setting module 153 is used for described query message is set to the shared tree sign, and with described convergent point address setting in the convergent point address field of described query message; Management address is provided with module 154 and is used for transmitting the outgoing interface address that this machine sensing convergent point is obtained in inquiry at the inverse path that prestores, and this machine is pointed to the outgoing interface address setting of convergent point in the management address field of described query message; Purpose IP address setting module 155 is used for transmitting inquiry at described inverse path and obtains the neighbours' interface IP address that points to convergent point, and the neighbours' interface IP address that points to convergent point is set to the purpose IP address of described query message; Query message sending module 156 is used to send described query message; Routing information logging modle 157 is used for resolving the hop count field of described response message, multicast source address field and the first sign position when receiving response message, and jumping figure value, address and the first sign place value that is resolved to is recorded in the storehouse as multicast forwarding path information.
On the basis of technique scheme, this management node can also comprise: multicast source address is provided with module, be used for when judging described path query order and comprise multicast source address, described multicast source address being arranged in the multicast source address field of query message.
The management node that the embodiment of the invention provided can be carried out the querying method of the multicast forwarding path that the embodiment of the invention provides, and comprises the corresponding function module that relates in the method as management node.
Adopt the technical scheme of present embodiment, can hop-by-hop record intermediate node and management node between multicast forwarding path, effectively improved the reliability of path query, the network manager that is more convenient in time and is accurately known multicast forwarding path information.In addition, by the first sign position is set, further inquiry is based on the RPT path of PIM-SM agreement.
Technical scheme of the present invention is the present PIM-SM agreement relevant criterion of compatibility fully, and the change amount is few, and it is convenient, simple and direct to dispose.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.