Analysis of Transport Layer UDP protocol

Source: Internet
Author: User

The network architecture is a complex structure. Complex work can be completed only when multiple protocols are used together. In the transport layer, we mainly introduce the content related to TCP and UDP. Although there is always interaction between the two protocols, they are essentially irreplaceable and clearly defined.

Transport Layer Protocol TCP and UDP

Each service provided through the network has an application layer protocol, which is implemented in the server and client software. In addition to the application layer protocol, all common Internet services use IP addresses to route messages to the source and target hosts.

The IP layer specifies the group structure, address, and route selection, but does not specify the transmission group method. The Transport Layer Protocol specifies how messages are transmitted between hosts. The two most common transport layer protocols are transport control protocol TCP) and User Datagram Protocol UDP ). The IP address uses these transmission protocols to enable the host to communicate and transmit data. IP is the basic protocol of the Internet, and all other protocols depend on it. The Transport Layer Protocol (TCP and UDP) runs on the IP, while the application layer protocols (such as HTTP and FTP) run on the TCP or UDP protocol. The IP address is the local network protocol of the Internet.

1. Use TCP

When the application needs to confirm that the message has been received, it uses TCP. This is similar to sending a registered email via the postal system. The recipient must sign the email to confirm that the email has been received.

TCP divides messages into small segments, which are called data segments. The data segment is numbered sequentially and passed to the IP address for grouping. The number of data segments that a TCP trace sends from a specific application to a specific host. It also sends a confirmation message to ensure that the Group has received the message. If the sender fails to receive confirmation within the specified time, it will deem that the data segment has been lost and re-transmits them. Only retransmission of the lost message, rather than the entire message.

On the receiving host, TCP is responsible for reorganizing the message data segments and passing them to the application.

FTP and HTTP use TCP to ensure data transmission. The user uses the FTP client software to send a file to the FTP server. The client software uses TCP to ensure transmission.

2. Use UDP protocol

In some cases, the TCP validation protocol is not required, and the protocol will reduce the transmission speed of information. In these cases, UDP may be a more suitable transmission protocol.

UDP is a best-effort transmission system. You do not need to confirm that the data has been received. This is similar to sending a mail via the postal system. Although a letter cannot be guaranteed, it is very likely to be received.

UDP is the first choice for streaming audio, video stream, and IP voice VoIP applications. The validation mechanism will reduce transmission speeds and there is no need for retransmission in such cases.

An application that uses UDP protocol is Internet broadcast, which uses stream audio technology. If a message is lost during network transmission, it will not be re-transmitted. When a small number of groups are lost, the audience will hear slight interruptions. If TCP is used, re-transmission will be lost to the Group, which will suspend the original transmission, resulting in more obvious interruption.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.