1 / 26

Dynamic Algorithms with Worst-case Performance for Packet Classification

Dynamic Algorithms with Worst-case Performance for Packet Classification. Pankaj Gupta and Nick McKeown Stanford University {pankaj, nickm}@stanford.edu. May 17, 2000. Outline. Motivation for packet classification Problem definition Previous work Goals of this work

bandele
Download Presentation

Dynamic Algorithms with Worst-case Performance for Packet Classification

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 • Motivation for packet classification • Problem definition • Previous work • Goals of this work • Algorithm 1: Heap-on-trie (HoT) • Algorithm 2: Binarysearchtree-on-trie (BoT) • Conclusions and open problems

  3. Need for differentiated services E1 Y E2 Z ISP3 NAP X ISP2 ISP1

  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 AN-1 applied to it.

  5. Performance Metrics of a Classification Algorithm • Data structure storage requirements • Packet classification time (query time) • Incremental update time

  6. Undesirable values of Performance Metrics • Data structure storage requirements: O(Nd) • Packet classification time (query time): O(N) • Incremental update time: O(N)

  7. Previous Work

  8. Previous Work (contd.) • Crossproducting (Srinivasan et al[Sigcomm98]) • Recursive Flow Classification (Gupta et al[Sigcomm99]) • FIS tree (Muthukrishnan et al [Infocom00]) • 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 • Achieve good update time, storage and query time characteristics • Do not rely on the structure of classifiers for good performance, i.e., work in worst case • Extend to generic multi-dimensional classifiers Algorithms that simultaneously:

  10. Bounds: known

  11. Bounds: obtained

  12. Heap-on-trie (HoT) One-dimensional generic 4-bit classifier

  13. Heap-on- Search 0011 Update R4 {R5,R4,R3,R2,R1} {R4, R1} Search: O(W) Update: O(WlogN) Storage: O(NW) Trie 0 1 1 1 0 0 {R5,R3,R1} 1 {R5,R4,R3,R2,R1} 0 0 1 0 {R1} 1 {R4, R1} 1 {R1} {R5} {R1}

  14. Dynamic case: need to keep the prefixes around Static case: pre-compute highest priority rule One range is allocated to at most 2W nodes 0 1 1 1 0 0 {R5,R3,R1} 1 {R5,R4,R3,R2,R1} 0 0 1 {R1} 1 {R4, R1} 1 0 {R1} {R1} {R5}

  15. Store rules at each trie node in a separate heap {R5,R4,R3,R2,R1} 5 4 3 2 1

  16. Heap-on- Search 0011 Update R4 {R5,R4,R3,R2,R1} {R4, R1} Search: O(W) Update: O(WlogN) Storage: O(NW) Trie 0 1 1 1 0 0 {R5,R3,R1} 1 {R5,R4,R3,R2,R1} 0 0 1 0 {R1} 1 {R4, R1} 1 {R1} {R5} {R1}

  17. HoT: multiple dimensions All rules that have 01* as first dimension Dimension-1 01* Heaps Dimension-2

  18. HoT: Bounds achieved

  19. Basic Idea: Assign each range to only one trie node instead of 2W trie nodes Binarysearchtree-on-trie (BoT) Improves update time at the cost of search time

  20. Assigning ranges to trie nodes: Definitions Range represented by a prefix * at trie node v 11..1 00..0 10..0 St(v) Pt(v) En(v) (D-point) 4-bit prefix = 01** St(v) = 0100 = 4 En(v) = 0111 = 7 Pt(v) = 0110 = 6

  21. 0 1 1 3 Assigning ranges to nodes 4-bit trie *: d-point = 1000 = 8 8 0 1 0*: d-point = 0100 = 4 12 4 1 1 0 0 2 6 10 14 1 0 1 0 1 0 1 5 7 9 11 13 15

  22. Assigning ranges to nodes Range represented by a prefix * at trie node v 11..1 00..0 10..0 St(v) Pt(v) En(v) (D-point) Assign range H to node v, if v satisfies both of the following: • H contains Pt(v) • H does not contain Pt(parent(v))

  23. Assigning ranges to nodes {R5, R3, R1} 8 0 1 {R4, R2} 12 4 1 1 0 0 2 6 10 14 1

  24. R4 d R3 a Rules R1 c R2 b Store left endpoint coordinates in BBSTleft(v) Store left endpoint coordinates in BBSTright(v) BoT: data structure and algorithms 00..0 10..0 Node v(*) Q Pt(v) St(v) En(v) If Q < Pt(v), find the highest priority of all ranges whose left endpoints are less than or equal to Q.

  25. Search 5 {R4, R2} Update Binarysearchtree-on-trie Search: O(WlogN) Update: O(logN) Storage: O(NW) Multi-dimension: similar extension as HoT {R5, R3, R1} 8 0 {R4, R2} 4 BBSTleft BBSTright

  26. Conclusions and open problems • Presented two algorithms with reasonable worst-case bounds in all performance metrics • The algorithms seem to be simple to implement though no implementation results were shown • What are non-trivial lower bounds to the query time in d-dimensional classification, both static and dynamic, in a given amount of space? • Can we improve upon both the search and update times in the paper in the same or better storage complexity?

More Related