IP lookup is one of the most important issues in designing today routers. Also, it plays an important role in determining the router performance. Based on CIDR, extracting the next hop of each incoming packet, requires performing a Longest Prefix Matching (LPM) algorithm with the input packet address. Using hash functions is one of the important approaches in designing new LPM algorithms. Due to their constant search time, hash functions seem ideal for solving LPM problem. However, hash-based methods are often facing two challenges:(1) variable prefix lengths and (2) associated collisions of hash functions. The main objective of this paper is designing a collision-free hash table to be used for the LPM problem. To achieve this goal, one of the theorems of number theory known as Chinese Reminder Theorem (CRT) has been applied in the proposed algorithm. Based on Chinese reminder theorem, a large integer number can be mapped to smaller integer numbers. Each of these smaller numbers is congruent to the original number modulo p (for some predetermined p). In fact, the congruence relation between the original number and its reminders can be considered as applying multiple hash functions on the original number. By applying multiple hash functions and merging their results, the proposed scheme eliminates the inherent collision of the hash functions. According to the CRT theorem, the product of modules must be as large as the original number. Thus, the selected modules are much smaller than the original number. For example, using IPv4 addresses with two hash functions, items are mapped from domain of 2 32 to the range of O(2 16 ). Thus, the required space to store items can be significantly reduced. Selecting more modules, results in more reduced space.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.