WO2013078644A1 - Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage - Google Patents

Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage Download PDF

Info

Publication number
WO2013078644A1
WO2013078644A1 PCT/CN2011/083242 CN2011083242W WO2013078644A1 WO 2013078644 A1 WO2013078644 A1 WO 2013078644A1 CN 2011083242 W CN2011083242 W CN 2011083242W WO 2013078644 A1 WO2013078644 A1 WO 2013078644A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
small tree
tree
address
storage space
Prior art date
Application number
PCT/CN2011/083242
Other languages
English (en)
Chinese (zh)
Inventor
胡睿
郑远明
翟素平
王小忠
龚钧
陈洪飞
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2011/083242 priority Critical patent/WO2013078644A1/fr
Priority to CN201180002985.6A priority patent/CN103404092B/zh
Publication of WO2013078644A1 publication Critical patent/WO2013078644A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation
    • H04L45/484Routing tree calculation using multiple routing trees

Definitions

  • the present invention relates to a network communication technology, and in particular, to a route prefix storage method, a device, and a route address searching method and apparatus. Background technique
  • CIDR Classless Inter-Domain Routing
  • the CIDR avoids the excessive exhaustion of the network address and the rapid expansion of the routing entries of the backbone routers, but at the same time, the length of the network address prefix can be any value, and the longest prefix match search must be performed when performing route lookup.
  • routing table lookup algorithms are weighed in the following three aspects: 1, the routing table query speed, which is mainly determined by the number of accesses to the memory; 2, the memory capacity required by the routing table; 3, insert or delete The difficulty of routing entries.
  • the most promising method in the prior art is to classify the data structure storing the route prefix, the vertices of the small tree (referred to as lifting nodes) are placed in the big tree, and the small tree adopts the path compression tree structure.
  • the path compression tree all route prefixes are stored at its leaf nodes.
  • N route prefixes with N leaf nodes and N-1 internal nodes.
  • the path compression tree allows each internal node to contain a "bit position" field, which is used to indicate the bit position corresponding to the branch node below the node, that is, the number of consecutively skipped bits and the value of the skipped bit.
  • the path compression tree compresses the redundant branch chain to a node.
  • the maximum height of the small tree is limited to a fixed value h, and the value of h is related to the specific hardware environment.
  • the small tree is split, and the split small tree vertex is placed in the large tree.
  • Delete In addition to the entry process, the small trees can be merged according to the merged height not greater than h.
  • the specific implementation method of the big tree is not limited, for example: Range Match, B-tree, TCAM, etc., which method can be used depending on the specific hardware implementation. This method has certain advantages in query speed, storage capacity, and update of routing entries. Therefore, it is a promising route storage and lookup scheme.
  • the present invention provides a route prefix storage method, apparatus, and routing address search method and apparatus for improving the routing capacity of a sparse tree.
  • An aspect of the present invention provides a method for storing a route prefix, including:
  • Locating location domain information for each node of each small tree the location domain information including a path length and a path of a parent node of the node to the node, a route identifier identifying whether the node has a next hop address, and Identifying whether the node has a child node identifier of the child node;
  • the location domain information of each node of each small tree and each small tree are sequentially pointed to the first address of the address storage space of all the next hop addresses corresponding to the routing prefix continuously.
  • the pointer is stored in the small tree storage space corresponding to each small tree.
  • An aspect of the present invention provides a route prefix storage device, including:
  • a small tree partitioning module configured to establish a path compression tree according to the route prefix to be stored, and divide the path compression tree into one or more small trees according to the size of the small tree storage space, where each small tree includes multiple nodes ;
  • An information setting module configured to set location domain information for each node of each small tree, where the location domain information includes a path length and a path of a parent node of the node to the node, and whether the node has a next a route identifier of the hop address and a child node identifier that identifies whether the node has a child node;
  • a storage module configured to sequentially follow the order of the number of layers of the small trees, and sequentially all the sections of each small tree
  • the location domain information of the point and the pointer of each small tree to the first address of the address storage space of all the next hop addresses corresponding to the route prefix are stored in the small tree storage space corresponding to each small tree.
  • Another aspect of the present invention provides a routing address searching method, including:
  • the location domain information includes a path length and a path of the parent node of the node to the node, a route identifier that identifies whether the node has a next hop address, and a child node identifier that identifies whether the node has a child node;
  • the pointer to the first address of the address storage space contiguously storing the next hop address and the longest matching node matched to the node storing the next hop address in the small tree storage space of the matching longest matching node are stored.
  • the location of the next hop address of the route prefix is obtained from the address storage space in which the next hop address is continuously stored.
  • Another aspect of the present invention provides a routing address searching apparatus, including:
  • a search module configured to start, according to the layer sequence of the small tree, the first node of the first layer of the small tree, and the route to be searched according to the location domain information of each node stored in the small tree storage space corresponding to each layer of the small tree
  • the prefix field performs a matching search
  • the location domain information includes a path length and a path of the parent node of the node to the node, a route identifier that identifies whether the node has a next hop address, and a flag indicating whether the node has a child node.
  • Child node identifier Child node identifier
  • An obtaining module configured to match, to the longest prefix node, the pointer and the matching of the first address of the address storage space that continuously stores the next hop address in the small tree storage space of the longest prefix node that is matched to the storage The location of the longest prefix node to which the next hop address of the route prefix is obtained from the address storage space in which the next hop address is continuously stored.
  • a method and a device for storing a route prefix provided by an aspect of the present invention, by storing a route identifier that identifies whether a node has a next hop address, and not storing the next hop address of the node directly, the occupied storage space is significantly reduced, which is beneficial to Increase the number of nodes stored in the small tree storage space, increase the number of routing prefixes corresponding to the small trees, and thus improve the routing capacity of the entire large tree, especially for some sparse large trees, The routing capacity of the tree is more effective.
  • the routing address searching method and device provided by another aspect of the present invention cooperate with the routing prefix storage method and apparatus provided by the embodiment of the present invention, according to the layer sequence of the small tree, according to the small tree of each layer
  • the location domain information of each node in the corresponding small tree storage space is searched for the route prefix to be searched, because the next hop address corresponding to the node is not stored in each small tree storage space, but the storage node has the next hop address.
  • the route identifier increases the number of nodes stored in each small tree storage space, so that one search can find more bits, which improves the search speed and efficiency.
  • 1A is a flowchart of a method for storing a route prefix according to an embodiment of the present invention
  • FIG. 1B is a schematic structural diagram of a path compression tree established by a route prefix and a divided small tree according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for storing a route prefix according to another embodiment of the present invention.
  • FIG. 3 is a flowchart of a routing address searching method according to an embodiment of the present invention.
  • FIG. 4A is a schematic structural diagram of a route prefix storage device according to an embodiment of the present invention
  • FIG. 4B is a schematic structural diagram of a route prefix storage device according to another embodiment of the present invention
  • FIG. 5 is a schematic diagram of routing address search according to an embodiment of the present invention
  • Schematic diagram of the structure of the device Schematic diagram of the structure of the device. detailed description
  • FIG. 1 is a flowchart of a method for storing a route prefix according to an embodiment of the present invention. As shown in FIG. 1A, the storage method of this embodiment includes:
  • Step 101 Establish a path compression tree according to the route prefix to be stored, and divide the path compression tree into one or more small trees according to the size of the small tree storage space, and each small tree includes multiple nodes.
  • the path is first established according to the route prefix.
  • Path Compressed Trie that is, according to whether each bit in the route prefix is 0 or 1, the path branches to form a path compression tree.
  • the established path compression tree is a big tree.
  • the size of the fixed storage space on the hardware device for example, 128 bits is a fixed storage space
  • the established path compression tree is divided into one or more small trees.
  • the information about each small tree is stored in a fixed size storage space.
  • a storage space of a fixed size is referred to as a small tree storage space, which means that each small tree storage space corresponds to a small tree.
  • a path compression tree is established according to the route prefixes, and the established path compression tree is divided into three small trees, and the division result is shown in FIG. 1B.
  • the three small trees are small tree 1, small tree 2 and small tree 3.
  • Each small tree consists of multiple nodes.
  • the top nodes of the small tree 2 and the small tree 3 are child nodes of a certain node in the small tree 1.
  • the divided small trees can be layered, and the parent nodes of the top nodes are from the small trees of the small trees in the same layer as one layer. Taking FIG.
  • the small tree 1 is the first layer, and the parent nodes of the top nodes of the small tree 2 and the small tree 3 are all from the small tree 1, so the small tree 2 and the small tree 3 are the second layer.
  • the route prefix included in Figure 1B is shown in Table 1.
  • Step 102 Set location domain information for each node of each small tree, where the location domain information includes a path length and a path of the parent node of the node to the node, and a route identifier that identifies whether the node has a next hop address. Identifies whether the node has a child node ID of the child node.
  • the location domain information of each node includes: the path length and path, the identifier of the parent node of the node to the node Whether the node has a route identifier of the next hop address and a child node identifier that identifies whether the node has a child node.
  • Each node corresponds to a route prefix.
  • the route prefix may have a next hop address or a next hop address. Therefore, in this embodiment, the route identifier is used to indicate whether the node has a next hop address.
  • the route identifier can be encoded by using 1 bit. If the route prefix corresponding to the node has a next hop address, the route identifier is represented by 1 (or the route identifier is 1); if the route prefix corresponding to the node If there is no next hop address, the route ID is represented by 0 (or the route ID is 0). For another example, the route identifier may be encoded by using 1 bit.
  • the route identifier is represented by 0 (or the route identifier takes a value of 0); if the route corresponding to the node If the prefix does not have a next hop address, the route ID is represented by 1 (or the route ID is 1).
  • the route identifier is encoded by using 2 bits.
  • the route identifier is represented by 01 (or the route identifier is 01); if the route prefix corresponding to the node is not One-hop address, the route identifier is represented by 00 (or the route identifier takes the value 00).
  • the use of "01" and "00" for route IDs is just an example and can be other values.
  • the black node represents the node with the next hop address, and the hollow node represents the node without the next hop address.
  • this embodiment does not directly store the next hop address corresponding to each node, but stores a route identifier.
  • the routing identifier of this embodiment is generally smaller than the next hop address, so the storage space occupied by the small hop is relatively small, which increases the number of small trees that can be stored in the small tree storage space, thereby improving the storage capacity of the entire large tree.
  • each node has a maximum of 2 child nodes, which are respectively recorded as the left child node and the right child node.
  • a node may have only a left child node, or only a right child node, or any child node, or both a left child node and a right child node.
  • the child node identifier is used to identify the case where the node has child nodes.
  • the child node identification can be encoded using 2 bits.
  • One way to encode the child node identifier using 2 bits is: If the node has no child nodes, the child node identifier is represented by 00; if the node has only one left child node, the child node identifier is represented by 10; if the node has only one right Child node, child node ID is 01; if node is There are left child nodes and right child nodes, and the child node identifier is represented by 11.
  • Another way to encode the child node identifier using 2 bits is: If the node has no child nodes, the child node identifier is represented by 11; if the node has only one left child node, the child node identifier is represented by 10; if the node has only one node The right child node, the child node identifier uses 01; if the node has both the left child node and the right child node, the child node identifier is represented by 00.
  • This embodiment uses the child node identifier to identify the child node of a node, and does not use the pointer pointer to identify it as in the prior art.
  • the storage child node identifier has the advantage of being simple and easy to implement compared with the pointer.
  • the path length and path of the node's parent node to that node can be directly represented by its actual value.
  • Step 103 sequentially, in order of the number of layers of the divided small trees, sequentially, the location domain information of each node of each small tree and each small tree point to the address storage space of all next hop addresses corresponding to the route prefix continuously.
  • the pointer of the address is stored in the small tree storage space corresponding to each small tree.
  • the information about each tree is sequentially stored in each tree.
  • the small tree corresponds to the small tree storage space.
  • the information about each small tree mainly includes: location domain information of all the nodes in the small tree and the address storage space of the next hop address corresponding to the route prefix to be stored in the tree. Pointer to the address. That is, for a small tree, the location information of all the nodes in the small tree and the small tree point to the first address of the address storage space of all the next hop addresses corresponding to the route prefix to be stored continuously.
  • the pointers are stored in the small tree storage space corresponding to the small tree.
  • the location domain information of each node is used to perform lookup matching with the route prefix when performing route prefix lookup.
  • the pointer to the first address of the address storage space is used to find the node with the longest prefix matching in the route prefix searching process, and obtain the next node of the node with the longest prefix matching. Jump address.
  • the occupied storage space is significantly reduced, which is beneficial to improving storage of the small tree storage space.
  • the number of nodes increases the number of route prefixes corresponding to the small tree, thereby increasing the routing capacity of the entire tree.
  • this embodiment improves the routing capacity of the entire tree by increasing the number of routing prefixes corresponding to each small tree.
  • FIG. 2 is a flowchart of a method for storing a route prefix according to another embodiment of the present invention. As shown in FIG. 2, the storage method of this embodiment includes:
  • Step 201 Establish a path compression tree according to the route prefix to be stored, and divide the path compression tree into one or more small trees according to the size of the small tree storage space, and each small tree includes multiple nodes.
  • the execution body of this embodiment may be a route prefix storage device such as a router or a switch. To simplify the description, the route prefix storage will be omitted later.
  • This step 201 can be referred to the description of step 101.
  • Step 202 Determine whether the number of layers of the divided small tree is less than or equal to a preset layer threshold; if the determination result is yes, go to step 203; if the judgment result is no, go to step 206.
  • the path compression tree when the number of layers of the small tree divided by the path compression tree is greater than a certain value, it indicates that the path compression tree is dense; if the number of layers of the small tree divided by the path compression tree is less than or equal to the value, the path compression tree is indicated. More sparse.
  • This embodiment defines this value as the layer number threshold.
  • the size of the layer threshold depends on the storage capacity of the route prefix storage device. For example, for a route prefix storage device with a small tree storage space of 128 bits, the corresponding layer threshold is generally 3 layers.
  • This embodiment mainly solves the problem that the path compression tree is sparse, and solves the problem that the path compression tree cannot increase the overall capacity due to the limitation of the number of small trees in the sparse case.
  • the path compression tree After the small tree is divided, it is determined whether the path compressed tree established according to the route prefix to be stored is sparse by judging the number of layers of the divided small trees. As shown in FIG. 1B, the path compression tree divides three small trees into two layers. If the number of layers is 3, the path compression tree shown in Figure 1B is sparse.
  • Step 203 Set location domain information for each node of each small tree, where the location domain information includes a path length and a path of the parent node of the node to the node, and a route identifier that identifies whether the node has a next hop address. Identifies whether the node has a child node ID of the child node. When it is judged that the path compression tree is sparse, the location domain information is set for each node of each small tree.
  • the location domain information of each node includes: a path length and a path of the parent node of the node to the node, a route identifier that identifies whether the node has a next hop address, and a child node identifier that identifies whether the node has a child node.
  • Each of the nodes corresponds to a route prefix.
  • the route prefix may have a next hop address or a next hop address. Therefore, in this embodiment, the route identifier is used to indicate whether the node has a next if mega address.
  • each node has a maximum of 2 child nodes, which are respectively recorded as the left child node and the right child node.
  • a node may have only a left child node, or only a right child node, or any child node, or both a left child node and a right child node.
  • the child node identification is used to identify the case where the node has child nodes.
  • Step 204 sequentially, in order of the number of layers of the divided small trees, sequentially, the location domain information of all nodes of each small tree and each small tree point to the address storage space of all next hop addresses corresponding to the route prefix continuously.
  • the pointer of the address is stored in the small tree storage space corresponding to each small tree.
  • the information about each tree is sequentially stored in each tree.
  • the small tree corresponds to the small tree storage space.
  • the related information of each small tree mainly includes: location domain information of all nodes in the small tree, and the small tree points to consecutively store addresses of all next hop addresses corresponding to the route prefix to be stored.
  • the pointer is stored in the small tree storage space corresponding to the small tree, and the current layer small tree needs to point to the pointer of the first address of the small tree storage space corresponding to the next small tree, and is stored in the small layer corresponding to the current layer small tree. Tree storage space.
  • the related information of the small trees included in each layer is continuously stored.
  • This storage mode can save storage space and facilitate routing address lookup. Since the size of the small tree storage space corresponding to each small tree is fixed, when the routing address is searched, the current layer small tree points to the pointer of the first address of the small tree storage space corresponding to the next small tree, and according to Small tree storage space The size of the address offset can find the d, tree storage space corresponding to each small tree in the next layer. In addition, the current layer small tree points to the pointer of the first address of the small tree storage space corresponding to the next small tree and the size of the small tree storage space, and the child node and the child node corresponding to the parent node in the next layer may also be found. Small tree storage space.
  • the location domain information of each node is used to perform lookup matching with the route prefix when performing route prefix lookup.
  • the pointer to the first address of the address storage space is used to obtain the next hop address of the node matching the longest prefix when the node with the longest prefix matching is found in the route prefix lookup process.
  • Step 205 Store all next hop addresses corresponding to the route prefix into the address storage space, and end the storage operation.
  • next hop addresses corresponding to the route prefix are continuously stored to the address. In storage space. This way of storing the next hop address continuously saves storage space.
  • Step 206 Store according to the storage manner of the existing path compression tree.
  • the storage method of the existing path compression tree may be stored.
  • the storage mode of the existing path compression tree is not described in detail in this embodiment.
  • the next hop address of the node is not directly stored by storing whether the node has the route identifier of the next hop address.
  • the occupied storage space is significantly reduced, which is beneficial to increase the number of nodes stored in the small tree storage space, improve the compression ratio of the small tree, and increase the number of routing prefixes corresponding to the small tree, thereby improving the entire tree.
  • the routing capacity especially for some sparse trees, is more effective in improving the routing capacity of the entire tree.
  • all the next hop addresses corresponding to the address prefix are separately stored and continuously stored, which is beneficial to save storage space and improve storage space utilization.
  • FIG. 3 is a flowchart of a method for searching for a route address according to an embodiment of the present invention. As shown in FIG. 3, the searching method in this embodiment includes:
  • Step 301 According to the layer sequence of the small tree, starting from the first node of the first layer of the small tree, according to the location domain information of each node stored in the small tree storage space corresponding to each layer of the small tree, the method is to be searched.
  • the route prefix performs a matching search;
  • the location domain information includes: a path length and a path of the parent node of the node to the node, a route identifier that identifies whether the node has a next hop address, and a child that identifies whether the node has a child node Node ID.
  • the execution subject of this embodiment is a routing address searching device, such as a router or a switch. To simplify the description, the routing address lookup device will be omitted.
  • the routing address searching method in this embodiment is adapted to the routing prefix storage method provided in the foregoing embodiment.
  • the routing address searching method in this embodiment is implemented on the basis of the routing prefix storage method provided in the foregoing embodiment.
  • the small tree storage space is a storage space with a fixed size in the routing space.
  • the first node of the first layer of the small tree (only one small tree) stored in the routing space starts, according to each layer 'J
  • the tree corresponding to the 'j, the location domain information of each node stored in the tree storage space is matched and searched for the route prefix to be searched.
  • the location domain information of each node includes: a path length and a path of the parent node of the node to the node, a route identifier that identifies whether the node has a next hop address, and a child node identifier that identifies whether the node has a child node.
  • the process of performing matching matching on the route prefix to be searched according to the location domain information of each node in the small tree storage space corresponding to each small tree includes:
  • the search for the route prefix is ended. If the judgment result is consistent, indicating that the matching is correct, it continues to determine whether the current node has a next hop address according to the routing identifier of the current node stored in the small tree storage space where the current node is located. For example, if the route ID of the current node is not 1, it indicates that the current node has a next hop address.
  • the route ID of the current node is 0, it indicates that the current node does not have a next hop address. If the current node has a next hop address, the location of the current node is recorded and the next hop address is identified. The location of the current node is the part of the route prefix that is currently matched.
  • the child node identifier of the current node stored in the space determines whether the current node has child nodes. For example, if the child node ID of the current node is 00, the current node has no child nodes; if the child node ID of the current node is 10, the current node has only the left child node; if the child node of the current node is queried The identifier is 01, indicating that the current node has only the right child node; if the child node identifier of the current node is 1 1 , it indicates that the current node has both the left child node and the right child node.
  • the search for the route prefix is ended. If the current child has child nodes, continue to query the child nodes. Specifically, if the current node has only the left child node, the left child node is directly queried; if the current node has only the right child node, the right child node is directly queried; if the current child node has both the left child node and the right child node Then, the left child node may be queried first, and when the left child node fails to query, the right child node is queried; or the right child node may be queried first, and when the right child node fails to query, the left child node is queried.
  • This embodiment performs matching according to the longest prefix matching principle.
  • Step 302 Determine whether the route prefix matches the longest prefix node. If the judgment result is yes, go to step 303. If the judgment result is no, go to step 304.
  • the longest prefix node is a node with a next hop address, and the matching length of the longest prefix node is relative.
  • step 303 is performed; if the node with the next hop address is not matched, indicating that the matching fails, step 304 is performed, that is, the operation ends.
  • Step 303 According to the location of the first address of the address storage space that points to the consecutive storage of the next hop address and the location of the matched longest prefix node in the small tree storage space of the longest prefix node that is matched, from the continuous storage to the next The next hop address of the route prefix is obtained in the address storage space of the hop address, and step 304 is performed.
  • the continuous address is found according to the pointer to the first address of the address storage space of the longest prefix node that stores the matching last storage address of the next hop address.
  • the relative position of the next hop address corresponding to the longest prefix matching node in the address storage space is determined according to the location of the longest prefix matching node, thereby obtaining the next hop address.
  • Step 304 ending the operation.
  • the route prefix to be searched according to the location domain information of each node in the small tree storage space corresponding to each layer of the small tree is performed according to the layer sequence of the small tree. Find. Since the next hop address corresponding to the node is not stored in each small tree storage space, but the storage node has the route identifier of the next hop address, the node information stored in each small tree storage space is increased, so that once Finding can find more bits, improving the speed and efficiency of the search.
  • FIG. 4 is a schematic structural diagram of a route prefix storage apparatus according to an embodiment of the present invention. As shown in FIG. 4A, the apparatus of this embodiment includes: a small tree dividing module 41, an information setting module 42, and a storage module 43.
  • the small tree division module 41 is configured to establish a path compression tree according to the route prefix to be stored, and divide the path compression tree into one or more small trees according to the size of the d and the tree storage space, where each tree is j Includes multiple nodes.
  • the information setting module 42 is connected to the small tree dividing module 41, and is configured to set location domain information for each node of each small tree divided by the small tree dividing module 41, where the location domain information includes the parent node of the node to the node.
  • the storage module 43 is connected to the information setting module 42 for sequentially, in order of the number of layers of the divided small trees, sequentially, the location domain information of all the nodes of each small tree and each small tree point to all the corresponding storage prefixes.
  • a pointer to the first address of the address storage space of the one-hop address is stored in the small tree storage space corresponding to each small tree.
  • the function modules of the route prefix storage device in this embodiment can be used to execute the flowchart of the route prefix storage method shown in FIG. 1A.
  • the specific working principle is not described here. For details, refer to the description of the method embodiment.
  • the route prefix storage device of the present embodiment stores the route identifier of the node with the next hop address, and does not directly store the next hop address of the node, and the occupied storage space is significantly reduced, which is beneficial to improving the small tree storage.
  • the number of nodes stored in the space increases the number of route prefixes corresponding to the small tree, thereby increasing the routing capacity of the entire tree.
  • this embodiment improves the routing capacity of the entire tree by increasing the number of routing prefixes corresponding to each small tree.
  • FIG. 4B is a schematic structural diagram of a route prefix storage apparatus according to another embodiment of the present invention. Real The embodiment is implemented based on the embodiment shown in FIG. 4A.
  • the information setting module 42 of the present embodiment includes: a first setting unit 421, a second setting unit 422, and a third setting unit 423.
  • the first setting unit 421 is connected to the small tree dividing module 41 and the storage module 43 for encoding, for each node, the child node identifier by using 2 bits, if the node has no child nodes, the child The node identifier is represented by 00. If the node has only one left child node, the child node identifier is represented by 10. If the node has only one right child node, the child node identifier is represented by 01, if the node There are both a left child node and a right child node, and the child node identifier is represented by 11.
  • the second setting unit 422 is connected to the small tree dividing module 41 and the storage module 43 for encoding, for each node, the routing identifier by using 1 bit. If the node has a next hop address, the routing identifier Indicated by 1, if the node does not have a next hop address, the routing node is represented by 0.
  • the third setting unit 423 is connected to the small tree dividing module 41 and the storage module 43 for setting a path length and a path of the parent node of the node to the node.
  • the storage module 43 is further configured to continuously store all the next hop addresses corresponding to the routing prefix into the address storage space.
  • the storage module 43 is further configured to point the current layer small tree to the pointer of the first address of the small tree storage space corresponding to the next layer of the small tree, and store the pointer to the small tree storage space corresponding to the current layer small tree.
  • the route prefix storage device of this embodiment further includes: a determining module 44.
  • the determining module 44 is connected to the small tree dividing module 41 and the information setting module 42 for determining whether the number of layers of the divided small tree is determined before the information setting module 42 sets the location domain information for each node of each small tree. If the result of the determination is yes, the trigger information setting module 42 sets the location domain information for each node of each small tree.
  • the routing prefix storage device in this embodiment performs the densification judgment on the path compression tree.
  • the storage node identifies whether there is a route identifier of the next hop address, and does not directly store the next node of the node.
  • the hop address, the occupied storage space is significantly reduced, which is beneficial to increase the number of nodes stored in the small tree storage space, improve the compression rate of the small tree, and increase the number of routing prefixes corresponding to the small tree, thereby improving the number of routing prefixes.
  • the routing capacity of the entire tree especially for some sparse For the big tree, the improvement of the routing capacity of the whole tree is more obvious.
  • the route prefix storage device of the embodiment saves the storage space and improves the utilization of the storage space by separately storing and continuously storing all the next hop addresses corresponding to the address prefix.
  • FIG. 5 is a schematic structural diagram of a routing address searching apparatus according to an embodiment of the present invention. As shown in FIG. 5, the routing address searching apparatus of this embodiment includes: a searching module 51 and an obtaining module 52.
  • the searching module 51 is configured to, according to the layer sequence of the small tree, start from the first node of the first layer of the small tree, and treat the location domain information of each node stored in the small tree storage space corresponding to each layer of the small tree.
  • the searched route prefix performs a matching search; the location domain information includes a path length and a path of the parent node of the node to the node, a route identifier that identifies whether the node has a next hop address, and a flag indicating whether the node has a child node. Child node ID.
  • the obtaining module 52 is connected to the searching module 51, and is configured to match the longest prefix node in the searching module 51, and according to the address storage space of the small tree storage space storing the matched longest prefix node to the consecutive storage of the next hop address
  • the pointer of the first address and the location of the longest prefix node that is matched are obtained, and the next hop address of the route prefix is obtained from the address storage space in which the next hop address is continuously stored.
  • the searching module 51 performs a matching search process on the routing prefix to be searched according to the location domain information of each node stored in the small tree storage space.
  • the searching module 51 determines that the parent node of the current node stored in the small tree storage space is current. Whether the path of the node is consistent with the current matching part of the routing prefix; if they are consistent, the searching module 51 determines whether the current node has a next hop address according to the routing identifier of the current node in the small tree storage space, if the current node has a next The hop address records the location of the current node and identifies the next hop address, and determines whether the current node has a child node according to the child node identifier in the small tree storage space.
  • the search for the route prefix ends. If not, the lookup module 51 ends the lookup of the route prefix.
  • the function modules of the routing address lookup module in this embodiment can be used to perform the process of the routing address searching method shown in FIG. 3.
  • the specific working principle is not described here. For details, refer to the description of the method embodiment.
  • the route address locating device of the embodiment is matched with the route prefix storage device provided in the foregoing embodiment, and according to the layer sequence of the small tree, according to the location domain information of each node in the small tree storage space corresponding to each layer of the small tree
  • the discovered route prefix is searched, because each small tree storage space no longer stores the next hop address corresponding to the node but the storage node has the route identifier of the next hop address, and the node stored in each small tree storage space Increased information, so that a search can find more Multi-bit, improved search speed and efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

L'invention concerne un procédé et un dispositif de stockage de préfixe de routage et un procédé et un dispositif de recherche d'adresse de routage, le procédé de stockage consistant à : établir un arbre de compression de chemin conformément à un préfixe de routage à stocker et à diviser l'arbre de compression de chemin en un ou plusieurs sous-arbres ; régler des informations de domaine de position pour chaque nœud de chaque sous-arbre, les informations de domaine de position contenant la longueur de chemin et le chemin allant du nœud parent d'un nœud au nœud, un identificateur de routage identifiant si le nœud a une adresse de bond suivant ou non, et un identificateur de sous-nœud identifiant si le nœud possède un sous-nœud ou non ; conformément à la séquence des couches de sous-arbre divisées, stocker séquentiellement dans l'espace de stockage de sous-arbre de chaque sous-arbre les informations de domaine de position de tous les nœuds de chaque sous-arbre ainsi que le premier pointeur d'adresse de l'espace de stockage d'adresse vers lequel pointe chaque sous-arbre et qui est utilisé pour stocker successivement l'adresse de bond suivant. La solution technique de la présente invention augmente la capacité de routage d'un grand arbre creux.
PCT/CN2011/083242 2011-11-30 2011-11-30 Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage WO2013078644A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/083242 WO2013078644A1 (fr) 2011-11-30 2011-11-30 Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage
CN201180002985.6A CN103404092B (zh) 2011-11-30 2011-11-30 路由前缀存储方法、装置及路由地址查找方法、装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/083242 WO2013078644A1 (fr) 2011-11-30 2011-11-30 Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage

Publications (1)

Publication Number Publication Date
WO2013078644A1 true WO2013078644A1 (fr) 2013-06-06

Family

ID=48534625

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/083242 WO2013078644A1 (fr) 2011-11-30 2011-11-30 Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage

Country Status (2)

Country Link
CN (1) CN103404092B (fr)
WO (1) WO2013078644A1 (fr)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110800008A (zh) * 2019-03-04 2020-02-14 阿里巴巴集团控股有限公司 构建区块链世界状态默克尔帕特里夏字典树子树
CN112527753A (zh) * 2020-12-11 2021-03-19 平安科技(深圳)有限公司 Dns解析记录无损压缩方法、装置、电子设备及存储介质
CN115567444A (zh) * 2022-09-23 2023-01-03 北京香哈网络股份有限公司 一种控制器路由地址查找调用方法及系统

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090942A (zh) * 2014-06-30 2014-10-08 中国电子科技集团公司第三十二研究所 应用于网络处理器中的Trie搜索方法及装置
CN106330716B (zh) * 2015-06-30 2019-12-13 新华三技术有限公司 Ip路由查找方法及装置
CN106330721B (zh) * 2015-06-30 2019-09-17 新华三技术有限公司 Ip路由查找方法及装置
CN111641729B (zh) * 2019-05-23 2021-03-30 北京航空航天大学 一种基于前缀树的域间路径标识前缀冲突检测与分解方法
CN113133052B (zh) * 2020-01-13 2023-01-13 中国移动通信有限公司研究院 路径选择方法、装置及iab基站
CN112134805B (zh) * 2020-09-23 2022-07-08 中国人民解放军陆军工程大学 基于硬件实现的快速路由更新电路结构及更新方法
CN117150086B (zh) * 2023-09-12 2024-03-22 北京云枢创新软件技术有限公司 基于层次结构树的子节点的生成方法、电子设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030236793A1 (en) * 2002-06-19 2003-12-25 Ericsson Inc. Compressed prefix tree structure and method for traversing a compressed prefix tree
CN101459569A (zh) * 2008-12-12 2009-06-17 华为技术有限公司 建立路由索引树的方法、装置和查找路由索引树的方法、装置
CN101645844A (zh) * 2009-08-14 2010-02-10 华为技术有限公司 路由存储、查找的方法及装置
CN102045412A (zh) * 2010-12-28 2011-05-04 赛尔网络有限公司 IPv6地址前缀压缩存储方法及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030236793A1 (en) * 2002-06-19 2003-12-25 Ericsson Inc. Compressed prefix tree structure and method for traversing a compressed prefix tree
CN101459569A (zh) * 2008-12-12 2009-06-17 华为技术有限公司 建立路由索引树的方法、装置和查找路由索引树的方法、装置
CN101645844A (zh) * 2009-08-14 2010-02-10 华为技术有限公司 路由存储、查找的方法及装置
CN102045412A (zh) * 2010-12-28 2011-05-04 赛尔网络有限公司 IPv6地址前缀压缩存储方法及设备

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110800008A (zh) * 2019-03-04 2020-02-14 阿里巴巴集团控股有限公司 构建区块链世界状态默克尔帕特里夏字典树子树
CN110800008B (zh) * 2019-03-04 2023-06-30 创新先进技术有限公司 构建区块链世界状态默克尔帕特里夏字典树子树
CN112527753A (zh) * 2020-12-11 2021-03-19 平安科技(深圳)有限公司 Dns解析记录无损压缩方法、装置、电子设备及存储介质
CN112527753B (zh) * 2020-12-11 2023-05-26 平安科技(深圳)有限公司 Dns解析记录无损压缩方法、装置、电子设备及存储介质
CN115567444A (zh) * 2022-09-23 2023-01-03 北京香哈网络股份有限公司 一种控制器路由地址查找调用方法及系统
CN115567444B (zh) * 2022-09-23 2024-02-27 北京香哈网络股份有限公司 一种控制器路由地址查找调用方法及系统

Also Published As

Publication number Publication date
CN103404092B (zh) 2015-11-25
CN103404092A (zh) 2013-11-20

Similar Documents

Publication Publication Date Title
WO2013078644A1 (fr) Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage
CN102484610B (zh) 路由表建立方法和装置及路由表查找方法和装置
CN103595637B (zh) 基于树与哈希表的内容中心网络结点处理数据方法
CN101594319B (zh) 表项查找方法和装置
US20100058027A1 (en) Method for selecting hash function, method for storing and searching routing table and devices thereof
CN102333036B (zh) 一种实现高速路由查找的方法和系统
US8923298B2 (en) Optimized trie-based address lookup
CN102405622A (zh) 二叉树建立、压缩和查找的方法和装置
CN101110778A (zh) 一种利用默认路由压缩路由转发表的方法
EP2055050A1 (fr) Carte binaire d'arbre dynamique pour consultation et mise a jour ip
WO2015127721A1 (fr) Procédé et appareil de mise en correspondance de de données et support de stockage informatique
WO2011085577A1 (fr) Procédé et dispositif de classification de paquets
WO2018068524A1 (fr) Établissement de table de routage et procédé, dispositif et support d'informations de routage ip
WO2017000893A1 (fr) Recherche de routage ip
CN103051543A (zh) 一种路由前缀的处理、查找、增加及删除方法
CN102045412B (zh) IPv6地址前缀压缩存储方法及设备
WO2009132556A1 (fr) Procédé et appareil de recherche de données
WO2011124030A1 (fr) Procédé et dispositif permettant de stocker une entrée de table de routage
WO2008119242A1 (fr) Méthode de recherche dans un arbre multi-bit de type trie
WO2010054599A1 (fr) Procédé, dispositif et système de stockage de données
CN113315705A (zh) 基于单次哈希布隆过滤器的Flexible IP寻址方法及装置
WO2008028412A1 (fr) Procédé et appareil de routage, et procédé d'enregistrement d'informations de routage
EP3018871B1 (fr) Procédé et appareil de compression de noms de contenus
CN117435912A (zh) 基于网络数据包属性值长短特征的数据包索引与检索方法
CN108566335B (zh) 一种基于NetFlow的网络拓扑生成方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11876754

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11876754

Country of ref document: EP

Kind code of ref document: A1