TCP/IP detailed-Ethernet frame structure IP layer The MSS size in the MTU network

Source: Internet
Author: User
For Gigabit Ethernet, 1000Mbit data can be transmitted per second, i.e. 125000000b/s, with a fixed cost per Ethernet frame: Preamble and Frame start preamble (8B), MAC (12B), type (2B), payload (46b~ 1500B), CRC (4B), Gap (12B), so the smallest Ethernet frame is 84B, can send 1488000 frames per second. The largest Ethernet frame is 1538B and can send 81274 frames per second. Next, TCP payload: A TCP segment contains IP header (20B) and TCP header (20B), and timestamp option (12B), so TCP's maximum throughput is 81274* (1500-51) =         117mb/s. The above explanation is correct:
structurePackets on an Ethernet link are called Ethernet Frame。 The starting part of the Ethernet frame consists of a preamble and a frame start character. followed by an Ethernet header that describes the destination address and the source address with a MAC address. The middle of the frame is the packet (for example, the IP protocol) that contains the other protocol headers for the frame payload. The Ethernet frame ends with a 32-bit redundancy check code. It is used to verify that data transfer is corrupted.

The binary packet from the line is called a frame. Frames you see from a physical line, in addition to other information, see the preamble and the frame-start character. Any physical hardware will need this information.

The table below shows the full frame format for the MTU transfer in 1500 eight-bit groups (some gigabit Ethernet or even higher-speed Ethernet supports larger frames, called Mega frames). [Note 2] a eight-bit tuple is a eight-bit data (that is, a byte of a modern computer).


preamble and frame-start characters See: Syncword

A frame begins with a 7-byte preamble and a 1-byte frame-start character. Before Fast Ethernet, the bit pattern in this part of the frame on the line is 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101011. Because the least bit of bits are transmitted first (that is, the low first transmission), the corresponding 16 is represented as 0x55 0x55 0x55 0x55 0x55 0x55 0x55.

The 10/100m network card (MII PHY) transmits 4 bits (one half word) at a time. So the leader becomes the 7 group 0x5+0x5, and the frame start character becomes 0x5+0xd. The 1000M network card (GMII) transmits 8 bits at a time, while the 10GBIT/S (XGMII) PHY chip transmits 32 bits at a time. Note When described in octet, transmit 7 01010101 and then transfer 11010101. Because the low 4 bits of 8-bit data are sent first, 0101 of the frame-start character is sent first, and then 1101 is sent. Header

The header contains the MAC address of the source and destination addresses, the Ethernet Type field, and an optional IEEE 802.1Q VLAN tag that describes the VLAN membership and transport priority. Frame Check Code

The frame check code is a 32-bit cyclic redundancy check code to verify that the frame data is corrupted. Frame Spacing

When a frame is sent, the sender needs to send at least 12 octet free line status codes before the next frame is sent.

PS: In fact, it can be so simple to understand, when the Ethernet transmission frame, one frame data maximum is 1538, goes out the Ethernet frame Head frame tail These accompanying data, the Ethernet frame maximum load is 1500 bytes, then these 1500 bytes are from the upper layer protocol total packet, in the network layer IP header has 20 bytes, That is, in the IP layer can accept the upper layer protocol the most bytes is 1480, in the transport layer, if the use of TCP, remove TCP head, there are 12 bytes of TCP timestamp, at the transport layer can accept the upper layer protocol is the largest data is 1480-20--12=1448 byte), These 1448 bytes are the maximum load data of the application tier, so that if you use TCP as the Transport Layer protocol to transmit data, the application tier does not exceed 1448 bytes per packet, or it can cause subcontracting operations. TCP's protocol data unit is called a segment.

Reference http://blog.csdn.net/yusiguyuan/article/details/21439903

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.