Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 A Fast IP Lookup Scheme for Longest-Matching Prefix Authors: Lih-Chyau Wuu, Shou-Yu Pin Reporter: Chen-Nien Tsai.

Similar presentations


Presentation on theme: "1 A Fast IP Lookup Scheme for Longest-Matching Prefix Authors: Lih-Chyau Wuu, Shou-Yu Pin Reporter: Chen-Nien Tsai."— Presentation transcript:

1 1 A Fast IP Lookup Scheme for Longest-Matching Prefix Authors: Lih-Chyau Wuu, Shou-Yu Pin Reporter: Chen-Nien Tsai

2 2 Outline Introduction Previous IP Lookup Scheme New IP Lookup Scheme Performance Analysis Conclusion

3 3 What is IP Lookup IP lookup is an important action in router that is to find the next hop of each incoming packet with a longest-prefix- match address in the routing table. The major bottleneck in Internet is slow packet forwarding rate, which cannot fit the fast link speed in the router.

4 4 The IP lookup steps 1.The router finds the set of routing entries that match the beginning IP destination address of the incoming packet. 2.Among this set of matched routes, the router selects the one with the longest prefix to forward the packet. Note: The longest prefix matching is complex.

5 5 How to Implement Software  For the complex longest prefix matching, IP lookup is often designed in software a first.  Not suitable for high speed network. Hardware  Recently, several hardware lookup mechanisms have been presented.  These mechanisms almost based on indirect lookup.

6 6 Outline Introduction Previous IP Lookup Scheme New IP Lookup Scheme Performance Analysis Conclusion

7 7 1. Binary Trie What is the trie?  A tree for storing strings in which there is one node for every common prefix. The strings are stored in extra leaf nodes. For the IPv4, an IP lookup is up to 32 memory accesses in the worst case. Therefore, this trie structure is not efficient when used in IP lookup.

8 8 1. Binary Trie (cont.)

9 9 2. Complete Binary Trie To decrease the memory access. Only one memory access is needed if use array to implement the complete trie. But, for an IPv4 routing table, we need 2 32 (4 GB) entries. It is infeasible to have such a large memory in a router.

10 10 2. Complete Binary Trie (cont.)

11 11 3. Indirect Lookup To reduce the size of the above complete trie structure. The routing table are transformed into a forwarding table which consisting of:  One segment array  Several next hop array (NHA).

12 12 Complete binary trie 2 6 entries IPNext Hop 00000000A 。。。。。。 A 00111111A Next HopOffset 0000ANull 0001ANull 0010ANull 0011ANull Indirect lookup 4 entries An Indirect Lookup Example PrefixNext Hop 00*A Routing Table (a entry)

13 13 3. Indirect Lookup (cont.) Number of entries: 256 → 48

14 14 Outline Introduction Previous IP Routing Lookup Scheme New IP Lookup Scheme Hardware Implementation Performance Analysis Conclusion

15 15 Data Structure of the Forwarding Table The Forwarding Table consists of four small tables:  Level one forwarding table  Level two forwarding table  Level three forwarding table  Level four forwarding table Next hop array Segment array

16 16 The Forwarding Table

17 17 How to Construct the Forwarding Table 1.Using Haung’s algorithm to constructs the segment array and NHA. 2.Transform the segment array to L1FT and L2FT. 3.Transform the NHA to L3FT and L4FT.

18 18 Segment Array Construction For a 32-bit IP address in IPv4, the size of the segment array is 2 16. Algorithm steps: 1.If the length of a route prefix larger than 16, then construct the corresponding NHA. 2.Otherwise, determine the range of the segment array to store the next hop information.

19 19 An Example (for one entry and 8-bit IP) Next HopOffset 0000ANull 0001ANull 0010ANull 0011ANull PrefixNext Hop 0/2A The length of prefix: 2 The size of segment array: 2 4. Let S and E denote the range that the next hop is A. Goal: S = 0000 and E = 0011 S = 0000 AND 1100 E = 0000 OR 0011

20 20

21 21 Next Hop Array Construction Algorithm steps: 1.For each prefixes which have the same segment, calculate maximum offset. 2.Similar to segment array, determine the range of the NHA to store the next hop information.

22 22

23 23 L1FT/L2FT construction To reduce the segment array size, we scan the segment array in a group of 2 4 entries. Thus, the L1FT has 2 12 entries. If all entries in a group have the same next hop, then it become one entry in the L1FT. Otherwise, we need construct L2FT and calculate compression bit map (CBM) for IP lookup operation.

24 24 L1FT/L2FT construction (cont.) Number of entries: 32 → 6

25 25

26 26 L3FT/L4FT construction For each segment with its longest length larger than four, its associated NHA is replaced by L3FT/L4FT, otherwise the NHA becomes L3FT directly. The algorithm is similar with previous one. Because the length of a NHA offset is varied, we need adjust the algorithm.

27 27 L3FT/L4FT construction (cont.) Number of entries: 32 → 5

28 28

29 29 IP Lookup Operation (An Example) BTW, Number of entries: 48 → 26

30 30 IP Lookup Operation (Flow Chart)

31 31

32 32 Hardware Implementation

33 33 Outline Introduction Previous IP Lookup Scheme New IP Lookup Scheme Performance Analysis Conclusion

34 34 Performance Analysis The Internet routing table at web site for the IPMA project is used to evaluate the forwarding table size. The proposed scheme was compared with these four lookup schemes:  DIR-24-8  DIR-21-3-8  SFT scheme  Huang’s scheme

35 35 Performance Analysis (cont.)

36 36 Conclusion The forwarding table of this proposed scheme is small enough to fit into SRAM. The scheme offers lookup speed of 100 million packets per second. (using current 10ns SRAM) When the routing table changes, the forwarding table will reconstruct from scratch.

37 37 THE END


Download ppt "1 A Fast IP Lookup Scheme for Longest-Matching Prefix Authors: Lih-Chyau Wuu, Shou-Yu Pin Reporter: Chen-Nien Tsai."

Similar presentations


Ads by Google