Large-capacity satellite-borne routing switching method and device matched with longest prefix and medium

By adopting the longest prefix matching large-capacity satellite routing switching method in the low-orbit satellite Internet, combining black and white list hash tables and large-capacity cache, the problem of difficulty in matching IP packet prefixes at large-capacity forwarding rates is solved, and efficient IP packet forwarding and capacity improvement are achieved.

CN120110491APending Publication Date: 2025-06-06SOUTHWEST CHINA RES INST OF ELECTRONICS EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510259407.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In the low-orbit satellite Internet, it is difficult for satellite-only routers to achieve prefix matching of IP packets at large-capacity forwarding rates, and due to processing resources and power consumption, it is impossible to deploy a high-performance hardware forwarding engine.

Method used

The large-capacity satellite-borne routing switching method is adopted with the longest prefix matching. Through the combination of control plane and forwarding plane, the black and white list hash tables and large-capacity cache mechanisms are used to achieve rapid table lookup and precise matching.

Benefits of technology

It realizes the longest prefix exact matching at large-capacity forwarding rates, improves the number of accesses and forwarding capacity of low-orbit satellite Internet users, and has simple calculation and processing, and has low requirements for hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120110491A_ABST
    Figure CN120110491A_ABST
Patent Text Reader

Abstract

The invention discloses a longest prefix matched high-capacity spaceborne routing switching method and device and a medium, and relates to the field of satellite communication. The prefix matching mode combining the control plane and the forwarding plane is adopted, rapid table look-up and caching are achieved through the forwarding plane, accurate matching is achieved through the control plane, the control plane and the forwarding plane are connected through the high-speed interface, calculation processing is simple, the requirement for hardware resources is low, and the method is suitable for large-scale popularization and application. The method can realize accurate matching of the longest prefix under the high-capacity forwarding rate, and is of great significance to the improvement of the user access quantity and the forwarding capacity of the whole low-orbit satellite internet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of satellite communications, and in particular to a method, a device and a medium for switching large-capacity satellite-borne routing using a longest prefix match. Background Art

[0002] The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.

[0003] With the development of low-orbit satellite Internet, the demand for onboard broadband communication services for onboard router switching capacity and the number of IP addresses accessed is increasing. The switching capacity requirements of the low-orbit Internet constellations currently under construction are generally above 40Gbps, and the demand for address aggregation based on IP prefixes is becoming more and more urgent. Faced with the demand for large-capacity switching rates and prefix aggregation, ground-based commercial routers generally use TCAM-based hardware forwarding engines, which match in parallel by building multiple high-performance chips. However, the limited processing resources and power consumption constraints of onboard routers make it impossible to deploy such high-performance hardware forwarding engines. Therefore, it is only possible to design reasonable fast table lookup methods and prefix matching methods based on the current limited onboard hardware processing platform.

[0004] The SDN architecture can separate the control plane from the forwarding plane, run the routing protocol on the control plane, and use the hash method to quickly look up the table on the forwarding plane. In the case of limited storage resources and processing resources, the current commonly used hash table lookup method is prone to IP address matching conflicts and missed matches. In addition, the lack of cache and blacklist mechanisms easily leads to repeated table lookups and wastes table lookup time. The method of software prefix matching through the control plane can achieve accurate matching of the longest prefix, but the matching rate is a bottleneck and cannot meet the prefix matching requirements of large-capacity IP data packets. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device and medium for large-capacity satellite-based routing switching with the longest prefix matching in order to realize prefix matching of IP data packets at a large-capacity forwarding rate in low-orbit satellite Internet while taking into account the processing capability and power consumption constraints of satellite-based equipment. The method has simple calculation and processing, low requirements on hardware resources, and can realize accurate matching of the longest prefix at a large-capacity forwarding rate, which is of great significance to improving the access quantity and forwarding capacity of the entire low-orbit satellite Internet users.

[0006] Specifically, in order to solve the problem of large-capacity fast table lookup, the present invention uses blacklist and whitelist hash tables and a large-capacity cache mechanism to ensure the rapidity of table lookup, avoid the waste of resources caused by repeated table lookups for blacklist services, and avoid the missed match problem caused by the initial table lookup for new services.

[0007] Specifically, with respect to the prefix matching problem, the present invention realizes accurate matching of the longest prefix on the control plane by combining the control plane and the forwarding plane, and realizes real-time updating of the blacklist and whitelist hash tables through the feedback mechanism of the forwarding plane, so that the onboard router can quickly and accurately realize prefix matching of IP data packets.

[0008] The technical solution of the present invention is as follows:

[0009] A method for long-prefix matching of large-capacity satellite-borne routing switching, comprising:

[0010] Step S1: The control plane receives an IP port mapping table message, where the IP port mapping table includes a mapping relationship between a destination IP address and a switch output port;

[0011] Step S2: The control plane sorts the IP port mapping table from high to low according to the prefix length and the matching priority, and converts the sorted IP port mapping table into a hash table, merges and updates it with the existing whitelist hash table and blacklist hash table, and sends it to the forwarding plane;

[0012] Step S3: When the forwarding plane receives the IP data packet, it extracts the destination IP address; firstly, it queries the whitelist hash table, if it hits, it forwards according to the matching port number, if it does not hit, it continues to query the blacklist hash table; if the blacklist hash table hits, the current message is discarded, if it does not hit, it queries the cache identifier of the current message; if it has been cached, the current message is discarded, if it has not been cached, the current message is stored in the large-capacity cache, and the cache identifier is marked in the data packet, and the control plane is notified to perform precise query; the message stored in the large-capacity cache is notified by the cache again through the table query timing notification message, and the forwarding plane re-queries the whitelist hash table; after receiving the precise query notification message, the control plane queries the IP port mapping table and updates the whitelist hash table or the blacklist hash table.

[0013] Furthermore, the hash matching items of the whitelist hash table include: the destination IP address and the corresponding outbound port number;

[0014] The hash matching items of the blacklist hash table include: the destination IP address;

[0015] The storage address of the hash matching items in the whitelist hash table and the blacklist hash table is the address of the hash calculation; the input value of the hash calculation is the 32-bit destination IP address in the IP message. If the calculation result conflicts, it is stored in a 3-slot backup manner.

[0016] Furthermore, when the forwarding plane queries the whitelist hash table, it uses a parallel method to search for three slots at the same time, and compares them with the IP addresses in the three slots found in turn. If a match is successful, the data is output through the port number in the hash table match item found. If the three slots calculated by the hash do not match successfully, the blacklist hash table is searched in the same way.

[0017] Furthermore, the data put into the large-capacity cache is added with a cache identifier and a cache timestamp on the data frame to distinguish it from other non-cached data and to start a table lookup again;

[0018] When the difference between the current system time and the cached data timestamp is greater than the re-search time threshold, the current cached data frame is extracted and the table is re-searched. When the whitelist is matched successfully, the cache identifier and cache timestamp are removed before forwarding to the corresponding port; when the cached data fails to match, it is directly discarded.

[0019] Furthermore, the control plane sorts the IP port mapping table from high to low according to prefix length and matching priority, including:

[0020] The control plane sorts the IP port mapping table from high to low according to the prefix length. If the prefix length is the same, it will continue to sort from high to low according to the matching priority.

[0021] Furthermore, the sorted IP port mapping table is merged with the whitelist hash table, including:

[0022] Step A: Calculate the hash value of each IP address in the sorted IP-port mapping table, take the IP address and port number as hash matching items, and store them in the newly created whitelist hash table;

[0023] Step B: Compare the IP address in the hash match item in the old whitelist hash table with the IP port mapping table to determine whether it matches the new IP port mapping table. If it matches, store it in the new whitelist hash table. If it does not match, store the item in the blacklist hash table.

[0024] Furthermore, the sorted IP port mapping table is merged with the blacklist hash table, including:

[0025] Step I: Extract the hash matching items that are not empty in the blacklist hash table one by one, and compare them with the IP-port mapping table in turn;

[0026] Step II: Delete the successfully matched hash items from the blacklist hash table and store them in the whitelist hash table; those that have not been successfully matched will remain in the blacklist hash table.

[0027] Further, after receiving the precise query notification message, the control plane queries the IP port mapping table and updates the whitelist hash table or the blacklist hash table, including:

[0028] The destination IP address is extracted from the precise query notification message sent by the forwarding plane, and the sorted IP-port mapping table is accurately searched; if the match is successful, the hash match item of the IP address and the corresponding port number combination is stored in the whitelist hash table; if the match is unsuccessful, the corresponding hash match item is stored in the blacklist hash table; and the updated whitelist hash or blacklist hash table is sent to the forwarding plane.

[0029] The present invention also proposes a longest prefix matching large-capacity satellite-borne routing switching device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the longest prefix matching large-capacity satellite-borne routing switching method as described above are implemented.

[0030] The present invention also proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the longest prefix matching large-capacity satellite-based routing switching method as described above are implemented.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] The present invention has simple calculation and processing, low requirements on hardware resources, and can achieve accurate matching of the longest prefix at a large-capacity forwarding rate. It is of great significance to improving the number of access users and forwarding capacity of the entire low-orbit satellite Internet. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 The present invention is a flow chart of a longest prefix matching large-capacity satellite-based routing exchange method. DETAILED DESCRIPTION

[0034] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0035] The features and performance of the present invention are further described in detail below in conjunction with the embodiments.

[0036] Embodiment 1

[0037] It should be noted that the first technical problem to be solved in this embodiment is the fast table lookup of large-capacity IP messages. With the development of low-orbit satellite Internet, the demand for the switching capacity of satellite routers for satellite broadband communication services is getting higher and higher. The demand for switching capacity of low-orbit Internet constellations currently under construction is generally above 40Gbps. In the process of large-capacity data forwarding, how the satellite router can quickly match the corresponding output port number for each IP data packet under the constraints of limited processing resources and power consumption is a big problem. Shared bus, shared memory and vertical and horizontal switching architectures are difficult to meet the requirements of large-capacity IP message table lookup under limited resources of satellite routers. The SDN architecture can separate the control plane and the forwarding plane, run a lightweight and efficient routing protocol on the control plane, and complete fast table lookup forwarding on the forwarding plane. The commonly used implementation method for fast table lookup forwarding is a hash table, which obtains the hash address of the corresponding storage space through a hash function operation of the scattered IP destination address, thereby achieving fast matching. However, the depth of the hash storage area and the design of the hash matching items are limited by the processing resources of the satellite processor. Improper selection of hash functions or too shallow depth of the hash storage area will lead to IP address matching conflicts and missed matches. The unreasonable design of hash matching items can easily lead to redundant storage content, thus wasting storage resources and affecting the depth of the hash storage area. Therefore, this paper adopts the whitelist + black and white name hash table method, and designs appropriate storage depth and hash matching items according to the large-capacity IP data packet forwarding characteristics of the satellite router to achieve fast table lookup for large-capacity IP packets.

[0038] The second technical problem to be solved is the longest prefix matching. With the continuous growth of the number of users accessing the low-orbit satellite Internet, the number of IP addresses that the onboard router needs to process is also gradually increasing. In order to reduce the size of the routing table and improve the efficiency of table lookup, the onboard router needs to aggregate the addresses, that is, first match the path with the longest prefix during the IP packet table lookup process. For the longest prefix matching problem, ground-based commercial routers generally use a TCAM-based hardware forwarding engine, which matches in parallel by building multiple high-performance chips, but the limited processing resources and power consumption constraints of onboard routers make it impossible to deploy such high-performance hardware forwarding engines. Prefix matching based on software can achieve accurate search, but the matching rate is very low and cannot meet the prefix matching requirements of large-capacity IP data packets.

[0039] Therefore, this paper adopts a prefix matching method that combines the control plane and the forwarding plane. The forwarding plane is used to implement fast table lookup and caching, and the control plane is used to implement accurate matching. The control plane and the forwarding plane are connected through a high-speed interface.

[0040] Specifically, a large-capacity fast table lookup method based on blacklist and whitelist hash tables is proposed, that is, the whitelist hash table is used for fast table lookup, and the blacklist hash table is used to avoid repeated table lookup of blacklist services to occupy processing resources.

[0041] Secondly, a large-capacity table lookup cache mechanism is proposed to cache the services that are not matched during the initial table lookup on the forwarding plane, and then re-look up the table after the control plane has accurately searched, thus avoiding missed matches in the initial forwarding services.

[0042] Then, an accurate matching method of IP-port mapping table based on prefix length and matching priority is proposed to ensure that the IP address with the longest prefix can be looked up in the table first.

[0043] Finally, a method for updating the blacklist and whitelist hash tables is proposed to ensure that after the IP port mapping table is uploaded to the ground control center or the onboard router autonomously calculates the route, the previously valid blacklist and whitelist entries can continue to be retained, making the table lookup efficiency higher and higher.

[0044] In this example, see Figure 1 , a longest prefix matching large-capacity satellite-based routing switching method, specifically comprising the following steps:

[0045] Step S1: The control plane receives an IP port mapping table message, wherein the IP port mapping table includes a mapping relationship between a destination IP address and an exchange port, and can be obtained by an entry in a ground control network control center or by autonomous calculation by a satellite-borne router;

[0046] Step S2: The control plane sorts the IP port mapping table from high to low according to the prefix length and the matching priority, and converts the sorted IP port mapping table into a hash table, merges and updates it with the existing whitelist hash table and blacklist hash table, and sends it to the forwarding plane;

[0047] Step S3: when the forwarding plane receives the IP data packet, the destination IP address is extracted; first, the whitelist hash table is queried, and if a hit is found, the packet is forwarded according to the matching port number; if a hit is found, the blacklist hash table is continued to be queried; if a hit is found in the blacklist hash table, it means that the packet has been queried before and is not in the local port, so the packet is discarded; if a hit is found, the cache identifier of the current packet is queried; if it has been cached, it means that the packet has been queried in both the whitelist and the blacklist and has not been hit, and there is no need to cache it again, so the packet is discarded; if it has not been cached, the current packet is stored in a large-capacity cache, and a cache identifier is marked in the data packet, and the control plane is notified to perform precise query; the packet stored in the large-capacity cache is notified by the cache again through the table query timing notification message, and the forwarding plane re-queries the whitelist hash table; after receiving the precise query notification message, the control plane queries the IP port mapping table and updates the whitelist hash table or the blacklist hash table.

[0048] In this embodiment, it should be noted that, as shown in Table 1, the IP port mapping table maintains the forwarding port number information corresponding to the ground network element IP and the satellite network element IP, and each IP address corresponds to a prefix length and priority.

[0049] Table 1 IP port mapping table

[0050] IP address Prefix length Matching Priority Port Number IP Address 1 Prefix 1 Priority 1 Port 1 IP Address 2 Prefix 2 Priority 2 Port 2 … … … … IP address Prefix n Priority n Port n

[0051] In this embodiment, specifically, the hash matching items of the whitelist hash table include: the destination IP address and the corresponding outbound port number;

[0052] The hash matching items of the blacklist hash table include: the destination IP address;

[0053] The storage address of the hash matching items in the whitelist hash table and the blacklist hash table is the address of the hash calculation; the input value of the hash calculation is the 32-bit destination IP address in the IP message. If the calculation result conflicts, it is stored in a 3-slot backup mode;

[0054] That is, first of all, in order to achieve fast table lookup and avoid missed matches and false matches, the whitelist hash table and the blacklist hash table are stored on the forwarding plane at the same time. Among them, the hash matching items in the whitelist hash table are the destination IP address and the corresponding outbound port number, and the hash matching items in the blacklist hash table are only the destination IP address. The storage address of the hash matching items in the whitelist hash table and the blacklist hash table is the address of the hash calculation. The input value of the hash calculation is the 32-bit destination IP address in the IP message. If the calculated result conflicts, it is stored in a 3-slot backup manner. For example, in the whitelist hash table, the hash values ​​calculated for IP address 1, IP address 2, and IP address 3 are all 0, then the IP address and the corresponding port number are placed in slot 0, slot 1, and slot 2 of hash address 1 in order; among them, the whitelist hash table is shown in Table 2, and the blacklist hash table is shown in Table 3.

[0055] Table 2 Whitelist hash table

[0056]

[0057] Table 3 Blacklist hash table

[0058]

[0059] In this embodiment, specifically, when the forwarding plane queries the whitelist hash table, it uses a parallel method to search for three slots at the same time, and compares them with the IP addresses in the three slots found in turn. If a match is successful, the data is output through the port number in the hash table match item found. If the three slots calculated by the hash are all unsuccessful, the blacklist hash table is searched in the same way;

[0060] That is, after the forwarding plane receives the IP data packet, it extracts the destination IP address of the IP data packet, uses the hash calculation function to take the destination IP address as the input parameter, calculates the hash value, and uses it as the hash address to search the whitelist hash table. When searching, it uses a parallel method to search for three slots at the same time, and compares them with the IP addresses in the three slots found in turn. If the match is successful, the data is output through the port number in the hash table match item found. If the three slots calculated by the hash calculation are all unsuccessful, the blacklist hash table is searched in the same way; if the blacklist hash table matches successfully, it means that the address belongs to the forwarding blacklist and is directly discarded. If the blacklist does not match successfully, it means that the IP address does not belong to the whitelist or the blacklist, and further queries the cache identifier. If the cache has not been cached, it means that the data is entering the forwarding plane for the first time. Therefore, the message needs to be further cached and processed. The forwarding plane sends a precise query message to the control plane and waits for the precise search result of the control plane.

[0061] In this embodiment, specifically, the data put into the large-capacity cache has a cache identifier and a cache timestamp added to the data frame to distinguish it from other non-cached data and to start a table lookup again;

[0062] When the difference between the current system time and the cached data timestamp is greater than the re-search time threshold, the current cached data frame is extracted and the table is searched again. When the whitelist is matched successfully, the cache identifier and cache timestamp are removed before forwarding to the corresponding port. When the cached data fails to match, it is directly discarded. It should be noted that the threshold for re-searching the cached data needs to be greater than the time from the forwarding plane notifying the control plane of the accurate query to the control plane updating the blacklist and whitelist hash table.

[0063] In this embodiment, specifically, the control plane sorts the IP port mapping table from high to low according to the prefix length and the matching priority, including:

[0064] The control plane sorts the IP port mapping table from high to low according to the prefix length. If the prefix length is the same, it will continue to sort from high to low according to the matching priority.

[0065] In this embodiment, specifically, the sorted IP port mapping table and the whitelist hash table are merged and processed, including:

[0066] Step A: Calculate the hash value of each IP address in the sorted IP-port mapping table, and store the IP address and port number as hash matching items in the newly created whitelist hash table. At this time, since the IP-port mapping table has been sorted, it can be ensured that the table entry with the longest prefix length will be stored in the position with a smaller slot number first, and can also be matched first when looking up the table on the forwarding plane.

[0067] Step B: Compare the IP address in the hash match item in the old whitelist hash table with the IP port mapping table to determine whether it matches the new IP port mapping table. If it matches, store it in the new whitelist hash table. If it does not match, store the item in the blacklist hash table.

[0068] In this embodiment, specifically, the sorted IP port mapping table and the blacklist hash table are merged and processed, including:

[0069] Step I: Extract the hash matching items that are not empty in the blacklist hash table one by one, and compare them with the IP-port mapping table in turn;

[0070] Step II: Delete the successfully matched hash items from the blacklist hash table and store them in the whitelist hash table; those that have not been successfully matched will remain in the blacklist hash table.

[0071] In this embodiment, specifically, after receiving the precise query notification message, the control plane queries the IP port mapping table and updates the whitelist hash table or the blacklist hash table, including:

[0072] The destination IP address is extracted from the precise query notification message sent by the forwarding plane, and the sorted IP-port mapping table is accurately searched; if the match is successful, the hash match item of the IP address and the corresponding port number combination is stored in the whitelist hash table; if the match is unsuccessful, the corresponding hash match item is stored in the blacklist hash table; and the updated whitelist hash or blacklist hash table is sent to the forwarding plane.

[0073] This embodiment also proposes a longest prefix matching large-capacity satellite-based routing switching device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the longest prefix matching large-capacity satellite-based routing switching method as described above when executing the computer program; preferably, the computer program can be executed on a terminal device, such as a personal computer.

[0074] This embodiment also proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of a maximum prefix matching large-capacity satellite-based routing switching method as described above; however, the device of the present invention is not limited to this. In this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.

[0075] The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more conductors, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0076] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0077] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0078] Embodiment 2

[0079] Embodiment 2 is a specific application of the longest prefix matching large-capacity satellite-based routing exchange method proposed in Embodiment 1.

[0080] The control plane uses the domestic high-performance CPU processor 3883, and the forwarding plane uses the high-performance FPGA chip V7690T. The control plane and the forwarding plane are connected through a 1.25Gbps SRIO interface, and the large-capacity cache uses a DDR with a storage capacity of 4GB. The whitelist hash table depth is 16 bits, with a total of 65536 addresses, and the total occupied storage space is the number of hash addresses * the number of slots * the number of hash matching bytes = 65536 * 3 * (4-byte IP + 1-byte port number) = 983040Byte = 7.5M bit. The blacklist hash table depth is 13 bits, with a total of 8192 addresses, and the total occupied storage space is 0.9375M bit. Both the blacklist and whitelist hash tables are stored in the FLASH that comes with the FPGA chip. The cache data re-search threshold is set to 100 milliseconds.

[0081] Through blacklist and whitelist hash tables, large-capacity caches, and fast interactive processing between the control plane and the forwarding plane, the forwarding plane can quickly match IP packets in nearly 200,000 IP addresses in one beat. In a ground verification environment that includes a physical space-borne router, the space-borne router achieved a switching capacity of 40Gbps through a network tester, with only slight fluctuations when table entries were updated and new services arrived, and later on, it was able to stably and quickly look up tables for output.

[0082] The above-mentioned embodiments only express the specific implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the protection scope of the present application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the technical solution concept of the present application, and these all belong to the protection scope of the present application.

[0083] This background section is provided to generally present the context of the invention, and the work of the presently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither explicitly nor implicitly admitted to be prior art to the present invention.

Claims

1. A method for long-prefix matching of large-capacity satellite-based routing switching, characterized in that: include: Step S1: The control plane receives an IP port mapping table message, where the IP port mapping table includes a mapping relationship between a destination IP address and a switch output port; Step S2: The control plane sorts the IP port mapping table from high to low according to the prefix length and the matching priority, and converts the sorted IP port mapping table into a hash table, merges and updates it with the existing whitelist hash table and blacklist hash table, and sends it to the forwarding plane; Step S3: When the forwarding plane receives an IP data packet, it extracts the destination IP address; firstly, it queries the whitelist hash table, if it hits, it forwards according to the matching port number, if it misses, it continues to query the blacklist hash table; if it hits the blacklist hash table, it discards the current message, if it misses, it queries the cache identifier of the current message; If it has been cached, the current message will be discarded. If it has not been cached, the current message will be stored in a large-capacity cache, and a cache mark will be added to the data packet, and the control plane will be notified to perform a precise query. For messages stored in the large-capacity cache, the cache will be used to query the table again to send a regular notification message, and the forwarding plane will re-query the whitelist hash table. After receiving the precise query notification message, the control plane will query the IP port mapping table and update the whitelist hash table or the blacklist hash table.

2. The method for long-prefix matching of large-capacity satellite-based routing switching according to claim 1, characterized in that: The hash matching items of the whitelist hash table include: the destination IP address and the corresponding outbound port number; The hash matching items of the blacklist hash table include: the destination IP address; The storage address of the hash matching items in the whitelist hash table and the blacklist hash table is the address of the hash calculation; the input value of the hash calculation is the 32-bit destination IP address in the IP message. If the calculation result conflicts, it is stored in a 3-slot backup manner.

3. The method for long-prefix matching of large-capacity satellite-based routing switching according to claim 2, characterized in that: When the forwarding plane queries the whitelist hash table, it uses a parallel method to search for three slots at the same time, and compares them with the IP addresses in the three slots found in turn. If a match is successful, the data is output through the port number in the hash table match item found. If the three slots calculated by the hash do not match successfully, the blacklist hash table is searched in the same way.

4. The method for long-prefix matching of large-capacity satellite-based routing switching according to claim 3, characterized in that: The data put into the large-capacity cache is added with a cache identifier and a cache timestamp on the data frame to distinguish it from other non-cached data and to start the table lookup again; When the difference between the current system time and the cached data timestamp is greater than the re-search time threshold, the current cached data frame is extracted and the table is re-searched. When the whitelist is matched successfully, the cache identifier and cache timestamp are removed before forwarding to the corresponding port; when the cached data fails to match, it is directly discarded.

5. The method for long-prefix matching of large-capacity satellite-based routing switching according to claim 1, characterized in that: The control plane sorts the IP port mapping table from high to low based on prefix length and matching priority, including: The control plane sorts the IP port mapping table from high to low according to the prefix length. If the prefix length is the same, it will continue to sort from high to low according to the matching priority.

6. The method for large-capacity satellite-based routing switching based on longest prefix matching according to claim 1, characterized in that: The sorted IP port mapping table and the whitelist hash table are merged and processed, including: Step A: Calculate the hash value of each IP address in the sorted IP-port mapping table, take the IP address and port number as hash matching items, and store them in the newly created whitelist hash table; Step B: Compare the IP address in the hash match item in the old whitelist hash table with the IP port mapping table to determine whether it matches the new IP port mapping table. If it matches, store it in the new whitelist hash table. If it does not match, store the item in the blacklist hash table.

7. The method for long-prefix matching of large-capacity satellite-based routing switching according to claim 1, characterized in that: The sorted IP port mapping table and the blacklist hash table are merged and processed, including: Step I: Extract the hash matching items that are not empty in the blacklist hash table one by one, and compare them with the IP-port mapping table in turn; Step II: Delete the successfully matched hash items from the blacklist hash table and store them in the whitelist hash table; those that have not been successfully matched will remain in the blacklist hash table.

8. The method for large-capacity satellite-based routing switching based on longest prefix matching according to claim 1, characterized in that: After receiving the precise query notification message, the control plane queries the IP port mapping table and updates the whitelist hash table or blacklist hash table, including: The destination IP address is extracted from the precise query notification message sent by the forwarding plane, and the sorted IP-port mapping table is accurately searched; if the match is successful, the hash match item of the IP address and the corresponding port number combination is stored in the whitelist hash table; if the match is unsuccessful, the corresponding hash match item is stored in the blacklist hash table; and the updated whitelist hash or blacklist hash table is sent to the forwarding plane.

9. A long-prefix-matching large-capacity satellite-borne routing switching device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of a longest prefix matching large-capacity satellite-based routing switching method as described in any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a longest prefix matching large-capacity satellite-based routing switching method as described in any one of claims 1 to 8 are implemented.