CN1319347C - Routing method and routing system - Google Patents

Routing method and routing system Download PDF

Info

Publication number
CN1319347C
CN1319347C CNB021466289A CN02146628A CN1319347C CN 1319347 C CN1319347 C CN 1319347C CN B021466289 A CNB021466289 A CN B021466289A CN 02146628 A CN02146628 A CN 02146628A CN 1319347 C CN1319347 C CN 1319347C
Authority
CN
China
Prior art keywords
route
bit
prefix
route prefix
routing table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB021466289A
Other languages
Chinese (zh)
Other versions
CN1494276A (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.)
Accton Technology Corp
Original Assignee
Accton Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Accton Technology Corp filed Critical Accton Technology Corp
Priority to CNB021466289A priority Critical patent/CN1319347C/en
Publication of CN1494276A publication Critical patent/CN1494276A/en
Application granted granted Critical
Publication of CN1319347C publication Critical patent/CN1319347C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention relates to a routing method which comprises the following steps that firstly, m route prefix lengths are selected and are respectively L1 bits, L2 bits, L3 bits to Lm bits, wherein m and L1 to Lm are positive integers, and L1<L2<... <Lm; subsequently, a route system divides the route prefixes into m groups according to the lengths to establish the first route table to the mth route table and maintains a high-speed buffer route table of the first route table; when a network data packet with Lm bits of a target end address is received, an equal route prefix is searched for in the high-speed buffer route table according to the front L1 bits of the address; simultaneously, a route prefix equal to the front Li bits of the address is searched for in the ith route table, wherein i is a positive integer and is smaller than or equal to m and bigger than or equal to 2. A route prefix with the biggest length in bits is selected from the equal and corresponding route prefixes compared through the search, a route datum corresponding to the route prefix is selected, and the network data packet is transmitted.

Description

Route Method And Route System
Technical field
The present invention is relevant for a kind of Route Method And Route System, the specific implementation of relevant especially a kind of route prefix high-speed cache, it utilizes a plurality of differences but the route prefix routing table of regular length, with increase route cache device (Cache Memory) usefulness, and accelerate the method and apparatus that the network equipment is sought footpath speed.
Background technology
Internet (Internet) has influenced human life significantly, various network application is also just vigorously by in the middle of the development, therefore need more high-quality network capacity, for example: have big throughput (Throughput) and reach short delay (Delay) etc.Yet transmit in the process of network packet at the network equipment, routing inquiry (Routing-Lookup) is a part the most consuming time, route system is necessary for each Internet protocol that receives (Internet Protocol, hereinafter referred IP) packet, in its routing table, seek " the longest route prefix that meets " (Longest Matching Prefix) of destination address in the IP packet, send this packet according to corresponding route data again, but this program is quite consuming time.
For solving the above problems, the method for routing of a kind of high-speed cache route prefix (Routing Prefix) is suggested.Because a route prefix can be answered the routing inquiry of the pairing a plurality of destinations of this route prefix address, therefore if with route cache device high-speed cache route prefix, but not the route results of high-speed cache destination address (Routing Result), the route cache device that is equal to size just can be answered more routing inquiry, and the method then is called route prefix high-speed cache (Prefix Caching).Because the number of the storage element that the route prefix high-speed cache is required is few than general objects end address cache (Destination Caching), so the real route cache device of making the route prefix high-speed cache can have preferable utilance (Utilization), and accelerates the speed of network equipment routing inquiry.
Yet for each destination address, one " the longest route prefix that meets " all only arranged, and its corresponding route data is only the transfer path of this destination address right.Therefore, if there are a plurality of route prefix to contain same destination address, then must find out its " the longest route prefix that meets " to obtain correct route results.For this reason, the route prefix high-speed cache must be added the mechanism of finding out " the longest route prefix that meets ".
Summary of the invention
In view of this, main purpose of the present invention is to propose a kind of new method for routing, adopting plural route cache device, but each route cache device all only needs to store under the design of route prefix of a certain selected bit length, make the route prefix high-speed cache in fact.And because each route cache device all only needs to store the route prefix of a certain selected bit length, so each route cache device can be selected general binary content addressing holder (Binary ContentAddressable Memory) for use.
Another object of the present invention is to propose a kind of new route system, it has plural route cache device, utilize an above-mentioned new method for routing and a high-speed cache update method, with the real route prefix high-speed cache of doing, improve the utilance of route cache device by this, and accelerate the speed of network equipment routing inquiry.
For reaching above-mentioned purpose, the invention provides a kind of method for routing, it is used for a route system, and it comprises the following steps.At first, select m route prefix length, be respectively L 1Bit, L 2Bit, L 3Bit ..., L mBit, wherein m, L 1, L 2, L 3..., L mBe positive integer and L 1<L 2<L 3<...<L mThen, the plural route prefix with this route system should be handled is divided into m group according to its route prefix length, is respectively 0~L 1Bit, L 1+ 1~L 2Bit, L 2+ 1~L 3Bit ..., L M-1+ 1~L mBit, and set up the 1st~the corresponding m routing table respectively; Wherein, when the route prefix length of the route prefix that should handle be the j bit, and between (L I-1+ 1)~L iBit, and when belonging to i group, use an expansion module that this route prefix is expanded to 2 Li-jIndividual L iThe route prefix of bit, and with the route prefix route data corresponding with it after this expansion, this i routing table is gone in storage, wherein i and j are positive integer and 2≤i≤m, L 1+ 1≤j≤L mIn addition, this route system is also kept a high-speed cache routing table simultaneously, and it is L that this high-speed cache routing table stores plural route prefix length 1The route prefix of bit and pairing plural route data thereof.
And receiving a L mThe network packet of the destination address of bit is according to the preceding L of this destination address 1Bit is sought in this high-speed cache routing table and the preceding L of this destination address 1The route prefix that bit is identical; While is according to the preceding L of this destination address 2Bit is sought in this secondary route table and the preceding L of this destination address 2The route prefix that bit is identical; The rest may be inferred, and the while is according to all L of this destination address mBit is sought in this m routing table and all L of this destination address mThe route prefix that bit is identical.And when in above-mentioned search comparison, one or more route prefix that is consistent being arranged,, and take out its pairing route data, and this network packet is spread out of according to this route data then by selecting the tool longest equal length in these route prefix that are consistent.And when in above-mentioned search comparison, not having any one route prefix that is consistent, in this first routing table, search and take out the preceding L of this destination address 1The pairing route data of bit, and this network packet is spread out of according to this route data, and with the preceding L of this destination address 1Bit and this route data are transferred to this high-speed cache routing table and are stored.Perhaps, when in above-mentioned search comparison, not having any one route prefix that is consistent, search and take out this pairing route data in destination address in a full routing table, and according to this route data, this network packet is spread out of, and with the preceding L of this destination address 1Bit and this route data are transferred to this high-speed cache routing table and are stored.Wherein this full routing table store all these route systems plural route prefix and the pairing plural route data that should handle.
Cooperate above-mentioned method for routing, the present invention proposes a kind of route system in addition, and it comprises one first route device and a secondary route device.This first route device comprises a receiving element, route prefix length processor, plural route cache device, an expansion module and a selection delivery unit.The secondary route device comprises one first routing table or a full routing table.
Description of drawings
Fig. 1 represents to set up in the embodiment of the invention schematic diagram of the processing procedure of routing table.
Fig. 2 represents the schematic diagram of processing procedure of the method for routing of the embodiment of the invention.
Fig. 3 represents in the embodiment of the invention schematic diagram of the processing procedure for can't find the pairing route data in this destination address in the route cache device time.
Fig. 4 represents the block diagram of route system one example of the embodiment of the invention.
Fig. 5 represents the block diagram of another example of route system of the embodiment of the invention.
{ A d}~route prefix;
20~destination address; 80,480,580~high-speed cache routing table;
50,450~the first routing tables; 60,460,560~secondary route table;
70,470,570~Third Road is by table; 550~full routing table;
22,404,504~selection delivery unit;
R1, R2, R3, R4, R Cache~search result;
10,408,508~route prefix length processor;
12a, 12b, 410,510~expansion module;
406a, 406b, 406c, 506a, 506b, 506c~binary content addressing holder;
400a, 400b, 500a, 500b~router; 402,502~receiving element.
Embodiment
The disclosed route cache device of the present invention is mainly used in the route technology of the network equipment, thus be called route cache device (routing cache), to be different from the Cache (Memory Cache) that generally is used for computer technology.Below cooperation is graphic, describes most preferred embodiment of the present invention in detail.
Fig. 1 represents to set up in the embodiment of the invention schematic diagram of the processing procedure of routing table.In this embodiment, select 3 route prefix length, 24,28 and 32 bits respectively, and set up first routing table 50, secondary route table 60 and Third Road respectively by table 70.At first, the plural route prefix { A that this route system should be handled dSend into route prefix length processor 10,10 of route prefix length processors are according to route prefix { A dBit length divide into groups.
As route prefix { A dLength when being 0~24 bit, with route prefix { A dAnd route data store up first routing table 50 in the route system.As route prefix { A dLength when being 25~28 bits, via expansion module 12a with route prefix { A dTo expand to 1 to 8 length be the route prefix of 28 bits according to following rule: as route prefix { A dLength when being 25 bits, in route prefix { A dAdditional respectively 8 patterns that length is 3 bits of tail end, be respectively 000,001,010,011,100,101,110 and 111, and the route prefix that to become 8 length be 28 bits; As route prefix { A dLength when being 26 bits, in route prefix { A dAdditional respectively 4 patterns that length is 2 bits of tail end, be respectively 00,01,10 and 11, and the route prefix that to become 4 length be 28 bits; As route prefix { A dLength when being 27 bits, in route prefix { A dAdditional respectively 2 patterns that length is 1 bit of tail end, be respectively 0 and 1, and the route prefix that to become 2 length be 28 bits; As route prefix { A dLength when being 28 bits, then need not to carry out additional move, directly export this route prefix { A d.And the length of expansion module 12a output is all the route prefix and the route prefix { A of 28 bits dRoute data, secondary route table 60 is gone in storage.
And as route prefix { A dLength when being 29~32 bits, via expansion module 12b with route prefix { A dTo expand to 1 to 8 length be the route prefix of 32 bits according to following rule: as route prefix { A dLength when being 29 bits, in route prefix { A dAdditional respectively 8 patterns that length is 3 bits of tail end, be respectively 000,001,010,011,100,101,110 and 111, and the route prefix that to become 8 length be 32 bits; As route prefix { A dLength when being 30 bits, in route prefix { A dAdditional respectively 4 patterns that length is 2 bits of tail end, be respectively 00,01,10 and 11, and the route prefix that to become 4 length be 32 bits; As route prefix { A dLength when being 31 bits, in route prefix { A dAdditional respectively 2 patterns that length is 1 bit of tail end, be respectively 0 and 1, and the route prefix that to become 2 length be 32 bits; As route prefix { A dLength when being 32 bits, need not to carry out additional move, directly export this route prefix { A d.And the length of expansion module 12b output is all the route prefix and the route prefix { A of 32 bits dRoute data, storage is gone into Third Road by table 70.
Fig. 2 represents the schematic diagram of processing procedure of the method for routing of the embodiment of the invention.At first, set up first routing table, 50 (not shown), secondary route table 60 and Third Road by table 70 according to the handling process of Fig. 1, and keep a high-speed cache routing table 80.High-speed cache routing table 80 stores the route prefix and the corresponding route data of plural 24 bits.High-speed cache routing table 80 adopts a route cache device, and this route cache device adopts a update algorithm (Algorithm) to upgrade high-speed cache routing table 80, and this update algorithm can be at most and does not use (Least-Recently-Used, LRU), (Random) or first-in first-out (First-In-First-Out, FIFO) scheduling algorithm at random.Secondary route table 60 and Third Road also adopt the route cache device respectively by table 70, but this two route caches device does not adopt update algorithm, and only can be upgraded by the expansion module 12a and the 12b of earlier figures 1 respectively.
Then, when route system receives a network packet, and the destination address 20 of this network packet is when being 32 bits, respectively with preceding 24 bits of this destination address 20, preceding 28 bits and all 32 bits, deliver to respectively high-speed cache routing table 80, secondary route table 60 and Third Road by table 70 to search.When in high-speed cache routing table 80, finding the identical route prefix of preceding 24 bits with this destination address 20, export the pairing route data R1 of this route prefix; And when in high-speed cache routing table 80, can not find the identical route prefix of preceding 24 bits with this destination address 20, do not export search result.When in secondary route table 60, finding the identical route prefix of preceding 28 bits with this destination address 20, export the pairing route data R2 of this route prefix; And when in secondary route table 60, can not find the identical route prefix of preceding 28 bits with this destination address 20, do not export search result.When at Third Road when finding the route prefix identical in the table 70 with this destination address 20 all 32 bits, export the pairing route data R3 of this route prefix; And when at Third Road when can not find the route prefix identical in the table 70 with this destination address 20 all 32 bits, do not export search result.
Then, with high-speed cache routing table 80, secondary route table 60 and Third Road search result by table 70, by select delivery unit 22 according to: Third Road is preferential by table 70, secondary route table 60 secondly, the last order of high-speed cache routing table 80, select the route data R of " the longest route prefix that meets " of this destination address Cache, and according to this route data R CacheThis network packet is spread out of.If at high-speed cache routing table 80, secondary route table 60 and Third Road by in the table 70, in the time of all can't finding the pairing route data in this destination address 20, that is when all not exporting search result, in first routing table 50 of this route system, search this destination address 20 pairing route datas (consulting the explanation of Fig. 3) so.
Fig. 3 represents in the embodiment of the invention, when at high-speed cache routing table 80, secondary route table 60 and Third Road by in the table 70, in the time of all can't finding the pairing route data in this destination address 20, the schematic diagram of its processing procedure.When high-speed cache routing table 80, secondary route table 60 and Third Road in Fig. 2 are not all exported search result by table 70, preceding 24 bits of this destination address 20 are delivered to first routing table 50 of this route system.Because it is plural route prefix and corresponding route data thereof between 0~24 bit that first routing table 50 has stored route prefix length, therefore in first routing table 50, search preceding 24 bits of this destination address 20, necessarily can find " the longest route prefix that meets " corresponding to preceding 24 bits of this destination address 20, and export the pairing route data R4 of this route prefix.And this network packet is spread out of (not shown) according to this route data R4.And preceding 24 bits and the route data R4 of this destination address 20 delivered to high-speed cache routing table 80, and whether the decision of the update algorithm of the route cache device that is adopted by high-speed cache routing table 80 should store these data, and this update algorithm can be at most and do not use, at random or the first-in first-out scheduling algorithm.
If this route system has a full routing table (not being shown among Fig. 1), and this full routing table to have stored route prefix length be (that is all route prefix length) all route prefix and corresponding route data thereof between 0~32 bit, then in Fig. 2, when at high-speed cache routing table 80, secondary route table 60 and Third Road by in the table 70, in the time of all can't finding the pairing route data in this destination address 20, also all 32 bits of destination address 20 can be delivered to this full routing table (this is not partly in this embodiment with illustration).Because it is all route prefix and corresponding route data thereof between 0~32 bit that this full routing table has stored route prefix length, therefore in this full routing table, search all 32 bits of this destination address 20, necessarily can find " the longest route prefix that meets " corresponding to all 32 bits of this destination address 20, and export the pairing route data of this route prefix.And this network packet is spread out of according to this route data.And preceding 24 bits and this route data of this destination address 20 delivered to high-speed cache routing table 80, and whether the update algorithm decision of the route cache device that is adopted by high-speed cache routing table 80 should store these data.
Fig. 4 represents the block diagram of route system one example of the embodiment of the invention.As shown in the figure, route system comprises the first router 400a and the second router 400b in this embodiment; The first router 400a comprises receiving element 402, selects delivery unit 404, route cache device 406a~406c, route prefix length processor 408 and expansion module 410; The second router 400b comprises first routing table 450.
In this embodiment, route cache device 406a~406c is binary content addressing holder (Binary Content Addressable Memory), and in binary content addressing holder 406a, there is secondary route table 460, in binary content addressing holder 406b, there is Third Road, in binary content addressing holder 406c, has high-speed cache routing table 480 by table 470.Binary content addressing holder 406c adopts a update algorithm upgrading the data that store in the high-speed cache routing table 480, this update algorithm can be at most and do not use, at random, update algorithm such as first-in first-out.But secondary route table 460 and Third Road are only built among binary content addressing holder 406a and the 406b by route prefix length processor 408 and expansion module 410 by table 470, and binary content addressing holder 406a and 406b do not determine whether to upgrade secondary route table 460 and Third Road by table 470.
408 of route prefix length processors are according to route prefix { A dBit length divide into groups.As route prefix { A dLength when being 0~24 bit, with route prefix { A dAnd route data store up first routing table 450 into this route system.As route prefix { A dLength when being 25~28 bits, via expansion module 410 with route prefix { A dTo expand to 1 to 8 length be the route prefix of 28 bits according to following rule: as route prefix { A dLength when being 25 bits, in route prefix { A dAdditional respectively 8 patterns that length is 3 bits of tail end, be respectively 000,001,010,011,100,101,110 and 111, and the route prefix that to become 8 length be 28 bits; As route prefix { A dLength when being 26 bits, in route prefix { A dAdditional respectively 4 patterns that length is 2 bits of tail end, be respectively 00,01,10 and 11, and the route prefix that to become 4 length be 28 bits; As route prefix { A dLength when being 27 bits, in route prefix { A dAdditional respectively 2 patterns that length is 1 bit of tail end, be respectively 0 and 1, and the route prefix that to become 2 length be 28 bits; As route prefix { A dLength when being 28 bits, then need not to carry out additional move, directly export this route prefix { A d.And the length of expansion module 410 output is all the route prefix and the route prefix { A of 28 bits dRoute data, secondary route table 460 is gone in storage.
And as route prefix { A dLength when being 29~32 bits, via expansion module 410 with route prefix { A dTo expand to 1 to 8 length be the route prefix of 32 bits according to following rule: as route prefix { A dLength when being 29 bits, in route prefix { A dAdditional respectively 8 patterns that length is 3 bits of tail end, be respectively 000,001,010,011,100,101,110 and 111, and the route prefix that to become 8 length be 32 bits; As route prefix { A dLength when being 30 bits, in route prefix { A dAdditional respectively 4 patterns that length is 2 bits of tail end, be respectively 00,01,10 and 11, and the route prefix that to become 4 length be 32 bits; As route prefix { A dLength when being 31 bits, in route prefix { A dAdditional respectively 2 patterns that length is 1 bit of tail end, be respectively 0 and 1, and the route prefix that to become 2 length be 32 bits; As route prefix { A dLength when being 32 bits, need not to carry out additional move, directly export this route prefix { A d.And the length of expansion module 410 output is all the route prefix and the route prefix { A of 32 bits dRoute data, storage is gone into Third Road by table 470.
Receiving element 402 receives the IP packet of the destination address with 32 bits, and the destination address of IP packet is sent among binary content addressing holder 406a~406c.And in binary content addressing holder 406a~406c, respectively according to preceding 24 bits of this destination address, preceding 28 bits and all 32 bits, respectively high-speed cache routing table 480, secondary route table 460 and Third Road by in the table 470 inquiry.
Select delivery unit 404 to be coupled to binary content addressing holder 406a~406c, according to the search result of exporting by table 470 at high-speed cache routing table 480, secondary route table 460 and Third Road, by select delivery unit 404 according to: Third Road is preferential by table 470, secondary route table 460 secondly, the last order of high-speed cache routing table 480, select route data, and this network packet is spread out of according to this route data to " the longest route prefix that meets " that should the destination address.
When high-speed cache routing table 480, secondary route table 460 and Third Road all can't be found route data to " the longest route prefix that meets " that should the destination address by table 470, that is when all not exporting search result, in first routing table 450 of this route system, search route data to " the longest route prefix that meets " that should the destination address.This route system is delivered to first routing table 450 with preceding 24 bits of this destination address, and searches the pairing route data of preceding 24 bits of this destination address in first routing table 450, and according to the route data that searches this IP packet is spread out of.And with preceding 24 bits and this route data of this destination address, deliver to high-speed cache routing table 480, and whether the decision of the update algorithm of the route cache device that is adopted by high-speed cache routing table 480 should store these data, and this update algorithm can be at most and do not use, at random or the first-in first-out scheduling algorithm.
Fig. 5 represents the block diagram of another example of route system of the embodiment of the invention.As shown in the figure, route system comprises the first router 500a and the second router 500b in this embodiment; The first router 500a comprises receiving element 502, selects delivery unit 504, route cache device 506a~506c, route prefix length processor 508 and expansion module 510; The second router 500b comprises full routing table 550.
In this embodiment, route cache device 506a~506c is a binary content addressing holder, and in binary content addressing holder 506a, there is secondary route table 560, in binary content addressing holder 506b, there is Third Road, in binary content addressing holder 506c, has high-speed cache routing table 580 by table 570.
Binary content addressing holder 506c adopts a update algorithm upgrading the data that store in the high-speed cache routing table 580, this update algorithm can be at most and do not use, at random, update algorithm such as first-in first-out.But secondary route table 560 and Third Road are only built among binary content addressing holder 506a and the 506b by route prefix length processor 508 and expansion module 510 by table 570, and binary content addressing holder 506a and 506b do not determine whether to upgrade secondary route table 560 and Third Road by table 570.
Full routing table 550 is in order to store all route prefix and the corresponding route data thereof that route prefix length is (that is all route prefix length) between 0~32 bit.508 of route prefix length processors are according to route prefix { A dBit length divide into groups.As route prefix { A dLength when being 0~32 bit, with route prefix { A dAnd route data store up full routing table 550 into this route system.As route prefix { A dLength when being 25~28 bits, via expansion module 510 with route prefix { A dTo expand to 1 to 8 length be the route prefix of 28 bits according to following rule: as route prefix { A dLength when being 25 bits, in route prefix { A dAdditional respectively 8 patterns that length is 3 bits of tail end, be respectively 000,001,010,011,100,101,110 and 111, and the route prefix that to become 8 length be 28 bits; As route prefix { A dLength when being 26 bits, in route prefix { A dAdditional respectively 4 patterns that length is 2 bits of tail end, be respectively 00,01,10 and 11, and the route prefix that to become 4 length be 28 bits; As route prefix { A dLength when being 27 bits, in route prefix { A dAdditional respectively 2 patterns that length is 1 bit of tail end, be respectively 0 and 1, and the route prefix that to become 2 length be 28 bits; As route prefix { A dLength when being 28 bits, then need not to carry out additional move, directly export this route prefix { A d.And the length of expansion module 510 output is all the route prefix and the route prefix { A of 28 bits dRoute data, secondary route table 560 is gone in storage.
And as route prefix { A dLength when being 29~32 bits, via expansion module 510 with route prefix { A dTo expand to 1 to 8 length be the route prefix of 32 bits according to following rule: as route prefix { A dLength when being 29 bits, in route prefix { A dAdditional respectively 8 patterns that length is 3 bits of tail end, be respectively 000,001,010,011,100,101,110 and 111, and the route prefix that to become 8 length be 32 bits; As route prefix { A dLength when being 30 bits, in route prefix { A dAdditional respectively 4 patterns that length is 2 bits of tail end, be respectively 00,01,10 and 11, and the route prefix that to become 4 length be 32 bits; As route prefix { A dLength when being 31 bits, in route prefix { A dAdditional respectively 2 patterns that length is 1 bit of tail end, be respectively 0 and 1, and the route prefix that to become 2 length be 32 bits; As route prefix { A dLength when being 32 bits, need not to carry out additional move, directly export this route prefix { A d.And the length of expansion module 510 output is all the route prefix and the route prefix { A of 32 bits dRoute data, storage is gone into Third Road by table 570.
Receiving element 502 receives the IP packet of the destination address with 32 bits, and the destination address of IP packet is sent among binary content addressing holder 506a~506c.And in binary content addressing holder 506a~506c, respectively according to preceding 24 bits of this destination address, preceding 28 bits and all 32 bits, respectively high-speed cache routing table 580, secondary route table 560 and Third Road by in the table 570 inquiry.
Select delivery unit 504 to be coupled to binary content addressing holder 506a~506c, according to the search result of exporting by table 570 at high-speed cache routing table 580, secondary route table 560 and Third Road, by select delivery unit 504 according to: Third Road is preferential by table 570, secondary route table 560 secondly, the last order of high-speed cache routing table 580, select route data, and this IP packet is spread out of according to this route data to " the longest route prefix that meets " that should the destination address.
When high-speed cache routing table 580, secondary route table 560 and Third Road all can't be found route data to " the longest route prefix that meets " that should the destination address by table 570, that is when all not exporting search result, in the full routing table 550 of this route system, search route data to " the longest route prefix that meets " that should the destination address.This route system is delivered to full routing table 550 with all 32 bits of this destination address, and searches the pairing route data of all 32 bits of this destination address in full routing table 550, and according to the route data that searches this IP packet is spread out of.And preceding 24 bits and this route data of this destination address delivered to high-speed cache routing table 580, and whether the decision of the update algorithm of the route cache device that is adopted by high-speed cache routing table 580 should store these data, and this update algorithm can be at most and do not use, at random or the first-in first-out scheduling algorithm.

Claims (11)

1. a method for routing is used for a route system, it is characterized in that, comprises the following steps:
Select m route prefix length, be respectively L 1Bit, L 2Bit, L 3Bit ..., L mBit, wherein m, L 1, L 2, L 3..., L mBe positive integer and L 1<L 2<L 3<...<L m
With this route system the plural route prefix that should handle be divided into m group according to its route prefix length, be respectively 0~L 1Bit, L 1+ 1~L 2Bit, L 2+ 1~L 3Bit ..., L M-1+ 1~L mBit, and set up the 2nd~the corresponding m routing table respectively, this route system is kept a high-speed cache routing table simultaneously; Wherein when the route prefix length of the route prefix that should handle be the j bit, and between (L I-1+ 1)~L iBit, and when belonging to i group, use an expansion module that this route prefix is expanded to 2 Li-jIndividual L iThe route prefix of bit, and with the route prefix route data corresponding with it after this expansion, this i routing table is gone in storage, wherein i and j are positive integer, and 2≤i≤m, L 1+ 1≤j≤L mIt is L that this high-speed cache routing table stores plural route prefix length 1The route prefix of bit and pairing plural route data thereof;
Receiving a destination address is L mThe network packet of bit;
Preceding L according to this destination address 1Bit is sought in this high-speed cache routing table and the preceding L of this destination address 1The route prefix that bit is identical, the while is according to the preceding L of this destination address 2Bit is sought in this secondary route table and the preceding L of this destination address 2The route prefix that bit is identical, the rest may be inferred, and the while is according to all L of this destination address mBit is sought in this m routing table and all L of this destination address mThe route prefix that bit is identical; And
In above-mentioned search comparison, one or more route prefix that is consistent is arranged, then by selecting the tool longest equal length in these route prefix that are consistent, and take out its pairing route data, to transmit this IP packet according to this route data.
2. method for routing as claimed in claim 1 is characterized in that, more comprises the following steps:
With this route system in the plural route prefix that should handle, length is 0~L 1The bit person sets up one first routing table; And when above-mentioned search comparison does not have any one route prefix that is consistent, in this first routing table, search and take out preceding L that should the destination address 1In the route prefix of bit, the pairing route data of elder of route prefix length; And
Transmit this IP packet according to this route data, and with the preceding L of this destination address 1Bit and this route data are transferred to this high-speed cache routing table and are stored.
3. method for routing as claimed in claim 1 is characterized in that, more comprises the following steps:
With this route system in the plural route prefix that should handle, route prefix length is 0~L mThe bit person sets up a full routing table; And when above-mentioned search comparison does not have any one route prefix that is consistent, in this full routing table, search and take out all L that should the destination address mIn the route prefix of bit, the pairing route data of elder of route prefix length; And
Transmit this IP packet according to this route data, and with the preceding L of this destination address 1Bit and this route data are transferred to this high-speed cache routing table and are stored.
4. method for routing as claimed in claim 1 is characterized in that, wherein m is 3, and L 1Be 24, L 2Be 28 and L 3Be 32.
5. method for routing as claimed in claim 1 is characterized in that, wherein m is 4, and L 1Be 24, L 2Be 48, L 3Be 64 and L 4Be 128.
6. a route system is characterized in that, this system comprises: one first route device, and it comprises:
One receiving element, it receives the destination address is the IP packet of r bit;
One route prefix length processor, in order to the plural route prefix that should handle, be divided into m group according to its route prefix length, be respectively 0~L 1Bit, L 1+ 1~L 2Bit, L 2+ 1~L 3Bit ..., L M-1+ 1~L mBit, wherein m, L 1, L 2, L 3..., L mBe positive integer and L 1<L 2<L 3<...<L m
Plural number route cache device, it is coupled to this receiving element, receives the destination address of this IP packet, and it comprises:
The plural number routing table is respectively the 2nd~the m routing table, according to the preceding L of this destination address 2Bit is sought in this secondary route table and the preceding L of this destination address 2The route prefix that bit is identical, the rest may be inferred, and the while is according to all L of this destination address mBit is sought in this m routing table and all L of this destination address mThe route prefix that bit is identical; And
One high-speed cache routing table is used to store plural L 1The route prefix of bit, and pairing plural route data, the while is according to the preceding L of this destination address 1Bit is sought in this high-speed cache routing table and the preceding L of this destination address 1The route prefix that bit is identical;
One expansion module, in order to being the j bit in route prefix length, and between (L I-1+ 1)~L iDuring bit, this route prefix is expanded to 2 Li-jIndividual L iThe route prefix of bit, and with the route prefix route data corresponding with it after this expansion, this i routing table is gone in storage, wherein i and j are positive integer and 2≤i≤m, L 1+ 1≤j≤L mAnd
One selects delivery unit, it is coupled to above-mentioned route cache device, in above-mentioned search comparison one or more route prefix that is consistent is arranged, by selecting longest equal length and corresponding route data thereof in these route prefix that conform to, and the IP packet is spread out of according to this route data; And
One secondary route device, it comprises one first routing table, it is coupled to this selection delivery unit, this high-speed cache routing table and this prefix length processor, this first routing table store this route system the plural route prefix that should handle, length is 0~L 1Bit, and pairing plural route data; When above-mentioned search comparison does not have any one route prefix that is consistent, in this first routing table, search and take out preceding L that should the destination address 1In the route prefix of bit, the pairing route data of elder of route prefix length; And, this IP packet is spread out of according to this route data; And with the preceding L of this destination address 1Bit and this route data are transferred to this high-speed cache routing table and are stored.
7. route system as claimed in claim 6 is characterized in that, wherein m is 3, and L 1Be 24, L 2Be 28 and L 3Be 32.
8. route system as claimed in claim 6 is characterized in that, wherein above-mentioned route cache device adopts binary content addressing holder.
9. a route system is characterized in that, this system comprises:
One first route device, it comprises:
One receiving element, it receives the destination address is the IP packet of r bit;
One route prefix length processor, in order to the plural route prefix that should handle, be divided into m group according to its route prefix length, be respectively 0~L 1Bit, L 1+ 1~L 2Bit, L 2+ 1~L 3Bit ..., L M-1+ 1~L mBit, wherein m, L 1, L 2, L 3..., L mBe positive integer and L 1<L 2<L 3<...<L m
Plural number route cache device, it is coupled to this receiving element, receives the destination address of this IP packet, and it comprises:
The plural number routing table is respectively the 2nd~the m routing table, according to the preceding L of this destination address 2Bit is sought in this secondary route table and the preceding L of this destination address 2The route prefix that bit is identical, the rest may be inferred, and the while is according to all L of this destination address mBit is sought in this m routing table and all L of this destination address mThe route prefix that bit is identical; And
One high-speed cache routing table is used to store plural L 1The pairing plural route data of the route prefix of bit and above-mentioned route prefix, the while is according to the preceding L of this destination address 1Bit is sought in this high-speed cache routing table and the preceding L of this destination address 1The route prefix that bit is identical;
One expansion module, in order to being the j bit in route prefix length, and between (L I-1+ 1)~L iDuring bit, this route prefix is expanded to 2 Li-jIndividual L iThe route prefix of bit, and with the route prefix route data corresponding with it after this expansion, this i routing table is gone in storage, wherein i and j are positive integer and 2≤i≤m, L 1+ 1≤j≤L mReach one and select delivery unit, it is coupled to above-mentioned route cache device, in above-mentioned search comparison one or more route prefix that is consistent is arranged, by selecting longest equal length and corresponding route data thereof in these route prefix that conform to, and the IP packet is spread out of according to this route data; And
One secondary route device, it comprises a full routing table, it is coupled to this selection delivery unit, this high-speed cache routing table and this prefix length processor, this full routing table store this route system all route prefix that should handle, and pairing plural route data; When above-mentioned search comparison does not have any one route prefix that is consistent, in this full routing table, search and take out in the route prefix to all r bits that should the destination address, the pairing route data of elder of route prefix length; And, this IP packet is spread out of according to this route data; And with the preceding L of this destination address 1Bit and this route data are transferred to this high-speed cache routing table and are stored.
10. route system as claimed in claim 9 is characterized in that, wherein m is 3, and L 1Be 24, L 2Be 28 and L 3Be 32.
11. route system as claimed in claim 9 is characterized in that, wherein above-mentioned route cache device adopts binary content addressing holder.
CNB021466289A 2002-10-28 2002-10-28 Routing method and routing system Expired - Fee Related CN1319347C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021466289A CN1319347C (en) 2002-10-28 2002-10-28 Routing method and routing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021466289A CN1319347C (en) 2002-10-28 2002-10-28 Routing method and routing system

Publications (2)

Publication Number Publication Date
CN1494276A CN1494276A (en) 2004-05-05
CN1319347C true CN1319347C (en) 2007-05-30

Family

ID=34232813

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021466289A Expired - Fee Related CN1319347C (en) 2002-10-28 2002-10-28 Routing method and routing system

Country Status (1)

Country Link
CN (1) CN1319347C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100394745C (en) * 2006-04-14 2008-06-11 迈普(四川)通信技术有限公司 Method for dynamically selecting outlet pathway
CN100486227C (en) * 2006-10-31 2009-05-06 成都迈普产业集团有限公司 Method for searching route table

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999014906A1 (en) * 1997-09-15 1999-03-25 Effnet Group Ab Method and system for fast routing lookups
EP1014628A1 (en) * 1998-05-08 2000-06-28 Ntt Mobile Communications Network Inc. Packet transfer method and packet transfer system in mobile communication network system, and medium for packet data
US20020118682A1 (en) * 2000-12-22 2002-08-29 Myongsu Choe Apparatus and method for performing high-speed IP route lookup and managing routing/forwarding tables

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999014906A1 (en) * 1997-09-15 1999-03-25 Effnet Group Ab Method and system for fast routing lookups
CN1270728A (en) * 1997-09-15 2000-10-18 埃弗内特集团股份有限公司 Method and system for fast routing lookups
EP1014628A1 (en) * 1998-05-08 2000-06-28 Ntt Mobile Communications Network Inc. Packet transfer method and packet transfer system in mobile communication network system, and medium for packet data
CN1269090A (en) * 1998-05-08 2000-10-04 Ntt移动通信网株式会社 Packet transfer method and packet transfer system in mobile communication network system, and medium for packet data
US20020118682A1 (en) * 2000-12-22 2002-08-29 Myongsu Choe Apparatus and method for performing high-speed IP route lookup and managing routing/forwarding tables

Also Published As

Publication number Publication date
CN1494276A (en) 2004-05-05

Similar Documents

Publication Publication Date Title
CN1270487C (en) Method and apparatus for ternary content addressable meomry (TCAM) table management
US7782853B2 (en) Apparatus and method of using fully configurable memory, multi-stage pipeline logic and an embedded processor to implement multi-bit trie algorithmic network search engine
US6956858B2 (en) Network routing table and packet routing method
USRE44151E1 (en) Switching ethernet controller
US7899067B2 (en) Method and apparatus for generating and using enhanced tree bitmap data structures in determining a longest prefix match
US7058789B2 (en) System and method for packet storage and retrieval
US7418505B2 (en) IP address lookup using either a hashing table or multiple hash functions
US5796944A (en) Apparatus and method for processing data frames in an internetworking device
US6625612B1 (en) Deterministic search algorithm
US6665297B1 (en) Network routing table
EP0998162B1 (en) Memory for searching information through prefix analysis, for nodes of high speed communication networks
KR100745693B1 (en) Method for ternary contents address memory table management
US6826561B2 (en) Method and apparatus for performing a binary search on an expanded tree
EP1551141A1 (en) Apparatus and method using hashing for efficiently implementing an IP lookup solution in hardware
WO2000051298B1 (en) Network router search engine using compressed tree forwarding table
US20040052254A1 (en) Distributed lookup based on packet contents
CN1377543A (en) Method and apparatus for four-way hash table
JP2006313949A (en) Packet transfer apparatus
US7277399B1 (en) Hardware-based route cache using prefix length
US20060200581A1 (en) Prefix processing technique for faster IP routing
CN1319347C (en) Routing method and routing system
US20070088854A1 (en) Apparatus for searching TCP and UDP sockets
CN100338586C (en) Methods and apparatus for allocating memory
US20030188018A1 (en) Technique to accelerate learning rate on linearly sorted lookup tables for high speed switches/routers
JP2021114707A (en) Transfer device and program for content distribution system

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
EE01 Entry into force of recordation of patent licensing contract

Assignee: HAOYANG TIANYU TECHNOLOGY (SHENZHEN) CO., LTD.

Assignor: Accton Technology Corporation

Contract fulfillment period: 2009.1.1 to 2013.12.31 contract change

Contract record no.: 2009990000290

Denomination of invention: Routing method and routing system

Granted publication date: 20070530

License type: Exclusive license

Record date: 2009.4.10

LIC Patent licence contract for exploitation submitted for record

Free format text: EXCLUSIVE LICENSE; TIME LIMIT OF IMPLEMENTING CONTACT: 2009.1.1 TO 2013.12.31; CHANGE OF CONTRACT

Name of requester: HAO YANG TIN YU TECHNOLOGY (SHENZHEN) CO., LTD.

Effective date: 20090410

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

Termination date: 20161028