Summary of the invention
The embodiment of the present application is designed to provide a kind of message processing method and device so that BFD response message with it is rightThe BFD request message answered transmits in identical LSP, can malfunction to avoid the testing result of LSP.Specific technical solution is as follows:
In a first aspect, in order to achieve the above object, the embodiment of the present application discloses a kind of message processing method, the methodApplied to the network equipment, which comprises
The two-way converting received for label switching path LSP to be detected detects BFD request message, wherein the BFD is askedSeek label and the to be detected LSP of the ingress that the LSP to be detected is carried in message in the LSP to be detectedLabel of the egress in the LSP to be detected;
If itself not being the egress, according to the Label Forwarding Information Base of storage, to what is carried in the BFD request messageThe ingress is repaired in the label of label and the egress in the LSP to be detected in the LSP to be detectedChange, and forward modified BFD request message, so that the egress is according to the mark carried in modified BFD request messageLabel generate the BFD response message for being directed to the LSP to be detected;
If itself being the egress, generation carries the ingress carried in the BFD request message in instituteThe BFD response message of the label in LSP to be detected is stated, and in the Label Forwarding Information Base of storage, the determining and BFD request messageLabel corresponding next-hop device of the ingress of middle carrying in the LSP to be detected sends out the BFD response messageIt send to the next-hop device determined.
Optionally, the Label Forwarding Information Base according to storage exists to the ingress carried in the BFD request messageThe label of label and the egress in the LSP to be detected in the LSP to be detected is modified, and is forwarded and repairedBFD request message after changing, comprising:
In the Label Forwarding Information Base for determining storage, with the egress that is carried in the BFD request message described to be checkedThe corresponding label of label in LSP is surveyed, as the first label, in the Label Forwarding Information Base for determining storage, with the BFD request messageLabel corresponding next-hop device of the egress of middle carrying in the LSP to be detected, as the first equipment, determination is depositedIn the Label Forwarding Information Base of storage, with the label pair of the ingress that is carried in the BFD request message in the LSP to be detectedThe label answered, as the second label;
By label of the egress carried in the BFD request message in the LSP to be detected, it is revised as describedLabel of the ingress carried in the BFD request message in the LSP to be detected is revised as institute by the first labelState the second label;
Modified BFD request message is sent to first equipment.
Optionally, the method also includes:
It if itself not being the egress, and is not the ingress, when receiving BFD response message, determination is depositedIn the Label Forwarding Information Base of storage, with the label pair of the ingress that is carried in the BFD response message in the LSP to be detectedThe label answered, as third label, in the Label Forwarding Information Base that determines storage, with carried in the BFD response message described in enterLabel corresponding next-hop device of the node in the LSP to be detected, as the second equipment;
By label of the ingress carried in the BFD response message in the LSP to be detected, it is revised as describedThird label;
Modified BFD response message is sent to second equipment.
Second aspect, in order to achieve the above object, the embodiment of the present application disclose a kind of message processing method, the methodApplied to the network equipment, which comprises
Label of the egress for carrying label switching path LSP to be detected in the LSP to be detected is generated, and certainlyThe two-way converting of label in the LSP to be detected detects BFD request message;
The BFD request message is sent to the next-hop device in the LSP to be detected.
The third aspect, in order to achieve the above object, the embodiment of the present application disclose a kind of message process device, described deviceApplied to the network equipment, described device includes:
Receiving module, for receiving the two-way converting detection BFD request message for being directed to label switching path LSP to be detected,Wherein, label of the ingress of the LSP to be detected in the LSP to be detected is carried in the BFD request message, andLabel of the egress of the LSP to be detected in the LSP to be detected;
Forwarding module, according to the Label Forwarding Information Base of storage, asks the BFD if for itself not being the egressAsk label and the egress of the ingress carried in message in the LSP to be detected in the LSP to be detectedIn label modify, and modified BFD request message is forwarded, so that the egress is requested according to modified BFDThe label carried in message generates the BFD response message for being directed to the LSP to be detected;
Sending module, if generating for itself being the egress and carrying the institute carried in the BFD request messageThe BFD response message of label of the ingress in the LSP to be detected is stated, and in the Label Forwarding Information Base of storage, determining and instituteLabel corresponding next-hop device of the ingress carried in BFD request message in the LSP to be detected is stated, it will be describedBFD response message is sent to the next-hop device determined.
Optionally, the forwarding module, specifically for determining in the Label Forwarding Information Base stored, with the BFD request messageLabel corresponding label of the egress of middle carrying in the LSP to be detected determines the mark of storage as the first labelIt signs in forwarding table, with the egress carried in the BFD request message in the case where the label in the LSP to be detected is correspondingOne jumps equipment, as the first equipment, in the Label Forwarding Information Base that determines storage, with carried in the BFD request message described in enterLabel corresponding label of the node in the LSP to be detected, as the second label;
By label of the egress carried in the BFD request message in the LSP to be detected, it is revised as describedLabel of the ingress carried in the BFD request message in the LSP to be detected is revised as institute by the first labelState the second label;
Modified BFD request message is sent to first equipment.
Optionally, described device further include:
Processing module if not being the egress, and is not the ingress for itself, is responded when receiving BFDWhen message, in the Label Forwarding Information Base that determines storage, with the ingress that is carried in the BFD response message described to be detectedThe corresponding label of label in LSP, as third label, in the Label Forwarding Information Base for determining storage, in the BFD response messageLabel corresponding next-hop device of the ingress carried in the LSP to be detected, as the second equipment;
By label of the ingress carried in the BFD response message in the LSP to be detected, it is revised as describedThird label;
Modified BFD response message is sent to second equipment.
Fourth aspect, in order to achieve the above object, the embodiment of the present application disclose a kind of message process device, described deviceApplied to the network equipment, described device includes:
Generation module, for generating the egress for carrying label switching path LSP to be detected in the LSP to be detectedLabel, and detect BFD request message from the two-way converting of label in the LSP to be detected;
Sending module, the next-hop device for being sent to the BFD request message in the LSP to be detected.
On the other hand, in order to achieve the above objectives, the embodiment of the present application also discloses a kind of electronic equipment, including processor,Communication interface, memory and communication bus, wherein processor, communication interface, memory are completed each other by communication busCommunication;
Memory, for storing computer program;
Processor, when for executing the program stored on memory, method step either described in realization first aspect.
On the other hand, in order to achieve the above objectives, the embodiment of the present application also discloses a kind of electronic equipment, including processor,Communication interface, memory and communication bus, wherein processor, communication interface, memory are completed each other by communication busCommunication;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method and step described in second aspect.
On the other hand, in order to achieve the above objectives, the embodiment of the present application also discloses a kind of machine readable storage medium, storageThere is machine-executable instruction, when being called and being executed by processor, the machine-executable instruction promotes the processor: realizingMethod step either described in first aspect.
On the other hand, in order to achieve the above objectives, the embodiment of the present application also discloses a kind of machine readable storage medium, storageThere is machine-executable instruction, when being called and being executed by processor, the machine-executable instruction promotes the processor: realizingMethod and step described in second aspect.
On the other hand, in order to achieve the above objectives, the embodiment of the present application also discloses a kind of computer program comprising instructionProduct, when run on a computer, so that method step either described in the above-mentioned first aspect of computer execution.
On the other hand, in order to achieve the above objectives, the embodiment of the present application also discloses a kind of computer program comprising instructionProduct, when run on a computer, so that computer executes method and step described in above-mentioned second aspect.
The embodiment of the present application provides a kind of message processing method and device, is applied to the network equipment, is directed to when receivingWhen the BFD request message of LSP to be detected, if the network equipment is not the egress of LSP to be detected, turned according to the label of storageDeliver, to the ingress carried in BFD request message in LSP to be detected label and egress in LSP to be detectedLabel is modified, and forwards modified BFD request message;If the network equipment is the egress of LSP to be detected, generateCarry the BFD response message of label of the ingress carried in BFD request message in LSP to be detected.In BFD response messageThe label of carrying is label of the ingress in LSP to be detected, and therefore, the network equipment is set according to the next-hop that the label is determinedIt is standby, it is the equipment for forwarding BFD request message to the network equipment in LSP to be detected, BFD response message is sent to the next-hopEquipment avoids BFD response message from passing through other so that BFD response message can be back to ingress by LSP to be detectedLSP is back to ingress, and then the testing result of LSP to be detected is avoided to malfunction.
Certainly, implement the application any product or method it is not absolutely required to and meanwhile reach above all advantages.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, completeSite preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based onEmbodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every otherEmbodiment shall fall in the protection scope of this application.
The embodiment of the present application provides a kind of message processing method, and this method can be applied to the network equipment, the network equipmentIt can be with PE or other equipment.
In one example, method can be applied to each PE in Fig. 2.PE1 is as LSP to be detected (i.e. link L2- linkL3- link L4) ingress, label of the egress (i.e. PE4) for carrying LSP to be detected in LSP to be detected can be generatedThe BFD request message of the label (i.e. 200) of (i.e. 2000) and PE1 in LSP to be detected, then, PE1 can ask the BFDThe next-hop device (i.e. PE2) for asking message to be sent in LSP to be detected.
When PE2 receives the BFD request message of PE1 transmission, it is the egress of LSP to be detected that PE2, which determines itself not,.PE2 can be according to the Label Forwarding Information Base of storage, (i.e. to label of the PE4 carried in BFD request message in LSP to be detected2000) and label (i.e. 200) of the PE1 in LSP to be detected is modified.For example, label 2000 can be revised as by PE23000, label 200 is revised as 300, and modified BFD request message is sent to next-hop device (i.e. PE3).
Similarly, PE3 can be according to the Label Forwarding Information Base of storage, to the PE4 carried in BFD request message in LSP to be detectedIn label (i.e. 300) in LSP to be detected of label (i.e. 3000) and PE1 modify.For example, PE3 can be by label3000 are revised as 100, label 300 are revised as 400, and modified BFD request message is sent to next-hop device (i.e.PE4)。
When PE4 receives BFD request message, PE4 determine itself be LSP to be detected egress.PE4, which can be generated, to be takenThe BFD response message of label (i.e. 400) with the PE1 carried in BFD request message in LSP to be detected, and in storageIn Label Forwarding Information Base, determine that next-hop device corresponding with label 400 is PE3, PE4 can ring the BFD for carrying label 400Message is answered to be sent to PE3.
Correspondingly, after PE3 receives BFD response message, it can be according to the Label Forwarding Information Base of storage, by BFD response messageThe tag modification of middle carrying is 300, and BFD response message after modification is sent to PE2.Similarly, PE2 receives BFD response reportThe tag modification carried in BFD response message can be 200 according to the Label Forwarding Information Base of storage by Wen Hou, and will be after modificationBFD response message is sent to PE1, so that BFD response message is transmitted to PE1 by link L4- link L3- link L2.
As it can be seen that the message processing method based on the embodiment of the present application, enables BFD response message to pass through LSP to be detectedIt is back to ingress, BFD response message is avoided to be back to ingress by other LSP, and then avoids the detection knot of LSP to be detectedFruit error.
Referring to Fig. 3, Fig. 3 is a kind of flow chart of message processing method provided by the embodiments of the present application, and this method can answerFor the network equipment, the network equipment can in LSP to be detected in addition to ingress other nodes (be properly termed as it is non-enter sectionPoint), this method may comprise steps of:
S301: the BFD request message for being directed to LSP to be detected is received.
Wherein, the ingress of LSP to be detected can also be obtained from when generating the BFD request message for being directed to LSP to be detectedLabel in LSP to be detected, and the label is added in BFD request message.Can be carried in BFD request message toDetect egress label among to be detected LSPs of the ingress in label and LSP to be detected in LSP to be detected of LSP.For example, can be carried in the BFD request message for LSP to be detected (i.e. link L2- link L3- link L4) that PE2 is receivedThere is label (i.e. 200) of the PE4 in the label (i.e. 2000) and PE1 in LSP to be detected in LSP to be detected.
The network equipment can judge itself according to label of the egress carried in BFD request message in LSP to be detectedWhether the egress for being LSP to be detected, can also be according to mark of the egress carried in BFD request message in LSP to be detectedLabel, are forwarded processing to BFD request message.
In general, the ingress of LSP to be detected can be according to label of the egress in LSP to be detected and to be detectedLabel in LSP generates label stack, and label stack is added in BFD request message.Wherein, the stack top label of label stack canThink that label (be properly termed as upper label) of the egress in LSP to be detected, the stack bottom label of label stack can be ingressLabel (being properly termed as lower layer's label) in LSP to be detected.Specifically, the method that ingress generates BFD request message will beSubsequent embodiment is discussed in detail.
In application embodiment, the network equipment can receive the BFD request report of the transmission of the upstream equipment in LSP to be detectedText, and different processing is carried out according to the BFD request message.
S302: if itself not being egress, according to the Label Forwarding Information Base of storage, enter to what is carried in BFD request messageNode is modified in the label of label and egress in LSP to be detected in LSP to be detected, and is forwarded modifiedBFD request message, so that egress is generated according to the label carried in modified BFD request message for LSP's to be detectedBFD response message.
Wherein, Label Forwarding Information Base can be what the network equipment learnt to obtain in advance.
In application embodiment, when the network equipment receives the BFD request message for LSP to be detected, the network equipmentMay determine that itself whether the egress for being LSP to be detected.
Due to carrying upper label and lower layer's label in BFD request message, be when the network equipment determines itself notWhen the egress of LSP to be detected, the network equipment can enter according to the Label Forwarding Information Base of storage to what is carried in BFD request messageNode is modified in the label of label and egress in LSP to be detected in LSP to be detected, and then, the network equipment canTo forward modified BFD request message.When egress receives modified BFD request message, egress can basisThe label carried in BFD request message generates the BFD response message for being directed to LSP to be detected.
In this step, the network equipment can according to the upper label carried in BFD request message, judge itself whether be toDetect the egress of LSP.In a kind of embodiment, the upper label carried in the available BFD request message of the network equipment, andIn the Label Forwarding Information Base for determining storage, processing movement corresponding with the upper label.Label Forwarding Information Base may refer to table (1) and table(2)。
Table (1)
| Enter label | Processing movement | Outgoing label | Next-hop device |
| X | Pop up label | - | S1 |
Table (2)
| Enter label | Processing movement | Outgoing label | Next-hop device |
| X | Switch label | X1 | S2 |
Wherein, table (1) can be the Label Forwarding Information Base of egress storage, and table (2) can turn for the label of intermediate point storageIt delivers.
Enter the upper label carried in the BFD request message that the tag representation network equipment receives.When the network equipment receivesTo BFD request message in the upper label that carries be X when, according to table (1), the network equipment determines the corresponding processing of label XMovement is " pop-up label ", at this point, the network equipment can be determined that the egress that itself is LSP to be detected, BFD response can be generatedMessage.If the upper label carried in the data message that the network equipment receives is X, the network equipment can delete datagramThe upper label X carried in text, and the data message after deletion label is sent to next-hop device (i.e. S1).
When the upper label carried in the BFD request message that the network equipment receives is X, according to table (2), the network equipmentDetermine that the corresponding processing movement of label X is " switch label ", at this point, it is LSP to be detected that the network equipment, which can be determined that itself not,Egress, i.e., the network equipment be LSP to be detected intermediate node.Label X can be revised as X1 by the network equipment, and is sent toNext-hop device (i.e. S2).
In addition, the structure of label may refer to table (3).
Table (3)
Label value, length 20bits indicate the numerical value of label, for example, label value can be 300,2000.TC(Traffic Class, flow grade): length 3bits.S: label stack bottom marker, length 1bit, S are 1, are indicatedThe label is stack bottom label, and S are 0, indicates that the label is non-stack bottom label.TTL (Time To Live, lifetime value):Length is 8bits, can be used for preventing network loop.
In the present embodiment, ingress, can be by label of the ingress in LSP to be detected when generating BFD request messageTTL be set as default value so that egress can identify the ingress carried in BFD request message in LSP to be detectedIn the label label of default value (i.e. TTL be).In the prior art, BFD message (including BFD request message and BFD response reportText) in the TTL of label be not 0, therefore, ingress can set 0 for the TTL of label of the ingress in LSP to be detected, withSo that egress is identified that TTL is 0 label, and then obtains the ingress carried in BFD request message in LSP to be detectedLabel.
Optionally, S302 may comprise steps of:
Step 1, in the Label Forwarding Information Base for determining storage, with the egress that is carried in BFD request message in LSP to be detectedIn the corresponding label of label in the Label Forwarding Information Base that determines storage, and carried in BFD request message as the first labelThe corresponding next-hop device of label of the egress in LSP to be detected determines the Label Forwarding Information Base of storage as the first equipmentIn, label corresponding with label of the ingress carried in BFD request message in LSP to be detected, as the second label.
In application embodiment, the network equipment can be inquired in the Label Forwarding Information Base of storage, determining to request with BFDThe corresponding label of the upper label carried in message (i.e. the first label), and with the upper label that is carried in BFD request messageCorresponding next-hop device (i.e. the first equipment).The network equipment can also be inquired in the Label Forwarding Information Base of storage, determineLabel (i.e. the second label) corresponding with the lower layer's label carried in BFD request message.
Illustratively, it if current network device is the PE2 in Fig. 2, is carried in the BFD request message that PE2 is receivedUpper label is 2000, and lower layer's label is 200.The Label Forwarding Information Base stored in PE2 may refer to table (4).
Table (4)
| Enter label | Processing movement | Outgoing label | Next-hop device |
| 2000 | Switch label | 3000 | PE3 |
| 300 | Switch label | 200 | PE1 |
Wherein, " switch label " indicates that PE2 needs to modify to the label carried in BFD request message.If PE2 connectsThe label carried in the BFD request message received is to enter label in table (4), then the tag modification can be corresponding by PE2Outgoing label;If the label carried in the BFD request message that PE2 is received is the outgoing label in table (4), PE2 can shouldTag modification be it is corresponding enter label.
According to table (4), the upper label carried in the BFD request message received due to PE2 is that 2000, PE2 can be trueCalibration 2000 corresponding labels (i.e. 3000) of label, are the first label;Determine 2000 corresponding next-hop device (i.e. PE3) of label,For the first equipment.
According to table (4), the lower layer's label carried in the BFD request message received due to PE2 is that 200, PE2 can be determinedThe corresponding label of label 200 (i.e. 300) is the second label.
Label of the egress carried in BFD request message in LSP to be detected is revised as the first label by step 2,By label of the ingress carried in BFD request message in LSP to be detected, it is revised as the second label.
In application embodiment, if the network equipment is intermediate node, the network equipment can will be taken in BFD request messageThe upper label of band is revised as the first label, and the lower layer's label that will be carried in BFD request message is revised as the second label.This stepIn rapid, for the network equipment when modifying lower layer's label, the TTL that lower layer's label can be set is 0.
For the example in step 1, the upper label carried in the BFD request message received can be revised as by PE23000, it is 300 by the lower layer's tag modification carried in BFD request message.
Modified BFD request message is sent to the first equipment by step 3.
In application embodiment, the network equipment is to the upper label and lower layer's tag modification knot carried in BFD request messageModified BFD request message can be sent to the first equipment, so that BFD request message is transmitted by LSP to be detected by Shu HouTo egress.
For above-mentioned example, the upper label carried in BFD request message is being revised as 3000, by BFD request messageAfter lower layer's tag modification of middle carrying is 300, modified BFD request message can be sent to PE3 by PE2.
S303: if itself being egress, generation carries the ingress carried in BFD request message in LSP to be detectedIn label BFD response message, it is determining with the ingress carried in BFD request message and in the Label Forwarding Information Base of storageBFD response message, is sent to the next-hop device determined by the corresponding next-hop device of label in LSP to be detected.
In application embodiment, when the network equipment determines itself to be the egress of LSP to be detected, the network equipment can be obtainedThe lower layer's label carried in BFD request message is taken, and generates the BFD response message for carrying lower layer's label.
Then, the network equipment can be inquired in the Label Forwarding Information Base of storage, and determination is corresponding with lower layer's labelNext-hop device, and the BFD response message of generation is sent to the next-hop device.
The label carried in the BFD response message is label of the ingress in LSP to be detected, therefore, network equipment rootIt is the equipment for forwarding BFD request message to the network equipment in LSP to be detected according to the next-hop device that the label is determined, it willBFD response message is sent to the next-hop device, so that BFD response message can be back to by LSP to be detected into sectionPoint, and then the testing result of LSP to be detected is avoided to malfunction.
In this step, the network equipment can parse BFD request message, and obtaining the label that TTL is 0, (i.e. ingress is to be checkedSurvey the label in LSP), BFD response message is generated according to the label.
Illustratively, it if current network device is the PE4 in Fig. 2, is carried in the BFD request message that PE4 is receivedUpper label is 100, and lower layer's label is 400.The BFD response message for carrying label 400 can be generated in PE4.It is stored in PE4Label Forwarding Information Base may refer to table (5).
Table (5)
| Dest | Outgoing label | Next-hop device |
| 1.1.1.1 | 400 | PE3 |
| 1.1.1.1 | 200 | PE1 |
In table (5), Dest indicates the destination address of BFD response message, the i.e. network address of PE1.Outgoing label indicates that PE4 existsThe label (i.e. label of the PE1 in LSP to be detected) added in BFD response message.
According to table (5), PE4 can determine that destination address is 1.1.1.1, and carry the BFD response message of label 400Next-hop device is PE3, and the BFD response message for carrying label 400 can be sent to PE3 by PE4.
Optionally, the network equipment can also be forwarded processing to BFD response message according to the Label Forwarding Information Base of storage.This method may also comprise the following steps::
Step 1 if itself not being egress, and is not ingress, when receiving BFD response message, determines storageLabel Forwarding Information Base in, label corresponding with label of the ingress carried in BFD response message in LSP to be detected, asThird label, in the Label Forwarding Information Base for determining storage, with the mark of the ingress that is carried in BFD response message in LSP to be detectedCorresponding next-hop device is signed, as the second equipment.
It if the network equipment is not egress, and is not ingress in application embodiment, i.e., the network equipment is middle nodePoint, when the network equipment receives BFD response message, the network equipment can be inquired in Label Forwarding Information Base, determining and BFDThe corresponding label of label of the ingress carried in response message in LSP to be detected (i.e. third label), and responded with BFDThe corresponding next-hop device of label of the ingress carried in message in LSP to be detected (i.e. the second equipment).
Illustratively, similar with table (4), if current network device is the PE3 in Fig. 2, the label forwarding stored in PE3Table may refer to table (6).
Table (6)
| Enter label | Processing movement | Outgoing label | Next-hop device |
| 3000 | Switch label | 100 | PE4 |
| 400 | Switch label | 300 | PE2 |
Label of the ingress carried in the BFD response message that PE3 is received in LSP to be detected is 400, according to table(6), PE3 can determine that the corresponding label of label 400 is 300 (i.e. third labels), and the corresponding next-hop device of label 400 isPE2 (i.e. the second equipment).
Label of the ingress carried in BFD response message in LSP to be detected is revised as third label by step 2.
In application embodiment, after determining third label, the network equipment can enter section for what is carried in BFD response messageLabel of the point in LSP to be detected, is revised as third label.
For above-mentioned example, the label 400 carried in BFD response message can be revised as 300 by PE3.
Modified BFD response message is sent to the second equipment by step 3.
In application embodiment, label of the network equipment to the ingress carried in BFD response message in LSP to be detectedAfter modification, modified BFD response message can be sent to the second equipment by the network equipment.
For above-mentioned example, the BFD response message for carrying label 300 can be sent to PE2 by PE3.
Similarly, according to table (4), PE2 can be by label of the ingress carried in BFD response message in LSP to be detected200 are revised as, and modified BFD response message is sent to PE1.
As it can be seen that the message processing method based on the present embodiment, BFD response message can be back to by LSP to be detected intoNode, and then can malfunction to avoid the testing result of LSP to be detected.
Referring to fig. 4, Fig. 4 is a kind of flow chart of message processing method provided by the embodiments of the present application, and this method can answerFor the network equipment, which can be the ingress of LSP to be detected, and this method may comprise steps of:
S401: label of the egress for carrying LSP to be detected in LSP to be detected is generated, and to be detectedThe BFD request message of label in LSP.
In application embodiment, if the network equipment is the ingress of LSP to be detected, the network equipment, which can be generated, to be carriedLabel of the egress of LSP to be detected in LSP to be detected, and report is requested from the BFD of the label in LSP to be detectedText.
In this step, the network equipment can determine the next-hop device of the BFD request message for LSP to be detected, then,The network equipment can be inquired in the Label Forwarding Information Base of storage, next-hop device and BFD the request report for obtaining and determiningThe corresponding label of destination address (label namely upper label of the egress of LSP i.e. to be detected in LSP to be detected) of text.In addition, the network equipment can also determine the label (i.e. lower layer's label) from LSP to be detected, then, the network equipment can be withGenerate the BFD request message for carrying upper label and lower layer's label.
In addition, the network equipment when generating BFD request message, can will be set from the TTL of the label in LSP to be detectedIt is set to default value, so that egress can identify label of the ingress carried in BFD request message in LSP to be detected(i.e. the label that TTL is default value).In the prior art, in BFD message (including BFD request message and BFD response message)The TTL of label is not 0, and therefore, the network equipment can set 0 for the TTL of label of the ingress in LSP to be detected, so thatEgress can identify that TTL is 0 label, and then obtain the ingress carried in BFD request message in LSP to be detectedLabel.
Illustratively, if current network device is the PE1 in Fig. 2, the label forwarding that in PE1 stores similar with table (5)Table may refer to table (7).
Table (7)
| Dest | Outgoing label | Next-hop device |
| 4.4.4.4 | 2000 | PE2 |
| 4.4.4.4 | 100 | PE4 |
Wherein, Dest indicates the destination address of BFD request message, the i.e. network address of PE4.Outgoing label indicates PE1 in BFDThe upper label in label (i.e. PE4 is in the label in LSP to be detected) namely BFD request message added in request message.
Since the next-hop device in LSP to be detected (i.e. link L2- link L3- link L4) is PE2, according to table (7),PE1 determine destination address be 4.4.4.4, and next-hop device be PE2 BFD request message in upper label be 2000, PE1It can determine that from the label (i.e. lower layer's label) in LSP to be detected be 200, then, PE1, which can be generated, carries label2000 and label 200 BFD request message, and can be set label 200 TTL be 0.
S402: BFD request message is sent to the next-hop device in LSP to be detected.
It, can after the network equipment generates the BFD request message for carrying upper label and lower layer's label in application embodimentBFD request message to be sent to the next-hop device in LSP to be detected.
Illustratively, PE1 can ask BFD after generation carries the BFD request message of label 2000 and label 200Message is asked to be sent to PE2, to detect to link L2- link L3- link L4.
Correspondingly, the next-hop device can root if the next-hop device for receiving BFD request message is not egressAccording to the Label Forwarding Information Base of storage, modify to the label (including upper label and lower layer's label) carried in BFD request message,And modified BFD request message is forwarded, specifically, being discussed in detail with reference to step S302.
If the next-hop device for receiving BFD request message is egress, which can be generated carryingThere is the BFD response message of the lower layer's label carried in BFD request message, and in the Label Forwarding Information Base of storage, under determination and thisThe corresponding next-hop device of layer label, and BFD response message is sent to the next-hop device determined, specifically, can joinExamine being discussed in detail for step S303.
To sum up, based on the message processing method of the embodiment of the present application, the BFD that the egress of LSP to be detected generates is rungThe label carried in message is answered, is label of the ingress in LSP to be detected, therefore, egress is determined according to the labelNext-hop device, is the equipment for forwarding BFD request message to egress in LSP to be detected, and egress sends BFD response messageLSP to be detected is avoided to the next-hop device so that BFD response message can be back to ingress by LSP to be detectedTesting result error.
Referring to Fig. 5, Fig. 5 be a kind of exemplary flow chart of message processing method provided by the embodiments of the present application, embodiment withMethod is applied to be illustrated for the network equipment, and this method may comprise steps of:
S501: the BFD request message for being directed to LSP to be detected is received.
Wherein, label of the ingress of LSP to be detected in LSP to be detected and to be checked is carried in BFD request messageSurvey label of the egress of LSP in LSP to be detected.
S502: judging itself, whether the egress for being LSP to be detected is held if itself is not the egress of LSP to be detectedRow S503-S505 executes S506-S508 if itself being the egress of LSP to be detected.
S503: in the Label Forwarding Information Base for determining storage, with the egress that is carried in BFD request message in LSP to be detectedThe corresponding label of label in the Label Forwarding Information Base that determines storage, go out with what is carried in BFD request message as the first labelThe corresponding next-hop device of label of the node in LSP to be detected, as the first equipment, in the Label Forwarding Information Base for determining storage,Label corresponding with label of the ingress carried in BFD request message in LSP to be detected, as the second label.
S504: by label of the egress carried in BFD request message in LSP to be detected, being revised as the first label, willLabel of the ingress carried in BFD request message in LSP to be detected, is revised as the second label.
S505: modified BFD request message is sent to the first equipment.
S506: the BFD response for carrying label of the ingress carried in BFD request message in LSP to be detected is generatedMessage.
S507: in the Label Forwarding Information Base of storage, the ingress carried in determining and BFD request message is in LSP to be detectedIn the corresponding next-hop device of label.
S508: the BFD response message of generation is sent to the next-hop device determined.
As it can be seen that the message processing method based on the embodiment of the present application, the BFD that the egress of LSP to be detected generates responds reportThe label carried in text is label of the ingress in LSP to be detected, and therefore, egress is determined next according to the labelEquipment is jumped, is the equipment for forwarding BFD request message to egress in LSP to be detected, BFD response message is sent to this by egressNext-hop device avoids the inspection of LSP to be detected so that BFD response message can be back to ingress by LSP to be detectedSurvey result error.
Corresponding with the embodiment of the method for Fig. 3, referring to Fig. 6, Fig. 6 is a kind of Message processing dress provided by the embodiments of the present applicationThe structure chart set, described device are applied to the network equipment, and described device includes:
Receiving module 601, for receiving the two-way converting detection BFD request report for being directed to label switching path LSP to be detectedText, wherein label of the ingress of the LSP to be detected in the LSP to be detected is carried in the BFD request message,And label of the egress of the LSP to be detected in the LSP to be detected;
Forwarding module 602, if for itself not being the egress, according to the Label Forwarding Information Base of storage, to the BFDLabel and the egress of the ingress carried in request message in the LSP to be detected are described to be detectedLabel in LSP is modified, and forwards modified BFD request message, so that the egress is asked according to modified BFDThe label carried in message is sought, the BFD response message for being directed to the LSP to be detected is generated;
Sending module 603, if generation carries to be carried in the BFD request message for itself being the egressThe BFD response message of label of the ingress in the LSP to be detected determine and in the Label Forwarding Information Base of storageNext-hop device corresponding with label of the ingress carried in the BFD request message in the LSP to be detected, willThe BFD response message is sent to the next-hop device determined.
Optionally, the forwarding module 602 requests to report specifically for determining in the Label Forwarding Information Base stored with the BFDLabel corresponding label of the egress carried in text in the LSP to be detected determines storage as the first labelIt is corresponding with label of the egress carried in the BFD request message in the LSP to be detected in Label Forwarding Information BaseNext-hop device, as the first equipment, in the Label Forwarding Information Base for determining storage, described in being carried in the BFD request messageLabel corresponding label of the ingress in the LSP to be detected, as the second label;
By label of the egress carried in the BFD request message in the LSP to be detected, it is revised as describedLabel of the ingress carried in the BFD request message in the LSP to be detected is revised as institute by the first labelState the second label;
Modified BFD request message is sent to first equipment.
Optionally, described device further include:
Processing module if not being the egress, and is not the ingress for itself, is responded when receiving BFDWhen message, in the Label Forwarding Information Base that determines storage, with the ingress that is carried in the BFD response message described to be detectedThe corresponding label of label in LSP, as third label, in the Label Forwarding Information Base for determining storage, in the BFD response messageLabel corresponding next-hop device of the ingress carried in the LSP to be detected, as the second equipment;
By label of the ingress carried in the BFD response message in the LSP to be detected, it is revised as describedThird label;
Modified BFD response message is sent to second equipment.
Corresponding with the embodiment of the method for Fig. 4, referring to Fig. 7, Fig. 7 is a kind of Message processing dress provided by the embodiments of the present applicationThe structure chart set, described device are applied to the network equipment, and described device includes:
Generation module 701, for generating the egress for carrying label switching path LSP to be detected described to be detectedLabel in LSP, and BFD request message is detected from the two-way converting of the label in the LSP to be detected;
Sending module 702, the next-hop device for being sent to the BFD request message in the LSP to be detected.
Based on message process device provided by the present application, carried in the BFD response message that the egress of LSP to be detected generatesLabel, be label of the ingress in LSP to be detected, therefore, the next-hop device that egress is determined according to the label isTo the equipment of egress forwarding BFD request message in LSP to be detected, BFD response message is sent to the next-hop and set by egressIt is standby, so that BFD response message can be back to ingress by LSP to be detected, the testing result of LSP to be detected is avoided to go outIt is wrong.
The embodiment of the present application also provides a kind of electronic equipment, as shown in figure 8, include processor 801, communication interface 802,Memory 803 and communication bus 804, wherein processor 801, communication interface 802, memory 803 are complete by communication bus 804At mutual communication,
Memory 803, for storing computer program;
Processor 801, when for executing the program stored on memory 803, so that the electronic equipment executes at messageThe step of reason method, this method may include:
The two-way converting received for label switching path LSP to be detected detects BFD request message, wherein the BFD is askedSeek label and the to be detected LSP of the ingress that the LSP to be detected is carried in message in the LSP to be detectedLabel of the egress in the LSP to be detected;
If itself not being the egress, according to the Label Forwarding Information Base of storage, to what is carried in the BFD request messageThe ingress is repaired in the label of label and the egress in the LSP to be detected in the LSP to be detectedChange, and forward modified BFD request message, so that the egress is according to the mark carried in modified BFD request messageLabel generate the BFD response message for being directed to the LSP to be detected;
If itself being the egress, generation carries the ingress carried in the BFD request message in instituteThe BFD response message of the label in LSP to be detected is stated, and in the Label Forwarding Information Base of storage, the determining and BFD request messageLabel corresponding next-hop device of the ingress of middle carrying in the LSP to be detected sends out the BFD response messageIt send to the next-hop device determined.
Optionally, the Label Forwarding Information Base according to storage exists to the ingress carried in the BFD request messageThe label of label and the egress in the LSP to be detected in the LSP to be detected is modified, and is forwarded and repairedBFD request message after changing, comprising:
In the Label Forwarding Information Base for determining storage, with the egress that is carried in the BFD request message described to be checkedThe corresponding label of label in LSP is surveyed, as the first label, in the Label Forwarding Information Base for determining storage, with the BFD request messageLabel corresponding next-hop device of the egress of middle carrying in the LSP to be detected, as the first equipment, determination is depositedIn the Label Forwarding Information Base of storage, with the label pair of the ingress that is carried in the BFD request message in the LSP to be detectedThe label answered, as the second label;
By label of the egress carried in the BFD request message in the LSP to be detected, it is revised as describedLabel of the ingress carried in the BFD request message in the LSP to be detected is revised as institute by the first labelState the second label;
Modified BFD request message is sent to first equipment.
Optionally, the method also includes:
It if itself not being the egress, and is not the ingress, when receiving BFD response message, determination is depositedIn the Label Forwarding Information Base of storage, with the label pair of the ingress that is carried in the BFD response message in the LSP to be detectedThe label answered, as third label, in the Label Forwarding Information Base that determines storage, with carried in the BFD response message described in enterLabel corresponding next-hop device of the node in the LSP to be detected, as the second equipment;
By label of the ingress carried in the BFD response message in the LSP to be detected, it is revised as describedThird label;
Modified BFD response message is sent to second equipment.
The embodiment of the present application also provides a kind of electronic equipment, as shown in figure 9, include processor 901, communication interface 902,Memory 903 and communication bus 904, wherein processor 901, communication interface 902, memory 903 are complete by communication bus 904At mutual communication,
Memory 903, for storing computer program;
Processor 901, when for executing the program stored on memory 903, so that the electronic equipment executes at messageThe step of reason method, this method may include:
Label of the egress for carrying label switching path LSP to be detected in the LSP to be detected is generated, and certainlyThe two-way converting of label in the LSP to be detected detects BFD request message;
The BFD request message is sent to the next-hop device in the LSP to be detected.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral ComponentInterconnect, PCI) bus or expanding the industrial standard structure (Extended Industry StandardArchitecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For justIt is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easyThe property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used alsoTo be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital SignalProcessing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existingIt is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discreteDoor or transistor logic, discrete hardware components.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which canIt reads to be stored with computer program in storage medium, the computer program is realized any of the above-described applied to non-when being executed by processorThe step of message processing method of ingress.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which canRead to be stored with computer program in storage medium, the computer program realized when being executed by processor it is any of the above-described be applied intoThe step of message processing method of node.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when itWhen running on computers, so that computer executes any message processing method applied to non-ingress in above-described embodiment.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when itWhen running on computers, so that computer executes any message processing method applied to ingress in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof realIt is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer programProduct includes one or more computer instructions.When loading on computers and executing the computer program instructions, all orIt partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meterCalculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage mediumIn, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computerInstruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data centerUser's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server orData center is transmitted.The computer readable storage medium can be any usable medium that computer can access orIt is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be withIt is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard diskSolid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a realityBody or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operationIn any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended toNon-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including thoseElement, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipmentIntrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded thatThere is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodimentDividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,For electronic equipment, computer readable storage medium and computer program product embodiments, since it is substantially similar to method realityExample is applied, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is allAny modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the applicationIt is interior.