Network Address Translation Bitmap Conflict Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing Network Address Translation (NAT) processing methods suffer from poor creation performance due to the need for multiple conflict detections and frequent reading of the storage medium when a new five-tuple generates a conflict, leading to interface delays and inefficient data storage.
Innovation Solution
A NAT method that utilizes a pre-constructed bitmap to indicate the conflicting or non-conflicting state of five-tuples, allowing for direct determination of a non-conflicting target five-tuple, reducing the need for repeated storage medium reads and improving creation performance by using a CPU and/or hardware components like ASIC or FPGA in the NAT device.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the existing hash table method is used for conflict detection, then the NAT processing can be realized, but the creation performance deteriorates due to multiple detections and frequent storage medium reads
Solution Approach 1:
The patent segments the session table into two parts: a hash table for initial bucket selection and a bitmap for precise conflict detection. The hash table computes a bucket index from the five-tuple, while the bitmap within each bucket provides a compact representation of occupied five-tuples. This segmentation allows the system to first quickly locate a potential bucket using the hash table, then efficiently check for conflicts using the bitmap, reducing the need for repeated full hash table reads and improving creation performance while maintaining processing correctness.
2Manufacturing precision
If multiple conflict detections are performed, then the correct non-conflicting five-tuple can be found, but the interface delay increases due to repeated storage medium reads
Solution Approach 1:
The patent applies preliminary action by pre-computing and storing the bitmap structure that indicates the occupancy status of five-tuples in each hash bucket. Before performing conflict detection, the system has already prepared the bitmap data in the storage medium. When a new five-tuple needs to be inserted, the system can directly query the pre-prepared bitmap to determine conflicts without performing multiple sequential detections, thereby reducing creation time while maintaining detection accuracy.
Solution Approach 2:
The bitmap serves as an intermediary data structure between the hash table and the actual session data. Instead of directly querying the full session table multiple times for conflict detection, the system uses the bitmap as an intermediate layer that provides quick conflict status information. This intermediary mechanism reduces the complexity and time of conflict detection while ensuring accurate identification of non-conflicting five-tuples.
Data Source
AI summary
A NAT method, apparatus and device are provided. According to the method, a target IP address and its reference port are obtained from a NAT resource pool, the reference port being a port in a corresponding consecutive port range. A first five-tuple is generated based on the target IP address, the reference port and an original five-tuple of the packet, and a second five-tuple is obtained by masking first-class bits of the reference port of the first five-tuple. Based on a hash result of the second five-tuple, a target bit indicating a non-conflicting state is determined from a pre-constructed bitmap. The state indicated by the target bit is set to be a conflicting state, and a target five-tuple is generated based on the target bit. The target five-tuple and the original five-tuple are recorded in a session table, and the packet is NAT-processed based on the target five-tuple.


