In the prior art, the IP in the network router searches common use CPE method.The CPE method is a kind of fast searching method that is proposed by Srinivasan, the paper name is called " FasterIP Lookups using Controlled Prefix Expansion " and (comes from proc.ACMsigmetrics ' 98 conf., madison, WI, the 1-11 page or leaf), this method is utilized the time complexity of the thought minimizing method of segmentation compression, makes seek rate increase greatly, according to different configurations, can between 3~32 steps, search and finish.Simply introduce the CPE method below.
Since adopting CIDR (CIDR) agreement in 1993, the IP route just comprises two parts<IP prefix, the length of prefix 〉, the length range of prefix is between 0~32.For each input bag, IP searches the IP prefix sets that logic need find out coupling, and finds out the prefix of long coupling from the prefix sets of coupling.The indicated address of prefix of long coupling is exactly the address of next jumping of finding out.About the detailed content of CIDR as seen: RFC1519 Classless Inter-Domain Routing (CIDR): an AddressAssignment and Aggregation Strategy.V.Fuller, T.Li, J.Yu , ﹠amp; K.Varadhan.September 1993. and RFC1817 CIDR and ClassfulRouting.Y.Rekhter.August1995.
Rule in the routing table can be expressed as the form of prefix, and the length of prefix changes between 8 and 32, and the IP lookup method is promptly found out the prefix of long coupling, because the diversity of prefix length is a key factor that causes the lookup method time complexity high.For the prefix maximum length is W, (NetBSD is a kind of unix operating system of standard to NetBSD, this operating system has realized the ICP/IP protocol stack, wherein comprise the realization that IP searches) in the method complexity of binary tree be O (W), (L<W), then the method complexity will be reduced to O (L) if the prefix maximum length is reduced to L.Obviously, the maximum length of minimizing prefix will improve the speed of method.The basic thought of control prefix extending method is to increase the step-length of method by the diversity that reduces prefix length, thereby has reduced the complexity of method, reaches the purpose of searching fast.
Any prefix can be extended for the prefix sets of designated length, as for prefix 10
*, can be extended for length and be 4 prefix sets { 1000
*, 1001
*, 1010
*, 1011
*, by expanding the length of prefix to appointment, length that can the normalization prefix, thus reduced the diversity of prefix length.Expanding the prefix method can be divided into what expanding the normalized prefix length in back, and the length of each grade prefix is the same, just can find other node of this level by array indexing.
Expand prefix tries tree 32 grades of 1 original bit tree boil down to 3 level structures as a result, search number of times and shorten to 3 times, the time complexity of method is O (3).Thereby reach the purpose of searching fast.In same rank, method can adopt the node that the mode of direct index array finds to be needed.Because the mode of the direct index array that adopts so EMS memory occupation is bigger, has a lot of spaces not have element, causes very big waste, method need be optimized.
The typical structure that expands prefix trees as shown in Figure 1, wherein original prefix is P1=10
*, P2=111
*, P3=11001
*, P4=1
*, P5=0
*, P6=1000
*, P7=100000
*, P8=1000000
*Prefix is divided into 3 grades, and rank length is respectively 2,5,7.
The prefix extending method can be optimized on rank, because other number of level is exactly the worst number of times of searching.Can expect that rank is more little, the number of times of searching is few more, and taking of internal memory is also big more, takes all factors into consideration and searches number of times and attainable EMS memory occupation, and operable rank is 3,4,5 grades.
The length of prefix is each other step-length of level in each rank, also be can optimum parameters, can be clearly seen that, the difference of prefix length and internal memory take very big relation, the target of optimizing is to choose best step-length on specific prefix sets, makes that taking of internal memory is minimum.
Variable step size also is a kind of optimization method, because prefix may not take in each rank, a lot of spaces may be wasted.Can save general 5%~10% internal memory by variable step size, variable step size causes trouble for the insertion and the deletion of prefix, needs careful consideration.
LeafPush is a kind of method of optimizing internal memory preferably.Expand each node of prefix tries tree, comprise the pointer of prefix and sensing next stage.If the prefix that is in mid portion is shifted onto the position of leaf, the node of each in tree or be prefix so, or be pointer.Each node can be represented with a unit.Can save the probably internal memory of half like this.So in insertion of setting and deletion, will spend some times owing to need partly shift prefix onto leaf LeafPush method from the centre.
In a word, there are the following problems for CPE method of the prior art:
1.CPE method is under the situation that prefix is disperseed, committed memory is bigger, and its maximum problem is that route is modified under the worst case, and a route is revised and needed to change 262,144 unit, needs the time of 2.5ms.Under the situation of high speed routing forwarding, can not put up with.
2.CPE method route retouching operation is very complicated, need be when route is revised by one " the auxiliary tree of 1-bit ", and when revising route, need carry out complicated traversal and read-write operation.And route revises and all to finish in the I/O interface board, and is higher to the performance requirement of I/O interface board.
3.CPE the route retouching operation complexity of method realizes very difficulty with hardware, can not realize in other words.
Fig. 2 is according to prefix decomposing schematic representation of the present invention.The present invention has at first analyzed the actual route data on the network router, and the length of finding route prefix is between 8~32, and promptly the minimum length of route prefix is 8, corresponding to the category-A address.The length range of prefix from Routing Protocol, also can obtain this conclusion, so can dwindle.So, suppose prefix is divided into 4 grades, every grade is adopted 16,21,26,32 configuration mode, and under the worst case, the number of times that route is revised can be reduced to 256 times.According to expanding the prefix method, depend on the concrete needs in the reality, the progression of prefix and configuration at different levels obviously can have several different methods.And,, can dynamically determine progression and every level length according to the instruction of " Faster IPLookups using Controlled Prefix Expansion ".Because have a detailed description in the document, this specification just no longer repeats.At this document is merged so far with for referencial use.
Before specifically describing the prefix decomposition, introduce the notion of " prefix decomposition " earlier.Realize the problem of difficulty in order to solve route retouching operation complexity and hardware, the basic thought of " prefix decomposition " is decomposed into a plurality of shirtsleeve operations to a complicated operations exactly.Specific to the present invention, exactly a route retouching operation is decomposed into a plurality of atomic operations.
By analyzing, the inventor thinks if the atom prefix has following characteristics, then obviously can simplify the operation, and be convenient to realize with hardware:
1, the insertion of atom prefix and deletion are carried out at one section continuous internal memory;
2, atom prefix downstream does not have other prefix to exist, and inserts and deletes and can directly carry out, and need not judge the length and the covering relation of prefix.
The inventor has scrutinized the structure of prefix, finds the prefix revised for a route, can be decomposed into a plurality of atom prefixes to prefix according to the covering relation of prefix.The thought that the atom prefix has been arranged, the modification of prefix can be divided into following 2 steps:
1, decomposing prefix is the atom prefix; 2, the insertion of atom prefix and deletion action.
According to the characteristics of atom prefix, the decomposition of atom prefix as shown in Figure 2.At first, prefix is decomposed needs auxiliary 1-bit tree.General knowledge about the generation and the structure of 1-bit tree is those skilled in the art is not described in detail at this.In the auxiliary 1-bit tree of Fig. 2, the prefix in (1)~(5) the expression 1-bit tree, the node with prefix represents do not have the node of prefix to represent with hollow dots with solid dot.The left sibling of 1-bit tree represents 0, and right node represents 1, for prefix (3), represents that with the 1-bit tree its prefix is 11001
*According to the method for CPE, the 1-bit tree among Fig. 2 can be divided into for example 2 grades, wherein rank 1 comprises 2 bits, and rank 2 comprises 3 bits.
As shown in Figure 2, be without loss of generality, consider the influence of LeafPush here.Revise prefix (4) if desired,, will influence the downstream prefix of (4), comprise prefix (1), (2), (3) according to the principle that prefix is revised.Because the length of prefix (1), (2), (3) is longer than prefix (4), so the modification of prefix (4) can not cover prefix (1), (2), (3), and can only revise additional prefix P1, P2, P3.In conventional CPE method, find the position that needs to revise to realize, detailed introduction being arranged in the CPE method by traveling through about this point, merge so far with for referencial use here.But according to the notion of above-described atom prefix of the present invention, can draw P1, P2 and P3 here and promptly be needs the atom prefix revised, and promptly P1, P2, P3 are not embroidered with covering relation with other before any.Therefore, if can decomposite them, then obviously can add the modification of block prefix with simple method.According to an embodiment of the present, a kind of decomposition method of atom prefix comprises the steps:
1. decompose all subtrees that prefix begins to travel through the prefix node from needs;
2., then stop the traversal of these all subtrees of node if on the node prefix is arranged;
3. if do not have prefix on the node, and node has a subtree at least for empty, and then this node can be decomposed into corresponding atom prefix, as the pairing node of node P1, P2, P3 among Fig. 2.
According to the decomposition method of above-mentioned atom prefix, we come the prefix (4) in the exploded view 2.At first, proceed to node P1 ' along left branch from (4) pairing node, the no prefix of this node P1 ', and 1 corresponding subtree be sky, and described this node P1 ' can decompose, and the atom prefix that decomposites is P1.According to carrying out for the subtree 0 of non-NULL along P1 ', arrive (1), node (1) is solid, so prefix is arranged, stops the traversal of this node subtree.Other two atom prefixes that can obtain prefix (4) equally are P2 and P3.Like this, three atom prefixes P1, P2 and the P3 of prefix (4) have been obtained.
The decomposition of atom prefix is the operation of all subtrees of recurrence, and recursive operation can be converted into the onrecurrent operation by storehouse.
Fig. 3 shows the operating process of decomposing with recursion method according to the decomposition method of atom prefix.
The flow process of Fig. 3 proceeds to square frame 301 from square frame, gets the prefix that needs decomposition, for example prefix (4).Then arrive determination block 302, determine that whether left subtree is not for empty.If result of determination is not, promptly left subtree is empty, and then left subtree is the atom prefix, shown in square frame 303.Then proceed to square frame 304, whether judge right subtree not for empty, if result of determination is not, promptly right subtree is empty, and then right subtree is the atom prefix, shown in square frame 305.Then, flow process finishes 310.Get back to square frame 302, if result of determination is for being, promptly left subtree is not a sky, judges then whether left subtree has prefix, shown in square frame 306.If left subtree has prefix, then flow process begins to continue from square frame 304.If the result of determination of square frame 306 is that promptly left subtree does not have prefix, then arrives square frame 307, and whole flow process shown in Figure 3 is carried out recursive call.Get back to square frame 304, if result of determination is for being, promptly right subtree is not empty, and then flow process proceeds to square frame 308, determines whether right subtree has prefix, if result of determination is for being that then flow process jumps to square frame 310 end.If result of determination is not, then shown in square frame 309, recursive call Fig. 3 flow process is carried out prefix and is decomposed.According to principle of the present invention, obviously can carry out some modifications to Fig. 3, whether be empty as judging right subtree earlier, and then judge whether left subtree is empty.
As can be seen, it is to determine according to the covering relation up and down of prefix that prefix is decomposed into the atom prefix from the recursion method flow chart, and maximum numbers of atom prefix are decomposed in the residue length decision of prefix in rank.As the mode for 16,21,26,32 configurations, length is 24 prefix, and the residue length of its atom prefix in rank 21~26 is 26-24=2, so the atom prefix number of its decomposition mostly is 2+1=3 most.For residue length is the prefix of n, and the atom prefix number of decomposing is as follows at most:
Max?Expansion_Number(n)=n*(n+1)/2
Because recursion method efficient is not high, also can realize the onrecurrent method with storehouse, the onrecurrent method flow diagram that prefix is decomposed as shown in Figure 4:
The flow process of Fig. 4 proceeds to square frame 401 from square frame 400, the prefix of take out to need decomposing and with its pop down.Then, flow process proceeds to square frame 402, takes out out the prefix in the storehouse, and judges that at square frame 403 whether left subtree is not for empty.If judged result is not, promptly left subtree is empty, and then left subtree is the atom prefix.Flow process proceeds to square frame 405, whether judges right subtree not for empty, if judged result is not, promptly right subtree is empty, and then at square frame 406 right subtree being regarded as is the atom prefix.Flow process proceeds to square frame 407, judges that whether storehouse is empty, if flow process finishes, if not, then get back to square frame 402, takes out the prefix in the storehouse.Get back to square frame 403, if judged result is for being, promptly left subtree be empty, and then flow process advances to square frame 408, judges whether left subtree has prefix, for being, then illustrates it is not the atom prefix as if judged result, flow process arrival square frame 405.If not being judged as not of square frame 408 illustrates that then this prefix need continue to decompose, thus at square frame 409 with its pop down.See square frame 405 now again,, then judge then to square frame 410 whether right subtree has prefix if result of determination is for being, if judged result represents then that for being right subtree does not need decomposition, neither the atom prefix, whether be sky so flow process arrival square frame 407 is judged storehouse.If the judged result of square frame 410 represents then that for not this prefix need continue to decompose, thus be pressed into storehouse at square frame 411, and arrival square frame 407 judges whether storehouse is empty.In practice, be that the elder generation's judgement left subtree or the order of right subtree can be exchanged.In addition, after square frame 411 was carried out, storehouse can not be sky certainly, can directly arrive square frame 402 so carry out square frame 411 back flow processs.
We know, the configuration for 16,21,26,32, under the worst case residue length of prefix be 8 (because the shortest IP prefix is 8, as previously analyzed), so under the worst case, the number of atom prefix is 8* (8+1)/2=36.Be under the worst case, the prefix of a needs modification can be decomposed into 36 atom prefixes at most.
Because the method that the prefix of above realization is decomposed has been considered the influence of LeafPush, so the decomposition of prefix need decompose all nodes of the following auxiliary 1-bit tree of prefix node to the position of prefix from the prefix place.If do not adopt the LeafPush algorithm, the prefix decomposition algorithm can further be simplified, and the decomposition of prefix can only need decompose below the node of prefix place, in the current rank in prefix place with all interior nodes.Can significantly reduce the number of the atom prefix of decomposition like this.
Under the situation without LeafPush, the flow chart of recursive algorithm and the situation of Fig. 3 are very close, just also need to add a determining step after the step of the square frame 301 of Fig. 3, and whether be used for judging needs the prefix of decomposing in current rank.If the prefix that needs to decompose is not in current rank, then flow process finishes.All the other processing procedures are the same with Fig. 3.
Under situation without LeafPush, the flow chart of non-recursive algorithm and the flow process of Fig. 4 are also very close, just in the determining step of the square frame 408 of Fig. 4 Rule of judgment change " left subtree whether prefix is arranged and whether in current rank " into and in the determining step of square frame 410 Rule of judgment change " right subtree whether prefix is arranged and whether in current rank " into.
Fig. 5 shows hardware of the present invention and realizes overall plan.Can know that from the characteristics of atom prefix the modification of atom prefix can be converted into continuous internal memory write operation.So the configuration for 16,21,26,32 can be converted into the write operation of 36 contiguous memorys under the retouching operation worst case of prefix, can finish route and revise.Under the burst pattern of current internal memory, can satisfy the demand of high speed routing forwarding fully.
After prefix is decomposed into the atom prefix, be specially adapted to the hardware realization that route is revised.We know that hardware is realized tabling look-up and traversing operation is very complicated and unrealistic.If complicated route retouching operation is decomposed into the retouching operation of atom prefix, route is revised the write operation that can be reduced to contiguous memory, prefix is revised and can be finished under same a kind of hardware instruction, does not need other extra instruction and logics, has simplified hardware implementations greatly.
The present invention has proposed a kind of hardware implementations according to the thought of " prefix decomposition " in conjunction with a kind of concrete router.As shown in Figure 5, this hardware implementations is to design for the route querying operation that solves high speed router, be without loss of generality, here suppose that high speed router comprises route disposable plates and two parts of forwarding interface plate, wherein the route disposable plates is collected routing iinformation according to Routing Protocol, and generates route entry (prefix).The route entry that the route disposable plates is collected downloads on the forwarding interface plate, finally forms the route querying structure.The forwarding interface plate is receiving data packets then, according to IP lookup method and route querying structure, finds out the route that needs, and sends.
Describe Fig. 5 below in detail.According to the embodiment of Fig. 5, router of the present invention is made up of two parts, route disposable plates and interface board, and the route disposable plates is monitored whole system, and global informations such as route negotiation control message, VPN message, MP message are managed.The function that interface board provides rapid message to transmit, routing iinformation changes, and the route disposable plates is the route entry that consults, and just prefix is delivered on the interface board and handles.The structure of each I/O plate is the same.
At the architecture of above router, adopt the mode of 4 grades of data structures here.
By preserving 1-bit tree structure on the disposable plates, and the global information of data structure, then preserve on the interface board and search structure, if insert or delete a route, can be divided into following four steps:
1, inserts or deletes this prefix f in the 1-bit tree;
2, the segment information according to data structure decomposes prefix, is decomposed into the atom prefix group f[of maximum 8* (8+1)/2=36 prefix];
3, with atom prefix group f[] be delivered on each interface board, the atom prefix in the atom prefix group can gradation pass to each interface board;
4, insert or the data structure of deletion atom prefix to the interface board in.
Atom prefix component supplementary biography is delivered on each interface board, and there is not the problem that covers original prefix in the prefix after decomposing for each, so insertion and deletion action can comprise the following steps: to find out the initial address that needs to revise prefix simply; Revise one or more continuous internal storage locations.To describe with reference to Fig. 8 at figure below about the detailed process of revising.
Because internal memory is divided into two parts to be preserved, the 1-bit tree is kept at the route disposable plates, for the MaeEast database, adopt 2 bytes as pointer, 1-bit tree committed memory has only 700K, and the tries tree is kept at interface board, for the MaeEast database, adopt 2 bytes as pointer, tries tree committed memory has only 600K.The consumption of internal memory is all very little on route disposable plates and interface board, can be placed among the cache fully.Reach processing speed faster.
Fig. 6 shows the hardware implementations of the interface board among Fig. 5.As shown in Figure 6, interface board comprises a host CPU and IP processing engine and the SRAM that preserves the Tries tree structure.In the present invention, except finishing conventional func, the function that CPU finishes is: the initialization of IP processing engine and configuration feature, function of initializing can the initialization internal memory use, configuration feature can the configuration of IP processing engine in memory size, the rank of search tree, and the size of step-length in each rank; With the modify feature of submitting the atom prefix to, be exactly the atom prefix that the route disposable plates is submitted to, send in the IP processing engine by order, the IP processing engine is carried out the route retouching operation of atom prefix.Though with the separately expression of CPU and IP processing engine, those skilled in the art can understand in this explanation, they two can be same processor.
The operation that will carry out on the IP processing engine comprises: IP searches logic and revises logic.For example, the input of IP bag is caused interruption by searching logic from routing address output.It can be conventional that IP searches logic, also can be the following hard-wired logic of searching that will describe in this specification.
The course of work of Fig. 6 is: the atom prefix that the needs that the route disposable plates is submitted to are revised, submit to host CPU by communication module, and offer the IP processing engine by host CPU again.
The IP that Fig. 7 shows under the operational data structure searches the hardware designs schematic diagram of logic.Be noted that at first it is two inventions that can independently use that IP in this example searches that logical construction and atom prefix of the present invention decompose.As can be seen from Figure 7, unit's operation that IP searches the required realization of logic has: the position of word and operation, carry out step-by-step and operation according to two words, as square frame 701; The dextroposition operation of word can be carried out the dextroposition operation to word according to the length of a word, as square frame 702; The memory addressing operation is carried out memory addressing according to plot and side-play amount, as square frame 703; The compare operation of word, relatively whether two words equate, as square frame 704; The memory read-write operation can be carried out continuous internal memory write operation and common internal memory read operation.Simple memory management operation can distribute and discharge internal memory, can certainly carry out memory management on host CPU.
As can be seen from Figure 7, the hardware designs logic is fairly simple, can realize easily.Wherein mask1, mask2, shift1, shift2 can be constants, can be the variablees that is stored among the SRAM, also can be the variablees of host CPU input.If constant, mean that then data structure and step-length fix, reduced the flexibility of data structure, but searching and not influence of operation such as modification route.
The processing of Fig. 7 is unwrapped the beginning from input IP, then arrives square frame 701 and 701 ', by with the MASK value of appropriate level and take out the value of prefix in appropriate level that IP wraps, be in the present embodiment taking-up in first rank value and the value in second level.
The generation of mask defines by rank, and mask1 represents other mask of the first order, and mask2 represents the mask of second level, by that analogy.Can take out the value of the IP address of appropriate level by mask, for example, be respectively 2,5,7 prefix decomposition tree, mask1=1100000, mask2=0011100, mask3=0000011 for rank.This shows the prefix trees for fixed step size, other mask of each grade fixes.The operation in this step is in order to take out the prefix value of appropriate level, and therefore, under other situation of variable stage, the MASK value of appropriate level is respective change also.
Square frame 701 and 701 ' output result send into frame 702 and 702 ' and are shifted.Shift is mainly used to the value of IP address appropriate level is displaced to lowest order, is convenient to form the array pointer of searching.Shift1 represents other shift of the first order, and shift2 represents the shift of second level, by that analogy.Each other shift of level equals other step value of upper level.Be respectively 2,5,7 prefix trees for rank.shift1=0,shift2=2,shift3=3。
Square frame 702 and 702 ' result deliver to square frame 703 and 703 ' respectively, carry out addition with memory addressing.At square frame 703, because be, so the addressing plot of the memory first address of present node just in the first order.For square frame 703 ', because this is the second level, so will obtain output by higher level's plot+input.Input is exactly to operate the subscript pointer of this node array that obtains by mask and shift, adds the subscript pointer of input like this by the addressing plot of memory, just can find route ID or other pointer of next stage of needing.Respectively the result of square frame 703 and 703 ' is judged at square frame 704 and 704 ', see whether its highest order is 1.Or actually whether be 1 to represent to distinguish other pointer of the next level of this value route ID by highest order.If route ID, then output.If next other pointer of level then is input to next rank.If last rank, be not 1 but also draw highest order in the judgement of square frame 704, then expression makes mistakes.
What consider in the present embodiment is the situation that has adopted LeafPush, if do not adopt the method for LeafPush, in a list item of array, can store route ID and pointer simultaneously, in this case, what need to judge at square frame 704 is whether pointer is empty, if be sky, then the route ID that needs is found in expression, otherwise, obtain next other pointer of level, continue to search.
Though be serial representation with operation and shifting function in Fig. 7, in fact they can parallel processing, can improve the performance of searching like this, makes also to have under the multistage data structure to search performance preferably.The data structure classification is more, can reduce taking of internal memory significantly, can average out searching under performance and the EMS memory occupation.
Only show two-layer configuration among Fig. 7, if progression is more, then as long as increase corresponding module.This logic of searching of Fig. 7 obviously is particularly suitable for realizing with hardware.
Fig. 8 shows route and revises logical schematic.
Route is revised logic and is comprised two steps, and the first step is that the atom prefix of input is carried out same search operation, and second step was to begin to carry out continuous internal memory write operation from the plot that finds.Can also can use conventional any method with disclosed method in this specification to searching of atom prefix.Mainly introduce the write operation of internal memory below.
Here continuous internal memory write operation, the length that needs the judgement internal memory to write, the judgement of length is to determine according to the length of atom prefix and other length of atom prefix place level, the length of supposing the atom prefix is p, the length of atom prefix place level is q, and the internal memory length that then needs modification continuously is (q-p) inferior power of 2.For example, for the prefix among Fig. 24, the atom prefix that it decomposes out is P1=101, P2=1101 and P3=11001.When revising P1, because the length of P1 is 3, P1 is in the second level, and partial length is 5, so the internal memory number that will revise is 2
5-3=2
2=4.If the atom prefix is identical with current rank length, then only need to revise 1 list item.The route ID of all list items that the contiguous memory write operation is here write is identical, can use the Burst pattern of internal memory and finish.In addition, the modification here comprises insertion and deletion and covers.Those skilled in the art will understand the internal memory length that needs to revise and also can otherwise obtain.
More than embodiments of the present invention are had been described in detail.The relative CPE method of the present invention more once EMS memory occupation and result of Yan Suoqu relatively under big capacity router situation below.
For jumbo router, the CPE method is not analyzed, and CPE method limitation is also embodied on the EMS memory occupation, from to the analysis of CPE method as can be seen, when the prefix number increased, EMS memory occupation was increasing, the limit of EMS memory occupation is 4G bit, i.e. 4096M internal memory.So, be the relation of non-convergence between the consumption of internal memory and the prefix number, press direct proportion and increase much smaller than the taking of 4096M internal memory.
Because actual database is polymerization on some IP plots, so the internal memory that actual database takies is far smaller than the internal memory that random library takies, this mainly is because actual prefix is provided with at some subnets often, many prefixes all concentrate in certain interval, and prefix is then disperseed at random.The data structure committed memory that the polymerization property of prefix makes actual database generate in the actual database is played minimizing greatly, in order to be stored in the relation between the random library EMS memory occupation in obtaining in the actual database, adopt the way that compares between actual database MaeEast and the random library to obtain the empirical equation of actual database EMS memory occupation between random library here.By empirical equation the limit data storehouse is analyzed, so that obtain believable conclusion.
Show by analyzing available empirical equation, the internal memory that actual database takies be the random library committed memory 10% to 30% between.Owing to can not obtain big actual database, adopt random library to test here, and adopt empirical equation to handle, obtain 1,000,000 route entry committed memories between 10M~40M.
Adopt structure of the present invention, it is bigger perfectly to solve the committed memory that expands in the prefix method, inserts oversize problem of deletion time, can use fully in actual high speed router.And this scheme can adopt hardware to realize fully, after the atom prefix sends to interface board, can give IP fully and search logic FPGA or ASIC, search and the route retouching operation, can reach searching of hypervelocity like this and revise performance with route by hardware.Concrete hardware implementations has detailed description in the above.
Though describe the present invention in detail with reference to embodiment, obviously in the scope that does not break away from essence of the present invention, can do a lot of the modification to above execution mode, change or be equal to replacement.