[ summary of the invention ]
In response to the above deficiencies or needs in the art, the present invention addresses the reliability and efficiency issues of frr scene protection.
The embodiment of the invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for protecting an frr scene, specifically: writing the labels of the main path and the standby path into a protection group according to the next hop of each routing path, and issuing the labels corresponding to the protection group to a routing terminal node; when the main route path has a fault, the available standby route path is obtained according to the marked route next hop label in the protection group, and the service path is switched according to the standby path.
Preferably, writing the labels of the primary path and the backup path into the protection group specifically includes: the routing source node of each routing path distributes labels for the routing path and issues the labels to the intermediate switching node of the route; and the route intermediate switching node generates a protection group according to the next hop of the route and distributes the label route generated by the protection group to the route terminal node.
Preferably, the allocating, by the route source node of each route path, a label to the route path where the route source node is located specifically includes: the route source node allocates a label to each instance of the service, and the label is multiplexed by the routes on all the service paths of the instance.
Preferably, the obtaining an available standby routing path according to the labeled next hop label of the route in the protection group specifically includes: the intermediate route switching node acquires the next hop and the label of the route issued by the route source node, and adds the next hop in the route path into the label to generate the composite index.
Preferably, the obtaining an available standby routing path according to the next hop label of the routing path in the protection group specifically includes: and acquiring all next hops of the standby path in the protection group, generating a label according to the next hops of the standby path, and issuing the label to the intermediate switching node of the route.
Preferably, when the main routing path fails, a timeout timer is started; and deleting the protection group and the corresponding label after the timer is overtime.
Preferably, writing the labels of the active path and the standby path into the protection group further includes: when a route source node receives a route issued by an intermediate switching node of the route, checking whether the same route exists in a local routing table or not, and if so, adding an extended attribute into a route attribute; and only when the attributes of the intermediate switching nodes of all the routes carry the extended attributes, the route terminal node generates a label protection group.
Preferably, the switching of the service path according to the standby routing path specifically includes: and according to the next hop in the backup path recorded in the protection group, carrying out batch switching on the transfer nodes in all the routes in the service path.
Preferably, when the routing path includes a single-homed route, all routes forming frr share one label, and all routes that are single-homed to the same routing intermediate switching node share another label.
On the other hand, the invention provides a device for protecting frr scenes, which specifically comprises the following steps: the method comprises at least one processor and a memory, wherein the at least one processor and the memory are connected through a data bus, and the memory stores instructions capable of being executed by the at least one processor, and the instructions are used for completing the method for protecting the frr scene in the first aspect after being executed by the processor.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: multiplexing labels for the same service instance, and issuing the available routing path in a protection group form to complete frr scene protection. The invention can complete the record of the route path by only using one label through processing the next hop and the label, reduces the label space used by the protection resource record, forms an index relation between the label and the protection, can realize the batch switching of the path when switching, reduces the amount of the stored protection resource, and ensures the rapid switching of the service.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The present invention is an architecture of a system with specific functions, and therefore, in the specific embodiment, the functional logic relationship of each structural module is mainly described, and the specific software and hardware implementation is not limited.
In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other. The invention will be described in detail below with reference to the figures and examples.
Example 1:
when a router or a device such as a Radio Access Network (IP Network, abbreviated as IPRAN) processes a label route, Fast route scene protection is required. In BGP service scenes such as HVPN/HoVPN/cross-domain OPTION B/EVPN MSPW, equipment in middle exchange of an inner-layer service label is called a middle exchange node, a node generating a route is a route source node, a route destination node is called a route terminal node, the service needs to perform forwarding action of service label exchange on the middle exchange node or the cross-domain node, and the middle exchange node or the cross-domain node realizes the function of a label exchange node at the edge of an autonomous system. In the redundant networking model, the conventional method is to form frr or ECMP at both ends of the service, and the intermediate switching node of the route does not protect the service performing label switching. This approach is too dependent on protocol convergence performance in some scenarios to guarantee high reliability. On the other hand, for some intermediate routing switching nodes, since the label space of the device is small, in order to ensure the space usage of the service label, the number of labels used for scene protection needs to be reduced.
In the traffic routing topology model shown in fig. 1, a CE is a domain edge node and is also a routing source node of a complete forwarding path CE-PE 4. PE1 and PE2 are the routing source nodes of two alternative routing paths PE1-PE3 and PE2-PE3, respectively, and are also the intermediate switching nodes of the CE-PE4 complete path. PE3 is an intermediate switching node, and PE4 is a route terminating node. Due to network planning requirements, the traffic label L3VPN label in the figure needs to be exchanged at PE3, and finally an FRR protection group to PE4-CE is formed atPE 4. The route convergence sequence of the main route path is PE4- > PE3- > PE1- > CE, and the route convergence sequence of the standby route path is PE4- > PE3- > PE2- > CE. However, since PE4 cannot sense power failure of PE1, traffic can be switched to PE4- > PE3- > PE2- > CE only according to the notification of PE3 after BGP route convergence.
The method for protecting the frr scene provided by this embodiment is described below by taking the network topology model in fig. 1 as an example. This topology model is simply a simplified model for ease of description, and in a specific implementation, the next hop and specific label content in the following description are determined according to the actual network topology.
As shown in fig. 2, the method for protecting the frr scene provided by the embodiment of the present invention includes the following specific steps:
step 101: and the route terminal node writes the labels of the main path and the standby path into the protection group according to the next hop of each route path, and issues the label corresponding to the protection group to the route terminal node.
As shown in fig. 1, the routing intermediate switching node PE3 receives different labels of the same prefix from different paths, such as PE2 and PE1, and forms FRR protection on different physical paths. In the main routing path, the next hop of the routing source node CE isPE 1; in the backup routing path, the next hop of the routing source node CE isPE 2.
In this embodiment, in order to reduce the usage amount of the label, the routing source node operates based on a label allocation manner of each label in each vpn (virtual private network) instance, and for one service instance, both the active routing path and the standby routing path use the same label. The route label distribution mode of the route source node is each label of each instance. All the service routes in the example share one label, the intermediate switching node adopts each label of each next hop, writes the next hop of the node into the label distributed by the route source node, and distributes the local incoming label for the index according to the next hop of the route and the label carried by the next hop of the route. By the label distribution mode, the route source node distributes a label for each example of the service, and the routes on all service paths of the example multiplex the label, so that the label storage space is saved, and the paths can be conveniently searched during path switching.
In the network topology shown in fig. 1, the primary routing path is CE-PE1-PE3-PE4, the routing source node is CE, the intermediate switching nodes are PE1 and PE3, and the routing end node isPE 4. After the route source node CE generates the first route, the route source node CE distributes a label according to the instance to which the route belongs, and then issues the label to the route intermediate switching nodes PE1 andPE 3. After receiving the route, the intermediate switching nodes PE1 and PE3 distribute labels for the route according to the principle of each label per next hop, and finally issue the route to the routeend node PE 4. When the same instance of the CE issues the same type of route to the routing switch node, the routing switch nodes PE1 and PE3 only need to check the next hop and the label index, and can multiplex the label.
In the network topology of fig. 1, in order to form frr scenario protection, an alternate route is also written into a label and issued to a route termination node. The standby path is CE-PE2-PE3-PE4, the routing source node is CE, the routing intermediate switching nodes are PE2 and PE3, and the routing end node isPE 4. When the route source node CE of the standby route path generates a route identical to the route source node PE1 of the primary route path, a label is allocated to the standby route path according to the previous principle of each label per next hop, and the route is issued to the intermediate switching nodes PE1 andPE 3. If the two paths belong to the same service instance, the two paths share the same label and are merged at the same routingintermediate node PE 3.
At this time, both the active route path and the standby route path in the network topology are issued to the intermediate route switching node PE3 in the form of labels, and the intermediate route switching node PE3 generates a label protection group using the next hop and label of the route source node CE, the next hop and label of the route of the intermediate route switching node PE1, and the next hop and label of the route of the intermediate route switching node PE2, and then allocates a label to the protection group and issues to the route terminatingnode PE 4. The protection group received by the route terminating node PE4 includes the next hop of the primary route path issued by the intermediate switching node PE1 and the next hop of the backup route path issued by the intermediate switching node PE2, and completes the scenario protection of frr.
Step 102: when the main route path has a fault, the available standby route path is obtained according to the marked route next hop label in the protection group, and the service path is switched according to the standby path.
As in the network topology of fig. 1, if a path from the intermediate switching node PE1 to the intermediate switching node PE3 fails, the primary routing path fails and is unavailable. At this time, the routing path needs to be switched to the standby routing path where the intermediate switching node PE2 is located. At this time, the protection groups on the intermediate switching node PE3 and the final node PE4 both include the next hop information in the backup routing path, so that according to the next hop in the backup routing recorded in the protection group, the intermediate switching nodes in all the routes in the service path are switched in batch to complete the switching of the main and backup paths.
When the primary routing path fails, before the routing completely converges, forwarding of the intermediate switching node PE3 maintains a plurality of incoming labels, which are a local incoming label generated by a next hop label carried by a route issued by the intermediate switching node PE1 of the primary routing path, a label formed by a prefix and a next hop carried by a route issued by the intermediate switching node PE2 of the standby routing path, and a protection group label formed according to frr routing correlation attributes generated by PE1 and PE2, where the protection group label includes the next hop of the route generated by PE1 and a composite index generated by the label added by the next hop of the route generated by PE2, and the next hop information can be forwarded by the protection group completely acquiring all routes of the primary routing path and the standby routing path, thereby ensuring that traffic before and after the convergence of PE4 can be normally forwarded.
After thesteps 101 to 102 provided in this embodiment, the source nodes of the primary routing path and the backup routing path respectively issue corresponding labels, and the route protection group is executed on the intermediate routing switching node, so that the intermediate routing switching node and the route termination node can obtain next hop information of two routing paths through one label, and only occupy the space of one label to process the relationship between a large number of prefixes, labels, and a small number of physical protections, thereby effectively performing label service switching, reducing protection switching time, and saving protection resources.
As shown in fig. 3, instep 101, the labels of the active path and the standby path may be written into the protection group through the following specific steps.
Step 201: and the routing source node of each routing path distributes labels for the routing paths and issues the labels to the routing intermediate switching nodes.
As shown in fig. 4, a route source node CE of the main route path generates a label ILM [0], where ILM [0] respectively passes through a route intermediate switching node PE1 of the main route path and a route intermediate switching node PE2 of the standby route path to add corresponding path next hop information, and in this embodiment, the label ILM [0] passes through a route transmission route of CE- > PE2- > PE3- > PE4 and CE- > PE1- > PE3- > PE4 according to a transmission manner of a normal route label until reaching a routeend node PE 4. ILM [0] is the incoming LABEL used by the service instance, DEST is the prefix address, NEXT-HOP-PRI is the primary NEXT HOP, OUT-LABEL-PRI is the primary outgoing LABEL, NEXT-HOP-BAK is the standby NEXT HOP, OUT-LABEL-BAK is the primary NEXT HOP, and ACT is the LABEL action. In fig. 4, L0_1, L1_1, L2_1, L3_1, and L3_2 are respectively in-tags assigned by CE, PE1, PE2, and PE3 according to their next hops, where L3_2 is an frrtag replacing L3_ 1. In the above labels, the next hop and the different prefixes with the same service label may multiplex the same label, that is, the ILM [0] label allocated by the route source node CE, because the route prefixes are different but the paths are the same.
Step 202: and the route intermediate switching node generates a protection group according to the next hop of the route and distributes the label route generated by the protection group to the route terminal node.
When receiving the route from the route source node CE issued by the intermediate switching node PE1 of the main routing path, the intermediate switching node PE3 generates a new label L3_1 according to the next hop and the service label, and issues the new label L3_1 to the routeend node PE 4. Meanwhile, the intermediate routing switching node PE3 receives the route from the routing source node CE issued by the intermediate routing switching node PE2 of the backup routing path. The intermediate routing switching node PE3 obtains the routing information of the primary routing path and the backup routing path, respectively, through the routing distribution of the intermediate routing nodes PE1 and PE2, and forms frr. At this time, the intermediate routing switching node PE3 may obtain the next hop and the label of the route issued by the routing source node according to the intermediate routing switching node, add the next hop in the routing path to the label to generate a composite index, and use the conforming index as a protection group. In the network topology of fig. 1, the intermediate routing switching node PE3 generates a new label L3_2 of frr according to addresses of two next hops PE1 and PE2 routed by the route source node CE, that is, addresses of PE1 and PE2 and service labels L1_1 and L2_1 respectively advertised, and by using a label prefix allocated by the CE as an index, and advertises a label bound to the frr protection group to the routeend node PE 4. The new label L3_2 includes the next hop information of the two routing paths released by PE1 and PE2, that is, the frr protection group between the routing source node and the routing destination node on the network topology. In the above process, the way in which the intermediate switching node PE3 generates the protection group is independent of the order and number of the received route advertisements, and it is only necessary to write all the received routes into the protection group.
Through thesteps 201 to 202, the route path information can be conveniently and quickly issued to the intermediate switching node of the route requiring path switching through the existing route label issuing mechanism, so as to generate a protection group for use in the route switching.
In the method provided by this embodiment, the whole process from learning to switching uses at most 3 tags L3_1, L3_2, andL3_ 3. Furthermore, in an actual use scene, if the link can be kept stable, only 1-2 tags can be stored for a long time by releasing useless L3_1 and L3_3 tags, so that the occupation of tag space is further reduced.
Instep 102, as shown in fig. 5, when the main routing path CE-PE1-PE3-PE4 fails, for example, the intermediate switching node PE1 loses power. At this time, the routing intermediate node PE3 switches according to the backup path in the frr protection group L3_2 formed last on the node. Specifically, the intermediate routing switching node PE3 obtains all next hops of the backup path in the protection group, generates a label according to the next hops of the backup path, and issues the label to the intermediate switching node PE2 that routes the backup routing path. By this way, the intermediate switching node PE3 can quickly obtain the backup route path information, shorten the switching time as much as possible, and perform protocol convergence after switching, thereby speeding up the convergence. On the other hand, when the method is used for switching, the routing terminal node PE4 does not need to sense the power failure of the PE1 and does not need to perform extra operation or adjustment, so that the user experience is improved, and the transmission efficiency is ensured.
Further, after a routing path fails, the failed routing path is equivalent to an existing routing path in the network topology, there is only one routing path in the network topology, and frr cannot be formed. However, if the protection group is deleted immediately after the switching, since the route terminating node cannot immediately sense the failure, packet loss may be caused, and therefore, processing for delaying deletion may also be added. Specifically, as shown in fig. 5, when the power of the intermediate routing switching node PE1 of the active routing path is lost, the intermediate routing switching node PE3 starts a timeout timer, the intermediate routing switching node PE3 that stores the protection group information completes frr switching, generates an L3_3 label for the route issued by PE2 again, issues the label to PE4, and switches the service to the standby routing path CE-PE2-PE3-PE 4. When performing frr switching, the packet transmission of the route terminating node PE4 has a process of switching from L3_1 to L3_2, and in this process, since L3_1 on PE3 is not deleted, no packet loss is formed. By delaying the deletion process, in the route switching process of PE4, since L3_2 in the protection group is not deleted yet and there is an available route path, no packet loss is caused. In a specific implementation scenario, the timeout time of the timer is determined according to a specific routing device configuration or a service requirement, and in a general scenario, the timeout time may be set to 30 s.
In some specific implementation scenarios, a situation may occur where the route has only one source, that is, the service single belongs to, as shown in fig. 6, the routing source node CE2 only establishes a neighbor with the intermediate switching node PE1, so that the service route generated by CE2 only passes through PE1 and does not pass throughPE 2. In this scenario, when the route source node instep 101 performs label assignment, all routes forming frr share one label, and all routes that belong to the same route intermediate switching node share another label. When PE1 issues routes of CE2 and CE1 to PE3, PE3 determines the type of label to be issued according to the number of next hops generated by the service route. For example: the service route generated by CE1 has two next hops, PE1 and PE2, which are dual-homed routes and correspond to a dual-hook service; only one next hop of the service route generated by CE2 is PE1, which is a single-homed route and corresponds to a single-hook service. Thus, PE3 can easily distinguish between the different types of routes generated by CE2 and CE1 and apply different labels for the different types of traffic routes to be issued toPE 4. At this point, all routes forming frr share one label, and all routes of the single-homed PE1 share another label. When the routing is switched, the frr routing and the single attribution routing can be distinguished through different labels, and switching is only carried out in the frr routing, so that the routing error is avoided or the routing convergence efficiency is prevented from being influenced.
Further, in some specific implementation scenarios, after part of the CE routes are changed from a dual-hook service to a single-hook service due to a link problem, a service loss problem may occur. As shown in fig. 6, the frr generation method in the normal dual-hook routing scenario is referred to as a class a routing. In actual engineering operation, due to some faults, part of the dual-homed routes are changed into single-homed routes, for example, routes 1.1.1.0/24 are issued by PE1 and PE2, and PE1 withdraws routes 1.1.1.0/24 for some reasons, at this time, in the protection group on PE3, the routes that are single-homed 1.1.1.0/24 have already failed, but are still valid for other dual-homed routes, so PE3 only withdraws the route 1.1.1.0/24 from the protection group, and generates an entry label L3_3 specially for forwarding. Further, since the publication of the bgp route requires time, before PE4 receives the update message, PE4 still uses the frr label L3_2, so that the traffic flow still flows to PE1, resulting in packet loss. In order to solve the problem, a bgp route reflector may be configured on PE3, and clients of the bgp route reflector are set as PE1 and PE2, so that PE1 and PE2 may learn all routes of the other side to generate ip-frr protection, and even if a service is forwarded to PE1 due to an erroneous route label in a protection group, the same route issued by PE2 may be found on PE1, and further forwarded to PE2 through PE1 to obtain a correct exit.
Further, in order for PE3 to correctly know that ip-frr protection is generated on both PE1 and PE2, a private extended community attribute (ext-community attribute) may be introduced to announce the message. Specifically, the extended attribute of the label may be used for identifying, when the route source node receives the route issued by the intermediate switching node of the route, it is checked whether the same route exists in the local routing table, and if the same route exists, the extended attribute is added to the route attribute. And only when the attributes of the intermediate switching nodes of all the routes carry the extended attributes, the route terminal node generates a label protection group. In practical use, the extended attribute may be defined as required, for example, specifically, a private ext-community attribute is defined to notify that PE4 at the far end has formed ip-frr protection on the source end PE1 and PE2 of the route. The specific values of the attributes are: high type 0x03 low type 0xf0payload bgp router-id. When PE1 receives the route issued by its peer PE2, PE1 checks whether there is the same route in the local private network routing table, and if so, reissues the route and adds the private ext-community attribute to the route attribute for notifying the opposite end that an ip-frr has been generated locally. As shown in fig. 7, only when PE3 checks that the routes from PE1 and PE2 both carry the attribute, the exchange label frr protection is generated, which ensures that no traffic packet is lost when label frr protection is generated on PE3, regardless of local link failure or traffic route withdrawal. Wherein, ILM [0] and ILM [1] are both expressed as the label of the routing table, FTN-DEST has been deleted, rd is route-distinguish route identification, which is mostly used in mpls multi-label protocol switching network for distinguishing different vpns.
The method for protecting the frr scene provided by this embodiment can rapidly and simply complete batch switching of paths in the frr scene by using as few labels as possible, reduce resource occupation of the labels, and improve the processing efficiency of the routing path failure.
Example 2:
on the basis of the method for protecting the frr scene provided by theabove embodiment 1, the present invention further provides a device for protecting the frr scene, which is capable of implementing the above method, as shown in fig. 8, which is a schematic diagram of a device architecture according to an embodiment of the present invention. The apparatus for frr scene protection of the present embodiment comprises one ormore processors 11 and amemory 12. In fig. 8, oneprocessor 11 is taken as an example.
Theprocessor 11 and thememory 12 may be connected by a bus or other means, and fig. 8 illustrates the connection by a bus as an example.
Thememory 12, which is a non-volatile computer-readable storage medium for the frr scene protection method, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the frr scene protection method inembodiment 1. Theprocessor 11 executes various functional applications and data processing of the apparatus for frr scene protection, i.e. implements the method for frr scene protection ofembodiment 1, by running non-volatile software programs, instructions and modules stored in thememory 12.
Thememory 12 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, thememory 12 may optionally include memory located remotely from theprocessor 11, and these remote memories may be connected to theprocessor 11 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in thememory 12 and, when executed by the one ormore processors 11, perform the method ofembodiment 1 described above, e.g., perform the various steps shown in fig. 2 and 3 described above.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the embodiments may be implemented by associated hardware as instructed by a program, which may be stored on a computer-readable storage medium, which may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The above description is intended to be illustrative of the preferred embodiment of the present invention and should not be taken as limiting the invention, but rather, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.