Routing information injection method, device and equipment and readable storage medium

By exchanging routing information between network devices of different routing protocols, the problem of restricted routing information exchange in the prior art is solved, richer switching scenarios and higher practicality are achieved, and the efficiency and security of data packet transmission are improved.

CN119629113APending Publication Date: 2025-03-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311192138.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The prior art is difficult to exchange routing information between network devices of different routing protocols, which limits the exchange scenarios and practicality of routing information.

Method used

By acquiring the first routing information sent by the first network device, the second routing information suitable for support of the second network device is determined based on the information, and injecting it into the second network device, so that the second network device can recognize and use the information for packet forwarding.

Benefits of technology

It realizes the exchange of routing information between network devices of different routing protocols, enriches the switching scenarios of routing information, improves practicality, and improves packet transmission efficiency and security through refined control of routing information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629113A_ABST
    Figure CN119629113A_ABST
Patent Text Reader

Abstract

The invention discloses a routing information injection method and device, equipment and a readable storage medium, and belongs to the technical field of communication. The method comprises the steps that first routing information sent by first network equipment is acquired, the first network equipment supports a first routing protocol, and the first routing information corresponds to the first routing protocol and is used for representing routing from the first network equipment to a destination node; under the condition that the first routing protocol is different from a second routing protocol supported by the second network equipment, second routing information is determined based on the first routing information, and the second routing information corresponds to the second routing protocol; and injecting the second routing information into a second network device, the second network device being used for determining the next hop as the first network device according to the second routing information when receiving the data packet, and sending the data packet to the destination node through the first network device. According to the invention, the routing information is exchanged among the network devices with different routing protocols, the exchange scene of the routing information is enriched, and the practicability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a method, device, equipment and readable storage medium for injecting routing information. Background Art

[0002] Border Gateway Protocol (BGP) is a protocol used to exchange routing information between BGP network devices in an autonomous system. In some cases, a route reflector (RR) supports BGP and communicates with multiple BGP-supporting network devices. The route reflector injects the routing information of any network device into the remaining network devices, thereby enabling the exchange of routing information between multiple network devices with the same routing protocol.

[0003] With the development of communication technology, the types and number of routing protocols are increasing. How to exchange routing information between network devices with different routing protocols has become a technology that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method, device, equipment and readable storage medium for injecting routing information, which can realize the exchange of routing information between network devices with different routing protocols, enrich the exchange scenarios of routing information, and improve practicality. The technical solution includes the following contents.

[0005] On the one hand, a method for injecting routing information is provided, the method comprising:

[0006] Acquire first routing information sent by a first network device, the first network device supports a first routing protocol, the first routing information corresponds to the first routing protocol and is used to characterize a route from the first network device to a destination node;

[0007] In a case where the first routing protocol and a second routing protocol supported by the second network device are different, determining second routing information based on the first routing information, the second routing information corresponding to the second routing protocol;

[0008] The second routing information is injected into the second network device, and the second network device is used to determine that the next hop is the first network device according to the second routing information when receiving a data packet, and send the data packet to the destination node through the first network device.

[0009] On the other hand, a device for injecting routing information is provided, the device comprising:

[0010] An acquisition module, configured to acquire first routing information sent by a first network device, wherein the first network device supports a first routing protocol, and the first routing information corresponds to the first routing protocol and is used to characterize a route from the first network device to a destination node;

[0011] A determination module, configured to determine second routing information based on the first routing information when the first routing protocol and the second routing protocol supported by the second network device are different, the second routing information corresponding to the second routing protocol;

[0012] The injection module is used to inject the second routing information into the second network device, and the second network device is used to determine that the next hop is the first network device according to the second routing information when receiving a data packet, and send the data packet to the destination node through the first network device.

[0013] In a possible implementation, the acquisition module is used to acquire at least one candidate routing information sent by the first network device, any candidate routing information including an attribute value of at least one first routing attribute to be matched; acquire the attribute value conditions of each first routing attribute; and filter the first routing information whose attribute values ​​of each first routing attribute meet the corresponding attribute value conditions from the at least one candidate routing information.

[0014] In a possible implementation manner, the device is applied to a route reflector, and the route reflector supports a reference routing protocol;

[0015] The determination module is used to determine the second routing information based on the first routing information when the first routing protocol and the reference routing protocol are different and the reference routing protocol and the second routing protocol are the same, and the second routing information corresponds to the reference routing protocol.

[0016] In a possible implementation manner, the device is applied to a route reflector, and the route reflector supports a reference routing protocol;

[0017] The determination module is used to determine the second routing information based on the first routing information when the first routing protocol is the same as the reference routing protocol and the reference routing protocol is different from the second routing protocol, and the first routing information corresponds to the reference routing protocol.

[0018] In a possible implementation manner, the device is applied to a route reflector, and the route reflector supports a reference routing protocol;

[0019] The determination module is used to determine the reference routing information based on the first routing information and determine the second routing information based on the reference routing information when the first routing protocol and the reference routing protocol are different and the reference routing protocol and the second routing protocol are different, and the reference routing information corresponds to the reference routing protocol.

[0020] In a possible implementation, the determination module is used to obtain the attribute value condition of at least one configured second routing attribute; when the attribute value of each second routing attribute satisfies the corresponding attribute value condition, the target routing information is adjusted to obtain adjusted routing information, the target routing information is the first routing information or is determined based on the first routing information, and corresponds to the reference routing protocol, the target routing information includes the attribute values ​​of each second routing attribute; and the second routing information is determined based on the adjusted routing information.

[0021] In a possible implementation, the determining module is used for at least one of the following:

[0022] Acquire an attribute value of at least one third routing attribute to be added, and add the attribute value of each third routing attribute to the target routing information;

[0023] Determine at least one fourth routing attribute to be deleted, and delete the attribute value of each fourth routing attribute in the reference routing information;

[0024] In the case that the reference routing information includes the attribute value of at least one fifth routing attribute to be modified, the attribute value of each fifth routing attribute is modified to a configuration value.

[0025] In a possible implementation, the acquisition module is further used to acquire configuration information, where the configuration information includes a device identifier of the first network device and a device identifier of the second network device;

[0026] The determination module is further configured to determine the first routing protocol corresponding to the device identification of the first network device and the second routing protocol corresponding to the device identification of the second network device based on a correspondence between the device identification and the routing protocol.

[0027] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements any of the above-mentioned methods for injecting routing information.

[0028] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor so that an electronic device implements any of the above-mentioned methods for injecting routing information.

[0029] On the other hand, a computer program is also provided. The computer program is at least one, and the at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned routing information injection methods.

[0030] On the other hand, a computer program product is also provided, wherein at least one computer program is stored in the computer program product, and the at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned methods for injecting routing information.

[0031] The technical solution provided by this application brings at least the following beneficial effects:

[0032] In the technical solution provided by the present application, the first network device supports the first routing protocol, and the second network device supports the second routing protocol. In this case, the second routing information is determined based on the first routing information sent by the first network device, and the second routing information is injected into the second network device, so that the exchange of routing information between network devices with different routing protocols is realized, the exchange scenarios of routing information are enriched, and the practicality is improved. In addition, since the first routing information represents the route from the first network device to the destination node, by injecting the second routing information into the second network device, when the second network device receives the data packet, it can determine that the next hop is the first network device according to the second routing information, and send the data packet to the destination node through the first network device, so as to realize the refined control of routing information, thereby accurately controlling the data packet transmission path, which is conducive to improving the transmission efficiency and transmission security of the data packet. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 It is a schematic diagram of an implementation environment of a method for injecting routing information provided in an embodiment of the present application;

[0035] Figure 2 is a flow chart of a method for injecting routing information provided by an embodiment of the present application;

[0036] Figure 3This is a schematic diagram of collecting first routing information provided by an embodiment of the present application;

[0037] Figure 4 is a schematic diagram of determining adjusted routing information provided by an embodiment of the present application;

[0038] Figure 5 This is a schematic diagram of injecting second routing information provided by an embodiment of the present application;

[0039] Figure 6 This is a schematic diagram of routing information injection provided by an embodiment of the present application;

[0040] Figure 7 This is another schematic diagram of routing information injection provided by an embodiment of the present application;

[0041] Figure 8 is a schematic diagram of a display page provided in an embodiment of the present application;

[0042] Fig. 9 is a schematic diagram of another display page provided in an embodiment of the present application;

[0043] Fig.10 is a schematic diagram of another display page provided in an embodiment of the present application;

[0044] Fig.11 It is a structural diagram of a routing information injection device provided in an embodiment of the present application;

[0045] Fig.12 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0046] Fig.13 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] 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 in conjunction with the accompanying drawings.

[0048] Figure 1 Schematic diagram of an implementation environment of a method for injecting routing information provided in an embodiment of the present application. Figure 1As shown, the implementation environment includes a route reflector (RR) 101 and a network device 102, wherein the route reflector 101 is at least one and the network device 102 is also at least one. At least one of the at least one route reflector 101 and the at least one network device 102 is connected to any route reflector 101 through a wired network or a wireless network. Similarly, at least one of the at least one route reflector 101 and the at least one network device 102 is connected to any network device 102 through a wired or wireless communication mode.

[0049] For example, Figure 1 One route reflector 101 and four network devices 102 are shown. In order to distinguish the four network devices 102, reference numerals 102A to 102D are used to sequentially indicate the four network devices 102. In addition, the route reflector 101 and the network devices 102A to 102D are communicatively connected.

[0050] It should be noted that the route reflector 101 is a special network device that can inject routing information sent by a network device 102 into at least one network device 102, thereby implementing the exchange of routing information between the network devices 102. For example, the route reflector 101 can inject routing information sent by the network device 102A into the network device 102C and the network device 102D.

[0051] The embodiments of the present application do not limit the protocols and functions supported by the route reflector. For example, the route reflector supports the Border Gateway Protocol (BGP), or the route reflector supports the BGP Monitoring Protocol (BMP), or the route reflector supports some custom protocols other than the BGP and BMP protocols. The functions of the route reflector include at least one of a route collection unit, a scheduling engine unit, and a route injection unit. Each unit has been described in detail below and will not be repeated here.

[0052] The network device 102 is any device capable of transmitting routing information. In the embodiment of the present application, the network device is also referred to as a routing node. Optionally, the routing node is a router. The embodiment of the present application does not limit the protocols supported by the network device 102. Exemplarily, the network device supports BGP or supports BMP or supports a custom protocol.

[0053] It should be noted that the directly connected route reflector and network device can support the same routing protocol or different routing protocols. Similarly, any two network devices directly connected to the same route reflector can support the same routing protocol or different routing protocols. For example, Figure 1In the example, the route reflector 101 supports a custom protocol, the network device 102A supports the BGP protocol, the network devices 102B and 102C support the BMP protocol, and the network device 102D supports a custom protocol different from that of the route reflector 101.

[0054] It is understandable that the contents of the BGP protocol, the BMP protocol and the custom protocol have been introduced in detail below and will not be repeated here.

[0055] In a possible implementation, the implementation environment of the embodiment of the present application also includes an electronic device, and the electronic device and the route reflector 101 are connected to each other through a wired network or a wireless network. The electronic device can send a scheduling request for routing information to the route reflector 101, so that the route reflector 101 injects the routing information of the network device 102 into other network devices 102 based on the scheduling request for routing information, so as to implement the exchange of routing information between the network devices 102. The injection method of routing information can be seen in Figure 2 The description of the related method embodiments is not repeated here. The electronic device includes at least one of a terminal device 103 and a server 104 .

[0056] The terminal device 103 can be a smart phone, a game console, a desktop computer, a tablet computer, a laptop computer, a smart TV, a smart car device, an intelligent voice interaction device, a smart home appliance, etc. The server 104 can be a single server, or a server cluster consisting of multiple servers, or any one of a cloud computing platform and a virtualization center, which is not limited in the embodiments of the present application. The server 104 can be connected to the terminal device 103 through a wired network or a wireless network. The server 104 can have functions such as data processing, data storage, and data transmission and reception, which are not limited in the embodiments of the present application. The number of terminal devices 103 and servers 104 is not limited and can be one or more.

[0057] It is understandable that an electronic device can generate a data packet and transmit the data packet to another electronic device through at least one network device. In the embodiment of the present application, the electronic device that generates the data packet is called the source node, and the electronic device that receives the data packet is called the destination node.

[0058] In an autonomous system (AS), if a network device supports the BGP protocol, the network device can also be called a BGP network device. BGP network devices need to establish a full network connection, that is, a connection is established between every two BGP network devices to form a BGP network, so that the routing information of a BGP network device can be injected into the remaining BGP network devices based on the BGP network. Figure 1Taking the network devices 102A to 102D shown as an example, the network device 102A needs to be connected to the network devices 102B, 102C, and 102D respectively, the network device 102B needs to be connected to the network devices 102A, 102C, and 102D respectively, and the network device 102C needs to be connected to the network devices 102A, 102B, and 102D respectively, so as to establish a connection between every two network devices from the network devices 102A to the network devices 102D.

[0059] As the number of BGP network devices included in the autonomous system increases, the above-mentioned way of establishing a connection between every two BGP network devices will increase the complexity and management difficulty of the BGP network. In order to solve this problem, the concept of route reflector is introduced. By configuring a route reflector in the autonomous system, it is possible to convert a complex BGP network that establishes a connection between every two BGP network devices in the autonomous system into a simple BGP network that establishes a connection between the route reflector and each BGP network device. Figure 1 Taking the network devices 102A to 102D as an example, when the autonomous system is configured with a route reflector, it is only necessary to establish connections between the route reflector and the network devices 102A, 102B, 102C, and 102D. Based on this, it can be seen that by introducing a route reflector, the complexity of the BGP network can be simplified, the difficulty of managing the BGP network can be reduced, thereby reducing the resource consumption between the BGP network devices and improving the network performance.

[0060] As can be seen from the above content, route reflector is a technology used to optimize BGP network. Based on this, route reflector needs to support BGP protocol, also known as BGP route reflector. The function of BGP route reflector is relatively simple, which only reflects the routing information sent by a BGP network device to the remaining BGP network devices. Continuing with the above example, the connection between route reflector and network device 102A, network device 102B, network device 102C, and network device 102D. Route reflector can reflect the routing information sent by network device 102A to network device 102B, network device 102C, and network device 102D. Similarly, the route reflector can reflect the routing information sent by the network device 102B to the network device 102A, the network device 102C, and the network device 102D; the route reflector can reflect the routing information sent by the network device 102C to the network device 102A, the network device 102B, and the network device 102D; the route reflector can reflect the routing information sent by the network device 102D to the network device 102A, the network device 102B, and the network device 102C.

[0061] That is to say, in the related technology, the route reflector is required to support BGP, and each network device connected to the route reflector also supports BGP, so that the route reflector can exchange routing information between different network devices that support BGP. With the development of computer communication technology, the types and number of routing protocols are increasing. The related technology only exchanges BGP routing information between different BGP network devices, which is far from meeting the demand for exchanging routing information. Therefore, a technology for exchanging routing information between network devices with different routing protocols is urgently needed.

[0062] In order to solve the above problems, the embodiment of the present application provides a method for injecting routing information, which can be applied to the above implementation environment, can realize the exchange of routing information between network devices with different routing protocols, enrich the exchange scenarios of routing information, and improve practicality. Figure 2 Taking the flowchart of a method for injecting routing information provided by an embodiment of the present application as an example, the method of the embodiment of the present application can be executed by any route reflector in the implementation environment.

[0063] In the related art, due to the limitation of BGP protocol, there can only be one route reflector. When a route reflector fails, the propagation of routing information in the autonomous system is easily affected due to a single point failure. The embodiment of the present application is applicable to BGP protocol, BMP protocol and custom protocol, etc., and is not limited by BGP protocol. Therefore, at least one route reflector can be deployed in the implementation environment to achieve multi-plane distributed deployment. When a single route reflector fails, the method of the embodiment of the present application can be executed by other route reflectors in the implementation environment. In addition, when the load of a single route reflector is too high, the method of the embodiment of the present application can also be executed by other route reflectors in the implementation environment. That is to say, the method of the embodiment of the present application is executed by a route reflector that has not failed and whose load is lower than the threshold, thereby improving the reliability and stability of the autonomous system.

[0064] like Figure 2 As shown, the method for injecting routing information of an embodiment of the present application includes the following steps.

[0065] Step 201: Acquire first routing information sent by a first network device, the first network device supports a first routing protocol, the first routing information corresponds to the first routing protocol and is used to characterize a route from the first network device to a destination node.

[0066] The first network device is also called a source network device. The first network device is any network device connected to the route reflector 101. For example, the first network device is Figure 1Any network device from network device 102A to network device 102D in the first network device. The first network device supports the first routing protocol, and the first routing protocol can be any routing protocol. The routing protocol is an online protocol that specifies the way data packets are forwarded. A routing table of the network device can be created based on the routing protocol, and the topology of the network device is described through the routing table of the network device. The network device selects routing information based on the routing table, and routes the data packet to the destination node or the next network device based on the selected routing information. The next network device also selects routing information based on the routing table, and routes the data packet to the destination node or the next network device based on the selected routing information, and so on, to achieve forwarding of the data packet to the destination node.

[0067] The embodiment of the present application does not limit the first routing protocol. Exemplarily, the first routing protocol includes at least one of the BGP protocol, the BMP protocol, and a custom protocol.

[0068] Among them, the BGP protocol is a protocol for exchanging routing information between autonomous systems on the Internet. Based on the BGP protocol, the best path selection for data transmission can be achieved, thereby achieving network traffic control and optimizing network performance. The BGP protocol can be open source, such as the GoBGP protocol and the Fast ReRoute (FRR) protocol, or it can be closed source.

[0069] The BMP protocol is a network protocol for real-time observation of BGP routing information. In general, by deploying collectors and BMP agents, the collector is used to collect routing information in real time and send it to the BMP agent. The BMP agent is used to analyze the collected routing information based on the BMP protocol to obtain BGP routing information, thereby achieving real-time observation of BGP routing information. The task of observing BGP routing information based on the BMP protocol has the characteristics of real-time, integrity, scalability and easy deployment, which enables network management users to better understand the changes in network topology and routing information, which is conducive to optimizing network performance. The BMP protocol can be open source, such as the OpenBMP protocol, or it can be closed source.

[0070] A custom protocol refers to a routing protocol other than the BGP protocol and the BMP protocol that is customized according to needs. The custom protocol can be any protocol. For example, the custom protocol is at least one of the Remote Procedure Call (RPC) protocol, the gRPC protocol, the Kafka communication protocol, the Network Configuration Protocol (NETCONF), and OpenFlow (a network communication protocol).

[0071] In an embodiment of the present application, the route reflector may send a request for obtaining the first routing information to the first network device, and the first network device may send the first routing information to the route reflector in response to the request. Alternatively, the first network device may periodically send the first routing information to the route reflector. Alternatively, the first network device may send updated routing information to the route reflector when detecting that the routing information is updated, and the updated routing information includes the first routing information.

[0072] Since the first network device supports the first routing protocol, the first routing information is the route corresponding to the first routing protocol for characterizing the route from the first network device to the destination node. The embodiment of the present application does not limit the content of the first routing information. Exemplarily, the first routing information includes the device address of the first network device, and the device address of the first network device is used to indicate the first network device. The first routing information includes the address of the destination node, and the address of the destination node is used to indicate the destination node. Optionally, the first routing information also includes a next hop address, and the next hop address is used to indicate the next network device. In some cases, the first routing information also includes at least one routing attribute, and the routing content is described by various routing attributes. For example, the routing attributes include routing type, routing interface, etc., which are not limited in the embodiment of the present application.

[0073] In a possible implementation, step 201 includes steps 2011 to 2013 (not shown in the figure).

[0074] Step 2011: Acquire at least one piece of candidate routing information sent by the first network device, wherein any piece of candidate routing information includes an attribute value of at least one first routing attribute to be matched.

[0075] It is understandable that the route reflector can receive routing information sent by multiple network devices, and the routing information includes candidate routing information. Optionally, the route reflector can receive configuration information for the routing information, and the configuration information includes the device identifier of the first network device. The route reflector determines the address corresponding to the device identifier of the first network device, and the address is the address of the first network device. After the route reflector receives the routing information sent by any network device, if the address of the network device is the address of the first network device, the routing information sent by the network device is used as candidate routing information.

[0076] The embodiment of the present application does not limit the manner in which the route reflector obtains configuration information. Exemplarily, the route reflector stores the configuration information. Alternatively, the route reflector reads the configuration information from a database. Alternatively, the route reflector receives the configuration information sent by the server. Alternatively, the route reflector is in communication connection with a terminal device, and a target application is installed on the terminal device, the target application is used to provide a display page for interaction with a user, and generates a scheduling request based on a confirmation operation triggered by the user on the display page, and the scheduling request carries at least one information on the display page. The terminal device sends the scheduling request to the route reflector, and the route reflector generates the configuration information based on the various information carried in the scheduling request.

[0077] In the embodiment of the present application, the candidate routing information includes at least one attribute value of a routing attribute, and the routing content of the candidate routing information is described by the attribute values ​​of various routing attributes. Among them, the configuration information includes at least one first routing attribute, and the attribute value of any first routing attribute can be determined from the candidate routing information.

[0078] Step 2012: Obtain attribute value conditions of each first route attribute.

[0079] In the embodiment of the present application, the configuration information includes at least one first routing attribute and various attribute value conditions of the first routing attributes. It is understandable that the attribute value condition of any first routing attribute can be a detailed value or string, etc., or a value range. For example, the attribute value condition of the first routing attribute is: the attribute value of the first routing attribute is 100, or the attribute value of the first routing attribute is greater than 90 and less than 110.

[0080] Step 2013: Filter first routing information whose attribute values ​​of first routing attributes satisfy corresponding attribute value conditions from at least one candidate routing information.

[0081] For any first routing attribute, it can be determined whether the attribute value of the first routing attribute in the candidate routing information meets the attribute value condition of the first routing attribute in the configuration information. If the attribute value of each first routing attribute in the candidate routing information meets the corresponding attribute value condition in the configuration information, the candidate routing information is used as the first routing information.

[0082] By configuring the attribute value condition of the first route attribute, the first route information is filtered out based on the attribute value condition of the first route attribute, so that the route information to be scheduled can be selected according to the user's scheduling intention, and the route information can be accurately filtered.

[0083] See also Figure 3 , Figure 3The embodiment of the present application provides a schematic diagram of collecting first routing information. In the embodiment of the present application, the route reflector is connected to the terminal device, and the route reflector includes a route collection unit, a scheduling engine unit and a route injection unit.

[0084] An application is installed on the terminal device, and the user interacts with the display page of the application to configure the first routing attribute and the attribute value condition of the first routing attribute on the display page. Based on the user's confirmation operation on the display page, a scheduling request is generated and sent to the route reflector, and the scheduling request carries the first routing attribute and the attribute value condition of the first routing attribute.

[0085] After the route reflector receives the scheduling request, the scheduling engine unit generates a route collection rule based on the first route attribute carried in the scheduling request and the attribute value condition of the first route attribute. The route collection rule is a rule used to describe that the attribute value of the first route attribute in the first routing information satisfies the attribute value condition of the first route attribute. The scheduling engine unit sends the route collection rule to the route collection unit to update the route collection rule in the route collection unit. After receiving the route collection rule, the route collection unit can store the route collection rule in the memory. In addition, the route collection unit can also persist the route collection rule in the database so that the route collection rule can be read from the database after the route reflector is restarted or crashed.

[0086] The route reflector is communicatively connected to at least one network device. If any network device supports the BGP protocol, the network device can be referred to as a source BGP network device. Similarly, if any network device supports the BMP protocol, the network device can be referred to as a source BMP network device, and if any network device supports a custom protocol, the network device can be referred to as a source custom network device. Any network device can send routing information corresponding to the routing protocol supported by the network device to the route collection unit of the route reflector. Optionally, the routing information sent by the source BGP network device is referred to as BGP routing information, the routing information sent by the source BMP network device is referred to as BMP routing information, and the routing information sent by the source custom network device is referred to as custom routing information.

[0087] The route collection rule includes the address of the first network device, at least one first route attribute, and the attribute value condition of each first route attribute. After receiving the route information sent by each network device, the route collection unit screens out candidate route information from each route information according to the address of the first network device. Based on each first route attribute and the attribute value condition of each first route attribute, the candidate route information is filtered to obtain the first route information, and the first route information is sent to the scheduling engine unit.

[0088] For example, the first network device is a source BGP network device, the first routing attribute is an as_path attribute, the attribute value condition is 100, and the as_path attribute describes the autonomous system route to the destination node through the attribute value. In other words, the routing collection rule is used to describe the collection of routing information with an attribute value of 100 for the as_path attribute sent by the source BGP network device. Based on this, if a candidate routing information is sent by the source BGP network device and the attribute value of the as_path attribute is 100, then the candidate routing information is the first routing information, and the first routing information is sent to the scheduling engine unit.

[0089] Afterwards, after the first routing information is processed by the scheduling engine unit, the processed first routing information is scheduled to the destination network device through the routing injection unit. This process can be seen in the description of step 202 to step 203, which will not be repeated here.

[0090] It is understandable that when the route collection rule is stored in the memory or database, it can be stored according to the dimension of the network device. For example, the route collection rule can be stored as: match device A, AS100. This route collection rule is used to describe the collection of routing information with the attribute value of the AS attribute sent by network device A being 100.

[0091] Since the routing protocol corresponding to the candidate routing information and the reference routing protocol supported by the route reflector may be the same or different. When the routing protocol corresponding to the candidate routing information and the reference routing protocol are different, the candidate routing information can be directly filtered based on the routing collection rule to obtain the first routing information; or the candidate routing information can be first converted into the routing information corresponding to the reference routing protocol, and then the routing information corresponding to the reference routing protocol is filtered based on the routing collection rule to obtain the first routing information. The conversion method of the routing information can be seen in the description of step 202, and the implementation principles of the two are similar, which will not be repeated here.

[0092] Step 202: When the first routing protocol and the second routing protocol supported by the second network device are different, determine the second routing information based on the first routing information, and the second routing information corresponds to the second routing protocol.

[0093] In an embodiment of the present application, the first network device supports a routing protocol, which can be configured on a route reflector by configuring a correspondence between a network device address and a routing protocol. When the route reflector receives the first routing information sent by the first network device, the first routing protocol supported by the first network device is determined based on the correspondence between the network device address and the routing protocol. Alternatively, the first routing information includes an attribute value representing the first routing protocol supported by the first network device. After obtaining the first routing information, the route reflector determines the first routing protocol by using the attribute value of the first routing protocol supported by the first network device in the first routing information.

[0094] Similarly, the route reflector may obtain the device address of the second network device and determine the second routing protocol supported by the second network device based on the correspondence between the network device address and the routing protocol.

[0095] Optionally, before step 202, it also includes: obtaining configuration information, the configuration information including the device identification of the first network device and the device identification of the second network device; based on the correspondence between the device identification and the routing protocol, determining the first routing protocol corresponding to the device identification of the first network device and the second routing protocol corresponding to the device identification of the second network device.

[0096] The method for obtaining the configuration information has been mentioned above and will not be repeated here. The configuration information may include a device identifier of the first network device and a device identifier of the second network device. The embodiment of the present application does not limit the device identifier. Exemplarily, different network devices correspond to different device addresses, that is, the device address is an identifier that can indicate a network device. Therefore, the device identifier of the first network device may be the device address of the first network device, and the device identifier of the second network device may be the device address of the second network device. For another example, different network devices correspond to different device names, that is, the device name is another identifier that can indicate a network device. Therefore, the device identifier of the first network device may be the device name of the first network device, and the device identifier of the second network device may be the device name of the second network device.

[0097] The route reflector can obtain the correspondence between the device identification of the network device and the routing protocol of the network device, and the correspondence can be stored in the route reflector or in a database, so that the route reflector can read the correspondence from the database. Based on the correspondence, the route reflector can determine the first routing protocol corresponding to the device identification of the first network device and the second routing protocol corresponding to the device identification of the second network device.

[0098] In the case where the first routing protocol and the second routing protocol are different, the route reflector needs to convert the first routing information corresponding to the first routing protocol into the second routing information corresponding to the second routing protocol, so that after the second routing information is injected into the second network device, the second network device can identify and use the second routing information. Of course, if the first routing protocol and the second routing protocol are the same, since the second network device can directly identify and use the first routing information, the route reflector can directly inject the first routing information into the second network device as the second routing information.

[0099] As mentioned above, the method of the embodiment of the present application is executed by a route reflector, and the route reflector itself supports the reference routing protocol. According to the relationship between the first routing protocol, the second routing protocol and the reference routing protocol, step 202 includes the implementation methods shown in the following cases A to C.

[0100] In case A, when the first routing protocol and the reference routing protocol are different, and the reference routing protocol and the second routing protocol are the same, the second routing information is determined based on the first routing information, and the second routing information corresponds to the reference routing protocol.

[0101] If the first routing protocol and the reference routing protocol are different, the routing reflector cannot identify the first routing information because it does not support the first routing protocol, and thus cannot directly adjust the first routing information. Based on this, the routing reflector needs to convert the first routing information of the first routing protocol into the reference routing information of the reference routing protocol, so as to facilitate the subsequent adjustment, injection, and other processing of the reference routing information. Since the reference routing protocol and the second routing protocol are the same, the reference routing information can be directly used as the second routing information, or the reference routing information can be adjusted to obtain the second routing information, etc. At this time, the second routing information corresponds to the reference routing protocol and the second routing protocol. The embodiment of the present application does not limit the conversion method.

[0102] Exemplarily, different routing protocols correspond to different data formats. Since the first routing information is the routing information of the first routing protocol, each attribute value in the first routing information is a value of the data format corresponding to the first routing protocol. If the first routing protocol and the reference routing protocol are different, the route reflector converts the data format specified by the first routing protocol into the data format specified by the reference routing protocol for any attribute value in the first routing information, obtains the converted attribute value, and thus obtains the reference routing information. For example, the first routing protocol specifies the use of a 32-bit field to represent the network device address, and the reference routing protocol specifies the use of a 64-bit field to represent the network device address. The attribute value representing the network device address in the first routing information can be converted from 32 bits to 64 bits to obtain the attribute value representing the network device address in the reference routing information.

[0103] For another example, the attribute values ​​at the same position in the routing information of different routing protocols correspond to different attributes. If the first routing protocol and the reference routing protocol are different, the position of each attribute value in the first routing information that complies with the provisions of the first routing protocol can be adjusted to obtain the position of each attribute value that complies with the provisions of the reference routing protocol, thereby obtaining the reference routing information. For example, the first routing protocol stipulates that the first attribute value represents the source network device address and the second attribute value represents the destination network device address, while the reference routing protocol stipulates that the first attribute value represents the destination network device address and the second attribute value represents the source network device address. The reference routing information is obtained by swapping the position of the attribute value representing the source network device address and the position of the attribute value representing the destination network device address in the first routing information.

[0104] In case B, when the first routing protocol and the reference routing protocol are the same, and the reference routing protocol and the second routing protocol are different, the second routing information is determined based on the first routing information, and the first routing information corresponds to the reference routing protocol.

[0105] If the first routing protocol and the reference routing protocol are the same, it means that the route reflector can identify the first routing information and can directly adjust, inject, and process the first routing information. In this case, the first routing information can be directly used as the reference routing information of the reference routing protocol. Among them, the first routing information and the reference routing information both correspond to the first routing protocol and the reference routing protocol. Since the reference routing protocol and the second routing protocol are different, directly injecting the reference routing information into the second network device will make the second network device unable to identify and use the reference routing information. Based on this, the route reflector needs to convert the reference routing information of the reference routing protocol into the second routing information of the second routing protocol, so that after the second routing information is subsequently injected into the second network device, the second network device can identify the second routing information and forward data packets based on the second routing information. Among them, the conversion method can be seen in the description of situation A, which will not be repeated here.

[0106] In case C, when the first routing protocol and the reference routing protocol are different, and the reference routing protocol and the second routing protocol are different, the reference routing information is determined based on the first routing information, and the second routing information is determined based on the reference routing information, and the reference routing information corresponds to the reference routing protocol.

[0107] If the first routing protocol and the reference routing protocol are different, the routing reflector cannot identify the first routing information because it does not support the first routing protocol, and thus cannot directly adjust the first routing information. Based on this, the routing reflector needs to convert the first routing information of the first routing protocol into reference routing information of the reference routing protocol, so as to facilitate the subsequent processing of the reference routing information. The conversion method can be seen in the description of case A, which will not be repeated here.

[0108] Since the reference routing protocol and the second routing protocol are different, directly injecting the reference routing information into the second network device will make the second network device unable to identify and use the reference routing information. Based on this, the route reflector needs to convert the reference routing information of the reference routing protocol into the second routing information of the second routing protocol, so that after the second routing information is subsequently injected into the second network device, the second network device can identify the second routing information and forward data packets based on the second routing information. The conversion method can be seen in the description of situation A, which will not be repeated here.

[0109] From situations A to C, it can be seen that the embodiments of the present application involve two conversions, namely, converting the routing information corresponding to the first routing protocol into the routing information corresponding to the reference routing protocol, and converting the routing information corresponding to the reference routing protocol into the routing information corresponding to the second routing protocol.

[0110] When different routing protocols correspond to different data formats, converting routing information corresponding to the first routing protocol into routing information corresponding to the reference routing protocol includes: for the attribute value in the routing information corresponding to the first routing protocol, converting the data format specified by the first routing protocol into the data format specified by the reference routing protocol, obtaining the converted attribute value, and thus obtaining the reference routing information. Similarly, converting routing information corresponding to the reference routing protocol into routing information corresponding to the second routing protocol includes: for the attribute value in the routing information corresponding to the reference routing protocol, converting the data format specified by the reference routing protocol into the data format specified by the second routing protocol, obtaining the converted attribute value, and thus obtaining the second routing information.

[0111] When the attribute values ​​at the same position in the routing information of different routing protocols correspond to different attributes, the routing information corresponding to the first routing protocol is converted into the routing information corresponding to the reference routing protocol, including: adjusting the positions of the attribute values ​​in the routing information corresponding to the first routing protocol that conform to the provisions of the first routing protocol, obtaining the positions of the attribute values ​​that conform to the provisions of the reference routing protocol, thereby obtaining the reference routing information. Similarly, the routing information corresponding to the reference routing protocol is converted into the routing information corresponding to the second routing protocol, including: adjusting the positions of the attribute values ​​in the routing information corresponding to the reference routing protocol that conform to the provisions of the reference routing protocol, obtaining the positions of the attribute values ​​that conform to the provisions of the second routing protocol, thereby obtaining the second routing information.

[0112] Of course, different routing protocols may also differ in other aspects. Similarly, the routing information may be transformed in this aspect, which will not be described in detail here.

[0113] In a possible implementation, step 202 includes steps 2021 to 2023 (not shown in the figure).

[0114] Step 2021: Obtain an attribute value condition of at least one configured second routing attribute.

[0115] In the embodiment of the present application, the configuration information includes at least one second routing attribute and attribute value conditions of various second routing attributes. It is understandable that the attribute value condition of any second routing attribute can be a detailed value or string, etc., or a value range.

[0116] Optionally, an application is installed on the terminal device, and the user interacts with the display page of the application to configure the second routing attribute and the attribute value condition of the second routing attribute on the display page. Based on the user's confirmation operation on the display page, a scheduling request is generated, and the scheduling request is sent to the route reflector, and the scheduling request carries the attribute value condition of the second routing attribute and the second routing attribute. The route reflector generates configuration information according to the scheduling request, and the configuration information includes the attribute value condition of the second routing attribute and the second routing attribute.

[0117] Step 2022: When the attribute values ​​of each second routing attribute meet the corresponding attribute value conditions, the target routing information is adjusted to obtain adjusted routing information. The target routing information is the first routing information or is determined based on the first routing information, and corresponds to the reference routing protocol. The target routing information includes the attribute values ​​of each second routing attribute.

[0118] In the embodiment of the present application, by configuring the attribute value condition of the second routing attribute, when the attribute value of the second routing attribute of the target routing information meets the attribute value condition, the target routing information is adjusted, thereby realizing adaptive adjustment of the routing information according to the user's scheduling intention. By adjusting the routing information, it is beneficial to reasonably plan the network traffic and improve the network performance.

[0119] The target routing information corresponds to the reference routing protocol. As mentioned above, according to the relationship between the first routing protocol, the reference routing protocol and the second routing protocol, there are situations A to C, and in different situations, the routing information corresponding to the reference routing protocol is different, which will be described in detail below.

[0120] In case A, since the first routing protocol and the reference routing protocol are different, the first routing information corresponding to the first routing protocol is converted into reference routing information corresponding to the reference routing protocol, and the reference routing information is used as the second routing information or the second routing information is determined based on the reference routing information. Based on this, the target routing information is the reference routing information in case A, which is the routing information determined based on the first routing information. The target routing information can be adjusted to obtain the adjusted routing information, and the adjusted routing information is used as the second routing information.

[0121] In case B, since the first routing protocol and the reference routing protocol are the same, the reference routing information is the first routing information, and then the route reflector determines the second routing information based on the reference routing information. In this case, the target routing information is the reference routing information in case B, which is also the first routing information. The target routing information can be adjusted to obtain the adjusted routing information. Then, the adjusted routing information is converted into the second routing information.

[0122] In case C, since the first routing protocol and the reference routing protocol are different, the first routing information corresponding to the first routing protocol is converted into reference routing information corresponding to the reference routing protocol, and the second routing information is determined based on the reference routing information. Based on this, the target routing information is the reference routing information in case C, which is the routing information determined based on the first routing information. The target routing information can be adjusted to obtain the adjusted routing information, and the adjusted routing information can be converted into the second routing information.

[0123] In an embodiment of the present application, the target routing information includes at least one attribute value of a routing attribute, and the routing content of the target routing information is described by the attribute values ​​of various routing attributes. Among them, the configuration information includes at least one second routing attribute, and the attribute values ​​of each second routing attribute can be determined from the target routing information based on the configuration information.

[0124] For any second routing attribute, it can be determined whether the attribute value of the second routing attribute in the target routing information satisfies the attribute value condition of the second routing attribute in the configuration information. If the attribute value of each second routing attribute in the target routing information satisfies the corresponding attribute value condition in the configuration information, the target routing information is adjusted to obtain the adjusted routing information.

[0125] In the embodiment of the present application, the configuration information also includes at least one routing attribute to be adjusted and various adjustment methods of the routing attributes to be adjusted. For any routing attribute to be adjusted, the attribute value of the routing attribute to be adjusted in the target routing information can be adjusted according to the adjustment method of the routing attribute to be adjusted.

[0126] Optionally, an application is installed on the terminal device, and the user interacts with the display page of the application to configure the routing attribute to be adjusted and the adjustment method of the routing attribute to be adjusted on the display page. Based on the user's confirmation operation on the display page, a scheduling request is generated, and the scheduling request is sent to the route reflector, and the scheduling request carries the routing attribute to be adjusted and the adjustment method of the routing attribute to be adjusted. The route reflector generates configuration information according to the scheduling request, and the configuration information includes the routing attribute to be adjusted and the adjustment method of the routing attribute to be adjusted.

[0127] By configuring the route attributes to be adjusted and the adjustment method, and adjusting the target route information according to the route attributes to be adjusted, the route information can be adaptively adjusted according to the user's adjustment intention, and the adjustment granularity supports the minimum granularity, that is, adjusting the attributes of a single route, which is conducive to more refined control of the forwarding route of data packets and improving network performance.

[0128] It is understandable that the routing attribute to be adjusted can be any routing attribute. For example, RFC4271 is a routing protocol that defines the format of routing information. Therefore, the routing attribute to be adjusted can be any routing attribute defined in RFC4271. For example, the routing attribute to be adjusted includes the as_path attribute, the community attribute, the local-preference attribute, etc. In practical applications, the routing attribute to be adjusted can also be a routing attribute not defined in RFC4271, that is, the routing attribute to be adjusted can also be a custom routing attribute, an extended routing attribute, etc. For example, the routing attribute to be adjusted includes a routing attribute used to characterize a region, a routing attribute used to characterize an operator, a routing attribute used to characterize a routing category, etc.

[0129] Optionally, the target routing information is adjusted to obtain adjusted routing information, including at least one of adjustment methods 1 to 3 as shown below.

[0130] Adjustment mode 1: obtaining an attribute value of at least one third routing attribute to be added, and adding the attribute value of each third routing attribute to the target routing information.

[0131] In an embodiment of the present application, the routing attribute to be adjusted includes a third routing attribute, and the adjustment method of any third routing attribute is used to indicate that the attribute value of the third routing attribute is added to the routing information, wherein the configuration information may include the attribute value of the third routing attribute. If the configuration information does not include the attribute value of the third routing attribute, the attribute value of the third routing attribute may be a set value generated by the route reflector. It is understandable that the attribute values ​​of any two third routing attributes may be the same or different. At least one attribute value of the third routing attribute may be added to the target routing information according to the adjustment method of at least one third routing attribute.

[0132] Adjustment mode 2: determining at least one fourth routing attribute to be deleted, and deleting the attribute value of each fourth routing attribute in the reference routing information.

[0133] In the embodiment of the present application, the routing attribute to be adjusted includes a fourth routing attribute. Any adjustment method of the fourth routing attribute is used to indicate the deletion of the attribute value of the fourth routing attribute in the routing information. At least one attribute value of the fourth routing attribute in the target routing information can be deleted according to the adjustment method of at least one fourth routing attribute.

[0134] Adjustment mode 3: when the reference routing information includes the attribute value of at least one fifth routing attribute to be modified, modify the attribute value of each fifth routing attribute to a configuration value.

[0135] In an embodiment of the present application, the routing attribute to be adjusted includes the fifth routing attribute. Any adjustment method of the fifth routing attribute is used to indicate that the attribute value of the fifth routing attribute in the routing information is modified to a configuration value, wherein the configuration information may include the configuration value of the fifth routing attribute. If the configuration information does not include the configuration value of the fifth routing attribute, the configuration value of the fifth routing attribute may be a set value generated by the route reflector. It is understandable that the configuration values ​​of any two fifth routing attributes may be the same or different. The attribute values ​​of each fifth routing attribute in the target routing information may be modified to a configuration value according to at least one adjustment method of the fifth routing attribute.

[0136] It should be noted that, in addition to adjusting the target routing information according to at least one of the above adjustment methods 1 to 3, other adjustment methods may be adopted according to actual applications, or the target routing information may be adjusted according to at least one of the adjustment methods 1 to 3 and other adjustment methods. The embodiments of the present application do not limit other adjustment methods.

[0137] Exemplarily, the adjustment mode of any routing attribute to be adjusted is used to indicate that the position of the attribute value of the routing attribute to be adjusted in the routing information is replaced to a specified position, wherein the configuration information may include the specified position of the attribute value of the routing attribute to be adjusted in the routing information. If the configuration information does not include the specified position of the attribute value of the routing attribute to be adjusted in the routing information, the specified position of the attribute value of the routing attribute to be adjusted in the routing information may be a set value generated by a route reflector. According to at least one adjustment mode of the routing attribute to be adjusted, the position of the attribute value of each routing attribute to be adjusted in the reference routing information may be adjusted to the corresponding specified position.

[0138] Step 2023: Determine second routing information based on the adjusted routing information.

[0139] In the embodiment of the present application, the adjusted routing information corresponds to the reference routing protocol. In case A, the reference routing protocol and the second routing protocol are the same, so the adjusted routing information can be used as the second routing information. In case B, the reference routing protocol and the second routing protocol are different, so the adjusted routing information can be converted into the second routing information. In case C, the reference routing protocol and the second routing protocol are different, so the adjusted routing information can be converted into the second routing information. The conversion method has been described above and will not be repeated here.

[0140] See also Figure 4 , Figure 4 1 is a schematic diagram of determining adjusted routing information provided by an embodiment of the present application. In the embodiment of the present application, a route reflector is connected to a terminal device, and the route reflector includes a route collection unit, a scheduling engine unit, and a route injection unit. An application is installed on the terminal device, and a scheduling request is generated based on a user's confirmation operation on a display page of the application, and the scheduling request is sent to the route reflector. After receiving the scheduling request, the route reflector collects the first routing information sent by the source network device through the route collection unit. The collection process of the first routing information can be seen in FIG. Figure 3 The relevant description will not be repeated here.

[0141] The scheduling request carries the second routing attribute, the attribute value condition of the second routing attribute, the routing attribute to be adjusted, the adjustment method of the routing attribute to be adjusted, and the device identification of the destination network device. After receiving the scheduling request, the route reflector generates a routing scheduling rule based on the scheduling request through the scheduling engine unit. The routing scheduling rule includes a routing matching rule, a routing adjustment rule, and a routing distribution rule. The routing matching rule is a rule used to describe that the attribute value of the second routing attribute in the routing information to be adjusted satisfies the attribute value condition of the second routing attribute. The routing adjustment rule is a rule used to describe the adjustment of the routing attribute to be adjusted in the routing information to be adjusted according to the adjustment method of the routing attribute to be adjusted. The routing distribution rule is a rule used to describe the distribution of the adjusted routing information to the destination network device.

[0142] After determining the first routing information, the route reflector first determines the reference routing information based on the first routing information through the scheduling engine unit. Then, the routing matching rule includes the second routing attribute and the attribute value condition of the second routing attribute. According to the routing matching rule, when the attribute value of each second routing attribute in the reference routing information is determined by the scheduling engine unit to meet the corresponding attribute value condition, the reference routing information is used as the routing information to be adjusted. Then, the routing adjustment rule includes the routing attribute to be adjusted and the adjustment method of the routing attribute to be adjusted. According to the routing adjustment rule, the routing information to be adjusted is adjusted by the scheduling engine unit to obtain the adjusted routing information. Afterwards, the routing distribution rule includes the device identifier of the destination network device. According to the routing distribution rule, the scheduling engine unit determines that the adjusted routing information corresponds to the destination network device.

[0143] It is understandable that the scheduling engine unit may store the routing scheduling rules in a database so as to read the routing scheduling rules from the database after the route reflector is restarted or crashed.

[0144] Next, the route reflector injects the adjusted route information into the destination network device through the route injection unit. The injection method can be seen in the description of step 203 and will not be repeated here.

[0145] Step 203: inject the second routing information into the second network device, and the second network device is used to determine the next hop as the first network device according to the second routing information when receiving the data packet, and send the data packet to the destination node through the first network device.

[0146] The route reflector may send the second routing information to the second network device, which is also referred to as the destination network device. Similar to the content of the first routing information, the second routing information includes the device address of the first network device, which is used to indicate the first network device. The second routing information includes the address of the destination node, which is used to indicate the destination node. Optionally, the second routing information also includes the next hop address of the first network device, which is used to indicate the next network device of the first network device. In some cases, the second routing information also includes at least one routing attribute, and the routing content is described by various routing attributes.

[0147] In the embodiment of the present application, the second network device receives the second routing information, which is equivalent to the second network device obtaining the route from the second network device to the first network device and from the first network device to the destination node. Based on this, after the second network device receives the data packet, the second network device can determine that the next hop of the second network device is the first network device based on the second routing information, and send the data packet to the first network device, so that the first network device transmits the data packet directly or indirectly to the destination node.

[0148] See also Figure 5 , Figure 5 1 is a schematic diagram of injecting second routing information provided by an embodiment of the present application. In the embodiment of the present application, the route reflector includes a route collection unit, a scheduling engine unit and a route injection unit. The first routing information sent by the source network device is collected by the route collection unit, wherein the collection process of the first routing information can be seen in FIG. Figure 3 The relevant description of the first routing information is not repeated here. The scheduling engine unit determines the adjusted routing information based on the first routing information, wherein the determination process of the adjusted routing information can be seen in Figure 4 The relevant description will not be repeated here.

[0149] The route injection unit can obtain a route injection rule. The route injection rule is a rule for describing a rule for determining the second route information based on the adjusted route information and injecting the second route information into the destination network device. The route injection rule includes a device identifier of the destination network device and a routing protocol supported by the destination network device. After determining the adjusted route information, the route reflector can determine the second route information corresponding to the routing protocol supported by the destination network device based on the adjusted route information through the route injection unit according to the route injection rule, and inject the second route information into the corresponding destination network device.

[0150] If any network device supports the BGP protocol, the network device can be called the destination BGP network device, and when the second routing information corresponds to the BGP protocol, the second routing information can be injected into the destination BGP network device through the routing injection unit. Similarly, if any network device supports the BMP protocol, the network device can be called the destination BMP network device, and when the second routing information corresponds to the BMP protocol, the second routing information can be injected into the destination BMP network device through the routing injection unit. If any network device supports a custom protocol, the network device can be called the destination custom network device, and when the second routing information corresponds to the custom protocol, the second routing information can be injected into the destination custom network device through the routing injection unit.

[0151] It is understandable that the route injection unit may store the route injection rule in a database so that the route injection rule can be read from the database after the route reflector is restarted or crashed.

[0152] In an embodiment of the present application, the database may store at least one of the following scheduling information: route collection rules, route scheduling rules, route injection rules, first route information, reference route information, adjusted route information, and second route information. Based on this, the electronic device may search for query results matching the query content in the database according to the query content input by the user, and display the query content and query results through a display page. The query content is a keyword related to at least one scheduling information, and the query result is at least one scheduling information. By displaying the query content and query results, the scheduling process of visualized route information is realized.

[0153] It can be understood that the route reflector in the embodiment of the present application can not only exchange routing information between network devices of different protocols, but also exchange routing information between network devices of the same protocol.

[0154] In the case where the first routing protocol and the second routing protocol are the same, optionally, the route reflector can directly use the first routing information of the first routing protocol as the second routing information of the second routing protocol, and inject the second routing information into the second network device. Alternatively, in the case where the routing information needs to be adjusted, if the first routing protocol and the second routing protocol are the same as the reference routing protocol, the route reflector can directly use the first routing information of the first routing protocol as the reference routing information corresponding to the reference routing protocol, adjust the reference routing information to obtain the adjusted routing information, and use the adjusted routing information corresponding to the reference routing protocol as the second routing information of the second routing protocol, and inject the second routing information into the second network device. Alternatively, in the case where the routing information needs to be adjusted, if the first routing protocol and the second routing protocol are different from the reference routing protocol, the route reflector can convert the first routing information of the first routing protocol into the reference routing information corresponding to the reference routing protocol, adjust the reference routing information to obtain the adjusted routing information, and convert the adjusted routing information corresponding to the reference routing protocol into the second routing information of the second routing protocol, and inject the second routing information into the second network device. The adjustment method and the conversion method are described above, and will not be repeated here.

[0155] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant regions. For example, the configuration information, routing information, etc. involved in this application are all obtained with full authorization.

[0156] In the above method, the first network device supports the first routing protocol, and the second network device supports the second routing protocol. In this case, the second routing information is determined based on the first routing information sent by the first network device, and the second routing information is injected into the second network device, so that the exchange of routing information between network devices with different routing protocols is realized, the exchange scenarios of routing information are enriched, and the practicality is improved. In addition, since the first routing information represents the route from the first network device to the destination node, by injecting the second routing information into the second network device, when the second network device receives the data packet, it can determine that the next hop is the first network device according to the second routing information, and send the data packet to the destination node through the first network device, so as to realize the refined control of routing information, thereby accurately controlling the data packet transmission path, which is conducive to improving the transmission efficiency and transmission security of the data packet.

[0157] The above describes the method of the embodiment of the present application from the perspective of method steps. The following is a systematic and comprehensive description. Figure 6, Figure 6 This is a schematic diagram of routing information injection provided by an embodiment of the present application. In the embodiment of the present application, a route reflector is connected to a terminal device for communication, an application is installed on the terminal device, a user configures the relevant content of the routing information through the display page of the application, and triggers a scheduling request, so that the route reflector schedules the routing information based on the scheduling request.

[0158] The route reflector includes a route collection unit, a scheduling engine unit and a route injection unit. The scheduling engine unit is used to update the route scheduling rules and route collection rules based on the scheduling request, and store the route scheduling rules and route collection rules in a database. The route collection unit is used to obtain candidate route information sent by at least one source network device, and determine the first route information from the candidate route information according to the route collection rules. The scheduling engine unit is also used to adjust the first route information according to the route scheduling rules, obtain the adjusted route information, and determine the destination network device corresponding to the adjusted route information. The route injection unit is used to determine the second route information corresponding to the routing protocol supported by the corresponding target network device according to the adjusted route information, and inject the second route information into the corresponding destination network device.

[0159] Among them, the routing protocols supported by different source network devices may be the same or different, and the routing protocols supported by the source network devices and the routing protocols supported by the route reflector may be the same or different. According to the routing protocols supported by the source network devices, the source network devices may be divided into source BGP network devices, source BMP network devices, and source custom network devices. Similarly, the routing protocols supported by different destination network devices may be the same or different, and the routing protocols supported by the destination network devices and the routing protocols supported by the route reflector may be the same or different. According to the routing protocols supported by the destination network devices, the destination network devices may be divided into destination BGP network devices, destination BMP network devices, and destination custom network devices.

[0160] In order to facilitate understanding of the embodiments of the present application, a complete injection process is used as an example for explanation below. Figure 7 , Figure 7 This is another schematic diagram of routing information injection provided in an embodiment of the present application. The injection process includes the steps shown below.

[0161] Step 1: The user sends a scheduling task to the route reflector through the terminal device. The requirements of the scheduling task include: (1) obtaining routing information with the as_path attribute of 100 from the source device A; (2) adding the no-advertise attribute (i.e., no broadcast attribute) to the routing information; (3) injecting the adjusted routing information to the destination devices F and G. In other words, the route reflector obtains a scheduling request, which is used to instruct the route reflector to obtain the routing information with the as_path attribute of 100 sent by the source device A, add the no-advertise attribute to the routing information, and then send it to the destination devices F and G. The scheduling task corresponds to the content carried by the scheduling request mentioned above.

[0162] Step 2: The route reflector updates the route collection rule based on the scheduling request. The route collection rule is used to indicate that the route information with the as_path attribute of the source device A being 100 is collected.

[0163] Step 3: The route reflector updates the route scheduling rules based on the scheduling request. The route scheduling rules include conditions, methods, and results. The conditions are the route matching rules mentioned above, which are used to indicate the acquisition of the route information with the as_path attribute of 100 sent by the source device A. The method corresponds to the route adjustment rule mentioned above, which is used to indicate the addition of the no-advertise attribute to the route information. The result corresponds to the route distribution rule mentioned above, which is used to indicate the injection of the adjusted route information to the destination devices F and G.

[0164] Step 4: The source device sends candidate routing information to the route reflector. The candidate routing information may be sent by source device A, source device B, or source device C.

[0165] Step 5: The route reflector determines the first route information from the candidate route information according to the route collection rule through the route collection unit, and sends the first route information to the scheduling engine unit. The first route information is the route information with the as_path attribute of 100 sent by the source device A.

[0166] Step 6: The route reflector adjusts the first route information according to the route scheduling rule through the scheduling engine unit, that is, adds the no-advertise attribute to the first route information to obtain the adjusted route information. Then, according to the route distribution rule, it is determined that the adjusted route information corresponds to the destination devices F and G, and the adjusted route information is sent to the route injection unit.

[0167] Step 7: The route injection unit converts the adjusted route information into second route information corresponding to the routing protocol supported by the destination device F, and sends the second route information corresponding to the routing protocol supported by the destination device F to the destination device F. The route injection unit also converts the adjusted route information into second route information corresponding to the routing protocol supported by the destination device G, and sends the second route information corresponding to the routing protocol supported by the destination device G to the destination device G.

[0168] Through the above-mentioned method, it is possible to exchange routing information between network devices of different routing protocols, enrich the exchange scenarios of routing information, and improve practicality. For scenarios such as traffic scheduling and distributed denial of service (DDOS), the method of the embodiment of the present application can be used to issue scheduling tasks through the terminal device, and the routing information of the source network device can be injected into the destination network device according to the scheduling tasks. When the destination network device receives the data packet later, the data packet can be sent to the source network device, and the data packet is sent to the destination node through the source network device, so as to control the forwarding route of the data packet according to the user's scheduling intention, thereby realizing traffic scheduling and refined control of routing information. And the user only needs to pay attention to his own scheduling intention, without having to understand the complex network topology formed by the network equipment and the configuration of routing information, etc., which reduces the difficulty of implementation.

[0169] In the embodiment of the present application, the application of the terminal device can be used to configure the scheduling task, and the embodiment of the present application does not limit the content of the scheduling task.

[0170] For example, see Figure 8 , Figure 8 It is a schematic diagram of a display page provided in an embodiment of the present application. Figure 8 The display page shown corresponds to the scenario of customizing the dispatch routing information. You can configure and adjust the campus (corresponding to the first network device mentioned above), dispatch type, dispatch content, destination campus (corresponding to the second network device mentioned above) and other information on the display page. The dispatch type and dispatch content correspond to the routing collection rules mentioned above, the network segment corresponds to the first routing attribute, and 1.1.2.3 and 1.2.3.0 correspond to the attribute value conditions of the first routing attribute. The display page can also display information such as the destination exit, dispatch status, creation time, update time, and operation.

[0171] For example, see Fig. 9 , Fig. 9The display page shown corresponds to the scenario of route broadcasting. The route collection rules are set by configuring the broadcasting network segment on the display page. Among them, the broadcasting network segment corresponds to the first route attribute mentioned above, and J / 24 and A / 24 correspond to the attribute value conditions of the first route attribute mentioned above. The display page can also display information such as broadcast title, service type, broadcast status, creation time, update time, operation, etc.

[0172] For example, see Fig.10 , Fig.10 The display page shown corresponds to the blocking scenario. You can configure the blocked route prefix, source network device address, group attribute, etc. on the display page to configure the route collection rules. Among them, the blocked route prefix value 249.168.1.1 and the attribute values ​​1 to 5 of the group attribute correspond to the attribute value conditions of the first route attribute mentioned above. The display page can also display information such as whether the entire network is blocked, creation time, modification time, etc.

[0173] Fig.11 FIG. 1 is a schematic diagram of a structure of a routing information injection device provided in an embodiment of the present application. Fig.11 As shown, the device comprises:

[0174] An acquisition module 1101 is used to acquire first routing information sent by a first network device, the first network device supports a first routing protocol, the first routing information corresponds to the first routing protocol and is used to characterize a route from the first network device to a destination node;

[0175] A determination module 1102, configured to determine, based on the first routing information, second routing information when the first routing protocol and the second routing protocol supported by the second network device are different, the second routing information corresponding to the second routing protocol;

[0176] The injection module 1103 is used to inject the second routing information into the second network device. The second network device is used to determine the next hop as the first network device according to the second routing information when receiving the data packet, and send the data packet to the destination node through the first network device.

[0177] In one possible implementation, the acquisition module 1101 is used to obtain at least one candidate routing information sent by the first network device, any candidate routing information including an attribute value of at least one first routing attribute to be matched; obtain the attribute value conditions of each first routing attribute; and filter the first routing information whose attribute values ​​of each first routing attribute meet the corresponding attribute value conditions from at least one candidate routing information.

[0178] In a possible implementation, the device is applied on a route reflector, and the route reflector supports a reference routing protocol;

[0179] The determination module 1102 is configured to determine second routing information based on the first routing information when the first routing protocol and the reference routing protocol are different and the reference routing protocol and the second routing protocol are the same, and the second routing information corresponds to the reference routing protocol.

[0180] In a possible implementation, the device is applied on a route reflector, and the route reflector supports a reference routing protocol;

[0181] The determination module 1102 is configured to determine the second routing information based on the first routing information when the first routing protocol and the reference routing protocol are the same and the reference routing protocol and the second routing protocol are different, and the first routing information corresponds to the reference routing protocol.

[0182] In a possible implementation, the device is applied on a route reflector, and the route reflector supports a reference routing protocol;

[0183] The determination module 1102 is used to determine the reference routing information based on the first routing information and determine the second routing information based on the reference routing information when the first routing protocol and the reference routing protocol are different and the reference routing protocol and the second routing protocol are different, and the reference routing information corresponds to the reference routing protocol.

[0184] In one possible implementation, the determination module 1102 is used to obtain the attribute value condition of at least one second routing attribute configured; when the attribute value of each second routing attribute satisfies the corresponding attribute value condition, the target routing information is adjusted to obtain adjusted routing information, the target routing information is the first routing information or is determined based on the first routing information, and corresponds to the reference routing protocol, the target routing information includes the attribute value of each second routing attribute; and the second routing information is determined based on the adjusted routing information.

[0185] In a possible implementation, the determining module 1102 is configured to perform at least one of the following:

[0186] Acquire an attribute value of at least one third routing attribute to be added, and add the attribute value of each third routing attribute to the target routing information;

[0187] Determine at least one fourth routing attribute to be deleted, and delete the attribute value of each fourth routing attribute in the reference routing information;

[0188] In the case where the reference routing information includes the attribute value of at least one fifth routing attribute to be modified, the attribute value of each fifth routing attribute is modified to a configuration value.

[0189] In a possible implementation, the acquisition module 1101 is further used to acquire configuration information, where the configuration information includes a device identifier of the first network device and a device identifier of the second network device;

[0190] The determination module 1102 is further configured to determine, based on the correspondence between the device identifier and the routing protocol, a first routing protocol corresponding to the device identifier of the first network device and a second routing protocol corresponding to the device identifier of the second network device.

[0191] In the above device, the first network device supports the first routing protocol, and the second network device supports the second routing protocol. In this case, the second routing information is determined based on the first routing information sent by the first network device, and the second routing information is injected into the second network device, so that the exchange of routing information between network devices with different routing protocols is realized, the exchange scenarios of routing information are enriched, and the practicality is improved. In addition, since the first routing information represents the route from the first network device to the destination node, by injecting the second routing information into the second network device, when the second network device receives the data packet, it can determine that the next hop is the first network device according to the second routing information, and send the data packet to the destination node through the first network device, so as to realize the refined control of routing information, thereby accurately controlling the data packet transmission path, which is conducive to improving the transmission efficiency and transmission security of the data packet.

[0192] It should be understood that the above Fig.11 When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0193] Fig.12 The structure block diagram of a terminal device 1200 provided by an exemplary embodiment of the present application is shown. The terminal device 1200 includes: a processor 1201 and a memory 1202 .

[0194] The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0195] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one computer program, which is executed by the processor 1201 to implement the method for injecting routing information provided in the method embodiment of the present application.

[0196] In some embodiments, the terminal device 1200 may further optionally include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202 and the peripheral device interface 1203 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1203 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1204, a display screen 1205, a camera assembly 1206, an audio circuit 1207 and a power supply 1208.

[0197] The peripheral device interface 1203 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, the memory 1202, and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202, and the peripheral device interface 1203 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0198] The radio frequency circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1204 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1204 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1204 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0199] The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to collect touch signals on the surface or above the surface of the display screen 1205. The touch signal can be input to the processor 1201 as a control signal for processing. At this time, the display screen 1205 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1205 can be one, set on the front panel of the terminal device 1200; in other embodiments, the display screen 1205 can be at least two, respectively set on different surfaces of the terminal device 1200 or in a folding design; in other embodiments, the display screen 1205 can be a flexible display screen, set on a curved surface or a folding surface of the terminal device 1200. Even, the display screen 1205 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1205 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0200] The camera assembly 1206 is used to capture images or videos. Optionally, the camera assembly 1206 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1206 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0201] The audio circuit 1207 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1201 for processing, or input them into the radio frequency circuit 1204 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal device 1200. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1207 may also include a headphone jack.

[0202] The power supply 1208 is used to power various components in the terminal device 1200. The power supply 1208 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1208 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0203] In some embodiments, the terminal device 1200 further includes one or more sensors 1209 , including but not limited to: an acceleration sensor 1211 , a gyroscope sensor 1212 , a pressure sensor 1213 , an optical sensor 1214 , and a proximity sensor 1215 .

[0204] The acceleration sensor 1211 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal device 1200. For example, the acceleration sensor 1211 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1201 can control the display screen 1205 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1211. The acceleration sensor 1211 can also be used to collect game or user motion data.

[0205] The gyro sensor 1212 can detect the body direction and rotation angle of the terminal device 1200, and the gyro sensor 1212 can cooperate with the acceleration sensor 1211 to collect the user's 3D actions on the terminal device 1200. The processor 1201 can implement the following functions based on the data collected by the gyro sensor 1212: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0206] The pressure sensor 1213 can be set on the side frame of the terminal device 1200 and / or the lower layer of the display screen 1205. When the pressure sensor 1213 is set on the side frame of the terminal device 1200, it can detect the user's holding signal of the terminal device 1200, and the processor 1201 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1213. When the pressure sensor 1213 is set on the lower layer of the display screen 1205, the processor 1201 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 1205. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0207] The optical sensor 1214 is used to collect the ambient light intensity. In one embodiment, the processor 1201 can control the display brightness of the display screen 1205 according to the ambient light intensity collected by the optical sensor 1214. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1205 is increased; when the ambient light intensity is low, the display brightness of the display screen 1205 is reduced. In another embodiment, the processor 1201 can also dynamically adjust the shooting parameters of the camera assembly 1206 according to the ambient light intensity collected by the optical sensor 1214.

[0208] The proximity sensor 1215, also called a distance sensor, is usually arranged on the front panel of the terminal device 1200. The proximity sensor 1215 is used to collect the distance between the user and the front of the terminal device 1200. In one embodiment, when the proximity sensor 1215 detects that the distance between the user and the front of the terminal device 1200 is gradually decreasing, the processor 1201 controls the display screen 1205 to switch from the screen-on state to the screen-off state; when the proximity sensor 1215 detects that the distance between the user and the front of the terminal device 1200 is gradually increasing, the processor 1201 controls the display screen 1205 to switch from the screen-off state to the screen-on state.

[0209] Those skilled in the art will understand that Fig.12 The structure shown in the figure does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0210] Fig.13The schematic diagram of the structure of the server provided in the embodiment of the present application, the server 1300 may have relatively large differences due to different configurations or performances, and may include one or more processors 1301 and one or more memories 1302, wherein the one or more memories 1302 store at least one computer program, and the at least one computer program is loaded and executed by the one or more processors 1301 to implement the routing information injection method provided in the above-mentioned various method embodiments, and exemplarily, the processor 1301 is a CPU. Of course, the server 1300 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server 1300 may also include other components for implementing device functions, which will not be described in detail here.

[0211] In an exemplary embodiment, a computer-readable storage medium is further provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned methods for injecting routing information.

[0212] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0213] In an exemplary embodiment, a computer program is further provided. The computer program is at least one, and the at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned methods for injecting routing information.

[0214] In an exemplary embodiment, a computer program product is further provided. The computer program product stores at least one computer program, and the at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned methods for injecting routing information.

[0215] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the 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. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0216] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

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

Claims

1. A method for injecting routing information, characterized in that: The method comprises: Acquire first routing information sent by a first network device, the first network device supports a first routing protocol, the first routing information corresponds to the first routing protocol and is used to characterize a route from the first network device to a destination node; In a case where the first routing protocol and a second routing protocol supported by the second network device are different, determining second routing information based on the first routing information, the second routing information corresponding to the second routing protocol; The second routing information is injected into the second network device, and the second network device is used to determine that the next hop is the first network device according to the second routing information when receiving a data packet, and send the data packet to the destination node through the first network device.

2. The method according to claim 1, characterized in that The obtaining of first routing information sent by the first network device includes: Acquire at least one candidate routing information sent by the first network device, any candidate routing information including an attribute value of at least one first routing attribute to be matched; Obtaining attribute value conditions of each first route attribute; First routing information whose attribute values ​​of respective first routing attributes meet corresponding attribute value conditions is screened from the at least one candidate routing information.

3. The method according to claim 1, characterized in that The method is performed by a route reflector, the route reflector supporting a reference routing protocol; The determining the second routing information based on the first routing information when the first routing protocol and the second routing protocol supported by the second network device are different includes: In a case where the first routing protocol and the reference routing protocol are different, and the reference routing protocol and the second routing protocol are the same, the second routing information is determined based on the first routing information, and the second routing information corresponds to the reference routing protocol.

4. The method according to claim 1, characterized in that The method is performed by a route reflector, the route reflector supporting a reference routing protocol; The determining the second routing information based on the first routing information when the first routing protocol and the second routing protocol supported by the second network device are different includes: In a case where the first routing protocol and the reference routing protocol are the same, and the reference routing protocol and the second routing protocol are different, the second routing information is determined based on the first routing information, and the first routing information corresponds to the reference routing protocol.

5. The method according to claim 1, characterized in that The method is performed by a route reflector, the route reflector supporting a reference routing protocol; The determining the second routing information based on the first routing information when the first routing protocol and the second routing protocol supported by the second network device are different includes: In the case where the first routing protocol and the reference routing protocol are different, and the reference routing protocol and the second routing protocol are different, reference routing information is determined based on the first routing information, and the second routing information is determined based on the reference routing information, and the reference routing information corresponds to the reference routing protocol.

6. The method according to any one of claims 3 to 5, characterized in that: The determining the second routing information based on the first routing information includes: Obtaining a configured attribute value condition of at least one second routing attribute; When the attribute value of each second routing attribute satisfies the corresponding attribute value condition, adjust the target routing information to obtain adjusted routing information, where the target routing information is the first routing information or is determined based on the first routing information and corresponds to the reference routing protocol, and the target routing information includes the attribute value of each second routing attribute; The second routing information is determined based on the adjusted routing information.

7. The method according to claim 6, characterized in that The step of adjusting the target routing information to obtain the adjusted routing information includes at least one of the following: Acquire an attribute value of at least one third routing attribute to be added, and add the attribute value of each third routing attribute to the target routing information; Determine at least one fourth routing attribute to be deleted, and delete the attribute value of each fourth routing attribute in the reference routing information; In the case that the reference routing information includes the attribute value of at least one fifth routing attribute to be modified, the attribute value of each fifth routing attribute is modified to a configuration value.

8. The method according to claim 1, characterized in that The method further comprises: Acquire configuration information, where the configuration information includes a device identifier of the first network device and a device identifier of the second network device; Based on the correspondence between the device identification and the routing protocol, the first routing protocol corresponding to the device identification of the first network device and the second routing protocol corresponding to the device identification of the second network device are determined.

9. A routing information injection device, characterized in that: The device comprises: An acquisition module, configured to acquire first routing information sent by a first network device, wherein the first network device supports a first routing protocol, and the first routing information corresponds to the first routing protocol and is used to characterize a route from the first network device to a destination node; A determination module, configured to determine second routing information based on the first routing information when the first routing protocol and the second routing protocol supported by the second network device are different, the second routing information corresponding to the second routing protocol; The injection module is used to inject the second routing information into the second network device, and the second network device is used to determine that the next hop is the first network device according to the second routing information when receiving a data packet, and send the data packet to the destination node through the first network device.

10. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor so that the electronic device implements the method for injecting routing information as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements the method for injecting routing information as described in any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that the electronic device implements the method for injecting routing information as described in any one of claims 1 to 8.