Method, communication device, storage medium and system for processing routing messages

By using a standard unified routing message format for data synchronization between BGP routing units, the synchronization failure problem caused by incompatible data formats is solved, ensuring the reliability of the system and the continuity of routing processing.

CN115190061BActive Publication Date: 2025-10-03HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210685994.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-04
Publication Date
2025-10-03
Estimated Expiration
2040-06-04

AI Technical Summary

Technical Problem

When data formats between BGP routing units are incompatible or the data transmission and reception capabilities are insufficient, data synchronization fails, which in turn causes the backup routing unit to be unable to take over the tasks of the main routing unit, affecting system reliability.

Method used

The routing data is synchronized in the form of routing messages, using a standard unified message format to ensure compatibility between different routing processing units and avoid modifying the routing processing units to achieve data synchronization.

Benefits of technology

It achieves seamless data synchronization between different routing processing units, ensures system reliability and routing processing continuity, and reduces modification workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115190061B_ABST
    Figure CN115190061B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, communication device, storage medium, and system for processing routing messages, which belong to the field of communication technology. In the embodiments of the present application, routing processing units synchronize data in the form of messages. Since the format of the messages is standard and unified, after synchronizing the data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, the routing processing units will not be modified accordingly, and routing data synchronization will not fail. In other words, synchronizing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats. Moreover, when the routing message carries new attributes, the routing processing unit can receive it without modification, which relatively reduces a lot of modification work.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the application submitted to the State Intellectual Property Office of China with an application date of June 4, 2020, application number 202010500275.7, and invention name “Method, communication equipment, storage medium and system for processing routing messages”. Technical Field

[0002] The embodiments of the present application relate to the field of communication technology, and in particular to a method, communication device, storage medium, and system for processing routing messages. Background Art

[0003] Border Gateway Protocol (BGP) Non-Stop Routing (NSR) technology can ensure that BGP neighbors and BGP routes are not interrupted when equipment fails, thereby improving system reliability. In the specific implementation process, system reliability is improved through the hardware level or the software level. Taking the improvement of system reliability at the software level as an example, the traditional system architecture is deployed with two routing units, namely the main routing unit and the backup routing unit. When the main routing unit fails, the backup routing unit can take over the tasks of the main routing unit. Among them, these two routing units can implement the routing processing function of BGP, and the main routing unit can also synchronize the relevant data of the main routing unit to the backup routing unit.

[0004] In a specific implementation, when the main routing unit senses that the backup routing unit is online, the main routing unit needs to proactively synchronize BGP neighbor information, routes received from neighbors (Route information base Input, RibIn), routes sent to neighbors (Route information base Output, RibOut), routing attributes, and other data to the backup routing unit. Once the main routing unit fails, the backup routing unit can take over the main routing unit's tasks based on the synchronized data. However, if the data formats supported by the main routing unit and the backup routing unit are incompatible, or if the routing unit does not have the ability to send and receive certain data, data synchronization will fail, and the backup routing unit will be unable to take over the main routing unit's tasks. Summary of the Invention

[0005] The present invention provides a method, communication device, storage medium, and system for processing routing messages, which can ensure the compatibility of routing processing units with multiple data formats by synchronizing routing data in the form of messages. The technical solution is as follows:

[0006] In a first aspect, a method for processing routing messages is provided. In this method, a backup routing fault-tolerant unit obtains multiple inbound routing messages from a first routing processing unit through a forwarding unit and a primary database unit. The first routing processing unit is a routing processing unit corresponding to the primary routing fault-tolerant unit. The backup routing fault-tolerant unit sends the multiple inbound routing messages from the first routing processing unit to a second routing processing unit. The second routing processing unit is a routing processing unit corresponding to the backup routing fault-tolerant unit.

[0007] Since the second routing processing unit can obtain the routing information received by the first routing processing unit, when the routing fault-tolerant unit corresponding to the second routing processing unit is promoted to the master, the forwarding table in the forwarding unit will remain correct, or remain correct to a large extent.

[0008] Moreover, in the embodiment of the present application, data is synchronized between routing processing units in the form of messages. Since the format of the messages is standard and unified, after synchronizing the data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, the routing processing units will not be modified accordingly, and the routing data synchronization will not fail. In other words, synchronizing routing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats, and when new attributes are carried in the incoming routing message, the routing processing unit can receive it without modification, which relatively reduces a lot of modification work.

[0009] Since the online time of the routing processing units deployed in the embodiments of the present application may be different, for the routing processing units that have been online other than the first routing processing unit, the routing fault-tolerant units corresponding to these routing processing units are the backup routing fault-tolerant units, and these backup routing fault-tolerant units can read the relevant data of the first routing processing unit from the main database unit. Moreover, after the forwarding unit receives the inbound routing message, it is also necessary to send the inbound routing message to these backup routing fault-tolerant units. In this way, these backup routing fault-tolerant units can not only receive the inbound routing message sent by the forwarding unit, but also read the inbound routing message from the main database unit. However, there are multiple ways to implement which message the backup routing fault-tolerant unit obtains. Two of these ways are introduced below.

[0010] In the first mode, the backup routing fault-tolerant unit receives an inbound routing message from the forwarding unit. If the backup routing fault-tolerant unit is not in real-time protection mode, the backup routing fault-tolerant unit discards the inbound routing message from the forwarding unit and reads multiple inbound routing messages from the first routing processing unit from the primary database unit. If the backup routing fault-tolerant unit is in real-time protection mode, the backup routing fault-tolerant unit obtains multiple inbound routing messages from the first routing processing unit through the forwarding unit.

[0011] That is, in the first method described above, before the backup routing fault-tolerant unit enters the real-time protection state, it discards incoming routing messages from the forwarding unit and instead reads incoming routing messages from the primary database unit. After entering the real-time protection state, the backup routing fault-tolerant unit no longer reads incoming routing messages from the primary database unit, but instead obtains incoming routing messages from the forwarding unit.

[0012] The real-time protection state refers to the state in which the routing processing unit corresponding to the backup routing fault-tolerant unit can take over the work of the routing processing unit corresponding to the main routing fault-tolerant unit. That is, when the routing processing unit corresponding to the main routing fault-tolerant unit fails, or the main routing fault-tolerant unit fails, the leader election service (LES) can elect a routing fault-tolerant unit from the backup routing fault-tolerant units that are already in the real-time protection state as the main routing fault-tolerant unit, and the routing processing unit corresponding to the re-elected main routing fault-tolerant unit can establish a routing neighbor with the routing node and send and receive BGP routes, so as to achieve uninterrupted BGP neighbors and uninterrupted BGP routes. It can also be understood that the inbound routing messages read from the main database unit by the backup routing fault-tolerant unit in the real-time protection state and the inbound routing messages received by the backup routing fault-tolerant unit from the forwarding unit are seamlessly connected, ensuring that the routing processing unit corresponding to the main routing fault-tolerant unit and the routing processing unit corresponding to the backup routing fault-tolerant unit maintain ultimate consistency.

[0013] In the second mode, the backup routing fault-tolerant unit receives inbound routing messages from the forwarding unit and, at the same time, reads inbound routing messages from the first routing processing unit from the primary database unit. When the last inbound routing message read from the primary database unit is identical to or adjacent to an inbound routing message from the forwarding unit, the backup routing fault-tolerant unit stops reading inbound routing messages from the primary database unit.

[0014] That is, in the second method, it is not necessary to determine whether the backup routing fault-tolerant unit is in the real-time protection state, but rather to obtain inbound routing messages from the forwarding unit and the main database unit at the same time. When the last inbound routing message obtained from the main database unit is the same as or adjacent to an inbound routing message obtained from the forwarding unit, it indicates that the inbound routing message obtained by the backup routing fault-tolerant unit from the main database unit and the inbound routing message obtained by the backup routing fault-tolerant unit from the forwarding unit are seamlessly connected. In this way, the subsequent inbound routing message can be directly received from the forwarding unit without having to obtain the inbound routing message from the main database unit, thereby ensuring that the routing processing unit corresponding to the main routing fault-tolerant unit and the routing processing unit corresponding to the backup routing fault-tolerant unit maintain ultimate consistency.

[0015] It should be noted that the inbound routing message can carry a message number. In this way, through the message number in the inbound routing message, it can be determined whether the last inbound routing message read by the backup routing fault-tolerant unit from the main database unit is the same as or adjacent to an inbound routing message from the forwarding unit.

[0016] Optionally, in some embodiments, the backup routing fault-tolerant unit can also send multiple inbound routing messages from the first routing processing unit to the backup database unit, which then stores the multiple inbound routing messages from the first routing processing unit. In this way, after the backup routing fault-tolerant unit is selected as the new master routing fault-tolerant unit, other online backup routing fault-tolerant units can also obtain these inbound routing messages from the backup database unit.

[0017] In an embodiment of the present application, not only inbound routing messages can be processed, but outbound routing messages can also be processed. For outbound routing messages, the standby routing fault-tolerant unit obtains multiple outbound routing messages from the second routing processing unit. The standby routing fault-tolerant unit obtains multiple outbound routing messages from the first routing processing unit through the forwarding unit and the main database unit. The standby routing fault-tolerant unit determines routing update information based on the multiple outbound routing messages of the second routing processing unit and the multiple outbound routing messages of the first routing processing unit. After the standby routing fault-tolerant unit switches to the new main routing fault-tolerant unit, the new main routing fault-tolerant unit sends routing update information to the third routing processing unit. The third routing processing unit refers to the routing processing unit corresponding to the standby routing fault-tolerant unit other than the new main routing fault-tolerant unit.

[0018] In the embodiment of the present application, data is synchronized between routing processing units in the form of messages. Since the format of the messages is standard and unified, after synchronizing data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, it will not cause routing data synchronization failure. In other words, synchronizing routing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats, and when new attributes are carried in the outgoing routing message, the routing processing unit can receive them without modification, which relatively reduces a lot of modification work. At the same time, after the second routing processing unit obtains the routing information sent by the first routing processing unit, it can also compare the routing information sent by the first routing processing unit with the route it wants to send to determine the routing update information. In this way, when the routing fault-tolerant unit corresponding to the second routing processing unit becomes the master, it can modify the routing information previously published by the first routing processing unit that is incorrect for the second routing processing unit, thereby avoiding the existence of incorrect routing information in the network.

[0019] Based on the above description, the routing processing units in the embodiment of the present application do not have a master-slave relationship, so each routing processing unit may send an outbound routing message to the corresponding routing fault-tolerant unit. However, the routing fault-tolerant units have a master-slave relationship, and the first routing processing unit has established a neighbor relationship with the routing node. Therefore, the master routing fault-tolerant unit can send the outbound routing message sent by the first routing processing unit to the routing node through the forwarding unit, but the backup routing fault-tolerant unit cannot send the outbound routing message sent by the second routing processing unit to the routing node through the forwarding unit, and can only locally store the outbound routing message sent by the second routing processing unit.

[0020] In this way, when the first routing processing unit fails or the main routing fault-tolerant unit fails, if a backup routing fault-tolerant unit is elected as the new main routing fault-tolerant unit, then, in order to ensure that the routing processing unit corresponding to the new main routing fault-tolerant unit can smoothly take over the tasks of the original first routing processing unit, the new main routing fault-tolerant unit will compare the multiple outgoing routing messages of the second routing processing unit with the multiple outgoing routing messages of the first routing processing unit. If there are differences between the multiple outgoing routing messages of the second routing processing unit and the multiple outgoing routing messages of the first routing processing unit, the new main routing fault-tolerant unit can determine routing update information based on the multiple outgoing routing messages of the second routing processing unit and the multiple outgoing routing messages of the first routing processing unit.

[0021] The route update information may include routes that need to be updated, which may also be understood as routes that need to be modified, and may also include routes that need to be revoked.

[0022] It should be noted that the backup routing fault-tolerant unit can determine the above-mentioned routing update information before switching to the new primary routing fault-tolerant unit, or it can determine the above-mentioned routing update information after switching to the new primary routing fault-tolerant unit. The embodiment of the present application does not limit the timing of determining the routing update information. In the latter case, the above-mentioned backup routing fault-tolerant unit is actually the new primary routing fault-tolerant unit.

[0023] In an embodiment of the present application, the online time of the deployed routing processing units may be different. For the routing processing units that have been online other than the first routing processing unit, the routing fault-tolerant units corresponding to these routing processing units are the standby routing fault-tolerant units. These standby routing fault-tolerant units can read the relevant data of the first routing processing unit from the main database unit. Moreover, after the forwarding unit receives the outgoing routing message, it is also necessary to send the outgoing routing message to these standby routing fault-tolerant units. In this way, these standby routing fault-tolerant units can not only receive the outgoing routing message sent by the forwarding unit, but also read the outgoing routing message from the main database unit. However, there are multiple ways to implement which message the standby routing fault-tolerant unit obtains. Two of these ways are introduced below.

[0024] In the first mode, the backup routing fault-tolerant unit receives an outbound routing message from the forwarding unit. If the backup routing fault-tolerant unit is not in real-time protection mode, the backup routing fault-tolerant unit discards the outbound routing message from the forwarding unit and reads the outbound routing message from the first routing processing unit from the primary database unit. If the backup routing fault-tolerant unit is in real-time protection mode, the backup routing fault-tolerant unit obtains multiple outbound routing messages from the first routing processing unit through the forwarding unit.

[0025] That is, in the first method described above, before the backup routing fault-tolerant unit enters the real-time protection state, it discards outbound routing messages from the forwarding unit and instead reads outbound routing messages from the primary database unit. After entering the real-time protection state, the backup routing fault-tolerant unit no longer reads outbound routing messages from the primary database unit, but instead obtains outbound routing messages from the forwarding unit.

[0026] In the second mode, the standby routing fault-tolerant unit receives outbound routing messages from the forwarding unit and, at the same time, reads outbound routing messages from the first routing processing unit from the main database unit. When the last outbound routing message read from the main database unit is the same as or adjacent to an outbound routing message from the forwarding unit, the standby routing fault-tolerant unit stops reading outbound routing messages from the main database unit.

[0027] That is, in the second method, it is not necessary to determine whether the backup routing fault-tolerant unit is in the real-time protection state, but rather to obtain outbound routing messages from the forwarding unit and the main database unit at the same time. When the last outbound routing message obtained from the main database unit is the same as or adjacent to an outbound routing message obtained from the forwarding unit, it means that the outbound routing message obtained by the backup routing fault-tolerant unit from the main database unit and the outbound routing message obtained by the backup routing fault-tolerant unit from the forwarding unit are seamlessly connected. In this way, the outbound routing message can be directly received from the forwarding unit in the future without having to obtain the outbound routing message from the main database unit, which can ensure that the routing processing unit corresponding to the main routing fault-tolerant unit and the routing processing unit corresponding to the backup routing fault-tolerant unit maintain ultimate consistency.

[0028] It should be noted that the outbound routing message can carry a message number. In this way, through the message number in the outbound routing message, it can be determined whether the last outbound routing message read by the backup routing fault-tolerant unit from the main database unit is the same as or adjacent to an outbound routing message from the forwarding unit.

[0029] Optionally, in some embodiments, after the standby routing fault-tolerant unit obtains multiple outgoing routing messages of the first routing processing unit in the above manner, the standby routing fault-tolerant unit can also send the multiple outgoing routing messages of the first routing processing unit to the standby database unit, and the standby database unit stores the multiple outgoing routing messages of the first routing processing unit.

[0030] In an embodiment of the present application, the inbound routing message and the outbound routing message of the first routing processing unit can both be BGP messages, interior gateway protocols (IGP) messages, or label distribution protocol (LDP) messages. Of course, they can also be other messages. Among them, the IPG message can be an intermediate system to intermediate system (ISIS) message or an open shortest path first (OSPF) message. Optionally, the outbound routing messages of other routing processing units can also be these messages.

[0031] In a second aspect, a method for processing routing messages is provided, in which a standby routing fault-tolerant unit obtains multiple outgoing routing messages from a second routing processing unit, where the second routing processing unit refers to the routing processing unit corresponding to the standby routing fault-tolerant unit. The standby routing fault-tolerant unit obtains multiple outgoing routing messages from a first routing processing unit through a forwarding unit and a main database unit, where the first routing processing unit refers to the routing processing unit corresponding to the main routing fault-tolerant unit. The standby routing fault-tolerant unit determines routing update information based on the multiple outgoing routing messages from the second routing processing unit and the multiple outgoing routing messages from the first routing processing unit. After the standby routing fault-tolerant unit switches to a new main routing fault-tolerant unit, the new main routing fault-tolerant unit sends routing update information to a third routing processing unit, where the third routing processing unit refers to the routing processing unit corresponding to the standby routing fault-tolerant unit other than the new main routing fault-tolerant unit.

[0032] It should be noted that the methods for processing inbound routing messages and outbound routing messages provided in the embodiments of the present application can be combined. Of course, the methods for processing inbound routing messages provided in the embodiments of the present application can also be combined with the methods for processing outbound routing messages in the related art, and the methods for processing outbound routing messages provided in the embodiments of the present application can also be combined with the methods for processing inbound routing messages in the related art.

[0033] In a third aspect, a communication device is provided, comprising a backup routing fault-tolerant unit, wherein the backup routing fault-tolerant unit has the function of implementing the method for processing routing messages in the first aspect. The backup routing fault-tolerant unit includes one or more modules, wherein the one or more modules are used to implement the method for processing routing messages provided in the first aspect.

[0034] In a fourth aspect, a communication device is provided, comprising a backup routing fault-tolerant unit, wherein the backup routing fault-tolerant unit has the function of implementing the method for processing routing messages in the second aspect. The backup routing fault-tolerant unit includes one or more modules, wherein the one or more modules are used to implement the method for processing routing messages provided in the second aspect.

[0035] In a fifth aspect, a communication device is provided, comprising a processor and a memory, wherein the memory is configured to store a program for executing the method for processing routing messages provided in the first aspect, and to store data involved in implementing the method for processing routing messages provided in the first aspect. The processor is configured to execute the program stored in the memory. The operating device of the storage device may further include a communication bus, which is configured to establish a connection between the processor and the memory.

[0036] In a sixth aspect, a communication device is provided, comprising a processor and a memory, wherein the memory is configured to store a program for executing the method for processing routing messages provided in the second aspect, and to store data involved in implementing the method for processing routing messages provided in the second aspect. The processor is configured to execute the program stored in the memory. The operating device of the storage device may further include a communication bus, which is configured to establish a connection between the processor and the memory.

[0037] In a seventh aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer executes the method for processing routing messages described in the first aspect.

[0038] In an eighth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enables the computer to execute the method for processing routing messages described in the second aspect above.

[0039] In a ninth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for processing routing messages described in the first aspect above.

[0040] In a tenth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for processing routing messages described in the second aspect above.

[0041] In the eleventh aspect, a system for processing routing messages is provided, the system comprising: a routing node and a communication device, the communication device comprising a backup routing fault-tolerant unit, the backup routing fault-tolerant unit being used to implement the steps of the method described in the first aspect above, or to implement the steps of the method described in the second aspect above.

[0042] The technical effects obtained in the above-mentioned second to eleventh aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and will not be repeated here.

[0043] The technical solutions provided in the embodiments of the present application can at least bring the following beneficial effects:

[0044] In the embodiment of the present application, data is synchronized between routing processing units in the form of messages. Since the format of the messages is standard and unified, after synchronizing data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, the routing processing unit will not be modified accordingly, and routing data synchronization will not fail. In other words, synchronizing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats. Moreover, when the routing message carries new attributes, the routing processing unit can receive it without modification, which relatively reduces a lot of modification work. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0046] Figure 2 This is a schematic diagram of an implementation environment provided by an embodiment of the present application, taking BGP as an example;

[0047] Figure 3 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0048] Figure 4 This is a flowchart of a method for processing an inbound routing message provided by an embodiment of the present application;

[0049] Figure 5 This is a flowchart of a method for processing inbound routing messages using BGP as an example provided in an embodiment of the present application;

[0050] Figure 6 This is a flow chart of a method for processing an outbound routing message provided by an embodiment of the present application;

[0051] Figure 7 This is a flowchart of a method for processing outbound routing messages using BGP as an example provided in an embodiment of the present application;

[0052] Figure 8 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0053] Figure 9 It is a structural diagram of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0055] For ease of understanding, before explaining in detail the method for processing routing messages provided in the embodiment of the present application, the implementation environment involved in the embodiment of the present application is first introduced.

[0056] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of an implementation environment involved in a method for processing routing messages provided in an embodiment of the present application. The system architecture involved in the implementation environment includes multiple routing processing units 101, multiple routing fault-tolerant units 102, multiple forwarding units 103, and multiple database units 104. The multiple routing processing units 101, multiple routing fault-tolerant units 102, multiple forwarding units 103, and multiple database units 104 correspond to each other one by one, that is, one routing processing unit 101 corresponds to one routing fault-tolerant unit 102, one forwarding unit 103, and one database unit 104.

[0057] The multiple routing processing units 101 can run in different virtual machines of the same communication device, or can run in different communication devices. Each routing processing unit can establish a session with a routing node. For example, for the BGP protocol, each routing processing unit can establish a Transmission Control Protocol (TCP) session with a routing node. Each routing processing unit in the multiple routing processing units 101 is used to implement routing processing functions.

[0058] The multiple routing fault-tolerant units 102 can run in different virtual machines of the same communication device, or can run in different communication devices, and the routing fault-tolerant units 102 can run in the same virtual machine of the same communication device as the corresponding routing processing unit 101, or can run in different virtual machines of the same communication device as the corresponding routing processing unit 101, or can run in different communication devices as the corresponding routing processing unit 101. However, under normal circumstances, the routing fault-tolerant unit 102 and the corresponding routing processing unit 101 run in the same virtual machine of the same communication device. Each routing fault-tolerant unit in the multiple routing fault-tolerant units 102 is used to implement a fault-tolerant function, that is, to synchronize the routing messages sent and received by the routing processing unit 101 that interacts with the routing node in the multiple routing processing units 101 to other routing processing units. The multiple routing fault-tolerant units 102 include a main routing fault-tolerant unit and at least one backup routing fault-tolerant unit, and the routing fault-tolerant unit 102 and the corresponding routing processing unit 101 can be connected to communicate.

[0059] The multiple forwarding units 103 can run in different virtual machines of the same communication device, or can run in different communication devices, and the forwarding unit 103 can run in the same virtual machine of the same communication device as the corresponding routing processing unit 101 or routing fault tolerance unit 102, or can run in different virtual machines of the same communication device as the corresponding routing processing unit 101 or routing fault tolerance unit 102, or can run in different communication devices as the corresponding routing processing unit 101 or routing fault tolerance unit 102. Each of the multiple forwarding units 103 is used to transmit messages between the routing processing unit and the routing node, and the multiple forwarding units 103 include a main forwarding unit and at least one backup forwarding unit. At the same time, only the main forwarding unit is used to transmit messages between the routing processing unit and the routing node, and the backup forwarding unit does not transmit messages, and the main forwarding unit can be connected to each backup routing fault tolerance unit for communication.

[0060] The multiple database units 104 can run in different virtual machines of the same communication device, or can run in different communication devices. The database unit 104 can run in the same virtual machine of the same communication device as the corresponding routing processing unit 101, routing fault tolerance unit 102, or forwarding unit 103, or can run in different virtual machines of the same communication device as the corresponding routing processing unit 101, routing fault tolerance unit 102, or forwarding unit 103, or can run in different communication devices as the corresponding routing processing unit 101, routing fault tolerance unit 102, or forwarding unit 103. Among them, the database unit corresponding to the main routing fault tolerance unit can be called the main database unit, and the database unit corresponding to the backup routing fault tolerance unit can be called the backup database unit. The database unit 104 can be connected to the corresponding routing fault tolerance unit 102 for communication, and at the same time, the backup routing fault tolerance unit can also be connected to the database unit 104 corresponding to the main routing fault tolerance unit for communication.

[0061] exist Figure 1 In the figure, two routing processing units are used to schematically represent the multiple routing processing units 101, one main routing fault-tolerant unit and one backup routing fault-tolerant unit are used to schematically represent the multiple routing fault-tolerant units 102, and one main database unit and one backup database unit are used to schematically represent the multiple database units 104. Since only the main forwarding unit is used to transmit messages between the routing processing unit and the routing node at the same time, the backup forwarding unit does not transmit messages. Figure 1 Only one forwarding unit is shown in FIG. 4 , and this forwarding unit is the main forwarding unit.

[0062] It should be noted that the above description uses the example of one routing processing unit corresponding to one routing fault-tolerant unit, one forwarding unit, and one database unit. In other implementations, the entire system architecture may include only one forwarding unit, which is capable of transmitting messages between the routing processing unit and the routing nodes. Alternatively, the entire system architecture may include only one primary database unit and one backup database unit, with the primary database unit storing data related to the routing processing unit corresponding to the primary routing fault-tolerant unit, and the backup database unit storing data related to the routing processing units corresponding to the backup routing fault-tolerant units.

[0063] Taking the BGP protocol as an example, the routing processing unit 101 is a BGP unit, also known as a BGP plane, which is used to implement the routing processing function of BGP. The routing fault tolerance unit 102 is a BGP fault-tolerance infrastructure, which is used to implement the fault tolerance function, that is, to synchronize data between multiple BGP units. The forwarding unit 103 is a packet fault-tolerance service (PFS), which is used to transmit routing messages between the BGP unit and the routing node. The database unit 104 is a data fault-tolerance service (DFS), which is used to store BGP related data. Figure 2 As shown, the system architecture includes multiple BGP units 201, multiple BGP FTIs 202, multiple PFSs 203, and multiple DFSs 204. The multiple BGP FTIs 202 include a primary FTI and at least one backup FTI, the multiple PFSs 203 include a primary PFS and at least one backup PFS, and the multiple DFSs include a primary DFS and at least one backup DFS. Each BGP unit is connected to a corresponding BGP FTI 202 for communication, and each BGP FTI 202 is connected to a primary PFS for communication. Each BGP FTI 202 is also connected to a corresponding DFS 204 for communication. Since only the primary PFS is used to transmit messages between the BGP unit and the routing node at the same time, the backup PFS does not transmit messages. Figure 2 Only one PFS is shown in FIG. 4 , which is the primary PFS.

[0064] Among the multiple BGP FTIs deployed above, the LES can select one BGP FTI as the primary FTI, and the other BGP FTIs except the primary FTI as backup FTIs. Only the BGP unit corresponding to the primary FTI establishes a BGP neighbor relationship with the routing node and sends and receives routing messages, which may include one or more of inbound routing messages and outbound routing messages. Inbound routing messages refer to routing messages received from the routing node by the BGP unit corresponding to the primary FTI, and outbound routing messages refer to routing messages sent to the routing node by the BGP unit corresponding to the primary FTI.

[0065] Among the multiple PFSs deployed above, the LES can also elect one PFS as the master PFS. For inbound routing messages, the master PFS can send inbound routing messages to the BGP unit corresponding to the master FTI via the master FTI. It can also send inbound routing messages to the backup FTI. The master FTI can intercept inbound routing messages transmitted by the master PFS and cooperate with the backup FTI to achieve message consistency among the multiple BGP units deployed above. This will be discussed in detail later and is not elaborated here.

[0066] It should be noted that the above description is based on the BGP routing protocol as an example. In other embodiments, the method provided in this application can also be applied to other routing protocols, such as ISIS, OSPF, LDP and other routing protocols.

[0067] Please refer to Figure 3 , Figure 3 It is a structural diagram of a communication device provided according to an embodiment of the present application. The communication device may include one or more processors 301, a communication bus 302, a memory 303 and one or more communication interfaces 304.

[0068] The processor 301 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0069] Communication bus 302 is used to transmit information between the above components. Communication bus 302 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or one type of bus.

[0070] The memory 303 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compact disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 303 may exist independently and be connected to the processor 301 via the communication bus 302. The memory 303 may also be integrated with the processor 301.

[0071] The communication interface 304 uses any transceiver-like device for communicating with other devices or communication networks. The communication interface 304 includes a wired communication interface and may also include a wireless communication interface. For example, the wired communication interface may be an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.

[0072] In some embodiments, the communication device may include multiple processors, such as Figure 3 301 and processor 305 are shown in FIG. Each of these processors can be a single-core processor or a multi-core processor. A processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0073] In a specific implementation, as an embodiment, the communication device may further include an output device 306 and an input device 307. The output device 306 communicates with the processor 301 and can display information in a variety of ways. For example, the output device 306 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 307 communicates with the processor 301 and can receive user input in a variety of ways. For example, the input device 307 can be a mouse, a keyboard, a touch screen device, or a sensor device.

[0074] In some embodiments, the memory 303 is used to store program code 310 for executing the solution of the present application, that is, to store program code for implementing one or more units of the routing processing unit, routing fault tolerance unit, forwarding unit, and database unit. The processor 301 can execute the program code 310 stored in the memory 303. The communication device can implement the following by means of the processor 301 and the program code 310 in the memory 303: Figure 4 or Figure 6 The embodiment provides a method for processing routing messages.

[0075] It should be noted that the above Figure 3 The communication device shown in the figure is deployed with one or more units of a routing processing unit, a routing fault tolerance unit, a forwarding unit and a database unit, that is, one or more units of a routing processing unit, a routing fault tolerance unit, a forwarding unit and a database unit can run on the above Figure 3In other words, each of the routing processing unit, routing fault tolerance unit, forwarding unit and database unit can be run on an independent Figure 3 The communication device shown, or k units in the above units run on h independent Figure 3 On the communication device shown, where h is less than k.

[0076] After explaining the implementation environment involved in the embodiment of the present application, the method for processing routing messages provided by the embodiment of the present application is explained in detail. Since the method provided by the embodiment of the present application can process both inbound and outbound routing messages, the following will be divided into two embodiments for introduction.

[0077] Please refer to Figure 4 , Figure 4 This is a flow chart of a method for processing routing messages provided by an embodiment of the present application. In this embodiment, a method for processing inbound routing messages is introduced, and the method includes the following steps.

[0078] Step 401: The forwarding unit receives an inbound routing message from a routing node.

[0079] The forwarding unit is used to transmit messages between the first routing processing unit and the routing node. Since the inbound routing message refers to the message sent by the routing node to the first routing processing unit, the forwarding unit can receive the inbound routing message from the routing node. The first routing processing unit is the routing processing unit corresponding to the main routing fault-tolerant unit.

[0080] It should be noted that in the embodiments of the present application, when the entire system architecture includes multiple forwarding units, that is, each routing processing unit corresponds to a forwarding unit, and the forwarding unit mentioned in the embodiments of the present application is the main forwarding unit among the multiple forwarding units. When the entire system architecture includes one forwarding unit, that is, multiple routing processing units correspond to the same forwarding unit, and the forwarding unit mentioned in the embodiments of the present application is this forwarding unit.

[0081] Step 402: The forwarding unit sends an inbound routing message to the active routing fault-tolerant unit and at least one standby routing fault-tolerant unit.

[0082] The forwarding unit is not only used to transmit messages between the first routing processing unit and the routing node, but also to synchronize the first routing processing unit's relevant data with other online routing processing units. Therefore, after receiving an inbound routing message, the forwarding unit sends the inbound routing message to the primary routing fault-tolerant unit, which then sends the inbound routing message to the first routing processing unit. Furthermore, the forwarding unit sends the inbound routing message to other online backup routing fault-tolerant units, achieving synchronization of the inbound routing messages.

[0083] It should be noted that the startup time of the routing processing units deployed in the embodiments of the present application may be different, that is, the online time of the deployed routing processing units may be different. For routing processing units other than the first routing processing unit that are not online, after the forwarding unit receives the inbound routing message, it will not send the inbound routing message to the routing fault-tolerant units corresponding to these inbound routing processing units. However, for routing processing units other than the first routing processing unit that are online, the routing fault-tolerant units corresponding to these inbound routing processing units are backup routing fault-tolerant units. After receiving the inbound routing message, the forwarding unit sends the inbound routing message to the main routing fault-tolerant unit while also sending the inbound routing message to these backup routing fault-tolerant units.

[0084] In order to achieve multi-point fault tolerance, the number of deployed routing processing units needs to be greater than the required number of reliable routing processing units. For example, the number of deployed routing processing units and the required number of reliable routing processing units are in direct proportion, or the difference between the number of deployed routing processing units and the required number of reliable routing processing units is greater than a reference value. For example, in order to achieve n-point fault tolerance, it is necessary to ensure that at least n+1 routing processing units are reliable, that is, m*n+1 routing processing units need to be deployed. Wherein, n is a positive integer, m is a positive number, and m≧1. Since routing processing units and routing fault-tolerant units correspond one to one, the number of deployed routing fault-tolerant units needs to be greater than the required number of reliable routing processing units.

[0085] Step 403: The main routing fault-tolerant unit receives the inbound routing message from the forwarding unit, and sends the inbound routing message to the first routing processing unit.

[0086] After receiving the inbound routing message, the main routing fault-tolerant unit sends the inbound routing message to the first routing processing unit, thereby realizing the transmission of the inbound routing message.

[0087] Optionally, in some embodiments, in order to synchronize the inbound routing message received by the first routing processing unit to other routing processing units, the main routing fault-tolerant unit also needs to store the inbound routing message in the main database unit.

[0088] Step 404: The standby routing fault-tolerant unit obtains multiple inbound routing messages of the first routing processing unit through the forwarding unit and the primary database unit.

[0089] Based on the above description, the online time of the deployed routing processing units may be different. For the routing processing units that have been online other than the first routing processing unit, the routing fault-tolerant units corresponding to these routing processing units are the backup routing fault-tolerant units. These backup routing fault-tolerant units can read the relevant data of the first routing processing unit from the main database unit. Moreover, after the forwarding unit receives the inbound routing message, it is also necessary to send the inbound routing message to these backup routing fault-tolerant units. In this way, these backup routing fault-tolerant units can not only receive the inbound routing message sent by the forwarding unit, but also read the inbound routing message from the main database unit. However, there are multiple ways to implement which message the backup routing fault-tolerant unit obtains. Two of these methods are introduced below.

[0090] In the first mode, the backup routing fault-tolerant unit receives an inbound routing message from the forwarding unit. If the backup routing fault-tolerant unit is not in real-time protection mode, the backup routing fault-tolerant unit discards the inbound routing message from the forwarding unit and reads multiple inbound routing messages from the first routing processing unit from the primary database unit. If the backup routing fault-tolerant unit is in real-time protection mode, the backup routing fault-tolerant unit obtains multiple inbound routing messages from the first routing processing unit through the forwarding unit.

[0091] The real-time protection state refers to the state in which the routing processing unit corresponding to the backup routing fault-tolerant unit can take over the work of the routing processing unit corresponding to the main routing fault-tolerant unit. That is, when the routing processing unit corresponding to the main routing fault-tolerant unit fails, or the main routing fault-tolerant unit fails, the LES can elect a routing fault-tolerant unit from the backup routing fault-tolerant units that are already in the real-time protection state as the main routing fault-tolerant unit, and the routing processing unit corresponding to the re-elected main routing fault-tolerant unit can establish a routing neighbor with the routing node, and send and receive BGP routes, so as to achieve uninterrupted BGP neighbors and uninterrupted BGP routes. It can also be understood that the inbound routing messages read from the main database unit by the backup routing fault-tolerant unit in the real-time protection state and the inbound routing messages received from the forwarding unit by the backup routing fault-tolerant unit are seamlessly connected, ensuring that the routing processing unit corresponding to the main routing fault-tolerant unit and the routing processing unit corresponding to the backup routing fault-tolerant unit maintain ultimate consistency.

[0092] When the backup routing fault-tolerant unit is not in the real-time protection state, it means that the backup routing fault-tolerant unit has not finished reading all the data in the inbound direction of the first routing processing unit in the main database unit. Therefore, the backup routing fault-tolerant unit needs to read the inbound routing message from the main database unit. When the backup routing fault-tolerant unit is already in the real-time protection state, it means that the backup routing fault-tolerant unit has finished reading all the data in the inbound direction of the first routing processing unit in the main database unit. At this time, the backup routing fault-tolerant unit no longer needs to read the inbound routing message from the main database unit, but directly obtains the inbound routing message sent by the forwarding unit. That is, in the first method mentioned above, before the backup routing fault-tolerant unit is in the real-time protection state, the backup routing fault-tolerant unit will discard the inbound routing message from the forwarding unit and read the inbound routing message from the main database unit. After being in the real-time protection state, the backup routing fault-tolerant unit no longer reads the inbound routing message from the main database unit, but obtains the inbound routing message from the forwarding unit.

[0093] In the second mode, the backup routing fault-tolerant unit receives inbound routing messages from the forwarding unit and, at the same time, reads inbound routing messages from the first routing processing unit from the primary database unit. When the last inbound routing message read from the primary database unit is identical to or adjacent to an inbound routing message from the forwarding unit, the backup routing fault-tolerant unit stops reading inbound routing messages from the primary database unit.

[0094] That is, in the second method, it is not necessary to determine whether the backup routing fault-tolerant unit is in the real-time protection state, but rather to obtain inbound routing messages from the forwarding unit and the main database unit at the same time. When the last inbound routing message obtained from the main database unit is the same as or adjacent to an inbound routing message obtained from the forwarding unit, it indicates that the inbound routing message obtained by the backup routing fault-tolerant unit from the main database unit and the inbound routing message obtained by the backup routing fault-tolerant unit from the forwarding unit are seamlessly connected. In this way, the subsequent inbound routing message can be directly received from the forwarding unit without having to obtain the inbound routing message from the main database unit, thereby ensuring that the routing processing unit corresponding to the main routing fault-tolerant unit and the routing processing unit corresponding to the backup routing fault-tolerant unit maintain ultimate consistency.

[0095] It should be noted that the inbound routing message can carry a message number. In this way, through the message number in the inbound routing message, it can be determined whether the last inbound routing message read by the backup routing fault-tolerant unit from the main database unit is the same as or adjacent to an inbound routing message from the forwarding unit.

[0096] Step 405: The standby routing fault-tolerant unit sends the multiple inbound routing messages of the first routing processing unit to the second routing processing unit, where the second routing processing unit is the routing processing unit corresponding to the standby routing fault-tolerant unit.

[0097] The standby routing fault-tolerant unit sends multiple inbound routing messages of the first routing processing unit to the second routing processing unit, thereby synchronizing the inbound routing messages of the first routing processing unit to the second routing processing unit.

[0098] Optionally, in some embodiments, the backup routing fault-tolerant unit can also send multiple inbound routing messages from the first routing processing unit to the backup database unit, which then stores the multiple inbound routing messages from the first routing processing unit. In this way, after the backup routing fault-tolerant unit is selected as the new master routing fault-tolerant unit, other online backup routing fault-tolerant units can also obtain these inbound routing messages from the backup database unit.

[0099] It should be noted that the inbound routing message of the first routing processing unit is a BGP message, an IGP message or an LDP message, and of course, it can also be other messages. Among them, the IGP message can be an ISIS message or an OSPF message.

[0100] In summary, in the embodiment of the present application, data is synchronized between routing processing units in the form of messages. Since the format of the messages is standard and unified, after synchronizing data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, the routing processing unit will not be modified accordingly, and the routing data synchronization will not fail. In other words, synchronizing routing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats, and when new attributes are carried in the incoming routing message, the routing processing unit can receive them without modification, which relatively reduces a lot of modification work. At the same time, the second routing processing unit can obtain the routing information received by the first routing processing unit, so when the routing fault-tolerant unit corresponding to the second routing processing unit is promoted to the master, the forwarding table in the forwarding unit will remain correct, or remain correct to a large extent.

[0101] In addition, in the embodiment of the present application, since the various routing processing units do not affect each other, only the primary and backup routing fault-tolerant units affect each other and have different logics, and the routing fault-tolerant units do not perceive or rely on the content of the routing processing units to be implemented, that is, the routing processing function and the fault-tolerant function are decoupled. In this way, when the routing processing unit corresponding to the main routing fault-tolerant unit fails or the main routing fault-tolerant unit fails, a routing processing unit can be quickly selected online from other routing processing units to establish a neighbor relationship with the routing node without considering the impact of the fault-tolerant function, so that the routing is not interrupted. The effect is better and some other online verification work can also be performed. Furthermore, since the routing processing function and the fault-tolerant function are decoupled, when it is necessary to expand a routing processing unit, a routing processing unit and a routing fault-tolerant unit can be added separately without considering the impact between the routing processing units, making the system architecture more scalable.

[0102] Furthermore, in the embodiments of the present application, since the routing processing function and the fault tolerance function are decoupled and there is no master-slave relationship between the routing processing units, the routing processing units do not need to handle logic such as master-slave data synchronization, real-time protection state delimitation, and master-slave switching. Furthermore, since the backup database unit stores all inbound routing messages, if the routing processing unit corresponding to a backup routing fault-tolerant unit fails, the failed data can be recovered using the inbound routing messages in the backup database unit, further improving system reliability.

[0103] Next, we will use the BGP protocol as an example to introduce the synchronization method of incoming routing messages. Figure 5 The PFS receives inbound routing messages from the routing node. The PFS sends inbound routing messages to the primary FTI and at least one online backup FTI. The primary FTI receives the inbound routing messages, sends the inbound routing messages to the corresponding BGP unit, and stores the inbound routing messages in the primary DFS. The backup FTI obtains multiple inbound routing messages from the BGP unit corresponding to the primary FTI through the PFS and the primary DFS, and sends the obtained inbound routing messages to the BGP unit corresponding to the backup FTI.

[0104] It should be noted that in Figure 5 In the example, two BGP units are used for illustration, and one master FTI and one backup FTI are used for illustration. Since only one PFS participates in the process of synchronizing the incoming routing message, Figure 5 Only one PFS is shown.

[0105] Please refer to Figure 6 , Figure 6This is a flow chart of a method for processing routing messages provided by an embodiment of the present application. In this embodiment, a method for processing outgoing routing messages is introduced, and the method includes the following steps.

[0106] Step 601: a first routing processing unit sends an outgoing routing message to a primary routing fault-tolerant unit. The first routing processing unit refers to a routing processing unit corresponding to the primary routing fault-tolerant unit.

[0107] The outgoing routing message refers to the message sent from the routing processing unit corresponding to the main routing fault-tolerant unit to the routing node.

[0108] Step 602: The main routing fault-tolerant unit receives the outgoing routing message from the first routing processing unit, and sends the outgoing routing message of the first processing unit to the forwarding unit.

[0109] The forwarding unit is used to transmit messages between the first routing processing unit and the routing node. Therefore, after receiving the outgoing routing message, the main routing fault-tolerant unit sends the outgoing routing message to the forwarding unit.

[0110] Optionally, in order to facilitate routing data synchronization between the first routing processing unit and other routing processing units, after the main routing fault-tolerant unit receives the outgoing routing message, it is also necessary to store the outgoing routing message in the main database unit.

[0111] It should be noted that in the embodiments of the present application, when the entire system architecture includes multiple forwarding units, that is, each routing processing unit corresponds to a forwarding unit, and the forwarding unit mentioned in the embodiments of the present application is the main forwarding unit among the multiple forwarding units. When the entire system architecture includes one forwarding unit, that is, multiple routing processing units correspond to the same forwarding unit, and the forwarding unit mentioned in the embodiments of the present application is this forwarding unit.

[0112] Step 603: The forwarding unit receives the outgoing routing message, and sends the outgoing routing message to the routing node and at least one backup routing fault-tolerant unit.

[0113] The forwarding unit is used not only to transmit messages between the first routing processing unit and the routing node, but also to synchronize the first routing processing unit's relevant data with other online routing processing units. Therefore, after receiving an outbound routing message, the forwarding unit sends the outbound routing message to the routing node, thus transmitting the outbound routing message. It also sends the outbound routing message to other online backup fault-tolerant routing units, thus synchronizing the outbound routing message.

[0114] It should be noted that the startup time of the routing processing units deployed in the embodiments of the present application may be different, that is, the online time of the deployed routing processing units may be different. For routing processing units other than the first routing processing unit that are not online, after the forwarding unit receives the outbound routing message, it will not send the outbound routing message to the routing fault-tolerant units corresponding to these routing processing units that are not online. However, for routing processing units other than the first routing processing unit that are online, the routing fault-tolerant units corresponding to these routing processing units that are online are the backup routing fault-tolerant units. After receiving the outbound routing message, the forwarding unit sends the outbound routing message to the routing node, and also needs to send the outbound routing message to these backup routing fault-tolerant units.

[0115] Based on the above description, to achieve multi-point fault tolerance, the number of deployed routing processing units needs to be greater than the required number of reliable routing processing units. For example, the number of deployed routing processing units and the required number of reliable routing processing units are directly proportional, or the difference between the number of deployed routing processing units and the required number of reliable routing processing units is greater than a reference value. Since routing processing units correspond one-to-one to routing fault-tolerant units, the number of deployed routing fault-tolerant units needs to be greater than the required number of reliable routing processing units.

[0116] Step 604: The standby routing fault-tolerant unit obtains multiple outgoing routing messages from the second routing processing unit, where the second routing processing unit is the routing processing unit corresponding to the standby routing fault-tolerant unit.

[0117] In the embodiment of the present application, since there is no master-slave relationship between the routing processing units, each routing processing unit may send an outbound routing message to the corresponding routing fault-tolerant unit. In other words, the backup routing fault-tolerant unit can receive multiple outbound routing messages from the second routing processing unit.

[0118] It should be noted that in the embodiment of the present application, the routing fault-tolerant unit has a master-slave relationship, and the routing processing unit corresponding to the master routing fault-tolerant unit has established a neighbor relationship with the routing node, that is, the first routing processing unit has established a neighbor relationship with the routing node, and the second routing processing unit has not established a neighbor relationship with the routing node. Therefore, the master routing fault-tolerant unit can send the outgoing routing message sent by the first routing processing unit to the routing node through the forwarding unit, but the backup routing fault-tolerant unit cannot send the outgoing routing message sent by the second routing processing unit to the routing node through the forwarding unit, and can only store the outgoing routing message sent by the second routing processing unit locally. That is, after the backup routing fault-tolerant unit receives multiple outgoing routing messages from the second routing processing unit, it stores the multiple outgoing routing messages of the second routing processing unit locally in the backup routing fault-tolerant unit.

[0119] Step 605: The standby routing fault-tolerant unit obtains multiple outgoing routing messages of the first routing processing unit through the forwarding unit and the primary database unit.

[0120] Based on the above description, the online time of the deployed routing processing units may be different. For the routing processing units that have been online other than the first routing processing unit, the routing fault-tolerant units corresponding to these routing processing units are the backup routing fault-tolerant units. These backup routing fault-tolerant units can read the relevant data of the first routing processing unit from the main database unit. Moreover, after the forwarding unit receives the outgoing routing message, it is also necessary to send the outgoing routing message to these backup routing fault-tolerant units. In this way, these backup routing fault-tolerant units can not only receive the outgoing routing message sent by the forwarding unit, but also read the outgoing routing message from the main database unit. However, there are multiple ways to implement which message the backup routing fault-tolerant unit obtains. Two of these methods are introduced below.

[0121] In the first mode, the backup routing fault-tolerant unit receives an outbound routing message from the forwarding unit. If the backup routing fault-tolerant unit is not in real-time protection mode, the backup routing fault-tolerant unit discards the outbound routing message from the forwarding unit and reads the outbound routing message from the first routing processing unit from the primary database unit. If the backup routing fault-tolerant unit is in real-time protection mode, the backup routing fault-tolerant unit obtains multiple outbound routing messages from the first routing processing unit through the forwarding unit.

[0122] The real-time protection state refers to the state in which the routing processing unit corresponding to the backup routing fault-tolerant unit can take over the work of the routing processing unit corresponding to the main routing fault-tolerant unit. That is, when the routing processing unit corresponding to the main routing fault-tolerant unit fails, or the main routing fault-tolerant unit fails, the LES can elect a routing fault-tolerant unit from the backup routing fault-tolerant units that are already in the real-time protection state as the main routing fault-tolerant unit, and the routing processing unit corresponding to the re-elected main routing fault-tolerant unit can establish a routing neighbor with the routing node, and send and receive BGP routes, so as to achieve uninterrupted BGP neighbors and uninterrupted BGP routes. It can also be understood that the outbound routing message read from the main database unit by the backup routing fault-tolerant unit in the real-time protection state and the outbound routing message received from the forwarding unit by the backup routing fault-tolerant unit are seamlessly connected, ensuring that the routing processing unit corresponding to the main routing fault-tolerant unit and the routing processing unit corresponding to the backup routing fault-tolerant unit maintain ultimate consistency.

[0123] When the standby routing fault-tolerant unit is not in the real-time protection state, it means that the standby routing fault-tolerant unit has not finished reading all the data in the outbound direction of the first routing processing unit in the main database unit. Therefore, the standby routing fault-tolerant unit needs to read the outbound routing message from the main database unit. When the standby routing fault-tolerant unit is already in the real-time protection state, it means that the standby routing fault-tolerant unit has finished reading all the data in the outbound direction of the first routing processing unit in the main database unit. At this time, the standby routing fault-tolerant unit no longer needs to read the outbound routing message from the main database unit, but directly obtains the outbound routing message sent by the forwarding unit. That is, in the first method mentioned above, before the standby routing fault-tolerant unit is in the real-time protection state, the standby routing fault-tolerant unit will discard the outbound routing message from the forwarding unit and read the outbound routing message from the main database unit. After being in the real-time protection state, the standby routing fault-tolerant unit no longer reads the outbound routing message from the main database unit, but obtains the outbound routing message from the forwarding unit.

[0124] In the second mode, the standby routing fault-tolerant unit receives outbound routing messages from the forwarding unit and, at the same time, reads outbound routing messages from the first routing processing unit from the main database unit. When the last outbound routing message read from the main database unit is the same as or adjacent to an outbound routing message from the forwarding unit, the standby routing fault-tolerant unit stops reading outbound routing messages from the main database unit.

[0125] That is, in the second method, it is not necessary to determine whether the backup routing fault-tolerant unit is in the real-time protection state, but rather to obtain outbound routing messages from the forwarding unit and the main database unit at the same time. When the last outbound routing message obtained from the main database unit is the same as or adjacent to an outbound routing message obtained from the forwarding unit, it means that the outbound routing message obtained by the backup routing fault-tolerant unit from the main database unit and the outbound routing message obtained by the backup routing fault-tolerant unit from the forwarding unit are seamlessly connected. In this way, the outbound routing message can be directly received from the forwarding unit in the future without having to obtain the outbound routing message from the main database unit, which can ensure that the routing processing unit corresponding to the main routing fault-tolerant unit and the routing processing unit corresponding to the backup routing fault-tolerant unit maintain ultimate consistency.

[0126] It should be noted that the outbound routing message can carry a message number. In this way, through the message number in the outbound routing message, it can be determined whether the last outbound routing message read by the backup routing fault-tolerant unit from the main database unit is the same as or adjacent to an outbound routing message from the forwarding unit.

[0127] Optionally, in some embodiments, after the standby routing fault-tolerant unit obtains multiple outgoing routing messages of the first routing processing unit in the above manner, the standby routing fault-tolerant unit can also send the multiple outgoing routing messages of the first routing processing unit to the standby database unit, and the standby database unit stores the multiple outgoing routing messages of the first routing processing unit.

[0128] Step 606: The standby routing fault-tolerant unit determines routing update information based on the multiple outgoing routing messages of the second routing processing unit and the multiple outgoing routing messages of the first routing processing unit.

[0129] Based on the above description, the routing processing units in the embodiment of the present application do not have a master-slave relationship, so each routing processing unit may send an outbound routing message to the corresponding routing fault-tolerant unit. However, the routing fault-tolerant units have a master-slave relationship, and the first routing processing unit has established a neighbor relationship with the routing node. Therefore, the master routing fault-tolerant unit can send the outbound routing message sent by the first routing processing unit to the routing node through the forwarding unit, but the backup routing fault-tolerant unit cannot send the outbound routing message sent by the second routing processing unit to the routing node through the forwarding unit, and can only locally store the outbound routing message sent by the second routing processing unit.

[0130] In this way, when the first routing processing unit fails or the main routing fault-tolerant unit fails, if a backup routing fault-tolerant unit is elected as the new main routing fault-tolerant unit, then, in order to ensure that the routing processing unit corresponding to the new main routing fault-tolerant unit can smoothly take over the tasks of the original first routing processing unit, the new main routing fault-tolerant unit will compare the multiple outgoing routing messages of the second routing processing unit with the multiple outgoing routing messages of the first routing processing unit. If there are differences between the multiple outgoing routing messages of the second routing processing unit and the multiple outgoing routing messages of the first routing processing unit, the new main routing fault-tolerant unit can determine routing update information based on the multiple outgoing routing messages of the second routing processing unit and the multiple outgoing routing messages of the first routing processing unit.

[0131] The route update information may include routes that need to be modified, and may also include routes that need to be revoked.

[0132] For example, using the BGP protocol as an example, for incoming Route Refresh messages, if the BGP unit corresponding to the original master FTI has not completed sending batch Update messages, the new master FTI will send a Route Refresh message to the corresponding BGP unit, triggering the BGP unit corresponding to the new master FTI to resend batch Update messages. For outgoing Update messages, the new master FTI will compare the Update messages sent by its own BGP unit with the Update messages sent by the BGP unit corresponding to the original master FTI to see if there are any differences. If there are any differences, the Update message sent by the BGP unit corresponding to the new master FTI will be sent to the routing node, triggering the modification or withdrawal of the route.

[0133] Based on the above description, the standby routing fault-tolerant unit stores the outgoing routing message of the second routing processing unit locally and stores the outgoing routing message of the first routing processing unit in the standby database unit. Therefore, in some embodiments, the standby routing fault-tolerant unit can compare the locally stored outgoing routing message with the outgoing routing message stored in the standby database unit to determine whether there is a difference between the outgoing routing message of the second routing processing unit and the outgoing routing message of the first routing processing unit.

[0134] Step 607: After the backup routing fault-tolerant unit switches to the new master routing fault-tolerant unit, the new master routing fault-tolerant unit sends routing update information to the third routing processing unit, which is the routing processing unit corresponding to the backup routing fault-tolerant unit except the new master routing fault-tolerant unit.

[0135] Because the multiple outbound routing messages of the second routing processing unit differ from the multiple outbound routing messages of the first routing processing unit, to ensure that the routing processing unit corresponding to the new master routing fault-tolerant unit can smoothly take over the tasks of the original first routing processing unit, the new master routing fault-tolerant unit sends routing update information to the third routing processing unit. In some embodiments, the new master routing fault-tolerant unit can send routing update information to the third routing processing unit via an update message.

[0136] It should be noted that the backup routing fault-tolerant unit can determine the above-mentioned routing update information before switching to the new primary routing fault-tolerant unit, or it can determine the above-mentioned routing update information after switching to the new primary routing fault-tolerant unit. The embodiment of the present application does not limit the timing of determining the routing update information. In the latter case, the above-mentioned backup routing fault-tolerant unit is actually the new primary routing fault-tolerant unit.

[0137] It should be noted that the outgoing routing message of the first routing processing unit is a BGP message, an IGP message, or an LDP message. Of course, it can also be other messages. Among them, the IGP message can be an ISIS message or an OSPF message. Optionally, the outgoing routing messages of other routing processing units can also be these messages.

[0138] In summary, in the embodiment of the present application, data is synchronized between routing processing units in the form of messages. Since the format of the messages is standard and unified, after synchronizing data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, it will not cause routing data synchronization failure. In other words, synchronizing routing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats, and when new attributes are carried in the outgoing routing message, the routing processing unit can receive them without modification, which relatively reduces a lot of modification work. At the same time, after the second routing processing unit obtains the routing information sent by the first routing processing unit, it can also compare the routing information sent by the first routing processing unit with the route it wants to send to determine the routing update information. In this way, when the routing fault-tolerant unit corresponding to the second routing processing unit becomes the master, it can modify the routing information previously published by the first routing processing unit that is incorrect for the second routing processing unit, thereby avoiding the existence of incorrect routing information in the network.

[0139] In addition, in the embodiment of the present application, since the various routing processing units do not affect each other, only the primary and backup routing fault-tolerant units affect each other and have different logics, and the routing fault-tolerant units do not perceive or rely on the content of the routing processing units to be implemented, that is, the routing processing function and the fault-tolerant function are decoupled. In this way, when the routing processing unit corresponding to the main routing fault-tolerant unit fails or the main routing fault-tolerant unit fails, a routing processing unit can be quickly selected online from other routing processing units to establish a neighbor relationship with the routing node without considering the impact of the fault-tolerant function, so that the routing is not interrupted. The effect is better and some other online verification work can also be performed. Furthermore, since the routing processing function and the fault-tolerant function are decoupled, when it is necessary to expand a routing processing unit, a routing processing unit and a routing fault-tolerant unit can be added separately without considering the impact between the routing processing units, making the system architecture more scalable.

[0140] Furthermore, in the embodiments of the present application, since the routing processing function and the fault tolerance function are decoupled and there is no master-slave relationship between the routing processing units, the routing processing units do not need to handle logic such as master-slave data synchronization, real-time protection state delimitation, and master-slave switching. Furthermore, since the backup database unit stores all outbound routing messages, if the routing processing unit corresponding to a backup routing fault-tolerant unit fails, the failed data can be recovered using the messages in this backup database unit, further improving system reliability.

[0141] Next, we will use BGP as an example to introduce the processing method of outbound routing messages. Figure 7 , the main FTI receives the outbound routing message from the corresponding BGP unit. The main FTI sends the outbound routing message to the PFS, and stores the outbound routing message to the main DFS. The main PFS receives the outbound routing message, and sends the outbound routing message to the routing node and at least one backup FTI that is online. The backup FTI obtains multiple outbound routing messages of the BGP unit corresponding to the main FTI through the PFS and the main DFS. The backup FTI can also obtain the outbound routing message of the BGP unit corresponding to itself, and then determine the routing update information and send the routing update information to other BGP units.

[0142] It should be noted that in Figure 7 In the example, two BGP units are used for illustration, and one master FTI and one backup FTI are used for illustration. Since only one PFS is involved in processing outbound routing messages, Figure 7 Only one PFS is shown.

[0143] Taking the BGP protocol as an example, inbound and outbound routing messages may include, but are not limited to, the following: Open messages, KeepAlive messages, Update messages, RouteRefresh messages, End (End) messages, Notification messages, and Capability messages. Multiple routing processing units synchronize BGP neighbor status and capability negotiation results through Open and KeepAlive messages. Multiple routing processing units synchronize BGP received routing data through BGP Update messages. Multiple routing processing units synchronize BGP sent routing data through BGP Update messages. Multiple routing processing units synchronize BGP route refresh processes through BGP RouteRefresh and End (End) messages. Multiple routing processing units synchronize BGP neighbor fault information through BGP Notification messages. Multiple routing processing units synchronize BGP dynamic capability negotiation results through BGP Capability messages.

[0144] It should be noted that Figure 4 and Figure 6 The two embodiments can be combined to implement the processing of inbound routing messages and outbound routing messages. Figure 4 The method for processing inbound routing messages provided in the illustrated embodiment can also be combined with the method for processing outbound routing messages in the related art. Figure 6 The method for processing outbound routing messages provided in the illustrated embodiment may also be combined with the method for processing inbound routing messages in the related art.

[0145] Figure 8 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, wherein the communication device includes a backup routing fault-tolerant unit, see Figure 8 , the backup routing fault-tolerant unit includes a first acquisition module 801 and a first sending module 802;

[0146] A first acquisition module 801 is configured to acquire multiple inbound routing messages of a first routing processing unit through a forwarding unit and a main database unit, where the first routing processing unit refers to a routing processing unit corresponding to the main routing fault-tolerant unit;

[0147] The first sending module 802 is configured to send multiple inbound routing messages of the first routing processing unit to the second routing processing unit, where the second routing processing unit is the routing processing unit corresponding to the standby routing fault-tolerant unit.

[0148] Optionally, the backup routing fault-tolerant unit further includes a second acquisition module, a third acquisition module, a determination module, and a second sending module;

[0149] A second acquisition module, configured to acquire a plurality of outgoing routing messages of the second routing processing unit;

[0150] A third acquisition module, configured to acquire multiple outgoing routing messages of the first routing processing unit through the forwarding unit and the main database unit;

[0151] A determination module, configured to determine routing update information based on a plurality of outgoing routing messages of the second routing processing unit and a plurality of outgoing routing messages of the first routing processing unit;

[0152] The second sending module is used to send routing update information to the third routing processing unit after the standby routing fault-tolerant unit switches to the new main routing fault-tolerant unit. The third routing processing unit refers to the routing processing unit corresponding to the standby routing fault-tolerant unit except the new main routing fault-tolerant unit.

[0153] Optionally, the first acquisition module is specifically configured to:

[0154] If the backup routing fault-tolerant unit is not in the real-time protection state, multiple inbound routing messages of the first routing processing unit are read from the main database unit. The real-time protection state refers to a state in which the second routing processing unit can take over the work of the first routing processing unit.

[0155] If the standby routing fault-tolerant unit is already in the real-time protection state, a plurality of inbound routing messages of the first routing processing unit are obtained through the forwarding unit.

[0156] Optionally, the backup routing fault-tolerant unit further includes a third sending module;

[0157] The third sending module is configured to send the multiple inbound routing messages of the first routing processing unit to the standby database unit.

[0158] Optionally, the backup routing fault-tolerant unit further includes a fourth sending module;

[0159] The fourth sending module is configured to send a plurality of outgoing routing messages of the first routing processing unit to the standby database unit.

[0160] Optionally, the inbound routing message of the first routing processing unit is a Border Gateway Protocol BGP message, an Interior Gateway Protocol IGP message, or a Label Distribution Protocol LDP message.

[0161] In summary, in the embodiment of the present application, data is synchronized between routing processing units in the form of messages. Since the format of the messages is standard and unified, after synchronizing data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, the routing processing unit will not be modified accordingly, and the routing data synchronization will not fail. In other words, synchronizing routing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats, and when new attributes are carried in the incoming routing message, the routing processing unit can receive them without modification, which relatively reduces a lot of modification work. At the same time, the second routing processing unit can obtain the routing information received by the first routing processing unit, so when the routing fault-tolerant unit corresponding to the second routing processing unit is promoted to the master, the forwarding table in the forwarding unit will remain correct, or remain correct to a large extent.

[0162] In addition, in the embodiment of the present application, since the various routing processing units do not affect each other, only the primary and backup routing fault-tolerant units affect each other and have different logics, and the routing fault-tolerant units do not perceive or rely on the content of the routing processing units to be implemented, that is, the routing processing function and the fault-tolerant function are decoupled. In this way, when the routing processing unit corresponding to the main routing fault-tolerant unit fails or the main routing fault-tolerant unit fails, a routing processing unit can be quickly selected online from other routing processing units to establish a neighbor relationship with the routing node without considering the impact of the fault-tolerant function, so that the routing is not interrupted. The effect is better and some other online verification work can also be performed. Furthermore, since the routing generation function and the fault-tolerant function are decoupled, when it is necessary to expand a routing processing unit, a routing processing unit and a routing fault-tolerant unit can be added separately without considering the impact between the routing processing units, making the system architecture more scalable.

[0163] Furthermore, in the embodiments of the present application, since the route generation function and the fault tolerance function are decoupled and there is no master-slave relationship between the various route processing units, the route processing units do not need to handle logic such as master-slave data synchronization, real-time protection state delimitation, and master-slave switching. Furthermore, since the database unit corresponding to the backup route fault-tolerant unit stores all messages, if the route processing unit corresponding to a backup route fault-tolerant unit fails, the failed data can be recovered using the inbound route messages in the backup database unit, further improving system reliability.

[0164] It should be noted that the backup routing fault-tolerant unit provided in the above embodiment, when processing routing messages, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the backup routing fault-tolerant unit can be divided into different functional modules to complete all or part of the functions described above. In addition, the backup routing fault-tolerant unit provided in the above embodiment and the method embodiment for processing routing messages are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0165] Figure 9 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, wherein the communication device includes a backup routing fault-tolerant unit, see Figure 9 , the backup routing fault-tolerant unit includes a first acquisition module 901, a second acquisition module 902, a determination module 903 and a sending module 904;

[0166] A first acquisition module 901 is configured to acquire multiple outgoing routing messages of a second routing processing unit, where the second routing processing unit is a routing processing unit corresponding to the standby routing fault-tolerant unit;

[0167] A second acquisition module 902 is configured to acquire multiple outgoing routing messages of a first routing processing unit through a forwarding unit and a main database unit, where the first routing processing unit is a routing processing unit corresponding to the main routing fault-tolerant unit;

[0168] A determination module 903, configured to determine routing update information based on multiple outbound routing messages of the second routing processing unit and multiple outbound routing messages of the first routing processing unit;

[0169] The sending module 904 is used to send routing update information to the third routing processing unit after the backup routing fault-tolerant unit switches to the new primary routing fault-tolerant unit. The third routing processing unit refers to the routing processing unit corresponding to the backup routing fault-tolerant unit except the new primary routing fault-tolerant unit.

[0170] In summary, in the embodiment of the present application, data is synchronized between routing processing units in the form of messages. Since the format of the messages is standard and unified, after synchronizing data in the form of messages, even if the data formats supported by the various routing processing units are incompatible, or a routing processing unit does not have the ability to send and receive certain data, it will not cause routing data synchronization failure. In other words, synchronizing routing data in the form of messages can ensure the compatibility of routing processing units with multiple data formats, and when new attributes are carried in the outgoing routing message, the routing processing unit can receive them without modification, which relatively reduces a lot of modification work. At the same time, after the second routing processing unit obtains the routing information sent by the first routing processing unit, it can also compare the routing information sent by the first routing processing unit with the route it wants to send to determine the routing update information. In this way, when the routing fault-tolerant unit corresponding to the second routing processing unit becomes the master, it can modify the routing information previously published by the first routing processing unit that is incorrect for the second routing processing unit, thereby avoiding the existence of incorrect routing information in the network.

[0171] In addition, in the embodiment of the present application, since the various routing processing units do not affect each other, only the primary and backup routing fault-tolerant units affect each other and have different logics, and the routing fault-tolerant units do not perceive or rely on the content of the routing processing units to be implemented, that is, the routing generation function and the fault-tolerant function are decoupled. In this way, when the routing processing unit corresponding to the main routing fault-tolerant unit fails or the main routing fault-tolerant unit fails, a routing processing unit can be quickly selected online from other routing processing units to establish a neighbor relationship with the routing node without considering the impact of the fault-tolerant function, so that the routing is not interrupted. The effect is better and some other online verification work can also be performed. Furthermore, since the routing generation function and the fault-tolerant function are decoupled, when it is necessary to expand a routing processing unit, a routing processing unit and a routing fault-tolerant unit can be added separately without considering the impact between the routing processing units, making the system architecture more scalable.

[0172] Furthermore, in the embodiments of the present application, since the route generation function and the fault tolerance function are decoupled and there is no master-slave relationship between the various route processing units, the route processing units do not need to handle logic such as master-slave data synchronization, real-time protection state delimitation, and master-slave switching. Furthermore, since the standby database unit stores all outbound routing messages, if the route processing unit corresponding to a standby route fault-tolerant unit fails, the failed data can be restored using the messages in this standby database unit, further improving system reliability.

[0173] It should be noted that the backup routing fault-tolerant unit provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when processing routing messages. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the backup routing fault-tolerant unit can be divided into different functional modules to complete all or part of the functions described above. In addition, the backup routing fault-tolerant unit provided in the above embodiment and the method embodiment for processing routing messages are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0174] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in this application may be a non-volatile storage medium, in other words, a non-transitory storage medium.

[0175] It should be understood that the "at least one" mentioned herein refers to one or more, and "a plurality of" refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0176] The above description is an embodiment provided for this application and is not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application should be included in the scope of protection of this application.

Claims

1. A method for processing routing messages, characterized in that: include: The standby routing fault-tolerant unit reads the inbound routing message of the first routing processing unit from the main database unit, the standby routing fault-tolerant unit being in a first state, where the first state refers to a state in which the second routing processing unit cannot take over the work of the first routing processing unit; or the standby routing fault-tolerant unit obtains the inbound routing message of the first routing processing unit through the forwarding unit, the standby routing fault-tolerant unit being in a second state, where the second state refers to a state in which the second routing processing unit can take over the work of the first routing processing unit; The first routing processing unit is a routing processing unit corresponding to the main routing fault-tolerant unit, the second routing processing unit is a routing processing unit corresponding to the backup routing fault-tolerant unit, the main database unit is used to store the inbound routing messages of the first routing processing unit received by the main routing fault-tolerant unit, the forwarding unit is used to send the inbound routing messages of the first routing processing unit from the routing node to the main routing fault-tolerant unit and the backup routing fault-tolerant unit, and the backup routing fault-tolerant unit is any one of multiple backup routing fault-tolerant units; The backup routing fault-tolerant unit sends the inbound routing message of the first routing processing unit to the second routing processing unit.

2. The method according to claim 1, characterized in that The method further comprises: The backup routing fault-tolerant unit obtains the outgoing routing message of the second routing processing unit; The backup routing fault-tolerant unit obtains the outgoing routing message of the first routing processing unit; The backup routing fault-tolerant unit determines routing update information based on the outgoing routing message of the second routing processing unit and the outgoing routing message of the first routing processing unit; After the backup routing fault-tolerant unit switches to the new master routing fault-tolerant unit, the new master routing fault-tolerant unit sends the routing update information to the third routing processing unit, which refers to the routing processing unit corresponding to the backup routing fault-tolerant unit except the new master routing fault-tolerant unit.

3. The method according to claim 1, characterized in that The method further comprises: The standby routing fault-tolerant unit sends the inbound routing message of the first routing processing unit to the standby database unit.

4. The method according to claim 2, characterized in that The method further comprises: The standby routing fault-tolerant unit sends the outgoing routing message of the first routing processing unit to the standby database unit.

5. The method according to any one of claims 1 to 4, characterized in that The inbound routing message of the first routing processing unit is a Border Gateway Protocol BGP message, an Interior Gateway Protocol IGP message, or a Label Distribution Protocol LDP message.

6. A method for processing routing messages, characterized in that: include: The standby routing fault-tolerant unit obtains an outgoing routing message of the second routing processing unit, where the second routing processing unit refers to a routing processing unit corresponding to the standby routing fault-tolerant unit, and the outgoing routing message of the second routing processing unit is an outgoing routing message sent by the second routing processing unit; The standby routing fault-tolerant unit reads the outgoing routing message of the first routing processing unit from the main database unit, the standby routing fault-tolerant unit is in a first state, the first state means that the second routing processing unit cannot take over the work of the first routing processing unit; or, the standby routing fault-tolerant unit obtains the outgoing routing message of the first routing processing unit through the forwarding unit, the standby routing fault-tolerant unit is in a second state, the second state means that the second routing processing unit can take over the work of the first routing processing unit; wherein, the first routing processing unit is the routing processing unit corresponding to the main routing fault-tolerant unit, the main database unit is used to store the outgoing routing message received by the main routing fault-tolerant unit from the first routing processing unit, the forwarding unit is used to send the outgoing routing message from the first routing processing unit to the standby routing fault-tolerant unit, and the standby routing fault-tolerant unit is any one of a plurality of standby routing fault-tolerant units; The backup routing fault-tolerant unit determines routing update information based on the outgoing routing message of the second routing processing unit and the outgoing routing message of the first routing processing unit; After the backup routing fault-tolerant unit switches to the new master routing fault-tolerant unit, the new master routing fault-tolerant unit sends the routing update information to the third routing processing unit, which refers to the routing processing unit corresponding to the backup routing fault-tolerant unit except the new master routing fault-tolerant unit.

7. A communication device, characterized in that: The communication device includes a backup routing fault-tolerant unit, and the backup routing fault-tolerant unit includes a first acquisition module and a first sending module; The first acquisition module is configured to read an inbound routing message of the first routing processing unit from the main database unit, the standby routing fault-tolerant unit being in a first state, the first state being a state in which the second routing processing unit cannot take over the work of the first routing processing unit; or to obtain an inbound routing message of the first routing processing unit through the forwarding unit, the standby routing fault-tolerant unit being in a second state, the second state being a state in which the second routing processing unit can take over the work of the first routing processing unit; The first routing processing unit is a routing processing unit corresponding to the main routing fault-tolerant unit, the second routing processing unit is a routing processing unit corresponding to the backup routing fault-tolerant unit, the main database unit is used to store the inbound routing messages of the first routing processing unit received by the main routing fault-tolerant unit, the forwarding unit is used to send the inbound routing messages of the first routing processing unit from the routing node to the main routing fault-tolerant unit and the backup routing fault-tolerant unit, and the backup routing fault-tolerant unit is any one of multiple backup routing fault-tolerant units; The first sending module is configured to send the inbound routing message of the first routing processing unit to the second routing processing unit.

8. The communication device according to claim 7, wherein: The backup routing fault-tolerant unit further includes a second acquisition module, a third acquisition module, a determination module, and a second sending module; The second acquisition module is used to obtain the outgoing routing message of the second routing processing unit; The third acquisition module is used to obtain the outgoing routing message of the first routing processing unit; The determining module is configured to determine routing update information based on the outgoing routing message of the second routing processing unit and the outgoing routing message of the first routing processing unit; The second sending module is used to send the routing update information to the third routing processing unit after the standby routing fault-tolerant unit switches to the new main routing fault-tolerant unit. The third routing processing unit refers to the routing processing unit corresponding to the standby routing fault-tolerant unit except the new main routing fault-tolerant unit.

9. The communication device according to claim 7, wherein: The backup routing fault-tolerant unit further includes a third sending module; The third sending module is configured to send the inbound routing message of the first routing processing unit to the standby database unit.

10. The communication device according to claim 8, wherein The backup routing fault-tolerant unit further includes a fourth sending module; The fourth sending module is configured to send the outgoing routing message of the first routing processing unit to the standby database unit.

11. The communication device according to any one of claims 7 to 10, characterized in that: The inbound routing message of the first routing processing unit is a Border Gateway Protocol BGP message, an Interior Gateway Protocol IGP message, or a Label Distribution Protocol LDP message.

12. A communication device, characterized in that: The communication device includes a backup routing fault-tolerant unit, and the backup routing fault-tolerant unit includes a first acquisition module, a second acquisition module, a determination module, and a sending module: The first acquisition module is used to obtain an outbound routing message of a second routing processing unit, where the second routing processing unit refers to a routing processing unit corresponding to the standby routing fault-tolerant unit, and the outbound routing message of the second routing processing unit is an outbound routing message sent by the second routing processing unit; The second acquisition module is configured to read the outgoing routing message of the first routing processing unit from the main database unit, the standby routing fault-tolerant unit being in a first state, the first state being a state in which the second routing processing unit cannot take over the work of the first routing processing unit; or, obtain the outgoing routing message of the first routing processing unit through the forwarding unit, the standby routing fault-tolerant unit being in a second state, the second state being a state in which the second routing processing unit can take over the work of the first routing processing unit; wherein the first routing processing unit is the routing processing unit corresponding to the main routing fault-tolerant unit, the main database unit is configured to store the outgoing routing message received by the main routing fault-tolerant unit from the first routing processing unit, the forwarding unit is configured to send the outgoing routing message from the first routing processing unit to the standby routing fault-tolerant unit, and the standby routing fault-tolerant unit is any one of a plurality of standby routing fault-tolerant units; The determining module is configured to determine routing update information based on the outgoing routing message of the second routing processing unit and the outgoing routing message of the first routing processing unit; The sending module is used to send the routing update information to the third routing processing unit after the standby routing fault-tolerant unit switches to the new main routing fault-tolerant unit. The third routing processing unit refers to the routing processing unit corresponding to the standby routing fault-tolerant unit except the new main routing fault-tolerant unit.

13. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented, or the steps of the method according to claim 6 are implemented.

14. A system for processing routing messages, characterized in that: The system includes: a routing node and a communication device; The communication device includes a backup routing fault-tolerant unit, and the backup routing fault-tolerant unit is used to implement the steps of the method according to any one of claims 1 to 5, or implement the steps of the method according to claim 6.

15. A communication device, characterized in that: The method comprises a processor and a computer program, wherein when the processor executes the computer program, the communication device implements the steps of the method according to any one of claims 1 to 5, or implements the steps of the method according to claim 6.

16. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer, the computer is caused to execute the steps of the method according to any one of claims 1 to 5, or implement the steps of the method according to claim 6.

Citation Information

Patent Citations

  • Routing message processing method, communication equipment, storage medium and system

    CN113765781A

  • Route and routing protocol redundancy

    CN1502191A

  • Routing protocol failover between control units within a network router

    US7417947B1