1 Geometric Solutions for the IP-Lookup and Packet Classification Problem (Lecture 12: The IP-LookUp & Packet Classification Problem, Part II) Advanced.

Slides:



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

INTERVAL TREE & SEGMENTATION TREE
Introduction to Computer Science 2 Lecture 7: Extended binary trees
1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Trees Types and Operations
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.
A Fast and Memory Efficient Dynamic IP Lookup Algorithm Based on B-Tree Author:Yeim-Kuan Chang and Yung-Chieh Lin Publisher: 2009 International Conference.
B+-Trees (PART 1) What is a B+ tree? Why B+ trees? Searching a B+ tree
Binary Trees, Binary Search Trees CMPS 2133 Spring 2008.
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Orthogonal Range Searching 3Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional.
I/O-Algorithms Lars Arge Aarhus University February 27, 2007.
IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS.
IP-Lookup and Packet Classification, II Advanced Algorithms & Data Structures Lecture Theme 8 Prof. Dr. Th. Ottmann Summer Semester 2006.
Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Persistent Data Structures Computational Geometry, WS 2007/08 Lecture 12 Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen, Institut.
I/O-Algorithms Lars Arge University of Aarhus March 1, 2005.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
I/O-Algorithms Lars Arge Aarhus University March 5, 2008.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Basic Data Structures for IP lookups and Packet Classification
1 Geometric index structures April 15, 2004 Based on GUW Chapter , [Arge01] Sections 1, 2.1 (persistent B- trees), 3-4 (static versions.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 - Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part II Prof. Dr. Th. Ottmann Summer Semester 2006.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
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.
AALG, lecture 11, © Simonas Šaltenis, Range Searching in 2D Main goals of the lecture: to understand and to be able to analyze the kd-trees and.
Advanced Data Structures and Algorithms COSC-600 Lecture presentation-6.
Orthogonal Range Searching I Range Trees. Range Searching S = set of geometric objects Q = query object Report/Count objects in S that intersect Q Query.
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:
1 Geometric Intersection Determining if there are intersections between graphical objects Finding all intersecting pairs Brute Force Algorithm Plane Sweep.
UNC Chapel Hill M. C. Lin Orthogonal Range Searching Reading: Chapter 5 of the Textbook Driving Applications –Querying a Database Related Application –Crystal.
External Memory Algorithms for Geometric Problems Piotr Indyk (slides partially by Lars Arge and Jeff Vitter)
14/13/15 CMPS 3130/6130 Computational Geometry Spring 2015 Windowing Carola Wenk CMPS 3130/6130 Computational Geometry.
Binary Trees, Binary Search Trees RIZWAN REHMAN CENTRE FOR COMPUTER STUDIES DIBRUGARH UNIVERSITY.
Content Addressable Network CAN. The CAN is essentially a distributed Internet-scale hash table that maps file names to their location in the network.
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
2IL50 Data Structures Fall 2015 Lecture 9: Range Searching.
Starting at Binary Trees
1 Searching the dictionary ADT binary search binary search trees.
Fall 2006 CSC311: Data Structures 1 Chapter 10: Search Trees Objectives: Binary Search Trees: Search, update, and implementation AVL Trees: Properties.
Lecture 11COMPSCI.220.FS.T Balancing an AVLTree Two mirror-symmetric pairs of cases to rebalance the tree if after the insertion of a new key to.
Segment Trees Basic data structure in computational geometry. Computational geometry.  Computations with geometric objects.  Points in 1-, 2-, 3-, d-space.
Binary Search Trees (BSTs) 18 February Binary Search Tree (BST) An important special kind of binary tree is the BST Each node stores some information.
CMPS 3130/6130 Computational Geometry Spring 2015
DESIGN AND IMPLEMENTATION OF DYNAMIC ROUTING TABLES Author: Yeim-Kuan Chang and Dung-Jiun Lin Publisher/Conf.: The graduation paper of CIAL master student,
1/20/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Plane Sweep Algorithms I Carola Wenk.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
Priority Search Trees Keys are distinct ordered pairs (x i, y i ). Basic operations.  get(x,y) … return element whose key is (x,y).  delete(x,y) … delete.
Geometric Data Structures
Interval Trees Store intervals of the form [li,ri], li <= ri.
IP Routers – internal view
Lecture 22 Binary Search Trees Chapter 10 of textbook
CMPS 3130/6130 Computational Geometry Spring 2017
Binary Trees, Binary Search Trees
(edited by Nadia Al-Ghreimil)
Segment tree and Interval Tree
Orthogonal Range Searching and Kd-Trees
Priority Search Trees Keys are pairs (x,y).
Segment Trees Basic data structure in computational geometry.
Priority Search Trees Modified Prof. Sahni’s notes.
Dynamic rectangular intersection with priorities
Dynamic rectangular intersection with priorities
Presentation transcript:

1 Geometric Solutions for the IP-Lookup and Packet Classification Problem (Lecture 12: The IP-LookUp & Packet Classification Problem, Part II) Advanced Algorithms & Data Structures Prof. Dr. Th. Ottmann Albert-Ludwigs-Universität Freiburg, Germany

2 Overview  The IP-table lookup problem  Geometric interpretation of the problem  Solution using Priority Search Trees  Solution using augmented range 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. Geometric view: For a given point p, find the smallest interval stabbed by p / / / LMP-Matching

7 Overview  The IP-table lookup problem  Geometric interpretation of the problem  Solution using Priority Search Trees  Solution using augmented range trees

8 Geometric view of IP-table lookup Find a representation of a (dynamic) set of intervals such that the following operations can be carried out efficiently: Insertion of an interval Deletion of an interval For a given point p: Find the smallest interval stabbed by p (LMP-query) Assumptions: Set of intervals is a nested set. Every newly inserted interval does not overlap with any interval in the set. Conflict test: For a given interval test whether or not it overlaps (is in conflict) with any interval already in the set.

9 Representation of intervals by points A B C D A B C D Interval (l, r) is mapped to point (r, l) below the main diagonal.

10 Stabbing queries A B C D A B C D p lies in (l, r) ⇔ (l, r) is stabbed by p ⇔ ( l  ≤ p und p ≤ r ) All points representing intervals stabbed by p lie to the right and below point (p, p) p

11 Geometric interpretation of interval-inclusion A B A B A ⊒ B Interval A = (l A, r A ) includes interval B = (l B, r B ) iff. point A is right below point B A ⋟ B B ⊑ A ⇔ A ⊒ B ⇔ p oint B left above point A ⇔ B ≼ A

12 Disjoint intervals B A B A X and Y represent disjoint intervals ⇔ There is no point p on the diagonal, s.t. p ≼ X und p ≼ Y

13 Overlapping intervals C p D C D X and Y represent overlapping intervals ⇔ There is a point p on the diagonal, s.t. p ≼ X and p ≼ Y, but X and Y are incomparable with resp. to ≼

14 Nested intervals B C A B p A D C X is smallest intervall, that contains point p ⇔ p ≼ X and for all Y with p ≼ Y : X ≼ Y Observation: Sets of nested intervals stabbed by a point are totally ordered with resp. to ≼ Points closer to the diagonal represent smaller intervals. D

15 LMP-Queries B C A B p A D C D The smallest interval containing a given point p is represented by the point closest to the diagonal in the region right below p. (This is the topmost leftmost point in the region!)

16 Overview  The IP-table lookup problem  Geometric interpretation of the problem  Solution using Priority Search Trees  Solution using augmented range trees

17 Priority Search Trees Priority Search trees are a 1.5-dim structure for the storage of points, they support the following operations : Insertion of a point Deletion of a point South-grounded range queries

18 x x x´ = ∞ Executable in O(log n) time. LMP-Query Find topmost leftmost (or leftmost topmost) point in the range (x, ∞, x) p x x Well defined, if intervalls are nested, otherwise not!

19 Finding topmost leftmost points in PST

20 Finding leftmost topmost points in PST

21 Pairwise distinct search keys A B C D A B C D (x, y) ↦ (2 W x + 2 W – 1 – y, y) = ((x, -y), y) All points have pairwise distinct x-coordinates. Points corresponding to intervals with equal left endpoint are l.t.r. sorted according to increasing lengths. LMP: Find point with smallest x-coordinate in a given x-range below a threshold!

22 Possibilities for the full dynamization of priority search trees: No rigid skeleton, but growing or shrinking with the point set. Insertion (5,3) Dynamic PST

23 Balanced trees as skeletons of PSTs  Rotation preserves the x-order, but may destroy the y-order of points.

24 Balanced trees as skeletons of PSTs  p x occurs in subtree 1: Insert p into subtree 1; Pull up a point from subtree 2 or 3. 2 log n steps for the trickle down process!

25 Balanced trees as skeletons of PSTs  p x occurs in subtree 2: Compare p y with the priorities stored at the roots of subtree 1 and 2; Insert a point into subtree 2 or 3; Pull up a point from subtree 2 or 3. 2 log n steps for the trickle down process!

26 Conflict detection (Insertion) x vu y new (query) interval (1) There is an interval (x, y) stabbed by u that has a right endpoint y < v x y vu (2) The range (u, v) contains a left endpoint x of an interval (x, y) that has a right endpoint not in this range, i.e. y > v

27 Conflict detection (Insertion) x vu y new (query) interval (1) There is an interval (x, y) stabbed by u that has a right endpoint y < v Points represent intervals sorted according to their right endpoints (u, u) v (y, x) u

28 Conflict detection (Insertion) x y vu (2) The range (u, v) contains a left endpoint x of an interval (x, y) that has a right endpoint not in this range, i.e. y > v Map interval (x, y) to point (x, -y). Store points in PST v (x, -y) u -v -y v

29 Overview  The IP-table lookup problem  Geometric interpretation of the problem  Solution using Priority Search Trees  Solution using augmented range trees

30 1-dim Range Tree: Summary Let P be a set of n points in 1-dim space. P can be stored in a balanced binary leaf-search tree such that the following holds: Construction time: O(n log n) Space requirement: O(n) Insertion of a point: O(log n) time Deletion of a point: O(log n) time 1-dim-range-query: Reporting all k points falling into a given query range can be carried out in time O(long n + k). The performance of 1-dim range trees does not depend on the chosen balancing scheme!

31 MinXinRectangle Queries Problem: Given a set P of points that changes under insertions and deletions, construct a data structure to store P that can be updated in O(lg n) time and that can find the point with minimal x-coordinate in a given range below a given threshold in O(log n) time. l r y0y0 MinXinRectangle(l, r, y 0 ) Assumption: All points have pairwise different x-coordinates

32 MinXinRectangle Queries l r y0y0 MinXinRectangle(l, r, y 0 ) Assumption: All points have pairwise different x-coordinates

33 Min-augmented Range Tree (2, 12)(3, 4)(4, 11) (5, 3)(8, 5) (11, 21) (14, 7) (21, 8)(15, 2)(17, 30) Two data structures in one: Leaf-search tree on x-coordinates of points Min-tournament tree on y-coordinates of points 82

34 MinXinRectangle(l, r, y 0 ) lr Split node Search for the boundary values l, r. Find the leftmost umbrella node with a min-field ≤ y 0.

35 MinXinRectangle(l, r, y 0 ) lr Split node Search for the boundary values l, r. Find the leftmost umbrella node with a min-field ≤ y 0. Proceed to the left son of the current node, if its min-field is ≤ y 0, and to the right son, otherwise. Return the point at the leaf. MinXinRectangle(l, r, y 0 ) can be found in time O(height of tree).

36 Updates Insert operation Insert node as into a standard binary leaf search tree. Adjust min-fields of every ancestor of the new node by playing a min tournament for each node and its sibling along the search path. Delete operation: Similar

37 Maintaining min-fields Under Rotations s1s1 s2s2 s3s3 s4s4 s5s5 s1s1 s3s3 s5s5 s4s4 min{s 5, s 3 }

38 Min-augmented Range Trees–Summary Theorem: There exists a data structure to represent a dynamic set S of n points in the plane with the following properties: The data structure allows updates and to answer MinXinRectangle(l, r, y 0 ) queries in O(log n) time. The data structure occupies O(n) space. Note: The data structure can be based on an arbitrary scheme of balanced binary leaf search trees. Min-augmented range trees can be used (instaed of PSTs) to solve the dynamic version of the IP lookup problem without changing the time complexity of the lookup and update operations.

39 Conflict detection (Insertion) x vu y new (query) interval (1) There is an interval (x, y) stabbed by u that has a right endpoint y < v Points represent intervals sorted according to their right endpoints (u, u) v (y, x) u Choose a min-augmented range tree and check whether there is at least one point in the range [u,v] below the threshold u.

40 Conflict detection (Insertion) x y vu (2) The range (u, v) contains a left endpoint x of an interval (x, y) that has a right endpoint not in this range, i.e. y > v Map interval [x, y] to point (x, y). Store points in max-augmented range tree and check whether there is a point (x, y) in the range [u, v] with a right endpoint y > v. v (x, y) u v

41 Implement and test new solutions with real (benchmark) data. Find a simple, efficient solution for the general, higher-dimensional case. Consider the case of bursty and clustered updates. Investigate the effect of using other data structures, like fully dynamic segment trees, relaxed balanced search trees, relaxed balanced PST, …. Find an efficient method for conflict detection in 2 (or more) dimensions. Open problems