IP Address Lookup Using Segmented Hash Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current IP address lookup methods in routers face inefficiencies due to the need for longest prefix matching, exponential growth of forwarding tables, and high memory access overhead, particularly in handling varying prefix lengths and large IP address systems like IPv6.

Innovation Solution

An IP address lookup method and hardware architecture that uses separate hash functions for each prefix length, constructing parallel tables and employing exclusive OR operations to minimize collisions, allowing for efficient storage and retrieval of prefix-matched entries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If CIDR scheme is used to prevent IP address waste and reduce forwarding table size, then IP address utilization improves and table size growth is controlled, but longest prefix matching process is required which creates router bottlenecks

Engineering Contradiction:
ImproveIP address utilization efficiencyVSAvoidrouter lookup speed
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent segments the forwarding table into multiple hash tables, each dedicated to a specific prefix length (e.g., /8, /16, /24 networks). This segmentation allows the system to maintain the flexibility of CIDR while enabling direct hashing lookups for each segment, eliminating the need for sequential longest prefix matching and thus resolving the router bottleneck issue.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the lookup parameter from variable-length prefix matching to fixed-length hash-based matching. By organizing forwarding entries into separate hash tables according to prefix length and using corresponding hash functions, the system transforms the complex longest prefix matching problem into simpler, parallel hash table lookups that can be executed simultaneously.

Inventive Principle:
Principle #35Parameter changes

2Speed

If content addressable memory is used for direct IP address comparison, then lookup speed improves, but memory capacity to store prefixes is severely limited and cost is too high

Engineering Contradiction:
Improvelookup speedVSAvoidnumber of stored prefixes
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

Instead of using a single large CAM structure, the patent segments the forwarding information into multiple smaller hash tables organized by prefix length. This allows standard RAM to store significantly more prefixes while maintaining fast lookup performance through hash-based direct addressing in each segment.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent replaces the mechanical CAM comparison mechanism with a software-based hash function approach. By using hash functions to compute table indices and then performing comparisons only in the relevant hash table segments, the system achieves comparable speed to CAM while utilizing much larger standard memory resources.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Adaptability or versatility

If Trie structure is used to store forwarding table, then prefix relationships are well represented, but memory is wasted due to prefix-unassigned internal nodes and multiple memory accesses are required

Engineering Contradiction:
Improveprefix relationship representationVSAvoidmemory usage efficiency
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent segments the continuous Trie structure into discrete hash tables grouped by prefix length. This eliminates the wasted internal nodes of the Trie while preserving prefix relationship representation through the organized hash table structure. Each hash table contains only the actual forwarding entries for its specific prefix length, eliminating memory waste.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary organization of forwarding entries into prefix-length-based groups before the lookup operation. By pre-organizing data into separate hash tables according to prefix length, the system eliminates the need for multiple sequential memory accesses through the Trie structure, achieving single-access lookup performance.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If binary search combined with hashing is used for prefixes of same length, then lookup efficiency improves, but it cannot handle varying prefix lengths and longest prefix matching requirement

Engineering Contradiction:
Improvelookup efficiencyVSAvoidhandling of varying prefix lengths
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the forwarding table into multiple hash tables, each dedicated to a specific prefix length. This segmentation directly addresses the limitation of handling varying prefix lengths by providing a separate structure for each length, while maintaining high lookup efficiency through hash-based direct addressing in each segment.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates a universal lookup mechanism that handles all prefix lengths through a unified hash table array structure. By using an array of hash tables where each table handles a specific prefix length, the system achieves both efficiency (through hashing) and universality (through the array structure that accommodates all prefix lengths and enables longest prefix matching).

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS7418505B2IP address lookup using either a hashing table or multiple hash functions
Publication Date: 2008.08.26 EWHA UNIV IND COLLABORATION FOUND
  • US7418505B2 patent drawing
  • US7418505B2 patent drawing
  • US7418505B2 patent drawing

AI summary

The present invention relates to an IP address lookup method and hardware architecture. There is provided an IP address lookup method using a hashing table, the hashing table being constructed with an SRAM, the hashing table including main tables and sub-tables corresponding to prefix lengths of the IP address, entries being stored in the main tables and the sub-tables, the method comprising steps of: (a) performing a hashing process on an incoming IP address based on the prefix lengths of the IP address by using a hashing hardware unit, wherein the hashing hardware unit is constructed based on the prefix lengths of the IP address; (b) comparing prefixes, each of which is stored at a location in the main table pointed by a hashing value with the prefix of the IP address, searching entries of the main table having the prefix matched with the prefix of the IP address, and forwarding information on prefix-matched entries; (c) if there is no prefix-matched entry as a result of Step (b), searching entries of the sub-table having the prefix matched with the prefix of the IP address starting from a location in the sub-table pointed by a pointer of the main table, and forwarding information on prefix-matched entries; and (d) searching an entry having the longest-matched-prefix among the prefix-matched entries by using the information forwarded in Steps (b) and (c). Accordingly, it is possible to perform an IP address lookup process on all the prefixes in parallel by classifying prefixes based on the prefix lengths and constructing separate tables corresponding to the classified prefix lengths of the IP address. As a result, it is possible to easily apply a hashing process to the IP address and to reduce searching time.