Computer Network (Part 14) --- What is the impact of the maximum transmission unit MTU on IP / TCP / UDP protocols?

Maximum Transmission Unit - MTU is equivalent to the size of the package when sending express delivery. This limitation is the limitation caused by the physical layer corresponding to different data links; if a data packet is routed from the Ethernet to the dial-up link, if the length of the data packet is greater than the MTU of the dial-up link, the data packet needs to be fragmented; the MTU of different data link layer standards is different.

♛ Effect of MTU on IP protocol

  Due to the limitation of the data link layer on the MTU, larger IP data packets need to be subcontracted:

Divide larger IP packets into multiple small packets, and label each small packet;

The 16-bit identification id of the IP protocol header of each small packet is the same; the second position in the 3-bit flag field is 0, indicating that fragmentation is allowed; the third bit is used to indicate the end mark (1 means that the current is the last small packet, 0 is not);

When arriving at the opposite end, reassemble these small packets in order, assemble them together and return them to the transport layer;

Once any of these small packets are lost, the reassembly at the receiving end will fail, but the IP layer will not be responsible for retransmitting the data.


♛♛ Effect of MTU on UDP protocol

Once the data carried by UDP exceeds a certain amount, it will be divided into multiple IP data segments in the network;

The loss of any one of the multiple IP data segments will cause the network layer reassembly failure at the receiving end, which means that if the UDP datagram is fragmented at the network layer, the probability of the entire data being lost is greatly increased.


♛♛♛ Effect of MTU on TCP protocol

The datagram of TCP is not wirelessly large, and is also limited by MTU; the maximum message length of a single datagram of TCP is called MSS;

When TCP establishes a connection, both parties will conduct MSS negotiation; ideally, the value of MSS is exactly the maximum length that will not be fragmented in IP, and this length is still limited by the MTU of the data link layer;

When both parties send the handshake signal SYN, they will write the MSS value they can support in the TCP header, and then both parties will choose the smaller one as the final MSS after learning the corresponding MSS value (the value is in the 40-byte variable length option of the TCP header).

Guess you like

Origin blog.csdn.net/Onion_521257/article/details/129698072