Routing table updating method and device, electronic equipment and readable storage medium
By setting the pointer of the virtual routing forwarding array in the LPM lookup table of the DPDK FIB library, the problem of the LPM lookup table taking up too much storage space in VRF scenarios is solved, and efficient routing and saving storage space is achieved.
Patent Information
- Application Number
- CN202411696577.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Due to its setting of exchanging space for time in DPDK FIB library, the LPM lookup table occupies a huge amount of storage space and may even fail to be used normally in certain specific scenarios such as VRF usage scenarios.
By obtaining the longest prefix matching routing table and virtual routing forwarding array, setting the content of each table entry in the routing table as a null pointer, determining the target table entry of the virtual routing forwarding array in the routing table based on the Internet protocol address, and adjusting the null pointer in the target table entry to a pointer to the virtual routing forwarding array.
Multiple virtual routing forwarding arrays share LPM tables, ensuring that the search speed remains unchanged and saving storage space. Using the data structure of the virtual routing forwarding array ensures the search speed. At the same time, the virtual routing forwarding array is configured as needed, further saving storage space.
Smart Images

Figure CN119766724A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing, and in particular relates to a routing table updating method, device, electronic equipment and readable storage medium. Background Art
[0002] The routing lookup algorithm plays a vital role in the network. It is one of the main factors that determine the performance of the Layer 3 forwarding network element. Although there are currently a variety of routing lookup algorithms, each with its own focus, the search speed is always the ultimate goal pursued by each algorithm. The LPM (Longest Prefix Match) lookup table in the DPDK FIB (Data Plane Development Kit Forwarding Information Base) library is one of such algorithms. It achieves the ultimate search performance through the DIR-24-8 data structure, ensuring that most routing lookups only require one search, and a small number of them can be hit with at most two searches. However, the premise of this high performance is to sacrifice storage space, which is a typical algorithm that trades space for time.
[0003] So although this algorithm performs well in some scenarios, it has limitations in usage scenarios. For example, in the VRF (Virtual Routing and Rorwarding) usage scenario, VRF requires the use of multiple independent routing lookup tables, which will cause the DPDK LPM lookup table to occupy a large amount of storage space and may even fail to work properly.
[0004] In summary, although the LPM lookup table of the DPDK FIB library performs well in terms of lookup speed, its huge demand for storage space limits its application in certain specific scenarios. Summary of the invention
[0005] The present invention provides a routing table updating method, device, electronic device and readable storage medium, so as to solve the problem that the LPM lookup table of the current DPDK FIB library has limitations in usage scenarios due to its space-for-time setting.
[0006] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0007] In a first aspect, the present invention provides a method for updating a routing table, the method comprising:
[0008] Obtaining a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet Protocol address;
[0009] Setting the content of each entry in the longest prefix match routing table to a null pointer;
[0010] Determine, by means of the Internet Protocol address, a target table entry corresponding to the virtual routing forwarding array in the longest prefix match routing table;
[0011] The null pointer in the target table entry is adjusted to a pointer pointing to the virtual routing forwarding array.
[0012] Optionally, before obtaining the longest prefix matching routing table and the virtual routing forwarding array, the method further includes:
[0013] Acquire a number of virtual routing forwarding tenants, each of which carries an Internet Protocol address;
[0014] Obtaining the network segment of the Internet Protocol address;
[0015] Dividing the plurality of virtual routing forwarding tenants according to the network segments of the Internet Protocol addresses, and obtaining a plurality of divided areas of the virtual routing forwarding tenants;
[0016] A virtual routing forwarding array is generated according to several divided areas.
[0017] Optionally, generating a virtual routing forwarding array according to a number of divided areas includes:
[0018] For any of the divided areas, obtain the number of virtual routing forwarding tenants contained in the divided area, the digital identifiers and next-hop routing information carried by the virtual routing forwarding tenants;
[0019] According to the number of virtual routing forwarding tenants contained in the divided area, obtaining the length of the virtual routing forwarding array corresponding to the divided area;
[0020] Determine the elements in the virtual routing forwarding array according to the next hop routing information carried by the virtual routing forwarding tenant;
[0021] The position of each element in the virtual routing forwarding array is determined according to the digital identifier carried by the virtual routing forwarding tenant.
[0022] Optionally, after acquiring the number of virtual routing forwarding tenants contained in the divided area, the digital identifier and next hop routing information carried by the virtual routing forwarding tenant for any of the divided areas, the method further includes:
[0023] If the number of virtual routing forwarding tenants in the divided area is greater than a preset threshold, setting a hash table containing a preset number of table entries;
[0024] Obtaining a target network segment of an Internet Protocol address carried by a virtual routing forwarding tenant in any of the divided areas;
[0025] Setting the target network segment as the identifier of the hash table;
[0026] According to the digital identifier carried by the virtual routing forwarding tenant, a table entry corresponding to the next-hop routing information in the virtual routing forwarding tenant in the hash table is determined.
[0027] Optionally, before determining the target entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table by using the Internet Protocol address, the method further includes:
[0028] Obtaining a first network mask including a preset number of bits;
[0029] The entry subscript of the longest prefix matching routing table is determined according to the first network mask with the preset number of bits.
[0030] Optionally, the determining, by using the Internet Protocol address, a target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table further includes:
[0031] Obtaining a second network mask of the Internet Protocol address and an actual number of bits of the second network mask;
[0032] Comparing the actual number of digits with the preset number of digits;
[0033] If the actual number of bits is less 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;
[0034] The target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table is determined by the target Internet Protocol address.
[0035] Optionally, after adjusting the null pointer in the target table entry to a pointer pointing to the virtual routing forwarding array, the method further includes:
[0036] Obtaining the Internet Protocol address and digital identifier of the virtual routing forwarding tenant to be queried;
[0037] Forwarding the Internet Protocol address of the tenant through the virtual routing to be queried, and determining the table entry to be queried in the longest prefix matching routing table;
[0038] Determine the target virtual routing forwarding array through the pointer in the table entry to be queried;
[0039] Determine the target location in the target virtual routing forwarding array by using the digital identifier of the virtual routing forwarding tenant to be queried;
[0040] The next hop routing information of the virtual routing forwarding tenant to be queried is obtained from the target location.
[0041] In a second aspect, the present invention provides a routing table updating device, the device comprising:
[0042] A first acquisition module, used to acquire a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet Protocol address;
[0043] A setting module, used to set the content of each entry in the longest prefix matching routing table to a null pointer;
[0044] A first determination module is used to determine the target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the Internet Protocol address;
[0045] The adjustment module is used to adjust the null pointer in the target table entry to a pointer pointing to the virtual routing forwarding array.
[0046] In a third aspect, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned routing table updating method when executing the program.
[0047] In a fourth aspect, the present invention provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the above-mentioned routing table updating method.
[0048] In an embodiment of the present invention, a longest prefix match routing table and a virtual routing forwarding array are obtained, and the virtual routing forwarding array carries an Internet Protocol address; the content of each table item in the longest prefix match routing table is set to a null pointer; the target table item corresponding to the virtual routing forwarding array in the longest prefix match routing table is determined through the Internet Protocol address; the null pointer in the target table item is adjusted to a pointer pointing to the virtual routing forwarding array, and by updating the content in the longest prefix match routing table to a pointer, multiple virtual routing forwarding arrays can share an LPM table, ensuring that the search speed remains unchanged while saving storage space, using the data structure of the virtual routing forwarding array to ensure the search speed, and configuring the virtual routing forwarding array on demand, and there is no need to apply for configuring the virtual routing forwarding array for idle items, further saving storage space. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 It is a schematic diagram of routing table configuration of a DIR-24-8 data structure provided by an embodiment of the present invention;
[0051] Figure 2 It is a schematic diagram of adding LPM lookup table routing of a DPDK provided by an embodiment of the present invention;
[0052] Figure 3 It is a flowchart of a method for updating a routing table provided by an embodiment of the present invention;
[0053] Figure 4 yes Figure 3 A schematic diagram of a hash table for setting virtual routing forwarding in a routing table updating method provided by an embodiment of the present invention is shown;
[0054] Figure 5 yes Figure 3 A schematic diagram of setting a null pointer in a routing table updating method provided by an embodiment of the present invention is shown;
[0055] Figure 6 yes Figure 3 The flowchart of step 103 in a routing table updating method provided by an embodiment of the present invention is shown;
[0056] Figure 7 yes Figure 3 A schematic diagram of setting a virtual routing forwarding array in a routing table updating method provided by an embodiment of the present invention is shown;
[0057] Figure 8 is a structural diagram of a routing table updating device provided by an embodiment of the present invention;
[0058] Fig. 9 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] The embodiment of the present invention is applied to the route search scenario of FIB (Forwarding Information Base) of DPDK (Data Plane Development Kit) in VRF (Virtual Routing and Rorwarding). Among them, DPD K is an open source library and driver, which is mainly based on the Linux system. It is a set of function libraries and drivers for fast data packet processing, which can greatly improve data processing performance and throughput, and improve the work efficiency of data plane applications. FIB is used to determine how to forward based on the network prefix of the IP packet. VRF technology achieves data or service isolation by creating multiple routing tables on a three-layer forwarding device (also called a three-layer forwarding network element), which is often used in MPLS VPN, firewall and other application scenarios that require isolation. Among them, the three-layer forwarding device can be a router, a firewall, a three-layer switch network element, etc., and route search can also be achieved through these network devices.
[0061] The route lookup scenario requires a route lookup algorithm. Currently, there are many route lookup algorithms, each with its own focus, but the search speed is the ultimate goal pursued by each algorithm. Among them, the LPM (Longest Prefix Match) lookup table algorithm of the DPDK FIB library has brought the ultimate search performance to the extreme. The DIR-24-8 data structure is used to ensure that most route lookups only require one search, and a small number of them can be hit with at most two searches. However, the premise of the LPM lookup table of the DPDK FIB library having such high search performance is to sacrifice storage space. It should be noted that the LPM table implements the longest prefix match table search method with a 32-bit key in the DP DK LPM library component, which is used to find the best route match in the IP forwarding application. It is a special routing table. Usually, the mapping relationship between the target Internet Protocol address and the next hop address is stored in the routing table. The router determines the transmission path of the data packet based on the Internet Protocol address and the routing table to ensure that the data can be sent from the source device to the target device. The LPM table uses the DIR-24-8 data structure to perform route lookups, and the Internet Protocol addresses used can be IPv4 and IPv6. IPv4 is the fourth version of the Internet Protocol, which defines the format of Internet Protocol addresses and data packets. IPv4 addresses are 32 bits, usually expressed in dotted decimal notation, such as 192.168.1.1. IPv6 is the sixth version of the Internet Protocol, the next generation IP protocol to replace IPv4, which defines the format of Internet Protocol addresses and the structure of data packets. IPv6 addresses are 128 bits, usually expressed in colon-delimited hexadecimal notation, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
[0062] Based on the above content, taking IPv4 address as an example, the size of the storage space occupied by the LPM lookup table currently using the DIR-24-8 data structure is explained as follows: Figure 1As shown, the table is divided into two parts, one part corresponds to the first 24 bits of the mask, and the other part corresponds to the last 8 bits of the mask. Each entry in the table can be used to store the next-hop routing information. 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 is Byte, and the available values are 1, 2, 4, and 8. Taking 4 bytes as an example, the storage space occupied by the table corresponding to the 24-bit mask is: 2^24*4B=64MB, and the table corresponding to the last 8-bit mask can have a maximum of 2^24, each table size is: 2^8*4B=1KB, and the maximum storage space occupied is: 2^24*1KB=16GB. Therefore, the maximum storage space occupied by the entire LPM lookup table is: 64MB+16GB, where KB, MB, and GB are computer storage units, respectively called kilobytes, megabytes, and gigabytes. It can be seen that the entire LPM lookup table occupies a large amount of storage space, and in actual use, most routing entries are within the 24-bit mask, so only a 64MB table is used. For routing entries with more than 24-bit masks, the number is limited to ensure that the storage space occupied by the table corresponding to the last 8-bit mask is limited.
[0063] Further, the operating principle of DPDK's LPM lookup table is explained. LPM has two types of tables. The two types of tables are the same when adding and looking up routes. Take the table corresponding to the 24-bit mask as an example. For example, if you add a route entry with a network segment of 10.12.132.0 / 22 and a next hop value of 100, the table content after adding is as follows: Figure 2As shown in the figure, for the network segment within the 24-bit mask, the table positions corresponding to all IP addresses between the destination network segment and the 24-bit mask will be filled with the value of the next hop - 100, that is, the network segment with less than 24-bit mask will be expanded to the network segment with 24-bit mask. In this example, 10.12.132.0 / 22, the binary of 132 is 1000 0100, and the last two bits are the parts to be expanded: 1000 01xx, xx includes the values of 00, 01, 10, 11, and the corresponding 24-bit mask IPs are: 10.12.132.0 / 24, 10.12.133.0 / 24, 10.12.134.0 / 24, 10.12.135.0 / 24. In the code, the corresponding data structure is an array. The value of these IPs after shifting right by 8 bits is the subscript of the array. So the corresponding 10.12.132.0 / 24 shifted right by 8 bits is 10.12.132, and the subscript of the array is 10*256^2+12*256+132=658564, 10. 12.133.0 / 24 shifted right by 8 bits is 10.12.133, and the array subscript is 10*256^2+12*256+133=658565. 10.12.134.0 / 24 shifted right by 8 bits is 10.12.134, and the array subscript is 10*256^2+12*256+134=658566. 10.12.135.0 / 24 shifted right by 8 bits is 10.12.135, and the array subscript is 10*256^2+12*256+135=658567. Fill all the array entries with the next hop value 100. It should be noted that the first item of the array table corresponds to the subscript 0, and the corresponding IP is 0.0.0.0. With the above settings, when performing route lookup through the IP in the destination network segment 10.12.132.0 / 22, only one search is needed to hit the next hop route information. For example, for 10.12.133.10, using the LPM longest match principle, first use the value corresponding to the first 24 bits of 10.12.133.10 to find the array index, and then take out the corresponding value as the next hop content (if the next hop indicates that you need to continue to search in the 8-bit mask table, then use the last 8 bits of 10.12.133.10 to search in the 8-bit mask table in the same way). Since the 24-bit mask of 10.12.133.10 corresponds to the IP 10.12.133.0 / 24, you can directly hit the table entry content of the 24-bit mask table to complete the route lookup.
[0064] From the above content, it can be seen that the current DPDK LPM lookup table takes advantage of the fact that most of the actual routing entries are within the 24-bit mask and the number of tables corresponding to the latter 8-bit mask is limited, so that the storage space occupied by the table will not be too large, but this method can only meet the use of one or a few independent routing tables. If it is placed in a VRF scenario (each VRF tenant corresponds to an independent routing table), the occupied storage space will be a big problem. For example, if the DPDK LPM lookup table is used in a router that only supports 100 VRF tenants, even if all routing entries are within the 24-bit mask, the occupied space reaches 100*64MB=6.4GB. For scenarios that support the number of VRF tenants at or above level K, the occupied space will be even larger. Based on this, an embodiment of the present invention proposes a routing table update method to solve the above problem.
[0065] Reference Figure 3 , Figure 3 This is one of the flow charts of a method for updating a routing table provided by an embodiment of the present invention. Figure 3 As shown, the method may include:
[0066] 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.
[0067] The generation of the virtual routing forwarding array in the embodiment of the present invention is determined by multiple virtual routing forwarding tenants. Multiple virtual routing forwarding tenants are obtained from the system, each tenant can carry one or more Internet Protocol addresses, the Internet Protocol address carried by each virtual routing forwarding tenant is parsed, and the corresponding network segment information is obtained. The virtual routing forwarding tenant is divided into different areas according to the network segment of the Internet Protocol address. Each area contains tenants with the same network segment. Based on the division results, a virtual routing forwarding array is generated. The length and content of the array depend on the number of divided areas and the tenant information in each area. The specific steps include:
[0068] Obtain a number of virtual routing forwarding tenants, where the virtual routing forwarding tenants carry Internet Protocol addresses;
[0069] Get the network segment of the Internet Protocol address;
[0070] Divide a plurality of virtual routing forwarding tenants according to network segments of Internet Protocol addresses, and obtain a plurality of divided areas of the virtual routing forwarding tenants;
[0071] A virtual routing forwarding array is generated according to several divided areas.
[0072] For example, suppose there are three virtual routing forwarding tenants, each carrying the following Internet Protocol addresses: Tenant A: 192.168.1.10 / 24, 10.0.0.7 / 24, Tenant B: 172.16.0.5 / 16, Tenant C: 10.1.0.4 / 16, 192.168.2.4 / 24. The network segment information of Tenant A is parsed as 192.168.1.0 / 24, 10.0 .0.0 / 24, the network segment information of tenant B is 172.16.0.0 / 16, and the network segment information of tenant C is 10.1.0.0 / 16, 192.168.2.0 / 24. Three divided areas are obtained, namely area 1 (192.168.0.0 / 16) including tenant A (192.168.1.0 / 24), tenant C (192.168.2.0 / 24), area 2 ( 10.0.0.0 / 8) includes tenant A (10.0.0.0 / 24) and tenant C (10.1.0.0 / 16). Area 3 (172.16.0.0 / 16) includes tenant B (172.16.0.0 / 16). The length of the virtual routing forwarding array of area 1 is 2, and the element is the next-hop routing information of tenant A (192.168.1.0 / 24) and tenant C (192.168.2.0 / 24). The length of the virtual routing forwarding array of area 2 is 2, and the element is the next-hop routing information of tenant A (10.0.0.0 / 24) and tenant C (10.1.0.0 / 16). The length of the virtual routing forwarding array of area 3 is 1, and the element is the next-hop routing information of tenant B (172.16.0.0 / 16).
[0073] It should be noted that when dividing by network segment, it can be seen that different IPs correspond to different network segments, so different areas can be divided when dividing, that is, one divided area corresponds to one network segment of the Internet Protocol address. When the same network segment appears later, it will be divided into the same area.
[0074] Furthermore, after the virtual routing forwarding tenants are divided according to the network segments, it is also necessary to determine the length of the virtual routing forwarding array to be generated according to the number of virtual routing forwarding tenants contained in each divided area, determine the elements in the virtual routing forwarding array according to the next hop routing information carried by the virtual routing forwarding tenant, and determine the position of each element in the virtual routing forwarding array according to the digital identifier carried by the virtual routing forwarding tenant. The specific steps include:
[0075] According to the division result, several division areas of the virtual routing forwarding tenant are obtained;
[0076] For any partitioned area, obtain the number of virtual routing forwarding tenants contained in the partitioned area, the digital identifier and next-hop routing information carried by the virtual routing forwarding tenant;
[0077] According to the number of virtual routing forwarding tenants contained in the divided area, the length of the virtual routing forwarding array corresponding to the divided area is obtained;
[0078] Determine the elements in the virtual routing forwarding array according to the next hop routing information carried by the virtual routing forwarding tenant;
[0079] The position of each element in the virtual routing forwarding array is determined according to the digital identifier carried by the virtual routing forwarding tenant.
[0080] For example, assume that the information obtained is area 1: tenant A (192.168.1.0 / 24, next hop: 100, with a digital identifier of 0), tenant C (192.168.2.0 / 24, next hop: 200, with a digital identifier of 1), area 2: tenant A (10.0.0.0 / 24, next hop: 270, with a digital identifier of 3), tenant C (10.1.0.0 / 16, next hop: 150, with a digital identifier of 4), area 3: tenant B (172.16.0.0 / 16, next hop: 140, with a digital identifier of 5). Based on the above content, three arrays are generated. Area 1 corresponds to array 1, and the length is is 2, area 2 corresponds to array 2, length is 2, area 3 corresponds to array 3, length is 1, the elements in array 1 are [100, 200], the elements in array 2 are [270, 150], and the elements in array 3 are
[140] . Because 0mod2=0, 1mod2=1, 100 is at position 0 of array 1, and 200 is at position 1 of array 1. Correspondingly, 3mod2=1, 4mod2=0, so 150 is at position 0 of array 2, 270 is at position 1 of array 2, and 5mod1=0, so 140 is at position 0 of array 3.
[0081] Through the above steps, the corresponding virtual routing forwarding array can be dynamically generated according to the Internet Protocol address segment of the virtual routing forwarding tenant, and the position and content of each element can be determined to facilitate subsequent routing lookup.
[0082] It should be noted that the digital identifier carried by the virtual routing forwarding tenant is generally an integer value, which can be set starting from 1. Each additional tenant in the array increases by 1. The corresponding array subscript value corresponding to each virtual routing forwarding tenant in each virtual routing forwarding array is determined by the digital identifier -1. If the digital identifier is a non-integer value, a VRF integer value can be maintained to correspond to it.
[0083] Furthermore, the above description is the steps for storing routing information for a small number of virtual routing forwarding tenants. For virtual routing forwarding usage scenarios with a number of K or more, because the number of virtual routing forwarding tenant arrays generated is too large, it is necessary to further optimize the storage space of virtual routing forwarding tenants. At this time, a hash table for virtual routing forwarding is set, such as Figure 4 As shown, only the virtual routing forwarding array that actually configures the routing item will set up a hash table for it, and set a pointer in the hash table to point to the dynamically added virtual routing forwarding array. The virtual routing forwarding array contains the next hop storage unit of the virtual routing forwarding tenant. In the 4th, 5th and 6th table items of the LPM table, there are pointers 1, 2 and 3, pointing to the dynamically applied hash table 1 and hash table 2 respectively. Hash table 1 has table items pointing to the dynamically applied virtual routing forwarding arrays 1 and 2. Virtual routing forwarding array 1 contains the next hop routing information 100 of virtual routing forwarding tenant 1 and the next hop routing information 500 of virtual routing forwarding tenant 2. Virtual routing forwarding array 2 contains the next hop routing information 200 of virtual routing forwarding tenant 3. Hash table 2 has table items pointing to the dynamically applied virtual routing forwarding arrays 3 and 4. Virtual routing forwarding array 3 contains the next hop routing information 100 of virtual routing forwarding tenant 4. Virtual routing forwarding array 4 contains the next hop routing information 700 of virtual routing forwarding tenant 5. When there are many virtual routing forwarding tenants and the 24-bit mask cannot meet the demand, an 8-bit mask LPM table will also be set. Figure 4 Pointer 3 in points to an 8-bit masked LPM table. At this time, pointers continue to be set in the 8-bit masked LPM table. Pointers 4 and 5 point to hash tables 3 and 4 respectively. Hash table 3 has entries pointing to dynamically applied virtual routing forwarding array 5. Virtual routing forwarding array 5 contains next-hop routing information 300 of virtual routing forwarding tenant 6. Hash table 4 has entries pointing to dynamically applied virtual routing forwarding arrays 6 and 7. Virtual routing forwarding array 6 contains next-hop routing information 300 of virtual routing forwarding tenant 7. Virtual routing forwarding array 7 contains next-hop routing information 900 of virtual routing forwarding tenant 8. It can be seen that when the number of virtual routing forwarding tenants exceeds the set threshold, when adding a routing item, the pointer does not point to an array, but to a hash table. Therefore, an identifier is added to the hash table through the target network segment to determine the corresponding item in the hash table, and then the digital identifier carried by the virtual routing forwarding tenant is used to determine the corresponding item in the hash table of the virtual routing forwarding tenant, and a dynamic virtual routing forwarding array is set for the virtual routing forwarding tenants belonging to the same hash table item, and the position of the next hop routing information in the virtual routing forwarding array is determined according to the digital identifier carried by the virtual routing forwarding tenant. The specific steps include:
[0084] If the number of virtual routing forwarding tenants in the divided area is greater than a preset threshold, a hash table containing a preset number of table entries is set;
[0085] Obtain the target network segment of the Internet Protocol address carried by the virtual routing forwarding tenant in any divided area;
[0086] Set the target network segment as the identifier of the hash table;
[0087] According to the digital identifier carried by the virtual routing forwarding tenant, the table entry corresponding to the next hop routing information in the virtual routing forwarding tenant in the hash table is determined.
[0088] Through the above steps, by sharing the hash table, not only can the space of the routing lookup algorithm be further reduced, but also the purpose of efficiently looking up and managing the next-hop routing information of the virtual routing forwarding tenant can be achieved.
[0089] It should be noted that when there are many virtual routing forwarding tenants and the LPM tables with 24-bit masks and 8-bit masks still cannot meet the needs, the table items in the hash table can be set as pointers, and then a hash sub-table can be set to further expand the scope.
[0090] Step 102, setting the content of each entry in the longest prefix matching routing table to a null pointer.
[0091] In order to enable more virtual routing forwarding tenants to perform routing queries with less routing query performance loss, some adjustments are made under the trade-off of space and time in the embodiment of the present invention. For example, Figure 5 As shown, the content of each entry in the longest prefix matching routing table is set to a null pointer.
[0092] Step 103, determining the target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the Internet Protocol address.
[0093] In the embodiment of the present invention, after the content of the longest prefix match routing table is configured as a null pointer, it is necessary to configure routing information for it. During the configuration, it is necessary to first determine the table item subscript in the longest prefix match routing table. The specific steps include:
[0094] Obtaining a first network mask including a preset number of bits;
[0095] The index of an entry in the longest prefix matching routing table is determined according to a first network mask with a preset number of bits.
[0096] Among them, the preset number of bits can be set according to actual needs, and can be 8, 16, 24 and other values. The present invention does not make specific limitations here, but the preset number of bits cannot exceed the number of bits of the network mask of the Internet Protocol address.
[0097] Further, step 103, such as Figure 6 As shown:
[0098] Step 1031, obtaining the second network mask of the Internet Protocol address and the actual number of bits of the second network mask.
[0099] Step 1032, comparing the actual number of digits with the preset number of digits.
[0100] Step 1033: If the actual number of bits is less than the preset number of bits, the Internet Protocol address is expanded according to the preset number of bits to obtain the target Internet Protocol address.
[0101] Step 1034, determine the target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the target Internet Protocol address.
[0102] 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, and assuming that the preset number of bits is 24 and the actual number of bits is 22, then the actual number of bits is less than the preset number of bits. The target Internet Protocol addresses after expanding 10.12.132.0 / 22 are 10.12.132.0 / 24, 10.12.133.0 / 24, 10.12.134.0 / 24, and 10.12.135.0 / 24. It is determined that the array subscripts corresponding to the longest prefix match routing table are 658564, 658565, 658566, and 658567. The target table entry is found according to the array subscripts.
[0103] Step 104: adjust the null pointer in the target entry to a pointer pointing to the virtual routing forwarding array.
[0104] In the embodiment of the present invention, after determining the target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table, the null pointer in the target table entry is adjusted to a pointer pointing to the virtual routing forwarding array, so that when performing a subsequent search, after determining the target table entry, the corresponding virtual routing forwarding array can be determined through the pointer in the target table entry.
[0105] It should be noted that the above steps illustrate the update process of the routing table. Next, when performing routing search, the search can be performed according to the information set during configuration. First, the Internet Protocol address and digital identifier of the virtual routing forwarding tenant to be queried need to be obtained. The Internet Protocol address is used to find the corresponding table item in the routing table, and the digital identifier is used to locate the position of the specific next-hop routing information in the virtual routing forwarding array. The Internet Protocol address of the virtual routing forwarding tenant to be queried is used to find the corresponding table item in the longest prefix match routing table (LPM table). The LPM table is used to efficiently find the routing information that matches the target Internet Protocol address, and obtain a pointer from the table item to be queried, which points to the target virtual routing forwarding array. The virtual routing forwarding array stores the next-hop routing information of all virtual routing forwarding tenants related to the table item. The digital identifier of the virtual routing forwarding tenant to be queried is used to find the corresponding position in the target virtual routing forwarding array. The digital identifier is used to uniquely identify each virtual routing forwarding tenant and associate it with the position in the array. The next-hop routing information of the virtual routing forwarding tenant to be queried is obtained from the target position. The next-hop routing information is used to determine the forwarding path of the data packet. The specific steps include:
[0106] Obtaining the Internet Protocol address and digital identifier of the virtual routing forwarding tenant to be queried;
[0107] The Internet Protocol address of the tenant forwarding the virtual route to be queried is used to determine the entry to be queried in the longest prefix matching routing table;
[0108] Determine the target virtual routing forwarding array through the pointer in the table entry to be queried;
[0109] Determine the target location in the target virtual routing forwarding array using the digital identifier of the virtual routing forwarding tenant to be queried;
[0110] Get the next hop routing information of the virtual routing forwarding tenant to be queried from the target location.
[0111] Through the above steps, the corresponding table entry can be found in the longest prefix match routing table according to the Internet Protocol address and digital identifier of the virtual routing forwarding tenant to be queried, and the target virtual routing forwarding array can be located through the pointer to finally obtain the next hop routing information of the virtual routing forwarding tenant to be queried. In this way, the next hop routing information of the virtual routing forwarding tenant can be efficiently found and managed.
[0112] For example, Figure 7As shown, the longest prefix match routing table is set to contain a 24-bit mask, where the contents of the items with array subscripts 3, 4, and 5 are pointers 1, 2, and 3, respectively, pointing to the dynamically applied virtual routing forwarding array, where pointer 1 with array subscript 3 points to virtual routing forwarding array 1, which contains virtual routing forwarding tenants 0, 1, and 2, and the corresponding next-hop routing information is 100, 500, and 200, pointer 2 with array subscript 4 points to virtual routing forwarding array 2, which contains virtual routing forwarding tenants 0, 1, and 2, and the corresponding next-hop routing information is 100, 0, and 700, and the pointer with array subscript 5 points to an 8-bit mask routing table. The items with array subscripts 2 and 3 in the 8-bit mask routing table have The content is pointer 4 and pointer 5. The pointer 4 with the array subscript 2 in the 8-bit mask routing table points to the dynamically applied virtual routing forwarding array 3, which includes virtual routing forwarding tenants 0, 1, and 2, and the corresponding next-hop routing information is 300, 0, and 0. The pointer 5 with the array subscript 3 in the 8-bit mask routing table points to the dynamically applied virtual routing forwarding array 4, which includes virtual routing forwarding tenants 0, 1, and 2, and the corresponding next-hop routing information is 300, 0, and 900. It can be seen that the tenant identifiers in different arrays can be the same, but these tenant identifiers may not be related to the digital identifiers carried by the tenants. They are just location identifiers regenerated according to the location of the tenant after entering the virtual routing forwarding array. Of course, the tenant identifiers in the array can also be marked according to the digital identifiers carried, and the present invention is not specifically limited here.
[0113] Furthermore, by setting a pointer in the longest prefix match routing table, multiple virtual routing forwarding tenants share the longest prefix match routing table, so that the change of route search is from the original search for the next hop content of the table item to the search for the pointer, and the corresponding virtual routing forwarding array is found through the pointer, and then the array content corresponding to the array index is taken out by the digital identifier of the virtual routing forwarding tenant, which is the next hop. Compared with the original one search, it is changed to two searches, but the search efficiency still has a great speed advantage, and it can also reduce the occupied space. The space occupied at this time is:
[0114] In a 32-bit system, the size of a pointer is 4 bytes, and the table size remains unchanged. In a 64-bit system, the size of a pointer is 8 bytes, and the table size is doubled. For example, the table corresponding to a 24-bit mask becomes 128MB, and the table corresponding to an 8-bit mask becomes 2KB. For the table corresponding to a 24-bit mask (since the number of tables corresponding to an 8-bit mask is limited, its impact on storage space can be ignored), if the mask of the destination network segment is longer or closer to 24 bits, the number of virtual routing forwarding arrays required to be applied is smaller, and the storage space occupied is less. Conversely, the larger the number, according to the most extreme case with only an 8-bit mask. For Class A addresses, a destination network segment corresponds to 2^16 entries, each entry corresponds to a virtual routing forwarding array. Assuming the number of virtual routing forwarding tenants in the virtual routing forwarding array is n, the storage space occupied by the virtual routing forwarding array is: 2^16*4*n=256*n*1KB. For a network segment with a 24-bit mask for Class C addresses, a destination network segment has only one entry, so the storage space occupied by the virtual routing forwarding array is: 1*4*n=n*1KB. If n is 1000, when configuring a routing item, the space occupied by the virtual routing forwarding array is: 1-256MB.
[0115] In an embodiment of the present invention, a longest prefix match routing table and a virtual routing forwarding array are obtained, and the virtual routing forwarding array carries an Internet Protocol address; the content of each table item in the longest prefix match routing table is set to a null pointer; the target table item corresponding to the virtual routing forwarding array in the longest prefix match routing table is determined through the Internet Protocol address; the null pointer in the target table item is adjusted to a pointer pointing to the virtual routing forwarding array, and by updating the content in the longest prefix match routing table to a pointer, multiple virtual routing forwarding arrays can share an LPM table, ensuring that the search speed remains unchanged while saving storage space, using the data structure of the virtual routing forwarding array to ensure the search speed, and configuring the virtual routing forwarding array on demand, and there is no need to apply for configuring the virtual routing forwarding array for idle items, further saving storage space.
[0116] Figure 8 : is a structural diagram of a routing table updating device provided by an embodiment of the present invention, and the device may include:
[0117] The first acquisition module 201 is used to acquire the longest prefix matching routing table and the virtual routing forwarding array, where the virtual routing forwarding array carries the Internet Protocol address.
[0118] The setting module 202 is used to set the content of each entry in the longest prefix matching routing table to a null pointer.
[0119] The first determination module 203 is used to determine the target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the Internet Protocol address.
[0120] The adjustment module 204 is used to adjust the null pointer in the target table entry to a pointer pointing to the virtual routing forwarding array.
[0121] Optionally, the routing table updating device further includes:
[0122] The second acquisition module is used to acquire a number of virtual routing forwarding tenants, where the virtual routing forwarding tenants carry Internet Protocol addresses.
[0123] The third acquisition module is used to acquire the network segment of the Internet Protocol address.
[0124] The fourth acquisition module is used to divide the plurality of virtual routing forwarding tenants according to the network segments of the Internet Protocol addresses, and obtain a plurality of divided areas of the virtual routing forwarding tenants.
[0125] The generation module is used to generate a virtual routing forwarding array according to a number of divided areas.
[0126] Optionally, the generation module specifically includes:
[0127] The first acquisition submodule is used to acquire, for any divided area, the number of virtual routing forwarding tenants contained in the divided area, the digital identifier carried by the virtual routing forwarding tenant, and the next hop routing information.
[0128] The second acquisition submodule is used to acquire the length of the virtual routing forwarding array corresponding to the divided area according to the number of virtual routing forwarding tenants contained in the divided area.
[0129] The first determination submodule is used to determine the elements in the virtual routing forwarding array according to the next hop routing information carried by the virtual routing forwarding tenant.
[0130] The second determination submodule is used to determine the position of each element in the virtual routing forwarding array according to the digital identifier carried by the virtual routing forwarding tenant.
[0131] The hash table setting submodule is used to set a hash table containing a preset number of table entries if the number of virtual routing forwarding tenants in the divided area is greater than a preset threshold.
[0132] The third acquisition submodule is used to obtain the target network segment of the Internet Protocol address carried by the virtual routing forwarding tenant in any divided area.
[0133] The identification setting submodule is used to set the target network segment as the identification of the hash table.
[0134] The third determination submodule is used to determine the table entry corresponding to the next hop routing information in the virtual routing forwarding tenant in the hash table according to the digital identifier carried by the virtual routing forwarding tenant.
[0135] Optionally, the routing table updating device further includes:
[0136] The fifth acquisition module is used to acquire a first network mask including a preset number of bits.
[0137] The second determining module is used to determine the table entry index of the longest prefix matching routing table according to the first network mask with a preset number of bits.
[0138] Optionally, the first determining module 203 specifically includes:
[0139] The fourth acquisition submodule is used to acquire the second network mask of the Internet Protocol address and the actual number of bits of the second network mask.
[0140] The comparison submodule is used to compare the actual number of digits with the preset number of digits.
[0141] The fifth acquisition submodule is used to expand the Internet Protocol address according to the preset number of bits to obtain the target Internet Protocol address if the actual number of bits is less than the preset number of bits.
[0142] The fourth determination submodule is used to determine the target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the target Internet Protocol address.
[0143] Optionally, the routing table updating device further includes:
[0144] The sixth acquisition module is used to obtain the Internet Protocol address and digital identifier of the virtual routing forwarding tenant to be queried.
[0145] The third determination module is used to forward the Internet Protocol address of the tenant through the virtual route to be queried, and determine the table item to be queried in the longest prefix matching routing table.
[0146] The fourth determination module is used to determine the target virtual routing forwarding array through the pointer in the table item to be queried.
[0147] The fifth determining module is used to determine the target position in the target virtual routing forwarding array according to the digital identifier of the virtual routing forwarding tenant to be queried.
[0148] The seventh acquisition module is used to obtain the next hop routing information of the virtual routing forwarding tenant to be queried from the target location.
[0149] In an embodiment of the present invention, a longest prefix match routing table and a virtual routing forwarding array are obtained, and the virtual routing forwarding array carries an Internet Protocol address; the content of each table item in the longest prefix match routing table is set to a null pointer; the target table item corresponding to the virtual routing forwarding array in the longest prefix match routing table is determined through the Internet Protocol address; the null pointer in the target table item is adjusted to a pointer pointing to the virtual routing forwarding array, and by updating the content in the longest prefix match routing table to a pointer, multiple virtual routing forwarding arrays can share an LPM table, ensuring that the search speed remains unchanged while saving storage space, using the data structure of the virtual routing forwarding array to ensure the search speed, and configuring the virtual routing forwarding array on demand, and there is no need to apply for configuring the virtual routing forwarding array for idle items, further saving storage space.
[0150] The present invention also provides an electronic device, Fig. 9 is a structural block diagram of an electronic device provided by an embodiment of the present invention, see Fig. 9 , comprising a processor 501, a memory 502, and a computer program 5021 stored in the memory and executable on the processor, wherein when the processor executes the program, the following steps are implemented in the routing table updating method:
[0151] Obtaining a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet Protocol address;
[0152] Setting the content of each entry in the longest prefix match routing table to a null pointer;
[0153] Determine, by means of the Internet Protocol address, a target table entry corresponding to the virtual routing forwarding array in the longest prefix match routing table;
[0154] The null pointer in the target table entry is adjusted to a pointer pointing to the virtual routing forwarding array.
[0155] The present invention also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the routing table updating method of the aforementioned embodiment.
[0156] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0157] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other equipment. According to the above description, it is obvious that the structure required for constructing such a system is. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for disclosing the best mode of the present invention.
[0158] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0159] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.
[0160] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0161] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0162] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0163] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0164] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0165] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0166] It should be noted that the various data-related processes in the embodiments of the present application are all carried out in compliance with the corresponding data protection laws and policies of the country where the device is located, and with the authorization given by the owner of the corresponding device.
Claims
1. A routing table updating method, characterized in that: The method comprises: 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 match routing table to a null pointer; Determine, by means of the Internet Protocol address, a target table entry corresponding to the virtual routing forwarding array in the longest prefix match routing table; The null pointer in the target table entry is adjusted to a pointer pointing to the virtual routing forwarding array.
2. The method according to claim 1, characterized in that: Before obtaining the longest prefix matching routing table and the virtual routing forwarding array, the method further includes: Acquire a number of virtual routing forwarding tenants, each of which carries an Internet Protocol address; Obtaining the network segment of the Internet Protocol address; Dividing the plurality of virtual routing forwarding tenants according to the network segments of the Internet Protocol addresses, and obtaining a plurality of divided areas of the virtual routing forwarding tenants; A virtual routing forwarding array is generated according to several divided areas.
3. The method according to claim 2, characterized in that: The step of generating a virtual routing forwarding array according to a plurality of divided areas includes: For any of the divided areas, obtain the number of virtual routing forwarding tenants contained in the divided area, the digital identifiers and next-hop routing information carried by the virtual routing forwarding tenants; According to the number of virtual routing forwarding tenants contained in the divided area, obtaining the length of the virtual routing forwarding array corresponding to the divided area; Determine the elements in the virtual routing forwarding array according to the next hop routing information carried by the virtual routing forwarding tenant; The position of each element in the virtual routing forwarding array is determined according to the digital identifier carried by the virtual routing forwarding tenant.
4. The method according to claim 3, characterized in that: After obtaining the number of virtual routing forwarding tenants contained in the divided area, the digital identifier and next hop routing information carried by the virtual routing forwarding tenant for any of the divided areas, the method further includes: If the number of virtual routing forwarding tenants in the divided area is greater than a preset threshold, setting a hash table containing a preset number of table entries; Obtaining a target network segment of an Internet Protocol address carried by a virtual routing forwarding tenant in any of the divided areas; Setting the target network segment as the identifier of the hash table; According to the digital identifier carried by the virtual routing forwarding tenant, a table entry corresponding to the next-hop routing information in the virtual routing forwarding tenant in the hash table is determined.
5. The method according to claim 1, characterized in that: Before determining the virtual routing forwarding array corresponding to the target table entry in the longest prefix matching routing table through the Internet Protocol address, the method further includes: Obtaining a first network mask including a preset number of bits; According to the first network mask with the preset number of bits, the table entry index of the longest prefix matching routing table is determined.
6. The method according to claim 5, characterized in that: The step of determining, by means of the Internet Protocol address, a target entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table further includes: Obtaining a second network mask of the Internet Protocol address and an actual number of bits of the second network mask; Comparing the actual number of digits with the preset number of digits; If the actual number of bits is less 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; The target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table is determined by the target Internet Protocol address.
7. The method according to claim 3, characterized in that: After adjusting the null pointer in the target table entry to a pointer pointing to the virtual routing forwarding array, the method further includes: Obtaining the Internet Protocol address and digital identifier of the virtual routing forwarding tenant to be queried; Forwarding the Internet Protocol address of the tenant through the virtual routing to be queried, and determining the table entry to be queried in the longest prefix matching routing table; Determine the target virtual routing forwarding array through the pointer in the table entry to be queried; Determine the target location in the target virtual routing forwarding array by using the digital identifier of the virtual routing forwarding tenant to be queried; The next hop routing information of the virtual routing forwarding tenant to be queried is obtained from the target location.
8. A routing table updating device, characterized in that: The device comprises: A first acquisition module, used to acquire a longest prefix matching routing table and a virtual routing forwarding array, wherein the virtual routing forwarding array carries an Internet Protocol address; A setting module, used to set the content of each entry in the longest prefix matching routing table to a null pointer; A first determination module is used to determine the target table entry corresponding to the virtual routing forwarding array in the longest prefix matching routing table through the Internet Protocol address; The adjustment module is used to adjust the null pointer in the target table entry to a pointer pointing to the virtual routing forwarding array.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the routing table updating method as described in any one of claims 1-7 when executing the program stored in the memory.
10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, causes the processors to execute the routing table updating method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for route maintenance and method and device for route query
CN101695054A
Route prefix storage method and device and route address searching method and device
CN103404092A
Method and a network node, for use in a data center, for routing an IPv4 packet over an IPv6 network
CN104584517A
Routing forwarding method for virtual private network
CN116319555A
Method and system for efficient routing table compression and fast routing lookups
WO2001022667A1