Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related toDuring accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodimentDescribed in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appendedThe example of the consistent apparatus and method of some aspects being described in detail in claims, of the invention.
It is only merely for the purpose of description specific embodiment in terminology used in the present invention, and is not intended to be limiting the present invention.It is also intended in " one kind " of the singulative of the invention with used in appended claims, " described " and "the" including majorityForm, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrappedContaining the associated list items purpose of one or more, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the present inventionA little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing fromIn the case of the scope of the invention, the first information can also be referred to as the second information, and similarly, the second information can also be referred to asOne information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ...When " or " in response to determining ".
The embodiment of the present invention proposes a kind of message forwarding method, and main label stack and standby label stack are packaged in by this method simultaneouslyIn MPLS messages, when link failure corresponding to the nodal test to main path on main path, main label stack is deleted, based on standby markSign stack forwarding MPLS messages.
It is a kind of SR network diagrams based on SD-WAN frameworks shown in the embodiment of the present invention referring to Fig. 1.The SR networksIncluding controller Controller, 1~R6 of node R, wherein, the numeral in round parentheses represents node label, for unique markCorresponding node;Numeral in square brackets represents adjacent label, for identifying the link between adjacent node.The present invention is not to SR netsNumber of nodes in network is limited.
It is one embodiment flow chart of message forwarding method of the present invention referring to Fig. 2, the embodiment is from SR nodesAngle message repeating process is described.
Step 201, when getting the MPLS messages for being packaged with main label stack and standby label stack, the main label stack is determinedStack top label corresponding to link state.
In SD-WAN frameworks, controller can be according to specific business demand (for example, the significance level of business, bandwidth, speedRate etc.) preferred path that forwarding corresponds to the SR tunnels of service message is calculated, the preferred path being calculated is converted into SR labelsStack is issued on the SR tunnels of source node, to instruct to be forwarded to destination node by the service message that the SR tunnels forward.
In the embodiment of the present invention, controller issues two label stacks to the SR tunnels of source node, and one is main label stack, and oneIndividual is standby label stack, wherein, main label stack is corresponding to the preferred path (being designated as main path) in the SR tunnels that controller calculatesLabel stack, label in the main label stack are the adjoining label that is passed through along main path;The standby corresponding standby path of label stack, standby labelLabel in stack is the node label of purpose node.For example, controller Controller is to be turned by source node R1 T1 tunnelsIt is R1 → R2 → R6 → R5 → R4 to be sent to the preferred path that R4 message calculates, then the master that controller Controller issues to R1Label stack is { 102,206,605,504 }, i.e., using adjacent label corresponding to the link between the adjacent node passed through successively comeRepresent main path;Standby label stack is { 4 }, i.e., represents standby path using the node label of the destination node of message forwarding.
Source node is received after controller is issued to main label stack and the standby label stack in SR tunnels, utilizes main label stack and standbyLabel stack is packaged to the service message forwarded by SR tunnels, the MPLS messages after being encapsulated, wherein, main label stack isThe outermost layer label stack of MPLS messages, standby label stack is the next label stack adjacent with main label stack.
Any node including source node, it is packaged with main label stack and the MPLS messages for label stack when gettingWhen, the stack top label based on main label stack determines the state of the stack top label respective links, specifically, corresponding to chain to stack top labelRoad carries out BFD inspections (physical link detection of connectivity), if respective links are not checked by BFD, it is determined that Link State is eventBarrier state;If respective links are checked by BFD, it is determined that Link State is normal condition.
For example, the stack top label that R1 obtains the main label stack of current MPLS messages is 102, then to the adjacent correspondence of label 102Link (physical link between R1 and R2) carries out BFD detections, if being detected by BFD, it is determined that the link between R1 and R2 is justOften, R1 removes stack top label 102, and MPLS messages are forwarded along the adjacent respective links of label 102;After R2 receives MPLS messages, obtainThe stack top label for taking the main label stack of MPLS messages is 206, then to the adjacent respective links (physics between R1 and R6 of label 206Link) BFD detections are carried out, if not detected by BFD, it is determined that the link failure between R2 and R6, perform step 202.
It should be added that the present invention be directed to carry out BFD detections with the direct-connected physical link of node, relative to existingThere is the BFD in technology for logical path to detect, the quantity of BFD detections can be substantially reduced.In addition, the present invention does not detect to BFDTime point limited, for example, also can periodically to physical link carry out BFD detections.
Step 202, when the state of the link is malfunction, the main label stack is deleted, based on the standby labelStack forwards the MPLS messages.
For example, R2 when detecting the link failure between R2 and R6, deletes main label stack, that is, delete in MPLS messagesAdjacent label 206,605,504, only retains standby label stack, i.e. destination node R4 node label 4, R2 and subsequent node is based onNode label is according to routing forwarding MPLS messages, until destination node R4.It can be seen from the above description that the present invention will be active and standbyPath corresponding label stack (main label stack and standby label stack) is encapsulated in MPLS messages, and each node is to direct connected linkFault detect is carried out, when any node on main path detects link failure, can carry out active and standby path switching, to protectThe reliability of message forwarding is demonstrate,proved, simultaneously as node carries out fault detect just for direct-connected physical link, therefore, reduces eventOccupancy of the barrier detection to node resource.
Now still by taking SR networks shown in Fig. 1 as an example, message repeating process is discussed in detail.
The service message that controller Controller is forwarded to destination node R4 to the T1 tunnels by source node R1 calculatesThe preferred path (being designated as Path1) in T1 tunnels, if Path1 is R1 → R2 → R6 → R5 → R4, it is converted into label stack (being designated as S1)For { 102,206,605,504 };Using destination node R4 node label 4 as standby label stack (being designated as S2), i.e. S2 is { 4 }.S1 and S2 are issued on R1 tunnel T1 by Controller.
When R1 receives service message (being designated as Packet1) for belonging to tunnel T1, Packet1 is carried out using S1 and S2Encapsulation obtains corresponding MPLS messages (being designated as MPLS1).Wherein, S1 is MPLS1 outermost layer label stack, and S2 is adjacent with S1Next label stack, as shown in Figure 3A.R1 detects the connectedness of stack top label (outermost layer label) 102 respective links, if the linkNormally, then R1 deletes label 102, and now, S1 is { 206,605,504 }, and the MPLS messages after deleting label 102 (are designated as by R1MPLS2, as shown in Figure 3 B) forwarded by the link being connected with R2.
After R2 receives MPLS2, the connectedness of the respective links of detection stack top label 206, if the link is normal, R2 is deletedLabel 206, now, S1 is { 605,504 }, and R2 is by the MPLS messages (being designated as MPLS3, as shown in Figure 3 C) after deleting label 206Forwarded by the link being connected with R6.
After R6 receives MPLS3, the connectedness of the respective links of detection stack top label 605, if the link failure, R6 is deletedLabel stack S1, that is, label 605,504 is deleted, retain S2, that is, retain destination node R4 node label 4, obtain as shown in Figure 3 DMPLS4.R6 be based on node label 4 according to routing forwarding MPLS4, it is assumed that route next jump node label be 3, then R6 by withThe link forwarding MPLS4 of R3 (node label 3) connections.
After R3 receives MPLS4, because R4 (node label 4) is direct-connected with oneself, therefore, deletion of node label 4 willPacket1 is transmitted to R4 by the link being connected with R4.
I.e. Packet1 forward-path switches to R1 → R2 → R6 → R3 → R4 by R1 → R2 → R6 → R5 → R4, ensuresThe normal forwarding of message.
Corresponding with the embodiment of foregoing message forwarding method, present invention also offers the embodiment of apparatus for forwarding message.
The embodiment of apparatus for forwarding message of the present invention can be applied on node.Device embodiment can be real by softwareIt is existing, it can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, as on a logical meaningDevice, it is that corresponding computer program instructions are formed in the processor run memory by equipment where it.From hardware layerFor face, as shown in figure 4, being a kind of hardware structure diagram of apparatus for forwarding message of the present invention place equipment, except the place shown in Fig. 4Manage outside device and nonvolatile memory, the equipment in embodiment where device is gone back generally according to the actual functional capability of the equipmentOther hardware can be included, this is repeated no more.
Fig. 5 is refer to, is the structural representation of the apparatus for forwarding message in one embodiment of the invention.Message forwarding dressPut including determining unit 501 and retransmission unit 502, wherein:
Determining unit 501, for when getting the MPLS messages for being packaged with main label stack and standby label stack, it is determined that describedThe state of link corresponding to the stack top label of main label stack, wherein, the label that the main label stack includes is adjacent label;It is describedThe label that standby label stack includes is the node label of purpose node;
Retransmission unit 502, for when the state of the link is malfunction, the main label stack being deleted, based on instituteState standby label stack and forward the MPLS messages.
Further, when the node is source node, described device also includes:
Encapsulation unit, for receive controller be issued to the source node SR tunnels main label stack and standby labelDuring stack, the service message forwarded by the SR tunnels is packaged using the main label stack and the standby label stack, obtainedTo the MPLS messages.
Further, the main label stack be the MPLS messages outermost layer label stack, the standby label stack for instituteState the adjacent next label stack of main label stack.
Further,
The determining unit 501, specifically for carrying out two-way converting detection BFD inspections to link corresponding to the stack top labelLook into;If the link is not checked by the BFD, it is determined that the state of the link is malfunction.
The function of unit and the implementation process of effect specifically refer to and step are corresponded in the above method in said apparatusImplementation process, it will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to methodApply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating componentThe unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can alsoIt is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to realityNeed to select some or all of module therein to realize the purpose of the present invention program.Those of ordinary skill in the art are not payingIn the case of going out creative work, you can to understand and implement.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present inventionGod any modification, equivalent substitution and improvements done etc., should be included within the scope of protection of the invention with principle.