Network Packet Size and transmission speed

Source: Internet
Author: User

The network packet size and transmission speed are useful in UDP and almost useless in TCP. For example, if MTU in Ethernet is 1500 and valid data of a packet sent in UDP is 10 bytes, a packet must have 20 bytes of IP header, for 8-byte UDP headers, the valid data rate sent over the network is 10/(20 + 8 + 10). If-20-8 bytes of valid data are sent, then the valid data rate sent over the network is (1500-20-8)/1500, which means the efficiency is high, however, if the size of the data sent is large and 1478 bytes (valid data + IP header + UDP header> MTU), it is divided into multiple packages, and the efficiency will change. In TCP, The send function is run to only store data in the sending cache. When you execute multiple send functions, the data may be stored in the sending cache, the system will automatically take a certain amount of data when actually sending: when the data in the sending cache is small and MSS (MSS = MTU-TCP header-IP header), take out all the data to form an IP package, when it is large or MSS, the MSS data is taken out to form an IP package. Generally, the MTU value of the device interface is 1500, which refers to the packet length at the IP layer. When the packet is carried on an Ethernet frame, 18 bytes of the Ethernet frame are added, the length of an Ethernet frame is 1518. When the Ethernet frame is attached with VLAN information, the length of the layer-2 packet will be changed to 1522 bytes. & Nbsp; <br> & nbsp; when we ping & nbsp; 1468, 1468 is the net load on the IP layer. With 20 bytes of IP packet header and 8 bytes of ICMP packet header, the entire IP packet length is 1496 bytes, with the 18-byte Ethernet frame encapsulation and 4-byte VLAN information, the length of the entire Ethernet frame is 1518 bytes.

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.