Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:

Similar presentations


Presentation on theme: "1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:"— Presentation transcript:

1 1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date: Jan, 10, 2008

2 2 Outline Introduction Filter encoding scheme Prefix Inclusion Coding scheme Performance evaluation

3 3 Introduction TCAM is currently the dominant solution method used by the industry. High cost and high power consumption are the two major drawbacks of TCAM-based lookup engines. Adoption of IPv6 with increased address length will further exacerbate. In this paper, we present a filter encoding method, called prefix inclusion coding (PIC) to improve the efficiency of TCAM- based lookup engine. Filters are stored in an encoded format to reduce storage requirement. Codeword lookup is equivalent to finding the longest matching prefix in the codeword table.

4 4 Filter encoding scheme Filter encoding is an effective approach to enhanced the efficiency of the TCAM lookup engine. van Lunteren and engbersen proposed an encoding scheme called P 2 C based on the concept of primitive range hierarchy. Ranges are mapped to different layers in the hierarchy such that ranges on the same layer must be disjoint and are represented by codeword.

5 5 Filter encoding scheme Style 1 Primitive ranges in a layer are assigned distinct non-zero codeword. Style 2 Allows 2 primitive ranges at the same layer to be assigned a common codeword if both ranges are subsets of two disjoint primitive ranges at other layers. Style 3 Primitive ranges on different layers are merged if the number of layers exceeds the physical limit.

6 6 Filter encoding scheme

7 7 The codeword lookup method is required to find all matching ranges and combine the code segments for each primitive layer to form the final codeword. For example, the codeword corresponds to the input address y marked in coding style 2 of figure 2 is 010100. The proposed method can have better compression ratio compared to P 2 C. Our method can reduce the TCAM space requirement by 70% to over 90%

8 8 Prefix Inclusion Coding Scheme A 5-tuple filter is stored in the TCAM in an encoded format where C i is the codeword for field F i. Let p and q be two distinct address prefixes where the length if p is shorter than or equal to the length of q. Prefixes p and q are either disjoint, or q is enclosed by p (q is subrange of p). The codeword assignment satisfies the following 3 requirement. 1. A valid codeword must have non-zero value. 2. The inclusion property is preserved. C q is enclosed by C p iff q is enclosed by p 3. If q is enclosed by p, then C q must have a non-zero suffix extension from C p

9 9 Prefix Inclusion Coding Scheme The system maintains two separate codeword tables storing the pairs for the source and destination prefixes. An input address A is first translated to a codeword C A by finding the longest matching prefix in the corresponding codeword table. Given a sorted list of n prefixes, a tree (i - tree) that represents the inclusion relationship can be constructed in O(hn) time where h is the depth of the tree. Depends on the maximum nesting level of prefixes.

10 10 Prefix Inclusion Coding Scheme A leaf node in the i – tree can be assigned a full-length codeword that occupies a single point in the code space.

11 11 Prefix Inclusion Coding Scheme The code space occupied by an internal node is greater than or equal to 1 plus the sum of the code space of its children. The code space occupied by an internal node must be a power of 2. The minimum codeword length is then equal to log 2 of the code space occupied by root.

12 12 Prefix Inclusion Coding Scheme

13 13 Prefix Inclusion Coding Scheme An address value is first translated to a value in the code space before the encoded filter table is searched. In the codeword table, a don’t care bit in a codeword is substituted by a zero. For example: Input address is 1110 0111, the best matching prefix is J = 11100* and the return code value will be 10100 The codeword lookup can be implemented using TCAM or other efficient algorithmic method.

14 14 Prefix Inclusion Coding Scheme PIC can also applied to encode port range values The port range [0-1023] and [1024-65535] are commonly found in filter sets, other arbitrary port ranges are, in general, subranges of these two ranges. If two ranges are partially overlapping, one of the 2 ranges will be decomposed.

15 15 Prefix Inclusion Coding Scheme

16 16 Prefix Inclusion Coding Scheme Using a pure PIC encoding scheme, there can be 2 options: 1. range B is decomposed into 2 sub ranges. 2. range C is decomposed into 2 sub ranges. One may avoid port range decomposition by using a hybrid encoding method that combines PIC with P 2 C Partially overlapped ranges are grouped into a composite range

17 17 Performance evaluation Table 2 shows the required code length for the five fields in a filter.

18 18 Performance evaluation Compare the raw space required by PIC and that of the conventional approach where filters are not encoded.

19 19 Performance evaluation In PIC, TCAM space requirement consists of two components The encoded filters The codeword table for the two address fields. n: total number of distinct prefixes. L: length of the overall codeword for a 5-tuple filter. r: number of replicated entries due to partially overlapping port range. TCAM space for encoded filter table is (N + r) * L bits, and the space for the codeword table is n*32 bits.


Download ppt "1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:"

Similar presentations


Ads by Google