High Speed and Reliable Protocol Based on UDP
I – Introduction
In the field of P2P communication, due to the widespread application of Network Address Translation (NAT), network devices located in different NATs cannot directly connect with each other. Therefore, a series of NAT traversal technologies have been developed.
Among them, the most reliable and widely used P2P traversal NAT method is to use UDP packets for traversal. Since most NAT firewalls are more lenient for UDP packet transmission management, the connectivity of NAT traversal using UDP packets is much greater than other methods.
After the successful NAT traversal, the packets of various types of transport protocols are packaged as UDP packets for transmission, increasing the transmission reliability of the UDP packets.
II – Background
Due to the increasing popularity of high-definition surveillance equipment requiring large bandwidth, NAT traversal technology is indispensable when the equipment is under NAT.
Therefore, we need to have a reliable transmission protocol so that packets are sent in UDP, and the speed must meet the needs of high-quality image transmission.
When using UDP to transmit packets, high speed and reliable protocol based on UDP maintains the high-speed transmission rate of UDP and ensures the correctness and reliability of the packet contents during transmission.
The forty-first to fifty-sixth bits are the packet sequence numbers, and each packet has its own serial number. When the packet is delayed or lost, it can be reordered or re-sent to ensure the reliability of the data.
III – How High Speed and Reliable Protocol Base on UDP Works
In addition to the original UDP header, there is a self-defined data structure to achieve high-speed transmission and ensure the reliability of data. This is illustrated in Fig.1.
The first sixteen bits are the source sequence number, which allows both parties to discern whether the stream is from the same session. The seventeenth to twenty-fourth bits are packet types. This defines ten types of packets, allowing both parties to identify and process different types of packets. This is illustrated in Fig.2.
The twenty-fifth to the fortieth bits are the packet length, and the length information of the packet of both parties is provided for confirmation.
IV – Conclusion
When using UDP to transmit data, this communication protocol can ensure the transmission speed and reliability of the data. In the actual application of the product, the transmission bandwidth can reach 80Mbps. Even when the network is severely blocked and delayed, the transmission bandwidth can reach speeds above 30Mbps.