Network Algorithms, Lecture 4: Longest Matching Prefix Lookups George Varghese.

Slides:



Advertisements
Similar presentations
A Search Memory Substrate for High Throughput and Low Power Packet Processing Sangyeun Cho, Michel Hanna and Rami Melhem Dept. of Computer Science University.
Advertisements

August 17, 2000 Hot Interconnects 8 Devavrat Shah and Pankaj Gupta
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
Data plane algorithms in routers
Spring 2006CS 685 Network Algorithmics1 Longest Prefix Matching Trie-based Techniques CS 685 Network Algorithmics Spring 2006.
1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
A Scalable and Reconfigurable Search Memory Substrate for High Throughput Packet Processing Sangyeun Cho and Rami Melhem Dept. of Computer Science University.
Spring 2006CS 685 Network Algorithmics1 Principles in Practice CS 685 Network Algorithmics Spring 2006.
An On-Chip IP Address Lookup Algorithm Author: Xuehong Sun and Yiqiang Q. Zhao Publisher: IEEE TRANSACTIONS ON COMPUTERS, 2005 Presenter: Yu Hao, Tseng.
1 An Efficient, Hardware-based Multi-Hash Scheme for High Speed IP Lookup Hot Interconnects 2008 Socrates Demetriades, Michel Hanna, Sangyeun Cho and Rami.
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.
Digital Search Trees & Binary Tries Analog of radix sort to searching. Keys are binary bit strings.  Fixed length – 0110, 0010, 1010,  Variable.
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 18: Hash Tables.
A supernetwork.
BTrees & Bitmap Indexes
Higher Order Tries Key = Social Security Number.   9 decimal digits. 10-way trie (order 10 trie) Height
1 A Tree Based Router Search Engine Architecture With Single Port Memories Author: Baboescu, F.Baboescu, F. Tullsen, D.M. Rosu, G. Singh, S. Tullsen, D.M.Rosu,
Deterministic Memory- Efficient String Matching Algorithms for Intrusion Detection Nathan Tuck, Timothy Sherwood, Brad Calder, George Varghese Department.
CS 268: Lectures 13/14 (Route Lookup and Packet Classification) Ion Stoica April 1/3, 2002.
CS 268: Route Lookup and Packet Classification Ion Stoica March 11, 2003.
Study of IP address lookup Schemes
1 A Fast IP Lookup Scheme for Longest-Matching Prefix Authors: Lih-Chyau Wuu, Shou-Yu Pin Reporter: Chen-Nien Tsai.
1 HEXA: Compact Data Structures or Faster Packet Processing Author: Sailesh Kumar, Jonathan Turner, Patrick Crowley, Michael Mitzenmacher. Publisher: ICNP.
Packet Classification George Varghese. Original Motivation: Firewalls Firewalls use packet filtering to block say ssh and force access to web and mail.
COMP 171 Data Structures and Algorithms Tutorial 10 Hash Tables.
CS 268: Route Lookup and Packet Classification
Univ. of TehranAdv. topics in Computer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
Address Lookup in IP Routers. 2 Routing Table Lookup Routing Decision Forwarding Decision Forwarding Decision Routing Table Routing Table Routing Table.
Fast IP Address Lookup Algorithms 정 성 권 서울대학교 컴퓨터공학과
CS 6401 Efficient Addressing Outline Addressing Subnetting Supernetting.
Network Algorithms, Lecture 3: Exact Lookups George Varghese.
1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:
Network Algorithms, Lecture 1: Intro and Principles George Varghese, UCSD.
CSE7701: Research Seminar on Networking
1 Routing with a clue Anat Bremler-Barr Joint work with Yehuda Afek & Sariel Har-Peled Tel-Aviv University.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
PARALLEL TABLE LOOKUP FOR NEXT GENERATION INTERNET
IP Address Lookup Masoud Sabaei Assistant professor
A Summary of XISS and Index Fabric Ho Wai Shing. Contents Definition of Terms XISS (Li and Moon, VLDB2001) Numbering Scheme Indices Stored Join Algorithms.
Data : The Small Forwarding Table(SFT), In general, The small forwarding table is the compressed version of a trie. Since SFT organizes.
1 ECE 526 – Network Processing Systems Design System Implementation Principles II Varghese Chapter 3.
1 Dynamic Pipelining: Making IP- Lookup Truly Scalable Jahangir Hasan T. N. Vijaykumar School of Electrical and Computer Engineering, Purdue University.
On Adding Bloom Filters to Longest Prefix Matching Algorithms
Higher Order Tries Key = Social Security Number.   9 decimal digits. 10-way trie (order 10 trie) Height
Scalable High Speed IP Routing Lookups Scalable High Speed IP Routing Lookups Authors: M. Waldvogel, G. Varghese, J. Turner, B. Plattner Presenter: Zhqi.
A Small IP Forwarding Table Using Hashing Yeim-Kuan Chang and Wen-Hsin Cheng Dept. of Computer Science and Information Engineering National Cheng Kung.
Sets of Digital Data CSCI 2720 Fall 2005 Kraemer.
1 CPS216: Advanced Database Systems Notes 05: Operators for Data Access (contd.) Shivnath Babu.
CS 740: Advanced Computer Networks IP Lookup and classification Supplemental material 02/05/2007.
Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker:
Dynamic Pipelining: Making IP-Lookup Truly Scalable Jahangir Hasan T. N. Vijaykumar Presented by Sailesh Kumar.
Packet Classification Using Multidimensional Cutting Sumeet Singh (UCSD) Florin Baboescu (UCSD) George Varghese (UCSD) Jia Wang (AT&T Labs-Research) Reviewed.
Evaluating and Optimizing IP Lookup on Many Core Processors Author: Peng He, Hongtao Guan, Gaogang Xie and Kav´e Salamatian Publisher: International Conference.
Ofir Luzon Supervisor: Prof. Michael Segal Longest Prefix Match For IP Lookup.
IP Addressing. A 32-bit logical naming convention A dotted-decimal notation is used: – –Each number represents 8 bits. Number is Part.
IP Address Lookup Masoud Sabaei Assistant professor Computer Engineering and Information Technology Department, Amirkabir University of Technology.
IP Routers – internal view
Multiway range trees: scalable IP lookup with fast updates
HEXA: Compact Data Structures for Faster Packet Processing
Data plane algorithms in routers
Advance Computer Networking
Data Plane Algorithms in Network Processing Systems
Packet Classification Using Coarse-Grained Tuple Spaces
Higher Order Tries Key = Social Security Number.
A Small and Fast IP Forwarding Table Using Hashing
Author: Xianghui Hu, Xinan Tang, Bei Hua Lecturer: Bo Xu
Presentation transcript:

Network Algorithms, Lecture 4: Longest Matching Prefix Lookups George Varghese

Plan for Rest of Lecture Defining Problem, why its important Trie Based Algorithms Multibit trie algorithms Compressed Tries Binary Search Binary Search on Hash Tables

Longest Matching Prefix Given N prefixes K_i of up to W bits, find the longest match with input K of W bits. 3 prefix notations: slash, mask, and wildcard /31 or 1* N =1M (ISPs) or as small as 5000 (Enterprise). W can be 32 (IPv4), 64 (multicast), 128 (IPv6). For IPv4, CIDR makes all prefix lengths from 8 to 28 common, density at 16 and 24

Why Longest Match Much harder than exact match. Why is thus dumped on routers. Form of compression: instead of a billion routes, around 500K prefixes. Core routers need only a few routes for all Stanford stations. Really accelerated by the running out of Class B addresses and CIDR

Sample Database

Skip versus Path Compression Removing 1-way branches ensures that tries nodes is at most twice number of prefixes. Skip count (Berkeley code, Juniper patent) requires exact match and backtracking: bad!

Multibit Tries

Optimal Expanded Tries Pick stride s for root and solve recursively Srinivasan Varghese

Leaf Pushing: entries that have pointers plus prefix have prefixes pushed down to leaves Degermark et al

Why Compression is Effective Breakpoints in function (non-zero elements) is at most twice the number of prefixes

Lulea uses large arrays: TreeBitMap uses small arrays, counts bits in hardware. No leaf pushing, 2 bit maps per node. CRS-1 Eatherton-Dittia-Varghese

Binary Search Natural idea: reduce prefix matching to exact match by padding prefixes with 0’s. Problem: addresses that map to diff prefixes can end up in same range of table.

Modified Binary Search Solution: Encode a prefix as a range by inserting two keys A000 and AFFF Now each range maps to a unique prefix that can be precomputed.

Why this works Any range corresponds to earliest L not followed by H. Precompute with a stack.

Modified Search Table Need to handle equality (=) separate from case where key falls within region (>).

Transition to IPv6 So far: schemes with either log N or W/C memory references. IPv6? We describe a scheme that takes O(log W) references or log 128 = 7 references Waldvogel-Varghese-Turner. Uses binary search on prefix lengths not on keys.

Why Markers are Needed

Why backtracking can occur Markers announce “Possibly better information to right”. Can lead to wild goose chase.

Avoid backtracking by.. Precomputing longest match of each marker

2011 Conclusions Fast lookups require fast memory such as SRAM  compression  Eatherton scheme. Can also cheat by using several DRAM banks in parallel with replication. EDRAM  binary search with high radix as in B-trees. IPv6 still a headache: possibly binary search on hash tables. For enterprises and reasonable size databases, ternary CAMs are way to go. Simpler too.

Principles Used P1: Relax Specification (fast lookup, slow insert) P2: Utilize degrees of freedom (strides in tries) P3: Shift Computation in Time (expansion) P4: Avoid Waste seen (variable stride) P5: Add State for efficiency (add markers) P6: Hardware parallelism (Pipeline tries, CAM) P8: Finite universe methods (Lulea bitmaps) P9: Use algorithmic thinking (binary search)