Some views on the TCP/IP protocol (7): Transport Layer

Source: Internet
Author: User
Tags ftp protocol

These days because of the laboratory off the net, so has been unable to send essays, but good habits still have to insist.

Today, let's talk about an important layer-the transport layer. The Protocol of Transport layer is mainly divided into TCP protocol and UDP protocol. The former is referred to as Transmission Control Protocol, which is packet transport. Today, we will talk about the Transport layer overview, then the TCP protocol and the UDP protocol are described in detail.

We know that if the packet is transmitted at the IP layer, the reliability of its transmission is not guaranteed, which will result in the discard of important data. This is obviously not allowed. Therefore, the transmission layer can only rely on the TCP protocol to ensure the reliability of data transmission, which is one of the main characteristics of TCP, that is, to ensure that the data complete to the receiving party. Why do you say that? Because TCP can provide error checking and connection transmission, packet retransmission mechanism. Because of this feature, the rate of transmission is much slower than UDP because UDP does not guarantee complete data arrival, but it can increase the rate of transmission. So everyone will think, it must be a packet error-free transmission good, then what is the UDP ah? In fact, the real-time nature of packet transmission is more important than accuracy. For example, you call, even if there are a few words inaudible, but the general content is to know, if you repeat the transmission of these sounds, but will listen to the confusion, in addition to our commonly used QQ chat, is based on UDP transmission.

The UDP protocol has two characteristics, 1 is that it does not guarantee the full arrival of the data, the packet is likely to be lost in the transmission process, 2 is that it does not guarantee that the data will arrive sequentially, may pass the packet arrived.

So what is TCP-based and what is UDP based on the upper layer of the application protocol? Briefly summarized, TCP-based including FTP protocol, HTTP protocol, e-mail protocol, UDP-based including TFTP protocol.

TCP and UDP packets are embedded in the IP packet transmission, the TCP packet header is 20 bytes, UDP is slightly simple, 8 bytes, the specific format is as follows:

IP header TCP Header TCP Data
IP header UDP header UDP data

Some views on the TCP/IP protocol (7): Transport Layer

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.