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.
The flow chart of the label forwarding information storage means that Fig. 1 provides for the embodiment of the invention one.As shown in Figure 1, the method for present embodiment comprises:
Step 11, label forwarding information-storing device judge whether label information to be stored is the public network label; If judged result is for being, promptly label information is the public network label, and then execution in step 12; Otherwise, execution in step 15.
Step 12, label forwarding information-storing device judge whether first behavior to be stored of label information correspondence is the POP behavior; If judged result is that then execution in step 13; Otherwise, execution in step 14.
Step 13, label forwarding information-storing device store label information under the first order label in the non-POP storage area of public network of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base, and finish the storage operation of this label forwarding information.
Step 14, label forwarding information-storing device store label information under the first order label in the public network POP storage area of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base, and finish the storage operation of this label forwarding information.
Step 15, label forwarding information-storing device judge the PHP function is supported and opened to a jumping whether on it; If, promptly going up a jumping for not, judged result do not support or supports but do not open the PHP function that then execution in step 16; Otherwise if judged result promptly goes up one and jumps support and opened the PHP function for being, then execution in step 17.
Wherein, the label forwarding information-storing device of present embodiment also is an apparatus for forwarding message simultaneously, promptly when receiving message, will finish message forwarding according to the Label Forwarding Information Base that is generated.Wherein, a last jumping of described local label forwarding information storage device is meant when E-Packeting the last two jump on the message forwarding path.
Step 16, label forwarding information-storing device store label information under the second level label in the private network storage area of Label Forwarding Information Base, and first behavior of revising is that corresponding stored and finishes the storage operation of this label forwarding information after second behavior in Label Forwarding Information Base; Carry out first behavior again after will the stack top label in the message when wherein, second behavior is identified at and E-Packets according to label information ejecting.
Step 17, label forwarding information-storing device store label information under the first order label in the private network storage area of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base, and finish the storage operation of this label forwarding information.
Wherein, in the process that E-Packets,, then when this message arrives final jump, will only carry single label, and this single label might be a private network tags if the PHP function has been opened in the last two jump on the forward-path of message place.Based on this, the label forwarding information-storing device of present embodiment stores label information to be stored under the first order label of private network tags when the PHP function has been opened in the last two jump, to guarantee that message is correctly transmitted.
In the present embodiment, the non-POP storage area of public network, private network storage area and public network POP storage area are adjacent successively in Label Forwarding Information Base, promptly be divided into the public network label that the non-POP storage area of public network, private network storage area and public network POP storage area are respectively applied for public network label, private network tags and the POP behavior correspondence of the non-POP behavior correspondence of storage successively by storage area with Label Forwarding Information Base, by type control label depositing in proper order in Label Forwarding Information Base, realized classification storage to label according to label.The Label Forwarding Information Base that forms according to the method for present embodiment is particularly useful for the message that carries two labels is transmitted.
In addition, label is classified when storage, also be included in the last two jump and do not support or support and existing POP behavior is expanded when not opening the PHP function that the POP behavior of being expanded is second behavior at present embodiment.When label information is private network tags, in order to reduce the number of times of searching to Label Forwarding Information Base, the behavior (i.e. first behavior) of private network tags correspondence is revised as second behavior, and this second behavior is that the stack top label in the message is ejected, and then carries out the operation of the original first behavior correspondence.For example: suppose that first behavior is PUSH, then second behavior is POP-PUSH, is about to carry out the PUSH operation again after the stack top label ejection in the message.Again for example: suppose that first behavior is SWAP, then second behavior is POP-PUSH, is about to carry out SWAP again after the stack top label ejection in the message.Again for example: suppose that first behavior is POP, then second behavior is POP-POP, is about to carry out POP again after the stack top label ejection in the message.
When E-Packeting based on above-mentioned Label Forwarding Information Base, if the message that receives carries two labels, if when the forwarding information of first label correspondence was non-POP behavior, a label in can mating in the non-POP storage area of public network only need once be searched and can finish message forwarding; When if the forwarding information of first label correspondence is the POP behavior, the final jump of local apparatus for forwarding message for this message is described, then in the non-POP storage area of public network, there is not the consistent label of coupling, continuation is at second label of private network storage area coupling, then under the correct situation of label distribution, necessarily can match a label, after according to the label in this coupling the first order label in the message being ejected, primitive behavior according to second label correspondence is transmitted processing to message, promptly finishes message forwarding by once searching.
The label forwarding information storage means of present embodiment, by in the non-POP storage area of public network, private network storage area and public network POP storage area, searching successively, when the PHP function is not opened in the last two jump, if private network storage area in the coupling, then according to second behavior of label correspondence in the coupling, earlier the ejection of the stack top label in the message can directly be forwarded message according to first behavior of the label correspondence in the coupling again, only need search Label Forwarding Information Base one time, reduce the number of times of searching Label Forwarding Information Base.
The label forwarding information storage means of present embodiment, be divided into the non-POP storage area of public network successively by memory space with Label Forwarding Information Base, private network storage area and public network POP storage area, according to the type of label public network label with non-POP behavior correspondence, the public network label of private network tags and POP behavior correspondence is stored in the non-POP storage area of public network respectively, private network storage area and public network POP storage area, when E-Packeting based on Label Forwarding Information Base, solved the problem that to search twice Label Forwarding Information Base when the message that carries two labels is transmitted in final jump when the PHP function is not opened in the last two jump, reduce the delay when message is transmitted, improved the efficient that E-Packets.
The flow chart of the label forwarding information storage means that Fig. 2 A provides for the embodiment of the invention two.Present embodiment realizes that based on embodiment one something in common repeats no more.Shown in Fig. 2 A, the method for present embodiment comprises:
Step 21, label forwarding information-storing device carry out initialization, and Label Forwarding Information Base on average is divided into the non-POP storage area of public network, private network storage area and public network POP storage area.
Concrete, the memory space that the label forwarding information-storing device is transmitted storage tags is divided into the non-POP storage area of public network, private network storage area and public network POP storage area.Because the label information in the Label Forwarding Information Base leaves among the TCAM usually, and forwarding information is stored on the ASIC usually, and when E-Packeting based on Label Forwarding Information Base, mainly be that label information is carried out search operation, promptly in TCAM, find the consistent label of label that carries with message, therefore, more specifically, the label forwarding information-storing device of present embodiment mainly is that TCAM is divided into the non-POP storage area of public network, private network storage area and public network POP storage area (shown in Fig. 2 B), with the order of depositing of control label information, and the forwarding information of label information correspondence will corresponding storing on the ASIC.
Wherein, except TCAM is evenly divided, also can TCAM be divided into the memory space that differs in size according to the quantity of dissimilar label informations.For example: if the defined private network tags quantity of local label forwarding information storage device is more, that then the private network storage area can be divided is bigger.Again for example: if the public network label of the defined non-POP behavior of local label forwarding information storage device is more, that then the non-POP storage area of public network can be divided is bigger.
In addition, it is not unique TCAM being divided into three class memory spaces.The dividing mode of present embodiment is mainly divided at receiving the message that carries two labels, and promptly TCAM only utilizes the two-stage in the multistage label to store in the present embodiment, and other other labels of level all are disabled, and promptly do not use.If the message that receives carries three labels, then TCAM will utilize three grades of labels in the multistage label to store, and TCAM is divided into four class memory spaces, be followed successively by the non-POP storage area of public network, be used to store the internal layer private network tags internal layer private network storage area, be used to store the outer private network storage area and the public network POP storage area of outer private network tags.Based on above-mentioned principle, TCAM can be divided into more a plurality of storage areas, be used to solve the message forwarding efficiency of carrying more a plurality of labels.
Wherein, label information is to store with the form of list item in each storage area of TCAM, the every corresponding multistage label of list item.In the present embodiment, be example with the corresponding two-stage label of every list item, be respectively first order label and second level label, if TCAM supports more multistage label, then other other labels of level are covered entirely.
Step 22, trigger label forwarding information stores process by mpls protocol or user's manual configuration.
Step 23, label forwarding information-storing device judge whether the label information in the label forwarding information to be stored is the public network label; If judged result is for being that then execution in step 24; Otherwise, execution in step 31.
Wherein, the label information that stores among the TCAM is distributed by local label forwarding information storage device, so the label information that the label forwarding information-storing device can the district office will be stored is public network label or private network tags.
Wherein, the public network label is meant in MPLS network (being public network), is responsible for transmitting in public network the label of MPLS message; And private network tags is mainly used in the processing operation in certain private network of sign, and private network tags can not change in the repeating process of MPLS network, also can not transmit MPLS simultaneously and produce any influence.
Step 24, label forwarding information-storing device judge whether the behavior in the forwarding information is the POP behavior in the label forwarding information to be stored; If judged result is that then execution in step 25, otherwise, execution in step 28.
Step 25, label forwarding information-storing device judge whether the non-POP storage area of public network exists the clear area; If judged result is not for, promptly there is not the clear area in the non-POP storage area of public network, and then execution in step 26, if judged result is for being that then execution in step 27.
Wherein, the clear area is meant the list item that can be used for stored tag information.
Step 26, label forwarding information-storing device are expanded the non-POP storage area of public network according to net storage area and public network POP storage area, and execution in step 27.
A kind of preferred implementation of step 26 comprises: step 261, label forwarding information-storing device judge whether the private network storage area exists the clear area; If judged result is that then execution in step 262; If judged result is for being that then execution in step 263.
Step 262, label forwarding information-storing device are expanded the non-POP storage area of public network according to public network POP storage area.
In the present embodiment, suppose that whole TCAM enough stores local label forwarding information storage device defined all public network label and private network tags, therefore, when the non-POP storage area of public network and private network storage area did not have the clear area, necessarily there was the clear area in public network POP storage area.
Be depicted as example with Fig. 2 B, present embodiment provides a kind of execution mode by the non-POP storage area of public network POP storage area expansion public network: if article one list item free time of public network POP storage area, then the information in article one list item of private network storage area is moved in article one list item (being the last item list item after the expansion of private network storage area) of original public network POP storage area, and article one list item of original private network storage area is expanded to a list item of the non-POP storage area of public network.If article one list item of public network POP storage area is busy, then the information in article one list item of public network POP storage area is moved in the idle list item in the public network POP storage area, then the information in article one list item of private network storage area is moved in article one list item (being the last item list item after the expansion of private network storage area) of original public network POP storage area, and article one list item of original private network storage area is expanded to a list item of the non-POP storage area of public network.After expansion, the list item in the non-POP storage area of public network increases by 1, and the list item in the public network POP storage area deducts 1.
Step 263, label forwarding information-storing device are expanded the non-POP storage area of public network according to the private network storage area.
Be depicted as example with Fig. 2 B, present embodiment provides a kind of execution mode by the non-POP storage area of private network storage area expansion public network: if article one list item free time of private network storage area, the list item that then directly this article one list item is expanded to the non-POP storage area of public network gets final product.If article one list item of private network storage area is busy, then the information in article one list item of private network storage area is moved in other idle list items of private network storage area, article one list item of original private network storage area is expanded to a list item of the non-POP storage area of public network.At this moment, the list item in the non-POP storage area of public network increases by 1, and the list item in the private network storage area reduces 1.
Wherein, the another kind of execution mode of step 26 also can be to judge whether public network POP storage area exists the clear area earlier; There is not the clear area in storage area if judged result is public network POP, then according to the private network storage area the non-POP storage area of public network is expanded; Otherwise, the non-POP storage area of public network is expanded according to public network POP storage area.Wherein, can be by the detailed process of private network storage area or the non-POP storage area of public network POP storage area expansion public network referring to the description in the above-mentioned preferred implementation.
Step 27, label forwarding information-storing device store label information under the first order label in the non-POP storage area of public network into, and with the behavior corresponding stored in Label Forwarding Information Base, and finish this storage operation.
Concrete, if go to step 27 by step 26, the then corresponding at this moment non-POP storage area of public network is the non-POP storage area of public network after the expansion, then label information is stored under the first order label of preferred implementation in the non-POP storage area of public network after the expansion, in the Label Forwarding Information Base of other simultaneously that behavior and behavior is required information corresponding stored to the ASIC for the list item that label information stored into expansion and come.
If go to step 27 by step 25, then corresponding not process expansion of the non-POP storage area of public network this moment then can directly be stored label information in the idle list item in the non-POP storage area of public network.
Wherein, aforesaid operations specifically is used for label information is stored into the non-POP storage area of public network of TCAM, and forwarding information is stored on the corresponding ASIC.
Step 28, label forwarding information-storing device judge whether public network POP storage area exists the clear area; If judged result is that promptly there is not the clear area in public network POP storage area, then execution in step 29; If judged result is for being that then execution in step 30.
Step 29, label forwarding information-storing device are expanded public network POP storage area according to private network storage area and the non-POP storage area of public network, and execution in step 30.
A kind of preferred implementation of step 29 comprises: step 291, label forwarding information-storing device judge whether the private network storage area exists the clear area; If judged result is that then execution in step 292; If judged result is for being that then execution in step 293.
Step 292, label forwarding information-storing device are expanded public network POP storage area according to the non-POP storage area of public network.
When all there are not the clear area in public network POP storage area and private network storage area, necessarily there is the clear area in the non-POP storage area of public network.
Be depicted as example with Fig. 2 B, present embodiment provides a kind of execution mode according to the non-POP storage area expansion of public network public network POP storage area: if the non-POP storage area of the public network the last item list item free time adjacent with the private network storage area, then the information in the last item list item in the private network storage area is moved to the last item list item of the non-POP storage area of original public network, the last item list item in the original private network storage area is expanded to the list item of public network POP storage area.If the last item list item of the non-POP storage area of public network is busy, then the information in this last item list item is moved in other idle list items of the non-POP storage area of public network, then the information in the last item list item in the private network storage area is moved to the last item list item of the non-POP storage area of original public network, the last item list item in the original private network storage area is expanded to the list item of public network POP storage area.After expansion, the list item of the non-POP storage area of public network reduces 1, and the list item of public network POP storage area increases by 1.
Step 293, label forwarding information-storing device are expanded public network POP storage area according to the private network storage area.
With Fig. 2 B is example, present embodiment provides a kind of execution mode according to private network storage area expansion public network POP storage area: if the last item list item free time of private network storage area then directly this last item list item is expanded to the list item of public network POP storage area.If the last item list item of private network storage area is busy, the information in this last item list item is moved in other idle list items of private network storage area, this last item list item is expanded to the list item of public network POP storage area.After expansion, the list item of public network POP storage area increases by 1, and the list item of private network storage area reduces 1.
Wherein, the another kind of execution mode of step 29 also can be to judge whether the non-POP storage area of public network exists the clear area earlier; There is not the clear area in non-POP storage area if judged result is a public network, then according to the private network storage area public network POP storage area is expanded; Otherwise, public network POP storage area is expanded according to the non-POP storage area of public network.Wherein, can be by the detailed process of private network storage area or the non-POP storage area expansion of public network public network POP storage area referring to the description in the above-mentioned preferred implementation.
Step 30, label forwarding information stores dress stores label information under the first order label in the public network POP storage area into, and with the behavior corresponding stored in Label Forwarding Information Base, and finish this storage operation.
Concrete, if go to step 30 by step 29, then corresponding at this moment public network POP storage area is the public network POP storage area after the expansion, then label information is stored under the first order label of preferred implementation in the public network POP storage area after the expansion, in the Label Forwarding Information Base of other simultaneously that behavior and behavior is required information corresponding stored to the ASIC for the list item that label information stored into expansion and come.
If go to step 30 by step 28, then corresponding not process expansion of public network POP storage area this moment then can directly be stored label information in the idle list item in the public network POP storage area.
Wherein, aforesaid operations specifically is used for label information is stored into the non-POP storage area of public network of TCAM, and forwarding information is stored on the corresponding ASIC.
Step 31, label forwarding information-storing device judge the PHP function is supported and opened to a jumping whether on it; If judged result is that then execution in step 32; If judged result is for being that then execution in step 35.
In the message repeating process, the label forwarding information-storing device of present embodiment also is message place label switched path (Label Switching Path; Abbreviate as: one LSP) jumped, and is responsible for E-Packeting.It also is the jumping on the LSP of message place in the message repeating process that last one of label forwarding information-storing device is jumped, and also is responsible for E-Packeting.In the present embodiment, last one jump the last two jump that is meant on the LSP of message place.Wherein, the PHP function is not supported in the last two jump, and perhaps the last two jump is supported the PHP function but do not opened the PHP function, all is judged as not.And when having only the last two jump support and having opened the PHP function, judged result is just for being.
The label forwarding information-storing device is according to tag distribution protocol (Label Distribute Protocol; Abbreviate as: LDP) carry out label distribution, can know in this process the PHP function is supported and opened to the last two jump whether.Concrete, to use implicit label value when mutual be that the PHP function is opened in label announcement the last two jump of 3 carrying out LDP, is 3 if the label of SWAP is judged in i.e. the last two jump, will conversion behavior be the PHP behavior then, promptly opens the PHP function; Otherwise then do not open the PHP function.
Step 32, label forwarding information-storing device judge whether the private network storage area exists the clear area; If judged result is not for, promptly there is not the clear area in the private network storage area, and then execution in step 33, if judged result is for being that then execution in step 34.
Step 33, label forwarding information-storing device are expanded the private network storage area according to public network POP storage area and the non-POP storage area of public network, and execution in step 34.
A kind of preferred implementation of step 33 comprises: step 331, label forwarding information-storing device judge whether public network POP storage area exists the clear area; If judged result is not for, then execution in step 332, if judged result is for being that then execution in step 333.
Step 332, label forwarding information-storing device are expanded the private network storage area according to the non-POP storage area of public network.
When all there are not the clear area in public network POP storage area and private network storage area, necessarily there is the clear area in the non-POP storage area of public network.
Be depicted as example with Fig. 2 B, present embodiment provides a kind of execution mode according to the non-POP storage area expansion of public network private network storage area: if the non-POP storage area of the public network the last item list item free time adjacent with the private network storage area, the then direct list item that the last item list item of the non-POP storage area of public network is expanded to the private network storage area.If the last item list item of the non-POP storage area of public network is busy, then the information in this last item list item is moved in other idle list items of the non-POP storage area of public network, then the last item list item in the non-POP storage area of public network is expanded to the list item of private network storage area.After expansion, the list item of the non-POP storage area of public network reduces 1, and the list item of private network storage area increases by 1.
Step 333, label forwarding information-storing device are expanded the private network storage area according to public network POP storage area, and execution in step 40.
In like manner, when all there are not the clear area in private network storage area and the non-POP storage area of public network, necessarily there is the clear area in the public network POP storage area.
Be depicted as example with Fig. 2 B, present embodiment provides a kind of execution mode by public network POP storage area expansion private network storage area: if article one list item free time of public network POP storage area, a then direct list item that article one list item of public network POP storage area is expanded to the private network storage area.If article one list item of public network POP storage area is busy, then the information in article one list item of public network POP storage area is moved in the idle list item in the public network POP storage area, then article one list item of original public network POP storage area is expanded to a list item of private network storage area.After expansion, the list item in the public network POP storage area reduces 1, and the list item in the private network storage area increases by 1.
Wherein, the another kind of execution mode of step 33 also can be to judge whether the non-POP storage area of public network exists the clear area earlier; There is not the clear area in non-POP storage area if judged result is a public network, then according to public network POP storage area the private network storage area is expanded; Otherwise, the private network storage area is expanded according to public network POP storage area.Wherein, can be by the detailed process of public network POP storage area or the non-POP storage area expansion of public network private network storage area referring to the description in the above-mentioned preferred implementation.
Step 34, label forwarding information-storing device store label information under the second level label in the private network storage area into, and the behavior of revising the label information correspondence be behind the POP after carrying out former behavior corresponding stored in Label Forwarding Information Base, finish this label forwarding information stores operation.
Concrete, if go to step 34 by step 33, then this moment, corresponding private network storage area was a private network storage area after the expansion, then label information was stored under the second level label of preferred implementation for the list item that label information stored into expansion and come in the private network storage area after the expansion.At this moment, when E-Packeting based on the private network storage area, first label in the message will be covered, and directly according to second label lookup, therefore, the behavior that second label in the present embodiment corresponding modify message (promptly storing the label information under the second level label in the private network storage area into) is corresponding is carried out former behavior again for carrying out POP earlier, first label in the message is ejected, transmit this message according to the behavior of second label correspondence then, reduced the number of times of searching Label Forwarding Information Base when transmitting the message that carries two labels, reduce the forwarding time delay, can improve message forwarding efficient.
Wherein, after former behavior be revised as first POP carry out former behavior again, in amended behavior and required other information corresponding stored Label Forwarding Information Base to the ASIC.
If go to step 34 by step 32, then corresponding not process expansion of private network storage area this moment then can directly be stored label information in the idle list item in the private network storage area.
Wherein, aforesaid operations specifically is used for label information is stored into the private network storage area of TCAM, and forwarding information is stored on the corresponding ASIC.
Step 35, label forwarding information-storing device store label information under the first order label in the private network storage area into, and with the behavior corresponding stored in Label Forwarding Information Base, finish this label forwarding information stores operation.
For the MPLS message that carries two labels, if the PHP function has been opened in the last two jump, owing to ejected at the stack top label of the last two jump with the MPLS message, so just only surplus next label (stack top label just) in the MPLS message when arriving final jump, therefore, only be concerned about the stack top label, so, need in this case private network tags is stored under the first order label, to guarantee that message can be successfully processed.
In this step 35, if the private network storage area does not have the clear area, then need expand the private network storage area according to public network POP storage area or the non-POP storage area of public network equally, preferably label information to be stored be stored under the first order label of the next idle list item of expansion then.Wherein, the step that the private network storage area is expanded can not repeat them here referring to step 33.
In this explanation, the mode of in the above steps storage area being expanded only for a kind of preferred implementation, is not limited to this.The various non-POP storage area of public network, private network storage area and public network POP storage areas after guaranteeing to expand still all are applicable to present embodiment for the execution mode in adjacent extension storage zone successively, in the execution mode in various extension storage zone, the expansion effect of the execution mode that the quantity of mobile list item is few more is good more.
Present embodiment has improved the service efficiency of TCAM guaranteeing by each storage area is expanded, each storage area to be used flexibly on the non-POP storage area of public network, the private network storage area basis still adjacent successively with public network POP storage area.
The label forwarding information storage means of present embodiment, when the PHP function is not opened in the last two jump, leave in the public network label of public network label, private network tags and the POP behavior correspondence of non-POP behavior correspondence in the Label Forwarding Information Base successively, make and when receiving the MPLS message, search according to said sequence, if the MPLS message just carries out the SWAP and the PUSH of public network, then only be concerned about the stack top label, can guarantee that the MPLS message obtains handling at the non-POP storage area of public network; If the MPLS message need carry out searching Label Forwarding Information Base again behind the POP when transmitting (suppose the last two jump do not open PHP), private network storage area at present embodiment can guarantee once to search in the coupling, the MPLS message is correctly handled, this shows, present embodiment can make the MPLS message that carries two labels preferentially obtain handling in two zones in front, can reduce the number of times of searching Label Forwarding Information Base.
Wherein, because label has local significance, that is to say that the MPLS message may carry a plurality of identical labels.For example: the stack top label is second entrained label of MPLS message of SWAP or PUSH operation owing to be not local the distribution, thus may be identical with stack top label SWAP or the PUSH that this locality is distributed, and this allows in mpls protocol.For this reason, present embodiment leaves the private network tags front in by the public network label with non-POP behavior correspondence, can avoid occurring carrying out second label in the MPLS message of the SWAP of public network and PUSH operation just mate in the situation of private network tags, improve the success rate that E-Packets.
The flow chart of the message forwarding method that Fig. 3 A provides for the embodiment of the invention three.As shown in Figure 3A, the method for present embodiment comprises:
The PHP function is supported and opened to the last two jump on the message place LSP that step 51, judgement receive whether; If judged result is not for, i.e. the last two jump is not supported or is supported and do not open PHP function, execution in step 52; If judged result is for being execution in step 55.
Wherein, the message forwarding method of present embodiment is realized based on the Label Forwarding Information Base that the foregoing description one or two provides, in the present embodiment promptly, Label Forwarding Information Base is divided into three storage areas successively, be respectively: the non-POP storage area of public network, private network storage area and public network POP storage area, and be applicable to the MPLS message that carries one or two label is transmitted.Wherein, the non-POP storage area of public network stores other public network labels except that the public network label of POP behavior correspondence, and under the first order label of each tag storage each list item in this storage area.Private network storage area storage private network tags.The public network tag storage of POP behavior correspondence and is stored under the first order label of each list item in this storage area in the public network POP of Label Forwarding Information Base storage area.
In the foregoing description one or two, whether the label forwarding information-storing device is specifically supported and opens the PHP function according to the last two jump on the LSP of message place to generate different Label Forwarding Information Base.If the last two jump support on the LSP of message place has also been opened the PHP function, then in the Label Forwarding Information Base in the private network storage area each tag storage under the first order label of each list item correspondence; When not opening the PHP function if the last two jump on the LSP of message place is not supported or supported, in the private network storage area under the second level label of each tag storage each list item in this storage area, and to need the corresponding pairing former behavior of each label be to carry out former behavior again behind the POP.
Based on above-mentioned, apparatus for forwarding message can know in advance the PHP function is supported and opened to the last two jump of message place LSP whether.In addition, apparatus for forwarding message also can know the PHP function is supported and opened to the last two jump of message place LSP whether according to the file layout of Label Forwarding Information Base.
When judged result is that the last two jump is not supported or supported and do not open PHP function, then execution in step 52-step 54; Otherwise, execution in step 55-step 58.
Step 52, obtain first label in the message that receives, and search the non-POP storage area of public network in the Label Forwarding Information Base to judge whether first label exists in the non-POP storage area of public network.If judged result is that execution in step 53 is if judged result is for being not execution in step 54.
Concrete, when apparatus for forwarding message receives a MPLS message, at first can resolve the MPLS message according to the agreement regulation, the MPLS encapsulation fields of resolving in the MPLS message is obtained the number of label and the occurrence of each label information.
Shown in Fig. 3 B, a MPLS message is mainly by Ethernet encapsulation fields, MPLS encapsulation fields and protocol Data Unit (Protocol Data Unit; Abbreviate as: PDU) field three parts constitute.The Ethernet encapsulation fields comprises information such as destination address, source address, ethernet type; The MPLS encapsulation fields comprises the information of packaged label, if the MPLS message comprises a plurality of labels, then a plurality of labels will be deposited and use in the MPLS encapsulation fields in the mode of storehouse; The PDU field is mainly user's data, can be that the IP message also can be another MPLS message.Wherein, each label comprises: label value, and length is 20bit, is to carry out the foundation of label forwarding when searching; Extended field (Exp): length is 3bit, is used to carry service quality (Quality of Service; Abbreviate as: QoS) attribute; Stack bottom marker S, length is lbit, if when a plurality of label is arranged, is in the stack bottom marker S position set of the label at the bottom of the stack, the stack bottom marker S of other label is " 0 ", this stack bottom marker S position set when having only a label.
Concrete, apparatus for forwarding message can be resolved the stack bottom marker S in the MPLS encapsulation fields of MPLS message by its ASIC, can obtain the label number that the MPLS message carries.
In the present embodiment, carrying two labels at most with the message that receives is that example describes.When then not opening the PHP function not supporting or support in the last two jump, at first judge whether the non-POP behavior of needs execution public network according to first label in the message, if then execution in step 54, promptly message is handled the back and transmit according to the non-POP behavior of public network; Otherwise, execution in step 53.
Step 53, obtain second label in the message, and according to the private network storage area in second label lookup Label Forwarding Information Base to obtain the forwarding information of second label correspondence, according to behind first label in the forwarding information ejection message message being transmitted, finish this message and transmit operation.
Wherein,, illustrate that the behavior of first label correspondence is the POP behavior, illustrate that the apparatus for forwarding message of present embodiment is the final jump on the LSP of this message place if first label does not match consistent label at the non-POP storage area of public network; Because the PHP function is not opened in the last two jump on the LSP of this message place, illustrate that then this message need elder generation's execution POP operation eject first label afterwards according to second label execution forwarding operation again.In the present embodiment, apparatus for forwarding message directly obtains second label in the MPLS message, and search under the second level label of each list item in the private network storage area, obtain the forwarding information of second label correspondence, promptly in the private network storage area with second corresponding forwarding information of label that tag match is consistent, and message is transmitted based on this forwarding information.Wherein, the behavior of the label correspondence in the private network storage area is to obtain after being made amendment by the original behavior of each label, carries out former behavior again after specifically former behavior being revised as the stack top label that ejects earlier message.Therefore, in the present embodiment, when finding the forwarding information of second label correspondence, directly the stack top label with message ejects, again message being handled the back transmits, make message in the private network storage area, preferentially obtain processing, do not need to search Label Forwarding Information Base once more, reduced the number of times of searching Label Forwarding Information Base.
In this explanation, if label distribution is correct, when message carries two labels and first label and is the POP operation, and when the PHP function was not opened in the last two jump, its second label necessarily was present in the private network storage area.
Step 54, transmit this message, finish this message and transmit operation according to the forwarding information of first label correspondence.
If there is the non-POP storage area of public network in first label, the apparatus for forwarding message that present embodiment is described not is the final jump on the LSP of this message place, illustrate that also this message need carry out the non-POP operation of public network, it for example may be SWAP or PUSH operation, then apparatus for forwarding message is directly handled the back forwarding according to the forwarding information of first label correspondence to message, make message obtain priority treatment, guarantee that only searching a Label Forwarding Information Base just finishes message forwarding at the non-POP storage area of public network.For example:, then the stack top label exchange back of MPLS message is transmitted by the corresponding port if the behavior of first label correspondence is SWAP.
Step 55, obtain first label of message, and search the non-POP storage area of public network to judge whether first label exists in the non-POP storage area of public network; If judged result is that then execution in step 56; If judged result is for being that then execution in step 58.
Wherein, for a message, the apparatus for forwarding message of present embodiment or be final jump on the LSP of message place, or be not the final jump on the LSP of message place.The precondition of the operating process of describing in present embodiment step 55-step 58 is: the last two jump support on the LSP of message place has also been opened the PHP function, therefore, if the apparatus for forwarding message of present embodiment is not the final jump on the LSP of message place, then only need to be concerned about that the stack top label gets final product; If the apparatus for forwarding message of present embodiment is the final jump on the LSP of message place, then one to jump be that stack top label original in the message is ejected in the last two jump meeting on it, thereby make the apparatus for forwarding message of present embodiment also only need to be concerned about the stack top label of message.
Based on above-mentioned, apparatus for forwarding message obtains first label (being the stack top label of current message) of message, order according to each storage area in the Label Forwarding Information Base, at first search in the first order label with first label each list item in the non-POP storage area of public network, judge that whether first label is corresponding to the non-POP behavior of public network.
Step 56, according to first label lookup private network storage area to judge whether first label exists in the private network storage area; If judged result is that then execution in step 57; If judged result is for being that then execution in step 58.
If in step 55, in the non-POP storage area of public network, do not find the label consistent with first label, then continue to search the first order label of each list item in the private network storage area, judge whether first label is private network tags.
Step 57, according to first label lookup public network POP storage area obtaining the forwarding information of first label correspondence, and E-Packet after ejecting first label according to forwarding information, finish this message and transmit operation.
If do not find the label consistent with first label in the private network storage area in step 56, under the correct situation of label distribution, first label necessarily is present in the public network POP storage area, corresponding to public network POP behavior.In this step 57, obtain the POP behavior of first label correspondence, search IP route table after first label in the message is ejected, this message is forwarded according to IP route table.
Step 58, E-Packet, finish this message and transmit operation according to the forwarding information of first label correspondence.
If in step 56, in the private network storage area, found the label consistent, then obtain the forwarding information of first label correspondence, and forward after according to forwarding information message being handled with first label; For example may be to transmit after label with message is exchanged for new label, also may be to transmit be pressed into new label in message after.
If in step 55, in the non-POP storage area of public network, found the label consistent with first label, then obtain the non-POP behavior of public network of first label correspondence, after being handled, message forwards.If the non-POP behavior of the public network that obtains is SWAP operation, message is forwarded after then the label of message being exchanged for new label; If the non-POP behavior of the public network that obtains is PUSH operation, message is forwarded after then in message, being pressed into new label.
The message forwarding method of present embodiment is transmitted the MPLS message based on the public network label Label Forwarding Information Base of the public network label of storing non-POP behavior correspondence successively, private network tags and POP behavior correspondence.The last two jump on the LSP of message place is not supported or is supported and when not opening the PHP function, behavior based on the private network tags correspondence of the Label Forwarding Information Base of classification storage and the process corresponding modify of being stored, the message that carries two labels is transmitted, can make message preferentially obtain handling at non-POP storage area of public network and private network storage area, reduced the number of times of searching Label Forwarding Information Base, reduce the time delay that message is transmitted, improved message forwarding efficient; When the PHP function is opened in the last two jump on the LSP of message place, can guarantee that message can correctly be transmitted based on the non-POP storage area of public network, private network storage area and public network POP storage area.
In this explanation, the label forwarding information storage means that the foregoing description provides combine with message forwarding method, and following examples will further be elaborated by the combination of actual example to storage means and retransmission method.
Present embodiment is with Virtual Private Network (Virtual Private Network; Abbreviate as: VPN) be applied as example explanation the most substantially, and be example with any network equipment in the present embodiment.Suppose to be assigned on this network equipment private network tags: 100 (POP), 200 (POP), 300 (SWAP 500), 400 (POP).These private network tags are invisible in global network, are used to indicate the private network network, realize the business function of VPN.Simultaneously, final jump also is assigned the public network label: 30 (SWAP 70), 40 (PUSH80), 50 (POP), 60 (POP).These public network labels are used for finishing message to be transmitted at publicly-owned net, irrelevant with the business function of VPN.
Wherein, the storage mode of Label Forwarding Information Base is as shown in table 1 in the prior art.Do not open in the last two jump under the situation of PHP function, it is as shown in table 2 to store the Label Forwarding Information Base that obtains according to the embodiment of the invention one or the two pairs of label informations.
Table 2
Do not have under the wrong situation in label distribution, the situation of carrying out the message forwarding based on the above-mentioned table 2 present embodiment network equipment comprises following several:
If the stack top label Label1 of the MPLS message that receives is 30, then search for the first time, at first search the non-POP storage area of public network, obtain the forwarding information of public network label 30 correspondences, then stack top label Lable1 is exchanged for 70, transmit.
If the stack top label Label1 of the MPLS message that receives is 40, then search for the first time, at first search the non-POP storage area of public network, obtain the forwarding information of public network label 40 correspondences, then will be pressed into label 80, transmit.
If the stack top label of the MPLS message that receives is 50, second layer label is 300, illustrate that this moment, the network equipment was final jump on the LSP of this message place, again because the PHP function is not opened in hypothesis the last two jump, then search for the first time, at first search the non-POP storage area of public network, do not find label 50, continuation is according to the second layer label lookup private network storage area in the message, second layer label 300 in mating this moment, then obtain the forwarding information of private network tags 300 correspondences, the stack top label 50 of MPLS message is ejected, transmit after then label 300 being exchanged for label 500.
Open in the last two jump under the situation of PHP function, it is as shown in table 3 to store the Label Forwarding Information Base that obtains according to the embodiment of the invention one or the two pairs of label informations.
Table 3
Do not have when the message that receives being transmitted, will only be concerned about the stack top label under the wrong situation that situation about then E-Packeting comprises following several based on the above-mentioned table 3 present embodiment network equipment in label distribution:
If the stack top label Label1 of the MPLS message that receives is 30, then search for the first time, at first search the non-POP storage area of public network, obtain the forwarding information of public network label 30 correspondences, then stack top label Lable1 is exchanged for 70, transmit.
If the stack top label of the MPLS message that receives is 300, then search for the first time, at first search the non-POP storage area of public network, do not find label 300, continue to search the private network storage area, obtain the forwarding information of private network tags 300 correspondences, transmit after label 300 is exchanged for label 500.
If the stack top label Label1 of the MPLS message that receives is 50, then search for the first time, at first search the non-POP storage area of public network, do not find label 50, continue in the private network storage area, to search, do not find label 50, then continue to search public network POP storage area, find public network label 50, obtain the forwarding information of public network label 50 correspondences, search IP route table after stack top label 50 ejections with the MPLS message message is forwarded.
By as seen above-mentioned, do not support or do not open and transmit under the condition of PHP function when carrying the message of two labels in the last two jump, present embodiment makes that by private network storage area and amended forwarding information searching a Label Forwarding Information Base can finish the message forwarding operation, reduce the number of times of searching Label Forwarding Information Base, improved message forwarding efficient.Open in the last two jump under the condition of PHP function, the Label Forwarding Information Base of the classification storage tags of present embodiment also can correctly E-Packet.
The structural representation of the message forwarding information storage device that Fig. 4 provides for the embodiment of the invention four.The storage device of present embodiment can be any network equipment in the MPLS network.As shown in Figure 4, the storage device of present embodiment comprises: first judge module 61, first memory module 62, second memory module 63, second judge module 64 and the 3rd memory module 65.
First judge module 61 is used for when label information to be stored is the public network label, judges whether first behavior to be stored of label information correspondence is the POP behavior; First memory module 62 is used in the judged result of first judge module 61 for not the time, under the first order label of label forwarding information stores in the non-POP storage area of the public network of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base; Second memory module 63 is used in the judged result of first judge module 61 when being, label information is stored under the first order label in the public network POP storage area of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base; Second judge module 64 is used for when label information to be stored is private network tags, judges last one of label forwarding information-storing device jumps whether support and opened the PHP function; The 3rd memory module 65, be used for judged result at second judge module 64 and be the label forwarding information-storing device on one jump and do not support or support and when not opening the PHP function, label information is stored under the second level label in the private network storage area of Label Forwarding Information Base, and first behavior of revising is that corresponding stored is carried out first behavior after will the stack top label in the message when second behavior is identified at and E-Packets according to label information ejecting again after second behavior in Label Forwarding Information Base.
Wherein, the device of present embodiment can also comprise tag types judge module 66, is used to judge whether label information to be stored is the public network label, and judged result is sent to first judge module 61 and second judge module 64.Wherein, because label information is distributed by local label forwarding information storage device, therefore, it is private network tags or public network label that tag types judge module 66 can be judged label to be stored.
In the present embodiment, the non-POP storage area of public network, private network storage area and public network POP storage area are adjacent successively in Label Forwarding Information Base.
Each functional module of present embodiment label forwarding information-storing device can be used for carrying out the flow process of the label forwarding information storage means that said method embodiment one and two provides, and its concrete operation principle repeats no more, and sees the description of method embodiment for details.
The label forwarding information-storing device of present embodiment, be divided into the non-POP storage area of public network successively by memory space with Label Forwarding Information Base, private network storage area and public network POP storage area, according to the type of label public network label with non-POP behavior correspondence, the public network label of private network tags and POP behavior correspondence is stored in the non-POP storage area of public network respectively, private network storage area and public network POP storage area, do not support or support and do not open under the condition of PHP function in the last two jump, the forwarding information of further revising each label correspondence in the private network storage area is to transmit behind the POP again, make when E-Packeting based on Label Forwarding Information Base, solved the last two jump on the LSP of message place do not support or support and when not opening the PHP function message place LSP go up the problem that need search twice Label Forwarding Information Base when the message that carries two labels is transmitted in final jump, reduce the delay when message is transmitted, improved the efficient that E-Packets.
The structural representation of the label forwarding information-storing device that Fig. 5 provides for the embodiment of the invention five.Present embodiment realizes that based on embodiment four as shown in Figure 5, the storage device of present embodiment also comprises: divide module 71.
Divide module 71, be used for before the label forwarding information-storing device is carried out the operation of stored tag information, Label Forwarding Information Base on average being divided into the non-POP storage area of public network, private network storage area and public network POP storage area.Wherein, divide module 71 and be not limited to average division, also can carry out adaptability and divide according to the quantity of defined public network label of local label forwarding information storage device and private network tags.For example: if the quantity of private network tags is more, that then the private network storage area can be divided is bigger.
Because the label information in the Label Forwarding Information Base is stored on the TCAM usually, therefore, the division module 71 of present embodiment is mainly used in TCAM is divided into different storage areas.
Further, the label forwarding information-storing device of present embodiment also comprises: the 4th memory module 72, be used for judged result at second judge module 64 and be the label forwarding information-storing device on one jump and support and when having opened the PHP function, label information is stored under the first order label in the private network storage area of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base.The operating principle of the 4th memory module 72 can not repeat them here referring to the description of step 35 among the embodiment two.
Further, first memory module 62 comprises in the present embodiment: first judging unit 621, the first extension storage unit 623 and first memory cell 625.
Concrete, first judging unit 621 is used in the judged result of first judge module 61 judging whether the non-POP storage area of public network exists the clear area for not the time; The first extension storage unit 623, be used in the judged result of first judging unit 621 for not the time, according to private network storage area and public network POP storage area the non-POP storage area of public network is expanded, and label information is stored under the first order label in the non-POP storage area of public network after the expansion of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base; First memory cell 625 is used in the judged result of first judging unit 621 when being, directly label information is stored under the first order label in the non-POP storage area of public network of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base.The concrete mode that the first extension storage unit non-POP storage area of 623 pairs of public networks is expanded can be referring to the step 26 among the method embodiment two.
Further again, second memory module 63 comprises in the present embodiment: second judging unit 631, the second extension storage unit 633 and second memory cell 635.
Concrete, second judging unit 631 is used in the judged result of first judge module 61 judging whether public network POP storage area exists the clear area when being; The second extension storage unit 633, be used in the judged result of second judging unit 631 for not the time, according to private network storage area and the non-POP storage area of public network public network POP storage area is expanded, label information is stored under the first order label in the public network POP storage area after the expansion of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base; Second memory cell 635 is used in the judged result of second judging unit 631 when being, directly label information is stored under the first order label in the public network POP storage area of Label Forwarding Information Base, and with the first behavior corresponding stored in Label Forwarding Information Base.The concrete mode that the second extension storage unit, 633 couples of public network POP storage area is expanded can be referring to the step 29 among the method embodiment two.
Further, the 3rd memory module 65 comprises in the present embodiment: the 3rd judging unit 651, the 3rd extension storage unit 653 and the 3rd memory cell 655.
Concrete, the 3rd judging unit 651, be used for judged result at second judge module 64 and be local label forwarding information storage device on one jump and do not support or support and when not opening the PHP function, judge whether the private network storage area exists the clear area; The 3rd extension storage unit 653, be used in the judged result of the 3rd judging unit 651 for not the time, according to public network POP storage area and the non-POP storage area of public network the private network storage area is expanded, label information is stored under the second level label in the private network storage area after the expansion of Label Forwarding Information Base, and first behavior of revising be after second behavior corresponding stored in Label Forwarding Information Base; The 3rd memory cell 655, be used in the judged result of the 3rd judging unit 651 when being, directly label information is stored under the second level label in the private network storage area of Label Forwarding Information Base, and first behavior of revising be after second behavior corresponding stored in Label Forwarding Information Base.The concrete mode that the 653 pairs of private network storage areas in the 3rd extension storage unit are expanded can be referring to the step 33 among the method embodiment two.
Wherein, a kind of implementation structure of the 4th memory module 72 of present embodiment can be referring to the implementation structure of the 3rd memory module 65, and is not shown in the present embodiment.In addition, the 4th memory module 72 and the 3rd memory module 65 also can be realized by same module.
The label forwarding information-storing device of present embodiment is expanded each storage area by above-mentioned each functional unit, and each storage area is used flexibly, has improved the service efficiency of TCAM.
Wherein, the mode that above-mentioned each functional unit is expanded each storage area only is a kind of optimal way, and all the non-POP storage area of public network, private network storage area and public network POP storage areas that satisfy after the expansion still all are applicable to present embodiment for adjacent successively extended mode.In various extended modes, few more this extended mode of list item quantity that moves is easy to implement more, and expansion efficiency is higher.
The structural representation of the apparatus for forwarding message that Fig. 6 provides for the embodiment of the invention six.The apparatus for forwarding message of present embodiment is any network equipment in the MPLS network.As shown in Figure 6, the retransmission unit of present embodiment comprises: first searches judge module 81, first forwarding module 82 and second forwarding module 83.
First searches judge module 81, being used for the last two jump on the message place LSP that receives does not support or supports and when not opening the PHP function, obtain first label in the message, and search the non-POP storage area of public network in the Label Forwarding Information Base to judge whether first label exists in the non-POP storage area of public network, the non-POP storage area of described public network stores other public network labels except that the public network label of POP behavior correspondence, and the public network tag storage of POP behavior correspondence is in the public network POP of Label Forwarding Information Base storage area; First forwarding module 82, be used in first judged result of searching judge module 81 for not the time, obtain second label in the message, and according to the private network storage area in second label lookup Label Forwarding Information Base to obtain the forwarding information of second label correspondence, according to behind first label in the forwarding information ejection message message being transmitted, store all private network tags in the described private network storage area; Second forwarding module 83 is used in first judged result of searching judge module 81 when being, E-Packets according to the forwarding information of first label correspondence.
In the present embodiment, the non-POP storage area of public network, private network storage area and public network POP storage area are adjacent successively in Label Forwarding Information Base.
The Label Forwarding Information Base that the label forwarding information-storing device that the present embodiment apparatus for forwarding message provides based on the foregoing description is generated is transmitted the message that carries two labels, its concrete operation principle sees the flow process of the message forwarding method that said method embodiment three provides for details, does not repeat them here.
The apparatus for forwarding message of present embodiment, based on the public network label of storing non-POP behavior correspondence successively, the such looked-up sequence of public network label of private network tags and POP behavior correspondence is transmitted message, the last two jump on the LSP of message place is not supported or is supported and when not opening the PHP function, the apparatus for forwarding message of present embodiment can be based on the behavior of the private network tags correspondence of the Label Forwarding Information Base of classification storage and the process corresponding modify of being stored, the message that carries two labels is transmitted, can make message preferentially obtain handling at non-POP storage area of public network and private network storage area, reduced the number of times of searching Label Forwarding Information Base, reduce the time delay that message is transmitted, improved message forwarding efficient; When the PHP function is opened in the last two jump on the LSP of message place, can guarantee that message can correctly be transmitted based on the non-POP storage area of public network, private network storage area and public network POP storage area.
The structural representation of the apparatus for forwarding message that Fig. 7 provides for the embodiment of the invention seven.Present embodiment realizes that based on embodiment six as shown in Figure 7, the retransmission unit of present embodiment also comprises: second searches judge module the 91, the 3rd searches judge module 92, the 3rd forwarding module 93, the 4th forwarding module 94 and the 5th forwarding module 95.
Concrete, second searches judge module 91, when being used for the last two jump support on the LSP of message place and having opened the PHP function, obtain first label of message, and search the non-POP storage area of public network to judge whether first label exists in the non-POP storage area of public network; The 3rd searches judge module 92, be used in second judged result of searching judge module 91 for not the time, according to first label lookup private network storage area to judge whether first label exists in the private network storage area; The 3rd forwarding module 93, be used in the 3rd judged result of searching judge module 92 for not the time,, and E-Packet after ejecting first label according to forwarding information obtaining the forwarding information of first label correspondence according to first label lookup public network POP storage area; The 4th forwarding module 94 is used in the 3rd judged result of searching judge module 92 when being, E-Packets according to the forwarding information of first label correspondence; The 5th forwarding module 95 is used in second judged result of searching judge module 91 when being, E-Packets according to the forwarding information of first label correspondence.
Further, the apparatus for forwarding message of present embodiment can also comprise the 3rd judge module 96, be used to judge the PHP function is supported and opened to the last two jump on the LSP of message place whether, and judged result is offered first search judge module 81 and second and search judge module 91.Wherein, the LSP information that the 3rd judge module 96 specifically can be stored in advance judges the PHP function is supported and opened to the last two jump on the LSP of message place whether, also can judge the PHP function is supported and opened to the last two jump on the LSP of message place whether according to the file layout of Label Forwarding Information Base.
The Label Forwarding Information Base that the label forwarding information-storing device that the present embodiment apparatus for forwarding message provides based on the foregoing description is generated is transmitted the message that carries single label, its concrete operation principle sees the flow process of the message forwarding method that said method embodiment three provides for details, does not repeat them here.
The apparatus for forwarding message of present embodiment is transmitted message based on the such looked-up sequence of public network label of the public network label of storing non-POP behavior correspondence successively, private network tags and POP behavior correspondence.Do not support or do not open and transmit under the condition of PHP function when carrying the message of two labels in the last two jump, the apparatus for forwarding message of present embodiment can make that searching a Label Forwarding Information Base can finish the message forwarding operation by private network storage area and amended forwarding information, reduce the number of times of searching Label Forwarding Information Base, improved message forwarding efficient.Open in the last two jump under the condition of PHP function, the present embodiment apparatus for forwarding message also can successfully forward message according to the Label Forwarding Information Base of classification storage tags.
In this explanation, the apparatus for forwarding message that the label forwarding information-storing device that the foregoing description four and five provides and the foregoing description six or seven provide can be the consolidated network equipment in the MPLS network.The PHP function is supported and opened to this network equipment whether at first according to the last two jump on the LSP of message place, generation is according to the public network label of non-POP behavior correspondence, the public network label order of private network tags and POP behavior correspondence and the Label Forwarding Information Base of classification storage, then, when receiving message, transmit based on the Label Forwarding Information Base that is generated, the last two jump that has solved on the LSP of message place is not supported or is supported and do not open under the condition of PHP function, the problem that need search twice Label Forwarding Information Base when the message that carries two labels is transmitted in final jump, reduce the number of times of searching Label Forwarding Information Base, improved the message forward efficiency.
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.