CN102291296B - The update method of a kind of routing table and system - Google Patents
The update method of a kind of routing table and system Download PDFInfo
- Publication number
- CN102291296B CN102291296B CN201110222783.4A CN201110222783A CN102291296B CN 102291296 B CN102291296 B CN 102291296B CN 201110222783 A CN201110222783 A CN 201110222783A CN 102291296 B CN102291296 B CN 102291296B
- Authority
- CN
- China
- Prior art keywords
- memory block
- routing table
- resource
- route
- place
- 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
Links
Abstract
The invention discloses update method and the system of a kind of routing table, described update method is applied in three-state content addressing memory (TCAM), including: the storage resource being used for depositing routing table in described TCAM is divided into the first memory block for depositing IPV4 routing table, the second memory block being used for depositing IPV6 routing table and the 3rd memory block;When there being route table items to need to be inserted into described TCAM, if the remaining space of the memory block, routing table place that described route table items is corresponding is not enough, after being then divided to the resource of the small part resource memory block, routing table place corresponding as described route table items from described 3rd memory block, described route table items is added in the memory block, routing table place of correspondence.After using the present invention, on the basis of taking into account routing table update performance, improve the utilization rate of TCAM resource, and increase the capacity of routing table to a certain extent.
Description
Technical field
The present invention relates to the network equipment such as router, switch, particularly relate to update method and the system of a kind of routing table.
Background technology
Router, switch are the nucleus equipments of networking, and most basic, the most crucial function of these equipment is exactly basic turning
Send out.Basic forwarding capability realizes by searching routing table, therefore search the performance of routing table directly affect router,
The performance of switch.The lookup of routing table is the principle according to longest prefix match.The conventional side realizing longest prefix match
Method has method based on hash (Hash) table and method based on Trie (key tree) table.The feature of these methods is: Cha Yici road
Needed to compare operation several times by table, and the number of times comparing operation is unfixed.This allows for the performance tabled look-up not
Height, nor enough stable.
TCAM (Ternary Content Addressable Memory, three-state content addressing memory) is a kind of special
Memorizer, rapid, high volume parallel search can be carried out, and the time once searched is fixing.Therefore, in high-end route
Device is generally selected TCAM chip deposit routing table.At present, TCAM chip price is relatively expensive, and finite capacity, because of
If this uses TCAM chip to deposit routing table, routing capacity becomes as a great problem.
For this problem, Patents gives some resolving ideas, such as Application No. CN201010233044.0
Disclosure of the invention a kind of route forwarding table capacity extension implementation method, device and switching equipment, be divided into two classes by route table items, will
The intra-area routes forwarding-table item produced by Interior Gateway Protocol leaves in TCAM, the Yu Jian road that will be produced by Exterior Gateway Protocol
Left in mass storage by forwarding-table item.First look into TCAM when of lookup, look into massive store again without hit
Device.The method can solve capacity problem really, but route querying performance is also lost much.Application No.
The invention of CN200910236687.8 provides addressing method and the device of a kind of three-state content addressable memory TCAM, uses
Dynamically distribute the thinking in TCAM space, have certain effect for improving the utilization rate of TCAM chip.But TCAM chip itself
Having some to limit in configuration, it is medium that the table of such as different in width can not be placed on a block.
At present, router the most all can support that IPV4 and IPV6 route simultaneously, if IPV4 and IPV6 is route this two
Open routing table to leave on TCAM simultaneously, owing to the table of above two type is restricted to the position of respective list item, such as, route
Table needs to follow longest prefix match method, and this just requires that list item to be ranked up according to route prefix.If whole TCAM is
Using the mode in above-mentioned dynamic distribution TCAM space, the more new capability of list item can be affected.In order to ensure more new capability, as adopted
By the mode in static allocation TCAM space, for example, IPV4 distributes 800,000 route table items spaces, distributes 200,000 routing tables for IPV6
Item space, then considerably less when route table items certain type of under certain network environment, when such as IPV6 only has tens list items,
Owing to using static allocation mode, IPV4 at most can only support 800,000, and the TCAM space of IPV6 just wastes.
Summary of the invention
It is an object of the invention to provide update method and the system of a kind of routing table, to take into account routing table update performance
On the basis of realize the dynamic adjustment of IPV4 and IPV6 routing list capacity.
For solving the problems referred to above, the invention provides the update method of a kind of routing table, be applied to three-state content addressing and deposit
In reservoir (TCAM), including:
The storage resource being used for depositing routing table in described TCAM is divided into and first deposits for deposit IPV4 routing table
Storage area, for depositing the second memory block and the 3rd memory block of IPV6 routing table;
When there being route table items to need to be inserted into described TCAM, if the memory block, routing table place that described route table items is corresponding
Remaining space not enough, then from described 3rd memory block, be divided to small part resource as route corresponding to described route table items
After the resource of memory block, table place, described route table items is added in the memory block, routing table place of correspondence.
Further, said method also includes:
If the remaining space of the memory block, routing table place that described route table items is corresponding is not enough, and described 3rd memory block does not has
There is surplus resources to be available for dividing, then in the memory block for depositing another routing table, be divided to the available resources that small part is idle
As the resource of memory block, routing table place corresponding to described route table items to, then described route table items is added the road of correspondence
By in memory block, table place.
Further, said method also includes:
If the available resources also not having the free time in the described memory block for deposit another routing table are available for dividing, then add
The failure of described route table items.
Further,
The capacity of described 3rd memory block is 0.
Further,
Described the storage resource being used for depositing routing table in described TCAM is divided into for deposit IPV4 routing table
One memory block, for depositing the second memory block and the 3rd memory block of IPV6 routing table, specifically include:
In described TCAM in all Resource Block corresponding to storage resource depositing routing table, by part resource block
It is set to the first memory block for depositing IPV4 routing table, is set to part resource block second deposit for deposit IPV6 routing table
Storage area, is set to the 3rd memory block by surplus resources block;
Resource Block in described first memory block and the second memory block is drawn according to the type of the routing table stored respectively
It is divided into multiple route prefix unit;Wherein, in same memory block, different route prefix unit are for storing different length
Route table items.
Further,
Described when there being route table items to need to be inserted into described TCAM, that described route table items is corresponding routing table place storage
The remaining space in district is not enough, specifically includes:
When there being route table items to need to be inserted into described TCAM, in the memory block, routing table place that described route table items is corresponding
In, the surplus resources in the route prefix unit that the length of described route table items is corresponding is not enough, and described route table items is corresponding
The summation of the surplus resources of other route prefix unit in memory block, routing table place is the most not enough.
Further,
The described idle available resources of small part that are divided in the memory block for depositing another routing table are as described
The resource of the memory block, routing table place that route table items is corresponding, specifically includes:
In the described each route prefix unit corresponding for the memory block depositing another routing table, filter out at least partly
Idling-resource in route prefix unit;Wherein, the size of the idling-resource filtered out is resource block size in described TCAM
Integral multiple;
Then the described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding.
Further,
The described idling-resource filtered out at least part of route prefix unit, specifically includes:
In the described each route prefix unit corresponding for the memory block depositing another routing table, from neighbouring described route
The route prefix unit of the storage position of the memory block, routing table place that list item is corresponding starts, and adds up each route prefix unit successively
The value of middle idling-resource;During until the value of the idling-resource being accumulated to is more than or equal to the integral multiple of TCAM resource block size, by institute
State accumulate to idling-resource move to depositing near memory block, routing table place corresponding to described route table items in this memory block
Storage space is put.
Further,
Described the described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding,
Specifically include:
The described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding and leans on most
The storage position of memory block, nearly described idling-resource place and idling-resource are not in the route prefix unit of 0.
Correspondingly, present invention also offers the renewal system of a kind of routing table, including:
Divide module, for the storage resource being used for depositing routing table in three-state content addressing memory (TCAM) being divided
For for depositing the first memory block of IPV4 routing table, for depositing the second memory block and the 3rd memory block of IPV6 routing table;
Adjusting module, is used for when there being route table items to need to be inserted into described TCAM, if the road that described route table items is corresponding
Not enough by the remaining space of memory block, table place, then from described 3rd memory block, it is divided to small part resource as described route
After the resource of the memory block, routing table place that list item is corresponding to, described route table items is added the memory block, routing table place of correspondence
In.
Further,
The residue that described adjusting module is additionally operable to judging memory block, routing table place that described route table items is corresponding is empty
Between not enough, and when described 3rd memory block does not has surplus resources to be available for dividing, in the memory block for depositing another routing table
It is divided to the small part idle available resources resource as memory block, routing table place corresponding to described route table items, then will
Described route table items adds in the memory block, routing table place of correspondence.
Further,
Described division module is for being divided into the storage resource being used for depositing routing table in described TCAM for depositing
First memory block of IPV4 routing table, for depositing the second memory block and the 3rd memory block of IPV6 routing table, specifically include:
Described division module is for being used for depositing all resources corresponding to storage resource of routing table in described TCAM
In block, part resource block is set to the first memory block for depositing IPV4 routing table, part resource block is set to for depositing
Second memory block of IPV6 routing table, is set to the 3rd memory block by surplus resources block;
It is additionally operable to the Resource Block in described first memory block and the second memory block respectively according to the routing table stored
Type division is multiple route prefix unit;Wherein, in same memory block, different route prefix unit are used for storing difference
The route table items of length.
Further,
Described division module is for when there being route table items to need to be inserted into described TCAM, it is judged that described route table items pair
The remaining space of the memory block, routing table place answered is not enough, specifically includes:
Described division module is for when there being route table items to need to be inserted into described TCAM, it is judged that at described route table items
In corresponding memory block, routing table place, the surplus resources in the route prefix unit that the length of described route table items is corresponding is not
The summation of the surplus resources of other route prefix unit in foot, and memory block, routing table place corresponding to described route table items is also
Not enough.
Further,
Described adjustment unit is for being divided to idle can use of small part in the memory block for depositing another routing table
Resource, as the resource of memory block, routing table place corresponding to described route table items, specifically includes:
Described adjustment unit is at the described each route prefix unit corresponding for the memory block depositing another routing table
In, filter out the idling-resource at least part of route prefix unit;Wherein, the size of the idling-resource filtered out is described
The integral multiple of resource block size in TCAM;
Then the described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding.
Further,
Described adjustment unit, for filtering out the idling-resource at least part of route prefix unit, specifically includes:
Described adjustment unit is at the described each route prefix unit corresponding for the memory block depositing another routing table
In, from the beginning of the route prefix unit of the storage position of the routing table place memory block corresponding adjacent to described route table items, successively
The value of idling-resource in accumulative each route prefix unit;Until the value of the idling-resource being accumulated to is big more than or equal to TCAM Resource Block
During little integral multiple, by described accumulation to idling-resource move to route corresponding near described route table items in this memory block
The storage position of memory block, table place.
Further,
Described adjustment unit is for being inserted into, by the described idling-resource filtered out, the routing table that described route table items is corresponding
In memory block, place, specifically include:
Described adjustment unit is for being inserted into, by the described idling-resource filtered out, the routing table that described route table items is corresponding
In memory block, place near memory block, described idling-resource place storage position and idling-resource be not 0 route prefix
In unit.
Use after the present invention, on the basis of taking into account routing table update performance, improve the utilization rate of TCAM resource, and
Increase the capacity of routing table to a certain extent.
Accompanying drawing explanation
Fig. 1 (a) and 1 (b) are to initialize space configuration schematic diagram in the embodiment of the present invention;
Fig. 2 is the update method flow chart of routing table in the embodiment of the present invention;
Fig. 3 (a)~3 (c) are the schematic diagram carrying out idling-resource compression in the embodiment of the present invention;
Fig. 4 is the schematic diagram of idle resource search method in the embodiment of the present invention;
Fig. 5 is idle resource searching schematic flow sheet in the embodiment of the present invention;
Fig. 6 (a) and 6 (b) are idling-resource moving method schematic diagram in the embodiment of the present invention.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case of not conflicting, in embodiment in the application and embodiment
Feature can mutual combination in any.
The present embodiment illustrates mainly for the situation depositing IPV4 routing table and IPV6 routing table on TCAM simultaneously, logical
Cross and IPV4 routing table and IPV6 routing table are shared the mode in TCAM space reach to improve TCAM utilization and regulation routing table
The purpose of capacity.
The update method of routing table, is applied in TCAM, including:
Step 10, the storage resource being used for depositing routing table in TCAM is divided into for deposit IPV4 routing table first
Memory block, for depositing the second memory block and the 3rd memory block of IPV6 routing table;When implementing, the 3rd memory block
Capacity can be 0, is i.e. only divided into the first memory block and the second memory block in the TCAM space depositing routing table.
Step 20, when there being list item to need the routing table being inserted into correspondence, if the memory block, routing table place of this correspondence
Remaining space is not enough, then be divided to the small part resource money as the memory block, routing table place of this correspondence from the 3rd memory block
Behind source, this list item is added in the current residual resource of memory block, routing table place of this correspondence.
If step 30 the 3rd memory block does not has surplus resources to be available for dividing, then in the storage for depositing another routing table
District is divided to the small part idle available resources resource as the memory block, routing table place of this correspondence, and this list item is added
It is added in the current residual resource of memory block, routing table place of this correspondence.
If step 40 does not also have the available resources of free time to be available for dividing in the memory block depositing another kind of routing table,
Then add this list item failure.
When carrying out list item and deleting, directly corresponding list item can be deleted from corresponding routing table, and not trigger routing table
The regulation of capacity.The most both ensure that renewal efficiency during deletion, also achieved by the route table items issued to drive routing table
The effect that capacity adjusts automatically, improves the utilization rate of TCAM.
With reference to the accompanying drawings, the enforcement to technical scheme is described in further detail.
Assume that the TCAM space size shared by IPV4 routing table is SIPV4, the TCAM space shared by IPV6 routing table is big
Little for SIPV6, the TCAM space size that two routing tables of IPV4 and IPV6 can take altogether is Stotal.When to being used for depositing road
When being used the mode of static allocation by the TCAM space of table, SIPV4And SIPV6It is fixing value, and meets Stotal=SIPV4+SIPV6。
S after using routing list capacity dynamically to adjust modeIPV4And SIPV6Value be dynamically change, its scope is all [0
Stotal]。
First delimiting one piece of storage resource on TCAM, its size is Stotal, then this storage resource is divided into three
Point, as shown in Fig. 1 (a), it being denoted as A, B, C respectively, A Yu IPV6 routing table is bound, C Yu IPV4 routing table is bound, and B is as idle empty
Between, it may be assumed that A is used for storing IPV6 routing table, and C is used for storing IPV4 routing table.Free space B IPV4 and IPV6 to be positioned at routing table
Between, it is also possible to free space is dimensioned to 0, and the most not allocation of free space, as shown in Fig. 1 (b).
As in figure 2 it is shown, when needs insert a list item to table 1 (assuming IPV6 routing table), first judge table 1 place
TCAM resource the most available free for memory block A, if had, inserts this list item to table 1, without then judging free space B
Whether also has surplus resources;If having, applying for that at least part of resource is added in table 1 to free space B, then inserting to table 1
This list item;If free space B does not has surplus resources yet, then judge whether memory block C also has enough available free time
Resource, if having, using the most available idling-resource to memory block C and joining in the A of memory block, then to memory block A
In routing table insert this list item;If memory block C does not has idling-resource yet, then this inserts list item failure.
The resource being used for storing in the memory block of certain routing table is being divided into the memory block for storing another routing table
Time middle, need first the memory block being divided resource to be carried out idling-resource compression.Referring herein to idling-resource compression refer to
Search for the idling-resource of this memory block being divided resource, then this idling-resource is moved this memory block being divided resource
The step of one end.
In order to ensure the more new capability of routing table, the present embodiment uses prior art to be route prefix and reserves certain TCAM
The strategy of resource manages routing table, and this makes shown in IPV4 or IPV6 routing table distribution on TCAM such as accompanying drawing 3 (a), road
Alternately arranged with idling-resource by list item, effect such as Fig. 3 (b) to be reached after using idling-resource compression algorithm and 3 (c) institute
Show, i.e. by the search to the idling-resource in the memory block being divided resource, a part of idling-resource is moved this storage
The one end in district, i.e. Fig. 3 (b) are to the design sketch after memory block A carries out idling-resource compression in Fig. 1 (a), and Fig. 3 (c) is to Fig. 1
Design sketch a memory block C carries out idling-resource compression in () after.
Idling-resource compression is divided into two steps and carries out: one is by the screening of idling-resource, and two are by removing of idling-resource
Move.
Owing to using strategy of leaving a blank that routing table is managed, therefore after TCAM is carried out space division, more respectively will
Resource Block in above-mentioned first memory block and the second memory block is multiple road according to the Type division of the routing table stored respectively
By prefix unit.The length of the IPV4 route table items of each route prefix unit storage in the first memory block is different;Second storage
The length of the IPV6 route table items of each route prefix unit storage in district is different.Therefore, each memory block route prefix unit
Number is relevant with the type of the routing table of storage, can be divided into 33 route prefix unit, the second memory block in the first memory block
129 route prefix unit can be divided into.
Each storage has the route prefix unit of the route table items (also can become route prefix) of corresponding length to be accounted for by list item
Form with part valid (i) and idling-resource part free (i), be denoted as { valid (1), free (1) } the most respectively
{ valid (2), free (2) } ... { valid (i), free (i) } ... { valid (n), free (n) }.Wherein, i=1,2 ..., n, n
=33 or 129.Certainly, when being not inserted into the route table items of corresponding length in certain route prefix unit, the list item in this unit accounts for
The space taken by part is 0;When certain route prefix unit has stuck with the route table items of corresponding length, the sky in this unit
The space that not busy resource part takies is 0.
Below to illustrate, to as a example by memory block A carries out idling-resource compression in Fig. 1 (a), the flow process that idling-resource compresses.
Idling-resource screening use nearby principle, as shown in Figure 4, the memory block being divided resource is carried out from low address to
The search of high address, finally determines the spatial dimension needing to carry out idling-resource compression.This search procedure can be by an iteration
Process describes, as it is shown in figure 5, j represents the index of route prefix unit, free_num represents tiring out of the idling-resource searched
Value added, need size block_num of the idling-resource used to represent, the initial value of iterative process is set to free_num=
0, j=n, the stop condition of iterative process is to find abundant idling-resource (i.e. free_num >=block_num) or
Through complete memory block being divided resource of traversal.It is assured that by this iterative process and needs to carry out idling-resource compression
The scope of route prefix unit.The advantage of this screening technique is: the method for screening idling-resource is fairly simple, and follow-up moves calculation
Method has only to process the idling-resource of local table, moves number of times and compares less, and compression efficiency is high.
After determining the scope of the route prefix unit needing to carry out idling-resource compression, it is possible to use idling-resource
Move flow process and the idling-resource in this compression zone is moved the lower section of table.Idling-resource is moved flow process and is included: from compression model
The highest address bit enclosed starts, and finds first idling-resource space free (i), takes in free (i) by direction, low address position
Size be the free space of free (i)-(free_num-block_num) as moving the initial free space of algorithm, be denoted as
Free_space, then finds useful space valid (i) in the direction, low address position being close to this initial idle space, if sentenced
Break the space size the free_space space size more than or equal to valid (i), then enter according to the method shown in accompanying drawing 6 (a)
Row is moved, and will all move at the upper address bits in free_space by the list item in valid (i);If it is judged that free_
The space size of the space space size less than valid (i), then move according to the method shown in Fig. 6 (b), will
The size leaning on direction, low address position in valid (i) is equal to the list item of free_space and moves in free_space, so moves
The most original useful space valid (i) becomes free space, is equivalent to original free_space to low address position
Moving, free_space forms bigger free_space with back to back free (i+1) again, the like compress the most at last
In the range of all idling-resources move low address position one side of table.
After completing the moving of idling-resource, idling-resource can be deleted from the memory block being divided resource, then
Add in the memory block being inserted into list item.Owing to routing table management employing is left a blank strategy, the present embodiment is borrowed adding these
Idling-resource time be also adopted by nearby principle, as shown in Fig. 1 (a), it is assumed that A is the memory block being divided resource, C be needs insert
The memory block of list item, then travel through C from upper address bits to low address position, before finding the route that first free space resource is not 0
Sew unit, then the idling-resource borrowed is joined in this prefix administrative unit.This ensure that between different memory areas
The number of times of moving of the idling-resource of movement compares less, and efficiency comparison is high.
Thereafter, according to prior art algorithm, this idling-resource borrowed can be moved to be inserted into the route prefix of list item
In unit.
So-called local cache table refers to the routing table of storage backup in internal memory on TCAM, and contingency table refers to and TCAM
Table that the routing table of upper storage is associated, that leave on other mass storages, the routing table of the upper storage of TCAM is used for depositing
Put the Key of route querying, and contingency table is for depositing routing iinformation corresponding to key.The present embodiment makes the capacity of routing table move
State changes, in order to reduce the variation of local cache table and contingency table at capacity during adjusting as far as possible, by local cache table with
And the maximum that the initial size of contingency table is both configured in dynamic range is (i.e. for storing the space of the TCAM of routing table
Size).
In the present embodiment, the renewal system of a kind of routing table, including:
Divide module, for the storage resource being used for depositing routing table in three-state content addressing memory (TCAM) being divided
For for depositing the first memory block of IPV4 routing table, for depositing the second memory block and the 3rd memory block of IPV6 routing table;
Adjusting module, is used for when there being route table items to need to be inserted into described TCAM, if the road that described route table items is corresponding
Not enough by the remaining space of memory block, table place, then from described 3rd memory block, it is divided to small part resource as described route
After the resource of the memory block, routing table place that list item is corresponding to, described route table items is added the memory block, routing table place of correspondence
In.
More preferably,
The residue that described adjusting module is additionally operable to judging memory block, routing table place that described route table items is corresponding is empty
Between not enough, and when described 3rd memory block does not has surplus resources to be available for dividing, in the memory block for depositing another routing table
It is divided to the small part idle available resources resource as memory block, routing table place corresponding to described route table items, then will
Described route table items adds in the memory block, routing table place of correspondence.
More preferably,
Described division module is for being divided into the storage resource being used for depositing routing table in described TCAM for depositing
First memory block of IPV4 routing table, for depositing the second memory block and the 3rd memory block of IPV6 routing table, specifically include:
Described division module is for being used for depositing all resources corresponding to storage resource of routing table in described TCAM
In block, part resource block is set to the first memory block for depositing IPV4 routing table, part resource block is set to for depositing
Second memory block of IPV6 routing table, is set to the 3rd memory block by surplus resources block;
It is additionally operable to the Resource Block in described first memory block and the second memory block respectively according to the routing table stored
Type division is multiple route prefix unit;Wherein, in same memory block, different route prefix unit are used for storing difference
The route table items of length.
More preferably,
Described division module is for when there being route table items to need to be inserted into described TCAM, it is judged that described route table items pair
The remaining space of the memory block, routing table place answered is not enough, specifically includes:
Described division module is for when there being route table items to need to be inserted into described TCAM, it is judged that at described route table items
In corresponding memory block, routing table place, the surplus resources in the route prefix unit that the length of described route table items is corresponding is not
The summation of the surplus resources of other route prefix unit in foot, and memory block, routing table place corresponding to described route table items is also
Not enough.
More preferably,
Described adjustment unit is for being divided to idle can use of small part in the memory block for depositing another routing table
Resource, as the resource of memory block, routing table place corresponding to described route table items, specifically includes:
Described adjustment unit is at the described each route prefix unit corresponding for the memory block depositing another routing table
In, filter out the idling-resource at least part of route prefix unit;Wherein, the size of the idling-resource filtered out is described
The integral multiple of resource block size in TCAM;
Then the described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding.
More preferably,
Described adjustment unit, for filtering out the idling-resource at least part of route prefix unit, specifically includes:
Described adjustment unit is at the described each route prefix unit corresponding for the memory block depositing another routing table
In, from the beginning of the route prefix unit of the storage position of the routing table place memory block corresponding adjacent to described route table items, successively
The value of idling-resource in accumulative each route prefix unit;Until the value of the idling-resource being accumulated to is big more than or equal to TCAM Resource Block
During little integral multiple, by described accumulation to idling-resource move to route corresponding near described route table items in this memory block
The storage position of memory block, table place.
More preferably,
Described adjustment unit is for being inserted into, by the described idling-resource filtered out, the routing table that described route table items is corresponding
In memory block, place, specifically include:
Described adjustment unit is for being inserted into, by the described idling-resource filtered out, the routing table that described route table items is corresponding
In memory block, place near memory block, described idling-resource place storage position and idling-resource be not 0 route prefix
In unit.
One of ordinary skill in the art will appreciate that all or part of step in said method can be instructed by program
Related hardware completes, and described program can be stored in computer-readable recording medium, such as read only memory, disk or CD
Deng.Alternatively, all or part of step of above-described embodiment can also use one or more integrated circuit to realize.Accordingly
Ground, each module/unit in above-described embodiment can realize to use the form of hardware, it would however also be possible to employ the shape of software function module
Formula realizes.The present invention is not restricted to the combination of the hardware and software of any particular form.
The foregoing is only the preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.According to
The summary of the invention of the present invention, also can have other various embodiments, in the case of without departing substantially from present invention spirit and essence thereof, is familiar with
Those skilled in the art is when making various corresponding change and deformation according to the present invention, all in the spirit and principles in the present invention
Within, any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.
Claims (16)
1. a update method for routing table, is applied in three-state content addressing memory TCAM, including:
The storage resource being used for depositing routing table in described TCAM is divided into the first memory block for depositing IPV4 routing table,
For depositing the second memory block and the 3rd memory block of IPV6 routing table;
When there being route table items to need to be inserted into described TCAM, if memory block, routing table place corresponding to described route table items is surplus
Complementary space is not enough, then be divided to small part resource from described 3rd memory block as routing table institute corresponding to described route table items
After the resource of memory block, described route table items is added in the memory block, routing table place of correspondence;
When carrying out list item and deleting, directly corresponding list item is deleted from corresponding routing table, do not trigger the tune of routing list capacity
Joint.
2. the method for claim 1, it is characterised in that also include:
If the remaining space of the memory block, routing table place that described route table items is corresponding is not enough, and described 3rd memory block does not remain
Remaining resource is available for dividing, then be divided to the available resources conduct that small part is idle in the memory block for depositing another routing table
The resource of the memory block, routing table place that described route table items is corresponding, then adds the routing table of correspondence to by described route table items
In memory block, place.
3. method as claimed in claim 2, it is characterised in that also include:
If the available resources also not having the free time in the described memory block for deposit another routing table are available for dividing, then add described
Route table items failure.
4. method as claimed in claim 1 or 2, it is characterised in that
The capacity of described 3rd memory block is 0.
5. method as claimed in claim 2, it is characterised in that:
The described storage resource being used for depositing routing table in described TCAM being divided into first is deposited for deposit IPV4 routing table
Storage area, for depositing the second memory block and the 3rd memory block of IPV6 routing table, specifically include:
In described TCAM in all Resource Block corresponding to storage resource depositing routing table, part resource block is set to
For depositing the first memory block of IPV4 routing table, part resource block is set to the second storage for depositing IPV6 routing table
District, is set to the 3rd memory block by surplus resources block;
By the Resource Block in described first memory block and the second memory block according to the Type division of the routing table stored it is respectively
Multiple route prefix unit;Wherein, in same memory block, different route prefix unit are for storing the route of different length
List item.
6. method as claimed in claim 5, it is characterised in that:
Described when there being route table items to need to be inserted into described TCAM, memory block, routing table place that described route table items is corresponding
Remaining space is not enough, specifically includes:
When there being route table items to need to be inserted into described TCAM, in the memory block, routing table place that described route table items is corresponding,
Surplus resources in the route prefix unit that the length of described route table items is corresponding is not enough, and the route that described route table items is corresponding
The summation of the surplus resources of other route prefix unit in memory block, table place is the most not enough.
7. the method as described in claim 5 or 6, it is characterised in that:
The described idle available resources of small part that are divided in the memory block for depositing another routing table are as described route
The resource of the memory block, routing table place that list item is corresponding, specifically includes:
In the described each route prefix unit corresponding for the memory block depositing another routing table, filter out at least partly route
Idling-resource in prefix unit;Wherein, the size of the idling-resource filtered out is the integer of resource block size in described TCAM
Times;
Then the described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding.
8. method as claimed in claim 7, it is characterised in that:
The described idling-resource filtered out at least part of route prefix unit, specifically includes:
In the described each route prefix unit corresponding for the memory block depositing another routing table, from neighbouring described route table items
The route prefix unit of the storage position of corresponding memory block, routing table place starts, and adds up each route prefix unit hollow successively
The value of not busy resource;During until the value of the idling-resource being accumulated to is more than or equal to the integral multiple of TCAM resource block size, by described tired
The idling-resource amassed moves to the storage position of memory block, routing table place corresponding near described route table items in this memory block
Put.
9. method as claimed in claim 7, it is characterised in that:
Described the described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding, specifically
Including:
The described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding near institute
State memory block, idling-resource place storage position and idling-resource be not 0 route prefix unit in.
10. a renewal system for routing table, including:
Divide module, for the storage resource being used for depositing routing table in three-state content addressing memory TCAM is divided into for
Deposit the first memory block of IPV4 routing table, for depositing the second memory block and the 3rd memory block of IPV6 routing table;
Adjusting module, is used for when there being route table items to need to be inserted into described TCAM, if the routing table that described route table items is corresponding
The remaining space of memory block, place is not enough, then be divided to small part resource as described route table items from described 3rd memory block
After the resource of corresponding memory block, routing table place, described route table items is added in the memory block, routing table place of correspondence;
When carrying out list item and deleting, directly corresponding list item is deleted from corresponding routing table, do not trigger the tune of routing list capacity
Joint.
11. systems as claimed in claim 10, it is characterised in that:
Described adjusting module is additionally operable to judging the remaining space of memory block, routing table place that described route table items is corresponding not
Foot, and when described 3rd memory block does not has surplus resources to be available for dividing, divide in the memory block for depositing another routing table
At least partly idle available resources are as the resource of memory block, routing table place corresponding to described route table items, then by described
Route table items adds in the memory block, routing table place of correspondence.
12. systems as claimed in claim 11, it is characterised in that:
Described division module is for being divided into the storage resource being used for depositing routing table in described TCAM for depositing IPV4 road
By the first memory block of table, for depositing the second memory block and the 3rd memory block of IPV6 routing table, specifically include:
Described division module is used in described TCAM in all Resource Block corresponding to storage resource depositing routing table,
Part resource block is set to the first memory block for depositing IPV4 routing table, part resource block is set to for depositing IPV6 road
By the second memory block of table, surplus resources block is set to the 3rd memory block;
It is additionally operable to the Resource Block in described first memory block and the second memory block respectively according to the type of the routing table stored
It is divided into multiple route prefix unit;Wherein, in same memory block, different route prefix unit are used for storing different length
Route table items.
13. systems as claimed in claim 12, it is characterised in that:
Described division module is for when there being route table items to need to be inserted into described TCAM, it is judged that described route table items is corresponding
The remaining space of memory block, routing table place is not enough, specifically includes:
Described division module is for when there being route table items to need to be inserted into described TCAM, it is judged that corresponding at described route table items
Memory block, routing table place in, the surplus resources in the route prefix unit that the length of described route table items is corresponding is not enough, and
The summation of the surplus resources of other route prefix unit in the memory block, routing table place that described route table items is corresponding is the most not enough.
14. systems as described in claim 12 or 13, it is characterised in that:
Described adjustment unit is for being divided to the available resources that small part is idle in the memory block for depositing another routing table
As the resource of memory block, routing table place corresponding to described route table items, specifically include:
Described adjustment unit, in the described each route prefix unit corresponding for the memory block depositing another routing table, sieves
It is elected to the idling-resource in small part route prefix unit;Wherein, the size of the idling-resource filtered out is in described TCAM
The integral multiple of resource block size;
Then the described idling-resource filtered out is inserted in the memory block, routing table place that described route table items is corresponding.
15. systems as claimed in claim 14, it is characterised in that:
Described adjustment unit, for filtering out the idling-resource at least part of route prefix unit, specifically includes:
Described adjustment unit is used in the described each route prefix unit corresponding for the memory block depositing another routing table, from
The route prefix unit of the storage position of the memory block, routing table place that neighbouring described route table items is corresponding starts, accumulative each successively
The value of idling-resource in route prefix unit;Until the value of the idling-resource being accumulated to is more than or equal to the whole of TCAM resource block size
During several times, by described accumulation to idling-resource move in this memory block near routing table place corresponding to described route table items
The storage position of memory block.
16. systems as claimed in claim 14, it is characterised in that:
Described adjustment unit is for being inserted into, by the described idling-resource filtered out, the routing table place that described route table items is corresponding
In memory block, specifically include:
Described adjustment unit is for being inserted into, by the described idling-resource filtered out, the routing table place that described route table items is corresponding
In memory block near memory block, described idling-resource place storage position and idling-resource be not 0 route prefix unit
In.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110222783.4A CN102291296B (en) | 2011-08-04 | 2011-08-04 | The update method of a kind of routing table and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110222783.4A CN102291296B (en) | 2011-08-04 | 2011-08-04 | The update method of a kind of routing table and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102291296A CN102291296A (en) | 2011-12-21 |
CN102291296B true CN102291296B (en) | 2016-12-21 |
Family
ID=45337414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110222783.4A Expired - Fee Related CN102291296B (en) | 2011-08-04 | 2011-08-04 | The update method of a kind of routing table and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102291296B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8924640B2 (en) * | 2012-05-14 | 2014-12-30 | Alcatel Lucent | Dynamic allocation of records to clusters in a ternary content addressable memory |
CN104125155A (en) * | 2013-04-26 | 2014-10-29 | 上海斐讯数据通信技术有限公司 | Forwarding database optimal configuration method for switches |
CN104009922B (en) * | 2014-05-09 | 2017-03-15 | 烽火通信科技股份有限公司 | IPV4/IPV6 routing capacity sharing methods based on TCAM |
CN104935517B (en) * | 2015-04-29 | 2019-03-15 | 新华三技术有限公司 | Entry management method and device |
CN106161242B (en) * | 2016-08-30 | 2019-05-21 | 锐捷网络股份有限公司 | A kind of route sending-down method and device |
CN107729053B (en) * | 2017-10-17 | 2020-11-27 | 安徽皖通邮电股份有限公司 | Method for realizing high-speed cache table |
CN109818767B (en) * | 2017-11-21 | 2021-08-03 | 网宿科技股份有限公司 | Method and device for adjusting Redis cluster capacity and storage medium |
CN110557335B (en) * | 2018-06-04 | 2022-06-17 | 中兴通讯股份有限公司 | Ternary Content Addressable Memory (TCAM) table item processing method and device |
CN110708251B (en) * | 2019-09-24 | 2021-11-16 | 北京计算机技术及应用研究所 | Ternary Content Addressable Memory (TCAM) forwarding unicast table lookup method |
CN113328948B (en) * | 2021-06-02 | 2022-10-04 | 杭州迪普信息技术有限公司 | Resource management method, device, network equipment and computer readable storage medium |
CN114567589A (en) * | 2022-02-22 | 2022-05-31 | 北京华三通信技术有限公司 | Identification method and device for route reporting |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859208A (en) * | 2006-03-29 | 2006-11-08 | 华为技术有限公司 | Method and system for managing TCAM route list |
CN101039252A (en) * | 2006-03-15 | 2007-09-19 | 中兴通讯股份有限公司 | Method for managing route table of ternary content addressable memory |
-
2011
- 2011-08-04 CN CN201110222783.4A patent/CN102291296B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101039252A (en) * | 2006-03-15 | 2007-09-19 | 中兴通讯股份有限公司 | Method for managing route table of ternary content addressable memory |
CN1859208A (en) * | 2006-03-29 | 2006-11-08 | 华为技术有限公司 | Method and system for managing TCAM route list |
Also Published As
Publication number | Publication date |
---|---|
CN102291296A (en) | 2011-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102291296B (en) | The update method of a kind of routing table and system | |
Basu et al. | Fast incremental updates for pipelined forwarding engines | |
US7058642B2 (en) | Method and data structure for a low memory overhead database | |
KR100745693B1 (en) | Method for ternary contents address memory table management | |
US8325721B2 (en) | Method for selecting hash function, method for storing and searching routing table and devices thereof | |
CN105022700B (en) | A kind of name data network cache management system and management method based on spatial cache division and content similarity | |
KR100612256B1 (en) | Apparatus and Method for Managing Ternary Content Addressable Memory | |
US20130034096A1 (en) | Routing table establishment method and device and routing table lookup method and device | |
CN112118186B (en) | Exchange chip routing table entry storage method, forwarding method and configuration method | |
CN101335706B (en) | Route table space managing method, apparatus, switch and router | |
CN103107945B (en) | A kind of system and method for fast finding IPV6 route | |
EP2055050A1 (en) | Dynamic tree bitmap for ip lookup and update | |
US8364803B2 (en) | Method, device, computer program product and system for representing a partition of N W-bit intervals associated to D-bit data in a data communications network | |
CN101277252A (en) | Method for traversing multi-branch Trie tree | |
Luo et al. | A hybrid IP lookup architecture with fast updates | |
CN101692653B (en) | Management method and management device for routing table | |
CN101616090B (en) | Method and device for dividing treenode resources | |
CN103457855B (en) | Classless inter-domain routing table is established and the method and apparatus of message forwarding | |
CN103577564A (en) | Method and device for reducing HASH collision through software shift | |
CN103179161A (en) | Content acquisition method, device and network system | |
CN101840417B (en) | UID query method for internet of things based on correlation | |
CN108733576A (en) | A kind of the memory conversion layer mapping framework and method of solid state disk | |
CN112559459A (en) | Self-adaptive storage layering system and method based on cloud computing | |
CN100358288C (en) | Method for processing five-membered stream group in network equipment | |
WO2010039093A1 (en) | Method, device and computer program product for representing a partition of n w-bit intervals associated to d-bit data in a data communications network |
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: 20161221 Termination date: 20170804 |