System and method for traversing NAT based on port prediction and synchronization procedure
Patent Information
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- CHUNGHWA TELECOM CO LTD
- Filing Date
- 2025-06-18
- Publication Date
- 2026-08-01
Smart Images

Figure TWG2TB001904008_001 
Figure TWG2TB001904008_002 
Figure TWG2TB001904008_003
Abstract
Claims
1. A system for traversing NAT based on port prediction and synchronization procedures, comprising: Call terminal device; The first NAT (Network Address Translator) device; server; Second NAT device; The system includes a calling device and a called device, wherein the calling device is communicatively connected to the first NAT device, the server is communicatively connected to the calling device and the first NAT device, the called device is communicatively connected to the second NAT device, the server is communicatively connected to the called device and the second NAT device, wherein the calling device performs a port prediction procedure via User Datagram Protocol (UDP) and the first NAT device to predict a first predicted port; the called device performs the port prediction procedure via UDP and the second NAT device to predict a second predicted port; the server performs a synchronization procedure corresponding to the calling device and the called device via Transmission Control Protocol (TCP) at a synchronization time point, wherein the synchronization procedure corresponds to the first predicted port and the second predicted port, wherein the first NAT device corresponds to a first NAT IP, and the second NAT device corresponds to a second NAT IP, wherein the synchronization procedure includes: the calling device transmitting a synchronization packet to the server via the TCP, wherein the synchronization packet includes the first NAT IP, the first predicted port, the second NAT IP, and the second predicted port; The server transmits the synchronization packet to the calling device via the communication control protocol at the synchronization time point, wherein the synchronization packet includes the second NAT IP and the second predicted port; The server transmits the synchronization packet to the called device via the communication control protocol at the synchronization time point, wherein the synchronization packet includes the first NAT IP and the first predicted port; the calling device and the called device execute a NAT traversal procedure corresponding to the first NAT device and the second NAT device, wherein the NAT traversal procedure corresponds to the first predicted port and the second predicted port.
2. The system as described in claim 1, wherein the calling device transmits a first registration packet to the server via the communication control protocol; the server transmits a first registration success packet to the calling device via the communication control protocol; the called device transmits a second registration packet to the server via the communication control protocol; and the server transmits a second registration success packet to the called device via the communication control protocol.
3. The system as described in claim 1, wherein the caller device corresponds to a caller IP, the server corresponds to a server IP and a server port, wherein the port prediction procedure includes: The calling device transmits a port prediction packet to the server via the User Data Packet Protocol (UDP), wherein the port prediction packet includes a source IP, a source port, the server IP, and the server port, wherein the source IP is the calling device IP; the first NAT device configures the source port to a configured source port and modifies the source IP to the first NAT IP to obtain the updated port prediction packet; The first NAT device transmits the updated port prediction packet to the server via the User Packet Protocol. And after the server receives the updated port prediction packet, the server transmits a reply packet to the calling device via the User Data Packet Protocol (UDP), wherein the reply packet includes the configured source port and the first NAT IP.
4. The system as claimed in claim 1, wherein the Port prediction procedure comprises: After the calling device predicts the first predicted port using the configured source port, the calling device transmits an invitation packet to the server via the communication control protocol, wherein the invitation packet includes the first predicted port and the first NAT IP; and the server transmits the invitation packet to the called device via the communication control protocol.
5. The system as claimed in claim 1, wherein the Port prediction procedure comprises: After the called device predicts the second predicted port using the configured destination port, the called device sends an invitation packet to the server via the communication control protocol, wherein the invitation packet includes the second predicted port and the second NAT IP; and the server sends the invitation packet to the calling device via the communication control protocol.
6. The system as described in claim 1, wherein the calling device corresponds to a calling IP address and the called device corresponds to a called IP address, wherein the NAT traversal procedure includes: The calling device transmits a first NAT traversal packet to the first NAT device via the User Packet Protocol (IP). The first NAT traversal packet includes a source IP, a source port, a destination IP, and a destination port. The source IP is the calling device's IP, the destination IP is the second NAT IP, and the destination port is the second predicted port. After receiving the first NAT traversal packet, the first NAT device modifies the source IP to the first NAT IP and the source port to the first predicted port to obtain an updated first NAT traversal packet. The first NAT device transmits the updated first NAT traversal packet to the second NAT device via the User Packet Protocol (IPP). After the second NAT device receives the updated first NAT traversal packet, the second NAT device modifies the destination IP to the called party IP to obtain the updated first NAT traversal packet again; The second NAT device transmits the updated first NAT traversal packet to the called device via the User Data Packet Protocol (UDP).
7. The system as described in claim 1, wherein the called end device corresponds to the called end IP, the calling end device corresponds to the calling end IP, and wherein the NAT traversal procedure includes: The called device transmits a second NAT traversal packet to the second NAT device via the User Data Packet Protocol (UDP), wherein the second NAT traversal packet includes a source IP, a source port, a destination IP, and a destination port, wherein the source IP is the called device IP, the destination IP is the first NAT IP, and the destination port is the first predicted port. After the second NAT device receives the second NAT traversal packet, the second NAT device modifies the source IP to the second NAT IP and the source port to the second predicted port to obtain the updated second NAT traversal packet; The second NAT device transmits the updated second NAT traversal packet to the first NAT device via the User Packet Protocol (IPP). After the first NAT device receives the updated second NAT traversal packet, the first NAT device modifies the destination IP to the calling IP to obtain the updated second NAT traversal packet again; The first NAT device transmits the updated second NAT traversal packet to the calling device via the User Packet Protocol.
8. A method for traversing NAT based on port prediction and synchronization procedures, suitable for a system including a calling device, a first NAT (Network Address Translator) device, a server, a second NAT device, and a called device, wherein the method includes the following steps: The calling device performs a port prediction procedure via User Datagram Protocol (UDP) and the first NAT device to predict a first predicted port; the called device performs the port prediction procedure via UDP and the second NAT device to predict a second predicted port; the server performs a synchronization procedure via Transmission Control Protocol (TCP) at a synchronization point, corresponding to the calling device and the called device, wherein the synchronization procedure corresponds to the first predicted port and the second predicted port, wherein the first NAT device corresponds to a first NAT IP, and the second NAT device corresponds to a second NAT IP, wherein the synchronization procedure includes: the calling device transmitting a synchronization packet to the server via TCP, wherein the synchronization packet includes the first NAT IP, the first predicted port, the second NAT IP, and the second predicted port; the server transmitting the synchronization packet to the calling device via TCP at a synchronization point, wherein the synchronization packet includes the second NAT IP and the second predicted port; and the server transmitting the synchronization packet to the called device via TCP at a synchronization point, wherein the synchronization packet includes the first NAT IP and the second predicted port. IP and the first predicted port; and the calling device and the called device execute a NAT traversal procedure corresponding to the first NAT device and the second NAT device, wherein the NAT traversal procedure corresponds to the first predicted port and the second predicted port.