Port Allocation in Distributed Network Address Translators
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current distributed network address translation (DNAT) systems face challenges in efficient and consistent port allocation, often requiring separate data structures for port management and flow state metadata, which can lead to synchronization issues and increased resource usage.
Innovation Solution
A partially-reversible hashing algorithm is employed to allocate substitute ports by mapping flow identifiers to non-negative integers, allowing state manager nodes to assign unused ports from their assigned sub-ranges, eliminating the need for separate port-specific data structures and synchronizing port allocation decisions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If separate data structures are used for port management and flow state metadata, then port allocation can be tracked independently, but synchronization issues and increased resource usage occur
Solution Approach 1:
The patent combines port allocation tracking with flow state metadata into a unified data structure. The flow state metadata records now include both the flow identification information and the allocated substitute port, eliminating the need for separate port management data structures and reducing synchronization complexity while maintaining allocation consistency
2Productivity
If multiple state manager nodes are used for distributed port allocation, then scalability is improved, but overlapping port sets and synchronization overhead increase
Solution Approach 1:
The patent segments the port allocation namespace by assigning each state manager node a unique identifier and using this to create distinct hash ranges for port allocation. This segmentation ensures that different nodes allocate ports from non-overlapping ranges, eliminating conflicts while maintaining distributed scalability
Solution Approach 2:
The patent introduces a hash function as an intermediary mechanism that maps flow identifiers to specific port ranges based on the state manager node's unique identifier. This intermediary ensures consistent and non-overlapping port allocation across distributed nodes without requiring direct synchronization between them
3Reliability
If a centralized port allocation mechanism is used, then port consistency is maintained, but single point of failure and performance bottlenecks occur
Solution Approach 1:
The patent segments the port allocation authority across multiple state manager nodes, with each node independently managing its own port range based on its unique identifier. This segmentation distributes the allocation load, eliminating the single point of failure and performance bottleneck inherent in centralized mechanisms while maintaining consistency through the hash-based allocation strategy
Data Source
AI summary
A node of a network address translator obtains a first packet. A particular port number to be used as a substitute port for a packet flow associated with the first packet is determined using at least a first intermediate hash result, a particular flow hash value range assigned to the node, and a lookup table. The first intermediate hash result is obtained from a flow tuple of the first packet, and the lookup table comprises an entry indicating a mapping between the particular port number and a second intermediate hash result. A second packet, in which the source port is the set to the substitute port number, is transmitted to a recipient indicated in the first packet.


