TCP and 1448

Source: Internet
Author: User
Tags pack
TCP and 1448

1448 bytes is the actual carrying capacity of a single TCP packet under the actual scenario. In other words, in the actual scenario, the upper layer calls send (1000KB), the lower layer will be the 1000KB encapsulated into multiple TCP packets to send. A single TCP packet is sent 1448 bytes of data each time it is packaged.
Detailed TCP in the transmission scenario Wireshark screenshot as shown in Figure 1

Figure 1


Each TCP packet should theoretically be able to pack more data, but in real-world scenarios, why is TCP transmission using this 1448 as a packing unit?
This actual TCP single packet transmits 1448 bytes of data at the root of the "Ethernet Ethernet maximum data frame is 1518 bytes".

1500-byte MTU

The maximum data frame for Ethernet Ethernet is 1518 bytes. The frame head of the Ethernet frame 14 bytes and the frame tail CRC check 4 bytes (total 18 bytes), the rest of the upper layer protocol is the data domain is the largest only 1500 bytes left. This value we call it the MTU.

Let's take a look at the MTU defaults on Linux and check them out, as shown in Figure 2

Figure 2
This MTU value can be modified, but now most computer networks are hosted by Ethernet, so modifying this value has no practical significance.


MSS determines the single packet transmission of TCPMSS is the maximum amount of TCP packets that can be transmitted at a time. In order to achieve the best transmission performance, the TCP protocol when establishing the connection is usually to negotiate the MSS value of the two sides, this value TCP protocol in the implementation of the time is often replaced with the MTU value (need to subtract the IP packet header size 20Bytes and TCP data segment of the packet 20Bytes) so often MSS for 1460 (the MSS value in the SYN packet as shown in the red box in Figure 1). Both sides of the communication will determine the maximum MSS value for this connection based on the MSS value provided by both parties. MSS 1460 is computed by the 1500-20 (IP header) -20 (TCP header).
In the actual scenario, the TCP header will have a 12-byte option----timestamp.
In this way, the maximum amount of actual transmission for a single TCP packet is reduced to 1448 bytes. 1448=1500-20 (IP header)-32 (20-byte TCP header and 12-byte TCP option timestamp)

back to the question we had at the outset"Each TCP packet should theoretically be able to pack more data, but in real-world scenarios, why is TCP transport using this 1448 as a packing unit?" ”
In theory, a single TCP packet can package more than 1448 bytes of data, and now in order to accommodate the MTU, as long as the TCP is running on Ethernet, the system will default to the maximum of 1448 bytes to package TCP.
What would happen if we were packing with a larger amount of data?
The answer is to reduce transmission efficiency.
Large packets exceeding the MTU instead reduce efficiency for the following reasons:
The IP layer is very concerned about the MTU, because the IP layer determines whether or not to fragment the data passed down from the upper level based on the MTU.   Just like a transport line carrying capacity is limited, encounter big things to transport, can only be big things apart into parts, separate transport, arrived at the destination must also be able to assemble again. When two remote PC interconnection, their data need to pass through a lot of routers and a variety of network media in order to reach the end, the network of different media MTU are not the same, like a long period of water pipes, by different thickness of the water pipe composition (MTU different:)   The maximum water flow through this pipe is determined by the finest water pipes in the middle. For the upper level protocol of the network layer (we take the TCP/IP protocol family as an example) they do not care about the thickness of the water pipe they think this is the network layer of things. The Network layer IP protocol checks the size of each packet from the upper layer protocol and determines whether to make "shard" processing depending on the size of the native MTU. The biggest disadvantage of the Shard is to reduce the transmission performance, originally can be done, divided into several times, so in the network layer layer (is the transport layer) of the implementation of this will often be noted.
This is the Ethernet, TCP does not send large packets, instead of sending 1448 packets of reason. As long as this value TCP can make the most efficient use of the link.

Reprint Address: http://enyuxuexi.blog.chinaunix.net/uid-29075379-id-3920264.html

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.