Routing origin verification method based on tree bit map

Through the routing origin verification method based on tree bitmap, the hash table collaborative search and authorization prefix verification rules are used to solve the problems of slow BGP routing origin verification speed and large storage overhead in the existing technology, and achieve fast verification and low The effect of storage overhead.

CN118921314APending Publication Date: 2024-11-08COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410915464.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing BGP routing origin verification algorithm is based on a prefix tree, which leads to slow verification speed and high storage overhead, and cannot complete searches within a limited number of times, affecting the processing performance of the router.

Method used

The routing origin verification method based on tree bitmap is adopted, and the coordinated search of two hash tables is achieved to achieve rapid verification. The hash table STT stores the AP's coverage information, and directly obtains the coverage information when backtracking to the suspension layer, reducing the number of backtracking times. Design verification rules based on authorization prefixes.

Benefits of technology

It significantly improves verification speed and reduces storage overhead. In large-scale RPKI deployment scenarios, the proportion of verification results is Valid is increased, and the verification process only requires one hash operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921314A_ABST
    Figure CN118921314A_ABST
Patent Text Reader

Abstract

The invention relates to the field of inter-domain routing security, in particular to a routing origin verification method based on a tree bit map, which comprises the following steps: a router receives an IP prefix announced by a BGP (Border Gateway Protocol) and a corresponding origin AS (Application Server) number, and calculates a sub-tree identifier according to the IP prefix; searching a hash table SOT according to the sub-tree identifier and the origin AS number, judging whether a corresponding position in a corresponding sub-tree bitmap is marked or not, and if the corresponding position is marked, announcing to be Valid; searching a hash table STT according to the sub-tree identifier, judging a suspension layer of the sub-tree identifier, searching a corresponding bit of the sub-tree identifier in the LevelBitmap, and if the corresponding bit is set, determining that the verification result is Invalid; if not, the verification result is NotFound; according to the method, rapid verification is realized through collaborative lookup of the two hash tables, the coverage information of the AP is stored in the fixed suspension layers in the hash tables STT, the corresponding coverage information can be directly obtained when one of the suspension layers is traced back, the verification speed is obviously superior to that of an existing routing origin verification scheme based on a prefix tree, and the verification efficiency is greatly improved. And the storage overhead is obviously reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of inter-domain routing security, and in particular relates to a routing origin verification method based on a tree bit graph. Background Art

[0002] The Border Gateway Protocol (BGP) is a widely used inter-domain routing protocol and the foundation for interconnected autonomous systems (ASs) worldwide. However, due to its lack of security authentication mechanisms, BGP is vulnerable to malicious attacks or routing anomalies caused by misconfiguration, posing a significant threat to cybersecurity. To address BGP routing security issues, the Internet Resource Public Key Infrastructure (RPKI) introduces trusted routing information to assist routers in validating BGP routing messages and filtering out potentially anomaly routing messages. RPKI extends X.509 public key certificates to bind public keys and Internet resource owners to their public key holders. RPKI authorizes resources by issuing resource certificates in a top-down manner. The lowest-level resource holder issues a Route Origin Authorization (ROA) to bind an IP address to a specific AS. ROA data objects are issued by a certification authority (CA). Existing ROA encoding schemes include traditional ROA, minimal ROA, and hanging ROA. Traditional ROA and minimal ROA are based on maxLength encoding, while hanging ROA is based on tree bitmap encoding.

[0003] BGP routers obtain verified Route Origin Validation (ROV) data from relying parties (RPs) through the RTR protocol and verify the legitimacy of route announcements based on the ROA data. This process is known as Route Origin Validation (ROV). ROV allows routers to quickly identify route hijacking and ensure BGP security. ROV produces three results: Valid, Invalid, and NotFound. According to RFC6811, the criteria for these three results are as follows: Valid: The BGP route announcement matches a specific ROA; Invalid: The IP prefix in the BGP route announcement is covered by a specific ROA, but no ROA matches the route announcement; NotFound: The IP prefix in the BGP route announcement is not covered by any ROA.

[0004] Route Origin Verification technology is primarily used in routers. After receiving a Route Authentication (ROA), mainstream routers currently use a prefix tree (Trie)-based data structure to store the ROA data. The corresponding ROV algorithm also uses a prefix tree as its core data structure for tree search. Among existing open-source software routers, GoBGP uses the original Trie tree for ROA maintenance, employing a root-down prefix tree search during ROV. The open-source C library RTRlib uses LPFST (Longest Prefix First Search Tree) for ROA maintenance. LPFST is a tree structure constructed by prefix lengths in a heap-like structure. This tree structure places prefixes with longer prefix lengths closer to the root node. Once a match is found, the tree traversal stops immediately, resulting in fewer memory accesses during ROV compared to a Trie. BIRD uses a compressed Trie for ROA maintenance. A compressed Trie is a prefix tree in which nodes with only one child are merged into the parent node to save storage.

[0005] Overall, most current ROV algorithms are based on a prefix tree as their core data structure. This makes it difficult to complete searches within a limited number of times and requires multiple memory accesses. Consequently, when route announcements surge, this imposes significant overhead on routers, impacting the speed of routing message processing. Prefix tree maintenance also requires significant storage overhead, severely impacting router performance. Therefore, proposing a new route origin verification algorithm with fast verification speed and low storage overhead is an urgent issue to address in accelerating RPKI deployment and ensuring BGP routing security. Summary of the Invention

[0006] To solve the above problems, the present invention provides a route origin verification method based on a tree bitmap, comprising:

[0007] The router receives the BGP advertisement, which includes the IP prefix and the originating AS number;

[0008] Calculate the RP subtree identifier ID based on the IP prefix;

[0009] Searching the hash table SOT based on the RP's subtree identifier and the originating AS number to determine whether the corresponding position in the corresponding subtree bitmap is marked; if so, declaring the declaration as valid; wherein the key in the hash table SOT is a joint key consisting of the ROA subtree identifier and its originating AS number, and the value is the ROA's subtree bitmap;

[0010] If the declaration is not Valid, the hash table STT is searched according to the subtree identifier of the RP to determine whether there is an AP covering the RP. If the bit at the corresponding position in the STT is set, Invalid is returned; if not, backtrack upward until an AP covering the RP is found or the root node is reached.

[0011] In the hash table STT, the key is the ROA subtree identifier, and the value is the result of the OR operation of the subtree bitmaps of all ROAs under the ROA subtree identifier;

[0012] The AP is the authorized prefix, the RP is the IP prefix announced by the BGP, the RP subtree identifier is the unique identifier of the subtree where the BGP announced IP prefix is ​​located, and the ROA subtree identifier is the unique identifier of each subtree of the authorized prefix tree.

[0013] Also includes:

[0014] Check whether the RP's subtree identifier ID is within the specified hanging layer of the authorized prefix tree. If it is within the specified hanging layer, search the corresponding bit of the RP's subtree identifier in the Level_Bitmap. If the corresponding bit is set, it means that there is an AP covering the RP, and the verification result is Invalid. If the corresponding bit is not set, the verification result is NotFound.

[0015] The Level_Bitmap array is used to store the RP information covered by the AP in the specified suspension layer.

[0016] The route origin verification method is based on AP granularity, so a verification rule based on authorized prefix is ​​designed:

[0017] If no AP covers the RP, the corresponding verification result is NotFound;

[0018] If there is an AP that is the same as the RP, and the origin AS of the AP is the same as the RO, the corresponding verification result is Valid;

[0019] If at least one AP covers the RP, but no AP has the same AS as the RO, or no AP has the same AS as the RP, the corresponding verification result is Invalid.

[0020] Also includes maintenance of routing origin authorization information based on tree bitmap:

[0021] The routing origin authorization information maintenance based on the tree bitmap mainly includes two operations: deletion and insertion;

[0022] The insert operation is mainly responsible for inserting the received new ROA data and returning whether the insert operation is successful;

[0023] The revocation operation is mainly responsible for revoking the invalid ROA data and returning whether the revocation operation is successful.

[0024] The insert operation includes:

[0025] For a ROA based on a tree bitmap, the insertion process includes two steps: inserting into the hash table SOT and inserting into the hash table STT. The hash table SOT insertion first needs to search based on the ROA subtree identifier and its corresponding origin AS number. If a match is found and the hash table SOT [subtree identifier + origin AS number] & Bitmap is greater than 0, it means that an AP has been declared repeatedly. In this case, the number of references to the AP is additionally recorded, and then the bitmap is inserted into the hash table SOT.

[0026] Insertion into the hash table STT requires first searching the hash table SOT based on the ROA subtree identifier and its corresponding originating AS number. If a match is found, and the hash table SOT [subtree identifier + originating AS number] & Bitmap is greater than 0, it means that an AP has been declared repeatedly. In this case, the number of references to the AP is additionally recorded, and the bitmap is then inserted into the hash table STT.

[0027] For a maxLength-based ROA, first split it into several subtrees according to the hanging layer. After encoding these subtrees in a tree-bitmap-based manner, search based on the ROA subtree identifier and its corresponding origin AS number. If a hit is found and the hash table SOT[subtree identifier + origin AS number]&Bitmap is greater than 0, the number of references to the AP is additionally recorded, and the bitmap is then inserted into the hash tables SOT and STT.

[0028] Destruction operations include:

[0029] For a ROA based on a tree bitmap, the revocation process includes two steps: revoking the hash table SOT and revoking the hash table STT. The revocation of the hash table SOT requires first searching the hash table SOT based on the ROA subtree identifier and its corresponding origin AS number. If a match is found, the corresponding reference count needs to be updated first, and then it needs to be revoked from the hash table SOT.

[0030] The revocation of the hash table STT requires first searching the hash table SOT according to the ROA subtree identifier and its corresponding origin AS number. If a hit is found, the corresponding reference count needs to be updated first, and then it needs to be revoked from the hash table STT.

[0031] For a maxLength-based ROA, it is necessary to first split it and divide the ROA into several subtrees according to the hanging layer. After encoding these subtrees according to the tree bitmap ROA method, the hash table SOT is searched based on the ROA subtree identifier and its corresponding origin AS number. If a hit is found, the corresponding reference count needs to be updated first and then revoked from the hash table SOT and STT.

[0032] Also includes:

[0033] If an AP is authorized by multiple ROAs during the ROA data insertion process, this situation is written into the hash table Announcement_counter, and the number of ROAs authorized to the AP is recorded. When performing a revocation operation, the reference count situation is used to determine whether the corresponding bit in the hash table SOT / STT can be directly set to 0.

[0034] The hash table Announcement_counter is a reference counter of the SOT and the STT, the key of which is the ROA subtree identifier and the value is a reference count array, which is used to count each AP to avoid revoking all ROA data whose RP is overwritten but whose AS number does not match during the revocation operation;

[0035] The insert operation also includes:

[0036] Calculate the ROA subtree identifier based on the authorized prefix tree root node of the ROA address block, then use the subtree identifier as the key to find the corresponding entry in the WideArray hash table and store the ROA in the dynamic array contained in the entry;

[0037] The hash table Wide Array is used to store wide ROA data.

[0038] The insert operation also includes:

[0039] When the wide ROA is inserted into the Wide Array, the hash table STT is searched according to the subtree identifier of the wide ROA, and a wide Flag mark is added to the corresponding subtree bitmap to indicate that the corresponding wide ROA exists under the subtree identifier.

[0040] The present invention has the following advantages:

[0041] 1. The present invention achieves fast verification through collaborative search of two hash tables, and stores the AP's coverage information in a fixed suspension layer in the hash table STT. When tracing back to one of the suspension layers, the corresponding coverage information can be directly obtained. In terms of verification speed, it is significantly superior to the existing prefix tree-based route origin verification scheme, and the storage overhead is significantly reduced.

[0042] 2. For routing messages whose verification results are Val id, the verification process of the present invention only requires one hash operation. In the scenario of large-scale deployment of RPKI in the future, the Valid ratio in the ROV results will continue to increase, which further highlights its rapidity. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 Flowchart of the tree bit graph-based routing origin verification method of the present invention;

[0044] Figure 2 A node coverage relationship diagram within a subtree block of the tree bitmap routing origin verification method based on the present invention;

[0045] Figure 3 Schematic diagram of hash tables SOT and STT of the tree bit graph routing origin verification method of the present invention;

[0046] Figure 4 The hash table of the tree bit graph routing origin verification method of the present invention is

[0047] Announcement-counter diagram;

[0048] Figure 5 Schematic diagram of the array Level_Bitmap of the tree bitmap-based routing origin verification method of the present invention;

[0049] Figure 6 Schematic diagram of a hash table Wide Array based on the tree bit graph routing origin verification method of the present invention. DETAILED DESCRIPTION

[0050] The best mode for carrying out the present invention will be described below by way of examples. It should be understood that the specific embodiments herein are intended to explain the present invention in detail and should not be construed as limiting the present invention. It should be noted that various changes and modifications may be made while adhering to the principles and core scope of the present invention, and these changes should all be considered to fall within the scope of protection of the present invention. The specific implementation steps of the present invention will be described in detail with reference to the accompanying drawings.

[0051] The following is some basic explanation of the professional terms involved in the present invention:

[0052] Route Origin Authorization (ROA) is a security mechanism used to verify the legitimacy of route announcements in Internet routing. It is part of the Border Gateway Protocol (BGP) and enhances network security by ensuring the accuracy and authenticity of routing information. ROA data objects are issued by a Certificate Authority (CA) and typically include an ASN (Autonomous System Number), which identifies the autonomous system that owns a particular IP prefix; an IP prefix, which specifies the IP address block announced by the specified ASN; and a maximum prefix length, which defines the minimum subnet mask length that can match the ROA.

[0053] BGP routers obtain verified ROA data from relying parties (RPs) through the RTR protocol and verify the legitimacy of route announcements based on the ROA data. This process is called Route Origin Validation (ROV). Routers can use ROV to quickly identify route hijacking and ensure BGP security. ROV can produce three results: Valid, Invalid, and NotFound. According to RFC6811, the criteria for determining these three results are as follows:

[0054] Valid: The BGP route announcement matches a ROA.

[0055] Invalid: The IP prefix in the BGP route announcement is covered by a ROA, but no ROA matches this route announcement.

[0056] NotFound: The IP prefix in the BGP route announcement is not covered by any ROA.

[0057] An IP prefix covered by a ROA means that the prefix is ​​a subprefix of the ROA's prefix. An IP prefix matches a ROA if the prefix is ​​covered by the ROA's prefix, the prefix's mask length is less than or equal to the ROA's maximum length, and the prefix and the ROA's ASN are the same.

[0058] The ROA encoding scheme based on the tree bit graph eliminates the concept of maxlength in the ROA, so the scheme cannot be directly adapted to the existing routing verification rules. The present invention designs a verification rule based on the authorized prefix (AP).

[0059] ROA is essentially a mapping relationship between a series of IP prefixes and AS numbers, where a prefix authorized to an AS is called an authorized prefix (AP). Define the IP prefix (Route Prefix, RP) and the origin AS number (Route Origin ASN, RO) as<RP,RO> Compared to maxLength-encoded ROA data, tree-bitmap-based ROA refines the original concept of authorized address blocks into APs. Therefore, ROV using tree-bitmap-encoded ROA requires verification at the AP granularity. In this case, the verification rules are designed as follows:

[0060] For the NotFound verification result, the original verification rule is that no ROA can cover the RP. This actually means that all APs in the ROA cannot cover the RP. This corresponds to the AP-based verification rule that no AP covers the RP.

[0061] For the validation result Valid, the original validation rule is that at least one ROA matches<RP,RO> , which actually means that there is at least one ROA with the same AP as the RP, and the ASN of the ROA is the same as the RO. This corresponds to the AP-based verification rule that there is an AP with the same AP as the RP, and the origin AS of the AP is the same as the RO.

[0062] For the validation result Invalid, the original validation rule is that at least one ROA covers the RP, but no ROA can match<RP,RO> , which actually means that there is an AP that can cover the RP in at least one ROA, but no ROA has the same ASN as the RO, or no ROA has a maxLength greater than the AP's mask length. For AP-based validation rules, there must be at least one AP covering the RP, but no AP has the same origin AS as the RO, or no AP has the same origin AS as the RP.

[0063] Figure 2 This is a schematic diagram of the node coverage relationship within the subtree block of the present invention. In ROA, a shorter prefix can cover a longer prefix. For example, 192.168.0.0 / 16 can cover 192.168.1.0 / 24 because the network range of the former includes all IP addresses of the latter.

[0064] In a specific embodiment of the present invention, Figure 2 The root node "1" is the node with a 20-bit IP prefix. This node and its branches form a subtree. Its child nodes "2" and "3" represent the 21-bit IP prefixes with the same IP address covered by the 20-bit IP prefix. Nodes "4", "5", "6" and "7" represent the 22-bit IP prefixes with the same IP address covered by the 21-bit IP prefix.

[0065] In the Tree Bitmap-based ROV algorithm, storing data in a hash table for search can further improve search efficiency. The Tree Bitmap is used for fast prefix matching. The hash table is used to store prefix information and for fast search.

[0066] Therefore, in the present invention, a hash table SOT is designed to store all tree bitmap ROA encoding results.

[0067] Specifically, the key of the hash table SOT is a joint key consisting of the authorized prefix subtree identifier of the ROA and its corresponding origin AS number, and the value is the subtree bitmap of the ROA.

[0068] In a specific embodiment, Figure 3 As shown, Figure 3 The two subtrees represent the subtrees from the 20-bit IP prefix to the 22-bit IP prefix. In this case, there are two ROAs: <202.127.16.0 / 20,20,AS X> and <202.127.16.0 / 21,22,AS Y>. These two ROAs represent that the IP address is 202.127.16.0, the original prefix bits are 20 and 21 respectively, the maximum allowed prefix lengths are 20 and 22 respectively, and the originating AS numbers are X and Y respectively.

[0069] In the figure, node "1" represents the first 20-bit IP prefix code corresponding to the ROA. <202.127.16.0> is converted to binary as: 11001010.01111111.00010000.00000000. Take the first 20 bits, add 1 to the leftmost end, and convert it to decimal, which corresponds to 1878001, representing the ID of node "1".

[0070] For <202.127.16.0 / 20,20,AS X>, the original prefix length is 20, and the maximum allowed prefix length is 20. Therefore, this ROA includes only the "1" node, and the bitmap is 00000010 (the last bit of the bitmap is the revocation flag bit, 0 indicates not revoked. The other 7 bits of the bitmap represent the "1" to "7" nodes in the subtree from right to left, and the corresponding position is 1, indicating that it is authorized). The subtree bitmap is 2 (00000010 converted to decimal is 2).

[0071] For <202.127.16.0 / 21,22,AS Y>, the original prefix length is 21 and the 21st bit is 0, so it corresponds to the "2" node. The maximum prefix length it allows is 22, that is, it not only includes the "2" node but also covers the "4" and "5" nodes with a 22-bit prefix length. The bitmap is 00110100, and the subtree bitmap is 52 (00110100 converted to decimal is 52).

[0072] Therefore, the following two entries <(1878001,X),2> and <(1878001,Y),52> will be stored in the SOT.

[0073] In the present invention, a hash table STT is designed to store all AP information.

[0074] The hash table SOT is not suitable for finding whether there is an AP covering the RP, because the origin AS of the AP covering the RP may be different from the AS information received by the router, and the hash table SOT cannot omit the AS for searching.

[0075] Therefore, in the hash table STT, the key is the subtree identifier of the ROA, and the value is the result of the OR operation of all subtree bitmaps of the ROA under this subtree identifier. Since the value in the STT is the result of the OR operation of all subtree bitmaps of the ASNs under the ID, the RO search condition can be omitted and only searched according to the ID. Any <RP,RO> can calculate the corresponding ID and POS. Search the STT according to the ID (RP subtree identifier). If a hit occurs, judge whether there is an AP covering the RP in the subtree according to the result of MASK[POS]&Bitmap.

[0076] In a specific embodiment, as Figure 3 shown, the RO information "X" and "Y" of <(1878001,X),2> and <(1878001,Y),52> are not stored. The value in the STT is the result of the OR operation of all subtree bitmaps of the ASs under the ID. Therefore, in the "1" node in the STT, <1878001>,54> will be stored, that is, the result 54 (00110110 converted to decimal is 54) of the OR operation of the corresponding ID and 00000010 and 00110100 (00110110).

[0077] In the standard ROV algorithm flow, the algorithm searches the STT based on the IP prefix. For example, suppose the advertised prefix is ​​202.127.16.0 / 20. If no exact match (202.127.16.0 / 20) is found in the STT, it's called a miss. If it's a miss, the algorithm attempts to find a more general match. This means it needs to backtrack upwards to check for a shorter prefix. For example: backtracking from 202.127.16.0 / 20 to 202.127.16.0 / 19; if there's still no hit, backtracking to 202.127.16.0 / 18; and continuing backtracking until a matching prefix is ​​found or the root node is reached.

[0078] Each lookup operation in the STT data structure uses a hash table to speed up the search process. However, each backtracking operation triggers a new hash lookup operation, and each hash lookup operation involves calculating the hash value and looking up the corresponding entry in the hash table, which increases the lookup overhead.

[0079] In order to solve this problem, the present invention proposes an optimization strategy based on prefix extension to reduce the number of backtracking times when a search fails. The hash table STT can use the above principle to perform prefix extension.

[0080] Specifically, prefixes that can be covered by all APs within the 20th layer are marked. When tracing back to the 20th layer, the corresponding coverage information can be directly obtained. This makes query operations more efficient because the system only needs to access and check the corresponding coverage information instead of traversing the entire prefix tree.

[0081] For any AP, the prefixes covered by the AP in the fixed suspension layer can be calculated and stored.

[0082] In order to store AP coverage information, the present invention designs a Level_Bitmap array, which is used to store a large tree bitmap.

[0083] In a specific embodiment of the present invention, the prefixes covered by the AP within the suspension layer 20 are calculated and stored, such as Figure 5 As shown, all prefixes within the suspension layer 20 are numbered according to the prefix value, and the coverage status of these prefixes can be stored in a tree bitmap. The corresponding bit of the prefix to be covered in Level_Bitmap is set to 1, indicating that the corresponding prefix has been covered by an AP. When tracing back upward, if the suspension layer 5, 10, 15, 20 is passed, it can be quickly determined whether it is covered by the AP based on the Level_Bitmap array, avoiding the process of continuing to trace back upward. Usually, the maximum number of bits of an IP address is 32 bits, so the number of bits of Level_Bitmap in this embodiment is 2 20 Bit.

[0084] In a specific embodiment, it is assumed that an authorized IP prefix <202.127.0.0 / 16> is obtained. The prefix length of the IP prefix is ​​16, and the 15th layer is determined to be its mounting layer. The first 15 bits are determined by its IP address and prefix length to be 11001010.0111111. Therefore, the identifier of the root of the subtree it is mounted on is: 11100101.001111111. At this time, the node number of the IP prefix in the subtree is 2, and the bitmap value is 4 (100 converted to decimal is 4).

[0085] The IP prefix length is 16 bits, and the hanging layer 20 can cover 16 (2 4 ) prefixes, the first 20 digits of which convert to decimal form as 829408 to 829423.

[0086] The route origin verification method of the present invention performs verification at the AP level. Before verification, the received ROA data is encoded using a tree bitmap encoding scheme and stored in a hash table. The key of the hash table is the ROA subtree identifier, and the value is the subtree bitmap. This allows the AP to be quickly located by searching the hash table and then verified according to AP-based verification rules. Tree bitmap-based route origin authorization information maintenance primarily involves deletion and insertion operations.

[0087] The insert operation is mainly responsible for inserting the received new ROA data and returning whether the insert operation is successful. The insert operation first needs to determine the type of ROA.<Identifier,Bitmap,ASN> The insertion process consists of two steps: inserting into the hash table SOT and inserting into the hash table STT. Inserting into the hash table SOT first requires searching based on the identifier and ASN. If a match is found, and the hash table SOT[Identifier+ASN]&Bitmap is greater than 0, it indicates that an AP has been duplicated. In this case, the number of references to the AP is additionally recorded, and the bitmap is then inserted into the hash table SOT. Inserting into the hash table STT is the same as inserting into the SOT.

[0088] For a ROA based on maxLength<Prefix,maxLength,ASN> , we need to split it first, divide the ROA into several subtrees according to the hanging layer, encode these subtrees according to the tree bitmap method, and then insert them using the same method.

[0089] The undo operation is mainly responsible for undoing the invalid ROA data and returning whether the insert operation is successful. The undo operation also needs to first determine the type of ROA. For a ROA based on a tree bitmap<Identifier,Bitmap,ASN> The revocation process consists of two steps: revoking the hash table SOT and revoking the hash table STT. Revoking the hash table SOT requires first searching the hash table SOT based on the ID and ASN. If a match is found, the corresponding reference count must be updated before it is revoked from the hash table SOT. Revoking the hash table STT is the same as revoking the SOT.

[0090] For a ROA based on maxLength<Prefix,maxLength,ASN> , we need to split it first, divide the ROA into several subtrees according to the hanging layer, encode these subtrees according to the tree bitmap ROA method, and then cancel them using the same method.

[0091] Because the tree-bitmap encoding format stores only one bit set to 1 for an AP regardless of how many times it has been authorized, when revoking an ROA, if the AP authorized by that ROA is authorized by multiple ROAs, the corresponding bit cannot be simply marked as 0. This is because the remaining ROAs that authorized the AP have not been revoked, and the AP still exists. Therefore, a hash table, announcement_counter, is proposed. This is a reference counter for hash tables SOT and STT. Its key is the ROA subtree identifier, and its value is an array of reference counts. This hash table is responsible for counting each AP.

[0092] If an AP is authorized by multiple ROAs during the ROA data insertion process, this information can be written to the announcement_counter and the number of ROAs authorized to the AP can be recorded. When performing a revocation operation, the reference count status is used to determine whether the corresponding bit in the SOT / STT can be directly set to 0.

[0093] In a specific embodiment, Figure 4 As shown in the figure, there are two ROAs: ROA<202.127.16.0 / 21,21,ASX> and <202.127.16.0 / 21,22,AS Y>, with corresponding bitmaps of 00000100 and 00110100 respectively. When the bit 2 is repeatedly authorized by performing an OR operation and stored in the STT, the hash table Announcement_counter will record the number of references of the bit as 2.

[0094] like Figure 1 As shown, the present invention discloses a routing origin verification method based on a tree bit graph, and the specific steps are as follows:

[0095] Step 1: Calculate the corresponding RP subtree identifier based on the routing prefix;

[0096] Specifically, the IP prefix in the BGP routing announcement is first extracted, converted into binary form, and the corresponding RP subtree identifier ID is calculated.

[0097] In one embodiment, <202.127.16.0> is converted into binary as:

[0098] 11001010.01111111.00010000.00000000, truncate the first 20 digits, add 1 to the leftmost end, and convert the result to decimal, which is 1878001, representing the RP subtree identifier (ID).

[0099] Step 2: Search the hash table SOT based on the RP subtree identifier and the originating AS number to obtain the corresponding subtree bitmap. Determine whether the corresponding position in the subtree bitmap is marked based on the routing prefix RP. If it is marked, it means that there is an AP (authorized prefix) that is the same as the RP (routing prefix), and the declaration is valid.

[0100] In the present invention, the main function of the hash table SOT is to determine whether the result is Valid. Its key is the joint key composed of the subtree identifier of the ROA and its corresponding origin AS number, and its value is the subtree bitmap of the ROA.<RP,RO> (IP prefix + originating AS number) can directly search the SOT to determine whether there is a matching AP. If a match is found and the POS bit of the corresponding bitmap is set to 1, it means that an AP matches the RP and the ASN is the same. In this case, the verification result is Valid.

[0101] Step 3: If<RP,RO> If no matching AP is found in the hash table SOT, the hash table STT is searched according to the RP subtree identifier. If an AP covers the RP, the declaration is Invalid, otherwise it is NotFound.

[0102] Specifically, the hash table STT is searched according to the RP subtree identifier, the suspension level of the RP subtree identifier is determined, and the corresponding bit of the subtree identifier in the Level_Bitmap is searched. If the corresponding bit is set, it indicates that there is an AP covering the RP, and the verification result is Invalid; if the corresponding bit is not set, the verification result is NotFound;

[0103] In a specific embodiment, a threshold can be set for the hanging layer. If the hanging layer of the RP subtree identifier is found to exceed the hanging layer threshold, check whether there is an AP covering the RP in the hash table STT. If the bit at the corresponding position in the STT is set, return Invalid; if not, backtrack until the hanging layer of the RP subtree identifier is within the threshold.

[0104] In real life, ROA data may contain some data with a large ROA.maxlen - ROA.masklen value. This means that within the allowed prefix length range, the number of subnet mask bits that can be added to the ROA record is large, and the number of IP addresses covered is also large. This type of ROA is referred to as a wide ROA in this invention. Tree-bitmap-based ROA encoding schemes cannot currently process this type of ROA data. Therefore, this invention designs a hash table, Wide Array, to store wide ROA data.

[0105] The insertion of Wide ROA requires calculating the ROA subtree identifier based on the root node AP of the ROA address block, then finding the corresponding table entry in the WideArray hash table using the ROA subtree identifier ID as the key, and storing the ROA in the dynamic array contained in the table entry.

[0106] During verification, if the SOT misses, the STT and WideArray need to be searched separately according to the RP's subtree identifier ID. However, the search for the Wide Array introduces additional hash lookups, which reduces the verification speed.

[0107] To address this issue, when a wide ROA is inserted into a wide array, the STT is searched based on the wide ROA's subtree identifier ID. A wide flag is added to the corresponding subtree bitmap to indicate the existence of a corresponding wide ROA under that subtree identifier. This allows searches for the STT to determine whether to search the wide array based on the wide flag in the search results, reducing unnecessary searches.

[0108] like Figure 6 The ROA <202.127.16.0 / 20,28,AS X> shown covers too many IP addresses and can only be stored in the hash table Wide Array. This data is stored in the dynamic array contained in the hash table Wide Array. A wide flag is added to the position with ID 1878001 in the hash table STT. That is, its bitmap is 00000001, indicating that a corresponding wide ROA exists under this ID.

[0109] In a preferred embodiment, if the ROA data includes wide ROA data, the route origin verification method may be:

[0110] 1. Calculate the corresponding RP subtree identifier based on the routing prefix;

[0111] 2. Search the hash table SOT based on the RP subtree identifier and the originating AS number to obtain the corresponding subtree bitmap. Determine whether the corresponding position in the subtree bitmap is marked based on the routing prefix RP. If it is marked, it means that there is an AP (authorized prefix) that is the same as the RP (routing prefix), and the declaration is valid.

[0112] 3. If it is not marked, there is no AP and RP that are the same:

[0113] If the hanging layer of the ID to be searched is less than or equal to 20:

[0114] Directly search for the corresponding bit of the ID in Level_Bitmap. If the corresponding bit is 1, it means that there is an AP covering the RP, and the verification result is Invalid. If the corresponding bit is 0, the verification result is NotFound.

[0115] At the same time, check the verification result of Wide_Array. If the result of Wide_Array is Valid, return Valid directly. If the verification result of Wide_Array or Level_Bitmap is Invalid, return Valid. Otherwise, return NotFound.

[0116] If the hanging layer of the ID to be searched is greater than 20:

[0117] Check if there is an AP covering the RP in the hash table STT. If the corresponding bit in the STT is 1, return Invalid. If not, backtrack upward. Each time backtracking, check if the wide flag in the STT is 1.

[0118] Determine whether to search for Wide Array based on the wide flag in the search results:

[0119] (1) If wide flag is 1, check whether the AP corresponding to Wide_Array matches. If it matches, return Valid directly; otherwise, go to step (2);

[0120] (2) If the bit at the corresponding position in the STT is 1, the verification result is Invalid and the backtracking continues; otherwise, the verification result is NotFound and the backtracking continues;

[0121] The above backtracking process continues until the ID is within 20 layers of the suspension layer.

[0122] If the ID's hanging level is less than or equal to 20, the corresponding bit in the Level_Bitmap for that ID is directly searched. If the corresponding bit is 1, it indicates that an AP covering the RP exists, and the verification result is Invalid. If the corresponding bit is 0, the verification result is NotFound. The Wide_Array verification result is also checked. If the Wide_Array result is Valid, the function returns Valid. If either the Wide_Array or Level_Bitmap verification result is Invalid, the function returns Valid. Otherwise, the function returns NotFound.

[0123] This invention significantly outperforms existing prefix tree-based route origin verification schemes in terms of verification speed and significantly reduces storage overhead. Furthermore, for routing messages with a valid verification result, the verification process of this invention requires only a single hash operation. In the future, with the large-scale deployment of RPKI, the proportion of valid ROV results will continue to rise, and the advantages of this invention will become even more pronounced.

Claims

1. A method for verifying the origin of a route based on a tree bitmap, characterized in that: include: The router receives the BGP advertisement, which includes the IP prefix and the originating AS number; Calculate the RP subtree identifier ID based on the IP prefix; Search the hash table SOT according to the subtree identifier of the RP and the origin AS number, and determine whether the corresponding position in the corresponding subtree bitmap is marked. If it is marked, the declaration is Valid; wherein, in the hash table SOT, the key is a joint key composed of the ROA subtree identifier and its origin AS number, and the value is the subtree bitmap of the ROA; If the declaration is not Valid, the hash table STT is searched according to the subtree identifier of the RP to determine whether there is an AP covering the RP. If the bit at the corresponding position in the STT is set, Invalid is returned; if not, backtrack upward until an AP covering the RP is found or the root node is reached. In the hash table STT, the key is the ROA subtree identifier, and the value is the result of OR operation of the subtree bitmaps of all ROAs under the ROA subtree identifier; The AP is an authorized prefix, the RP is an IP prefix announced by the BGP, the RP subtree identifier is a unique identifier of a subtree where the BGP announced IP prefix is ​​located, and the ROA subtree identifier is a unique identifier of each subtree of the authorized prefix tree.

2. The method for verifying the origin of a route according to claim 1, characterized in that: Also includes: Check whether the RP's subtree identifier ID is in the specified hanging layer of the authorized prefix tree. If it is in the specified hanging layer, search for the corresponding bit of the RP's subtree identifier in Level_Bitmap. If the corresponding bit is set, it means that there is an AP covering the RP. In this case, the verification result is Invalid. If the corresponding bit is not set, the verification result is NotFound. The Level_Bitmap array is used to store all prefixes covered by the AP within the specified suspension layer.

3. The method for verifying the origin of a route according to claim 1, characterized in that: The route origin verification method performs verification at the AP granularity, so a verification rule based on the authorized prefix is ​​designed: If there is no AP covering the RP, the corresponding verification result is NotFound; If there is an AP that is the same as the RP, and the origin AS of the AP is the same as the RO, the corresponding verification result is Valid; If at least one AP covers the RP, but no AP has the same AS as the RO, or no AP has the same AS as the RP, the corresponding verification result is Invalid.

4. The method for verifying the origin of a route according to claim 1, characterized in that: It also includes the maintenance of routing origin authorization information based on the tree bitmap: The routing origin authorization information maintenance based on the tree bitmap mainly includes two operations: deletion and insertion; The insert operation is mainly responsible for inserting the received new ROA data and returning whether the insert operation is successful; The revocation operation is mainly responsible for revoking the invalid ROA data and returning whether the revocation operation is successful.

5. The method for verifying the origin of a route according to claim 4, characterized in that: The insert operation includes: For a ROA based on a tree bitmap, the insertion process includes two steps: inserting into the hash table SOT and inserting into the hash table STT. The hash table SOT insertion needs to first search according to the ROA subtree identifier and its corresponding origin AS number. If a hit is found, and the hash table SOT [subtree identifier + origin AS number] & Bitmap is greater than 0, it means that an AP is repeatedly declared. At this time, the number of references to the AP is additionally recorded, and then the Bitmap is inserted into the hash table SOT; The hash table STT insertion needs to first search the hash table SOT according to the ROA subtree identifier and its corresponding origin AS number. If a hit is found, and the hash table SOT [subtree identifier + origin AS number] & Bitmap is greater than 0, it means that an AP is repeatedly declared. At this time, the number of references to the AP is additionally recorded, and then the Bitmap is inserted into the hash table STT; For a maxLength-based ROA, first split it into several subtrees according to the hanging layer. After encoding these subtrees in a tree-bitmap-based manner, search based on the ROA subtree identifier and its corresponding origin AS number. If a hit is found and the hash table SOT[subtree identifier + origin AS number]&Bitmap is greater than 0, the number of references to the AP is additionally recorded, and then the Bitmap is inserted into the hash tables SOT and STT.

6. The method for verifying the origin of a route according to claim 4, characterized in that: The destruction operation includes: For a ROA based on a tree bitmap, the revocation process includes two steps: revocation of the hash table SOT and revocation of the hash table STT. The revocation of the hash table SOT requires first searching the hash table SOT according to the ROA subtree identifier and its corresponding origin AS number. If a match is found, the corresponding reference count needs to be updated first, and then it needs to be revoked from the hash table SOT. The hash table STT revocation needs to first search the hash table SOT according to the ROA subtree identifier and its corresponding origin AS number. If a hit is found, the corresponding reference count needs to be updated first, and then it is revoked from the hash table STT; For a maxLength-based ROA, it is necessary to first split it and divide the ROA into several subtrees according to the hanging layer. After encoding these subtrees in a tree bitmap-based ROA manner, the hash table SOT is searched according to the ROA subtree identifier and its corresponding origin AS number. If a hit is found, the corresponding reference count needs to be updated first, and then it is revoked from the hash table SOT and STT.

7. The method for verifying the origin of a route according to claim 6, characterized in that: Also includes: If an AP is authorized by multiple ROAs during the ROA data insertion process, this situation is written into the hash table Announcement_counter, and the number of ROAs authorized to the AP is recorded. When performing the revocation operation, it is determined whether the corresponding bit in the hash table SOT / STT can be directly set to 0 based on the reference count situation. The hash table Announcement_counter is a reference counter of the SOT and the STT, whose key is the ROA subtree identifier and value is a reference count array, which is used to count for each AP to avoid revoking all ROA data whose RP is covered but the AS number is not matched during the revocation operation.

8. The method for verifying the origin of a route according to claim 4, characterized in that: The insert operation further includes: Calculate the ROA subtree identifier based on the authorized prefix tree root node of the ROA address block, then use the subtree identifier as the key to find the corresponding entry in the WideArray hash table, and store the ROA in the dynamic array contained in the entry; The hash table Wide Array is used to store wide ROA data.

9. The method for verifying the origin of a route according to claim 4, characterized in that: The insert operation further includes: When the wide ROA is inserted into the Wide Array, the hash table STT is searched according to the subtree identifier of the wide ROA, and a wide Flag mark is added to the corresponding subtree bitmap to indicate that a corresponding wide ROA exists under the subtree identifier.

Citation Information

Cited By

  • Construction method and device of prefix tree, routing entry searching method and device and electronic equipment

    CN119363659A