Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the characteristics of UDP

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the characteristics of UDP, the article is very detailed, has a certain reference value, interested friends must read it!

Characteristics of UDP

The UDP protocol is so simple that it adds little function to the IP layer. Let's take a look at some features of the UDP protocol:

UDP is connectionless and does its best to deliver. There is no advance notice before sending data, it just sends it, it doesn't matter whether you can accept it or not.

UDP is message-oriented, and what the application gives it, it encapsulates a header before the content and forwards it to the following IP layer. No matter whether the content is more or less, I will send whatever you give me. For its mindless operation, then the application process needs to choose the right size. In order to avoid excessive data packets, in the IP layer is split, marketing efficiency.

UDP supports one-to-one, one-to-many and many-to-many communications, and UDP seems to be doing a good job of supporting only point-to-point communications in TCP.

The UDP header is simple and is fixed 8 bytes.

Based on the above characteristics of UDP, some of its application scenarios can be guessed:

It is suitable for better network environment and is not sensitive to packet loss.

Scenarios that require broadcasting, such as the DHCP protocol, need to use broadcasting, so it uses the UDP protocol.

For scenarios with high transmission efficiency and high speed, such as live video streaming, it doesn't matter if a few frames are lost in live video broadcasting.

UDP header format

As mentioned above, the header of UDP is fixed at 8 bytes. Compared to TCP, its first overhead is very small.

Source port number, accounting for 2 bytes

Destination port number, accounting for 2 bytes

Head length, accounting for 2 bytes

Checksum, accounting for 2 bytes

If the destination host receives a UDP packet with an illegal port number, it discards the packet and sends the ICMP error message "Port unreachable" to the source host. The traceroute command uses this feature to obtain the path information between the two hosts.

UDP has a special way of checking. When checking, it needs to add a 12-byte pseudo-header to the header at 00:00. The false header is used only for verification and is discarded after the verification is completed. In addition, unlike the IP Datagram, which only verifies the header, it verifies the header and the data part.

The above is all the content of this article "what are the characteristics of UDP?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report