Você está na página 1de 4

IEEE ANTS 2013 1569804863

Minimization of Flow Table for TCAM based


Openow Switches by Virtual Compression
Approach
S Veeramani

Manas Kumar

Noor Mahammad Sk

PhD Scholar
Dept. of CSE
IIITD&M Kancheepuram
Chennai - 600 127

Dept. of CSE
NIT Sikkim
Sikkim - 737 139

Assistant Professor, Dept. of CSE


Indian Institute of Information Technology
Design and Manufacturing (IIITD&M) Kancheepuram
Chennai - 600 127, Ph: +91-44-2747 6349
Email: noor@iiitdm.ac.in
along with the binary value 0s and 1s and it takes only single
clock cycle to search IP address. Despite several advantages,
it also suffers from high power consumption. In every look up
operation all the memory cell should be active. As a result
power consumption of TCAM increases two or three time
greater than the SRAM. Because of this high power it increases
cooling cost of every chip. Recently there are lot of techniques
has been proposed to reduce the power of TCAM memory [1],
[2]. The number of output stages of the TCAM is depends
on priority encoder. Since number of table entries increase as
proportional to a node increases, the available table capacity
cant adopt to all the entries. So it gives a greater risk in
optimizing the TCAM storage space. Routing table compaction
is one of the approaches to optimize the table entries [3],
[4]. Liu has proposed a method to eliminate redundant entries
in the ow table namely pruning and mask extension. Using
this two approaches we can achieves only 45 percentages of
table compaction. And this approach is based an espresso-II
minimization algorithm [5].

AbstractForwarding lookup in the open ow switch can be


done for each arriving packet by every switch in path. Every
switch maintains a set of IP prex value in its lookup table. For
a given IP address it nds a longest prex match in the forwarding
table that matches rst fewer bits of destination address. Earlier,
there are several technique that has been proposed to optimize the
table space and to reduce the number of entries in the forwarding
table. In TCAM, prex values needs to be stored in descending
order of its length, it require more number of entries needs to
be shifted. In this paper we propose a method to reduce the
length of the prex value up to 50 to 60% horizontally as well
as vertically which will be stored in the forwarding table. It
involves signicant prex methods to reduce number of entries
in the forwarding table.
KeywordsTCAM, SRAM, Openow, Flow table Reduction and
Prex matching.

I.

I NTRODUCTION

In modern IP router look up has a drawback in packet


forwarding because look up speeds not able to cope up
with increase in link bandwidth. Software approach can take
4 to 6 times memory access to perform a single look up
operation. So, many of the researchers introduces hardware
based approaches like content addressable memory (CAM). In
RAM user supplies memory address and it will return exact
data at that memory location. In CAM user supplies the data,
it will return list of memory addresses if a word matches.
If multiple matches is found, priority encoder select the rst
match. A typical CAM will have two SRAM cells. There are
two types of CAMs 1) binary CAM, which stores only binary
values and 2)ternary CAM includes dont care case apart from
binary numbers. Search time of this CAM takes only O(1).
This is accomplished by adding comparison circuitry to every
cell of hardware memory. The result is a fast, because it
perform search in parallel. But it is bounded by only a single
memory access. Later they decided to use binary CAM. It
can be used for xed length prexes but cant be used for the
longest prex match. To overcome the difculties of CAM and
binary CAM and TCAM has been introduced.

The rest of the paper is organized as follows, section II


elaborates the details about space reduction methods from the
literature, section III elaborate background of TCAM memory,
section IV describe about proposed technique to reduce table
size, section V describes about comparison with existing
algorithm and followed by section VI conclusions.
II.

S PACE REDUCTION METHOD FOR TCAM FROM THE


L ITERATURE

In [1] proposes hardware based approach can improve use of


TCAM space than software approach. And also states that
this method works well for the variable size of routing table
entries. By reducing the size of the routing table entries it
also decreases cost as well as power consumption. In [2] they
presented two major techniques to optimize the routing table
namely pruning and mask extension. Pruning technique is used
to eliminate redundant entries from the routing table. In mask
extension approach prex value can be combined into a single
entry based on the next hop information. In [3] they propose
several methods to reduce the number of table entries namely
prex overlapping, minimization, expansion and aggregation.
Among these methods, overlapping and minimization reduces
the table entries from 30 to 45 percent only at the same

Many of the commercial router/switch designer have decides to use ternary content addressable memory for the
efcient look up operation in order to meet the requirement
of speed, power and cost. This TCAM stores dont care case

time it requires fast updating of table entries. In [4] presented


about simultaneous comparison of key with every index at the
same time longest prex can be selected within one memory
access. They propose two techniques namely pruning and
mask extension to compact the routing table stored in TCAM.
And also proposes the fast incremental update algorithm to
save memory. In [6] they partitioning the look up table into
smaller one for each output port and allowing the forwarding
engine to process them in parallel. In [7] they developed the
model of address lookup into a binary trie and employee a
hierarchical indexing structure to facilitate direct access. It
is also estimated that forwarding table with 40K prex will
consumes 2.5 Mbytes of memory. The distinguish feature of
this model table entries are not replicated in the data structure.

IP Address

Zero Compaction

Prefix Overlapping

Prefix Minimization

Compacted IP Address

Fig. 1: Virtual Compression Approach

III.

BACKGROUND

In general IP address look up can be done by either hardware


or software. Recently, software approaches for routing look up
have been proposed [8], [9]. But these are too slow to respond
for complex packets due to their high memory access. These
approaches mainly take ve to six memory access for a single
lookup operation irrespective of the hardware. It can provide
up to 10 Gbps speed for packet processing [10] which is
four times less than our requirement of packet processing. On
the other hand hardware approaches use dedicated hardware
for routing lookup [11], [10]. They use CAM which is very
popular as its search time is O(1), that is it uses single memory
access. Binary CAMs are unsuitable as they allow only xed
length comparisons. The TCAM solves this problem and is
the fastest hardware for routing lookup. TCAM uses 0, 1 and
dont care statement (x) for storing data.

to the multiple of eight. The prexes having a different LCS


are least likely to have the same next hop. According to this
observation, applying minimization to a set of prexes having
the same LCS should achieve a compaction nearly equal to
that achieved by applying minimization to the entire lookup
table. Prex minimization reduces two or more prexes to a
minimal set, if these prexes have same next hop. The logic
minimization is NP complete problem solvable using Espresso
II algorithm [5]. Espresso-II is a minimization algorithm which
will minimize the set of prexes.
A. Contribution of this paper
Routing table for IPv4 has been growing at a steady pace
for many years. It will increase by a great extent due to
the use of IPv6 addresses in near future. This increasing
routing table has made optimal storage important. This paper
is dedicated for minimizing the size of routing table keeping
in mind the IPv6 addresses. Our approach virtual compression
is used for reducing the routing table. Zero compaction used
in our approach can reduce the IPv6 addresses by (50 60)%
horizontally. Prex overlapping and prex minimization both
can reduce the IP lookup table by (5060)% vertically. In case
of routing table there are millions of entries and our approach
can be very useful in that case. By minimizing the routing
table by (50 60)% both vertically and horizontally we can
enhance the searching ability in case of index TCAM. We can
also save the power by reducing the IP lookup table. Hence
our paper is very useful for TCAM based openow switches.

As routing table entries are increasing day by day, there


is a great need to optimize TCAM storage space by using
the properties of look up tables [2], [6]. Since TCAM can
store large number of prexes there is one drawback that it
is power hungry. Todays high-density TCAMs consume 12 to
15W per chip when the entire memory is enabled, this reduces
the usefulness of TCAM. There are different approaches for
cooling the TCAM like paged TCAM introduced by Panigrahy
and Sharma [12], which divides prexes into eight groups
of equal size; each group resides on a separate TCAM chip.
Then it takes one of the eight group for nding a match for
incoming IP address. However, this approach achieves only
marginal power savings at the cost of additional memory and
lookup delay. Other works describe bit selection and trie based
partitioning for a power efcient TCAM [13]. Both these
approaches [13], [12] store the entire routing table which is
unnecessary overhead in terms of memory and power.

IV.

There are prex compaction techniques like prex overlapping, prex aggregation and prex minimization which are
proposed for minimizing the ow table. We will discuss these
methods one by one. Prex overlapping achieves compaction
by reducing the number of entries for same next hop. Prexes
will be overlapped if they are enclosure of others. Whenever a
new entry comes despite of changing the table only updating is
required. This can be understood with the help of an example:
Prex aggregation represents all the prexes in the routing
table, having prex length l, for 16 < l 24. It sees for
largest common sub prex (LCS) for the set of those prexes.
The LCS for any prex is the sub prex with a length nearest

P ROPOSED T ECHNIQUE TO R EDUCE THE TABLE S IZE

The prex properties described earlier reduce the IP lookup


table vertically. These techniques are not so useful in case of
IPv6 addresses as they contain 128 bit and above described
methods cant be used effectively. As IPv6 is the future of IP
addresses, proposed architecture will be helpful in that case.
The proposed technique consists of a new approach as zero
compaction [5]. Our main aim is to reduce the IP lookup table
vertically and horizontally both. Zero-compaction reduces the
number of zeroes by replacing number of zeroes with a (x)
dont care statement. This type of compaction can be used
only once in the address. If there are two runs of zero sections
then only one of them can be compressed. This can be seen in

the Figure 1. Our proposed technique consists of three steps.


In rst step IP addresses are compressed by Zero-compaction
where we can reduce IP address size marginally, specially in
the case of IPv6 addresses. Horizontally we can reduce up to
50 to 60% of the size of IP lookup table by this process.
In second step prex overlapping is applied and this will
minimize the same next hop IP addresses marginally. The
prex overlapping store only one of many overlapping prexes,
that have same next hop. If the prex set is {p1 , p2 , . . . pn },
then it can be reduced into {p1 , p2 , . . . pm } by applying prex
overlapping if pi is prex then pi p is called enclosure of
pj . If pj p, j = i and |pi | < |pj |, such that pi is prex
of pj . If pi and pj have same next hop, then pi can represent
them. In third step further the IP addresses are compressed by
applying prex minimization which uses Espresso-II algorithm
for further minimization. Proposed architecture can be named
as virtual compression technique as shown in Figure 1. We
can verify our approach with the help of a suitable example.
We take the following IPv6 addresses and apply our approach
on it.

TABLE III: After Prex Overlapping


IPv6 Address
1050:X:0005:0600:00000110XXXXXXXX
1050:X:0054:0600:00001000XXXXXXXX
1050:X:0098:0600:00010010XXXXXXXX
1050:X:0009:0600:01XXXXXXXXXXXXXXX
1050:X:00A4:0600:1XXXXXXXXXXXXXXXX
1050:X:007C:0600:010000100XXXXXXXX
1050:X:0087:0600:010101100XXXXXXXX

IPv6 Address

Next Hop Address

1050:0000:0000:0000:0005:0600:0006:0000
1050:0000:0000:0000:0054:0600:0008:0000
1050:0000:0000:0000:0098:0600:0012:0000
1050:0000:0000:0000:0009:0600:0024:0000
1050:0000:0000:0000:00A4:0600:0030:0000
1050:0000:0000:0000:007C:0600:0031:0000
1050:0000:0000:0000:0087:0600:0040:0000
1050:0000:0000:0000:0043:0600:001A:0000
1050:0000:0000:0000:0012:0600:00AC:0000

0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10
0:0:0:0:0:FFFF:192.1.56.10

V.

IPv6 Address
1050:X:0005:0600:0006:0000
1050:X:0054:0600:0008:0000
1050:X:0098:0600:0012:0000
1050:X:0009:0600:0024:0000
1050:X:00A4:0600:0030:0000
1050:X:007C:0600:0031:0000
1050:X:0087:0600:0040:0000
1050:X:0043:0600:001A:0000
1050:X:0012:0600:00AC:0000

Next Hop Address


X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10

X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10
X:FFFF:192.1.56.10

22.22
%

C OMPARISON WITH EXISTING ALGORITHMS

There are various existing compaction techniques like prex


overlapping, prex aggregation, prex expansion and TCAM
architecture for IP Lookup [5] for reducing the size of IP
look up table by the help of prex properties. All these
techniques are very benecial for minimization of ow table.
They reduce the size of table vertically. Our proposed method
is an advanced method removing some of the drawbacks of
existing techniques. Virtual compression method reduces the
size of IP lookup table vertically as well as horizontally. It does
so because of zero compaction. Virtual compression method is
useful in case of IPv6 addresses and also minimizing the routing table by (5060)% both vertically and horizontally we can
enhance the searching ability in case of index TCAM. Hence
our proposed approach is better than all existing approaches
as it reduces more space and very benecial for future use as
the next era is of IPv6 addresses.

TABLE II: After zero Compaction


S.no
1
2
3
4
5
6
7
8
9

Reduction

entries. This technique gives 22.2 percentage of reduction


vertically as shown in Table III. So, total reduction after
applying those two techniques is 56.52%.

TABLE I: IP Lookup Table


Sl
no
1
2
3
4
5
6
7
8
9

Next Hop Address

VI.
Reduction
34.75%
34.75%
34.75%
34.75%
34.75%
34.75%
34.75%
34.75%
34.75%

C ONCLUSION

The proposed approach, virtual compression is a combination


of prex overlapping, prex minimization and zero compaction. Zero compaction is specially used for reducing the
size of IP look up table horizontally in case of IPv6 addresses
by compressing the zeroes thus reducing the length of every
IP address. Prex overlapping is used for reducing the size
vertically by overlapping the IP addresses by 50 to 60%. At last
prex minimization is used which uses Espresso-II algorithm
for further minimizing the IP lookup table vertically. In this
way we are minimizing the IP lookup table signicantly. This
led to power consumption, hence a cooler TCAM. This also
indicates that it holds promise for efcient future use of this
approach in compaction of ow table.

Table II shows the results after applying zero compaction


for the given IP look up Table I. This method nds the
consecutive number of zeros in the given IP address as shown
in Table I. Then this can be replaced by x by doing so
number of octet can be reduces gradually. This reduction in
number of octet can obviously reduce memory requirement of
the forwarding table entries. Table III shows the results after
applying the prex properties over the Table II. This prex
overlapping method reduces number of table entries gradually.

R EFERENCES
[1] Y.-T. Fang, T.-C. Huang, and P.-C. Wang, Ternary CAM Compaction
for IP Address Lookup, 22nd International Conference on Advanced
Information Networking and Applications-Workshops, pp. 14621467,
2008.
[2] H. Liu, Routing Table Compaction in Ternary CAM, Micro, IEEE,
vol. 22, no. 1, pp. 5864, 2002.
[3] V. Ravikumar and R. N. Mahapatra, TCAM Architecture for IP lookup
using Prex Properties, Micro, IEEE, vol. 24, no. 2, pp. 6069, 2004.
[4] H. Liu, Reducing Routing Table Size using Ternary-CAM, Hot
Interconnects, pp. 6973, 2001.
[5] R. K. Brayton, Logic minimization algorithms for VLSI synthesis.
Springer, 1984, vol. 2.

In the Table I we have taken totally 9 entries. Here every


IP address has 8 octets of each 4 bits totally 32 bits. Using
zero compaction technique it has been reduced into 5 octets
additionally it includes a special symbol x which gives totally
21 bits. So, we get 34.3 percentages reduction after the
zero compaction technique as shown in Table II. This zero
compaction technique reduces the length of the IP address by
horizontally. In the Table II we have to 9 entries. After applying
the prex overlapping technique it has been reduced into 7

Conference on Communications, vol. 3, pp. 13601364, 2000.


[11] P. Gupta, S. Lin, and N. McKeown, Routing Lookups in Hardware
at Memory Access Speeds, Proceedings of Seventeenth Annual Joint
Conference of the IEEE Computer and Communications Societies,
vol. 3, pp. 12401247, 1998.
[12] R. Panigrahy and S. Sharma, Reducing TCAM Power Consumption
and Increasing Throughput, Proceedings. 10th Symposium on High
Performance Interconnects, pp. 107112, 2002.
[13] F. Zane, G. Narlikar, and A. Basu, CoolCAMs: Power-efcient TCAMs
for Forwarding Engines, Twenty-Second Annual Joint Conference of
the IEEE Computer and Communications Societies, vol. 1, pp. 4252,
2003.

[6] M. J. Akhbarizadeh and M. Nourani, An IP Packet Forwarding


Technique based on Partitioned Lookup Table, IEEE International
Conference on Communications, vol. 4, pp. 22632267, 2002.
[7] D. Pao, C. Liu, A. Wu, L. Yeung, and K. S. Chan, Efcient Hardware
Architecture for Fast IP Address Llookup, Twenty-First Annual Joint
Conference of the IEEE Computer and Communications Societies.
Proceedings, vol. 2, pp. 555561, 2002.
[8] S. Nilsson and G. Karlsson, IP-address lookup using LC-tries, IEEE
Journal on Selected Areas in Communications, vol. 17, no. 6, pp. 1083
1092, 1999.
[9] M. Waldvogel, G. Varghese, J. Turner, and B. Plattner, Scalable high
speed IP routing lookups. ACM, 1997, vol. 27, no. 4.
[10] M. Kobayashi, T. Murase, and A. Kuriyama, A longest prex match
search engine for multi-gigabit ip processing, IEEE International

Você também pode gostar