A routing leak optimization method, device and medium

By creating multiple VRFs in cyberspace and splitting the neighbor table, each VRF can independently maintain and synchronously update its routing and neighbor tables. This solves the problems of cumbersome route leakage and bloated routing tables in existing technologies, and improves the efficiency and accuracy of route forwarding.

CN116506344BActive Publication Date: 2026-07-21INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR NETWORK TECH (SHANDONG) CO LTD
Filing Date
2023-05-18
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, the route leakage process is cumbersome and leads to bloated routing tables, especially on Layer 3 switches where it is difficult to synchronize routing information and manage neighbor tables between multiple VRFs.

Method used

Multiple Virtual Radio Frequencies (VRFs) are created in the network space, and the interfaces of network devices are added to multiple VRFs. The neighbor table is split into multiple tables, and the routing table and neighbor table are maintained in each VRF to achieve synchronous updates of routing information and neighbor information.

Benefits of technology

It simplifies the route leakage process, avoids the bloated routing table and the copying process of the neighbor table, ensures that each VRF can independently handle routing and neighbor information, and improves the efficiency and accuracy of route forwarding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116506344B_ABST
    Figure CN116506344B_ABST
Patent Text Reader

Abstract

The application discloses a routing leak optimization method, device and medium, and belongs to the technical field of communication, and is used for solving the technical problems that the existing routing leak method is easy to cause the routing table to be bloated and the process to be complicated when involving multiple VRFs. The method comprises the following steps: creating multiple virtual routing forwarding VRFs in a network space; adding corresponding interfaces of network devices to the multiple VRFs in the network space; when the corresponding interfaces receive routing information, processing the routing information through the multiple VRFs, so as to add the routing information into routing tables corresponding to the multiple VRFs respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method, device and medium for optimizing routing leakage. Background Technology

[0002] Currently, the kernel design of communication technologies uses routing tables to solve the problem of packet forwarding. A network namespace has multiple routing tables, and each Virtual Routing Forwarding (VRF) maintains its own routing table. That is, routes learned on VRF1 are stored in routing table 1, and VRF1's Layer 3 packets are forwarded according to routing table 1. Meanwhile, neighbor tables are used to solve the problem of next-hop reachability. A network namespace has only one neighbor table, and this neighbor table corresponds to only one Layer 3 interface. This Layer 3 interface can only join one VRF. Therefore, there is no need to design neighbor tables specifically for each VRF, because a single neighbor table can represent multiple VRFs.

[0003] This kernel design works fine for end users, but when there's a need for route leakage on a Layer 3 switch—specifically, leaking routes learned by VRF1 to VRF2 so that VRF2's data packets can be forwarded based on the routes learned by VRF1—a common approach is to copy the routing table learned by VRF1 into the routing table of VRF2. However, this method results in bloated routing tables and becomes cumbersome when multiple VRFs need to leak routes to each other. Summary of the Invention

[0004] This application provides a route leakage optimization method, device, and medium to solve the technical problem that existing route leakage methods are cumbersome and cause bloated routing tables.

[0005] The embodiments of this application adopt the following technical solutions:

[0006] In a first aspect, embodiments of this application provide a route leakage optimization method, the method comprising: creating multiple virtual route forwarding (VRFs) in a network space; adding corresponding interfaces of network devices to the multiple VRFs in the network space; and when the corresponding interface receives routing information, processing the routing information through the multiple VRFs to add the routing information to the routing tables corresponding to the multiple VRFs respectively.

[0007] In one or more embodiments of this application specification, before adding the routing information to the routing tables corresponding to the plurality of VRFs respectively, the method further includes: the plurality of VRFs configuring parameters for their respective corresponding routing tables.

[0008] In one or more embodiments of this application specification, after adding the routing information to the routing tables corresponding to the plurality of VRFs respectively, the method further includes: the plurality of VRFs maintaining routing information in their respective routing tables.

[0009] In one or more embodiments of this application specification, before adding the corresponding interface of the network device to multiple VRFs, the method further includes: determining the number of VRFs in the network space; splitting a neighbor table in the network space such that the number of neighbor tables obtained after splitting is equal to the number of VRFs, and each of the multiple VRFs corresponds to a neighbor table.

[0010] In one or more embodiments of this application specification, after splitting a neighbor table in the network space, the method further includes: when the corresponding interface receives a neighbor packet, processing the neighbor packet through the multiple VRFs; and generating a neighbor in the neighbor table corresponding to each of the multiple VRFs according to the processing result.

[0011] In one or more embodiments of this application specification, before generating neighbors in the neighbor tables corresponding to the plurality of VRFs according to the processing results, the method further includes: the plurality of VRFs configuring parameters for their respective neighbor tables, the parameters including at least neighbor table aging parameters.

[0012] In one or more embodiments of this application specification, after generating neighbors in the neighbor tables corresponding to the plurality of VRFs according to the processing results, the method further includes: the plurality of VRFs maintaining neighbor information in their respective neighbor tables.

[0013] In one or more embodiments of this application specification, the method further includes: when forwarding a packet, any one of the plurality of VRFs matches routing information through the routing table corresponding to the any one VRF, and completes the next-hop selection through the neighbor table corresponding to the any one VRF.

[0014] Secondly, embodiments of this application also provide a route leakage optimization device, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to execute a route leakage optimization method as described above.

[0015] Thirdly, embodiments of this application also provide a non-volatile computer storage medium storing computer-executable instructions thereon, the computer-executable instructions being configured to execute a routing leakage optimization method as described above.

[0016] The routing information leakage optimization method, device, and medium provided in this application have the following beneficial effects: The routing information leakage optimization method in this application connects network device interfaces to multiple VRFs and splits a single neighbor table in the network space into multiple tables, so that each VRF maintains its own neighbor table. This enables each VRF to have its own corresponding routing table and neighbor table. When processing routing information and neighbor information, each VRF processes the information and updates its corresponding table accordingly, thus synchronizing the routing table and neighbor table. This avoids the process of copying the VRF neighbor table or routing table, solving the problem of bloated routing tables. At the same time, when multiple VRFs are involved, each VRF can match routes and select next hops through its own routing table and neighbor table, simplifying the routing leakage process and avoiding the cumbersome and error-prone copying process of the original design. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0018] Figure 1 A flowchart of a route leakage optimization method provided in this application embodiment;

[0019] Figure 2 This is a schematic diagram of the structure of a routing leakage optimization device provided in an embodiment of this application. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0021] Currently, the kernel design of the network space is generally fine for end users. However, there is a need for route leakage on Layer 3 switches. This involves leaking routes learned by VRF1 to VRF2, allowing VRF2's data packets to be forwarded based on the routes learned by VRF1. For example, VRF1 learns a route 12.0.0.0 / 24---12.0.0.5. VRF2 needs to forward a data packet with a destination IP of 12.0.0.100, but VRF2 doesn't have the route and cannot forward it. In this case, the route learned by VRF1 needs to be leaked into VRF2's routing table. This means copying the route learned by VRF1 into VRF2's routing table. This way, when VRF2 needs to forward a packet with a destination IP of 12.0.0.100, it can match the route, and the next hop is 12.0.0.5. Then, the global neighbor table is consulted to determine if 12.0.0.5 is reachable and which interface to use for outgoing traffic.

[0022] The following problems will occur:

[0023] 1) Routing tables are often very large, requiring a lot of copying, which makes the routing tables bloated.

[0024] 2) It is impossible to determine which VRF the next hop exit belongs to. Packets from both VRF1 and VRF2 can exit from a certain interface.

[0025] 3) The problem of multiple VRFs leaking into each other can be very complicated.

[0026] 4) Synchronizing the routing tables of each VRF is also very difficult.

[0027] 5) Cumbersome configuration.

[0028] This application provides a route leakage optimization method, which solves the above-mentioned technical problem by connecting the network device interface to multiple VRFs, enabling each VRF to maintain its own neighbor table and routing table.

[0029] The methods in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0030] Figure 1 A flowchart of a route leakage optimization method provided in this application embodiment is shown below. Figure 1 As shown, the route leakage optimization method in this application embodiment includes at least the following execution steps:

[0031] Step 101: Create multiple VRFs in the network space.

[0032] The route leakage optimization method provided in this application first requires creating multiple Virtual Routing Forwarding (VRFs) within a network namespace. It should be noted that the method of creating VRFs can be implemented using existing technologies, and this application does not limit this approach.

[0033] Meanwhile, the original routing table design in the network namespace kernel will not be modified.

[0034] Step 102: In the network space, add the corresponding interface of the network device to multiple VRFs.

[0035] After creating multiple VRFs, the interfaces of network devices in the network namespace are connected to these VRFs. In one example of this application, the aforementioned network device is generally a Layer 3 switch with Layer 3 interfaces.

[0036] In one or more possible implementations of the embodiments of this application, before connecting the interface to multiple VRFs, it is necessary to first split the neighbor table in the network space kernel. The original design is that there is only one neighbor table in the kernel. In order to achieve neighbor table synchronization, the neighbor table is split into multiple neighbor tables, and the number of neighbor tables obtained by splitting is the same as the number of multiple VRFs.

[0037] Step 103: Process the routing information through the multiple VRFs.

[0038] After splitting the neighbor table, it was implemented in network space that one VRF corresponds to one neighbor table and one routing table.

[0039] Therefore, when the interface receives routing information, multiple VRFs will process the routing information and update the routing information in their respective routing tables, that is, add the routing information to their respective routing tables. This avoids the problem of routing table bloat caused by routing table copying when routes are leaked, and can also ensure the synchronization of each routing table.

[0040] In one example of this application, each VRF configures the parameters of the routing table before updating the routing information, and also maintains the routing table after the routing information is updated.

[0041] Furthermore, when an interface receives a neighbor message, multiple VRFs will process the neighbor message and generate a neighbor in their respective neighbor tables to ensure the synchronization of the neighbor tables and avoid the copying process of the neighbor tables.

[0042] Similarly, in one example of this application, each VRF configures the parameters of the neighbor table before generating neighbors. The parameters configured here are mainly aging parameters. The neighbor table is also maintained after the neighbors are generated.

[0043] In this embodiment of the application, when any of the multiple VRFs needs to forward a packet, the routing information is matched through the routing table corresponding to that VRF, and the next hop selection is completed through the neighbor table corresponding to that VRF, thereby realizing packet forwarding.

[0044] Based on the same inventive concept, this application also provides a route leakage optimization device, the structure of which is as follows: Figure 2 As shown.

[0045] Figure 2 This is a schematic diagram of a route leakage optimization device provided in an embodiment of this application. Figure 2 As shown, the device 200 in this embodiment of the application specifically includes: at least one processor 201; and a memory 203 communicatively connected to at least one processor 201 (connected via a bus 202); wherein the memory 203 stores instructions executable by at least one processor 201 to enable at least one processor 201 to execute a routing leakage optimization method as described in the above embodiments.

[0046] In one or more possible implementations of the embodiments of this application, the aforementioned processor is configured to perform the following: create multiple Virtual Router Forwarding (VRFs) in the network space; add the corresponding interfaces of network devices to the multiple VRFs in the network space; when the corresponding interface receives routing information, process the routing information through the multiple VRFs to add the routing information to the routing tables corresponding to the multiple VRFs respectively.

[0047] In addition, embodiments of this application also provide a non-volatile computer storage medium storing computer-executable instructions configured to execute a routing leakage optimization method as described above.

[0048] In one or more possible implementations of the embodiments of this application, the aforementioned computer-executable instructions are configured to execute, creating multiple virtual route forwarding (VRFs) in the network space; in the network space, the corresponding interfaces of network devices are added to the multiple VRFs; when the corresponding interface receives routing information, the routing information is processed through the multiple VRFs to add the routing information to the routing tables corresponding to the multiple VRFs respectively.

[0049] In summary, the route leakage optimization method in this application adds an interface to multiple VRFs, thereby updating the routing and neighbor information learned by the interface to the corresponding routing and neighbor tables. This avoids the cumbersome and error-prone process of copying the original routing tables, and also solves the problem of bloated routing tables caused by mutual copying.

[0050] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0051] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0052] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0053] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0054] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0055] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0056] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for optimizing route leakage, characterized in that, The method includes: Create multiple virtual routes in cyberspace to forward VRFs; In the network space, the corresponding interfaces of the network devices are added to multiple VRFs; When the corresponding interface receives routing information, the routing information is processed by the multiple VRFs to add the routing information to the routing tables corresponding to the multiple VRFs respectively; Before adding the corresponding interface of the network device to multiple VRFs, the method further includes: Determine the number of VRFs in the network space, split a neighbor table in the network space such that the number of neighbor tables obtained after the split is equal to the number of VRFs, and each VRF corresponds to a neighbor table. When a neighbor message is received at the corresponding interface, the neighbor message is processed by multiple VRFs. Based on the processing results, a neighbor is generated in the neighbor table corresponding to each of the multiple VRFs. Before generating a neighbor, the multiple VRFs configure parameters for their respective neighbor tables, including at least neighbor table aging parameters. After generating a neighbor, the multiple VRFs maintain neighbor information in their respective neighbor tables.

2. The routing leakage optimization method according to claim 1, characterized in that, Before adding the routing information to the routing tables corresponding to the multiple VRFs respectively, the method further includes: Each of the multiple VRFs configures the parameters of its corresponding routing table.

3. The routing leakage optimization method according to claim 1, characterized in that, After adding the routing information to the routing tables corresponding to the multiple VRFs, the method further includes: Each of the multiple VRFs maintains routing information in its respective routing table.

4. The routing leakage optimization method according to claim 1, characterized in that, The method further includes: When forwarding packets, any one of the multiple VRFs matches routing information through the routing table corresponding to that VRF and completes the next-hop selection through the neighbor table corresponding to that VRF.

5. A routing leakage optimization device, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a routing leakage optimization method according to any one of claims 1-4.

6. A non-volatile computer storage medium storing computer-executable instructions thereon, characterized in that, The computer-executable instructions are configured to execute a routing leakage optimization method according to any one of claims 1-4.