[go: up one dir, main page]

CN119766724A - Routing table updating method and device, electronic equipment and readable storage medium - Google Patents

Routing table updating method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN119766724A
CN119766724A CN202411696577.0A CN202411696577A CN119766724A CN 119766724 A CN119766724 A CN 119766724A CN 202411696577 A CN202411696577 A CN 202411696577A CN 119766724 A CN119766724 A CN 119766724A
Authority
CN
China
Prior art keywords
virtual
routing
forwarding
array
internet protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202411696577.0A
Other languages
Chinese (zh)
Other versions
CN119766724B (en
Inventor
蔡慧超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202411696577.0A priority Critical patent/CN119766724B/en
Publication of CN119766724A publication Critical patent/CN119766724A/en
Application granted granted Critical
Publication of CN119766724B publication Critical patent/CN119766724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例提供了一种路由表更新方法、装置、电子设备及可读存储介质,包括:获取最长前缀匹配路由表和虚拟路由转发数组,虚拟路由转发数组携带互联网协议地址;将最长前缀匹配路由表中每一表项的内容设置为空指针;通过互联网协议地址,确定虚拟路由转发数组在最长前缀匹配路由表中对应的目标表项;将目标表项中的空指针调整为指向虚拟路由转发数组的指针,从而节省存储空间。

The embodiments of the present invention provide a routing table updating method, device, electronic device and readable storage medium, including: obtaining a longest prefix matching routing table and a virtual routing forwarding array, the virtual routing forwarding array carrying an Internet Protocol address; setting the content of each table item in the longest prefix matching routing table to a null pointer; determining the target table item corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the Internet Protocol address; adjusting the null pointer in the target table item to a pointer pointing to the virtual routing forwarding array, thereby saving storage space.

Description

Routing table updating method and device, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and apparatus for updating a routing table, an electronic device, and a readable storage medium.
Background
The route lookup algorithm plays a crucial role in the network, and is one of the main factors determining the performance of the three-layer forwarding network element. Although there are currently a variety of route lookup algorithms, and each has an emphasis, the lookup speed is always the final goal pursued by each algorithm. One such algorithm is an LPM (Longest Prefix Match ) lookup table in a DPDK FIB (DATA PLANE Development Kit Forwarding Information Base ) library, which achieves the extreme of lookup performance through a DIR-24-8 data structure, ensuring that most route lookups only need one lookup, and a small number of at most two lookups can hit. However, this high performance is premised on sacrificing memory space, which is a typical algorithm that trades space for time.
So although this algorithm performs well in some scenarios, it has limitations in use scenarios. For example, in the VRF (Virtual Routing and Rorwarding, virtual route forwarding) usage scenario, the VRF requires the use of multiple independent route look-up tables, which can result in the LPM look-up tables of the DPDK taking up significant memory space and possibly even being out of normal use.
In summary, while the LPM lookup table of the DPDK FIB library is excellent in lookup speed, its enormous demand for memory space limits its application in certain specific scenarios.
Disclosure of Invention
The invention provides a routing table updating method, a routing table updating device, electronic equipment and a readable storage medium, so as to solve the problem that the LPM lookup table of the current DPDK FIB library has limitation of use scenes because of the arrangement of using space change time.
In order to solve the technical problems, the invention is realized as follows:
In a first aspect, the present invention provides a routing table updating method, the method including:
Obtaining a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet protocol address;
Setting the content of each entry in the longest prefix matching routing table as a null pointer;
Determining a target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the internet protocol address;
And adjusting the null pointer in the target table entry to be a pointer pointing to the virtual route forwarding array.
Optionally, before the longest prefix matching routing table and the virtual routing forwarding array are obtained, the method further includes:
acquiring a plurality of virtual route forwarding tenants, wherein the virtual route forwarding tenants carry an Internet protocol address;
acquiring a network segment of the Internet protocol address;
Dividing a plurality of virtual route forwarding tenants according to the network segment of the Internet protocol address to obtain a plurality of dividing areas related to the virtual route forwarding tenants;
And generating a virtual route forwarding array according to the plurality of divided areas.
Optionally, the generating a virtual routing forwarding array according to the plurality of divided areas includes:
Aiming at any divided area, the number of virtual route forwarding tenants contained in the divided area is obtained, and the number identification and the next hop routing information carried by the virtual route forwarding tenants are obtained;
acquiring the length of a virtual route forwarding array corresponding to the dividing region according to the number of virtual route forwarding tenants contained in the dividing region;
determining elements in the virtual route forwarding array according to the next hop routing information carried by the virtual route forwarding tenant;
And determining the position of each element in the virtual route forwarding array according to the digital identifier carried by the virtual route forwarding tenant.
Optionally, after the obtaining, for any of the divided areas, the number of virtual routing forwarding tenants included in the divided area, a digital identifier carried by the virtual routing forwarding tenant and next hop routing information, the method further includes:
if the number of the virtual route forwarding tenants in the divided area is larger than a preset threshold value, setting a hash table containing preset number table items;
Acquiring a target network segment of an internet protocol address carried by a virtual routing forwarding tenant in any divided area;
Setting the target network segment as an identification of the hash table;
and determining a corresponding table entry of next-hop routing information in the hash table in the virtual route forwarding tenant according to the digital identifier carried by the virtual route forwarding tenant.
Optionally, before determining, by the ip address, that the virtual routing forwarding array matches a corresponding target entry in the routing table with the longest prefix, the method further includes:
acquiring a first network mask comprising a preset number of bits;
and determining the table entry subscript of the longest prefix matching routing table according to the first network mask of the preset bit number.
Optionally, the determining, by the internet protocol address, the target entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table further includes:
Acquiring a second network mask of the internet protocol address and an actual number of bits of the second network mask;
Comparing the actual digit with the preset digit;
if the actual number of bits is smaller than the preset number of bits, expanding the Internet protocol address according to the preset number of bits to obtain a target Internet protocol address;
And determining a target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the target internet protocol address.
Optionally, after the adjusting the null pointer in the target entry to be a pointer pointing to the virtual route forwarding array, the method further includes:
acquiring an internet protocol address and a digital identifier of a virtual routing forwarding tenant to be queried;
determining an item to be queried in the longest prefix matching routing table through the internet protocol address of the virtual routing forwarding tenant to be queried;
Determining a target virtual route forwarding array through the pointer in the table item to be queried;
Determining a target position in the target virtual route forwarding array through the digital identification of the virtual route forwarding tenant to be queried;
and acquiring next hop routing information of the virtual routing forwarding tenant to be queried from the target position.
In a second aspect, the present invention provides a routing table updating apparatus, the apparatus comprising:
The first acquisition module is used for acquiring the longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet protocol address;
the setting module is used for setting the content of each item in the longest prefix matching routing table as a null pointer;
a first determining module, configured to determine, according to the internet protocol address, a target entry corresponding to the longest prefix matching routing table in the virtual routing forwarding array;
and the adjusting module is used for adjusting the null pointer in the target table item to be a pointer pointing to the virtual route forwarding array.
In a third aspect, the invention provides an electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the routing table updating method when executing the program.
In a fourth aspect, the present invention provides a readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the above-described routing table updating method.
In the embodiment of the invention, a longest prefix matching routing table and a virtual routing forwarding array are acquired, the virtual routing forwarding array carries an Internet protocol address, the content of each table item in the longest prefix matching routing table is set to be a null pointer, a target table item corresponding to the virtual routing forwarding array in the longest prefix matching routing table is determined through the Internet protocol address, the null pointer in the target table item is adjusted to be a pointer pointing to the virtual routing forwarding array, the content in the longest prefix matching routing table is updated to be the pointer, a plurality of virtual routing forwarding arrays can share the LPM table, the searching speed is ensured to be unchanged, the storage space is saved, the searching speed is ensured by using the data structure of the virtual routing forwarding array, the virtual routing forwarding array is configured according to the requirement, the null table item does not need to be applied to be configured, and the storage space is further saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a routing table configuration of a DIR-24-8 data structure according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of LPM lookup table route addition of DPDK according to an embodiment of the present invention;
fig. 3 is a flowchart of a step of a routing table updating method according to an embodiment of the present invention;
Fig. 4 is a schematic diagram of a hash table for setting virtual routing forwarding in the routing table updating method according to the embodiment of the present invention shown in fig. 3;
FIG. 5 is a schematic diagram of a hollow pointer setting in a routing table updating method according to an embodiment of the present invention shown in FIG. 3;
FIG. 6 is a flowchart of step 103 in a routing table updating method according to the embodiment of the present invention shown in FIG. 3;
Fig. 7 is a schematic diagram of setting a virtual routing forwarding array in the routing table updating method according to the embodiment of the present invention shown in fig. 3;
fig. 8 is a block diagram of a routing table updating apparatus according to an embodiment of the present invention;
Fig. 9 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention is applied to a route searching scene of a FIB (Forwarding Information Base ) of a DPDK (DATA PLANE Development Kit) in a VRF (Virt ual Routing and Rorwarding, virtual route forwarding). The DPD K is an open source library and a driver, is mainly operated based on a Linux system, is used for fast data packet processing, and can greatly improve data processing performance and throughput and improve the working efficiency of a data plane application program. The FIB is used to determine how to forward the network prefix based on the IP packet, and the VRF technology is used to implement isolation of data or service by creating multiple routing tables on a three-layer forwarding device (also referred to as a three-layer forwarding network element), which is often used in some application scenarios such as MPLS VPN, firewall, etc. where isolation needs to be implemented. The three-layer forwarding device can be a route, a firewall, a three-layer switch network element and the like, and the route can be searched through the network device.
The route searching scene needs to use a route searching algorithm, a plurality of route searching algorithms exist at present, each route searching algorithm has an emphasis point, but the searching speed is the final aim pursued by each algorithm, wherein the LPM (Longest Prefix Match, longest prefix matching) searching table algorithm of the DPDK FIB library plays the extreme role of searching performance, and most of route searching can be achieved by using a DIR-24-8 data structure. However, the LPM lookup table of the DPDK FIB library has such a high lookup performance at the expense of memory space. It should be noted that, the LPM table implements a longest prefix matching table searching method of 32-bit key in the DP DK LPM library component, which is used to find the best route matching in the IP forwarding application program, and is a special route table. In general, a mapping relationship between a target internet protocol address and a next-hop address is stored in a routing table, and a router determines a transmission path of a data packet according to the internet protocol address and the routing table, so as to ensure that data can be sent from a source device to a target device. The LPM table performs route lookup through DIR-24-8 data structures, and the Internet protocol addresses used can be IPv4 and IPv6.IPv4 is a fourth version of the internet protocol that defines the format and packet of internet protocol addresses, and Pv4 addresses are 32-bit, typically represented in dot decimal notation, e.g., 192.168.1.1.IPv6 is a sixth version of the internet protocol that is used to replace the next generation IP protocol of IPv4, defining the format of internet protocol addresses and the structure of data packets. The IPv6 address is 128 bits, typically represented in hexadecimal notation by a colon, for example 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Based on the above, taking IPv4 addresses as an example, describing the size of the storage space occupied by the LP M lookup table currently using the DIR-24-8 data structure, as shown in fig. 1, the table is divided into two parts, one part corresponds to the first 24 bits of mask and the other part corresponds to the second 8 bits of mask, each table entry in the table can be used to store the next hop routing information, where the next hop routing information refers to the address of the next network node or device to which the data packet should be forwarded after being processed on the current router or switch, the size unit Byte is Byte, the available values are 1,2, 4, 8, and 4 bytes, and the storage space occupied by the table corresponding to the 24 bits mask is 2 x 24 x 4 b=64 MB, the table corresponding to the second 8 bits of mask can be 2 x 24 KB at most, each table size is 2 x 8 x 4 b=1 KB, the maximum occupied storage space is 2 x 24 gb=16 GB, and the full size unit Byte is 16GB, and the four bytes are calculated, and the four bytes are stored in the same size unit Byte, and 16GB, and the four bytes are respectively stored in the four bytes. It can be seen that the overall LPM lookup table occupies a relatively large amount of memory and that most of the routing entries are within 24-bit masks during actual use, so only 64MB of table is used. For routing entries exceeding 24-bit masks, a limit is placed on the number, ensuring that the size of the table occupation storage corresponding to the mask of the next 8 bits is limited.
Further, describing the operation principle of the LPM lookup table of the DPDK, the LPM has two types of tables, when adding and looking up a route, the two types of tables are the same, for example, a table corresponding to 24 bit mask is taken as an example, for example, a route entry with a network segment of 10.12.132.0/22 and a next hop value of 100 is added, the added table content is as shown in fig. 2, for a network segment within 24 bit mask, all the table corresponding to ip included in mask bits between a destination network segment and 24 bits are filled with a next hop value of 100, that is, a network segment with less than 24 bit mask is expanded into a network segment with 24 bit mask, in this example, the binary system of 10.12.132.0/22,132 is 1000 0100, and the last two bits are the parts to be expanded: 1000 01xx, where xx includes values of 00, 01, 10 and 11, ip corresponding to 24 bit masks is 10.12.132.0/24, 10.12.133.0/24, 10.12.134.0/24 and 10.12.135.0/24, data structures corresponding to the table in the code are arrays, values after the ip is shifted to the right by 8 bits are subscripts of the arrays, so that corresponding 10.12.132.0/24 is shifted to the right by 8 bits and 10.12.132, subscripts of the arrays are 10 x 256 x 2+12 x 256+132= 658564,10.12.133.0/24 is shifted to the right by 8 bits and 10.12.133, subscripts of the arrays are 10 x 256 x 2+12 x 256+133+ 658565,10.12.134.0/24 is shifted to the right by 8 bits and 10.12.134, subscripts of the arrays are 10 x 256 x 2+12 x 256+134+ 658566,10.12.135.0/24 is shifted to the right by 8 bits and 10.12.135, and subscripts of the arrays are 10 x 256 x 2+12 x 256+135= 658567, and all the entries in the array are filled with the next value 100. It should be noted that, the subscript 0 corresponding to the first entry of the array table entry corresponds to IP of 0.0.0.0. Through the arrangement, when the route searching is carried out through the ip in the destination network segment 10.12.132.0/22, the next hop route information can be hit only by one search. For example 10.12.133.10, using the LPM longest match rule, firstly using the value corresponding to the first 24 bits of 10.12.133.10 to find the array index, and taking out the corresponding value to be the next-hop content (if the next-hop indicates that the next-hop needs to go on to search the 8-bit mask table, the last 8 bits of 10.12.133.10 are used for searching the 8-bit mask table in the same way), because ip corresponding to the 24-bit mask of 10.12.133.10 is 10.12.133.0/24, the entry content of the 24-bit mask table can be directly hit, and the route searching is completed.
As can be seen from the foregoing, the present LPM lookup table of DPDK uses actually used routing entries mostly within 24-bit mask and limits the number of tables corresponding to the mask of the following 8 bits, so that the memory space occupied by the table is not excessively large, but this way can only be satisfied for one or a few independent routing tables, if the table is put into VRF scene (each VRF tenant corresponds to one independent routing table), the occupied memory space would be a big problem, for example, even if the LPM lookup table of DPDK is used in a router supporting only 100 VRF tenants, the occupied space would reach 100 x 64 mb=6.4 GB, and the occupied space would be larger for the use scene supporting the number of VRF tenants of K or more. Based on this, the embodiment of the invention provides a routing table updating method to solve the above problem.
Referring to fig. 3, fig. 3 is one of the step flowcharts of a routing table updating method according to an embodiment of the present invention, as shown in fig. 3, the method may include:
Step 101, obtaining a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an internet protocol address.
The generation of the virtual route forwarding array in the embodiment of the invention is determined by a plurality of virtual route forwarding tenants. And acquiring a plurality of virtual route forwarding tenants from the system, wherein each tenant can carry one or more internet protocol addresses, analyzing the internet protocol address carried by each virtual route forwarding tenant, acquiring corresponding network segment information, and dividing the virtual route forwarding tenant into different areas according to the network segments of the internet protocol addresses. Each zone contains tenants with the same network segment. And generating a virtual route forwarding array according to the division result. The length and content of the array depend on the number of divided areas and tenant information in each area, and the specific steps include:
acquiring a plurality of virtual routing forwarding tenants, wherein the virtual routing forwarding tenants carry internet protocol addresses;
Acquiring a network segment of an Internet protocol address;
Dividing a plurality of virtual route forwarding tenants according to network segments of the Internet protocol address to obtain a plurality of dividing areas of the virtual route forwarding tenants;
And generating a virtual route forwarding array according to the plurality of divided areas.
For example, assuming that three virtual route forwarding tenants are provided, the three virtual route forwarding tenants respectively carry the following internet protocol addresses, the tenant A is 192.168.1.10/24,10.0.0.7/24, the tenant B is 172.16.0.5/16, the tenant C is 10.1.0.4/16,192.168.2.4/24, the network segment information of the tenant A is analyzed to be 192.168.1.0/24,10.0.0.0/24, the network segment information of the tenant B is 172.16.0.0/16, the network segment information of the tenant C is 10.1.0.0/16,192.168.2.0/24, three divided areas are obtained, the area 1 (192.168.0.0/16) respectively comprises the tenant A (192.168.1.0/24), the tenant C (192.168.2.0/24), the area 2 (10.0.0.0/8) comprises the tenant A (10.0.0/0/24), the tenant C (10.1.0.0/16), the area 3 (172.16.0.0/16) comprises the tenant B (57/16), the virtual route forwarding array length of the area B is 2, the element is the next-hop element of the tenant A (192.168.1/24) uses the next-hop element (192.1.0/24) to be the next-hop element (192.2.2/24), the next-hop element (2.2/2) uses the next-hop element (2.2.0/24) to use the virtual route forwarding element (2.2/2) to be the next-hop (2.1).
It should be noted that, in the above-described division according to network segments, it can be seen that the network segments corresponding to different IPs are different, so that when division is performed, the division may be divided into different areas, that is, one division area corresponds to an internet protocol address of one network segment. When the identical network segments appear later, the identical network segments are divided into the same areas.
Further, after dividing the virtual route forwarding tenants according to network segments, determining the length of a virtual route forwarding array to be generated according to the number of the virtual route forwarding tenants contained in each division area, determining elements in the virtual route forwarding array according to next hop routing information carried by the virtual route forwarding tenants, and determining the position of each element in the virtual route forwarding array according to the digital identifier carried by the virtual route forwarding tenants, wherein the specific steps include:
According to the division result, a plurality of division areas of the virtual routing forwarding tenant are obtained;
aiming at any divided area, the number of virtual route forwarding tenants contained in the divided area is obtained, and the number identification and the next hop routing information carried by the virtual route forwarding tenants are obtained;
Obtaining the length of a virtual route forwarding array corresponding to the dividing region according to the number of virtual route forwarding tenants contained in the dividing region;
determining elements in the virtual route forwarding array according to the next hop routing information carried by the virtual route forwarding tenant;
And determining the position of each element in the virtual route forwarding array according to the digital identifier carried by the virtual route forwarding tenant.
By way of example, assume that the acquired information is region 1: tenant A (192.168.1.0/24, next hop: 100, carrying a number identification of 0), tenant C (192.168.2.0/24, next hop: 200, carrying a number identification of 1), zone 2: tenant A (10.0.0.0/24, next hop: 270, carrying a number identification of 3), tenant C (10.1.0.0/16, next hop: 150, carrying a number identification of 4), zone 3: tenant B (172.16.0.0/16, next hop: 140, carrying a number identification of 5), three arrays are generated according to the above determination, zone 1 corresponds to array 1, length is 2, zone 2 corresponds to array 2, length is 2, zone 3 corresponds to array 3, length is 1, elements within array 1 are [ 100,200 ] elements within array 2 are [ 270,150 ], elements within array 3 are [ 140 ], because 0mod2 = 0,1mod2 = 1, 100 is in the position of array 1, 200 is in the array 1, and 1mod2 = 0, and 1 is in the position of array 1, and 2 = 2, and 1mod2 = 0, and 150 is in the position of array 1, 2 = 2, and 1mod2 is in the array 1 = 2, and 2 is in the position of the array 1.
Through the steps, the corresponding virtual route forwarding array can be dynamically generated according to the Internet protocol address network segment of the virtual route forwarding tenant, and the position and the content of each element are determined, so that the subsequent route searching is facilitated.
It should be noted that, the digital identifier carried by the virtual route forwarding tenant is generally a integer value, which can be set from 1, and 1 is added for every tenant added in the array, the corresponding digital identifier-1 determines the array subscript value corresponding to each virtual route forwarding tenant in each virtual route forwarding array, and if the digital identifier is a non-integer value, a VRF integer value can be maintained to correspond to the non-integer value.
Further, the above description describes steps when the virtual route forwarding tenant with a smaller number stores route information, for the virtual route forwarding use scenario with a K level number or above, because the number of generated virtual route forwarding tenant arrays is too large, the virtual route forwarding tenant storage space needs to be further optimized, at this time, a hash table of the virtual route forwarding is set, as shown in fig. 4, only the virtual route forwarding array with a truly configured route item will set the hash table for the virtual route forwarding array, and a pointer is set in the hash table to point to the dynamically added virtual route forwarding array, and the virtual route forwarding array includes the next hop storage unit of the virtual route forwarding tenant. The method comprises the steps of respectively arranging pointers 1, 2 and 3 in items 4, 5 and 6 of an LPM (Low cost per minute) table, respectively pointing to hash tables 1 and 2 of a dynamic application, arranging items in the hash tables 1 to point to virtual route forwarding arrays 1 and 2 of the dynamic application, setting a next hop routing information 100 of the virtual route forwarding tenant 1 and a next hop routing information 500 of the virtual route forwarding tenant 2 in the virtual route forwarding array 1, arranging next hop routing information 200 of the virtual route forwarding tenant 3 in the virtual route forwarding array 2, arranging items in the hash tables 2 to point to virtual route forwarding arrays 3 and 4 of the dynamic application, arranging items in the hash tables 3 to point to the next hop routing information 100 of the virtual route forwarding tenant 4, arranging the next hop routing information 700 of the virtual route forwarding tenant 5 in the virtual route forwarding array 4, and setting the pointers 3 in the hash tables 7 to point to the virtual route array 7 of the dynamic application, and arranging the pointers 300 of the virtual mask in the hash tables 7 of the virtual route forwarding array 3, and the virtual mask 300 of the virtual routing application, and setting the pointers 3 in the hash tables 7 to point to the virtual routing array 7 of the dynamic application, and the virtual mask 300 of the virtual table 4 to point to the virtual routing array 7 in the virtual routing application. It can be seen that when the number of virtual route forwarding tenants exceeds a set threshold, when a route item is added, the pointer points to not an array but to a hash table, so that an identifier is added to the hash table through a target network segment to determine a table item corresponding to the hash table, then the table item corresponding to the virtual route forwarding tenant in the hash table is determined through a digital identifier carried by the virtual route forwarding tenant, a dynamic virtual route forwarding array is set for the virtual route forwarding tenant belonging to the same hash table item, and the position of the next hop route information in the virtual route forwarding array is determined according to the digital identifier carried by the virtual route forwarding tenant. The method comprises the following specific steps of:
if the number of the virtual route forwarding tenants in the divided area is larger than a preset threshold value, setting a hash table containing preset number table items;
acquiring a target network segment of an internet protocol address carried by a virtual routing forwarding tenant in any divided area;
setting a target network segment as an identification of a hash table;
And determining a corresponding table item of next hop routing information in the virtual route forwarding tenant in the hash table according to the digital identifier carried by the virtual route forwarding tenant.
Through the steps, through sharing the hash table, not only can the space of the route searching algorithm be further reduced, but also the purpose of efficiently searching and managing the next hop route information of the virtual route forwarding tenant can be realized.
It should be noted that, when many virtual routing forwarding tenants, the LPM table with 24-bit mask and 8-bit mask still cannot meet the requirements, the table entry in the hash table may be set as a pointer, and then the hash sub-table is set, so as to further extend the scope.
Step 102, the content of each entry in the longest prefix match routing table is set to a null pointer.
In the embodiment of the invention, in order to realize route inquiry of more virtual route forwarding tenants, the loss of route searching performance is smaller, and some adjustments are made under the balance of space and time. For example, as shown in FIG. 5, the contents of each entry in the longest prefix match routing table is set to a null pointer.
Step 103, determining the corresponding target table entry of the virtual route forwarding array in the longest prefix matching routing table through the internet protocol address.
In the embodiment of the invention, after the content of the longest prefix matching routing table is configured as a null pointer, routing information needs to be configured for the longest prefix matching routing table, and when the configuration is performed, table item subscripts in the longest prefix matching routing table need to be determined, and the method specifically comprises the following steps:
acquiring a first network mask comprising a preset number of bits;
and determining the table entry index of the longest prefix matching routing table according to the first network mask of the preset bit number.
The preset number of bits may be set according to actual requirements, and may be various values such as 8,16,24, etc., which are not limited herein, but the preset number of bits cannot exceed the number of bits of the network mask of the internet protocol address.
Further, step 103, as shown in fig. 6:
Step 1031, a second network mask of the internet protocol address and an actual number of bits of the second network mask are obtained.
In step 1032, the actual number of bits is compared with the preset number of bits.
Step 1033, if the actual number of bits is smaller than the preset number of bits, expanding the internet protocol address according to the preset number of bits to obtain the target internet protocol address.
Step 1034, determining, by the target internet protocol address, a target entry of the virtual routing forwarding array corresponding to the longest prefix match routing table.
For example, assuming that the internet protocol address is 10.12.132.0, the second network mask is 255.255.252.0, the actual number of bits is 22, the preset number of bits is 24, and the actual number of bits is 22, the actual number of bits is smaller than the preset number of bits, the target internet protocol address expanded by 10.12.132.0/22 is 10.12.132.0/24, 10.12.133.0/24, 10.12.134.0/24, 10.12.135.0/24, the array subscript corresponding to the longest prefix match routing table is 658564,658565,658566,658567, and the target table entry is found according to the array subscript.
Step 104, the null pointer in the target table entry is adjusted to be the pointer pointing to the virtual route forwarding array.
In the embodiment of the invention, after the corresponding target table item of the virtual route forwarding array in the longest prefix matching routing table is determined, the null pointer in the target table item is adjusted to be the pointer pointing to the virtual route forwarding array, so that when the target table item is determined later in searching, the corresponding virtual route forwarding array can be determined through the pointer in the target table item.
It should be noted that, the above steps illustrate the update process of the routing table, and then when the route searching is performed, the searching can be performed according to the information set during configuration, and first, the internet protocol address and the digital identifier of the virtual route forwarding tenant to be queried need to be obtained. The internet protocol address is used for searching a corresponding table entry in the routing table, the digital identifier is used for positioning the position of specific next-hop routing information in the virtual routing forwarding array, and the internet protocol address of the virtual routing forwarding tenant to be queried is used for searching the corresponding table entry in the longest prefix matching routing table (LPM table). The LPM table is used for efficiently searching the route information matched with the target Internet protocol address, and acquiring a pointer from the table item to be queried, wherein the pointer points to the target virtual route forwarding array. The virtual route forwarding array stores the next hop route information of all the virtual route forwarding tenants related to the table entry, and the digital identification of the virtual route forwarding tenant to be queried is used for searching the corresponding position in the target virtual route forwarding array. The digital identification is used to uniquely identify each virtual routing forwarding tenant and associate it with a location in the array. And acquiring next hop routing information of the virtual routing forwarding tenant to be queried from the target position. The next hop routing information is used for determining a forwarding path of the data packet, and the specific steps include:
acquiring an internet protocol address and a digital identifier of a virtual routing forwarding tenant to be queried;
Forwarding the internet protocol address of the tenant through the virtual route to be queried, and determining a table item to be queried in the longest prefix matching routing table;
determining a target virtual route forwarding array through pointers in the table items to be queried;
determining a target position in a target virtual route forwarding array through a digital identifier of a virtual route forwarding tenant to be queried;
And acquiring next hop routing information of the virtual routing forwarding tenant to be queried from the target position.
Through the steps, the corresponding table entry can be searched in the longest prefix matching routing table according to the internet protocol address and the digital identifier of the virtual route forwarding tenant to be queried, the target virtual route forwarding array is positioned through the pointer, and finally the next hop routing information of the virtual route forwarding tenant to be queried is obtained. In this way, the next hop routing information of the virtual routing forwarding tenant can be efficiently searched and managed.
As shown in fig. 7, the longest prefix matching routing table is set to include 24 bit masks, wherein the table contents of the array subscripts 3,4 and 5 are respectively pointer 1, pointer 2 and pointer 3, pointer 1 pointing to the dynamically applied virtual route forwarding array, pointer 1 of the array subscript 3 points to the virtual route forwarding array 1, virtual route forwarding tenant 0,1 and 2 are included, the corresponding next hop routing information is 100,500 and 200, pointer 2 of the array subscript 4 points to the virtual route forwarding array 2, virtual route forwarding tenant 0,1 and 2 are included, the corresponding next hop routing information is 100,0 and 700, the pointer of the array subscript 5 points to an 8 bit mask routing table, the table contents of the array subscript 2 and 3 in the 8 bit mask routing table are pointer 4 and pointer 5, pointer 4 of the array subscript 2 points to the dynamically applied virtual route forwarding array 3 of the dynamic application, virtual route forwarding tenant 0,1 and 2 are included, the corresponding next hop routing information of the array subscript 4 points to the virtual route forwarding array 2 is 3, the corresponding next hop routing information of the corresponding to the virtual route subscript 39 is 2, the corresponding to the virtual route forwarding array 2 is 3, and the position of the tenant 2 can be different from the position of the corresponding to the address of the virtual route forwarding array, but the position of the tenant 2 can be identified as being different from the position of the corresponding to the position of the corresponding address of the virtual route forwarding table, and the position of the tenant 1, the position of the corresponding to the position of the address in the address of the virtual load, and the address is different from the position of the corresponding position in the corresponding identifier and the position of the address table is indicated in the position identifier and can be indicated by the position identifier and the position identifier. Of course, tenant identifications in the array may also be labeled according to the carried digital identifications, which is not particularly limited herein.
Further, a pointer is set in the longest prefix matching routing table to enable a plurality of virtual route forwarding tenants to share the longest prefix matching routing table, so that the change of a search route is changed from original search to the next hop content of a table item to search the pointer, a corresponding virtual route forwarding array is found through the pointer, then the array content corresponding to an array subscript is taken out by using the digital identifier of the virtual route forwarding tenant to be the next hop, and compared with the original search, the search efficiency is changed into two searches, but the search efficiency still has a great speed advantage, the occupied space can be reduced, and the space occupation condition at the moment is as follows:
In a 32-bit system, a pointer size is 4 bytes, a table size is unchanged, in a 64-bit system, a pointer size is 8 bytes, a table size is doubled, for example, a table corresponding to a 24-bit mask is 128MB, a table corresponding to an 8-bit mask is 2KB, for a table corresponding to a 24-bit mask (because the number of tables corresponding to an 8-bit mask is limited, the influence on a storage space can be ignored), if a mask of a destination network segment is longer or is closer to 24 bits, the number of virtual routing forwarding arrays to be applied is smaller, the occupied storage space is smaller, otherwise, the table size is larger, for a class a address with only 8-bit masks in the most extreme case, a destination network segment corresponds to 2-16 table entries, each table entry corresponds to a virtual routing forwarding array, the virtual routing forwarding tenant number in the virtual routing forwarding array is set to be n, the virtual routing array occupies a storage space of 2-16-x 4-n=256 KB, and for a class C network segment is 1-n, if the table size is 1-n, and the virtual routing array is configured to occupy a space of only 1-n-1-n.
In the embodiment of the invention, a longest prefix matching routing table and a virtual routing forwarding array are acquired, the virtual routing forwarding array carries an Internet protocol address, the content of each table item in the longest prefix matching routing table is set to be a null pointer, a target table item corresponding to the virtual routing forwarding array in the longest prefix matching routing table is determined through the Internet protocol address, the null pointer in the target table item is adjusted to be a pointer pointing to the virtual routing forwarding array, the content in the longest prefix matching routing table is updated to be the pointer, a plurality of virtual routing forwarding arrays can share the LPM table, the searching speed is ensured to be unchanged, the storage space is saved, the searching speed is ensured by using the data structure of the virtual routing forwarding array, the virtual routing forwarding array is configured according to the requirement, the idle table item does not need to be applied for configuration of the virtual routing forwarding array, and the storage space is further saved.
Fig. 8 is a block diagram of a routing table updating apparatus according to an embodiment of the present invention, where the apparatus may include:
The first obtaining module 201 is configured to obtain a longest prefix matching routing table and a virtual routing forwarding array, where the virtual routing forwarding array carries an internet protocol address.
A setting module 202, configured to set the content of each entry in the longest prefix matching routing table as a null pointer.
A first determining module 203, configured to determine, by using the internet protocol address, a target entry corresponding to the longest prefix matching routing table in the virtual routing forwarding array.
An adjustment module 204 is configured to adjust the null pointer in the target entry to be a pointer pointing to the virtual route forwarding array.
Optionally, the routing table updating apparatus further includes:
the second obtaining module is used for obtaining a plurality of virtual route forwarding tenants, wherein the virtual route forwarding tenants carry the internet protocol address.
And the third acquisition module is used for acquiring the network segment of the Internet protocol address.
And the fourth acquisition module is used for dividing a plurality of virtual route forwarding tenants according to the network segment of the Internet protocol address to acquire a plurality of divided areas of the virtual route forwarding tenants.
And the generating module is used for generating a virtual route forwarding array according to the plurality of divided areas.
Optionally, the generating module specifically includes:
The first obtaining submodule is used for obtaining the number of virtual route forwarding tenants contained in the dividing area aiming at any dividing area, and the number identification and the next hop route information carried by the virtual route forwarding tenants.
The second obtaining submodule is used for obtaining the length of the virtual route forwarding array corresponding to the dividing region according to the number of the virtual route forwarding tenants contained in the dividing region.
And the first determining submodule is used for determining elements in the virtual route forwarding array according to the next hop routing information carried by the virtual route forwarding tenant.
And the second determining submodule is used for determining the position of each element in the virtual route forwarding array according to the digital identifier carried by the virtual route forwarding tenant.
The hash table setting sub-module is used for setting a hash table containing preset number table items if the number of the virtual route forwarding tenants in the divided area is larger than a preset threshold value.
And the third acquisition sub-module is used for acquiring the target network segment of the Internet protocol address carried by the virtual routing forwarding tenant in any divided area.
The identification setting sub-module is used for setting the target network segment as the identification of the hash table.
And the third determining submodule is used for determining an item corresponding to the next hop routing information in the hash table in the virtual route forwarding tenant according to the digital identifier carried by the virtual route forwarding tenant.
Optionally, the routing table updating apparatus further includes:
And a fifth acquisition module, configured to acquire a first network mask that includes a preset number of bits.
And the second determining module is used for determining the table entry subscript of the longest prefix matching routing table according to the first network mask of the preset bit number.
Optionally, the first determining module 203 specifically includes:
A fourth obtaining sub-module for obtaining the second network mask of the internet protocol address and the actual number of bits of the second network mask.
And the comparison sub-module is used for comparing the actual digit with a preset digit.
And the fifth acquisition sub-module is used for expanding the internet protocol address according to the preset bit number if the actual bit number is smaller than the preset bit number, and acquiring the target internet protocol address.
And the fourth determining submodule is used for determining a target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the target internet protocol address.
Optionally, the routing table updating apparatus further includes:
and the sixth acquisition module is used for acquiring the internet protocol address and the digital identifier of the virtual routing forwarding tenant to be queried.
And the third determining module is used for determining the table item to be queried in the longest prefix matching routing table through the internet protocol address of the virtual routing forwarding tenant to be queried.
And the fourth determining module is used for determining the target virtual route forwarding array through the pointer in the table entry to be queried.
And a fifth determining module, configured to determine, by using the digital identifier of the virtual route forwarding tenant to be queried, a target location in the target virtual route forwarding array.
And a seventh obtaining module, configured to obtain, from the target location, next hop routing information of the virtual routing forwarding tenant to be queried.
In the embodiment of the invention, a longest prefix matching routing table and a virtual routing forwarding array are acquired, the virtual routing forwarding array carries an Internet protocol address, the content of each table item in the longest prefix matching routing table is set to be a null pointer, a target table item corresponding to the virtual routing forwarding array in the longest prefix matching routing table is determined through the Internet protocol address, the null pointer in the target table item is adjusted to be a pointer pointing to the virtual routing forwarding array, the content in the longest prefix matching routing table is updated to be the pointer, a plurality of virtual routing forwarding arrays can share the LPM table, the searching speed is ensured to be unchanged, the storage space is saved, the searching speed is ensured by using the data structure of the virtual routing forwarding array, the virtual routing forwarding array is configured according to the requirement, the idle table item does not need to be applied for configuration of the virtual routing forwarding array, and the storage space is further saved.
The present invention also provides an electronic device, and fig. 9 is a block diagram of an electronic device provided by the embodiment of the present invention, referring to fig. 9, including a processor 501, a memory 502, and a computer program 5021 stored in the memory and capable of running on the processor, where when the processor executes the program, the following steps are implemented in the routing table updating method:
Obtaining a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet protocol address;
Setting the content of each entry in the longest prefix matching routing table as a null pointer;
Determining a target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the internet protocol address;
And adjusting the null pointer in the target table entry to be a pointer pointing to the virtual route forwarding array.
The present invention also provides a readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the routing table updating method of the foregoing embodiment.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in a sorting device according to the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention may also be implemented as an apparatus or device program for performing part or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
It should be noted that, in the embodiment of the present application, the related processes of obtaining various data are all performed under the premise of conforming to the corresponding data protection rule policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.

Claims (10)

1. A method for updating a routing table, the method comprising:
Obtaining a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet protocol address;
Setting the content of each entry in the longest prefix matching routing table as a null pointer;
Determining a target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the internet protocol address;
And adjusting the null pointer in the target table entry to be a pointer pointing to the virtual route forwarding array.
2. The method of claim 1, further comprising, prior to said obtaining the longest prefix match routing table and the virtual routing forwarding array:
acquiring a plurality of virtual route forwarding tenants, wherein the virtual route forwarding tenants carry an Internet protocol address;
acquiring a network segment of the Internet protocol address;
Dividing a plurality of virtual route forwarding tenants according to the network segment of the Internet protocol address to obtain a plurality of dividing areas related to the virtual route forwarding tenants;
And generating a virtual route forwarding array according to the plurality of divided areas.
3. The method of claim 2, wherein generating a virtual routing forwarding array based on the number of partitioned areas comprises:
Aiming at any divided area, the number of virtual route forwarding tenants contained in the divided area is obtained, and the number identification and the next hop routing information carried by the virtual route forwarding tenants are obtained;
acquiring the length of a virtual route forwarding array corresponding to the dividing region according to the number of virtual route forwarding tenants contained in the dividing region;
determining elements in the virtual route forwarding array according to the next hop routing information carried by the virtual route forwarding tenant;
And determining the position of each element in the virtual route forwarding array according to the digital identifier carried by the virtual route forwarding tenant.
4. The method according to claim 3, further comprising, after the obtaining, for any of the divided areas, the number of virtual routing forwarding tenants included in the divided area, a digital identifier carried by the virtual routing forwarding tenant, and next-hop routing information:
if the number of the virtual route forwarding tenants in the divided area is larger than a preset threshold value, setting a hash table containing preset number table items;
Acquiring a target network segment of an internet protocol address carried by a virtual routing forwarding tenant in any divided area;
Setting the target network segment as an identification of the hash table;
and determining a corresponding table entry of next-hop routing information in the hash table in the virtual route forwarding tenant according to the digital identifier carried by the virtual route forwarding tenant.
5. The method of claim 1, wherein prior to said determining, by said internet protocol address, that said virtual routing forwarding array matches a corresponding target entry in said routing table, further comprising:
acquiring a first network mask comprising a preset number of bits;
and determining the table entry subscript of the longest prefix matching routing table according to the first network mask of the preset bit number.
6. The method of claim 5, wherein determining, by the internet protocol address, a corresponding target entry of the virtual routing forwarding array in the longest prefix match routing table, further comprises:
Acquiring a second network mask of the internet protocol address and an actual number of bits of the second network mask;
Comparing the actual digit with the preset digit;
if the actual number of bits is smaller than the preset number of bits, expanding the Internet protocol address according to the preset number of bits to obtain a target Internet protocol address;
And determining a target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the target internet protocol address.
7. The method of claim 3, further comprising, after said adjusting the null pointer in the target entry to be a pointer to the virtual routing forwarding array:
acquiring an internet protocol address and a digital identifier of a virtual routing forwarding tenant to be queried;
determining an item to be queried in the longest prefix matching routing table through the internet protocol address of the virtual routing forwarding tenant to be queried;
Determining a target virtual route forwarding array through the pointer in the table item to be queried;
Determining a target position in the target virtual route forwarding array through the digital identification of the virtual route forwarding tenant to be queried;
and acquiring next hop routing information of the virtual routing forwarding tenant to be queried from the target position.
8. A routing table updating apparatus, the apparatus comprising:
The first acquisition module is used for acquiring the longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet protocol address;
the setting module is used for setting the content of each item in the longest prefix matching routing table as a null pointer;
a first determining module, configured to determine, according to the internet protocol address, a target entry corresponding to the longest prefix matching routing table in the virtual routing forwarding array;
and the adjusting module is used for adjusting the null pointer in the target table item to be a pointer pointing to the virtual route forwarding array.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
The memory is used for storing a computer program;
The processor is configured to implement the routing table updating method according to any one of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the routing table updating method of any of claims 1-7.
CN202411696577.0A 2024-11-25 2024-11-25 Routing table updating method and device, electronic equipment and readable storage medium Active CN119766724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411696577.0A CN119766724B (en) 2024-11-25 2024-11-25 Routing table updating method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411696577.0A CN119766724B (en) 2024-11-25 2024-11-25 Routing table updating method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN119766724A true CN119766724A (en) 2025-04-04
CN119766724B CN119766724B (en) 2025-11-11

Family

ID=95191385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411696577.0A Active CN119766724B (en) 2024-11-25 2024-11-25 Routing table updating method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN119766724B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001022667A1 (en) * 1999-09-22 2001-03-29 Effnet Group Ab Method and system for efficient routing table compression and fast routing lookups
CN101695054A (en) * 2009-09-30 2010-04-14 杭州华三通信技术有限公司 Method and device for route maintenance and method and device for route query
CN103404092A (en) * 2011-11-30 2013-11-20 华为技术有限公司 Route prefix storage method and device and route address searching method and device
CN104584517A (en) * 2012-06-29 2015-04-29 瑞典爱立信有限公司 Method and a network node, for use in a data center, for routing an IPv4 packet over an IPv6 network
CN116319555A (en) * 2023-05-22 2023-06-23 中国科学技术大学 Route forwarding method for virtual private network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001022667A1 (en) * 1999-09-22 2001-03-29 Effnet Group Ab Method and system for efficient routing table compression and fast routing lookups
CN101695054A (en) * 2009-09-30 2010-04-14 杭州华三通信技术有限公司 Method and device for route maintenance and method and device for route query
CN103404092A (en) * 2011-11-30 2013-11-20 华为技术有限公司 Route prefix storage method and device and route address searching method and device
CN104584517A (en) * 2012-06-29 2015-04-29 瑞典爱立信有限公司 Method and a network node, for use in a data center, for routing an IPv4 packet over an IPv6 network
CN116319555A (en) * 2023-05-22 2023-06-23 中国科学技术大学 Route forwarding method for virtual private network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘斌等: "一种基于重叠位图的路由查找算法", 《计算机学报》, vol. 41, no. 9, 30 September 2018 (2018-09-30) *

Also Published As

Publication number Publication date
CN119766724B (en) 2025-11-11

Similar Documents

Publication Publication Date Title
US10887233B2 (en) System and method of loading an exact match table and longest prefix match table
US7039018B2 (en) Technique to improve network routing using best-match and exact-match techniques
US6665297B1 (en) Network routing table
US10798000B2 (en) Method and apparatus of compressing network forwarding entry information
US20060083247A1 (en) Prefix lookup using address-directed hash tables
US7106732B2 (en) Default route coding
CN107547407B (en) Message transmission method, device and implementation device
TWI645694B (en) Apparatus and method for processing an alternately configured longest first code match table
US10897422B2 (en) Hybrid routing table for routing network traffic
WO2021135491A1 (en) Flow table matching method and apparatus
US7630367B2 (en) Approach for fast IP address lookups
WO2004015919A2 (en) Hierarchical prefix based routing in ipv6 networks
US12132653B2 (en) Method and device for processing routing table entries
US7515588B2 (en) Method and apparatus to support a large internet protocol forwarding information base
CN1312890C (en) Method for generating a trie having a reduced number of trie blocks
CN119766724B (en) Routing table updating method and device, electronic equipment and readable storage medium
US20240259312A1 (en) Storing and selection of entries in routing tables based on prefix length
JP3558151B2 (en) Data search circuit
US20070025346A1 (en) System and method for creating a routing table
EP3319279A1 (en) Ip routing lookup
US7376657B1 (en) Fast IPv6 address lookup using skip level processing on multi-bit tries
CN107204926B (en) Rapid route searching method for preprocessing cache
JP2020201656A (en) Search circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant