Presentation is loading. Please wait.

Presentation is loading. Please wait.

AN ON-CHIP IP ADDRESS LOOKUP ALGORITHM

Similar presentations


Presentation on theme: "AN ON-CHIP IP ADDRESS LOOKUP ALGORITHM"— Presentation transcript:

1 AN ON-CHIP IP ADDRESS LOOKUP ALGORITHM
Author: Xuehong Sun and Yiqiang Q. Zhao Publisher/Conf.: IEEE TRANSACTIONS ON COMPUTERS,2005 Speaker: Han-Jhen Guo Date:

2 OUTLINE Hardware Design Reference Model
Convert Longest Prefix Match To Range Search Problem Proposed Scheme Compressed Endpoints Shared Pointers Build The Tree (Bottom Up) Performance

3 HARDWARE DESIGN REFERENCE MODEL
chip (internal) mem. acess time = 1.25ns (several times faster than DRAM) external 13 bits Next Hop Information des. IP address

4 CONVERT LONGEST PREFIX MATCH TO RANGE SEARCH PROBLEM (1/4)
Definition [b, e) is defined as the range of the prefix P b and e are defined as the left endpoint and right endpoint of prefix P

5 CONVERT LONGEST PREFIX MATCH TO RANGE SEARCH PROBLEM (2/4)
Routing table (len. = 6) Range representation

6 CONVERT LONGEST PREFIX MATCH TO RANGE SEARCH PROBLEM (3/4)
Port merging C A B A C C D C A C A A C A B A C D C A C A

7 CONVERT LONGEST PREFIX MATCH TO RANGE SEARCH PROBLEM (4/4)
The IP address lookup problem is converted into the predecessor finding problem in a priority queue given a set of sorted integers S and an integer i, find an integer e in S such that e is the biggest one which is less than or equal to i search 39

8 PROPOSED SCHEME - COMPRESSED ENDPOINTS (1/4)
eg. real-life IPv4 endpoints common leading bits (CLB) keys trailing zeros

9 PROPOSED SCHEME - COMPRESSED ENDPOINTS (2/4)
Data structure of one word in on-chip memory (row data structure of a node of the tree) 1 4 5 5 144 - ( ) = 109 20 inter. node: index of next lv. node leaf node: index of port info.

10 PROPOSED SCHEME - COMPRESSED ENDPOINTS (3/4)
Set up the field of common leading bits to calculate the number of common leading bits of the smallest and the biggest endpoints in the group O(2) Set up the field of trailing zeros the first endpoint are counted and recorded as the candidate number of common trailing zeros the trailing zeros of the next endpoint are counted if the number of the trailing zeros of the next endpoint is smaller than the candidate number, the candidate number is changed to the smaller one otherwise the candidate number is unchanged O(N), N is # of nodes in a group

11 PROPOSED SCHEME - COMPRESSED ENDPOINTS (4/4)
eg. real-life IPv4 endpoints L 6 15 8 , , , , , address of external memmory for port information common leading bits (CLB) keys trailing zeros

12 PROPOSED SCHEME - SHARED POINTERS
eg.(apply to B-tree) port A 1 B 2 3 C 4 D 5 6 port 7 C 8 A 9 10 D 11 12 B 13 i 3 1 01100(24), 10001(34), 11000(48) 1 L 3 2 1 010(4), 011(6), 100(8) 2 L 3 011001(25), (28), (32) 4 3 L 2 3 0(40), 1(44) 8 4 L 2 01(52), 10(56) 11

13 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
Given a set of sorted endpoints, we assign endpoints to leaf nodes and then to the next highest level until the root level Select the first four endpoints as a group and calculate tb (= the total bits of the compressed keys) tb = 109 → store these four endpoints a word (group) tb > 109 → store first three endpoints a word tb < 109 → check if can store (4 + 1) endpoints...

14 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
a Variant 1 grouping a~d: 13*4=52 < 109 a~e: 14*5=70 < 109 a~g: 14*7=98 < 109 a~h: 14*8=112 > 109 → {a,b,c,…,g} is a leaf, then h should be higher lv. i~j: … b c d e f g h i j k L m

15 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
a Variant 1 after grouping b c d i 2 (h), (m) e f L 7 (a), (b), (c), (d), (e), (f), (g) g h i L 4 (i), (j), (k), (L) j k L m

16 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
a Variant 1 eg. mistaking CLB b c d i 2 6 … 10(h), … 11(m) F F 00 e f L 7 10 8 (a), (b), (c), (d), (e), (f), (g) g h F F 0 i L 4 8 0110 … (i), 0110 … (j), 1000 … (k), 1000 … (L) j k 1111 F F L (EORROR!) m

17 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
a Variant 1 compute CLB and trailing 0s b c d i 2 6 … 10(h), … 11(m) e f L 7 8 (a), (b), (c), (d), (e), (f), (g) 5 g h h i L 4 8 … (i), … (j), … (k), … (L) 1 j k L m

18 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
a Variant 1 searching b c d i 2 6 … 10(h), … 11(m) F F 00 e f L 7 5 8 (a), (b), (c), (d), (e), (f), (g) g h F F 0 i F F L 4 1 8 … (i), … (j), … (k), … (L) j k L m

19 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
a Variant 2 grouping a~d: 13*4=52 < 109 a~e: 14*5=70 < 109 a~g: 14*7=98 < 109 a~h: 14*8=112 > 109 → {a,b,c,…,g} is a leaf h~k: … b c d e f g h i j k L m

20 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
a Variant 2 after grouping b c d e f L 7 (a), (b), (c), (d), (e), (f), (g) g h i L 4 (h), (i), (j), (k) j k L L 2 (L), (m) m

21 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
n1 a Variant 2 creating new endpoints to next higher lv. b c i 3 …0(n1), …0(n2), …0(n3) d e f L 7 6 (a), (b), (c), (d), (e), (f), (g) g n2 CLB(n1, n2) h i L 4 1 (h), (i), (j), (k) j k CLB(n2, n3) L n3 L 2 (L), (m) m CLB(n3, m)

22 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
n1 a Variant 2 searching b c i 3 12 …0(n1), …0(n2), (n3) d F 1111 e f L 7 6 8 (a), (b), (c), (d), (e), (f), (g) g n2 h F F 0 i F 1111 L 4 1 7 … 1(h), … 0(i), … 0(j), … 0(k), j k L n3 L 2 6 … 00(L) … 11(m) m

23 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
Variant 3 apply variant 1 to lower levels apply variant 2 to higher levels in experiment of perfomance variant 1 are applied to leaf levels variant 2 are applied to other higher levels

24 PROPOSED SCHEME - BUILD THE TREE (BOTTOM UP)
Variant 4 divides the endpoints into groups according to their leading bits according to groups, respective tree structure is created using techniques described in this paper (variant 1 or 2)

25 PERFORMANCE Port merge effect (IPv4)

26 PERFORMANCE Comparisons on variants (width = 144) (IPv4)
variant 3 is well balanced min mem. req. max mem. access time min mem. access time max mem. req.

27 PERFORMANCE Implement with variant 3
ME ratio = mem. req. in bits / # of prefixes Arity of a node = the # of subtrees of the node memory access times = log Arity (table_size) Results of IPv6 Using 168 Bits Memory Width Results of IPv4 Using 144 Bits Memory Width probably due to a high percentage (above 70 percent) of length 48 prefixes

28 PERFORMANCE Memory size for IPv4 as a function of table size with different memory widths better choices

29 PERFORMANCE Memory size for IPv6 as a function of table size with different memory widths better choices

30 PERFORMANCE Number of Memory Accesses for IPv4 and IPv6 as a Function of Table Size and Memory Width IPv4 both are NOT sensitive to table size IPv6

31 Thanks for your listening!


Download ppt "AN ON-CHIP IP ADDRESS LOOKUP ALGORITHM"

Similar presentations


Ads by Google