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 does the UDP agreement mean?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces the meaning of the UDP agreement, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

1. Introduction

UDP (UserDatagramProtocol) is a simple message-oriented transport layer protocol. Although UDP provides integrity verification of headers and payloads (through checksums), it does not guarantee message delivery to the upper layer protocols, and the UDP layer does not retain the state of UDP messages after being sent. Therefore, UDP is sometimes referred to as an unreliable Datagram protocol. If transport reliability is required, it must be implemented in the user application.

UDP uses a simple connectionless communication model with a minimal protocol mechanism. UDP provides a checksum for data integrity and port numbers for addressing different functions at the source and destination of the Datagram. It does not have a handshake conversation, thus exposing the user's program to any unreliable aspect of the underlying network. If error correction is required at the network interface level, the application can use the Transmission Control Protocol (TCP) designed for this purpose.

To sum up:

UDP is a simple and unreliable protocol based on IP.

The advantages of UDP: simple, lightweight.

The disadvantage of UDP: no flow control, no reply confirmation mechanism, can not solve the problems of packet loss, retransmission and out-of-order.

It should be noted here that not all application layers that use UDP protocol are unreliable. Applications can achieve reliable data transmission by themselves. By adding confirmation and retransmission mechanisms, the most important feature of using UDP protocol is its high speed.

2. UDP protocol

UDP is a simple protocol based on IP. It is recommended to take a look at the relevant contents of the IP protocol "detailed explanation of IP Protocol".

The number of source and destination ports can theoretically be as many as 2 ^ 16. Because its length is 16 bit. See the next section for details of the port.

Length occupies 2 bytes and identifies the length of the UDP header, including header length and data length. Can be as long as 65535 bytes. But in general, when the network is transmitting, it can not transmit such a long protocol at a time (involving the problem of MTU), so it has to slice the data.

Checksum: checksum, including UDP headers and data sections. This is an optional option, and not all systems authenticate and data UDP packets (as opposed to TCP protocols), but the standard in RFC requires that the sender calculate the checksum.

UDP verifies and overwrites UDP protocol headers and data, which is different from IP checksum. IP protocol checksum only covers IP headers and does not cover all data. Both UDP and TCP contain a pseudo header, which is set to calculate the checksum.

3. Port

The port number is a 16-bit non-negative integer with a range of 0-65535, which is divided into three different port number segments, which are assigned by the Internet assigned numbers Authority (IANA)

Known / standard port number, which ranges from 0 to 1023. On Unix operating systems, using one of these ports requires superuser privileges

Register the port number, the range is 1024-49151. Is the registration port for the IANA registration service.

Private port number, ranging from 49152 to 6553. It is not officially designated for any particular service and can be used for any purpose. These ports can also be used as temporary ports, and software running on the host can use these ports to dynamically create communication endpoints as needed.

The function of the port is simply to distinguish between different applications. When the computer receives a Datagram, it will send the data to different applications according to the different ports. So it is mentioned above that the Internet assigned numbers Authority (IANA) allocation.

You can check the details of the distribution on the following website.

Https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml

Here, take port 80 as an example. Port 80 is open for HTTP (HyperTextTransport Protocol), the hypertext transfer protocol, which is the most frequently used protocol for surfing the Internet, and is mainly used for WWW (WorldWide Web), the protocol for transmitting information on the World wide Web.

How to protect against UDP flood attacks?

Most operating systems limit the response rate of ICMP packets, in part to interrupt DDoS attacks that require ICMP responses. One disadvantage of this protection is that legitimate packets may also be filtered during the attack. If the UDP flood is large enough to saturate the state table of the target server's firewall, any protection that occurs at the server level will not be enough because the bottleneck will occur upstream of the target device.

Thank you for reading this article carefully. I hope the article "what is the meaning of UDP Agreement" shared by the editor will be helpful to everyone? at the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

Internet Technology

Wechat

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

12
Report