Skip to Main Content
Fast IP address lookup in the Internet routers is essential to achieve packet forwarding in wire-speed. The longest prefix matching for the IP address lookup is more complex than exact matching because of its dual dimensions, length and value. By thoroughly studying the current proposals for the IP address lookup problem, we find out that binary search could be a low-cost solution while providing high performance. Most of the existing binary search algorithms based on trie have simple data structures which can be easily implemented, but they have empty internal nodes. Binary search algorithms based on prefix values do not have empty nodes, but they either construct unbalanced trees or create extra nodes. In this paper, a new IP address lookup algorithm using a priority trie is proposed. The proposed algorithm is based on the trie structure, but empty internal nodes are replaced by priority prefixes. The longest prefix matching in the proposed algorithm is more efficiently performed since search can be immediately finished when input is matched to a priority prefix. The performance evaluation results show that the proposed priority trie has very good performance in terms of the memory requirement, the lookup speed, and the scalability.