CN101420415A - Method and apparatus for forming routing table - Google Patents

Method and apparatus for forming routing table Download PDF

Info

Publication number
CN101420415A
CN101420415A CNA2007101656291A CN200710165629A CN101420415A CN 101420415 A CN101420415 A CN 101420415A CN A2007101656291 A CNA2007101656291 A CN A2007101656291A CN 200710165629 A CN200710165629 A CN 200710165629A CN 101420415 A CN101420415 A CN 101420415A
Authority
CN
China
Prior art keywords
occurrence
node
pointer
memory space
described node
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
CNA2007101656291A
Other languages
Chinese (zh)
Other versions
CN101420415B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2007101656291A priority Critical patent/CN101420415B/en
Publication of CN101420415A publication Critical patent/CN101420415A/en
Application granted granted Critical
Publication of CN101420415B publication Critical patent/CN101420415B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention discloses a method for forming routing table, which comprises the following steps: allocating matching item storing space for node matching item for storing the node matching item, and indicating the position of the node matching item with matching item position identification. The invention also discloses a device for forming routing table, wherein the device comprises the following components: a matching item storing unit which is used for allocating matching item storing space for node matching item for storing the node matching item; and a matching item position indicating unit which is used for indicating the position of the node matching item with the position identification of the matching item. The application of the method and the device according to the invention can effectively reduce the internal memory resource taken by the routing table.

Description

Form the method and the device of routing table
Technical field
The present invention relates to communication technical field, relate in particular to a kind of method and device that forms routing table.
Background technology
In order to finish in the numerous internet of user by the route of an address to another address, the related data with various transmission paths is stored together the formation routing table usually, inquires about when supplying to carry out route.
No type inter-domain routing (CIDR, Classless Inter-Domain Routing) is a kind of routing table structure relatively more commonly used.When using the CIDR structure to form routing table, Internet protocol (IP, InternetProtocol) network uses a prefix representative, this prefix usually by the IP address of IP network and and the compound expression of mask of its significance bit of sign, for example " 111 *" expression IP address be " 111 "; significance bit is three; use the mode of many bit tree (Multi-Bit Tire) to store when storage usually; will be in address space the routing table entry of 2 the integral number power subnet that vicinity, route are identical mutually be merged into a paths; be stored in the routing table as a list item, when searching, can search according to the path.
Now be described with the method for example to storage, suppose to have 9 prefixes " P1 " " P2 " " P3 " " P4 " " P5 " " P6 " " P7 " " P8 " " P9 ", the relation between prefix label and the prefix value is as shown in table 1:
The prefix label Prefix value
P1 *
P2 1 *
P3 00 *
P4 101 *
P5 111 *
P6 1000 *
P7 11101 *
P8 111001 *
P9 1000011 *
Relation table between table 1, prefix label and the prefix value
Basic one step of binary tree search is checked 1 bit, is M if address prefix is the longest accordingly, and then Shu the degree of depth is M.If the degree of depth of once checking K bit then setting can reduce to M/K, the occurrence that comprises of Shu inside node increases to 2 K power like this.Such tree is called as 2 K power branch tree, and the maximum number of plies of tree is M/K.The algorithm of tabling look-up is K at the bit number that each node place checks, also just is called as the step-length of tree.
The step-length of supposing this Multi-Bit Tire is 3, and then each node will comprise 3 power items of 2 in the tree, and promptly 8, its structure is as shown in table 2:
The pointer of occurrence next node
Figure A200710165629D00061
Table 2, step-length are 3 node structure
Wherein occurrence be meant can with the prefix of this coupling, for example, the value of " P1 " is " * ", illustrates that " P1 " can mate with any one, if this node is a root node, when original records is empty, all is the occurrence of " P1 " to " 111 " from " 000 "; The value of " P2 " is " 1 *"; the IP address that " P2 " is described is " 1 "; significance bit is 1; any item with " 1 " beginning can mate with " P2 "; if this node is a root node, from " 100 " to " 111 " all are the occurrences of " P2 ", and this moment is if deposit " P1 " in; then when depositing " P2 " in, from " 100 " to " 111 " all will be covered by " P2 "; Storage mode can the rest may be inferred with interior prefix " P3 " " P4 " " P5 " at 3 for other significance bit, " 000 " " 001 " is the occurrence of " P3 ", " 101 " are the occurrence of " P4 ", " 111 " are the occurrence of " P5 ", and the node structure that deposits " P1 " " P2 " " P3 " " P4 " " P5 " in is as shown in table 3:
Figure A200710165629D00071
Table 3, deposit the node structure of " P1 " " P2 " " P3 " " P4 " " P5 " in
" pointer of next node " hurdle storage is meant pointer to the next stage node in table 2, the table 3, this is because when the significance bit of prefix surpasses the node step-length, the next stage node need be set up, just the next stage node can be searched out according to this pointer when searching
With " P6 " " P7 " " P8 " " P9 " is example, the value of " P6 " is " 1000* ", the effective value that " P6 " is described is 4, in step-length is to seek in 3 the root node less than occurrence, therefore when depositing " P6 " in, need set up the next stage node, mate with the front three of " P6 " " 100 " in the root node, therefore to deposit newly-established next stage node pointer on " pointer of a next node " hurdle of " 100 ", in this newly-established next stage node, list item with " 0 " beginning can mate with " P6 ", and the node structure that deposits " P6 " in is as shown in table 4:
Figure A200710165629D00072
Figure A200710165629D00081
Table 4, deposit the node structure of " P6 " in
The value of " P7 " is " 11101 *", the value of " P8 " is " 111001 *"; its preceding 3 place values are identical; all be " 111 "; therefore can set up a next stage node for " P7 " " P8 "; " pointer of the next node " hurdle at root node " 111 " deposits newly-established next stage node pointer in, in this newly-established next stage node, can mate with " P7 " with " 010 " " 011 " of " 01 " beginning; " 001 " can mate with " P8 ", and the node structure that deposits " P7 " " P8 " in is as shown in table 5:
Figure A200710165629D00082
Table 5, deposit the node structure of " P7 " " P8 " in
The value of " P9 " is " 1000011 *"; therefore effective value is 7; be more than 2 times of node step-length " 3 "; also need to set up the new node of one-level on the basis of root node next stage node; when setting up again; see that existing node has that do not have can 6 items that are complementary preceding with it, then newly-established node pointer is inserted this " pointer of next node " hurdle if having, if do not have then and insert newly-established node pointer on " pointer of next node " hurdle of root node 3 items that are complementary preceding with it, in this example, deposit in shown in the table 4 " P6 " node " 001 " can with " P9 " preceding 6 couplings, therefore insert newly-established node pointer on this " pointer of next node " hurdle, newly-established the list item with " 1 " beginning can mate with " P9 ", and the node structure that deposits " P9 " in is as shown in table 6:
Figure A200710165629D00091
Table 6, deposit the node structure of " P9 " in
So far, it is 3 Multi-Bit Tire that " P1 " " P2 " " P3 " " P4 " " P5 " " P6 " " P7 " " P8 " " P9 " all deposited step-length in, and this Multi-Bit Tire complete structure comprises as shown in Figure 1:
Be equivalent to node shown in the table 3 root node, be equivalent to node shown in the table 4 node 1, be equivalent to node shown in the table 5 node 2, be equivalent to the node 3 of node shown in the table 6.
In research and practice process to prior art, the inventor finds that there is following problem in prior art:
Each node all needs to apply for the memory space of fixed size, and the list item of these nodes does not all fill up most of the time, with Fig. 1 is example, root node has 6 hurdles for blank, node 1 has 11 hurdles for blank, and node 2 has 13 hurdles for blank, and node 3 has 12 hurdles for blank, waste very much memory source, and all be resource very in short supply at memory source many times.
Summary of the invention
The technical problem that the embodiment of the invention will solve provides a kind of method and device that forms routing table, can reduce the memory source that routing table takies.
For solving the problems of the technologies described above, the embodiment of the invention provides a kind of method that forms routing table on the one hand, comprising:
For the occurrence of node distributes the occurrence memory space to store described node matching item, use the occurrence station location marker to indicate the position at described node matching item place.
On the other hand, provide a kind of device that forms routing table, having comprised:
The occurrence memory cell is used to the occurrence of node to distribute the occurrence memory space to store described node matching item;
Occurrence station location marker unit is used to use the occurrence station location marker to indicate the position at described node matching item place.
As can be seen from the above technical solutions, because the technical scheme that embodiment of the present invention provides is according to the situation memory allocated space of node actual storage occurrence, and in actual use in the routing table each node all have very big chance that a large amount of blank list items are arranged, therefore the technical scheme of using embodiment of the present invention to provide can be reduced to the memory space that blank list item distributes, and effectively reduces the memory source that routing table takies.
Description of drawings
Fig. 1 is the prior art schematic diagram;
Fig. 2 is a root node matching item part structure chart among the method embodiment one of formation routing table provided by the invention;
Fig. 3 is a root node pointer part structure chart among the method embodiment one of formation routing table provided by the invention;
Fig. 4 is node 1 structure chart among the method embodiment one of formation routing table provided by the invention;
Fig. 5 is a root node matching item part structure chart among the method embodiment two of formation routing table provided by the invention;
Fig. 6 is node 1 a matching item part structure chart among the method embodiment two of formation routing table provided by the invention;
Fig. 7 is the device example structure figure of formation routing table provided by the invention.
Embodiment
The invention provides a kind of method and device that forms routing table, can save the memory source that routing table takies effectively.
In the method embodiment of formation routing table provided by the invention,, use the occurrence station location marker to indicate the position at described node matching item place for the occurrence of node distributes the occurrence memory space to store the occurrence of this node.
When this node includes the pointer that points to next node, pointer quantity according to the sensing next node of described node distributes pointer memory space with the storage pointer for this node, uses the position of the described node middle finger of pointer position sign indication to the pointer place of next node.
Owing to be the pointer memory allocated space of substantial occurrence or next node only, therefore, use the routing table of the method embodiment of formation routing table provided by the invention can save the memory source that it takies effectively.
Among the embodiment one of the method for formation routing table provided by the invention, usually can be according to the occurrence quantity of a node, for this node distributes an occurrence memory space with the storage occurrence, use the occurrence station location marker to indicate the position at described node matching item place; When this node includes the pointer that points to next node, for distributing a pointer memory space, this node stores the pointer of this sensing next node, and use pointer position to identify the position at the pointer place of the sensing next node of indicating described node.
Occurrence memory space and occurrence station location marker can be called as matching item part, and pointer memory space and pointer position sign can be called as pointer part.
With root node shown in Figure 1 is example, and 8 occurrences are all meaningful in this root node, its matching item part structure as shown in Figure 2:
According to the number " 8 " of this node matching item, for this node distributes the occurrence memory space that can hold eight storage occurrences, a sequential storage " P3 " " P3 " " P1 " " P1 " " P2 " " P4 " " P2 " " P5 " respectively;
Because this node step-length is " 3 ", therefore this node can be stored eight occurrences at most, but many times do not deposit 8 occurrences, and the content of in the occurrence memory space, only storing occurrence, the position of each occurrence correspondence is not described, therefore in the occurrence station location marker, needs to indicate accordingly or identify.
In the example of Fig. 2, because node can be stored eight occurrences at most, therefore the occurrence station location marker for this node foundation comprises: eight flag bits and pointer 201, these eight flag bits are represented " 000 " " 001 " " 010 " " 011 " " 100 " " 101 " " 110 " " 111 " in proper order, each flag bit is 1 bit, can indicate the relevant position whether to store occurrence by reset or set, present embodiment will represent that this is a sky with reset, and set represents that this stores occurrence is that example is described; What pointer 201 was stored is the pointer of occurrence memory space, points to the occurrence memory space of this node.
In Fig. 2, because each all stores occurrence, therefore each all set of eight bit flag positions.
When searching routing table, pass through Fig. 2, eight list items can knowing this node store occurrence, are respectively: be positioned at " 000 " " P3 ", be positioned at " 001 " " P3 ", be positioned at " 010 " " P1 ", be positioned at " 011 " " P1 ", be positioned at " 100 " " P2 ", be positioned at " 101 " " P4 ", be positioned at " 110 " " P2 ", be positioned at " P5 " of " 111 ".
Because root node shown in Figure 1 also comprises 2 pointers that point to next nodes, point to the pointer of node 1 and point to the pointer of node 2, therefore also needing is that this node distributes pointer part, its pointer part as shown in Figure 3:
According to the number " 2 " of the pointer of the sensing next node of this node, for this node distributes the pointer memory space that can store two storage pointers, a sequential storage " pointer 1 " " pointer 2 " respectively;
Because this node step-length is " 3 ", therefore this node can be stored the pointer of eight next nodes at most, but many times do not store 8 pointers that point to next node, and the content of in the pointer memory space, only storing the pointer that points to next node, the position of the pointer correspondence of next node is not respectively pointed in explanation, therefore needs to indicate accordingly in the pointer position sign.
In the example of Fig. 3, because node can be stored eight pointers at most, therefore the pointer position of setting up for this node identifies and comprises: eight flag bits and pointer 301, these eight flag bits are represented " 000 " " 001 " " 010 " " 011 " " 100 " " 101 " " 110 " " 111 " in proper order, each flag bit is 1 bit, can indicate the relevant position whether to store the pointer of next node by reset or set, present embodiment will represent that this is a sky with reset, and set represents that this stores occurrence is that example is described; What pointer 301 was stored is the pointer of pointer memory space, points to the pointer memory space of this node.
Pointer 1 in Fig. 3 is stored in " 100 ", pointer 2 is stored in " 111 ", therefore " 100 " are corresponding flag bit set, the flag bit set that " 111 " are corresponding is with all the other flag bit resets, expression " pointer 1 " " pointer 2 " is stored in respectively in these two positions, according to the relation of appointing in advance, for example in this example, to be stored in the less list item of numerical value the preceding, can know that then pointer 1 is stored in " 100 ", pointer 2 is stored in " 111 ".Define method has a variety of, also can use sequence arrangement from big to small.
This moment formation routing table provided by the invention method embodiment one, the content of having preserved root node shown in Figure 1 by matching item part shown in Figure 2 and pointer part shown in Figure 3, by relatively finding, use the method embodiment one of formation routing table provided by the invention, need not save the memory source that this root node takies greatly for the next node pointer entries is empty memory allocated space, " 000 " " 001 " " 010 " " 011 " " 101 " " 110 ".
The many more nodes of blank list item, the memory source that uses the method embodiment one of formation routing table provided by the invention to take is few more, is example with node shown in Figure 11, node 2, node 3:
In the node 1, store 4 occurrences, a pointer that points to next node, its node structure as shown in Figure 4, node comprises: matching item part and pointer part.
Matching item part is that node 1 has distributed an occurrence memory space that four storage occurrence positions are arranged, difference sequential storage " P6 " " P6 " " P6 " " P6 ", the occurrence station location marker comprises: eight flag bits and pointer 401, set in the flag bit corresponding with " 000 " " 001 " " 010 " " 011 ", other flag bit resets, expression " P6 " " P6 " " P6 " " P6 " is stored in " 000 " " 001 " " 010 " " 011 " respectively, what pointer 401 was stored is the pointer of occurrence memory space, points to the occurrence memory space of node 1.
Pointer part is that node 1 has distributed an occurrence memory space that a storage pointer position is arranged, storage " pointer 3 ", position indication comprises: eight flag bits and pointer 402, set in the flag bit corresponding with " 001 ", other flag bit resets, expression " pointer 3 " is stored in " 001 ", and what pointer 402 was stored is the pointer of pointer memory space, points to the pointer memory space of node 1.
The pointer entry of the next node of node 2 and node 3 all is empty, so node 2 and node 3 all have only matching item part, and the structure of its matching item part can be set up with reference to the matching item part of root node and node 1, is not described in detail at this.
More than be to be the description that 3 node carries out with step-length, when step-length was other numerical value, the method basically identical with the method embodiment one that uses formation routing table provided by the invention was not described in detail at this.
In the new prefix of storage, in the time of need in a node, increasing new occurrence or point to the pointer of next node, be this node memory allocated space again, and delete old node storage space that specific practice is as follows:
Node is stored described node matching item in that to have new occurrence to add fashionable for described node distributes new occurrence memory space, sets up the position that new occurrence station location marker is indicated described node matching item place; And delete old occurrence memory space and old occurrence station location marker.
Node is having new sensing next node pointer to add fashionable, for distributing new pointer memory space, described node stores the pointer of described node, set up the position that new pointer position identifies the pointer place of the sensing next node of indicating described node, and delete old pointer memory space and old pointer position sign.
Because one of the method embodiment of formation routing table provided by the invention is the pointer memory allocated space of substantial occurrence or next node, even also want the memory allocated space and the prior art list item is a sky, and in actual use, list item is that empty phenomenon is very common, and the memory source that therefore uses the method embodiment one of formation routing table provided by the invention to take is significantly smaller than the memory source that prior art takies.
Further, we can see, because the significance bit of some prefix value is not the prefix of step-length multiple, have a plurality of occurrences, it still is example with Fig. 1, shown in the root node " P1 ", " P2 " and " P3 " all has 2 occurrences respectively, " P6 " has 4 occurrences in the node 1, " P7 " has 2 occurrences in the node 2, " P9 " has 4 occurrences in the node 3, and the occurrence of these repetitions bit table item memory space that all will account for is in order to reduce the memory space that the repeated matching item takies, the save memory resource, the method embodiment two of formation routing table provided by the invention is described occurrence segmentation, judges whether the occurrence that is positioned at same section is identical, identically then distribute an occurrence memory space storing described identical occurrence, and carry out mark at the segmentation indicating bit; Inequality then for the occurrence in same section respectively distributes an occurrence memory space storage with described occurrence inequality, and carry out the method for mark at the segmentation indicating bit.
Still being example below with Fig. 1 is described the method embodiment two of formation routing table provided by the invention:
With root node shown in Figure 1 is example, and this root node occurrence is divided into 4 sections, and two every section, it is identical that the occurrence in two sections is wherein arranged, so its matching item part structure is as shown in Figure 5:
Because in the present embodiment occurrence is divided into 4 sections, therefore need set up corresponding 4 sections respectively of 4 segmentation indicating bits, each segmentation indicating bit is 1 bit, can indicate the occurrence in the corresponding segment whether identical by reset or set, present embodiment will be represented difference with reset, and set represents that being all example mutually is described.
Because first section is two " P3 ", therefore should be the same list item of this section distribution memory location mutually at the occurrence memory space, storage " P3 " in the set of corresponding segment indicating bit, represents that two occurrences in this section are identical; Second section identical with first section situation, is two " P1 ", should be the same list item of this section distribution memory location mutually at the occurrence memory space equally, and storage " P1 " in the set of corresponding segment indicating bit, represents that two occurrences in this section are identical; Occurrence " P2 ", " P4 " and " P2 ", " P5 " of being respectively all inequality in the 3rd section and the 4th section, therefore still be respectively it in two list item memory locations of occurrence memory allocation according to the occurrence number, storage " P2 ", " P4 " and " P2 ", " P5 ", and, represent that two occurrences in these two sections are inequality in the reset of corresponding segment indicating bit.
This moment, the occurrence memory space of this root node took 6 list item memory locations altogether, difference sequential storage " P3 " " P1 " " P2 " " P4 " " P2 " " P5 ", the occurrence station location marker of this root node comprises: eight flag bits and pointer 501, eight equal sets of indicating bit, what pointer 501 was stored is the pointer of occurrence memory space, points to the occurrence memory space of this node.
When searching routing table, can know that by the occurrence station location marker all positions of this node all store occurrence, can know that by first section segmentation indicating bit two occurrences are identical in first section, and only preserved once, refer again to the content of occurrence memory space, that can know that " 000 " and " 001 " all store is " P2 "; Can know that by second section segmentation indicating bit two occurrences are identical in second section, and only preserve once, refer again to the content of occurrence memory space, that can know that " 010 " and " 011 " all store is " P1 "; Segmentation indicating bit by the 3rd section and the 4th section can know that two occurrences in these two sections are inequality, refer again to the content of occurrence memory space, that can know that " 100 " " 101 " " 110 " " 111 " store respectively is " P2 " " P4 " " P2 " " P5 ".
Segmentation number to a node matching item, according to actual conditions can be any integer less than list item number and aliquot list item number, the node that 8 occurrences are for example arranged, then can be divided into 4 sections and also can be divided into 2 sections or 1 section, more than be to be the description that example is carried out to be divided into 4 sections, existing occurrence with node 1 shown in Figure 1 divides 2 sections to be that example is described.
Because in the present embodiment occurrence is divided for 2 sections, therefore need set up corresponding 2 sections respectively of 2 segmentation indicating bits, each segmentation indicating bit is 1 bit, can indicate the occurrence in the corresponding segment whether identical by reset or set, present embodiment will be represented difference with reset, and set represents that being all example mutually is described.
The occurrence station location marker of this node comprises: eight flag bits and pointer 601, because this node " 000 " " 001 " " 010 " " 011 " stores occurrence, and other positions are empty, therefore with " 000 " " 001 " " 010 " " 011 " indicating bit set, other flag bit resets, what pointer 601 was stored is the pointer of occurrence memory space, points to the occurrence memory space of this node.
Because first section is four " P6 ", therefore should be list item memory location of this section distribution mutually at the occurrence memory space, storage " P6 " in the set of corresponding segment indicating bit, represents that two occurrences in this section are identical; Second section flag bit by the occurrence station location marker can be known, do not store data for second section, so reset or set all can.
This moment, the occurrence memory space of this root node took 1 list item memory location altogether, storage " P6 ".
When searching routing table, because two segmentation indicating bits are arranged, can know that this node matching item is divided into 2 sections, can know that by first section segmentation indicating bit four occurrences are identical in first section, and only preserved once, refer again to the content of occurrence memory space, that can know that " 000 " " 001 " " 010 " " 011 " all stores is " P6 "; By the corresponding flag bit in " 100 " " 101 " " 110 " " 111 " in the occurrence station location marker, can know that these list items are empty, do not store data.
The pointer part among the method embodiment two of formation routing table provided by the invention and the method embodiment one of formation routing table provided by the invention are basic identical, no longer are repeated in this description at this.
More than be to be the description that 3 node carries out, when step-length is other numerical value, use the method basically identical of the method embodiment one of formation routing table provided by the invention, be not described in detail at this with step-length.
In the new prefix of storage, in the time of need in a node, increasing new occurrence or point to the pointer of next node, be this node memory allocated space again, and delete old node storage space that specific practice is as follows:
Node is stored described node matching item in that to have new occurrence to add fashionable for described node distributes new occurrence memory space, sets up the position that new occurrence station location marker is indicated described node matching item place; And delete old occurrence memory space and old occurrence station location marker.
Node is having new sensing next node pointer to add fashionable, for distributing new pointer memory space, described node stores the pointer of described node, set up the position that new pointer position identifies the pointer place of the sensing next node of indicating described node, and delete old pointer memory space and old pointer position sign.
Because the method embodiment two of formation routing table provided by the invention, the occurrence of node is carried out segmentation, when occurrence is identical in segmentation, only distribute an occurrence memory space to store described identical occurrence, and carrying out mark at the segmentation indicating bit, the memory source that therefore uses the method embodiment two of formation routing table provided by the invention to take has obtained effective minimizing.
The device example structure of formation routing table provided by the invention as shown in Figure 7, the device 700 that forms routing table comprises:
Occurrence memory cell 710 is used to the occurrence of node to distribute the occurrence memory space to store described node matching item;
Occurrence station location marker unit 720 is used to use the occurrence station location marker to indicate the position at described node matching item place.
Occurrence increases unit 730, it is fashionable to be used for having new occurrence to add at described node, controlling described occurrence storage is that described node distributes new occurrence memory space to store described node matching item with described occurrence station location marker unit 720 for single 710 yuan, sets up the position that new occurrence station location marker is indicated described node matching item place; And delete old occurrence memory space and old occurrence station location marker.
Pointer unit 740 is used for the pointer quantity according to the sensing next node of described node, for described node distributes the pointer memory space with the storage pointer, uses pointer position to identify the position at the pointer place of the sensing next node of indicating described node.
Pointer increases unit 750, be used for having new sensing next node pointer to add fashionable at described node, control described pointer unit 740 and store the pointer of described node for described node distributes new pointer memory space, set up the position that new pointer position identifies the pointer place of the sensing next node of indicating described node, and delete old pointer memory space and old pointer position sign.
Wherein, occurrence memory cell 710 further comprises:
The first occurrence memory cell 711, the occurrence that is used for occurrence quantity according to described node and is described node distributes the occurrence memory space with the storage occurrence;
Or the second occurrence memory cell 712, be used for described occurrence segmentation, when the occurrence that is positioned at same section is identical, distributes same occurrence memory space storing described identical occurrence, and carry out mark at the segmentation indicating bit; When inequality,, and carry out mark at the segmentation indicating bit for the occurrence in same section respectively distributes the occurrence memory space storing described occurrence inequality.
The concrete function mode of the device embodiment of formation routing table provided by the invention, the method embodiment of the formation routing table provided by the invention that may refer to the above description is not described in detail at this.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in that the above-mentioned storage medium of mentioning can be a read-only memory in a kind of computer-readable recording medium, disk or CD etc.
More than the method and the device of a kind of formation routing table provided by the invention provided by the present invention is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (11)

1, a kind of method that forms routing table is characterized in that, comprising:
For the occurrence of node distributes the occurrence memory space to store described node matching item, use the occurrence station location marker to indicate the position at described node matching item place.
2, the method for formation routing table as claimed in claim 1 is characterized in that, described method also comprises:
According to the pointer quantity of the sensing next node of described node,, use the position at pointer place of the sensing next node of the described node of pointer position sign indication for described node distributes the pointer memory space with the storage pointer.
3, the method for formation routing table as claimed in claim 1 or 2 is characterized in that, described occurrence for node distributes the occurrence memory space to comprise to store described occurrence:
According to the occurrence quantity of described node is that the occurrence of described node distributes the occurrence memory space with the storage occurrence.
4, the method for formation routing table as claimed in claim 1 or 2 is characterized in that, described occurrence for node distributes occurrence memory space storage occurrence to comprise:
With described occurrence segmentation, when the occurrence that is positioned at same section is identical, distributes same occurrence memory space storing described identical occurrence, and carry out mark at the segmentation indicating bit; When inequality,, and carry out mark at the segmentation indicating bit for the occurrence in same section respectively distributes the occurrence memory space storing described occurrence inequality.
5, the method for formation routing table as claimed in claim 1 or 2 is characterized in that, described method also comprises:
There have new occurrence to add at described node to be fashionable, for described node distributes new occurrence memory space to store described node matching item, sets up new occurrence station location marker to indicate the position at described node matching item place; And delete old occurrence memory space and old occurrence station location marker.
6, the method for formation routing table as claimed in claim 2 is characterized in that, described method also comprises:
There is new sensing next node pointer to add fashionable at described node, for distributing new pointer memory space, described node stores the pointer of described node, set up the position that new pointer position identifies the pointer place of the sensing next node of indicating described node, and delete old pointer memory space and old pointer position sign.
7, a kind of device that forms routing table is characterized in that, comprising:
The occurrence memory cell is used to the occurrence of node to distribute the occurrence memory space to store described node matching item;
Occurrence station location marker unit is used to use the occurrence station location marker to indicate the position at described node matching item place.
8, the device of formation routing table as claimed in claim 7 is characterized in that, described device also comprises:
The pointer unit is used for the pointer quantity according to the sensing next node of described node, for described node distributes the pointer memory space with the storage pointer, uses pointer position to identify the position at the pointer place of the sensing next node of indicating described node.
As the device of claim 7 or 8 described formation routing tables, it is characterized in that 9, described occurrence memory cell comprises:
The first occurrence memory cell, the occurrence that is used for occurrence quantity according to described node and is described node distributes the occurrence memory space with the storage occurrence;
Or the second occurrence memory cell, be used for described occurrence segmentation, when the occurrence that is positioned at same section is identical, distributes same occurrence memory space storing described identical occurrence, and carry out mark at the segmentation indicating bit; When inequality,, and carry out mark at the segmentation indicating bit for the occurrence in same section respectively distributes the occurrence memory space storing described occurrence inequality.
As the device of claim 7 or 8 described formation routing tables, it is characterized in that 10, described device also comprises:
Occurrence increases the unit, it is fashionable to be used for having new occurrence to add at described node, controlling described occurrence memory cell and described occurrence station location marker unit is that described node distributes new occurrence memory space to store described node matching item, sets up new occurrence station location marker to indicate the position at described node matching item place; And delete old occurrence memory space and old occurrence station location marker.
11, the device of formation routing table as claimed in claim 8 is characterized in that, described device also comprises:
Pointer increases the unit, be used for having new sensing next node pointer to add fashionable at described node, controlling described pointer unit is that described node distributes new pointer memory space to store the pointer of described node, set up the position that new pointer position identifies the pointer place of the sensing next node of indicating described node, and delete old pointer memory space and old pointer position sign.
CN2007101656291A 2007-10-23 2007-10-23 Method and apparatus for forming routing table Expired - Fee Related CN101420415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101656291A CN101420415B (en) 2007-10-23 2007-10-23 Method and apparatus for forming routing table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101656291A CN101420415B (en) 2007-10-23 2007-10-23 Method and apparatus for forming routing table

Publications (2)

Publication Number Publication Date
CN101420415A true CN101420415A (en) 2009-04-29
CN101420415B CN101420415B (en) 2012-08-22

Family

ID=40631025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101656291A Expired - Fee Related CN101420415B (en) 2007-10-23 2007-10-23 Method and apparatus for forming routing table

Country Status (1)

Country Link
CN (1) CN101420415B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102405623A (en) * 2010-04-08 2012-04-04 华为技术有限公司 Method and device for storing routing table entry
CN107332776A (en) * 2017-06-19 2017-11-07 深圳市盛路物联通讯技术有限公司 The routing iinformation table updating method and edge forwarding node of a kind of edge forwarding node

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001043345A2 (en) * 1999-12-10 2001-06-14 Mosaid Technologies Incorporated Method and apparatus for longest match address lookup
CN100496019C (en) * 2005-11-10 2009-06-03 中国科学院计算技术研究所 A method to quickly search and update IPv6 routing list

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102405623A (en) * 2010-04-08 2012-04-04 华为技术有限公司 Method and device for storing routing table entry
CN107332776A (en) * 2017-06-19 2017-11-07 深圳市盛路物联通讯技术有限公司 The routing iinformation table updating method and edge forwarding node of a kind of edge forwarding node
CN107332776B (en) * 2017-06-19 2020-04-07 深圳市盛路物联通讯技术有限公司 Method for updating routing information table of edge forwarding node and edge forwarding node

Also Published As

Publication number Publication date
CN101420415B (en) 2012-08-22

Similar Documents

Publication Publication Date Title
CN101621502A (en) Method and device for storing and searching routing table
US6434144B1 (en) Multi-level table lookup
US6490592B1 (en) Method of and apparatus for generating a tree data structure supporting longest match lookup
US7885967B2 (en) Management of large dynamic tables
CN101667958B (en) Method for selecting hash function, and method and device for storing and searching routing table
US6757802B2 (en) Method for memory heap and buddy system management for service aware networks
CN102405623B (en) Method and device for storing routing table entry
CN101827137B (en) Hash table-based and extended memory-based high-performance IPv6 address searching method
CN102298633B (en) Method and system for investigating repeated data in distributed mass data
CN103139255B (en) The method of Resources allocation mark and identification section
CN102609446B (en) Distributed Bloom filter system and application method thereof
CN104462549A (en) Data processing method and device
US8103772B2 (en) Cluster extension in distributed systems using tree method
CN106416152B (en) A kind of lookup device searches configuration method and lookup method
CN102291296A (en) Updating method and system of routing table
EP1063827A2 (en) Method for address lookup
CN101582851B (en) Method and system for realizing sharing route capacity on dual-stacker router
US6917954B2 (en) Load balancing in IP address lookup
CN108427736A (en) A method of for inquiring data
CN104009921A (en) Data message forwarding method based on any field matching
CN100479436C (en) Management and maintenance method for static multi-interface range matching table
CN101420415B (en) Method and apparatus for forming routing table
CN116366548B (en) Route matching method of IPv6 subnetwork
CN101783761A (en) Method for storing and searching routing list and device therefor
US20130304983A1 (en) Dynamic allocation of records to clusters in a ternary content addressable memory

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

Termination date: 20191023