1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.

Slides:



Advertisements
Similar presentations
August 17, 2000 Hot Interconnects 8 Devavrat Shah and Pankaj Gupta
Advertisements

Router/Classifier/Firewall Tables Set of rules—(F,A)  F is a filter Source and destination addresses. Port number and protocol. Time of day.  A is an.
Internet Routers
Fast Updating Algorithms for TCAMs Devavrat Shah Pankaj Gupta IEEE MICRO, Jan.-Feb
Introduction to Computer Science 2 Lecture 7: Extended binary trees
Packet Classification using Hierarchical Intelligent Cuttings
Internetworking II: MPLS, Security, and Traffic Engineering
IPv6 Victor T. Norman.
COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
Network Algorithms, Lecture 4: Longest Matching Prefix Lookups George Varghese.
Fast Firewall Implementation for Software and Hardware-based Routers Lili Qiu, Microsoft Research George Varghese, UCSD Subhash Suri, UCSB 9 th International.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
I/O-Algorithms Lars Arge Fall 2014 September 25, 2014.
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.
Survey of Packet Classification Algorithms. Outline Background and problem definition Classification schemes – One dimensional classification – Two dimensional.
Tries Standard Tries Compressed Tries Suffix Tries.
An Efficient IP Address Lookup Algorithm Using a Priority Trie Authors: Hyesook Lim and Ju Hyoung Mun Presenter: Yi-Sheng, Lin ( 林意勝 ) Date: Mar. 11, 2008.
IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS.
1 Comnet 2010 Communication Networks Recitation 7 Lookups & NAT.
Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:
CS 268: Lectures 13/14 (Route Lookup and Packet Classification) Ion Stoica April 1/3, 2002.
Efficient Multidimensional Packet Classification with Fast Updates Author: Yeim-Kuan Chang Publisher: IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL.
1 Geometric Solutions for the IP-Lookup and Packet Classification Problem (Lecture 12: The IP-LookUp & Packet Classification Problem, Part II) Advanced.
1 Comnet 2006 Communication Networks Recitation 7 Lookups & RDT.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
張 燕 光 資訊工程學系 Dept. of Computer Science & Information Engineering,
1 A Fast IP Lookup Scheme for Longest-Matching Prefix Authors: Lih-Chyau Wuu, Shou-Yu Pin Reporter: Chen-Nien Tsai.
An Efficient IP Lookup Architecture with Fast Update Using Single-Match TCAMs Author: Jinsoo Kim, Junghwan Kim Publisher: WWIC 2008 Presenter: Chen-Yu.
IP-Lookup and Packet Classification Computational Geometry, WS 2007/08 Lecture 14 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 11 : More Geometric Data Structures Computational Geometry Prof. Dr. Th. Ottmann 1 Geometric Data Structures 1.Rectangle Intersection 2.Segment.
Univ. of TehranAdv. topics in Computer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
P2P Course, Structured systems 1 Skip Net (9/11/05)
Fast binary and multiway prefix searches for pachet forwarding Author: Yeim-Kuan Chang Publisher: COMPUTER NETWORKS, Volume 51, Issue 3, pp , February.
March 1, Packet Classification and Filtering for Network Processors JC Ho.
Chapter 9 Classification And Forwarding. Outline.
Address Lookup in IP Routers. 2 Routing Table Lookup Routing Decision Forwarding Decision Forwarding Decision Routing Table Routing Table Routing Table.
Computer Networks Layering and Routing Dina Katabi
Cs6390 summer 2000 Tradeoffs for Packet Classification 1 Tradeoffs for Packet Classification Members: Jinxiao Song & Yan Tong.
1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:
IP Address Lookup Masoud Sabaei Assistant professor
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Wire Speed Packet Classification Without TCAMs ACM SIGMETRICS 2007 Qunfeng Dong (University of Wisconsin-Madison) Suman Banerjee (University of Wisconsin-Madison)
Content Addressable Network CAN. The CAN is essentially a distributed Internet-scale hash table that maps file names to their location in the network.
Packet Classification on Multiple Fields 참고 논문 : Pankaj Gupta and Nick McKeown SigComm 1999.
EECB 473 DATA NETWORK ARCHITECTURE AND ELECTRONICS PREPARED BY JEHANA ERMY JAMALUDDIN Basic Packet Processing: Algorithms and Data Structures.
IP Address Lookup Masoud Sabaei Assistant professor
1 Data Link Layer Lecture 23 Imran Ahmed University of Management & Technology.
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.
1 An Arc-Path Model for OSPF Weight Setting Problem Dr.Jeffery Kennington Anusha Madhavan.
Lecture Note on Switch Architectures. Function of Switch.
Exam 3 Review Data structures covered: –Hashing and Extensible hashing –Priority queues and binary heaps –Skip lists –B-Tree –Disjoint sets For each of.
Parallel tree search: An algorithmic approach for multi- field packet classification Authors: Derek Pao and Cutson Liu. Publisher: Computer communications.
Packet Switch Architectures The following are (sometimes modified and rearranged slides) from an ACM Sigcomm 99 Tutorial by Nick McKeown and Balaji Prabhakar,
Dynamic Algorithms with Worst-case Performance for Packet Classification Pankaj Gupta and Nick McKeown Stanford University {pankaj,
A Fast and Scalable IPv6 Packet Classification Author: Xiaoju Zhou, Xiaohong Huang, Qiong Sun, Wei Yang, Yan Ma Publisher: Network Infrastructure and Digital.
Hierarchical packet classification using a Bloom filter and rule-priority tries Source : Computer Communications Authors : A. G. Alagu Priya 、 Hyesook.
Ofir Luzon Supervisor: Prof. Michael Segal Longest Prefix Match For IP Lookup.
By: Yaron Levy Supervisors: Dr. Shlomo Greenberg Mr. Hagai David.
Ethernet switches and IP routers
Advanced Computer Networks
IP Routers – internal view
Transport Layer Systems Packet Classification
Segment Trees Basic data structure in computational geometry.
Packet Classification Using Coarse-Grained Tuple Spaces
Higher Order Tries Key = Social Security Number.
Network Layer: Control/data plane, addressing, routers
Dynamic rectangular intersection with priorities
Dynamic rectangular intersection with priorities
Presentation transcript:

1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006

2 Overview The IP-Lookup problem Generalisations of IP-Lookup: Dynamisation, conflict-free ranges Packet classification Category 1 solutions: Structure the universe Category 2 solutions: Structure the prefix set Inverted Next Lists Priority Search Trees

3 Dstn Addr ---- Dstn-prefixNext Hop Forwarding Table Forwarding Engine HEADERHEADER Lookup in an IP Router Next-Hop-Computation

/ / / Destination IP Prefix Outgoing Port (Next-Hop) / / /197 IP prefix: 0-32 bits Example Forwarding Table

/ / / / / /8 Nested intervalls Sets of intervalls corresponding to sets of prefixes of IP-addresses are nested: Any two intervalls are either disjoint or one is contained in the other! Overlaps are impossible!

/ / /24 Routing lookup: Find the longest matching prefix (the most specific route) among all prefixes that match the destination address / / / LMP-Matching

7 Example of an IP-Lookup Table PrefixNext-hop P1111*H1 P210*H2 P3101*H3 P410101H4 P5*H5 Prefixes may be considered as bitstrings of a maximal length W. Example: W = 5, p = 10111

8 Generalisations of the IP-Lookup Problem Dynamisation: Insertion, deletion of prefixes (intervalls) Conflict free sets of intervalls (not nested) Priority matching instead of LMP lookup: PrefixNext-hop R110*H3 R21001*H2 R301100H5 R40*H4 R5010*H1 R6*H6 Determine the prefix with highest priority matching a given bitstring 10011

9 Extension to higher dimensions: Classification Classify incoming packages into different flows according to different services. ServiceExample Traffic Shaping Ensure that ISP3 does not inject more than 50Mbps of total traffic on interface X, of which no more than 10Mbps is traffic Packet Filtering Deny all traffic from ISP2 (on interface X) destined to E2 Policy Routing Send all voice-over-IP traffic arriving from E1 (on interface Y) and destined to E2 via a separate ATM network PAYLOAD L4-SP 16b L4-DP 16b PROTO 8b L3-SA 32b L3-DA 32b L3-Proto 8b L2-SA 48b L2-DA 48b

10 Example Classifier RuleDestination Address Source Address R10*10* R20*01* R30*1* R400*1* R500*11* R610*1* R7*00* Field 1Field 2 IP-Lookup is a special case of the packet classification problem. Example: (00101, 11011)

11 R1 R2 R3 R4 2-dim Classifier

12 R1 R2 R3 {R1, R2} {R2, R3} {R1, R2, R3} 7 regions For a given point p: Find the rule (region) with highest priority containing p. 2-dim Classifier

13 Solution stategies for IP-Lookup and Packet Classification Structure the universe of all bitstrings of length W: Trie based methods + Lookup becomes dependent only on the length of the given prefix - Updates expensive Structure the current set of n prefixes: Geometry based methods + Efficient updates - Lookup dependent on n Hardware-based solutions Hybrid methods

14 Binary Tries A full binary tree of height W is a possible raster for storing all prefixes and bitstrings of length ≤ W. LMP: For a given bitstring p find the deepest node representing a prefix on the search path to leaf p! Time: O(W) {*, 00*, 010*, 10*,100*}

15 Compression (1)

16 Compression (2) The number of nodes in a contracted binary trie storing n prefixes is ≤ 2n. CBT are similar to Ukkonen‘s implicit suffix trees. Lookup, insertion and deletion of prefixes in time O(W). Many possible variations: Increase branching factor in order to decrease height. Adapt branching factor on each level to number of prefixes. ……

17 Increasing the branching factor Trie based structures are set- and order-unique, hence, oblivious structures!

A F B G H CDE Structure the set of intervals Set of n nested intervals, among them the interval * representing the whole universe. n intervals partition the universe into ≤ 2n fragments. Fragments Intervals

A F B G H CDE LMP For a given point p: Find the fragment f, into which p falls, and determine the smallest interval X containing f. Fragments Intervals

20 LMP and updates P1P1 P2P2 P3P3 P4P4 P5P5 P6P6 P0P0 Storing the smallest interval I containing fragment f at the fragments: LMP in time O(log n) Update:  (n)

A F B G H CDE Let x be an arbitrary fragment or interval, define: next(x) = the smallest interval containing x For any given set of nested intervals: For each fragment and each interval x (except *) next(x) exists and is well defined! Fragments Definition next(x) Intervals

A F B G H CDE Fragments Inverted-Next-Lists Inverted-Next-List of interval X = {Y; next(Y) = X}, sorted in l.t.r.o. A: B, 3, C, 7, D, 9, E B: 1, F C: 4, H D: 8 E: 10 F: 2 G: 5 H: G, 6 Intervals For each point p in fragment Y: If next(Y) = X, then X is the smallest interval containing p!

A F B G H CDE Fragments Inverted-Next-Lists A: B, 3, C, 7, D, 9, E B: 1, F C: 4, H D: 8 E: 10 F: 2 G: 5 H: G, 6 Intervals Fragment i has direct link to the position, where i occurs in an INL. Each fragment and intervall in an INL is specified by ist start- and endpoint. Sum of lengths of all INL is at most 2 n. Inverted-Next-List of interval X = {Y; next(Y) = X}, sorted in l.t.r.o.

24 Longest Prefix Matching for point p A F B G H CDE Determine fragment Y, into which p falls, follow the link from Y to the INL, in which Y occurs, proceed from Y to the head of this INL, report the interval X at the header of this list! A: B, 3, C, 7, D, 9, E B: 1, F C: 4, H D: 8 E: 10 F: 2 G: 5 H: G, 6

A F B G H CDE Insertion of a new interval without expansion of the fragment raster(2) A: B, 3, C, 7, D, 9, E B: 1, F C: 4, H D: 8 E: 10 F: 2 G: 5 H: G, 6 I A: B, I, 9. E I: 3, C, 7, D

a 456 7a 10 A F B G H CDE Fragments Insertion of a new interval with expansion of the fragment raster(1) A: B, 3, C, 7, D, 9, E B: 1, F C: 4, H D: 8 E: 10 F: 2 G: 5 H: G, 6 3b 7b I A: B, 3a, I, 7b, D, 9, E I: 3b, C, 7a Intervals

A F B G H CDE Fragments Deletion of an interval without contraction of the fragment raster(1) A: B, 3, C, 7, D, 9, E B: 1, F C: 4, H D: 8 E: 10 F: 2 G: 5 H: G, 6 A: B, 3, 4, H, 7, D, 9, E Intervals

28 Implementation List of fragments: Balanced leaf-search-tree, Operations: Search, insert, delete Inverted Next Lists: Balanced leaf-search-tree Operations: Find root (marking), splitting a tree according to a given x-value, join of 2 or 3 trees to a new one. All operations can be carried out in time O(log n), n = #(intervals) Alternative implementations may use: Biased Skip Lists (for bursty access patterns): Sahni/Kim 2003 Splay Trees (self adjusting to the access pattern) ……..

29 Summary Trie-based solutions: (1-dim) static: LMP in time O(W) dynamic: insertion, deletion in time O(W) (Doeringer et al, 1996) Dynamic programming algorithm for the construction of space optimal tries of a predetermined height (optimize the strides of tries) (Sahni et al, 2003) Geometry-based solutions: (dynamic) Dimension: 1-dim, 2-dim, higher … Interval sets: nested, conflict free, general Priorities: length of intervals (LMP), general Structures: inverted lists, (balaced) search trees, skip lists segment trees, interval trees, PST Efficiency: worst case, amortized w.c., expected case

30 1-dim, nested intervals, LMP-priority, Sahni et al search, insertion, deletion in time O(log n), inverted lists, balanced trees, skip lists 1-dim, nested intervals, general priorities, Kaplan et al search, insertion, deletion in time O(log n) and space O(n) worst case: balanced dynamic trees amortized: self-adjusting dynamic trees 1-dim, general intervals, general priorities, Kaplan et al search in worst-case time O(log n) insertion in amortized time O(log n) deletion in amortized time O(log n log log n) space O(n) interval trees, BB[  ] trees 2-dim, general rectangles, general priorities search, insert, delete in time O(log 2 n) and space O(n log n) dynamic segment trees

31 2-dim, nested rectangles, general priorities, Kaplan et al search in amortized time O(log n) insertion in amortized time O(log 2 n) space O(n log n) splay trees 2-dim, general rectangles over fixed universe U, general priorities, Eppstein et al Static case (no updates) search in time O(log |U|) conflict detection in time O(n 3/2 ) k-d-trees, Open problems: Simple, efficient solution for the general, higher-dimensional case. Bursty and clustered updates. Using other data structures, like fully dynamic segment trees, relaxed balanced search trees, relaxed balanced PST, ….