CN101692653A - Management method and management device for routing table - Google Patents

Management method and management device for routing table Download PDF

Info

Publication number
CN101692653A
CN101692653A CN200910178756A CN200910178756A CN101692653A CN 101692653 A CN101692653 A CN 101692653A CN 200910178756 A CN200910178756 A CN 200910178756A CN 200910178756 A CN200910178756 A CN 200910178756A CN 101692653 A CN101692653 A CN 101692653A
Authority
CN
China
Prior art keywords
list item
resource
item space
idling
space
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.)
Granted
Application number
CN200910178756A
Other languages
Chinese (zh)
Other versions
CN101692653B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2009101787564A priority Critical patent/CN101692653B/en
Publication of CN101692653A publication Critical patent/CN101692653A/en
Priority to PCT/CN2010/071889 priority patent/WO2010145295A1/en
Application granted granted Critical
Publication of CN101692653B publication Critical patent/CN101692653B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/54Organization of routing tables

Abstract

The invention discloses a management method and a management device for a routing table. The management method for the routing table comprises the following steps: acquiring a prefix length of a table entry to be inserted into the routing table, wherein in the routing table, resources are distributed for table entry space of each prefix length according to a Gaussian distributing model; finding a first table entry space corresponding to the prefix length in the routing table; and inserting the table entry to be inserted into the idle resources in the first table entry space. According to the invention, the resources are distributed for the table entry space of each prefix length in the routing table in advance according to the Gaussian distributing model, in the process of inserting the table entry, the idle resources are searched by using a nearest neighbor rule, and in the process of removing the table entries, the resources are directly recycled without moving operation. A routing table management system established on the basis of the policies has higher performance and adaptive capability in network application; and occupied resources and required time are reduced.

Description

The management method of routing table and device
Technical field
The present invention relates to the communications field, in particular to a kind of management method and device of routing table.
Background technology
Router, switch are the nucleus equipments of networking, and these equipment the most basic also be that most crucial function is exactly basic the forwarding.The basic forwarding realizes that by searching routing table the performance of therefore searching routing table directly affects the performance of router, switch.Searching of routing table is principle according to longest prefix match.The method of realization longest prefix match commonly used has based on the method for hash table and the method for showing based on Trie.The characteristics of these methods are: look into a routing table and need carry out the several times compare operation, and the number of times of compare operation is not fixed.This just makes that the performance of tabling look-up is not high enough, nor enough stable.
TCAM is a kind of special-purpose Ternary Content Addressable Memory, can carry out fast a large amount of parallel searches, and the time of once searching is fixed.Therefore, in high-end router, select for use the TCAM chip to deposit routing table usually.The TCAM chip if a plurality of occurrences are arranged, generally all adopts minimum that of the preferential tactful hit address of low address when carrying out parallel search.Therefore, if select for use the TCAM chip to store routing table, when upgrading routing table, need make the IP prefix according to its length descending.
At present, the basic principle of the sort method of IP prefix based on TCAM commonly used can be classified as two classes: PLO_OPT algorithm and CAO_OPT algorithm.The PLO_OPT algorithm must be in the short clauses and subclauses front of prefix based on the long clauses and subclauses of two constraints (1) prefix when ordering; (2) two clauses and subclauses that prefix length is identical do not have sequence limit.The CAO_OPT algorithm also is based on two constraints when ordering: (1) clauses and subclauses on a prefix path must be arranged by the preface of successively decreasing; (2) the clauses and subclauses on a prefix path do not have sequence limit.These two kinds of thoughts respectively have the sorrow shortcoming, and the PLO_OPT algorithm is convenient to realize, but overall performance less than the CAO_OPT height, the CAO_OPT algorithm performance is higher, yet implements more complicated.
But in correlation technique, it is more to move number of times during based on list item in upgrading routing table of the management method of the routing table of PLO_OPT algorithm and CAO_OPT algorithm, has taken more resource and has spent the relative time of growing.
Summary of the invention
More and taken more resource and and spent the problem of the relative time of growing and propose the present invention at moving number of times in the correlation technique during based on list item in upgrading routing table of the management method of the PLO_OPT algorithm and the routing table of CAO_OPT algorithm, for this reason, main purpose of the present invention is to provide a kind of management method and device of routing table, one of to address the above problem at least.
To achieve these goals, according to an aspect of the present invention, provide a kind of management method of routing table.
Management method according to routing table of the present invention comprises: obtaining the prefix length of the list item that is inserted into routing table, wherein, in above-mentioned routing table, is the list item space Resources allocation of each prefix length according to Gaussian distribution model; In above-mentioned routing table, find first list item space corresponding with above-mentioned prefix length; The above-mentioned list item that is inserted into is inserted in the idling-resource in above-mentioned first list item space.
To achieve these goals, according to a further aspect in the invention, provide a kind of management devices of routing table.
Management devices according to routing table of the present invention comprises: acquisition module, be used to obtain the prefix length of the list item that is inserted into routing table, and wherein, in above-mentioned routing table, be the list item space Resources allocation of each prefix length according to Gaussian distribution model; Search module, be used for finding first list item space corresponding with above-mentioned prefix length in above-mentioned routing table; Insert module is used for the above-mentioned list item that is inserted into is inserted into idling-resource in above-mentioned first list item space.
According to the present invention, be the list item space Resources allocation of each prefix length in the routing table in advance according to Gaussian distribution model, in inserting the process of list item, adopt nearest neighbor algorithm then to seek idle resource, and in the process of remove entries, directly reclaim resource and do not do and move operation.In real network is used, have higher performance and adaptive ability in the routing table management system of setting up on these tactful bases, and reduced the shared resource and the time of cost.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the flow process according to the management method of the routing table of the embodiment of the invention;
Fig. 2 is the schematic diagram according to the prefix length equinoctial line of the embodiment of the invention;
Fig. 3 is the schematic diagram according to the direct insertion list item of the embodiment of the invention;
Fig. 4 applies for then that by nearest neighbor algorithm idle resource inserts the schematic diagram of list item according to the embodiment of the invention;
Fig. 5 is the structured flowchart according to the management devices of the routing table of the embodiment of the invention.
Embodiment
Hereinafter will describe the present invention with reference to the accompanying drawings and in conjunction with the embodiments in detail.Need to prove that under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Functional overview
More and taken more resource and spent the problem of the relative time of growing at moving number of times in the correlation technique during based on list item in upgrading routing table of the management method of the PLO_OPT algorithm and the routing table of CAO_OPT algorithm, the invention provides the management method and the device of routing table.In according to the solution of the present invention, be the list item space Resources allocation of each prefix length in the routing table in advance according to Gaussian distribution model, in inserting the process of list item, adopt nearest neighbor algorithm then to seek idle resource, and in the process of remove entries, directly reclaim resource and do not do and move operation.In real network is used, have higher performance and adaptive ability in the routing table management system of setting up on these tactful bases, and reduced the shared resource and the time of cost.
According to embodiments of the invention, provide a kind of management method of routing table.
Fig. 1 is the flow process according to the management method of the routing table of the embodiment of the invention.As shown in Figure 1, this method comprises that following step S102 is to step S106:
S102 obtains the prefix length of the list item that is inserted into routing table, wherein, in above-mentioned routing table, is the list item space Resources allocation of each prefix length according to Gaussian distribution model.
S104 finds first list item space corresponding with above-mentioned prefix length in above-mentioned routing table.
S106 is inserted into the above-mentioned list item that is inserted in the idling-resource in above-mentioned first list item space.
If there is idle resource in above-mentioned first list item space, then determine the position of above-mentioned first list item space in above-mentioned routing table, and search idle resource according to the direction of the position correspondence of determining, above-mentioned list item is inserted in first the idle resource that is found, wherein, above-mentioned position comprises first and second portion, and above-mentioned first is corresponding to first direction, above-mentioned second portion is corresponding to second direction, and above-mentioned first direction is opposite with above-mentioned second direction.
Preferably, the average according to above-mentioned Gaussian distribution model is divided into above-mentioned first and above-mentioned second portion with above-mentioned routing table.
If there is not idle resource in above-mentioned first list item space, judge then whether the list item space adjacent with above-mentioned first list item space exists idling-resource; Exist under the situation of idling-resource in the list item space adjacent, select a list item space that has idling-resource with above-mentioned first list item space; Direction along the position correspondence of this list item space in the above-mentioned list item space of selecting is searched idling-resource; The idling-resource at last that is found out is designated the idling-resource of above-mentioned first list item space, and above-mentioned list item is inserted in this idling-resource.
Preferably, one of above-mentioned selection exists the list item space of idling-resource to comprise: select the maximum list item space of idling-resource number in the list item space adjacent with above-mentioned first list item space.
If do not have idling-resource in the list item space adjacent, then select and the nearest and list item space that have idling-resource of above-mentioned first list item space with above-mentioned first list item space; Direction along the position correspondence of this list item space in the above-mentioned list item space of selecting finds last idling-resource; Will with above-mentioned first list item space the most contiguous and move to last idling-resource that is found with the list item that the list item space of selecting is arranged in the same side, with the pairing resource mark of this list item is the idling-resource of above-mentioned first list item space, and the list item that is inserted into is inserted in this idling-resource.
Nearest and the list item space that have idling-resource of above-mentioned selection and above-mentioned first list item space comprises: select with above-mentioned first list item space nearest and have a maximum list item space of idling-resource.
Above-mentioned first direction and above-mentioned second direction are all pointed to the position, boundary of above-mentioned first and above-mentioned second portion.
Subsequently, when remove entries, obtain the prefix length of list item to be deleted; In above-mentioned routing table, find second list item space corresponding with above-mentioned prefix length; Delete resource corresponding in above-mentioned second list item space with list item above-mentioned to be deleted.
Be described in detail below in conjunction with the implementation procedure of example the embodiment of the invention.
The invention provides a kind of method for managing route table based on TCAM, this method can obtain higher more new capability in the network environment of reality, so claim this method to have the network environment adaptive ability.This method is based on the PLO_OPT algorithm basic principle, and improved according to the characteristics of network environment, and the specific implementation step is: be that each prefix length is reserved certain table space during initialization (a), the strategy of reservation adopts Gaussian Profile; (b) when inserting list item, if there is idle resource in the table space of the prefix length correspondence of list item then directly inserts, if there is no then then seek the resource of a free time according to nearest neighbor algorithm, move operation then, insert list item at last again; (c) when remove entries, directly list item is deleted, corresponding prefix administrative unit reclaims this resource, do not carry out any operation of moving, She Ji foundation is like this, network environment is stable in the regular hour, the topology of networks that is network equipment place can not change in the regular hour, perhaps change very little, this just makes that the distribution of prefix length is stable within a certain period of time, during deletion, do not carry out and move operation, be equivalent to remember the distribution of prefix length, does not move operation when such design makes deletion, it is less to move operation when inserting once more.The present invention has also set up the high-performance routing table management system based on TCAM on the basis of this method, this system is made up of three parts: system start-up unit, system's stop element, system dynamics administrative unit.
The present invention is by the following technical solutions:
Method for managing route table can be based on the thought of PLO_OPT algorithm, and based on two constraints: (a) clauses and subclauses that prefix is long must come the short clauses and subclauses front of prefix; (b) two clauses and subclauses that prefix length is identical do not have sequence limit.
Routing table management system core is by the prefix administrative unit, the local cache table, and the initialization policy management element, update strategy administrative unit four parts are formed.
A route table items is made up of a key and a mask in TCAM, for example
Figure G2009101787564D0000071
The present invention with shape as route table items be called the IP prefix, the length of prefix is represented that by mask the length of the IP prefix in the example is 24.The all corresponding administrative unit of each prefix length, the main information of preserving in this administrative unit has: size, the original position of list item space in table of the list item space of reserving for this prefix length, the operating position of list item space etc.
When inserting an IP prefix, owing to need to guarantee to leave in all prefixes among the TCAM by the prefix length descending, at this moment may need the prefix that has deposited in is moved, because it is more consuming time to read the operation of TCAM, therefore, set up anticipatory remark ground cache table for the routing table among the TCAM in the present invention, direct reading of data from the local cache table just in the time of each like this moving.It is faster that the speed ratio of reader ground cache table is read among the TCAM speed of routing table, so just can further improve the performance of routing table update.
The strategy in configure reserved space when core content of the present invention is exactly initialization, and in the process of updating form (comprise insert list item and remove entries) strategy of how dynamic management list item space.
When initialization, come the size in configure reserved space, in Gaussian distribution model, have two parameters to need to set: μ (average) and δ (variance) according to Gaussian distribution model.Usually can estimate the priori value of these two parameters according to residing network environment.If without any priori value, can be provided with like this: the scope of IPV4 prefix length is [0,32], and length has 256 (2 at most less than 8 prefix 8Therefore=256) can be that 8 list item space is reserved 256 list item resources for prefix length.μ is set to 8 and 32 both medians then, and 6 δ=32-8 is set.
At first the length according to prefix finds its corresponding list item space when inserting prefix, if idle resource is arranged then directly insertion in the list item space, if there has not been idle resource in the list item space, and routing table less than, then then find the resource of a free time according to nearest neighbor algorithm, then this resource is moved the list item space of this prefix length correspondence, inserted this prefix.If have two equidistant neighbours that free space is all arranged when then seeking free space then select and apply for resource to the neighbours space of the resource that has the more free time according to nearest neighbor algorithm.
When remove entries, corresponding prefix administrative unit directly reclaims this resource, such way has two benefits: at first remove entries time operation is very simple, do not move operation, secondly after the residing network environment of router (topology of networks) is stable, think and distribute the prefix length of routing table also to tend towards stability be rational, directly reclaim the size that resource does not change the list item space of each prefix length correspondence in the time of deletion, be equivalent to keep the distributed model of routing table prefix length.Such processing has good effect in the network application of reality.
With reference to the accompanying drawings, the example that is updated to the IPv4 routing table is described in further detail the technical scheme according to the embodiment of the invention:
Before describing technical scheme in detail, at first introduce relevant basic conception.
1) Biao size: the size of the routing table of on TCAM, creating, represent the logic size of the big little finger of toe table of in the middle of following introduction, showing, the i.e. number of the prefix that can deposit with TableSize.
2) table space: the scope that in table, occupies, use TableSpace[low, high] expression
3) prefix administrative unit: each prefix length all corresponding a prefix administrative unit, forms by two parts information, the one, the table space of the prefix correspondence of this length, but the entry number that the prefix of this length has write, the note work:
Figure G2009101787564D0000091
I=0,1 ..., 32.I represents the length of prefix, the scope of prefix length [0,32] for the IPv4 routing table.
4) initialization policy management element: the table space that in system initialization, disposes a certain size for each prefix length according to the table space reservation policy.
5) update strategy administrative unit: the insertion deletion action of admin table guarantees that routing table is all the time according to the prefix length descending.
6) equinoctial line of prefix length: as shown in Figure 2, can see the prefix length equinoctial line from accompanying drawing 2, whole prefix ranges is divided into two parts, is called the bottom from minimum length to marginal range section, the part from the line of demarcation to the longest-prefix is called top.The maximum difference on bottom and top is a direction of inserting clauses and subclauses.Here, the position of prefix length equinoctial line can be arranged to corresponding with the average of described Gaussian distribution model, thereby described routing table is divided into described first and described second portion.But the present invention is not limited only to this, for example, can the position of prefix length equinoctial line is arranged to described Gaussian distribution model average near value corresponding.In addition, the direction of inserting clauses and subclauses in bottom and the top can be pointed to the prefix length equinoctial line.
The routing table management system mainly is made up of three big modules: system start-up unit, system's stop element and system dynamics administrative unit.Introduce the function of these three unit below respectively in detail and realize details.
1) system start-up unit
System start-up unit group is made up of three little functional modules: TCAM shows creation module, local cache table creation module, prefix administrative unit initialization module.
A) TCAM table creation module is called TCAM table establishment interface and create a routing table on the TCAM chip.
B) local cache table creation module, application one block space is used to deposit cache table on local internal memory.
C) prefix administrative unit initialization module is the prefix administrative unit of a correspondence of each prefix length application; Be the initial table space size of each prefix length configuration by the initialization policy management element according to Gaussian distribution model then.For Gauss model, two parameter μ and δ need be set.If the priori of network environment arranged then be provided with, if there is not priori to be provided with according to the acquiescence mode according to priori.
2) system's stop element
System's stop element is mainly finished: destroy the routing table on the TCAM chip, discharge the shared memory headroom of local cache table and destroy the prefix administrative unit.
3) system dynamics administrative unit
The system dynamics administrative unit is made up of two modules: list item insert module and list item removing module.
The handling process of list item insert module is as follows:
1) judges whether table is full, if full then return failure
2) call the insertion position that the update strategy administrative unit is calculated list item, and finish to deposit in list item move operation and to the insertion work of new interpolation list item,
Detailed process is: obtain the prefix length of list item, find corresponding prefix administrative unit then, judge whether to also have the resource of free time according to the information of list item space in the prefix administrative unit.If have, then from these idle resources, apply for one, insert this list item then, as shown in Figure 3.Preferably, search according to the pairing direction in the position of this list item space whether idling-resource is arranged in this list item space, this position can comprise the upper and lower, wherein, top is corresponding to first direction, the corresponding second direction in bottom, and first direction is opposite with second direction, as shown in Figure 2.For example, list item can be inserted in first idling-resource that is found.
If there is not idle resource, then according to nearest neighbor algorithm then to the resource of free time of table space application of the most contiguous prefix administrative unit that idle resource arranged, move the table space of oneself by the resource of moving the free time that operation will apply for then, at last list item is inserted, as shown in Figure 4.
With Fig. 4 is example, specifically comprises the steps: according to the management method of the routing table of the embodiment of the invention
1) prefix length that obtains the list item that is inserted into routing table is 5.
2) in routing table, search the list item space prefix5 corresponding with prefix length.
3) it is full to judge list item space prefix5, does not have idling-resource.
4) search list item space prefix4 and the prefix6 adjacent, find that prefix4 and prefix6 do not have idling-resource equally with list item space prefix5.
At this moment,, then select one of them,, can select that maximum list item space of idling-resource here as list item space to be found if list item space prefix4 and prefix6 all have idling-resource.Direction along the position correspondence of this list item space in the above-mentioned list item space of selecting is searched idling-resource, and the idling-resource at last that is found out is designated the idling-resource of above-mentioned list item space prefix5, and the list item that is inserted into is inserted in this idling-resource.
5) find nearest and list item space prefix3 and prefix7 that have idling-resource with list item space prefix5.
Finding prefix7 and prefix3 all has idling-resource, because prefix3 has three idling-resources, two idling-resources of prefix7, at this moment, preferred, can select to the more list item space application of idling-resource, that is, determine in list item space prefix3, to ask an idling-resource.Can search idling-resource along the pairing direction in the position of prefix3, preferred, can be with last idling-resource that finds, for example call number is 19 idling-resource, as idling-resource to be applied for.
6) move idling-resource.Can with the list item space corresponding (prefix5) with the list item that is inserted into the most contiguous and move to last idling-resource that is found with the list item that the list item space of selecting (list item space prefix3) is positioned at the same side.For example, be that index that list item on 13 the resource is moved prefix3 is 19 Energy Resources Service with index among the prefix4.
7) be that 13 resource mark is the idling-resource of prefix5 with the index of former prefix4, and the list item that is inserted into be inserted in the resource of index 13.
The handling process of list item removing module is as follows:
1) obtains the prefix length of the list item that will delete, find corresponding prefix administrative unit, revise the EntryNum value according to prefix length.
2) list item is directly deleted
In the network environment of a reality, gather the routing table information of IPv4, list the distribution situation of IP prefix length below with table 1:
Table 1
Prefix length (bit) The number of prefix
??2 ??1
??8 ??19
??9 ??9
??10 ??15
??11 ??35
??12 ??126
??13 ??248
??14 ??463
??15 ??885
??16 ??9461
??17 ??3978
??18 ??6414
??19 ??13556
??20 ??16315
??21 ??14368
??22 ??18459
??23 ??19602
??24 ??117088
??25 ??351
??26 ??254
??27 ??220
??28 ??156
Prefix length (bit) The number of prefix
??29 ??184
??30 ??23
??31 ??39
??32 ??7
All prefix lengths ??222276
At the aspect of performance of update method, with original PLO_OPT algorithm with the method that the present invention proposes top route prefix is write routing table entry respectively, add up the number of times of moving altogether, the result is as shown in table 2:
Table 2
Figure G2009101787564D0000131
Aspect the network self-adapting ability, all list items in the deletion routing table, and then insert original data again, corresponding result is as shown in table 3:
Table 3
Algorithm types Parameter is provided with Move number of times
Original PLO_OPT algorithm Do not have 1184855 times
Method of the present invention 0 time
Produce the network self-adapting ability that experiment sample is verified the method that the present invention proposes with the equiprobability randomizer below.
1) for the first time synchronous routing table, corresponding experimental data is as shown in table 4:
Table 4
Algorithm types Parameter is provided with Move number of times
Original PLO_OPT algorithm Do not have 1725790 times
Method of the present invention Default setting 1328757 times
2) for the second time synchronous routing table (earlier the clauses and subclauses in the routing table all being deleted synchronous again routing table), corresponding experimental data is as shown in table 5:
Table 5
Algorithm types Parameter is provided with Move number of times
Original PLO_OPT algorithm Do not have 1725331 times
Method of the present invention Default setting 6160 times
3) synchronous for the third time routing table (earlier the clauses and subclauses in the routing table all being deleted synchronous again routing table), corresponding experimental data is as shown in table 6:
Table 6
Algorithm types Parameter is provided with Move number of times
Original PLO_OPT algorithm Do not have 1723187 times
Method of the present invention Default setting 7717 times
Can see from result of upper experiment, stable, then very good as long as the distribution of prefix length keeps according to the performance of method after first subsynchronous routing table of the embodiment of the invention.This has just verified that also method of the present invention can remember the distribution of prefix length, thereby has the network environment adaptive ability.
According to the embodiment of the invention, be the list item space Resources allocation of each prefix length in the routing table in advance according to Gaussian distribution model, in inserting the process of list item, adopt nearest neighbor algorithm then to seek idle resource, and in the process of remove entries, directly reclaim resource and do not do and move operation.In real network is used, have higher performance and adaptive ability in the routing table management system of setting up on these tactful bases, and reduced the shared resource and the time of cost.
According to embodiments of the invention, provide a kind of management devices of routing table.
Fig. 5 is the structured flowchart according to the management devices of the routing table of the embodiment of the invention.As shown in Figure 5, this device comprises: acquisition module 502, be used to obtain the prefix length of the list item that is inserted into routing table, and wherein, in described routing table, be the list item space Resources allocation of each prefix length according to Gaussian distribution model; Search module 504, be used for finding first list item space corresponding with described prefix length in described routing table; Insert module 506 is used for the described list item that is inserted into is inserted into idling-resource in described first list item space.
Described device also comprises: distribution module 508 is used for according to the list item space Resources allocation of Gaussian distribution model for each prefix length.
If there is idle resource in above-mentioned first list item space, then determine the position of above-mentioned first list item space in above-mentioned routing table, and search module 504 and search idle resource according to the direction of the position correspondence of determining, insert module 506 is inserted into above-mentioned list item in first the idle resource that is found, wherein, above-mentioned position comprises first and second portion, above-mentioned first is corresponding to first direction, above-mentioned second portion is corresponding to second direction, and above-mentioned first direction is opposite with above-mentioned second direction.
Preferably, distribution module 508 is divided into above-mentioned first and above-mentioned second portion according to the average of above-mentioned Gaussian distribution model with above-mentioned routing table, as shown in Figure 2.
If there is not idle resource in above-mentioned first list item space, judge then whether the list item space adjacent with above-mentioned first list item space exists idling-resource; Exist under the situation of idling-resource in the list item space adjacent, select a list item space that has idling-resource with above-mentioned first list item space; Search module 504 direction along the position correspondence of this list item space in the above-mentioned list item space of selecting and search idling-resource; The idling-resource at last that is found out is designated the idling-resource of above-mentioned first list item space, and insert module 506 is inserted into above-mentioned list item in this idling-resource.
Preferably, one of above-mentioned selection exists the list item space of idling-resource to comprise: select the maximum list item space of idling-resource number in the list item space adjacent with above-mentioned first list item space.
If do not have idling-resource in the list item space adjacent, then select and the nearest and list item space that have idling-resource of above-mentioned first list item space with above-mentioned first list item space; Search module 504 direction along the position correspondence of this list item space in the above-mentioned list item space of selecting and find last idling-resource; Will with above-mentioned first list item space the most contiguous and move to last idling-resource that is found with the list item that the list item space of selecting is arranged in the same side, with the pairing resource mark of this list item is the idling-resource of above-mentioned first list item space, and insert module 506 is inserted into the list item that is inserted in this idling-resource.
Nearest and the list item space that have idling-resource of above-mentioned selection and above-mentioned first list item space comprises: select with above-mentioned first list item space nearest and have a maximum list item space of idling-resource.
Above-mentioned first direction and above-mentioned second direction are all pointed to the position, boundary of above-mentioned first and above-mentioned second portion.
Subsequently, when remove entries, acquisition module 502 obtains the prefix length of list item to be deleted; Search module 504 and in above-mentioned routing table, find second list item space corresponding with above-mentioned prefix length; The removing module (not shown) is deleted resource corresponding with list item above-mentioned to be deleted in above-mentioned second list item space.
According to the present invention, be the list item space Resources allocation of each prefix length in the routing table in advance according to Gaussian distribution model, in inserting the process of list item, adopt nearest neighbor algorithm then to seek idle resource, and in the process of remove entries, directly reclaim resource and do not do and move operation.In real network is used, have higher performance and adaptive ability in the routing table management system of setting up on these tactful bases, and reduced the shared resource and the time of cost.
Need to prove, can in computer system, carry out in the step shown in the flow chart of accompanying drawing such as a set of computer-executable instructions, and, though there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the storage device and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (11)

1. the management method of a routing table is characterized in that, comprising:
Obtaining the prefix length of the list item that is inserted into routing table, wherein, in described routing table, is the list item space Resources allocation of each prefix length according to Gaussian distribution model;
In described routing table, find first list item space corresponding with described prefix length;
The described list item that is inserted into is inserted in the idling-resource in described first list item space.
2. method according to claim 1 is characterized in that, described described list item is inserted in the idling-resource in described first list item space comprises:
If there is idle resource in described first list item space, then determine the position of described first list item space in described routing table, and search idle resource according to the direction of the position correspondence of determining, described list item is inserted in first the idle resource that is found, wherein, described position comprises first and second portion, and described first is corresponding to first direction, described second portion is corresponding to second direction, and described first direction is opposite with described second direction.
3. method according to claim 2 is characterized in that, wherein, according to the average of described Gaussian distribution model described routing table is divided into described first and described second portion.
4. method according to claim 2 is characterized in that, described described list item is inserted in the idling-resource in described first list item space comprises:
If there is not idle resource in described first list item space, judge then whether the list item space adjacent with described first list item space exists idling-resource;
Exist under the situation of idling-resource in the list item space adjacent, select a list item space that has idling-resource with described first list item space;
Direction along the position correspondence of this list item space in the described list item space of selecting is searched idling-resource;
The idling-resource at last that is found out is designated the idling-resource of described first list item space, and described list item is inserted in this idling-resource.
5. method according to claim 4 is characterized in that, one of described selection exists the list item space of idling-resource to comprise:
In the list item space adjacent, select the maximum list item space of idling-resource number with described first list item space.
6. method according to claim 4 is characterized in that, describedly described list item is inserted in described first list item space idle resource also comprises:
If do not have idling-resource in the list item space adjacent, then select and the nearest and list item space that have idling-resource of described first list item space with described first list item space;
Direction along the position correspondence of this list item space in the described list item space of selecting finds last idling-resource;
Will with described first list item space the most contiguous and move to last idling-resource that is found with the list item that the list item space of described selection is arranged in the same side, with the pairing resource mark of this list item is the idling-resource of described first list item space, and the list item that is inserted into is inserted in this idling-resource.
7. method according to claim 6 is characterized in that, the nearest and list item space that have idling-resource of described selection and described first list item space comprises:
Select with described first list item space nearest and have a maximum list item space of idling-resource.
8. according to each described method in the claim 2 to 7, it is characterized in that described first direction and described second direction are all pointed to the position, boundary of described first and described second portion.
9. according to each described method in the claim 2 to 7, it is characterized in that described method also comprises:
When remove entries, obtain the prefix length of list item to be deleted;
In described routing table, find second list item space corresponding with described prefix length;
Delete resource corresponding in described second list item space with list item described to be deleted.
10. the management devices of a routing table is characterized in that, comprising:
Acquisition module is used to obtain the prefix length of the list item that is inserted into routing table, wherein, in described routing table, is the list item space Resources allocation of each prefix length according to Gaussian distribution model;
Search module, be used for finding first list item space corresponding with described prefix length in described routing table;
Insert module is used for the described list item that is inserted into is inserted into idling-resource in described first list item space.
11. device according to claim 10 is characterized in that, described device also comprises:
Distribution module is used for according to the list item space Resources allocation of Gaussian distribution model for each prefix length.
CN2009101787564A 2009-09-25 2009-09-25 Management method and management device for routing table Expired - Fee Related CN101692653B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2009101787564A CN101692653B (en) 2009-09-25 2009-09-25 Management method and management device for routing table
PCT/CN2010/071889 WO2010145295A1 (en) 2009-09-25 2010-04-19 Method and apparatus for managing a route table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101787564A CN101692653B (en) 2009-09-25 2009-09-25 Management method and management device for routing table

Publications (2)

Publication Number Publication Date
CN101692653A true CN101692653A (en) 2010-04-07
CN101692653B CN101692653B (en) 2012-04-04

Family

ID=42081311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101787564A Expired - Fee Related CN101692653B (en) 2009-09-25 2009-09-25 Management method and management device for routing table

Country Status (2)

Country Link
CN (1) CN101692653B (en)
WO (1) WO2010145295A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010145295A1 (en) * 2009-09-25 2010-12-23 中兴通讯股份有限公司 Method and apparatus for managing a route table
CN105262684A (en) * 2015-10-23 2016-01-20 首都师范大学 Real-time dynamic decomposition storage method for routing table and route data forwarding method
CN105939264A (en) * 2015-08-13 2016-09-14 杭州迪普科技有限公司 Routing management method and device
CN107729053A (en) * 2017-10-17 2018-02-23 安徽皖通邮电股份有限公司 A kind of method for realizing cache tables

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3269100A4 (en) 2015-07-17 2018-10-31 Hewlett-Packard Enterprise Development LP Combining prefix lengths into a hash table
US10917345B2 (en) 2015-07-17 2021-02-09 Hewlett Packard Enterprise Development Lp Generating a hash table in accordance with a prefix length

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101039252B (en) * 2006-03-15 2012-05-23 中兴通讯股份有限公司 Method for managing route table of ternary content addressable memory
CN100486227C (en) * 2006-10-31 2009-05-06 成都迈普产业集团有限公司 Method for searching route table
US7706375B2 (en) * 2007-02-06 2010-04-27 Alcatel Lucent System and method of fast adaptive TCAM sorting for IP longest prefix matching
CN101335706B (en) * 2008-07-21 2011-08-17 北京星网锐捷网络技术有限公司 Route table space managing method, apparatus, switch and router
CN101692653B (en) * 2009-09-25 2012-04-04 中兴通讯股份有限公司 Management method and management device for routing table

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010145295A1 (en) * 2009-09-25 2010-12-23 中兴通讯股份有限公司 Method and apparatus for managing a route table
CN105939264A (en) * 2015-08-13 2016-09-14 杭州迪普科技有限公司 Routing management method and device
CN105262684A (en) * 2015-10-23 2016-01-20 首都师范大学 Real-time dynamic decomposition storage method for routing table and route data forwarding method
CN105262684B (en) * 2015-10-23 2018-05-04 首都师范大学 The real-time dynamic Decomposition storage method and route data forwarding method of routing table
CN107729053A (en) * 2017-10-17 2018-02-23 安徽皖通邮电股份有限公司 A kind of method for realizing cache tables
CN107729053B (en) * 2017-10-17 2020-11-27 安徽皖通邮电股份有限公司 Method for realizing high-speed cache table

Also Published As

Publication number Publication date
WO2010145295A1 (en) 2010-12-23
CN101692653B (en) 2012-04-04

Similar Documents

Publication Publication Date Title
US6490592B1 (en) Method of and apparatus for generating a tree data structure supporting longest match lookup
CN101692653B (en) Management method and management device for routing table
CN100574281C (en) A kind of management method of switch routing table
CN109284299B (en) Method for reconstructing a hybrid index with storage awareness
KR100745693B1 (en) Method for ternary contents address memory table management
CN100566281C (en) The method and apparatus of virtual private network routing search
CN104778222B (en) Media library based on USB storage device is established and update method
CN102117278A (en) Linked list create method and system and data search method and system
CN100536435C (en) Binary tree-based stream classification checking method
CN105512229B (en) A kind of storage, querying method and the device of the regional information of IP address
US20100228914A1 (en) Data caching system and method for implementing large capacity cache
WO2006099186A2 (en) Information retrieval architecture for packet classification
CN102291296A (en) Updating method and system of routing table
CN101620623A (en) Method and device for managing list item of content addressable memory CAM
KR20000027489A (en) Method of inserting higher dimension index structure
CN101277252A (en) Method for traversing multi-branch Trie tree
CN110191135B (en) ACL configuration method, device and electronic equipment
CN100397816C (en) Method for classifying received data pocket in network apparatus
CN110995876B (en) Method and device for storing and searching IP
Yu et al. KDB/sub KD/-tree: A compact KDB-tree structure for indexing multidimensional data
CN103246718A (en) Method, device and equipment for accessing files
US8924640B2 (en) Dynamic allocation of records to clusters in a ternary content addressable memory
CN111190545B (en) Method for carrying out LPM rule compression storage on trie structure based on software implementation
Lin et al. A multi-index hybrid trie for lookup and updates
CN111291058A (en) Method for optimizing storage LPM (low power management) rule based on hierarchical pc-trie structure

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
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: 20120404

Termination date: 20190925