Neighbor establishing method and device and route processing method and device

By configuring multiple control plane instances in network devices and establishing multiple neighbor relationships, the routing error problem caused by position swing in satellite network is solved, and the accuracy of transmission is improved.

CN119727844APending Publication Date: 2025-03-28HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311290538.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In satellite networking, bit-turning problems caused by space environment factors lead to errors in routing messages or routing, which cannot be solved through the main and standby control surface design.

Method used

By configuring multiple control plane instances in the network device, multiple neighbor relationships are established to obtain multiple routes, and by comparing the corresponding routes of different control plane instances, find out the routes that have no bit-turning are sent to the forwarding plane.

Benefits of technology

It effectively avoids transmission problems caused by bit flips, improves transmission accuracy, and solves the bit flip problems that cannot be effectively handled by the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119727844A_ABST
    Figure CN119727844A_ABST
Patent Text Reader

Abstract

The invention discloses a neighbor establishing method and device and a route processing method and device. The method comprises the following steps: a first device obtains a first address corresponding to a first control plane instance, wherein the first control plane instance is one instance in a plurality of control plane instances of the first device; the first device obtains a second address corresponding to a second control plane instance, wherein the second control plane instance is one instance in a plurality of control plane instances of the second device; and the first device establishes a first neighbor relationship with the second device according to the first address and the second address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a method and device for establishing neighbors, and a method and device for processing routing. Background Art

[0002] When forwarding information, the forwarding plane of a network device (such as a router) needs to rely on routing (such as a forwarding information base) to determine the forwarding path. In a network device, routing is usually processed and provided by the control plane.

[0003] In a related technology, a network device is configured with a primary and a backup control plane. When the primary control plane is normal, the primary control plane is responsible for generating routes based on route publishing messages in the network and sending the routes to the forwarding plane. When the primary control plane fails, the backup control plane is responsible for generating routes and sending the routes to the forwarding plane.

[0004] However, for satellite networking, space environmental factors (such as radiation, single particles, solar eclipses, frequent low-frequency vibrations, large temperature differences, and vacuum negative pressure) can easily cause routing messages to be published or even routing bit flips. Bit flips refer to bit 0 becoming 1 and bit 1 becoming 0.

[0005] However, bit flipping is not a main control surface failure and cannot be solved by the active-standby design. Summary of the invention

[0006] The present application provides a method and device for establishing neighbors, and a method and device for processing routing, which can avoid transmission problems caused by bit flipping and improve transmission accuracy.

[0007] In a first aspect, the present application provides a method for establishing a neighbor. The method is performed by a control plane in a network device. The method includes: a first device obtains a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of the first device; the first device obtains a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of the second device; the first device establishes a first neighbor relationship with the second device according to the first address and the second address.

[0008] In this implementation, a neighbor relationship is established between the first device and the second device through the address corresponding to the control plane instance. Since the first device and the second device are both configured with multiple control plane instances, multiple neighbor relationships can be established. Different control plane instances can obtain network topology and generate routes through the established neighbor relationship, thereby obtaining multiple routes. In this way, even if there is a bit flip in the route, other routes without bit flip can still be sent to the forwarding plane, which solves the transmission problem caused by bit flip and improves transmission accuracy.

[0009] In the implementation of the present application, multiple control plane instances, such as three control plane instances, may be configured in each device. Configuring three control plane instances can solve the problem caused by the bit flipping mentioned above, and the number of configured instances will not be too large to cause excessive resource occupation.

[0010] As mentioned above, in addition to establishing a first neighbor relationship, the first device and the second device can also establish a second neighbor relationship or even a third neighbor relationship. The establishment of the second neighbor relationship is taken as an example for explanation below:

[0011] The first device acquires a third address corresponding to a third control plane instance, where the third control plane instance is one of multiple control plane instances of the first device, and the third control plane instance is different from the first control plane instance;

[0012] The first device obtains a fourth address corresponding to a fourth control plane instance, where the fourth control plane instance is one of multiple control plane instances of the second device, and the fourth control plane instance is different from the second control plane instance;

[0013] The first device establishes a second neighbor relationship with the second device according to the third address and the fourth address.

[0014] In this implementation, multiple neighbor relationships may be established between the first device and the second device, thereby generating multiple routes. The transmission problem caused by bit flipping can be solved by the multiple routes.

[0015] In the implementation of the present application, the multiple addresses used by the first device to establish a neighbor relationship with the second device may be sub-interface addresses of the same port. For example, the first address and the third address are sub-interface addresses corresponding to the same port.

[0016] And / or, the multiple addresses used by the second device to establish a neighbor relationship with the first device may be sub-interface addresses of the same port. For example, the second address and the fourth address are sub-interface addresses corresponding to the same port.

[0017] In this implementation, the first device and the second device are connected through a pair of ports, and multiple neighbor relationships established between the first device and the second device are all based on addresses configured by the pair of ports, thereby achieving the establishment of multiple neighbor relationships without adding hardware connections.

[0018] In a possible implementation of the present application, the control plane instance configured by the first device and the second device is a border gateway protocol (BGP).

[0019] For example, the first control plane instance and / or the second control plane instance is a BGP instance.

[0020] For another example, the third control plane instance and / or the fourth control plane instance is a BGP instance.

[0021] In other possible implementations of the present application, the control plane instances configured by the first device and the second device are other routing protocol instances.

[0022] In a second aspect, the present application provides a method for processing routes, which includes: a first device acquires multiple routes corresponding to multiple control plane instances; when at least two of the multiple routes are the same, the first device sends one of the at least two routes to a forwarding plane.

[0023] The method is executed by a control plane in a network device. A plurality of network-isolated control plane instances are configured in the control plane of the network device, each control plane instance corresponds to a network, and the networks corresponding to the plurality of network-isolated control plane instances are usually of the same topology.

[0024] In this implementation, under the above configuration, the control plane obtains the routes corresponding to each control plane instance. If at least two of the multiple routes are the same, it means that at least two routes have not been bit flipped, and the routes can be output to the forwarding plane. The above solution compares the routes corresponding to different control plane instances, finds the ones without bit flipping, and then sends them to the forwarding plane, thereby solving the transmission problem caused by bit flipping and improving transmission accuracy.

[0025] In the above solution, the network topologies corresponding to the multiple routes corresponding to the multiple control plane instances are usually the same. If the network topologies are different, it is impossible to determine the routes without bit flipping by comparing whether the routes are the same.

[0026] In the above scheme, the route may be a forwarding information database (FIB).

[0027] Exemplarily, the number of control plane instances in the first device is 3, and when there are 2 or 3 identical routes, the identical routes are output to the forwarding plane.

[0028] In a possible implementation of the present application, the control plane directly obtains the routes generated by each control plane instance and then compares them. However, this implementation requires that the processing speed of each control plane instance be consistent.

[0029] In another possible implementation of the present application, in order to reduce the consistency requirement on the processing speed of each control plane instance, multiple queues to be published are set in the control plane to store routes generated by multiple control plane instances.

[0030] Exemplarily, the first device acquires multiple routes corresponding to multiple control plane instances respectively, including:

[0031] The first device adds the routes generated by the multiple control plane instances to the multiple queues to be published respectively;

[0032] The first device obtains multiple routes with the same key Key from multiple queues to be published, where the route includes a Key and a value Value. The same Key indicates that the network topology is the same, and the Value is used to indicate whether the routes are the same.

[0033] The routes generated by different control plane instances are added to different queues to be published, and the routes generated by the same control plane instance are added to the same queue to be published.

[0034] In this implementation, multiple queues to be published are set to store the routes generated by multiple control plane instances. When comparing the routes of different control plane instances later, they are obtained from these queues to be published. This allows the routes corresponding to the same network topology to be obtained from the queues to be published even if the processing speeds of multiple control plane instances are different, thus reducing the consistency requirements for the processing speeds of each control plane instance. In addition, a key is used to distinguish the network topology corresponding to each route. Routes corresponding to the same network topology are obtained by obtaining routes with the same key, and then the routes are compared based on the value to see if they are the same. This not only meets the solution requirements, but also makes the implementation easy to implement.

[0035] In one example, the Key includes an identifier of the network topology. The control plane may store the identifier of each network topology, and the identifiers of different network topologies are different. In this way, the same and different network topologies can be distinguished by the identifier of the network topology, and thus can be used as a Key.

[0036] In another example, the Key includes a time code of the network topology, which may be the time when the control plane instance acquires the network topology. At the same time, the network topologies acquired by various control plane instances are the same. Therefore, the time code of the network topology can distinguish between the same and different network topologies, and thus can be used as a Key.

[0037] In the implementation of the present application, Value is the content of the FIB, including multiple forwarding table entries, each of which includes a destination prefix (prefix) and a next hop (next hop, NHP).

[0038] Optionally, the method further includes: the first device adds the Key of the route sent to the forwarding plane to a published queue.

[0039] In this implementation, the route sent to the forwarding plane is a route that has been compared and confirmed to be accurate. The key of this route is added to the published queue. Before the route is subsequently added to the queue to be published, it can be determined whether the route already exists in the published queue, thereby avoiding repeated processing of routes with the same network topology and improving processing efficiency.

[0040] Exemplarily, before adding the route generated by the control plane instance to the queue to be published, the Key of the route generated by the control plane instance is retrieved from the published queue;

[0041] If the Key of the route generated by the control plane instance is not retrieved in the published queue, the route generated by the control plane instance is added to the queue to be published.

[0042] When the key of the route generated by the control plane instance is retrieved in the published queue, the route generated by the control plane instance is not added to the queue to be published, and the route can be discarded.

[0043] In the implementation of the present application, whether it is a queue to be published or a queue that has been published, the routes in the queue can be sorted according to the time of entering the queue, or sorted according to the Key.

[0044] In the implementation of the present application, for control plane instances corresponding to at least two different routes, it can be considered that data related to these control plane instances are bit-flipped, for example, network topology data acquired by the control plane instances are bit-flipped.

[0045] The control plane instance corresponding to the route different from the at least two routes is recorded as the first control plane instance, and the control plane instance corresponding to any one of the at least two routes is recorded as the second control plane instance. At this time, the first control plane instance can be processed in one of the following ways:

[0046] In a first method, the first device controls the first control plane instance to re-acquire a route publishing message, where the route publishing message is used to regenerate a route.

[0047] For example, the first control plane instance is controlled to send a request to the source of the route publishing messages acquired historically, and reacquire the route publishing messages. After reacquiring the route publishing messages, the first control plane instance determines the network topology based on the route publishing messages, and determines the route based on the network topology, thereby solving the bit flipping problem that occurred previously.

[0048] In the second case, the first device controls the first control plane instance to perform routing synchronization with the second control plane instance.

[0049] The route synchronization here may be synchronizing the generated routes and / or the network topology used to generate the routes. For example, the first control plane instance is controlled to synchronize the network topology from the second control plane instance. After synchronizing the network topology, the first control plane instance determines the route based on the network topology, thereby solving the bit flip problem that occurred previously.

[0050] A third method is that the first device controls the first control plane instance to reset.

[0051] For example, after the first control plane instance is reset, it reacquires the route publishing message. After reacquiring the route publishing message, the first control plane instance determines the network topology based on the route publishing message and determines the route based on the network topology, thereby solving the bit flipping problem that occurred previously.

[0052] In the implementation of the present application, when multiple routes are different, it is difficult to determine a route without bit flipping. In this case, each of the multiple control plane instances may be processed in one of the following ways:

[0053] In the first mode, when the multiple routes are different, the first device controls the multiple control plane instances to respectively re-acquire route publishing messages, where the route publishing messages are used to regenerate routes.

[0054] For example, each control plane instance is controlled to send a request to the source of these route publishing messages based on the route publishing messages obtained historically, and re-obtain the route publishing messages. After re-obtaining the route publishing messages, the control plane instance determines the network topology based on the route publishing messages, and determines the route based on the network topology, thereby solving the bit flipping problem that occurred previously.

[0055] Second, when the multiple routes are different, the first device controls the multiple control plane instances to reset respectively.

[0056] For example, after the control plane instance is reset, the route publishing message is re-obtained. After the route publishing message is re-obtained, the control plane instance determines the network topology based on the route publishing message and determines the route based on the network topology, thereby solving the bit flip problem that occurred previously.

[0057] In a third aspect, a device for establishing a neighbor is provided. The device includes:

[0058] an acquiring unit, configured to acquire a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of the first device; and acquire a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of the second device;

[0059] The neighbor establishing unit is used to establish a first neighbor relationship with the second device according to the first address and the second address.

[0060] Optionally, the acquiring unit is further configured to acquire a third address corresponding to a third control plane instance, where the third control plane instance is one of multiple control plane instances of the first device, and the third control plane instance is different from the first control plane instance; and acquire a fourth address corresponding to a fourth control plane instance, where the fourth control plane instance is one of multiple control plane instances of the second device, and the fourth control plane instance is different from the second control plane instance.

[0061] The neighbor establishing unit is further configured to establish a second neighbor relationship with the second device according to the third address and the fourth address.

[0062] Optionally, the first address and the third address are sub-interface addresses corresponding to the same port; and / or the second address and the fourth address are sub-interface addresses corresponding to the same port.

[0063] Optionally, the first control plane instance and / or the second control plane instance is a Border Gateway Protocol BGP instance.

[0064] In a fourth aspect, a routing processing device is provided. The device includes:

[0065] An acquisition unit, configured to obtain multiple routes corresponding to the multiple control plane instances respectively;

[0066] The sending unit is used to send one of the at least two routes to the forwarding plane when at least two routes among the multiple routes are the same.

[0067] Optionally, the device further comprises:

[0068] A first control unit is configured to control the first control plane instance to reacquire a route publishing message, where the route publishing message is used to regenerate a route; or

[0069] Controlling the first control plane instance to perform routing synchronization with the second control plane instance; or,

[0070] Controlling the first control plane instance to reset;

[0071] The first control plane instance is a control plane instance corresponding to a route different from the at least two routes, and the second control plane instance is a control plane instance corresponding to any one of the at least two routes.

[0072] Optionally, the device further comprises:

[0073] A second control unit is used to control the multiple control plane instances to respectively re-acquire route publishing messages when the multiple routes are different, and the route publishing messages are used to regenerate the routes; or

[0074] When multiple routes are different, multiple control plane instances are controlled to be reset separately.

[0075] Optionally, the acquisition unit is used to add the routes generated by multiple control plane instances to multiple queues to be published; and obtain multiple routes with the same key Key from the multiple queues to be published. The route includes a Key and a value Value. The same Key indicates the same network topology, and the Value is used to indicate whether the routes are the same.

[0076] Optionally, the acquisition unit is further used to add the key of the route sent to the forwarding plane to the published queue.

[0077] Optionally, the Key includes an identifier of a network topology or a time code of the network topology, where the network topology is a topology formed by control plane instances corresponding to one of multiple control plane instances in the network, and the time code of the network topology is a time code when the network topology is acquired.

[0078] In a fifth aspect, a network device is provided. The network device includes a processor and a memory. The memory is used to store software programs and modules. The processor implements the method in the first aspect or any possible implementation of the first aspect, or implements the method in the second aspect or any possible implementation of the second aspect by running or executing the software program and / or module stored in the memory.

[0079] Optionally, the number of the processors is one or more, and the number of the memories is one or more.

[0080] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0081] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.

[0082] In a sixth aspect, a computer program product is provided. The computer program product includes computer program code, and when the computer program code is executed by a computer, the computer executes the method in the first aspect or any possible implementation of the first aspect, or executes the method in the second aspect or any possible implementation of the second aspect.

[0083] In the seventh aspect, the present application provides a computer-readable storage medium, which is used to store program codes executed by a processor, and the program codes include a method for implementing any possible implementation of the above-mentioned first aspect, or a method for implementing the above-mentioned second aspect or any possible implementation of the second aspect.

[0084] In an eighth aspect, a chip is provided, comprising a processor, the processor being used to call and execute instructions stored in a memory from the memory, so that a network device equipped with the chip executes a method in any possible implementation of the above-mentioned first aspect, or executes a method for implementing the above-mentioned second aspect or any possible implementation of the second aspect.

[0085] In a ninth aspect, another chip is provided. The another chip includes an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected via an internal connection path. The processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the method in any possible implementation of the first aspect, or to implement the second aspect or any possible implementation of the second aspect.

[0086] In a tenth aspect, a transmission system is provided, the system comprising a device as in the third aspect or any possible implementation of the third aspect, or comprising a device as in the fourth aspect or any possible implementation of the fourth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 It is a schematic diagram of a system architecture provided by an embodiment of the present application;

[0088] Figure 2 is another example diagram of the system architecture provided by an embodiment of the present application;

[0089] Figure 3 It is a schematic diagram of the architecture of a network device provided in an embodiment of the present application;

[0090] Figure 4 is a flowchart of a method for establishing a neighbor provided by an embodiment of the present application;

[0091] Figure 5 is a flowchart of a method for establishing a neighbor provided by an embodiment of the present application;

[0092] Figure 6 It is a flow chart of a routing processing method provided in an embodiment of the present application;

[0093] Figure 7It is a flow chart of a routing processing method provided in an embodiment of the present application;

[0094] Figure 8 This is a queue processing schematic diagram of a route provided in an embodiment of the present application;

[0095] Fig. 9 is a block diagram of a device for establishing a neighbor provided by an embodiment of the present application;

[0096] Fig.10 is a block diagram of a routing processing device provided in an embodiment of the present application;

[0097] Fig.11 It is a structural diagram of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0099] To facilitate the understanding of the technical solution provided by the embodiments of the present application, the system structure of the present application is first introduced.

[0100] Figure 1 is a schematic diagram of a system architecture provided by an embodiment of the present application. Figure 1 The system architecture includes a plurality of network devices 10, and the plurality of network devices 10 are connected via a physical interface, for example, Figure 1 The Ethernet interface Eth is shown connected.

[0101] The control plane in the network device 10 may be configured with multiple control plane instances (or control plane components), for example Figure 1 The network device 10 on the left side is configured with control plane instances 1-1, 1-2, and 1-3. Figure 1 The middle network device 10 is configured with control plane instances 2-1, 2-2 and 2-3. Figure 1 The network device 10 on the right side of the middle is configured with control plane instances 3-1, 3-2 and 3-3. Different control plane instances in the same network device 10 run calculations independently.

[0102] Of course, the number of network devices and the number of control plane instances here are just examples. In other examples, they can be more or less, and they are not intended to limit the solution of the present application.

[0103] The control plane instance is a module that executes the routing protocol in the control plane. The control plane instances in the same network use the same routing protocol, and the control plane instances in different networks can use the same routing protocol or different routing protocols. In the embodiment of the present application, the routing protocol can be a dynamic networking protocol such as BGP, open shortest path first (OSPF), intermediate system to intermediate system (ISIS), etc.

[0104] Exemplarily, multiple control plane instances in the same network device 10 use the same routing protocol, and control plane instances establishing neighbors between adjacent network devices use the same routing protocol.

[0105] In the implementation of the present application, each of the physical interfaces connected between the multiple network devices 10 is configured with multiple addresses, and the multiple addresses are respectively associated with multiple control plane instances, thereby forming multiple isolated networks. The addresses configured here are only used to distinguish different control planes and are not used for routing addressing. The physical interface of the network device or the network device is also configured with other addresses for use as destination addresses when communicating between network devices.

[0106] like Figure 1 As shown, the Eth of the network device 10 on the left is configured with sub-addresses 1-1, 1-2, and 1-3, and the sub-addresses 1-1, 1-2, and 1-3 are associated with control plane instances 1-1, 1-2, and 1-3, respectively. The Eth1 of the network device 10 in the middle is configured with sub-addresses 2-11, 2-12, and 2-13, and the Eth2 of the network device 10 in the middle is configured with sub-addresses 2-21, 2-22, and 2-23, and the sub-addresses 2-11 and 2-21 are associated with control plane instance 2-1, sub-addresses 2-12 and 2-22 are associated with control plane instance 2-2, and sub-addresses 2-13 and 2-23 are associated with control plane instance 2-3. The Eth of the network device 10 on the right is configured with sub-addresses 3-1, 3-2, and 3-3, and the sub-addresses 3-1, 3-2, and 3-3 are associated with control plane instances 3-1, 3-2, and 3-3, respectively.

[0107] The subaddresses 1-1, 1-2, and 1-3 of the network device 10 on the left establish neighbor relationships with the subaddresses 2-11, 2-12, and 2-13 of the network device 10 in the middle, respectively. The subaddresses 2-21, 2-22, and 2-23 of the network device 10 in the middle establish neighbor relationships with the subaddresses 3-1, 3-2, and 3-3 of the network device 10 on the right, respectively. Thus, Figure 1 Three isolated networks are formed, but the network topology of the three isolated networks is the same at the same time.

[0108] like Figure 1 As shown, the links of the three networks are represented by lines of three different thicknesses. Figure 1 Control plane instance 1-1, control plane instance 2-1 and control plane instance 3-1 are in the same network and belong to the same control plane; control plane instance 1-2, control plane instance 2-2 and control plane instance 3-2 are in the same network and belong to the same control plane; control plane instance 1-3, control plane instance 2-3 and control plane instance 3-3 are in the same network and belong to the same control plane.

[0109] Figure 2 is another example diagram of the system architecture provided in the embodiment of the present application, Figure 2 The setting of physical interface is omitted, and the structure of forwarding plane and control plane is supplemented.

[0110] like Figure 2 As shown, in addition to configuring the control plane instance, the control plane also configures a decision unit, which is used to determine the route without bit flipping according to the routes of multiple control plane instances, and send the route without bit flipping to the forwarding plane.

[0111] exist Figure 2 In the example shown, when any two control plane instances output the same route, that is, these same routes pass arbitration and are routes without bit flipping, and can be sent to the forwarding plane.

[0112] Figure 2 In the example, the number of control plane instances is 3, and the decision unit may also be called a triple modular redundancy (TMR) voter. In other examples, the decision unit may also be a five-module redundant voter or a seven-module redundant voter according to the number of control plane instances. Usually, the number of control plane instances is an odd number. When the number of control plane instances is 3, not only can the bit flipping problem be solved, but also fewer processing resources are required.

[0113] Figure 3 is a schematic diagram of the architecture of the network device provided in the embodiment of the present application. Figure 2 The control plane in the network device also includes a management unit, which is used to process a certain control plane instance when the data bit of a certain control plane instance is flipped; or when it is difficult to determine a route without bit flipping, process each control plane instance.

[0114] The network architecture of the embodiment of the present application can be a satellite network, and the network device can be a satellite-borne network device. Of course, the solution of the present application can also be applied to other networks, such as a terrestrial network.

[0115] Figure 4is a flowchart of a method for establishing a neighbor provided by an embodiment of the present application. The method can be Figures 1 to 3 The network device shown in any one of the items is executed, for example, by a control plane in the network device. Figure 4 As shown, the method includes the following steps.

[0116] S101: A first device obtains a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of the first device.

[0117] S102: The first device obtains a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of the second device.

[0118] The first control plane instance and / or the second control plane instance is a BGP instance.

[0119] S103: The first device establishes a first neighbor relationship with the second device according to the first address and the second address.

[0120] In the embodiment of the present application, a neighbor relationship is established between the first device and the second device through the address corresponding to the control plane instance. Since the first device and the second device are both configured with multiple control plane instances, multiple neighbor relationships can be established. Different control plane instances can obtain network topology and generate routes through the established neighbor relationship, thereby obtaining multiple routes. In this way, even if there is a bit flip in the route, other routes without bit flip can still be sent to the forwarding plane, which solves the transmission problem caused by bit flip and improves transmission accuracy.

[0121] Figure 5 is a flowchart of a method for establishing a neighbor provided by an embodiment of the present application. The method can be Figures 1 to 3 The network device shown in any one of the items is executed, for example, by a control plane in the network device. Figure 5 As shown, the method includes the following steps.

[0122] S201: A first device obtains a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of the first device.

[0123] The first device configures an address for each control plane instance at a port (ie, a physical interface) connected to the second device, so the first device can obtain an address corresponding to each control plane instance.

[0124] S202: The first device obtains a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of the second device.

[0125] The first device and the second device are connected via a port, and there is message transmission between the first device and the second device, such as an open message under the BGP protocol, or a hello message under other protocols.

[0126] The message transmitted between the first device and the second device includes the identifier of the control plane instance and the corresponding address, so the first device can obtain the second address corresponding to the second control plane instance.

[0127] S203: The first device establishes a first neighbor relationship with the second device according to the first address and the second address.

[0128] The first device establishes the first neighbor relationship with the second device, and the route publishing message subsequently received through the first neighbor relationship is handled by the first control plane instance corresponding to the first neighbor relationship.

[0129] S204: The first device obtains a third address corresponding to a third control plane instance, where the third control plane instance is one of multiple control plane instances of the first device, and the third control plane instance is different from the first control plane instance.

[0130] The implementation process of this step can refer to step S201, which will not be described in detail here.

[0131] S205: The first device obtains a fourth address corresponding to a fourth control plane instance, where the fourth control plane instance is one of multiple control plane instances of the second device, and the fourth control plane instance is different from the second control plane instance.

[0132] The implementation process of this step can refer to step S202, which will not be described in detail here.

[0133] In the implementation of the present application, the multiple addresses used by the first device to establish a neighbor relationship with the second device may be sub-interface addresses of the same port. For example, the first address and the third address are sub-interface addresses corresponding to the same port.

[0134] And / or, the multiple addresses used by the second device to establish a neighbor relationship with the first device may be sub-interface addresses of the same port. For example, the second address and the fourth address are sub-interface addresses corresponding to the same port.

[0135] In this implementation, the first device and the second device are connected through a pair of ports, and multiple neighbor relationships established between the first device and the second device are all based on addresses configured by the pair of ports, thereby achieving the establishment of multiple neighbor relationships without adding hardware connections.

[0136] S206: The first device establishes a second neighbor relationship with the second device according to the third address and the fourth address.

[0137] The first device establishes the second neighbor relationship with the second device, and the route publishing message subsequently received through the second neighbor relationship is handled by the third control plane instance corresponding to the second neighbor relationship.

[0138] In addition, more neighbor relationships may be established between the first device and the second device. For example, a third neighbor relationship may be established through the fifth address of the first device and the sixth address of the second device.

[0139] In an embodiment of the present application, multiple neighbor relationships can be established between the first device and the second device, thereby generating multiple routes. The transmission problem caused by bit flipping can be solved by the multiple routes.

[0140] Figure 6 is a flowchart of a routing processing method provided by an embodiment of the present application. The method can be Figures 1 to 3 The network device shown in any one of the items is executed, for example, by a control plane in the network device. Figure 6 As shown, the method includes the following steps.

[0141] S301: The first device obtains multiple routes corresponding to multiple control plane instances respectively.

[0142] Among them, multiple routes are generated by multiple control plane instances, for example Figure 1 In the illustrated architecture, there are multiple control plane instances in the control plane of any network device, and the multiple control plane instances are network isolated from each other.

[0143] This step is performed after the first device and the second device establish multiple neighbor relationships. Figure 4 or Figure 5 The method is then executed.

[0144] S302: When at least two routes among the multiple routes are the same, the first device sends one of the at least two routes to the forwarding plane.

[0145] In this implementation, under the above configuration, the control plane obtains the routes corresponding to each control plane instance. If at least two of the multiple routes are the same, it means that at least two routes have not been bit flipped, and the routes can be output to the forwarding plane. The above solution compares the routes corresponding to different control plane instances, finds the ones without bit flipping, and then sends them to the forwarding plane, thereby solving the transmission problem caused by bit flipping and improving transmission accuracy.

[0146] Figure 7 is a flowchart of a routing processing method provided by an embodiment of the present application. The method can be Figures 1 to 3 The network device shown in any one of the items is executed, for example, by a control plane in the network device. Figure 7 As shown, the method includes the following steps.

[0147] S401: The first device retrieves the Key of the route generated by the control plane instance in the published queue.

[0148] If the Key of the route generated by the control plane instance is not retrieved in the published queue, step S402 is executed; if the Key of the route generated by the control plane instance is retrieved in the published queue, the route generated by the control plane instance is not added to the queue to be published, and the route is discarded.

[0149] In one example, the Key includes an identifier of the network topology. The control plane may store the identifier of each network topology, and the identifiers of different network topologies are different. In this way, the same and different network topologies can be distinguished by the identifier of the network topology, and thus can be used as a Key.

[0150] In another example, the Key includes a time code of the network topology, which may be the time when the control plane instance acquires the network topology. At the same time, the network topologies acquired by various control plane instances are the same. Therefore, the time code of the network topology can distinguish between the same and different network topologies, and thus can be used as a Key.

[0151] In the implementation of the present application, the route includes not only the key Key but also the value Value. The Value may be the content of the FIB generated by the control plane instance, including multiple forwarding table entries, each of which includes a destination prefix and a next hop. Optionally, the forwarding table entry may also include routing attributes, such as BGP routing attributes.

[0152] S402: The first device adds the route generated by the control plane instance to a queue to be published, and adds the routes generated by multiple control plane instances to multiple queues to be published respectively.

[0153] The routes generated by different control plane instances are added to different queues to be published, and the routes generated by the same control plane instance are added to the same queue to be published.

[0154] In this implementation, multiple queues to be published are set to store the routes generated by multiple control plane instances. When comparing the routes of different control plane instances later, they are obtained from these queues to be published. This allows the routes corresponding to the same network topology to be obtained from the queues to be published even if the processing speeds of multiple control plane instances are different, thus reducing the consistency requirements for the processing speeds of each control plane instance. In addition, a key is used to distinguish the network topology corresponding to each route. Routes corresponding to the same network topology are obtained by obtaining routes with the same key, and then the routes are compared based on the value to see if they are the same. This not only meets the solution requirements, but also makes the implementation easy to implement.

[0155] S403: The first device obtains multiple routes with the same Key from multiple queues to be published, and obtains multiple routes corresponding to multiple control plane instances.

[0156] The route includes Key and Value. The same Key indicates the same network topology, and Value indicates whether the route is the same. The same Key does not mean that the data used by each control plane instance for route calculation is the same. For example, under the same network topology, if the data obtained by a control plane instance is bit-flipped, the data used by the control plane instance for route calculation is different, which ultimately leads to an error in the calculated route, that is, a different Value.

[0157] In one example, to obtain multiple routes with the same key, you can obtain them according to the time they were queued:

[0158] Get the route with the longest queue time in one queue (the queue to be released), and then search for routes with the same key in other queues. If the route is found in each of the other queues, get the retrieved route to get multiple routes with the same key. If the route is not found in any queue, get the route with the second longest queue time, and then repeat the above process.

[0159] In one example, to obtain multiple routes with the same key, you can obtain them according to the key size:

[0160] Get the route with the smallest key in one queue (the queue to be published), and then search for the route with the same key in another queue. If it is found in each of the other queues, get the found route to get multiple routes with the same key. If it is not found in any queue, get the route with the second smallest key and repeat the above process.

[0161] S404: The first device determines the number of identical routes among the multiple routes.

[0162] When at least two of the multiple routes are the same, steps S405 to S407 are executed; when the multiple routes are different, step S408 is executed.

[0163] Exemplarily, the number of control plane instances in the first device is 3, and when there are 2 or 3 identical routes, the identical routes are output to the forwarding plane.

[0164] In a possible implementation of the present application, steps S401 to S406 may be performed by a decision unit in the control plane, and steps S407 to S408 may be performed by a management unit in the control plane.

[0165] Taking three control plane instances as an example, the judgment results of the judgment unit include the following three situations: ① The three routes are completely consistent (identical), and S405 to S406 are executed; ② Any two routes are consistent and inconsistent with another route, and S405 to S407 are executed; ③ The three routes are different, and S408 is executed.

[0166] In the implementation of the present application, the decision unit decides whether the routes are consistent, that is, whether the values ​​of multiple routes with the same key are consistent. When making the decision, the forwarding entries in each FIB are compared to determine whether the next hops corresponding to the same prefix in different FIBs are the same.

[0167] In the implementation of the present application, although the physical interfaces connecting the network devices are configured with different addresses, these addresses do not participate in routing addressing, but are only used to distinguish different control planes. Therefore, when different control plane instances perform routing calculations on the same network topology, if there is no error in the data (such as bit flipping), the calculated routes should be completely consistent. Therefore, when judging consistency, it is sufficient to directly compare the forwarding table entries of the FIB.

[0168] S405: The first device sends one of the at least two routes to the forwarding plane.

[0169] In one example, after the forwarding plane receives the route, the route can be stored in different tables, for example, one table stores Key+destination prefix, one table stores Key+next hop, and one table stores Key+route attribute.

[0170] In one example, after the forwarding plane receives the route, the route can be stored in the same table.

[0171] S406: The first device adds the Key of the route sent to the forwarding plane to the published queue.

[0172] In this implementation, the route sent to the forwarding plane is a route that has been compared and confirmed to be accurate. The Key of this route is added to the published queue. Before the route is subsequently entered into the queue to be published, it can be determined whether the route already exists in the published queue, that is, step S401, thereby avoiding repeated processing of routes with the same network topology and improving processing efficiency.

[0173] Figure 8 Schematic diagram of a routing queue processing provided by an embodiment of the present application. Figure 8 ,The three queues to be published store the routes of the three control plane instances respectively. Figure 8In the given example, routes are stored in one queue; in other examples, each queue to be published includes three sub-queues, and routes can also be stored in three sub-queues, for example, in the form of Key+destination prefix, Key+next hop, and Key+route attribute.

[0174] In one example, the published queue stores all the contents of the route, including Key+Value. In another example, the published queue only stores the Key of the route, which can save the space required for the published queue.

[0175] like Figure 8 As shown, the queue entry processing module in the decision unit is responsible for executing steps S401 to S402; the queue exit processing module in the decision unit is responsible for executing steps S403 to S406. In the process of executing the above steps, the queue exit processing module removes the routes in the queue to be published, thereby ensuring that the queue to be published can store subsequent routes.

[0176] In the implementation of the present application, the decision unit may further include a timer module. The timer module is used to record the storage time of each route in the queue to be published, and when the routes stored in the queue to be published time out, the decision unit discards this part of the routes.

[0177] For example, the length of the queue to be published can be designed as needed, for example, based on a timeout parameter, a route generation rate of a control plane instance, etc., requiring that within the time specified by the timeout parameter, routes of a scale corresponding to the route generation rate of the control plane instance can be accommodated. The length of the published queue can be determined according to the network scale, for example, the key corresponding to the type of network topology that can be accommodated.

[0178] S407: The first device processes a control plane instance corresponding to a route different from the at least two routes.

[0179] In the implementation of the present application, for control plane instances corresponding to at least two different routes, it can be considered that data related to these control plane instances are bit-flipped, for example, network topology data acquired by the control plane instances are bit-flipped.

[0180] In case ②, the decision unit sends a local error message to the management unit, notifying the management unit of the inconsistent control plane instance, so that the management unit can process the inconsistent control plane instance.

[0181] Optionally, the local error message may also include information of inconsistent forwarding table entries in the forwarding information, such as a destination prefix.

[0182] The control plane instance corresponding to the route different from the at least two routes is recorded as the first control plane instance, and the control plane instance corresponding to any one of the at least two routes is recorded as the second control plane instance. At this time, the first control plane instance can be processed in one of the following ways:

[0183] In a first method, the first device controls the first control plane instance to re-acquire a route publishing message, where the route publishing message is used to regenerate a route.

[0184] For example, the first control plane instance is controlled to send a request to the source of the route publishing messages acquired historically, and reacquire the route publishing messages. After reacquiring the route publishing messages, the first control plane instance determines the network topology based on the route publishing messages, and determines the route based on the network topology, thereby solving the bit flipping problem that occurred previously.

[0185] For example, the control plane instance may send a refresh message to a BGP neighbor, requesting the neighbor to republish the route, and the control plane instance receives a new route publication message that overwrites the old route publication message.

[0186] In an example, the first control plane instance may send a request to a network device associated with information of inconsistent forwarding entries to reacquire the route advertisement message. The associated network device may be a network device of the destination prefix or a neighbor device of the network device of the destination prefix.

[0187] In another example, the first control plane instance may send a request to all reachable devices in the network to retrieve the route advertisement message.

[0188] In the second case, the first device controls the first control plane instance to perform routing synchronization with the second control plane instance.

[0189] The route synchronization here may be synchronizing the generated routes and / or the network topology used to generate the routes. For example, the first control plane instance is controlled to synchronize the network topology from the second control plane instance. After synchronizing the network topology, the first control plane instance determines the route based on the network topology, thereby solving the bit flip problem that occurred previously.

[0190] In one example, only the network topology of the network devices associated with the information of the inconsistent forwarding table entries is synchronized.

[0191] In another example, the entire network topology is synchronized.

[0192] A third method is that the first device controls the first control plane instance to reset.

[0193] For example, after the first control plane instance is reset, it reacquires the route publishing message. After reacquiring the route publishing message, the first control plane instance determines the network topology based on the route publishing message and determines the route based on the network topology, thereby solving the bit flipping problem that occurred previously.

[0194] During the execution of step S407, the decision unit filters out the routes provided by the first control plane instance, that is, the routes of the first control plane instance during this period are not added to the queue to be published, and the routes of the first control plane instance during this period are not involved in the decision. The decision referred to here is the process of steps S401 to S406.

[0195] After step S407 is completed, the management unit sends a repair completion message of the first control plane instance to the determination unit, and the determination unit no longer filters the routes provided by the first control plane instance in subsequent determinations.

[0196] S408: The first device processes each control plane instance.

[0197] In case ③, the decision unit sends an error message to the management unit, instructing the management unit to process each control plane instance.

[0198] In the implementation of the present application, when multiple routes are different, it is difficult to determine a route without bit flipping. In this case, each of the multiple control plane instances may be processed in one of the following ways:

[0199] In the first mode, when the multiple routes are different, the first device controls the multiple control plane instances to respectively re-acquire route publishing messages, where the route publishing messages are used to regenerate routes.

[0200] For example, each control plane instance is controlled to send a request to the source of these route publishing messages based on the route publishing messages obtained historically, and re-obtain the route publishing messages. After re-obtaining the route publishing messages, the control plane instance determines the network topology based on the route publishing messages, and determines the route based on the network topology, thereby solving the bit flipping problem that occurred previously.

[0201] Second, when the multiple routes are different, the first device controls the multiple control plane instances to reset respectively.

[0202] For example, after the control plane instance is reset, the route publishing message is re-obtained. After the route publishing message is re-obtained, the control plane instance determines the network topology based on the route publishing message and determines the route based on the network topology, thereby solving the bit flip problem that occurred previously.

[0203] At the beginning of the execution process of step S408, the decision unit does not make a decision. Each time a control plane instance is repaired, the management unit sends a corresponding repair completion message to the decision unit. When the number of control plane instances that have been repaired exceeds a threshold, the decision unit can make a decision on the routes of these control plane instances and filter out the routes of other control plane instances that have not been repaired.

[0204] After step S408 is completed, the decision unit makes a decision on the routes provided by all control plane instances.

[0205] The method provided by this application divides three network protocol planes in a network, and the protocol planes run, calculate and send routes independently of each other, thereby improving network stability. Through the three-mode redundancy selection strategy, the plane where the error is located and the corresponding forwarding table entry can be located, which is conducive to quickly taking abnormal handling measures. Through the control plane multi-mode redundancy method, the network's error detection, fault tolerance, and abnormal recovery capabilities are improved.

[0206] Fig. 9 1 is a block diagram of a device for establishing a neighbor provided by an embodiment of the present application. The device for establishing a neighbor can be implemented as all or part of a network device through software, hardware, or a combination of both. The device for establishing a neighbor can include: an acquisition unit 501 and a neighbor establishment unit 502.

[0207] The acquiring unit 501 is configured to acquire a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of the first device; and acquire a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of the second device.

[0208] The neighbor establishing unit 502 is configured to establish a first neighbor relationship with a second device according to the first address and the second address.

[0209] Optionally, the acquiring unit 501 is further configured to acquire a third address corresponding to a third control plane instance, where the third control plane instance is one of multiple control plane instances of the first device, and the third control plane instance is different from the first control plane instance; and acquire a fourth address corresponding to a fourth control plane instance, where the fourth control plane instance is one of multiple control plane instances of the second device, and the fourth control plane instance is different from the second control plane instance.

[0210] The neighbor establishing unit 502 is further configured to establish a second neighbor relationship with the second device according to the third address and the fourth address.

[0211] Optionally, the first address and the third address are sub-interface addresses corresponding to the same port; and / or the second address and the fourth address are sub-interface addresses corresponding to the same port.

[0212] Optionally, the first control plane instance and / or the second control plane instance is a Border Gateway Protocol BGP instance.

[0213] It should be noted that the device for establishing neighbors provided in the above embodiment only uses the division of the above functional units as an example when establishing neighbors. In actual applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device is divided into different functional units to complete all or part of the functions described above. In addition, the device for establishing neighbors provided in the above embodiment and the method embodiment for establishing neighbors belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0214] Fig.10 6 is a block diagram of a routing processing device provided in an embodiment of the present application. The routing processing device can be implemented as all or part of a network device through software, hardware, or a combination of both. The routing processing device can include: an acquisition unit 601 and a sending unit 602.

[0215] The acquiring unit 601 is configured to respectively correspond to multiple routes of the multiple control plane instances;

[0216] The sending unit 602 is configured to send one of the at least two routes to the forwarding plane when at least two routes among the multiple routes are the same.

[0217] Optionally, the device further comprises:

[0218] The first control unit 603 is used to control the first control plane instance to re-acquire a route publishing message, where the route publishing message is used to regenerate a route; or

[0219] Controlling the first control plane instance to perform routing synchronization with the second control plane instance; or,

[0220] Controlling the first control plane instance to reset;

[0221] The first control plane instance is a control plane instance corresponding to a route different from the at least two routes, and the second control plane instance is a control plane instance corresponding to any one of the at least two routes.

[0222] Optionally, the device further comprises:

[0223] The second control unit 604 is used to control the multiple control plane instances to respectively re-acquire route publishing messages when the multiple routes are different, and the route publishing messages are used to regenerate routes; or

[0224] When multiple routes are different, multiple control plane instances are controlled to be reset separately.

[0225] Optionally, the acquisition unit 601 is used to add the routes generated by multiple control plane instances to multiple queues to be published respectively; and obtain multiple routes with the same key Key from the multiple queues to be published respectively, where the routes include Key and value Value, the same Key indicates the same network topology, and Value is used to indicate whether the routes are the same.

[0226] Optionally, the obtaining unit 601 is further configured to add the Key of the route sent to the forwarding plane to a published queue.

[0227] Optionally, the Key includes an identifier of a network topology or a time code of the network topology, where the network topology is a topology formed by control plane instances corresponding to one of multiple control plane instances in the network, and the time code of the network topology is a time code when the network topology is acquired.

[0228] It should be noted that the routing processing device provided in the above embodiment only uses the division of the above functional units as an example when performing routing processing. In actual applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device is divided into different functional units to complete all or part of the functions described above. In addition, the routing processing device provided in the above embodiment and the routing processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0229] Fig.11 A schematic diagram of the structure of a network device 150 provided in an embodiment of the present application is shown. Fig.11 The network device 150 shown is used to perform the above Figures 4 to 8 The operations involved in any of the neighbor building methods or routing processing methods shown in the figure. The network device 150 can be implemented by a general bus architecture.

[0230] like Fig.11 As shown, the network device 150 includes at least one processor 151 , a memory 153 , and at least one communication interface 154 .

[0231] The processor 151 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 151 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0232] Optionally, the network device 150 further includes a bus. The bus is used to transmit information between the components of the network device 150. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0233] The memory 153 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, 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 the 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 153 is, for example, independent and connected to the processor 151 through a bus. The memory 153 can also be integrated with the processor 151.

[0234] The communication interface 154 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, a radio access network (RAN) or a wireless local area network (WLAN), etc. The communication interface 154 may include a wired communication interface and may also include a wireless communication interface. Specifically, the communication interface 154 may be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 154 may be used for the network device 150 to communicate with other devices.

[0235] In a specific implementation, as an embodiment, the processor 151 may include one or more CPUs, such as Fig.11 0 and CPU1 shown in FIG. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0236] In a specific implementation, as an embodiment, the network device 150 may include multiple processors, such as Fig.11 1 and 155. Each of these processors may be a single-CPU or a multi-CPU. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0237] In a specific implementation, as an embodiment, the network device 150 may also include an output device and an input device. The output device communicates with the processor 151 and can display information in a variety of ways. For example, the output device may 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 communicates with the processor 151 and can receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0238] In some embodiments, the memory 153 is used to store the program code 1510 for executing the solution of the present application, and the processor 151 can execute the program code 1510 stored in the memory 153. That is, the network device 150 can implement the method for establishing neighbors or the processing method for routing provided in the method embodiment by executing the program code 1510 in the memory 153 through the processor 151. The program code 1510 may include one or more software modules. Optionally, the processor 151 itself may also store the program code or instruction for executing the solution of the present application.

[0239] In a specific embodiment, the network device 150 of the embodiment of the present application may correspond to the controller in each of the above-mentioned method embodiments, and the processor 151 in the network device 151 reads the instruction in the memory 153 so that Fig.11 The illustrated network device 150 is capable of performing all or a portion of the operations performed by a controller.

[0240] Specifically, processor 151 is used to obtain a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of a first device; obtain a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of a second device; and establish a first neighbor relationship with the second device based on the first address and the second address.

[0241] Alternatively, the processor 151 is configured to obtain multiple routes corresponding to multiple control plane instances respectively; when at least two of the multiple routes are the same, send one of the at least two routes to the forwarding plane.

[0242] For the sake of brevity, other optional implementations are not described here in detail.

[0243] in, Figures 4 to 8 Each step of the method for establishing a neighbor or the processing method for routing shown in any one of the drawings is completed by the hardware integrated logic circuit or software instructions in the processor of the network device 150. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0244] The embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory. The input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute any of the above-mentioned methods for establishing neighbors or processing routes.

[0245] It should be understood that the processor may be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the ARM architecture.

[0246] Further, in an optional embodiment, the processor is one or more and the memory is one or more. Optionally, the memory can be integrated with the processor, or the memory and the processor are separately arranged. The memory can include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory can also include a non-volatile random access memory. For example, the memory can also store a reference block and a target block.

[0247] The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a ROM, a PROM, an EPROM, an EEPROM, or a flash memory. The volatile memory may be a RAM, which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, SRAM, DRAM, SDRAM, DDR SDRAM, ESDRAM, SLDRAM, and DR RAM.

[0248] In an embodiment of the present application, a computer-readable storage medium is also provided, which stores computer instructions. When the computer instructions stored in the computer-readable storage medium are executed by a network device, the network device executes the above-mentioned method for establishing a neighbor or the routing processing method.

[0249] In an embodiment of the present application, a computer program product including instructions is also provided, which, when executed on a network device, enables the network device to execute the neighbor establishment method or routing processing method provided above.

[0250] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. 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 a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.

[0251] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0252] The above are only optional embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0253] Unless otherwise defined, the technical or scientific terms used herein shall have the usual meanings understood by persons of ordinary skill in the field to which this application belongs. The words "first", "second", "third" and similar terms used in the patent application specification and claims of this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one" or "one" do not indicate a quantitative limitation, but rather indicate the presence of at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before "include" or "comprises" cover the elements or objects listed after "include" or "comprises" and their equivalents, and do not exclude other elements or objects.

[0254] The above is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for establishing a neighbor, characterized in that: The method comprises: The first device obtains a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of the first device; The first device obtains a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of the second device; The first device establishes a first neighbor relationship with the second device according to the first address and the second address.

2. The method according to claim 1, characterized in that The method further comprises: The first device acquires a third address corresponding to a third control plane instance, where the third control plane instance is one of multiple control plane instances of the first device, and the third control plane instance is different from the first control plane instance; The first device acquires a fourth address corresponding to a fourth control plane instance, where the fourth control plane instance is one of multiple control plane instances of the second device, and the fourth control plane instance is different from the second control plane instance; The first device establishes a second neighbor relationship with the second device according to the third address and the fourth address.

3. The method according to claim 2, characterized in that The first address and the third address are sub-interface addresses corresponding to the same port; and / or the second address and the fourth address are sub-interface addresses corresponding to the same port.

4. The method according to any one of claims 1 to 3, characterized in that: The first control plane instance and / or the second control plane instance is a Border Gateway Protocol BGP instance.

5. A routing processing method, characterized in that: The method comprises: The first device acquires multiple routes corresponding to the multiple control plane instances respectively; When at least two routes among the multiple routes are the same, the first device sends one of the at least two routes to the forwarding plane.

6. The method according to claim 5, characterized in that The method further comprises: The first device controls the first control plane instance to re-acquire a route publishing message, where the route publishing message is used to regenerate a route; or, The first device controls the first control plane instance to perform routing synchronization with the second control plane instance; or, The first device controls the first control plane instance to reset; The first control plane instance is a control plane instance corresponding to a route different from the at least two routes, and the second control plane instance is a control plane instance corresponding to any one of the at least two routes.

7. The method according to claim 5 or 6, characterized in that: The method further comprises: When the multiple routes are different, the first device controls the multiple control plane instances to respectively re-acquire route publishing messages, where the route publishing messages are used to regenerate routes; or When the multiple routes are different, the first device controls the multiple control plane instances to reset respectively.

8. The method according to any one of claims 5 to 7, characterized in that: The first device obtains multiple routes corresponding to multiple control plane instances respectively, including: The first device adds the routes generated by the multiple control plane instances to multiple queues to be published respectively; The first device respectively obtains the multiple routes with the same key Key from the multiple queues to be published, where the routes include the Key and the value Value. The same Key indicates that the network topology is the same, and the Value is used to indicate whether the routes are the same.

9. The method according to claim 8, characterized in that The method further comprises: The first device adds the Key of the route sent to the forwarding plane to a published queue.

10. The method according to claim 8 or 9, characterized in that: The Key includes an identifier of the network topology or a time code of the network topology, where the network topology is a topology composed of control plane instances in the network corresponding to one of the multiple control plane instances of the first device, and the time code of the network topology is a time code when the first device acquires the network topology.

11. A device for establishing a neighbor, characterized in that: The device comprises: an acquiring unit, configured to acquire a first address corresponding to a first control plane instance, where the first control plane instance is one of multiple control plane instances of a first device; and acquire a second address corresponding to a second control plane instance, where the second control plane instance is one of multiple control plane instances of a second device; A neighbor establishing unit is used to establish a first neighbor relationship with the second device according to the first address and the second address.

12. The device according to claim 11, characterized in that The acquiring unit is further configured to acquire a third address corresponding to a third control plane instance, where the third control plane instance is one of the multiple control plane instances of the first device, and the third control plane instance is different from the first control plane instance; Acquire a fourth address corresponding to a fourth control plane instance, where the fourth control plane instance is one of multiple control plane instances of the second device, and the fourth control plane instance is different from the second control plane instance; The neighbor establishing unit is further configured to establish a second neighbor relationship with the second device according to the third address and the fourth address.

13. The device according to claim 12, characterized in that The first address and the third address are sub-interface addresses corresponding to the same port; and / or the second address and the fourth address are sub-interface addresses corresponding to the same port.

14. The device according to any one of claims 11 to 13, characterized in that The first control plane instance and / or the second control plane instance is a Border Gateway Protocol BGP instance.

15. A routing processing device, characterized in that: The device comprises: An acquisition unit, configured to obtain multiple routes corresponding to the multiple control plane instances respectively; The sending unit is configured to send one of the at least two routes to the forwarding plane when at least two routes among the multiple routes are the same.

16. The device according to claim 15, characterized in that The device also includes: A first control unit is configured to control the first control plane instance to reacquire a route publishing message, where the route publishing message is used to regenerate a route; or controlling the first control plane instance to perform routing synchronization with the second control plane instance; or, Controlling the first control plane instance to reset; The first control plane instance is a control plane instance corresponding to a route different from the at least two routes, and the second control plane instance is a control plane instance corresponding to any one of the at least two routes.

17. The device according to claim 15 or 16, characterized in that The device also includes: A second control unit is configured to control the multiple control plane instances to respectively re-acquire route publishing messages when the multiple routes are different, wherein the route publishing messages are used to regenerate routes; or When the multiple routes are different, the multiple control plane instances are controlled to be reset respectively.

18. The device according to any one of claims 15 to 17, characterized in that The acquisition unit is used to add the routes generated by the multiple control plane instances to multiple queues to be published respectively; and obtain the multiple routes with the same key Key from the multiple queues to be published respectively, where the routes include the Key and the value Value, the same Key indicates the same network topology, and the Value is used to indicate whether the routes are the same.

19. The device according to claim 18, characterized in that The acquisition unit is further configured to add the Key of the route sent to the forwarding plane to a published queue.

20. The device according to claim 18 or 19, characterized in that The Key includes an identifier of a network topology or a time code of a network topology, wherein the network topology is a topology formed by control plane instances in a network corresponding to one of the multiple control plane instances, and the time code of the network topology is a time code when the network topology is acquired.

21. A network device, characterized in that: The network device comprises a processor and a memory, wherein the memory is used to store a software program, and the processor runs or executes the software program stored in the memory so that the network device implements the method according to any one of claims 1 to 10.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include instructions for implementing the method according to any one of claims 1 to 10.

23. A computer program product, characterized in that The computer program product comprises program codes, and when a computer runs the computer program product, the computer executes the method according to any one of claims 1 to 10.

24. A transmission system, characterized in that: The transmission system comprises the device according to any one of claims 11 to 20.