Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; 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 are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
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 corresponding first behavior to be stored of label information 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 accomplish message forwarding according to the Label Forwarding Information Base that is generated.Wherein, a last jumping of said 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 when wherein, second behavior is identified at and E-Packets according to label information the stack top label in the message being ejected.
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, is transmitted by correct to guarantee message.
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 non-POP storage area of public network, private network storage area and public network POP storage area successively and be respectively applied for the corresponding corresponding public network label of public network label, private network tags and POP behavior of the non-POP behavior of storage through storage area with Label Forwarding Information Base; Through type control label depositing in proper order in Label Forwarding Information Base, realized classification and 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, when present embodiment carries out classification and storage to label, 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.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) that private network tags is corresponding 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 corresponding operation of original first behavior.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 that first label is corresponding 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 accomplish message forwarding; When if the forwarding information that first label is corresponding 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 then necessarily can match a label at second label of private network storage area coupling under the correct situation of label distribution, after according to the label in this coupling the first order label in the message being ejected; Primitive behavior according to second label is corresponding is transmitted processing to message, promptly through once searching completion to message forwarding.
The label forwarding information storage means of present embodiment; Through 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, the second then corresponding behavior according to the label in the coupling, the first corresponding behavior can directly forward message according to the label in the coupling again with the ejection of the stack top label in the message earlier; 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, private network storage area and public network POP storage area successively through memory space with Label Forwarding Information Base; Be stored in the non-POP storage area of public network, private network storage area and public network POP storage area respectively according to the type of the label public network label that non-POP behavior is corresponding, private network tags and the corresponding public network label of POP behavior; 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.
Fig. 2 A is the flow chart of the label forwarding information storage means that provide of 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 is 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 corresponding forwarding information of label information 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, then can with the private network storage area divide bigger.Again for example: if the public network label of the defined non-POP behavior of local label forwarding information storage device is more, then can with the non-POP storage area of public network divide bigger.
In addition, it is not unique TCAM being divided into three types of memory spaces.The dividing mode of present embodiment is mainly divided to 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 types of 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, can TCAM 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 in public network, transmitting 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 of public network POP storage area is idle; 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 private network storage area is expanded) 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 private network storage area is expanded) 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 through the non-POP storage area of private network storage area expansion public network: if article one list item of private network storage area is idle, 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; Then this moment, the corresponding non-POP storage area of public network was the non-POP storage area of public network after the expansion; Then label information is stored under the first order label of preferred implementation for the list item that label information stored into expansion and come 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.
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 into.
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 of private network storage area is idle, 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 this moment, corresponding public network POP storage area was the public network POP storage area after the expansion; Then label information is stored under the first order label of preferred implementation for the list item that label information stored into expansion and come 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.
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 into.
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 of public network POP storage area is idle, then directly article one list item of public network POP storage area is expanded to a list item of 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 revise the corresponding behavior of label information 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 the 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 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, and first label in the message is ejected; This message is transmitted in corresponding behavior according to second label then; Reduce the number of times of searching Label Forwarding Information Base when transmitting the message that carries two labels, reduced 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 into.
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 the operation of this label forwarding information stores.
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 private network tags be stored under the first order label in this case, to guarantee that message can successfully be 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 stored under the first order label of the next idle list item of expansion then.Wherein, the step of the private network storage area being expanded can repeat no more at this referring to step 33.
In this explanation, the mode of in above-mentioned each step storage area being expanded is merely 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 successively extension storage zone; 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 through 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; The public network label that non-POP behavior is corresponding, private network tags and the corresponding public network label of POP behavior leave 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; Make the MPLS message obtain correct handling; This shows that 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 possibly 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 maybe 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 through the public network label that non-POP behavior is corresponding; Can avoid occurring carrying out second label in the MPLS message of SWAP and PUSH operation of public network just mate in the situation of private network tags, improve the success rate that E-Packets.
Fig. 3 A is the flow chart of the message forwarding method that provides of the embodiment of the invention three.Shown in Fig. 3 A, 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, is 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 corresponding public network label of POP behavior, 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 corresponding public network tag storage of POP behavior 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 to generate different Label Forwarding Information Base according to the last two jump on the LSP of message place.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 corresponding first order label of each list item; 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 with 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 1bit, 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 through 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 corresponding forwarding information of second label; According to behind first label in the forwarding information ejection message message being transmitted, finish this message and transmit operation.
Wherein,, explain that the corresponding behavior of first label is the POP behavior, explain 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, explain 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 corresponding forwarding information of second label, 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 that label in the private network storage area is corresponding 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 message earlier.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 corresponding forwarding information of first label.
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; Explaining that also this message need carry out the non-POP operation of public network, for example possibly be SWAP or PUSH operation, and then apparatus for forwarding message is directly handled the back forwarding according to the corresponding forwarding information of first label to message; Make message obtain priority treatment, guarantee that only searching a Label Forwarding Information Base just accomplishes 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 through the corresponding port if the corresponding behavior of first label 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 the final jump on the LSP of message place, or be not the final jump on the LSP of message place.Precondition in the operating process that present embodiment step 55-step 58 is described 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 it on, thereby make the apparatus for forwarding message of present embodiment also only need the stack top label of care 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 corresponding forwarding information of first label, and E-Packet after ejecting first label according to forwarding information, finish this message and transmit operation.
If in step 56, in the private network storage area, do not find the label consistent with first label, 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 corresponding POP behavior of first label, 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 corresponding forwarding information of first label.
If in step 56, in the private network storage area, found the label consistent, then obtain the corresponding forwarding information of first label, and forward after according to forwarding information message being handled with first label; For example possibly be to transmit after label with message is exchanged for new label, also possibly be to transmit after in message, being pressed into new label.
If in step 55, in the non-POP storage area of public network, found the label consistent with first label, then obtain the corresponding non-POP behavior of public network of first label, 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 storing the corresponding public network label of non-POP behavior, private network tags and the corresponding public network label Label Forwarding Information Base of POP behavior successively.The last two jump on the LSP of message place is not supported or is supported and when not opening the PHP function; The corresponding behavior of private network tags based on the Label Forwarding Information Base of classification and storage and the process modify of being stored; Message to carrying two labels is transmitted, and can make message preferentially obtain handling at non-POP storage area of public network and private network storage area, has 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 be by correct forwarding 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 through 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 basically, 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 (PUSH 80), 50 (POP), 60 (POP).These public network labels are used for accomplishing 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 kinds:
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, explains that this moment, the network equipment was the final jump on the LSP of this message place; Because the PHP function is not opened in hypothesis the last two jump, then search for the first time again, 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, and second layer label 300 in this moment coupling then obtains the corresponding forwarding information of private network tags 300; The stack top label of MPLS message 50 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 kinds 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 corresponding forwarding information of private network tags 300, 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 above-mentioned visible; 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 through private network storage area and amended forwarding information searching a Label Forwarding Information Base can accomplish 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 and storage label 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 corresponding first behavior to be stored of label information 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 when second behavior is identified at and E-Packets according to label information the stack top label in the message being ejected 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, private network storage area and public network POP storage area successively through memory space with Label Forwarding Information Base; Be stored in the non-POP storage area of public network, private network storage area and public network POP storage area respectively according to the type of the label public network label that non-POP behavior is corresponding, private network tags and the corresponding public network label of POP behavior; Do not support or support and do not open under the condition of PHP function in the last two jump; Further revising the forwarding information that each label is corresponding 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, reduced 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, then can with the private network storage area divide 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 regions.
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 repeat no more at this 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 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 through above-mentioned each functional unit, and each storage area is used flexibly, has improved the service efficiency of TCAM.
Wherein, The mode of above-mentioned each each storage area of functional unit expansion is merely 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, this extended mode is easy to implement more less for the list item quantity that moves, 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 LSP of the message that receives place 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 said public network stores other public network labels except that the corresponding public network label of POP behavior, 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 for first search judge module 81 judged result 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 corresponding forwarding information of second label, message is transmitted after ejecting first label in the message according to forwarding information, store all private network tags in the said private network storage area; Second forwarding module 83, be used for first search judge module 81 judged result when being, the forwarding information corresponding according to first label E-Packets.
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, repeats no more at this.
The apparatus for forwarding message of present embodiment; Based on storing the corresponding public network label of non-POP behavior, private network tags and the corresponding such looked-up sequence of public network label of POP behavior successively message is transmitted; 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 corresponding behavior of private network tags of the Label Forwarding Information Base of classification and storage and the process modify of being stored; Message to carrying two labels is transmitted, and can make message preferentially obtain handling at non-POP storage area of public network and private network storage area, has 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 be by correct forwarding 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 for second search judge module 91 judged result 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 for the 3rd search judge module 92 judged result for not the time;, and E-Packet after ejecting first label according to forwarding information obtaining the corresponding forwarding information of first label according to first label lookup public network POP storage area; The 4th forwarding module 94, be used for the 3rd search judge module 92 judged result when being, the forwarding information corresponding according to first label E-Packets; The 5th forwarding module 95, be used for second search judge module 91 judged result when being, the forwarding information corresponding according to first label E-Packets.
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, repeats no more at this.
The apparatus for forwarding message of present embodiment is transmitted message based on storing the corresponding public network label of non-POP behavior, private network tags and the corresponding such looked-up sequence of public network label of POP behavior successively.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 accomplish the message forwarding operation through 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 and storage label.
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 order of the corresponding public network label of non-POP behavior, private network tags and POP behavior correspondence and the Label Forwarding Information Base of classification and 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 accomplished through the relevant hardware of program command; Aforesaid program can be stored in the computer read/write memory medium; This program 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.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, 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 are revised or replacement, do not make the spirit and the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.