CN104009922B - IPV4/IPV6 routing capacity sharing methods based on TCAM - Google Patents
IPV4/IPV6 routing capacity sharing methods based on TCAM Download PDFInfo
- Publication number
- CN104009922B CN104009922B CN201410195141.3A CN201410195141A CN104009922B CN 104009922 B CN104009922 B CN 104009922B CN 201410195141 A CN201410195141 A CN 201410195141A CN 104009922 B CN104009922 B CN 104009922B
- Authority
- CN
- China
- Prior art keywords
- route
- ipv6
- ipv4
- region
- leading portion
- 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.)
- Active
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A kind of IPV4/IPV6 routing capacity sharing methods based on TCAM, are related to three-state content addressing memory technology:TCAM hardware lists are divided into leading portion region and back segment region wall scroll IPV6 route prefix is decomposed into IPV6 first halfs and IPV6 latter halfs;For IPV4 route, first coupling leading portion region, if not matching, mates back segment region;For IPV6 route, first Match IP V6 first half continues Match IP V6 latter half to back segment region to leading portion region if matching.The present invention realizes the dynamic flexible distribution of hardware table item in IPV4/IPV6 routes, without the need for customizing different software versions to two router, improves route specification index, meets the demand of more multi-router.
Description
Technical field
The present invention relates to three-state content addressing memory technology, is specifically a kind of IPV4/IPV6 roads based on TCAM
By capacity sharing method.
Background technology
With the development of modern network, VPN (Virtual Private Network, VPN (virtual private network)) technology general
And use, modern high performance router proposes higher requirement to the number of routes that supports.Meanwhile, rapid with the Internet is sent out
Exhibition, the limited address space of original IPV4 procotols definition have exhausted, and the deficiency of address space will hinder the Internet
Further development, support IPV6 agreements will solve the problems, such as network address resources quantity, while being also the equipment in addition to computer
Being connected into the Internet and obstacle having been cleared away on quantity is limited, network supports that IPV6 agreements will become inevitable trend comprehensively.
Therefore, current router also requires that support is big while compatible support substantial amounts of IPV4 routing capacitys are required
The IPV6 number of routes of amount;But both are usually the relation for competing hardware, if meeting more IPV4 number of routes,
Less IPV6 number of routes can only be met, vice versa.Relative to the explosive increase of route need, router supports route
The hardware advances speed of coupling is but relatively delayed, and price is remained high all the time, which results in the relative of hardware resource
Rare, the hardware resource therefore how preferably using router is very valuable to meet routing forwarding.
As it was previously stated, the IPV4 number of routes and IPV6 number of routes of modern router typically all constitute hardware competition closing
System, then both are shared, and (Ternary Content Addressable Memory, three-state content addressing are stored using TCAM
Device) hardware is then a natural way.But, traditional way is that TCAM is divided into two clear and definite blocks, is respectively used to
Storage IPV4 and IPV6 route contents.Due to the characteristic of hardware, the size of the two blocks must be determined in advance, it is impossible to which dynamic is adjusted
Whole, thus make the route of IPV4 and IPV6 underaction in the distribution of number.One extreme example is, certain a route
Device requires that the IPV4 at least supporting total entry capacity to be 512K route, and the IPV6 for only needing to support total entry capacity to be 40K route;
And in addition a router then requires that the IPV6 at least supporting total entry capacity to be 256K route, and only need to support total entry capacity
IPV4 for 80K route.It is accomplished by this case customizing different software versions to two router, to product version
Management brings very big problem.
Content of the invention
For defect present in prior art, it is an object of the invention to provide a kind of IPV4/IPV6 based on TCAM
Routing capacity sharing method, realizes the dynamic flexible distribution of hardware table item in IPV4/IPV6 routes, without the need for fixed to two router
The different software version of system, improves route specification index, meets the demand of more multi-router.
For reaching object above, the present invention is adopted the technical scheme that:A kind of IPV4/IPV6 routing capacitys based on TCAM
Sharing method, including:TCAM hardware lists are divided into leading portion region and back segment region, each region uses 80bit as route
Matching field, wall scroll IPV6 route prefix is decomposed into IPV6 first halfs and IPV6 latter halfs;For IPV4 route, first
Mate the leading portion region, if being not matched to, continue coupling back segment region;The leading portion region and back segment region are all only
Route forwarding table and route-type that 32bit IP values, route with IPV4 routes is located;For IPV6 route, first mate
IPV6 first halfs continue Match IP V6 latter half to the back segment region to the leading portion region if matching;Described
Route forwarding table and route-type that the front 67bit IP values of leading portion Region Matching IPV6 routes, route are located;The back segment
The id field returned after the rear 61bit IP values of Region Matching IPV6 routes, route-type and the storage of leading portion region, the ID
Field is used for indicating storage ID of the IPV6 first halfs in program internal maintenance.
On the basis of above-mentioned technical proposal, in the matching field of the 80bit routes, including a differentiation field, use
In the route-type for distinguishing hardware list list item coupling.
On the basis of above-mentioned technical proposal, if the differentiation field value is 1, the list item is route for Match IP V6;
If the differentiation field value is 0, the list item is route for Match IP V4.
On the basis of above-mentioned technical proposal, when the bag handling process receives IPV4 messages or IPV6 messages, entering
Before matched routings, need the IP address in the route forwarding table and message that the route is located to extract, and use variable save
Distinguish field.
On the basis of above-mentioned technical proposal, in the route prefix, it is that each route mask-length is redistributed newly
Inside mask-length, it is 95~162bit that the mask distribution of IPV6 first halfs is interval;It is 62 that the mask distribution of IPV4 is interval
~94bit;It is 0~61bit that the mask distribution of IPV6 latter halfs is interval.
On the basis of above-mentioned technical proposal, for IPV4 route, first with the 32bit IP values and route place routeing
Route forwarding table mates the leading portion region of hardware list, if list item is not mated in leading portion region, enters the back segment region of hardware list
Coupling, if do not mate list item, discarding traffic bag;If on leading portion region or back segment Region Matching, entering follow-up turning
The process of sending out.
On the basis of above-mentioned technical proposal, for IPV6 route, first it is located with the front 67bit IP values and route of route
Route forwarding table mate hardware list leading portion region, if leading portion region have coupling list item, obtain id field, with after
The route forwarding table coupling back segment region that 61bit IP values and route are located, if the match is successful, enters follow-up repeating process.
On the basis of above-mentioned technical proposal, if the leading portion region does not have the coupling list item of IPV6 first halfs, or
Coupling list item that back segment region does not have IPV6 latter halfs, then discarding traffic bag.
The beneficial effects of the present invention is:According to the basic principle of matched routings, efficient process business repeating process, is to be
System can more flexibly adjust IPV4/IPV6 number of routes, it is achieved that IPV4 routes press 2 to IPV6 routes:1 dynamic is shared to be accounted for
TCAM hardware resources are used, the level of resources utilization is given full play to, the IPV6 route specification index of router is significantly improved, is met
More router applications scenes.
Description of the drawings
Fig. 1 is the route processing flow chart that the present invention forwards IPV4 business;
Fig. 2 is the route processing flow chart that the present invention forwards IPV6 business.
Specific embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
IPV4/IPV6 routing capacity sharing method of the present invention based on TCAM, including:
TCAM hardware lists are divided into leading portion region (part_hi) and back segment region (part_lo) to manage, each region
80bit is used as the matching field of route.Improvement is made to the matching way that traditional IPV4 and IPV6 route, is set in hardware
Middle interpolation IPV4 and IPV6 Route Distinguisher is put, in the matching field of the 80bit routes, including a differentiation field (v6_
Flag), dedicated for the route-type of list item coupling in hardware list is distinguished, if it is 1 to distinguish field value, the list item is used for mating
IPV6 route;If the differentiation field value is 0, the list item is route for Match IP V4.
Wall scroll IPV6 route prefix is decomposed into IPV6 first halfs (ipv6_hi) and IPV6 latter halfs (ipv6_lo),
It is stored respectively in leading portion region (part_hi) and back segment region (part_lo);Meanwhile, the two regions are for IPV4
The lookup of route and coupling are then equivalents.Part_hi and part_lo is not different when routeing for Match IP V4,
All only mate 32bit IP values, the VRF (Virtual Routing Forwarding, route forwarding table) at route place of route
And route-type.Part_hi be used for Match IP V6 when, Match IP V6 route front 67bit IP values, route place VRF with
And route-type;An id field (ipv6_idx) can be returned in result after coupling, for indicating the ipv6_hi of IPV6 routes
It is used in storage ID (digit of this ID determines the maximum IPV6 entry numbers that can the be supported) part_lo of program internal maintenance
During Match IP V6, ipv6_idx values and route-type that the rear 61bit IP values of Match IP V6 route, front half section are returned.
In the storage design of route prefix, it is that each route mask-length redistributes new inside mask-length,
For the arrangement of internal route storage location in hardware list, to realize the matched routings fundamental rule of most long code mask coupling.Base
This allocation rule is set to:
It is 95~162bit that the mask distribution of IPV6 first halfs is interval;
It is 62~94bit that the mask distribution of IPV4 is interval;
It is 0~61bit that the mask distribution of IPV6 latter halfs is interval.
Due to doing the router of matched routings based on TCAM, it is necessary to assure the matching order of route follows strictly most long code mask
Matched rule, then in the case where the original routing configuration algorithm of router is not changed, using new route mask distribution rule
Then, program can dynamically adjust route in the position of hardware store, and the matching order of strict guarantee route is as follows:
(1) for the coupling of IPV4 routes, keep and original route arrangement is constant.
(2) for the coupling of IPV6 routes, it is ensured that ipv6_hi is arranged in the part_hi of TCAM, ipv6_lo parts
The ipv6_lo of TCAM is arranged in, is met, then the matched rule for mating ipv6_lo parts.
As shown in figure 1, when service message is an IPV4 message, by executing following service message couplings and turning
Send out, it is achieved that the normal repeating process of business, comprise the following steps that:
S101., when the identification of bag handling process receives an IPV4 message, before entering matched routings, need route is located
VRF and message in IP address (32bit IP values) extract, and with variable save distinguish field (v6_flag), i.e.,
Set is 0, and using these three values as IPV4 matched routings keyword.
S102. the keyword routeing IPV4 is sent into the part_hi of hardware list and is mated.
S103. judge whether there is coupling list item in part_hi, if it has, entering S104;If it did not, entering S105.
S104.IPV4 matched routings terminate, and carry out normal business forwarding, and terminate this flow process.
S105. the keyword routeing IPV4 is sent into the part_lo of hardware list and is mated.
S106. judge whether there is coupling list item in part_lo, if it has, proceeding to S104;If it did not, entering S107.
S107. business packet is done discard processing, and terminates this flow process.
As shown in Fig. 2 when service message is an IPV6 message, by executing following service message couplings and turning
Send out, it is achieved that the process that business is normally forwarded, comprise the following steps that:
S201., when the identification of bag handling process receives an IPV6 message, before entering matched routings, need route is located
VRF and first 67 (front 67bit IP values) of message IP address extract, and distinguish field with internal variable save
(v6_flag), i.e., set is 1, the keyword that these three value combinations are mated as ipv6_hi.
S202. the keyword for mating ipv6_hi is sent into the part_hi of hardware list and is mated.
S203. judge the list item that IPV6 routes whether are matched in part_hi, if not, entering S204;If it is,
Enter S205.
S204. there is no the IPV6 routes that can be matched in whole hardware list, business packet is done discard processing, and terminates this
Secondary flow process.
S205. corresponding SRAM (Static RAM, SRAM) is accessed, ipv6_idx values is obtained, after being used for
Continuous matching process.
S206. latter 61 (61bit IP values afterwards) of ipv6_idx values and message IP address are extracted, and with become
It is 1 that amount is preserved and distinguishes field (v6_flag), i.e. set, and these three values are combined the keyword as ipv6_lo couplings.
S207. the keyword for mating ipv6_lo is sent into the ipv6_lo of hardware list and is mated.
S208. judge the list item that ipv6_lo routes whether are matched in part_lo, if not, entering S204;If it is,
Enter S209.
S209. normal business forwarding is carried out, and terminates this flow process.
As the embodiment of the present invention is after routing configuration is completed, coupling business is completed by hardware completely, relative to original
Operation flow has more a business matching process, but can complete within a forwarding cycle due to entirely mating flow process, because
This does not affect the forwarding performance of router completely.
The present invention is not limited to above-mentioned embodiment, for those skilled in the art, without departing from
On the premise of the principle of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as the protection of the present invention
Within the scope of.The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.
Claims (8)
1. a kind of IPV4/IPV6 routing capacity sharing methods based on TCAM, it is characterised in that include:
TCAM hardware lists are divided into leading portion region and back segment region, each region uses 80bit as the matching field of route,
Wall scroll IPV6 route prefix is decomposed into IPV6 first halfs and IPV6 latter halfs;
For IPV4 route, first mate the leading portion region, if being not matched to, continue coupling back segment region;The leading portion
The region and back segment region route forwarding table that all the 32bit IP values of a Match IP V4 route, route are located and route-type;
For IPV6 route, first Match IP V6 first half continues Match IP V6 later half to the leading portion region if matching
Arrive the back segment region in part;The routing forwarding that the front 67bit IP values of the leading portion Region Matching IPV6 routes, route are located
Table and route-type;Deposit in the rear 61bit IP values of the back segment Region Matching IPV6 routes, route-type and leading portion region
The id field returned after storage, the id field are used for indicating storage ID of the IPV6 first halfs in program internal maintenance.
2. IPV4/IPV6 routing capacity sharing methods based on TCAM as claimed in claim 1, it is characterised in that:Described
In the matching field of 80bit routes, including a differentiation field, for distinguishing the route-type of hardware list list item coupling.
3. IPV4/IPV6 routing capacity sharing methods based on TCAM as claimed in claim 2, it is characterised in that:If described
It is 1 to distinguish field value, then the list item is route for Match IP V6;If the differentiation field value is 0, the list item is used for mating
IPV4 route.
4. IPV4/IPV6 routing capacity sharing methods based on TCAM as claimed in claim 2, it is characterised in that:Bag process
When flow process receives IPV4 messages or IPV6 messages, before matched routings are entered, need route forwarding table that the route is located and
IP address in message is extracted, and distinguishes field with variable save.
5. IPV4/IPV6 routing capacity sharing methods based on TCAM as claimed in claim 1, it is characterised in that:The road
In by prefix, it is that each route mask-length redistributes new inside mask-length, the mask distribution of IPV6 first halfs
Interval is 95~162bit;It is 62~94bit that the mask distribution of IPV4 is interval;It is 0 that the mask distribution of IPV6 latter halfs is interval
~61bit.
6. IPV4/IPV6 routing capacity sharing methods based on TCAM as claimed in claim 1, it is characterised in that:For
IPV4 route, and the route forwarding table being first located with the 32bit IP values and route of route mates the leading portion region of hardware list, if front
List item is not mated in section region, then enter the back segment Region Matching of hardware list, if not mating list item, discarding traffic bag;
If on leading portion region or back segment Region Matching, entering follow-up repeating process.
7. IPV4/IPV6 routing capacity sharing methods based on TCAM as claimed in claim 1, it is characterised in that:For
IPV6 route, and the route forwarding table being first located with the front 67bit IP values and route of route mates the leading portion region of hardware list, if
Leading portion region has coupling list item, then obtain id field, after the route forwarding table coupling being located with rear 61bit IP values and route
Section region, if the match is successful, enters follow-up repeating process.
8. IPV4/IPV6 routing capacity sharing methods based on TCAM as described in claim 1 or 7, it is characterised in that:If institute
Stating leading portion region does not have the coupling list item of IPV6 first halfs, or back segment region does not have the matching list of IPV6 latter halfs
, then discarding traffic bag.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410195141.3A CN104009922B (en) | 2014-05-09 | 2014-05-09 | IPV4/IPV6 routing capacity sharing methods based on TCAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410195141.3A CN104009922B (en) | 2014-05-09 | 2014-05-09 | IPV4/IPV6 routing capacity sharing methods based on TCAM |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104009922A CN104009922A (en) | 2014-08-27 |
CN104009922B true CN104009922B (en) | 2017-03-15 |
Family
ID=51370417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410195141.3A Active CN104009922B (en) | 2014-05-09 | 2014-05-09 | IPV4/IPV6 routing capacity sharing methods based on TCAM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104009922B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105743678A (en) * | 2014-12-11 | 2016-07-06 | 中兴通讯股份有限公司 | Method and apparatus for managing table space of ternary content addressable memory (TCAM) |
CN104639448B (en) * | 2014-12-18 | 2018-10-16 | 北京北方烽火科技有限公司 | Base station retransmission method and system in a kind of lte-a system |
CN107896193B (en) * | 2017-12-29 | 2020-10-16 | 湖南恒茂高科股份有限公司 | Switch, and creation method and search method of lookup table of switch |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101039252A (en) * | 2006-03-15 | 2007-09-19 | 中兴通讯股份有限公司 | Method for managing route table of ternary content addressable memory |
US7571156B1 (en) * | 2003-03-28 | 2009-08-04 | Netlogic Microsystems, Inc. | Network device, storage medium and methods for incrementally updating a forwarding database |
CN101582851A (en) * | 2009-06-12 | 2009-11-18 | 中兴通讯股份有限公司 | Method and system for realizing sharing route capacity on dual-stacker router |
US8059658B1 (en) * | 2005-12-23 | 2011-11-15 | Extreme Networks, Inc. | Method and system for automatic expansion and contraction of IP host forwarding database |
CN102291296A (en) * | 2011-08-04 | 2011-12-21 | 中兴通讯股份有限公司 | Updating method and system of routing table |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7564841B2 (en) * | 2004-03-05 | 2009-07-21 | Samsung Electronics Co., Ltd. | Apparatus and method for performing forwarding table searches using consecutive symbols tables |
KR100962653B1 (en) * | 2008-07-24 | 2010-06-11 | 이화여자대학교 산학협력단 | IP Address Lookup Method And Apparatus by Using Bloom Filter And Multi-Hashing Architecture |
-
2014
- 2014-05-09 CN CN201410195141.3A patent/CN104009922B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7571156B1 (en) * | 2003-03-28 | 2009-08-04 | Netlogic Microsystems, Inc. | Network device, storage medium and methods for incrementally updating a forwarding database |
US8059658B1 (en) * | 2005-12-23 | 2011-11-15 | Extreme Networks, Inc. | Method and system for automatic expansion and contraction of IP host forwarding database |
CN101039252A (en) * | 2006-03-15 | 2007-09-19 | 中兴通讯股份有限公司 | Method for managing route table of ternary content addressable memory |
CN101582851A (en) * | 2009-06-12 | 2009-11-18 | 中兴通讯股份有限公司 | Method and system for realizing sharing route capacity on dual-stacker router |
CN102291296A (en) * | 2011-08-04 | 2011-12-21 | 中兴通讯股份有限公司 | Updating method and system of routing table |
Also Published As
Publication number | Publication date |
---|---|
CN104009922A (en) | 2014-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9300575B2 (en) | Methods and apparatus to utilize route parameter sets for exchanging routes in a communication network | |
US7936764B1 (en) | Method for optimizing IP route table size through IP route aggregation | |
US10608866B2 (en) | Forwarding Ethernet packets | |
CN109639579B (en) | Multicast message processing method and device, storage medium and processor | |
CN100454902C (en) | Method for implementing multi-area stream classifying | |
CN109218158B (en) | VxLAN-based data transmission method, control method, controller, gateway, intermediate network element and system | |
CN107005474A (en) | The method, apparatus and system of route test | |
CN109714274B (en) | Method for acquiring corresponding relation and routing equipment | |
CN108377262A (en) | Manage the method for the service chaining at the network equipment, the corresponding network equipment | |
CN104009922B (en) | IPV4/IPV6 routing capacity sharing methods based on TCAM | |
US9960995B2 (en) | Packet forwarding using a physical unit and a virtual forwarding unit | |
US20170366459A1 (en) | Jump on a Match Optimization for Longest Prefix Match using a Binary Search Tree | |
CN101645851B (en) | Recombination method for IP fragment messages and device thereof | |
CN104410541A (en) | Method and device for counting VXLAN inner layer virtual machine flux on intermediate switch | |
CN107347035B (en) | Route searching method and device, distribution node, searching node and entry node | |
US9183322B2 (en) | Increasing internet protocol version 6 host table scalability in top of rack switches for data center deployments | |
US20190020584A1 (en) | Packet Processing Method and System, and Device | |
CN107707474A (en) | A kind of route distribution method and system | |
CN112583711A (en) | Message processing method and device | |
TW201537918A (en) | Methods and systems for flexible packet classification | |
CN105763444A (en) | Route synchronization method and route synchronization device | |
CN112653622B (en) | SRv6uSID forwarding method and device | |
CN105227468B (en) | A kind of lookup device, lookup method and configuration method | |
EP4387185A1 (en) | Communication system, global controller, and program | |
CN101110769B (en) | Package transmitting method and system based on safety service |
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 |