The UDP protocol is also an unreliable transport protocol compared to TCP. So what is the occasion to use the UDP protocol:
1. Efficient and reliable environment
2. Because the UDP overhead is small (1) does not need three handshake 2) the transmission process does not need to confirm 3), it is appropriate to communicate in a light-weight environment, such as TFTP, SNMP, DNS and DHCP protocol
3. For real-time requirements, such as phone calls, you can not hear a few words, but you can't bear to repeat to hear a lot of words
4. Multicast information or in the case of mostly short information
5. Application Scenario Center heavy performance over heavy integrity and security
The format of the UDP packet includes the header and Data section, where the header fields are as follows:
Source port number |
Destination port number |
Total length |
Checksum |
Where the port number indicates which application the packet arrives at, or which application is passed down to the next layer, the total length refers to the length of the entire UDP packet, not the length of the UDP header, and the UDP header length is typically 8 bytes. The checksum is an optional option for the UDP protocol and is generally not required.
In general, the UDP protocol has the following characteristics:
1. No connection, no connection is necessary before data transfer
2. Maximum possible delivery, i.e. no guarantee of reliable transmission
3. For message transmission, the transmission is UDP packet
4. No congestion control
5. Support for a pair of one or one-to-many, many-to-one and many-to-many transmissions
6.UDP header overhead is small, only 8 bytes
7. UDP-based application layer protocol including SNMP,TFTP,DNS and DHCP
Some views on TCP/IP protocol (a): UDP protocol