TCAM-based Fast and Scalable Regular Expression Matching

Author
PengKunYang
Advisor
DongQunFeng
School
University of Science and Technology of China
Major
Applied Computer Technology
Classification
TP333 Memory
Degree
Doctoral dissertation
Year
2013
Downloads
44
Citations
0

Request the full text

Abstract

Regular expression matching is the core engine of many network functions such as intrusion detection, protocol analysis and so on. In practice, regular expression match-ing is performed using either deterministic finite automaton (DFA) or non-deterministic finite automaton (NFA), each having its own merits and drawbacks on matching speed and memory space requirement. NFAs are compact in memory, growing linearly with regular expression pattern size. However, the matching speed of an NFA can be unpre-dictably slow. In contrast, DFA has fast and predictable matching speed. To saturate escalating demand for speed, DFA has been the prevalent choice of high speed systems. However, The speed of DFA comes at the cost of excessive storage space; the number of DFA states grows exponentially with the size of regular expression patterns. In spite of intensive research, we are still in need of a method for fast and scalable regular expres-sion matching, where it takes one simple memory lookup to match each input character (like DFA) and its storage space grows linearly with regular expression pattern set size (like NFA). Most recently, TCAM(ternary content addressable memory)-based DFA implementation has been proposed as a promising approach, for TCAM’s unique paral-lel and wildcard matching capabilities. However, the number of TCAM entries needed is still above exponentially growing DFA size and hence not scalable.In this paper, we propose a TCAM-based DFA deflation method for fast and scal-able regular expression matching, which takes one simple TCAM lookup to match each input character and effectively deflates DFA size. By exploiting the structural connec-tion between NFA and DFA enables us to identify DFA states sharing the same NFA origin; these DFA states are actually DFA replications of the same NFA state, and can be effectively merged using proper DFA state encoding scheme and TCAM entry merg-ing scheme. Experiments based on real life pattern sets demonstrate that, the number of TCAM entries used by our DFA deflation method is up to two orders of magnitude lower than the DFA size.We then present the first method for implementing NFA using ternary content ad-dressable memory (TCAM). By exploiting the fact that most NFA states will not be active simultaneously, we partition all NFA states into a number of groups and propose an efficient scheme for encoding NFA active state set. Through proper TCAM encod-ing, our TCAM-based NFA approach matches each input byte with one single TCAM lookup-operating at precisely the same speed as DFA, while being close to NFA in size. Extensive experiments based on real life pattern sets demonstrate that our TCAM-based NFA implementation method can reduce storage space and boost matching speed by an order of magnitude, compared with existing TCAM-based DFA implementation methods.All DFA-based approaches need to construct a DFA from an NFA as a intermediate step, thus the DFA construction process can be one of system bottlenecks. In this paper, by exploring the inherent properties of finite automaton-how are the NFA states active simultaneously and how the self-looping NFA states lead to explosion of DFA state space, we design a state subset encoding and searching scheme, and propose a new DFA construction algorithm. Through experiments based on real life pattern sets, we demonstrate that our new DFA construction algorithm dramatically reduces the running time by88.33%~93.57%than the standard subset construction algorithm.

Table of contents

Summary 5-7 ABSTRACT 7-17 Chapter 1 Introduction 17-21 1.1 topics sense 17-18 1.2 Research objectives 18 1.3 Research Status 18-19 1.4 This article contribution 19 1.5 thesis organization 19 - 21 Chapter II background 21-33 2.1 regex 21-22 2.1.1 formal definition 21-22 2.1.2 basic syntax 22 2.2 finite Automata 22-26 compare nbsp 2.2.1 NFA and the DFA ; 24-26 <br / > 2.3 progress 26-28 2.3.1 divided ruleset 27 2.3.2 compressed state redundancy 27-28 2.3 .3 compressed between states redundancy 28 2.3.4 to reduce the number of states 28 2.4 TCAM -based regular expression matching method 28-33 <br / > 2.4.1 traditional TCAM application 29-30 2.4.2 achieved in TCAM in DFA 30-33 Chapter TCAM-based DFA achieve 33 -57 3.1 This article contribution 34 3.2 TCAM-based DFA implementation: examples demonstrate 34-40 3.3 DFA state coding 40-46 3.3.1 identification NFA and DFA copies chain chain pair assignment 40-41 3.3.2 DFA states (RID, PID) 41-43 3.3 .3 (RID, PID) of TCAM encoding coding 43-46 3.4 DFA state transition edge 46-50 3.4.1 DFA state transition edge encoded as TCAM entry 46-49 3.4.2 TCAM entries merger 49-50 3.5 experimental results 50-56 3.5.1 storage space 50-53 3.5.2 matching speed 53-56 3.6 Conclusion 56-57 Chapter IV TCAM-based NFA achieve 57 -85 4.1 This article contribution 57-58 4.2 TCAM-based NFA implementation: an overview and demonstration 58-65 4.2.1 NFA active state set encoding 59-61 4.2.2 NFA state transfer coding 61-64 4.2.3 TCAM entries merger 64-65 4.3 encoding a subset of NFA 65-68 4.3.1 NFA states compatibility 65-67 4.3.2 NFA compatible group 67-68 4.4 coding NFA state transition 68-73 4.4.1 algorithm 70-72 4.4.2 correctness 72-73 4.5 merge TCAM entries 73-77 4.5.1 TCAM entries merge algorithm 73-76 4.5.2 XOR coding 76-77 4.6 results 77-83 4.6.1 ruleset 78 4.6.2 storage space 78-81 4.6.3 matching speed 81-83 4.7 Conclusion 83-85 Chapter rapid DFA construction algorithm 85-103 bottleneck 5.1 DFA compression methods : DFA structure 85 less than 5.2 traditional algorithms -86 86-89 5.2.1 subset construction 86-87 5.2.2 performance bottlenecks 87 -89 5.3 automata new algorithm based on the inherent operating characteristics 89-95 5.3.1 status Active relationship 5.3.2 two different 89-90 types of status grouping 90-92 5.3.3 DFA construct a new algorithm 92-95 5.4 results 95-102 5.4.1 ruleset 96-97 5.4.2 experimental program 97-98 5.4.3 performance Comparison 98-100 5.4.4 performance Optimization 100-102 5.5 Conclusion 102-103 Chapter VI summary and Outlook 103-107 6.1 paper summarizes 103 - 104 6.2 Prospect 104-107 References 107-111 Thanks 111-113 papers published during reading and research achievements 113-114

Related dissertations

  1. Memory-Efficient Algorithms for Deep Packet Inspection
  2. The Research on Regular Expression Matching Algorithms for Deep Packet Inspection
    WangHuanYun ·Hunan University ·2012 ·Master's thesis
  3. Research on Storage Optimization of High-Speed Rule Matching Algorithms
  4. Research on High Throughput Regular Expression Matching Algorithm in Deep Packet Inspection
  5. Research and Implementation on Deep Packet Inspection of Firewall
  6. Research on Regular Expression Matching of Successive Packets in High-speed Networks
  7. Research on Deep Packet Inspection Algorithm in High-speed IP Network
    ChenWei ·PLA Information Engineering University ·2011 ·Master's thesis
  8. The Research on High Performance Content Filtering and Distribution Technologies
    HuangKun ·Hunan University ·2009 ·Doctoral dissertation
  9. Implementation of SNMP MIB Complier and Research on Constructor of the Compiler
    LiuYiLan ·Central China Normal University ·2004 ·Master's thesis
  10. Research on Regular Expression Based Deep Packet Inspection
    ZhangNa ·East China Normal University ·2007 ·Master's thesis
  11. Deep Packet Inspection technology research and design
    LiuZuo ·Guizhou University ·2008 ·Master's thesis
  12. Analysis of Examination Questions Stored in Word Based on Support Vector Machine
    LiPeiZuo ·Henan University ·2010 ·Master's thesis
  13. The Research on Time and Space Efficient Regular Expression Matching Algorithm
    ZhangJieKun ·Hunan University ·2010 ·Master's thesis
  14. Design and Implementation of the intrusion detection system based on SOPC
  15. Feature-based matching network traffic identification method
    LiPeng ·Harbin Institute of Technology ·2008 ·Master's thesis
  16. Research of Earthquake Insurance Pricing Model Based on DFA
    WangTongMei ·Central South University ·2013 ·Master's thesis
  17. Research on Key Technologies of Network Traffic Analysis and System Implementation
  18. Researches on Non-exact Deep Packet Inspection
    WangHaiQiang ·Harbin Institute of Technology ·2013 ·Master's thesis
  19. Research on Deep Packet Inspection Based on Parallel Bloom Filters
    HuGuoLiang ·Hunan University ·2013 ·Master's thesis
  20. Research on Traffic Classification and Control Based on DPI and Incremental Decision Tree