Layered Interval Codes for TCAM-based Classification David Hay, Politecnico di Torino Joint work with Anat Bremler-Barr (IDC), Danny Hendler (BGU) and.

Slides:



Advertisements
Similar presentations
A Search Memory Substrate for High Throughput and Low Power Packet Processing Sangyeun Cho, Michel Hanna and Rami Melhem Dept. of Computer Science University.
Advertisements

August 17, 2000 Hot Interconnects 8 Devavrat Shah and Pankaj Gupta
Packet Classification using Hierarchical Intelligent Cuttings
1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Balajee Vamanan, Gwendolyn Voskuilen, and T. N. Vijaykumar School of Electrical & Computer Engineering SIGCOMM 2010.
A Scalable and Reconfigurable Search Memory Substrate for High Throughput Packet Processing Sangyeun Cho and Rami Melhem Dept. of Computer Science University.
Fast Firewall Implementation for Software and Hardware-based Routers Lili Qiu, Microsoft Research George Varghese, UCSD Subhash Suri, UCSB 9 th International.
Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering.
M. Waldvogel, G. Varghese, J. Turner, B. Plattner Presenter: Shulin You UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering.
IP Routing Lookups Scalable High Speed IP Routing Lookups.
Outline Introduction Related work on packet classification Grouper Performance Empirical Evaluation Conclusions.
Survey of Packet Classification Algorithms. Outline Background and problem definition Classification schemes – One dimensional classification – Two dimensional.
A Ternary Unification Framework for Optimizing TCAM-Based Packet Classification Systems Author: Eric Norige, Alex X. Liu, and Eric Torng Publisher: ANCS.
1 TCAM Razor: A Systematic Approach Towards Minimizing Packet Classifiers in TCAMs Department of Computer Science and Information Engineering National.
On the Code Length of TCAM Coding Schemes Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel) 1.
Efficient Multi-match Packet Classification with TCAM Fang Yu Randy H. Katz EECS Department, UC Berkeley {fyu,
CSIE NCKU High-performance router architecture 高效能路由器的架構與設計.
1 Layered Interval Codes for TCAM-based Classification Author: Anat Bremler-Barr, David Hay, Danny Hendler Publisher: IEEE INFOCOM 2009 Presenter: Chun-Yi.
Worst-Case TCAM Rule Expansion Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel)
Packet Classification on Multiple Fields Pankaj Gupta and Nick McKeown Stanford University {pankaj, September 2, 1999.
1 Energy Efficient Multi-match Packet Classification with TCAM Fang Yu
CS 268: Lectures 13/14 (Route Lookup and Packet Classification) Ion Stoica April 1/3, 2002.
CS 268: Route Lookup and Packet Classification Ion Stoica March 11, 2003.
1 Range Encoding Cheng-Chien Su. 2 Outline DRES: Dynamic Range Encoding Scheme for TCAM Coprocessors  Hao Che, Zhijun Wang, Kai Zheng, Bin Liu  IEEE.
Efficient Multi-Match Packet Classification with TCAM Fang Yu
1 DRES:Dynamic Range Encoding Scheme for TCAM Coprocessors Authors: Hao Che, Zhijun Wang, Kai Zheng and Bin Liu Publisher: IEEE Transactions on Computers,
PEDS: Parallel Error Detection Scheme for TCAM Devices David Hay, Politecnico di Torino Joint work with Anat Bremler Barr (IDC), Danny Hendler (BGU) and.
1 A Fast IP Lookup Scheme for Longest-Matching Prefix Authors: Lih-Chyau Wuu, Shou-Yu Pin Reporter: Chen-Nien Tsai.
Two stage packet classification using most specific filter matching and transport level sharing Authors: M.E. Kounavis *,A. Kumar,R. Yavatkar,H. Vin Presenter:
SSA: A Power and Memory Efficient Scheme to Multi-Match Packet Classification Fang Yu 1 T. V. Lakshman 2 Martin Austin Motoyama 1 Randy H. Katz 1 1 EECS.
An Efficient IP Lookup Architecture with Fast Update Using Single-Match TCAMs Author: Jinsoo Kim, Junghwan Kim Publisher: WWIC 2008 Presenter: Chen-Yu.
Packet Classification George Varghese. Original Motivation: Firewalls Firewalls use packet filtering to block say ssh and force access to web and mail.
CS 268: Route Lookup and Packet Classification
Algorithms for Advanced Packet Classification with TCAMs Karthik Lakshminarayanan UC Berkeley Joint work with Anand Rangarajan and Srinivasan Venkatachary.
Worst-Case TCAM Rule Expansion Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel)
Fast binary and multiway prefix searches for pachet forwarding Author: Yeim-Kuan Chang Publisher: COMPUTER NETWORKS, Volume 51, Issue 3, pp , February.
Chapter 9 Classification And Forwarding. Outline.
PEDS: Parallel Error Detection Scheme for TCAM Devices David Hay, Politecnico di Torino Joint work with Anat Bremler Barr (IDC, Israel), Danny Hendler.
Applied Research Laboratory Edward W. Spitznagel 7 October Packet Classification for Core Routers: Is there an alternative to CAMs? Paper by: Florin.
Timothy Whelan Supervisor: Mr Barry Irwin Security and Networks Research Group Department of Computer Science Rhodes University Hardware based packet filtering.
ORange: Multi Field OpenFlow based Range Classifier Liron Schiff Tel Aviv University Yehuda Afek Tel Aviv University Anat Bremler-Barr Inter Disciplinary.
Packet Classification on Multiple Fields 참고 논문 : Pankaj Gupta and Nick McKeown SigComm 1999.
Palette: Distributing Tables in Software-Defined Networks Yossi Kanizo (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel) and David Hay.
Multi-Field Range Encoding for Packet Classification in TCAM Author: Yeim-Kuan Chang, Chun-I Lee and Cheng-Chien Su Publisher: INFOCOM 2011 Presenter:
Applied Research Laboratory Edward W. Spitznagel 24 October Packet Classification using Extended TCAMs Edward W. Spitznagel, Jonathan S. Turner,
1. Outline Introduction Related work on packet classification Grouper Performance Analysis Empirical Evaluation Conclusions 2/42.
1 Space-Efficient TCAM-based Classification Using Gray Coding Anat Bremler – Barr Interdisciplianry Center Danny Hendler Ben-Gurion University Infocom.
On Finding an Optimal TCAM Encoding Scheme for Packet Classification Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel)
StrideBV: Single chip 400G+ packet classification Author: Thilan Ganegedara, Viktor K. Prasanna Publisher: HPSR 2012 Presenter: Chun-Sheng Hsueh Date:
1 Fast packet classification for two-dimensional conflict-free filters Department of Computer Science and Information Engineering National Cheng Kung University,
Scalable High Speed IP Routing Lookups Scalable High Speed IP Routing Lookups Authors: M. Waldvogel, G. Varghese, J. Turner, B. Plattner Presenter: Zhqi.
Efficient Cache Structures of IP Routers to Provide Policy-Based Services Graduate School of Engineering Osaka City University
A Smart Pre-Classifier to Reduce Power Consumption of TCAMs for Multi-dimensional Packet Classification Yadi Ma, Suman Banerjee University of Wisconsin-Madison.
TCAM –BASED REGULAR EXPRESSION MATCHING SOLUTION IN NETWORK Phase-I Review Supervised By, Presented By, MRS. SHARMILA,M.E., M.ARULMOZHI, AP/CSE.
High-Speed Policy-Based Packet Forwarding Using Efficient Multi-dimensional Range Matching Lakshman and Stiliadis ACM SIGCOMM 98.
CS 740: Advanced Computer Networks IP Lookup and classification Supplemental material 02/05/2007.
Parallel tree search: An algorithmic approach for multi- field packet classification Authors: Derek Pao and Cutson Liu. Publisher: Computer communications.
1 Bit Weaving: A Non-Prefix Approach to Compressing Packet Classifiers in TCAMs Author: Chad R. Meiners, Alex X. Liu, and Eric Torng Publisher: IEEE/ACM.
Packet Classification Using Multidimensional Cutting Sumeet Singh (UCSD) Florin Baboescu (UCSD) George Varghese (UCSD) Jia Wang (AT&T Labs-Research) Reviewed.
1 Space-Efficient TCAM-based Classification Using Gray Coding Authors: Anat Bremler-Barr and Danny Hendler Publisher: IEEE INFOCOM 2007 Present: Chen-Yu.
Hierarchical packet classification using a Bloom filter and rule-priority tries Source : Computer Communications Authors : A. G. Alagu Priya 、 Hyesook.
Author : Lynn Choi, Hyogon Kim, Sunil Kim, Moon Hae Kim Publisher/Conf : IEEE/ACM TRANSACTIONS ON NETWORKING Speaker : De yu Chen Data :
DRES: Dynamic Range Encoding Scheme for TCAM Coprocessors 2008 YU-ANTL Lab Seminar June 11, 2008 JeongKi Park Advanced Networking Technology Lab. (YU-ANTL)
IP Address Lookup Masoud Sabaei Assistant professor Computer Engineering and Information Technology Department, Amirkabir University of Technology.
By: Yaron Levy Supervisors: Dr. Shlomo Greenberg Mr. Hagai David.
Transport Layer Systems Packet Classification
Yotam Harchol The Hebrew University of Jerusalem, Israel
High-performance router/switch architecture 高效能路由器/交換器的 架構與設計
Yotam Harchol The Hebrew University of Jerusalem, Israel
Worst-Case TCAM Rule Expansion
Presentation transcript:

Layered Interval Codes for TCAM-based Classification David Hay, Politecnico di Torino Joint work with Anat Bremler-Barr (IDC), Danny Hendler (BGU) and Boris Farber (IDC) This work is supported by a Cisco grant 1

2 Outline Packet Classification and TCAM devices The range rule representation problem Our solution: Layered Interval Code Conclusions

3 Packet Classification Action ---- RuleAction Policy Database (classifier) Packet Classification Forwarding Engine Incoming Packet HEADERHEADER

4 Multi-field Packet Classification Given a database with N rules, find the action associated with the highest priority rule matching an incoming packet Example: A packet ( , , …, TCP) would have action A 2 applied to it

5 Applications Address Lookup Where to send an incoming packet? Usually needs only destination IP address Firewall, ACL, Intrusion Detection Schemes Which packet to accept or deny? Usually needs 5 fields: source-address, dest-address, source-port, dest-port, protocol Packet classification lies in the critical path of the packet, and should be performed at very high rate (~125 million packets per second for 40 Gb/s network)

6 Software Solutions Many exist in the literature: Linear Search Tree-based (e.g. Trie, Grid of Tries…) Cross-producting HiCuts Bloom-Filter Based Data Structures … All software solutions introduce non-constant classification time (and we usually have only 1 cycle)

7 Towards a Hardware Solution Rules in the policy database can be written in a ternary alphabet, using 0,1,  In the 5-field IPv4 rules (for firewall, ACL…), we can represent each rule as a string of 104 ternary symbols 

8 Packet Classification w/ TCAM Encoder Match lines 5-Field Packet Header (Search Key) accept deny accept TCAM Array Each entry is a word in {0,1,  } W and represents a rule

9 Example Encoder Match lines deny log accept deny limit deny accept  00   11  00   0   10   0    1110  010  01   0  11   01  0010  10  01       

10 TCAM Benefits and Disadvantages Deterministic Search Throughput—O(1) search Extremely important The only real solution that can do that However, relatively costly and power consuming 150$ for small (4Mbit) TCAM ~10 millions TCAM devices already deployed

11 Typical Dimensions and Speed 100K-200K rules symbols per rule Deterministic Search Throughput—O(1) search 133 million searches per second for 144-bit keys Suitable even for 40 Gb/s IPv4 traffic Few dozens (~40) extra symbols are left in each entry, that can be used to optimize TCAM performance

12 Outline Packet Classification and TCAM devices The range rule representation problem Our solution: Layered Interval Code Conclusions

13 Range Rules RuleSource address Source port Dest- address Dest- port Proto col Action Rule / /3280TCP Accept Rule /24> /315556TCP Deny Rule / UDP Accept Rule / TCP Limit Rule ICMP Log Range rule = rule that contains range field Usually source-port or dest-port E.g., all packets with dest-port [1024, ] are denied

14 Range Rules Representation Some ranges are easy to represent [20, 23] = {10100,10101,10110,10111} = 101  But what about [1,6]?

15 Prefix Expansion Use multiple entries to code a single rule [1,6]= {001, 01 ,10 , 110} – 4 entries Every rule that contains [1,6] needs 4 entries Maximum expansion 2W-2 for range [1,2 W -2] (W is the field width) [Srinivasan, Varghese, Suri, Waldvogel; 1998] RuleSource addressSource port Destination addressDestination port ProtocolAction Rule / /3280TCP Accept Rule /24> /315556TCP Deny Rule / UDP Accept Rule / TCP Limit Rule / TCP Limit Rule / TCP Limit Rule / TCP Limit Rule ICMP Log

16 Prefix Expansion For rules with two range fields, we need the Cartesian product of the expansion In real TCAMs cause 6 times more entries! More power, more memory, more potential errors  Active research to reduce this cost: [Liu], [van-Lunteren, Engbersen], [Lakshminarayanan, Rangarajan, Venkatachary], [Yu, Katz], [Spitznagel, Taylor and Turner], [Che, Wang, Zheng, Liu]…

Using the Extra Symbols 17 [Liu] RuleSource address Source port Pro. Rule /16<601TCP Rule /24>1023TCP Rule UDP Rule TCP Rule TCP Rule >1023ICMP Rule /24>1023TCP Rule /81-6UDP Rule UDP Suppose there is only one field with ranges R 1 = [1,6] ; R 2 = [1,600] ; R 3 = [500,600] ; R 4 =[1024, ] Using 4 extra symbols: R 1 = 1  ; R 2 =  1  ; R 3 =  1  ; R 4 =  1

Using the Extra Symbols 18 [Liu] RuleSource address Source port Pro. Rule /16*********TCP*1** Rule /24*********TCP***1 Rule *********UDP**1* Rule *********TCP1*** Rule TCP**** Rule *********ICMP***1 Rule /24*********TCP***1 Rule /8*********UDP1*** Rule *********UDP**1* Suppose there is only one field with ranges R 1 = [1,6] ; R 2 = [1,600] ; R 3 = [500,600] ; R 4 =[1024, ] Using 4 extra symbols: R 1 = 1  ; R 2 =  1  ; R 3 =  1  ; R 4 =  1

Using the Extra Symbols 19 [Liu] RuleSource address Source port Pro. Rule /16*********TCP*1** Rule /24*********TCP***1 Rule *********UDP**1* Rule *********TCP1*** Rule TCP**** Rule *********ICMP***1 Rule /24*********TCP***1 Rule /8*********UDP1*** Rule *********UDP**1* For each source port x and range R i compute if x  R i. which ranges I For x=550, we get x  [1,6] ; x  [1,600] ; x  [500,600] ; x  [1024, ] Extra Symbols assigned:

Using the Extra Symbols 20 [Liu] RuleSource address Source port Pro. Rule /16*********TCP*1** Rule /24*********TCP***1 Rule *********UDP**1* Rule *********TCP1*** Rule TCP**** Rule *********ICMP***1 Rule /24*********TCP***1 Rule /8*********UDP1*** Rule *********UDP**1* For each source port x and range R i compute if x  R i. which ranges I For x=550, we get x  [1,6] ; x  [1,600] ; x  [500,600] ; x  [1024, ] Extra Symbols assigned: Pre-computed and stored in a SRAM direct-access array of 2 16 entries.

21 Flow of information Packet Header x SRAM x If x  R i set the i-th bit to 1, otherwise 0. For x=550 we get 0110

22 Problems with the Liu’s scheme Number of ranges usually exceeds the number of symbols  Cannot encode all the ranges  Degrades to prefix expansion First solution: encode layers with large penalty first [DRES, 2008] Our contributions: We observe that n non- intersecting ranges can be encoded using log n bits  Using layering technique in order to achieve (much) better range encoding. w(r) = (# rules with r) × (prefix-expansion(r) – 1)

23 Encoding Ranges We look at all ranges as intervals over [0, ]

24 Encoding Ranges - Layering Partitioning the ranges to layers of disjoint intervals Each layer gets its own set of symbols Ranges are encoded starting from (binary) 1   log(n+1)  symbols per n-ranges layer symbols 2 symbols 1 symbol

25 Encoding the Ranges Extra symbols of the layer: range code Extra symbols of other layers:  …  symbols 2 symbols 1 symbol  10 

26 Encoding the SRAM Array For each layer: If x is in any interval  the interval code If x is not in the interval  all 0’s symbols 2 symbols 1 symbol  10  x xx 

27 Towards an Optimal Encoding Let L 1,L 2,…,L n be the sizes of the layers The number of bits needed to encode all ranges is It is NP-hard to find an optimal layering given a set of ranges By reduction from circular-arc graph coloring 2-Approximation algorithm based on maximum size k-colorable sets (MSCS) Greedy heuristic colors iteratively maximum size independent set (MSIS)

28 Coping with “Symbol Budget” Not all the ranges can be encoded We use the DRES weight in order to choose the encoded ranges Other ranges will be treated with prefix expansion Given a number of symbols, it is NP hard to find a layering that maximizes the total weight of encoded ranges Heuristics take into account the weight MWIS, MWCS

29 Pick the layer with maximum gain, and assign it the next symbol. Choosing the Right Ranges Layering Stage MSIS, MSCS, MWIS, MWCS Symbol Allocation Stage Bit Auction algorithm Within each layer, ranges are sorted by their weight; L ij is the j th range of layer L i We allocate the symbols one by one. Encoding Stage Unencoded range rules are handled w/ Prefix Expansion Average per-symbol gain for encoding the next k -symbols to layer L i :

30 Experimental Results On real-life rule set 120 separate rule files from various applications Firewalls, ACL-routers, Intrusion Prevention systems 223K rules 280 unique ranges Used as a common benchmark in literature

31 Experimental Results Best Prior Art

32 Experimental Results

33 Wrap-Up New solution for range representation 60% better than prior art Also deals with: Two range fields Hot updates of the rules Future work: IPv6 32-bits for source-, dest- port fields  Direct access array in SRAM is infeasible Possible solution: use TCAM twice in pipelined manner

34 Wrap-Up Two solutions for major contemporary challenges in TCAM devices Makes packet classification more efficient (less entries  less power) and robust Both solutions make use of extra symbols available in TCAM configurations anyway An Interesting future direction: Using TCAMs outside a networking environment

35 Thank You