Presentation is loading. Please wait.

Presentation is loading. Please wait.

M. Waldvogel, G. Varghese, J. Turner, B. Plattner Presenter: Shulin You UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering.

Similar presentations


Presentation on theme: "M. Waldvogel, G. Varghese, J. Turner, B. Plattner Presenter: Shulin You UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering."— Presentation transcript:

1 M. Waldvogel, G. Varghese, J. Turner, B. Plattner Presenter: Shulin You UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 1 Scalable High Speed IP Routing Lookups

2 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 2 Outline  Routing and the BMP (Best Matching Prefix) problem  Basic scheme: binary search of hash tables  Refinements: asymmetric trees, mutated binary search and ropes  Implementation: building the tree  Performance and comparison study

3 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 3 Introduction Increases in Internet traffic demands: link speed, router data throughput, packet forward rate Packet forwarding rate becomes bottleneck Address lookup: main step in packet forwarding Need efficient Best Prefix Match algorithm

4 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 4 Lookup in an IP Router Dstn Addr ---- Dstn-prefixNext Hop Forwarding Table Next Hop Computation Forwarding Engine Incoming Packet HEADERHEADER Next Hop

5 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 5 More about BMP Classless Inter-Domain Routing (CIDR) - cope with routing table growth Aggregation results in address prefix list in routing tables Packets forwarded according to Best Matching Prefix Goal: use hashing to find BMP

6 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 6 Radix Trie P2 P3 P4 P1 A B C G D F H E 1 0 0 1 1 1 1 Lookup 10111 Add P5=1110* I 0 P5 next-hop-ptr (if prefix) left-ptr right-ptr Trie node P1111*H1 P210*H2 P31010*H3 P410101H4

7 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 7 Radix Trie W-bit prefixes: O(W) lookup, O(NW) storage and O(W) update complexity Advantages  Simplicity  Extensible to wider fields Disadvantages  Worst case lookup slow  Wastage of storage space in chains

8 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 8 Outline  Routing and the BMP (Best Matching Prefix) problem  Basic scheme: binary search of hash tables  Refinements: asymmetric trees, mutated binary search and ropes  Implementation: building the tree  Performance and comparison study

9 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 9 Basic Scheme Hash table organized by prefix length Markers needed

10 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 10 Marker Management Reducing marker storage: markers only needed in levels visited by binary search when looking for P E. g. : In table of 8 levels: a prefix with length of 7 [111] needs markers in level 4 and 6 a prefix with length of 3 [11] needs markers in level 2

11 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 11 False Markers What if table entries are: P1=1, P2=00, P3=110 in the previous example? Solution: to avoid backtracking, record current best matching prefix of marker M in M.bmp

12 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 12 Basic Algorithm Initialize range R = array L Initialize BMP to be null string While R not empty I = middle level in range R D’ = D(L[i].length) M = Search(D’, L[i].hash) If M is nil Then set R = upper R Elseif M is a prefix & not a marker Then BMP = M.bmp; break Else { BMP = M.bmp; R = lower R} Endif Endwhile

13 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 13 Outline  Routing and the BMP (Best Matching Prefix) problem  Basic scheme: binary search of hash tables  Refinements: asymmetric trees, mutated binary search and ropes  Implementation: building the tree  Performance and comparison study

14 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 14 Algorithm Refinements To optimize, need to exploit deeper structure in routing table Simplest improvement: Search only non-empty tries

15 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 15 Asymmetric Binary Search Try to search the most promising trie first Example: Maximize table entries while keeping tree balance

16 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 16 Mutating Binary Search The number of distinct prefix lengths rarely exceeds 12 Every match with some marker X means that we need only search among the set of prefixes for which X is a prefix

17 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 17 Mutating Binary Search (example)

18 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 18 Potential Disadvantages Pre-computing optimal trees increases insertion time Storage of binary trees for each prefix enormous Storage problem solved with “rope” data structure Rope maximum length: log 2 W pointers

19 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 19 Rope: Encoded Trees Only need to store the sequence of levels which binary search on a given subtrie will follow on repeated failures to find a match e.g.: Rope 1 contains 16, 8, 4, 2, 1 Rope algorithm: a prefix not a marker: end of rope a prefix and a marker: X.bmp = X

20 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 20 Rope Search (Example)

21 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 21 Rope Search Initialize Rope R = default search sequence Initialize BMP = null string While R not empty i = first pointer of R D’ = D(L[i].length) M = Search(D’, L[i].hash) If M is success Then BMP = M.bmp; R = M.rope Endif Endwhile

22 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 22 Building Rope Search Pass 1: builds a conventional trie Pass 2: all prefixes inserted into hash tables, starting with shortest prefix Batch insertions and deletions into the table as these operations are expensive.

23 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 23 Outline  Routing and the BMP (Best Matching Prefix) problem  Basic scheme: binary search of hash tables  Refinements: asymmetric trees, mutated binary search and ropes  Implementation: building the tree  Performance and comparison study

24 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 24 Existing Approaches Modification of exact matching:log 2 2N Trie based: BSD radix trie O(W 2 ) Hardware: parallelism, CAM expensive Protocol based: IP/tag switching, still need some IP lookups Caching: CAM (Content Addressable Memory)

25 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 25 Complexity Comparison

26 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 26 Performance Comparison

27 UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering 27 Conclusion Intellectual contribution: markers and pre-computation ensure log time in worst-case Solution scalable and can be implemented in software efficiently Future work: choice of balancing function and faster insertion algorithms


Download ppt "M. Waldvogel, G. Varghese, J. Turner, B. Plattner Presenter: Shulin You UNIVERSITY OF MASSACHUSETTS, AMHERST – Department of Electrical and Computer Engineering."

Similar presentations


Ads by Google