VXLAN VTEP NAT Traversal via Deterministic Port Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
When VTEPs communicate through a NAT device, packets are often blocked or discarded due to mismatched port numbers, preventing successful traversal across the NAT device.
Innovation Solution
The method involves determining a destination port number based on the destination IP address and using a preset port number for the source port, ensuring that the NAT device can match the port numbers in its entries, allowing packets to be transmitted between VTEPs in public and private networks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If the source port number is randomly obtained or obtained by using a hash algorithm, then the packet can be sent through the VXLAN encapsulation mechanism, but the packet cannot traverse the NAT device due to port number mismatch
Solution Approach 1:
The patent changes the parameter selection strategy for port numbers. Instead of using random or hash-based source port numbers, the system determines the source port number based on the destination IP address and NAT device entries. This parameter change ensures that the port number combination matches what the NAT device expects, allowing packets to successfully traverse through the NAT device while maintaining VXLAN encapsulation functionality.
2Device complexity
If the destination port number is fixed at 4789, then the VXLAN encapsulation can be standardized, but the NAT device blocks or discards packets due to inability to match port numbers in NAT entries
Solution Approach 1:
The patent introduces dynamics into the port number selection process. While the destination port remains fixed at 4789 for VXLAN standardization, the source port number becomes dynamic and is determined based on the destination IP address and NAT device entries. This dynamic adjustment allows the system to maintain standardization benefits while adapting to specific NAT device configurations to ensure successful packet transmission.
3Productivity
If the NAT device translates source IP address and source port number, then the packet can be routed in the public network, but the translation relationship cannot be established for packets with non-matching port numbers
Solution Approach 1:
The patent applies preliminary action by determining the appropriate source port number before packet transmission based on the destination IP address and NAT device entries. This pre-determination ensures that when the packet reaches the NAT device, the source port number already matches what is needed for successful NAT entry matching and translation, enabling both public network routing and reliable NAT translation.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
This application provides a packet transmission method and apparatus, to resolve a problem that a packet cannot traverse a NAT device when VTEPs communicate with each other through the NAT device. The method is applied to a VXLAN, the VXLAN includes a first VTEP, a second VTEP, and a NAT device, the first VTEP communicates with the second VTEP through the NAT device, the first VTEP is located in a public network, and the second VTEP is located in a private network. The method includes: performing, by the first VTEP, VXLAN encapsulation on a first packet, to obtain a second packet; sending, by the first VTEP, the second packet to the second VTEP through the NAT device; and performing, by the second VTEP, VXLAN decapsulation on the received second packet, to obtain the first packet. The first packet is a packet to be sent by the first VTEP, a destination port number of the second packet is obtained based on a destination IP address of the second packet, and a source port number of the second packet is a preset port number.