Download presentation
Presentation is loading. Please wait.
Published byAmbrose Booth Modified over 9 years ago
1
Dynamic Algorithms with Worst-case Performance for Packet Classification Pankaj Gupta and Nick McKeown Stanford University {pankaj, nickm}@stanford.edu May 17, 2000
2
Outline l Motivation for packet classification l Problem definition l Previous work l Goals of this work l Algorithm 1: Heap-on-trie (HoT) l Algorithm 2: Binarysearchtree-on-trie (BoT) l Conclusions and open problems
3
Need for differentiated services ISP1 NAP E1 E2 ISP2 ISP3 Z X Y ServiceExample Traffic ShapingEnsure that ISP3 does not inject more than 50Mbps of total traffic on interface X, of which no more than 10Mbps is email traffic Packet FilteringDeny all traffic from ISP2 (on interface X) destined to E2 Policy RoutingSend all voice-over-IP traffic arriving from E1 (on interface Y) and destined to E2 via a separate ATM network
4
Multi-field Packet Classification Given a classifier with N rules, find the action associated with the highest priority rule matching an incoming packet. Example: A packet (152.168.3.32, 152.163.171.71, …, TCP) would have action A N-1 applied to it. Field 1Field 2…Field kAction Rule N152.163.19 0.69/21 152.163.80.11/32 …UDPANAN Rule N-1152.168.3.0 /24 152.163.0. 0/16 …TCPA N-1 ……………… Rule 1152.168.0.0 /16 152.0.0.0/ 8 …ANYA1A1
5
Performance Metrics of a Classification Algorithm l Data structure storage requirements l Packet classification time (query time) l Incremental update time
6
Undesirable values of Performance Metrics l Data structure storage requirements: O(N d ) l Packet classification time (query time): O(N) l Incremental update time: O(N)
7
Previous Work SchemeProsCons Linear SearchGood storage and update time characteristics High classification time Grid-of-tries (Srinivasan et al[Sigcomm98]) Fast 2-D classification No incremental updates, does not extend to multiple dimensions Bitmap intersection (Stiliadis et al[Sigcomm98]) Fast classification for multiple dimensions No incremental updates, large amount of memory storage and bandwidth Tuple Space Search (Suri et al [Sigcomm99]) Good storage characteristics Non-deterministic search and update time
8
Previous Work (contd.) l Crossproducting (Srinivasan et al[Sigcomm98]) l Recursive Flow Classification (Gupta et al[Sigcomm99]) l FIS tree (Muthukrishnan et al [Infocom00]) l Please see paper for more references All of this work “sacrifices” one metric (among update time, query time or storage) for another, OR achieves good performance on the basis of observed structure of classifiers
9
Goal of this work l Achieve good update time, storage and query time characteristics l Do not rely on the structure of classifiers for good performance, i.e., work in worst case l Extend to generic multi-dimensional classifiers Algorithms that simultaneously:
10
Bounds: known AlgorithmQueryStorageUpdate Linear search Crossproduct ing/recursive flow classification Grid-of- tries
11
Bounds: obtained AlgorithmQueryStorageUpdate Heap-on-Trie (HoT) Binarysearch tree-on-trie (BoT)
12
Heap-on-trie (HoT) One-dimensional generic 4-bit classifier RuleRangeMaximal Prefixes R5[3,11]0011, 01**, 10** R4[2,7]001*, 01** R3[4,11]01**, 10** R2[4,7]01** R1[1,15]0001, 001*, 01**, 10**, 110*, 1110 RuleRange R5[3,11] R4[2,7] R3[4,11] R2[4,7] R1[1,14]
13
01 {R5} {R5,R4,R3,R2,R1} {R5,R3,R1} {R1} 1 1 1 1 1 1 0 0 0 0 Trie Heap-on- Search 0011 {R4, R1} {R5,R4,R3,R2,R1} {R4, R1} Update R4 Search: O(W) Update: O(WlogN) Storage: O(NW) {R1} 0
14
01 {R5} {R5,R4,R3,R2,R1} {R5,R3,R1} {R4, R1} {R1} R5[3,11]0011, 01**, 10** R4[2,7]001*, 01** R3[4,11]01**, 10** R2[4,7]01** R1[1,14]0001, 001*, 01**, 10**, 110*, 1110 1 1 1 1 1 1 0 0 0 0 Static case: pre- compute highest priority rule Dynamic case: need to keep the prefixes around One range is allocated to at most 2W nodes {R1} 0
15
Store rules at each trie node in a separate heap 5 1 3 4 2 {R5,R4,R3,R2,R1}
16
01 {R5} {R5,R4,R3,R2,R1} {R5,R3,R1} {R1} 1 1 1 1 1 1 0 0 0 0 Trie Heap-on- Search 0011 {R4, R1} {R5,R4,R3,R2,R1} {R4, R1} Update R4 Search: O(W) Update: O(WlogN) Storage: O(NW) {R1} 0
17
HoT: multiple dimensions Dimension-1 Dimension-2 Heaps 01* All rules that have 01* as first dimension
18
HoT: Bounds achieved AlgorithmQueryStorageUpdate One dimension ’d’ dimensions
19
Binarysearchtree-on-trie (BoT) Basic Idea: Assign each range to only one trie node instead of 2W trie nodes Improves update time at the cost of search time
20
Assigning ranges to trie nodes: Definitions St(v)Pt(v)En(v) Range represented by a prefix * at trie node v 00..0 10..0 11..1 4-bit prefix = 01** St(v) = 0100 = 4 En(v) = 0111 = 7 Pt(v) = 0110 = 6 (D-point)
21
8 6 12 1014 01 4 2 1 1 1 0 0 31 10 75 10 119 10 1513 10 0*: d-point = 0100 = 4 *: d-point = 1000 = 8 4-bit trie Assigning ranges to nodes
22
St(v)Pt(v)En(v) Range represented by a prefix * at trie node v 00..0 10..0 11..1 (D-point) Assign range H to node v, if v satisfies both of the following: 1.H contains Pt(v) 2.H does not contain Pt(parent(v))
23
8 6 12 1014 01 4 2 1 1 1 0 0 Assigning ranges to nodes R5[3,11]0011, 01**, 10** R4[2,7]001*, 01** R3[4,11]01**, 10** R2[4,7]01** R1[1,14]0001, 001*, 01**, 10**, 110*, 1110 {R5, R3, R1} {R4, R2}
24
Pt(v) Q b a Store left endpoint coordinates in BBSTleft(v) Store left endpoint coordinates in BBSTright(v) c d Node v( *) Rules R1 R4 R3 R2 If Q < Pt(v), find the highest priority of all ranges whose left endpoints are less than or equal to Q. St(v) En(v) 00..0 10..0 BoT: data structure and algorithms
25
Binarysearchtree- on-trie Search: O(WlogN) Update: O(logN) Storage: O(NW) Multi-dimension: similar extension as HoT 8 0 4 {R5, R3, R1} {R4, R2} BBSTleftBBSTright Search 5 {R4, R2} Update
26
Conclusions and open problems l Presented two algorithms with reasonable worst-case bounds in all performance metrics l The algorithms seem to be simple to implement though no implementation results were shown l What are non-trivial lower bounds to the query time in d-dimensional classification, both static and dynamic, in a given amount of space? l Can we improve upon both the search and update times in the paper in the same or better storage complexity?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.