CN100496019C - A method to quickly search and update IPv6 routing list - Google Patents

A method to quickly search and update IPv6 routing list Download PDF

Info

Publication number
CN100496019C
CN100496019C CNB200510086841XA CN200510086841A CN100496019C CN 100496019 C CN100496019 C CN 100496019C CN B200510086841X A CNB200510086841X A CN B200510086841XA CN 200510086841 A CN200510086841 A CN 200510086841A CN 100496019 C CN100496019 C CN 100496019C
Authority
CN
China
Prior art keywords
prefix
length
list item
node
tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB200510086841XA
Other languages
Chinese (zh)
Other versions
CN1964311A (en
Inventor
孙庆南
鲁士文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
YANTAI HUITONG NETWORK TECHNOLOGY CO., LTD.
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CNB200510086841XA priority Critical patent/CN100496019C/en
Publication of CN1964311A publication Critical patent/CN1964311A/en
Application granted granted Critical
Publication of CN100496019C publication Critical patent/CN100496019C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The related fast lookup and update method for IPv6 route table comprises: using a first-linear index table and a second hash table issued by binary search tree for two-stage lookup; using BMP-tree to recombine prefix relation in data structure, and improving update efficiency. Compared with traditional method or other methods, this invention is more proper to the IPv6 network.

Description

The IPv6 routing table is searched and method for updating fast
Technical field
The present invention relates to technical field of the computer network, particularly a kind ofly realize quick routing table lookup and method for updating based on the IPv6 address.
Background technology
Method for searching route table is the key technology in the router repeater system, and the height of search efficiency has influenced the forward efficiency of router to a great extent.The basic thought of routing table lookup is that a given address key words need find the longest address prefix that mates this address key words in routing table, carry out follow-up processing according to next jumping port numbers of address prefix.With traditional can only finishing searching of the accurate coupling of keyword compared, the difficulty and the complexity of routing table lookup increase greatly.
At present the method for searching route that conducts a research at the IPv4 router is existing a lot, extensive use comprise two big class lookup methods, be respectively the method set based on trie and based on the binary chop of address prefix length.But along with further popularizing of IPv6 network, these method for searching route table have all run into limitation separately.
Lookup method based on trie tree is such, and trie is a kind of tree structure, and it utilizes the value of each bit in the address prefix to construct the branch of tree.A kind of optimization method of trie is multiple-limb trie tree, and it adopts each node of a plurality of bit structure trees in the address prefix, can reduce to search the degree of depth like this, has brought negative influence also.Its subject matter concentrates in the wide selection of step, go on foot roomy, method efficient height, EMS memory occupation is big; Go on foot wide for a short time, method efficient is low, and EMS memory occupation is few.Though people have used various compression methods to attempt to address this problem, but, in the IPv4 network, because address size is few, it is limited to go on foot wide range of choice, this problem also is not outstanding especially, and the network address of IPv6128 position makes its problem highlight, and causes this method to search performance and seriously descends.
Comparatively speaking, in the IPv6 network the reasonable a kind of lookup method of effectiveness of performance based on the binary chop of address prefix length, this method is to grow up on the linear search technique basis based on Hash table.Its basic thought is that routing table is classified according to different prefix lengths, and the prefix that will have equal length is formed a Hash table, and whole like this routing table will be made up of a plurality of Hash tables.According to the length of address key words these Hash tables are carried out binary chop afterwards, directly navigate to the prefix of long coupling according to the Hash lookup method again.Can run into the problem of some details in the implementation process of this method, for example for prefix table 1 *, 00 *, 111 *, if the address key words of searching is 111, at first binary chop 11 *, in 2 Hash table, have only 00 *, do not have 11 *, at this moment need to introduce a mechanism, in 2 Hash tables, add a marker 11 *, this marker is not actual address prefix, is the needs for search procedure.Find 11 *After, to continue to search in the back of prefix table, can find 111 this moment *Though the increase of IPv6 address size is little to the influence of this method, but the update efficiency of this method is relatively poor, because between prefix and the prefix, dependence between prefix and the marker is bigger, when a prefix runs into operation such as interpolation, deletion, renewal, need to change the information of a plurality of prefixes or marker, it is very difficult how finding these prefixes that need change or marker.In addition, these upgrade operation, even by optimizing, and also need be in the set of the whole hash table of reconstruct after a period of time.
Summary of the invention
Technical problem to be solved by this invention is to propose a kind of routing table lookup and update method of the IPv6 of being applicable to network router, particularly when having guaranteed routing table lookup efficient, effectively improves the update efficiency of routing table.This method can be used for searching of IPv6 network router repeater system routing table and upgrade.
The present invention is achieved in that and a kind ofly realizes quick routing table lookup and method for updating based on the IPv6 address, it is characterized in that:
At first set up three kinds of data structures:
(1) linear directory table, each list item correspondence wherein zero, one or more length be equal to or less than 16 address prefix;
(2) (Hash Table List HTL), is stored in all length in the routing table in different Hash (hash) table according to the length classification smaller or equal to 16 prefix, and the set of these hash tables has constituted HTL in Hash table tabulation;
(3) Hash table tabulation (the Binary tree-Hash Table List that organizes based on the binary chop tree, B-HTL), all length in the routing table is stored in the different hash tables according to the length classification greater than 16 prefix, and these hash tables are organized by the binary chop tree and are constituted B-HTL;
After the packet of an IPv6 agreement enters router, take out the high 16bit of destination address, navigate to the corresponding list item of linear directory table as index value, if the flag bit of this list item is 0, next of then directly taking out in the list item jumped port as transmitting port; Otherwise,, in the B-HTL of correspondence, utilize the binary chop tree to search according to canned data in the list item;
Utilize the data of storing among the HTL that the linear directory table is upgraded operation.
Describedly realize quick routing table lookup and method for updating based on the IPv6 address, described linear directory table is fixed as 64k list item, and each list item length is 3 bytes, is divided into 3 parts, wherein high 16bit is a first, is used for representing the pointer of prefix length or sensing B-HTL; An ensuing bit is a flag bit, is used for representing the implication of institute of first memory contents; Third part is last 7bit, represents next jumping routed port of this list item correspondence; The correspondence that the list item of each linear directory table is unique a B-HTL.
Described linear directory table list item first, when being used for representing prefix length, each all puts 1 or put 0 the length of its 16bit; When the length address prefix that is n corresponds to certain linear directory list item, the n position 1 of this list item first, otherwise put 0.
In described linear directory table, carry out when upgrading operation, if the prefix length L that upgrades is smaller or equal to 16, earlier with L position 1 in the list item first, judge subsequently and in being higher than the position of L, whether exist for 1 position, if there is no, then the third part of linear directory table list item is rewritten as the port numbers that will upgrade prefix according to marker bit;
When in described linear directory table, carrying out deletion action, if the prefix length L of deletion smaller or equal to 16, puts 0 with L position in the list item first earlier, judge in the position that is higher than L whether exist for 1 position subsequently, if exist, then in the hash of the corresponding prefix length of HTL table, delete this prefix; If there is no, then in being lower than those of L, search the highest value and be 1 position, and in HTL, search corresponding prefix, linear directory table list item third part is rewritten as the port numbers of the prefix that finds according to this bit position.
Describedly realize quick routing table lookup and method for updating based on the IPv6 address, the operation of carrying out routing table lookup comprises the steps:
The preceding 16bit of 5A, taking-up IPv6 grouping destination address searches corresponding list item as index value in the linear directory table;
If the marker bit of this list item of 5B is 1, carry out 5D;
5C, obtain the output port of this list item correspondence, carry out 5F;
The back 112bit of 5D, taking-up IPv6 grouping destination address;
5E, in the list item of linear directory table, obtain the B-HTL pointer, at the B-HTL of correspondence
Binary chop is carried out in the middle 112bit address, back that utilizes, and obtains corresponding output port;
5F, end.
Each node of the binary chop tree of described B-HTL all points to a hash table; Each list item comprises following components in the hash table:
(1) length is the IPv6 address of 16byte;
(2) length is next jumping port numbers of 7bit;
(3) length is the marker bit of 1bit, be used to represent this list item whether corresponding length greater than 16 address prefix;
(4) whether corresponding length is the marker bit of 1bit, be used to represent this list item marker;
(5) length be 8bit longest matching prefix (Best Matched Prefix, BMP), be used to represent this list item correspondence the prefix length of location the most longways;
(6) length is the marker counter of 16bit, is used to add up the marker quantity that superposes on this list item;
(7) expand pointer points to the root node of a longest match address prefix trees (BMP_tree);
(8) next_level pointer points to the downstream site among the BMP_tree;
(9) same_level pointer points to the brother of node among the BMP_tree.
Described BMP_tree is made up of the list item of hash table among the B-HTL, the unique corresponding BMP_tree of the expand pointer of each list item, each node among the BMP_tree is a prefix with this list item all, and the length according to prefix in the node is provided with the level of this node in BMP_tree from low to high, and the node with same prefix length is in same one deck of BMP_tree; When B-HTL being added, deleting or upgrade operation, search those hash that need change table list items by BMP_tree.
Describedly realize quick routing table lookup and method for updating, when B-HTL is added a prefix P2, carry out following steps based on the IPv6 address:
8A, in B-HTL, search the prefix node P1 of location the most longways of P2;
8B, in the BMP-tree of P1, the traversal all levels is higher than the prefix node of P2, carries out 8C, 8D, 8E respectively;
If the 8C traversal does not finish, carry out 8D so, otherwise, carry out 8F;
If 8D P2 is the prefix of this node, carry out 8E so, otherwise traverse next node, carry out 8C;
8E, from the BMP-tree of P1, take out this node, move among the BMP-tree of P2, traverse next node, carry out 8C;
8F, in B-HTL, add marker for P2;
8G, P2 is added among the BMP-tree of P1;
8H, end.
Describedly realize quick routing table lookup and method for updating, during to prefix P2 of B-HTL deletion, carry out following steps based on the IPv6 address:
9A, in B-HTL, search the prefix node P1 of location the most longways of P2;
9B, in the BMP-tree of P1, the traversal all levels is higher than the prefix node of P2, carries out 9C, 9D, 9E respectively;
If the 9C traversal does not finish, carry out 9D so, otherwise, carry out 9F;
If this node of 9D is the prefix of P2, carry out 9E so, otherwise traverse next node, carry out 9C;
9E, revise this node data structure canned data, traverse next node, carry out 9C;
9F, take out the BMP-tree of P2, incorporate the BMP-tree of P1 into;
The prefix information of 9G, deletion P2;
9H, end.
Among the described B-HTL each hash table corresponding unique address prefix length, among the B-HTL all hash table corresponding an address prefix length of interval; Described binary chop tree makes up in this prefix length interval range, each node of binary chop tree covers the prefix length interval, a part of address of B-HTL, the prefix length of the hash of this node correspondence table is also in this section in the address prefix length of interval, and this part address prefix length of interval is divided into two subintervals, and these two subintervals are respectively to two child nodes about should node; In any one node corresponding address prefix length interval, the hash that option table item quantity is maximum shows the hash table as described arbitrary node correspondence.
Among the described B-HTL each hash table corresponding unique address prefix length, among the B-HTL all hash table corresponding an address prefix length of interval; Described binary chop tree makes up in this prefix length interval range, each node of binary chop tree covers the prefix length interval, a part of address of B-HTL, the prefix length of the hash of this node correspondence table is also in this section in the address prefix length of interval, and this part address prefix length of interval is divided into two subintervals, respectively to two child nodes about should node; In any one node corresponding address prefix length interval, select a hash table, with this hash table the address prefix length of interval is divided into two subintervals, make in first subinterval hash table list item quantity and with second subinterval in hash table list item quantity and the most approaching, then this hash table is shown as the hash of this node correspondence.
The present invention adopts the pattern of two-stage look-up and three kinds of data structures, by the one-level linear directory, with whole address spatial division is 64k part, when having guaranteed original binary chop efficient based on address prefix, the operation of the renewal of routing table each time only need be carried out a inside in 64k address space, and need not to change routing table in other address space, improved the efficient of routing table update and reconstruct.Simultaneously, in data structure B-HTL based on the binary chop of address prefix, increased the data organization mode that is called as BMP_tree, by this data organization mode, reduce the hash table list item of required visit in the routing table update operation, further improved the efficient of routing table update.
Description of drawings
Fig. 1 is an IPv6 address format schematic diagram.
Fig. 2 is the correlation figure of data structure used herein.
Fig. 3 is a linear directory table list item structural representation.
Fig. 4 uses the flow chart that the present invention carries out routing table lookup.
Fig. 5 is a BMP-tree structural representation among the present invention.
Fig. 6 (a) is the flow chart that adds prefix P2 in B-HTL.
Fig. 6 (b) is the flow chart of deletion prefix P2 in B-HTL.
Fig. 7 (a) be in the IPv4 routing table address prefix according to the distribution statistics figure of length.
Fig. 7 (b) be in the IPv6 routing table address prefix according to the distribution statistics figure of length.
Embodiment
Below in conjunction with drawings and Examples, the present invention done further elaborating.
Proposed the global unicast address form scheme that can assemble in RFC2373, RFC2374, this scheme is divided into plurality of sections with the IPv6 address, and wherein preceding 64 is network ID, and back 64 is interface ID.In network ID, mark off some network layers again, distribution is responsible for by different the Internet mechanisms in different subnet address.Therefore, the present invention gets preceding 16 of routing table address prefix, it is the pairing scope of climax aggregation identifier, index value as the one-level linear directory, and make up HTL, form B-HTL according to remaining 112 bit address again, carry out binary search therein, the data structure schematic diagram as shown in Figure 2 as shown in Figure 1.It mainly is divided into three kinds of data structures: linear directory table, HTL and B-HTL.Wherein, B-HTL is made up of one group of hash table, a list item in the corresponding linear directory table of each B-HTL.B-HTL derives from based on the binary chop in address prefix space and sends out data structure employed, only in its hash table address stored prefix preceding 16 all identical, all be the index value of corresponding linear directory table list item.
The structure of each list item of linear directory table as shown in Figure 3, it has two kinds of forms:
When marker bit is 0, be illustrated in that not exist with this 16 bit address prefix in the routing table be initial length greater than 16 other address prefix, this moment, preceding 16 of list item was used for representing mask-length, and the prefix that promptly indicates how many different lengths all corresponds to this list item; 7 is output port behind the list item, just corresponds to the output port of a longest routing table prefix of prefix length in this list item.
When marker bit was 1, expression existed length greater than 16 address prefix, and this moment, preceding 16 of list item was used as B-HTL of pointed, searched longest matching prefix so that carry out therein based on the binary chop of address prefix length; Behind the list item 7 this moments nonsensical, need put 0.
Because the efficiency far that the linear directory table is searched is searched greater than hash, and if this one-level concordance list can be positioned in the buffer memory, its time of searching more can ignore.The most important thing is that the linear directory table is the experimental process space with the address prefix spatial division,, can not have influence on the address prefix of other subspace interpolation, deletion and the reconstruct data structure of address prefix in each subspace.
After the grouping of an IPv6 entered router, the method for searching route table flow chart as shown in Figure 4.At first take out the preceding 16bit of the destination address of IPv6 grouping, as index value, suppose that this value is N, directly navigates on N the list item of linear directory table with the content of this 16bit.If the marker bit of this list item is 0, illustrate in routing table, not with the length of this 16bit content beginning greater than 16 prefix, directly take out the third part output port of this list item this moment, as the forwarding port of this IPv6 grouping, end is once searched; If the marker bit of this list item is 1, explanation exists in routing table with the length of this 16bit content beginning greater than 16 prefix, in order to find this prefix, need to take out the first of this list item, when marker bit is 1, the pointer of B-HTL is being deposited by first, navigates to corresponding B-HTL by this pointer, and the content according to the back 112bit of IPv6 destination address in B-HTL is carried out binary search.After this similar with binary chop method based on address prefix length, up to finding the routing table prefix of long coupling, take out corresponding next and jump port numbers, finish once to search.
The original binary chop update efficiency based on address prefix is very low, and time complexity has reached O (N*logW).Under the very big situation of routing table, because the frequent generation of routing table update in the network, such efficient can't be accepted.The key factor that influences update efficiency in the original lookup method is: the marker that how to find those to upgrade.
Renewal to marker comprises following several situation.
● when replacing an address prefix,, only need simple the replacement to get final product owing to do not influence the marker of this prefix node.
● when inserting an address prefix, need add the marker that needs in the time of searching, need simultaneously and will be rewritten as this prefix as the BMP of all marker of BMP (Best Matched Prefix) with this prefix for this prefix.
● when deleting a prefix, need the pairing marker of this prefix of deletion, if notice that certain marker has multiplexing situation, then can not be deleted, need simultaneously and will be rewritten as the BMP of this prefix as the BMP of all marker of BMP with this prefix.
By analyzing as can be known, when upgrading an address prefix and writing down p/l (p is a prefix addresses, and l is a prefix length), original lookup method need upgrade two class marker, and the first kind is the marker of length less than l, and this class marker uses during for binary chop; Second class is that its BMP is the marker of p/l, and the effect of this class marker is for fear of recalling.Renewal to first kind marker is comparatively simple, because the address of p is known, its pairing first kind marker can directly search acquisition by carry out hash in the hash of corresponding length table.And the second class marker has represented the Prefix Expansion of p/l, owing to and do not know which Prefix Expansion p/l has in routing table, therefore need the hash table of traversal all length greater than l, or be that the complete set of p/l carry out hash search to prefix at all length in greater than the hash of l table, this efficient is very low.
A simple method is, when making up data structure, the second class marker of each prefix entries linked by linear linked list, can dwindle the scope of searching greatly like this.But such lookup method is carried out the space that efficient still has raising.Therefore, the present invention uses tree data structure, and BMP-tree is used for organizing the list item with same BMP.
Not all marker has longest matching prefix.For consistency, in hash table, added two pseudo-prefix hash list items, in the present embodiment, it is in 17 the hash table that these two pseudo-prefix entries are added on length.Suppose that all list items all have common prefix p/16 in this hash tabular table, two pseudo-prefix entries of Tian Jiaing are respectively { p, 0}/17 and { p, 1}/17 so.
Be depicted as BMP-tree data structure schematic diagram as Fig. 5 (a).Wherein Fig. 5 (a) is (or adding the back) before the prefix P2 deletion, and Fig. 5 (b) is prefix P2 deletion back (or before adding).The left side is the binary search tree, has shown the relation between each hash table.The right is the BMP-tree that each list item is formed in hash tabular table and the hash table, and wherein p represents that this list item is pure prefix, and m represents that this list item is pure marker, and b represents that this list item is a prefix, also is a marker, and they use same hash list item.
For a hash list item, if it has represented a prefix, promptly be labeled as p or b, it has its pairing BMP-tree of a pointed so, and each node among the BMP-tree all is with the hash list item of this prefix as BMP (longest matching prefix).Each father node, the prefix length of its left child node is greater than the prefix length of father node in BMP-tree, and the prefix length of its right child node equals the prefix length of father node.Will be from root node, the trunk that unique paths of all left child nodes compositions is called this BMP-tree, the length that a certain node on the trunk is begun path that all right nodes form and becomes this BMP-tree is the Zhi Gan of l, and wherein l is the prefix length of all nodes on this Zhi Gan.
Be labeled as among the figure P1 the list item correspondence BMP-tree, represent with light node.Be labeled as P2 the list item correspondence an other BMP-tree, represent with dark node.As can be known, the BMP of P2 is P1.During remove entries P2, at first upgrade the first kind marker of P2, deleted if this marker needs, then in the BMP-tree of P1, search for the Zhi Gan of those length less than the prefix length of P2.Upgrade the second class marker of P2 then, only need this moment the BMP of all nodes among the BMP-tree of P2 is rewritten as P1, then the BMP-tree of P2 is merged among the BMP-tree of P1 and get final product, the data structure after the merging is shown in Fig. 5 (b), and its flow chart is seen Fig. 6 (a).
The operation and the deletion action of adding route prefix are similar.For example in the data structure shown in Fig. 5 (b), add prefix P2, at first will add the first kind marker of P2, if relate to the operation of newly-increased list item, so will be at the BMP of P2, just the Zhi Gan of corresponding length goes up the interpolation node among the BMP-tree of P1.To construct the BMP-tree of P2 then, length is greater than a dried neutral line search of the prefix length of P2 in the BMP-tree of P1, and searching those is the node of prefix with P2, and its BMP is rewritten as P2, and they are sheared from the BMP-tree of P1, add among the BMP-tree of P2 getting final product to.Add the flow chart of prefix and see Fig. 6 (b).
By introducing BMP-tree, it is very quick that the deletion action of prefix entries becomes, if use doubly linked list, the time complexity of deletion action can be controlled at O (kWlogW) so, wherein k is single operation chained list required memory access times, and efficient improves greatly compared with original method that needs linear search.And the operating efficiency that adds route table items also is not very good, but compares original method, introduces after the BMP-tree, can get rid of a large amount of alternative list items according to the length of address prefix, has improved efficient to a certain extent yet.
Fig. 6 (a) is the flow chart that adds prefix P2 in B-HTL.Fig. 7 (a) is depicted as in the IPv4 backbone network router route prefix according to the statistic histogram of distribution of lengths.Can see that in the drawings the quantity of the prefix of different length in routing table is different, and specific distribution characteristics is arranged.If make full use of these features, can effectively improve the average efficiency of lookup method.Fig. 6 (b) is the flow chart of deletion prefix P2 in B-HTL.Similarly, be depicted as the route prefix of IPv6 backbone network router by distribution of lengths statistic histogram (only having shown preceding 64 network addresss) as Fig. 7 (b).
For the purpose of simplifying the description, be that example illustrates and adopts the influence of different binary search trees for search efficiency with the IPv4 routing table, as shown in Figure 7, Fig. 7 (a) be in the IPv4 routing table address prefix according to the distribution statistics figure of length.
Fig. 7 (b) be in the IPv6 routing table address prefix according to the distribution statistics figure of length.If using balance binary search tree searches, though the prefix quantity of some hash tables takes advantage, but its residing position is positioned at the darker level of search tree, for most search mission, needs more internal storage access just can finish once and searches.And if by the binary search path is designed, will have a fairly large number of hash of prefix table to place higher level, though increased the depth capacity of tree, make the maximum search degree of depth increase, improved average efficiency.
In addition, traditional additive decrementation that must bring internal memory based on the binary chop of address prefix length to the introducing of marker.Since some marker can be same with real route prefix information multiplexing memory headroom, marker can control to a certain extent to the influence of space efficiency.For this reason, present embodiment has used two kinds of different search tree organization plans, reduces marker taking memory headroom as far as possible.
Scheme one is used and is comprised the upper layer node that a fairly large number of hash table of prefix constitutes search tree, can make marker have maximum may with real route prefix information multiplexing memory headroom; Scheme two with that in mind, for certain node in the binary search tree, the prefix information in its right subtree can generate a marker at this node, if can reduce the size of right subtree as far as possible, can reduce the quantity of marker greatly.A limiting case is that each node has only left child node in this binary tree, do not need the storage of extra marker like this, but binary tree degenerates to linear search.For this reason, scheme two has adopted the method for balance left and right sides subtree, and when selecting father node, the quantity of prefix is equal as far as possible in its left and right sides subtree, and preferably prefix quantity is slightly larger than prefix quantity in the right node in the left sibling.
The scheme of two kinds of structure search tree structures has all improved the efficient of searching method to a great extent, and has reduced the storage of marker.
As from the foregoing, the present invention has used the search pattern of two-stage on the binary chop basis based on address prefix length, separated the address prefix space by the linear directory table of the first order, reduce influencing each other when address prefix upgrades in the different subspace, also guaranteed the efficient of searching; In based on the employed data structure of the binary chop of address prefix length, increased a kind of data organization mode BMP-tree, the expense when further having reduced routing table update; At last, the invention provides two kinds of different binary chop tree organizational forms, reduced the expense of storage.

Claims (11)

1, a kind ofly realize quick routing table lookup and method for updating, it is characterized in that based on the IPv6 address:
At first set up three kinds of data structures:
(1) linear directory table, each list item correspondence wherein zero, one or more length be equal to or less than 16 address prefix;
(2) Hash table tabulation HTL is stored in all length in the routing table in the different hash tables according to the length classification smaller or equal to 16 prefix, and the set of these Hash hash table has constituted HTL;
(3) based on the Hash table tabulation B-HTL of binary chop tree tissue, all length in the routing table is stored in the different hash tables according to the length classification greater than 16 prefix, these hash tables are organized by the binary chop tree and are constituted B-HTL;
After the packet of an IPv6 agreement enters router, take out the high 16bit of destination address, navigate to the corresponding list item of linear directory table as index value, if the flag bit of this list item is 0, next of then directly taking out in the list item jumped port as transmitting port; Otherwise,, in the B-HTL of correspondence, utilize the binary chop tree to search according to canned data in the list item;
Utilize the data of storing among the HTL that the linear directory table is upgraded operation.
2, according to claim 1ly realize quick routing table lookup and method for updating based on the IPv6 address, it is characterized in that: described linear directory table is fixed as 64k list item, each list item length is 3 bytes, be divided into 3 parts, wherein high 16bit is a first, is used for representing the pointer of prefix length or sensing B-HTL; An ensuing bit is a flag bit, is used for representing the implication of institute of first memory contents; Third part is last 7bit, represents next jumping routed port of this list item correspondence; The correspondence that the list item of each linear directory table is unique a B-HTL.
3, according to claim 2ly realize quick routing table lookup and method for updating, it is characterized in that based on the IPv6 address: described linear directory table list item first, when being used for representing prefix length, each all puts 1 or put 0 the length of its 16bit; When the length address prefix that is n corresponds to certain linear directory list item, the n position 1 of this list item first, otherwise put 0.
4, according to claim 3ly realize quick routing table lookup and method for updating, it is characterized in that based on the IPv6 address:
In described linear directory table, carry out when upgrading operation, if the prefix length L that upgrades is smaller or equal to 16, earlier with L position 1 in the list item first, judge subsequently and in being higher than the position of L, whether exist for 1 position, if there is no, then the third part of linear directory table list item is rewritten as the port numbers that will upgrade prefix according to marker bit;
When in described linear directory table, carrying out deletion action, if the prefix length L of deletion smaller or equal to 16, puts 0 with L position in the list item first earlier, judge in the position that is higher than L whether exist for 1 position subsequently, if exist, then in the hash of the corresponding prefix length of HTL table, delete this prefix; If there is no, then in being lower than those of L, search the highest value and be 1 position, and in HTL, search corresponding prefix, linear directory table list item third part is rewritten as the port numbers of the prefix that finds according to this bit position.
5, according to claim 2ly realize quick routing table lookup and method for updating based on the IPv6 address, it is characterized in that: the operation of carrying out routing table lookup comprises the steps:
The preceding 16bit of 5A, taking-up IPv6 grouping destination address searches corresponding list item as index value in the linear directory table;
If the marker bit of this list item of 5B is 1, carry out 5D;
5C, obtain the output port of this list item correspondence, carry out 5F;
The back 112bit of 5D, taking-up IPv6 grouping destination address;
5E, in the list item of linear directory table, obtain the B-HTL pointer, in the B-HTL of correspondence, utilize 112bit address, back to carry out binary chop, obtain corresponding output port;
5F, end.
6, according to claim 1ly realize quick routing table lookup and method for updating based on the IPv6 address, it is characterized in that: each node of the binary chop tree of described B-HTL all points to a hash table; Each list item comprises following components in the hash table:
(1) length is the IPv6 address of 16byte;
(2) length is next jumping port numbers of 7bit;
(3) length is the marker bit of 1bit, be used to represent this list item whether corresponding length greater than 16 address prefix;
(4) whether corresponding length is the marker bit of 1bit, be used to represent this list item marker;
(5) length is the longest matching prefix BMP of 8bit, be used to represent this list item correspondence the maximum address prefix length;
(6) length is the marker counter of 16bit, is used to add up the marker quantity that superposes on this list item;
(7) expand pointer points to the root node of a longest match address prefix trees BMP_tree;
(8) next_level pointer points to the downstream site among the BMP_tree;
(9) same_level pointer points to the brother of node among the BMP_tree.
7, according to claim 6ly realize quick routing table lookup and method for updating based on the IPv6 address, it is characterized in that: described BMP_tree is made up of the list item of hash table among the B-HTL, the unique corresponding BMP_tree of the expand pointer of each list item, each node among the BMP_tree is a prefix with this list item all, and the length according to prefix in the node is provided with the level of this node in BMP_tree from low to high, and the node with same prefix length is in same one deck of BMP_tree; When B-HTL being added, deleting or upgrade operation, search those hash that need change table list items by BMP_tree.
8, according to claim 7ly realize quick routing table lookup and method for updating, it is characterized in that: when B-HTL is added a prefix P2, carry out following steps based on the IPv6 address:
8A, in B-HTL, search the prefix node P1 of location the most longways of P2;
8B, in the BMP-tree of P1, the traversal all levels is higher than the prefix node of P2, carries out 8C, 8D, 8E respectively;
If the 8C traversal does not finish, carry out 8D so, otherwise, carry out 8F;
If 8D P2 is the prefix of this node, carry out 8E so, otherwise traverse next node, carry out 8C;
8E, from the BMP-tree of P1, take out this node, move among the BMP-tree of P2, traverse next node, carry out 8C;
8F, in B-HTL, add marker for P2;
8G, P2 is added among the BMP-tree of P1;
8H, end.
9, according to claim 7ly realize quick routing table lookup and method for updating, it is characterized in that: during to prefix P2 of B-HTL deletion, carry out following steps based on the IPv6 address:
9A, in B-HTL, search the prefix node P1 of location the most longways of P2;
9B, in the BMP-tree of P1, the traversal all levels is higher than the prefix node of P2, carries out 9C, 9D, 9E respectively;
If the 9C traversal does not finish, carry out 9D so, otherwise, carry out 9F;
If this node of 9D is the prefix of P2, carry out 9E so, otherwise traverse next node, carry out 9C;
9E, revise this node data structure canned data, traverse next node, carry out 9C;
9F, take out the BMP-tree of P2, incorporate the BMP-tree of P1 into;
The prefix information of 9G, deletion P2;
9H, end.
10, describedly realize quick routing table lookup and method for updating according to claim 1 or 6 based on the IPv6 address, it is characterized in that: among the described B-HTL each hash table corresponding unique address prefix length, among the B-HTL all hash table corresponding an address prefix length of interval; Described binary chop tree makes up in this prefix length interval range, each node of binary chop tree covers the prefix length interval, a part of address of B-HTL, the prefix length of the hash of this node correspondence table is also in this section in the address prefix length of interval, and this part address prefix length of interval is divided into two subintervals, and these two subintervals are respectively to two child nodes about should node; In any one node corresponding address prefix length interval, the hash that option table item quantity is maximum shows the hash table as described arbitrary node correspondence.
11, describedly realize quick routing table lookup and method for updating according to claim 1 or 6 based on the IPv6 address, it is characterized in that: among the described B-HTL each hash table corresponding unique address prefix length, among the B-HTL all hash table corresponding an address prefix length of interval; Described binary chop tree makes up in this prefix length interval range, each node of binary chop tree covers the prefix length interval, a part of address of B-HTL, the prefix length of the hash of this node correspondence table is also in this section in the address prefix length of interval, and this part address prefix length of interval is divided into two subintervals, respectively to two child nodes about should node; In any one node corresponding address prefix length interval, select a hash table, with this hash table the address prefix length of interval is divided into two subintervals, make in first subinterval hash table list item quantity and with second subinterval in hash table list item quantity and the most approaching, then this hash table is shown as the hash of this node correspondence.
CNB200510086841XA 2005-11-10 2005-11-10 A method to quickly search and update IPv6 routing list Expired - Fee Related CN100496019C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200510086841XA CN100496019C (en) 2005-11-10 2005-11-10 A method to quickly search and update IPv6 routing list

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200510086841XA CN100496019C (en) 2005-11-10 2005-11-10 A method to quickly search and update IPv6 routing list

Publications (2)

Publication Number Publication Date
CN1964311A CN1964311A (en) 2007-05-16
CN100496019C true CN100496019C (en) 2009-06-03

Family

ID=38083209

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200510086841XA Expired - Fee Related CN100496019C (en) 2005-11-10 2005-11-10 A method to quickly search and update IPv6 routing list

Country Status (1)

Country Link
CN (1) CN100496019C (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420415B (en) * 2007-10-23 2012-08-22 华为技术有限公司 Method and apparatus for forming routing table
CN101340386B (en) * 2008-08-12 2011-08-10 华为技术有限公司 Method and router for establishing and searching route table items
CN101667958B (en) * 2008-09-01 2012-08-29 华为技术有限公司 Method for selecting hash function, and method and device for storing and searching routing table
CN102957759B (en) * 2011-08-26 2018-07-13 中兴通讯股份有限公司 A kind of distribution method and system of IPv6 address prefixes
CN102739526B (en) * 2012-06-13 2015-02-25 烽火通信科技股份有限公司 Realization method of efficient distributed routing list realizing method
CN103780490B (en) * 2012-10-17 2018-03-30 中兴通讯股份有限公司 A kind of method and device for updating route querying tree
EP2924926B1 (en) 2012-12-25 2017-04-05 Huawei Technologies Co., Ltd. Lookup table creation method and query method, and controller, forwarding device and system therefor
CN105791132B (en) * 2014-12-17 2019-08-06 深圳市中兴微电子技术有限公司 A kind of list item update method and device based on multi-path search tree route querying
CN105827530B (en) * 2016-03-11 2019-04-16 中国互联网络信息中心 A kind of IP binary chop method and device of compatible IPV4/IPV6
CN109194574B (en) * 2018-09-20 2020-09-18 南通科技职业学院 IPv6 route searching method
CN111416880A (en) * 2019-01-08 2020-07-14 阿里巴巴集团控股有限公司 IP address addressing method and device, computer storage medium and electronic equipment
CN111970176B (en) * 2020-10-21 2021-01-15 中国人民解放军国防科技大学 Data summarization method and equipment for IPv4 and IPv6 dual-stack networks
CN114726825A (en) * 2021-01-05 2022-07-08 中国移动通信有限公司研究院 IPv6 address library construction method, system, electronic equipment and storage medium
CN113343034A (en) * 2021-06-08 2021-09-03 湖南大学 IP searching method, system and storage medium
CN116403684B (en) * 2023-06-08 2023-08-11 杭州医策科技有限公司 Digital pathological image loading method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507229A (en) * 2002-12-10 2004-06-23 ����ͨѶ�ɷ����޹�˾ Route list organizing and searching method
CN1538663A (en) * 2003-04-16 2004-10-20 华为技术有限公司 Method of finding route table item using ltsh chain table
WO2004105351A2 (en) * 2003-05-15 2004-12-02 Cisco Technology, Inc A bounded index extensible hash-based ipv6 address lookup method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507229A (en) * 2002-12-10 2004-06-23 ����ͨѶ�ɷ����޹�˾ Route list organizing and searching method
CN1538663A (en) * 2003-04-16 2004-10-20 华为技术有限公司 Method of finding route table item using ltsh chain table
WO2004105351A2 (en) * 2003-05-15 2004-12-02 Cisco Technology, Inc A bounded index extensible hash-based ipv6 address lookup method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
采用哈希算法改进IP地址查找的研究. 卢秀娟,范其蓬,王林.陕西工学院学报,第20卷第4期. 2004 *

Also Published As

Publication number Publication date
CN1964311A (en) 2007-05-16

Similar Documents

Publication Publication Date Title
CN100496019C (en) A method to quickly search and update IPv6 routing list
CN102484610B (en) Routing table construction method and device and routing table lookup method and device
US7356033B2 (en) Method and apparatus for performing network routing with use of power efficient TCAM-based forwarding engine architectures
CN103780491B (en) A kind of method for realizing IPv6 fast routing lookups
CN101388030B (en) Database and database processing methods
CN103561133B (en) A kind of IP address attribution information index method and method for quickly querying
CN100413285C (en) High-speed multi-dimension message classifying algorithm design and realizing based on network processor
KR100586461B1 (en) Method, Hardware Architecture and Recording Medium for Searching IP Address by Using Pipeline Binary Tree
CN101577662A (en) Method and device for matching longest prefix based on tree form data structure
KR100512949B1 (en) Apparatus and method for packet classification using Field Level Trie
CN108134739B (en) Route searching method and device based on index trie
CN101345707A (en) Method and apparatus for implementing IPv6 packet classification
CN100488174C (en) Hardware-based differentiated organization method in stream classification
CN103107945A (en) System and method of quick searching Internet protocol version 6 (IPV6) route
US7478109B1 (en) Identification of a longest matching prefix based on a search of intervals corresponding to the prefixes
CN105357247A (en) Multi-dimensional cloud resource interval finding method based on hierarchical cloud peer-to-peer network
CN102045412A (en) Method and equipment for carrying out compressed storage on internet protocol version (IPv)6 address prefix
Luo et al. A hybrid IP lookup architecture with fast updates
US6925503B2 (en) Method and system for performing a longest prefix match search
CN109754021A (en) Online packet classification method based on range member group searching
CN106656816B (en) Distributed ipv6 method for searching route and system
CN110995876B (en) Method and device for storing and searching IP
CN1279716C (en) Parallel route searching method and system for eliminating longest prefix match search
CN106302178A (en) A kind of method for searching route and device
Veeramani et al. Efficient IP lookup using hybrid trie-based partitioning of TCAM-based open flow switches

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: YANTAI HUITONG NETWORK TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: INSTITUTE OF COMPUTING TECHNOLOGY, CHINESE ACADEMY OF SCIENCES

Effective date: 20121224

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100080 HAIDIAN, BEIJING TO: 264003 YANTAI, SHANDONG PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20121224

Address after: 264003 Shandong Province, Yantai city Laishan District Yingchun Street No. 133

Patentee after: YANTAI HUITONG NETWORK TECHNOLOGY CO., LTD.

Address before: 100080 Haidian District, Zhongguancun Academy of Sciences, South Road, No. 6, No.

Patentee before: Institute of Computing Technology, Chinese Academy of Sciences

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090603

Termination date: 20161110