MTU
The MTU means Maximum Transmission Unit refers to the maximum number of bytes in a single packet in a network. It specifies the maximum amount of data that the sender can include in a packet. If the MTU exceeds the support range of the receiver or transit node, the packet may be split or lost, thus increasing the burden on the network. On the contrary, if the MTU is set too small, the efficiency of data transmission will be affected.
Importance of MTU
In the network, information is sent in the form of packets, and a good packet size can help to improve transmission efficiency. Larger packets can carry more valid data, which makes communication more efficient. However, oversized packets also lead to higher transmission delays and error probabilities, and increased retransmission costs. Smaller packets reduce the amount of individual packets transmitted, but more packets need to be processed, which requires higher processing power from the device. Therefore, by adjusting the MTU, the packet size of the network can be optimized and the forwarding efficiency can be improved.
Why is Ethernet MTU Usually Set to 1500 Bytes?
According to RFC, the default MTU of Ethernet is 1500 bytes. Early Ethernet operated in shared-link mode, and frame lengths were required to be between 64 bytes and 1518 bytes to support carrier-sniffing multiple-access and conflict-detection mechanisms. the 64-byte minimum ensured that the most extreme conflicts were detected, while the 1518-byte maximum prevented long frames from blocking other services. Therefore, Ethernet frames are kept within this range.
The bytes number of maximum size of Ethernet frame is 1518, which contains a 14-byte header, a 4-byte tail, and a 1500-byte upper-layer IP packet. This 1500-byte size corresponds to the default MTU value. The network layer protocol determines whether to segment packets based on the MTU, and if a single IP packet exceeds the MTU, it is segmented before transmission to ensure compatibility.
Setting the Correct MTU
In network setup, different vendors or different models of the same vendor may have different MTU definitions and segmentation mechanisms, and such differences often lead to problems such as protocols failing to interface, website or link access failing, and game delays. Therefore, it is particularly important to set MTU reasonably.
The basic principle is that the Ethernet interfaces on interconnected Layer 3 devices should maintain the same MTU. In addition, the impact of encapsulation on packet size in various cases needs to be considered. For example, when encapsulating MPLS labels, each label adds 4 bytes of overhead, which can cause packet lengths to exceed the maximum link-layer limits, which can cause forwarding problems.
MTU Configuration Recommendations for Backbone, Metro, and Access Networks
To ensure proper operation of backbone, metropolitan area network (MAN) and access networks, the MTU value should be significantly higher than the default of 1500 bytes. Many high-end routers and switches support packets in excess of 9000 bytes. However, many devices from different vendors still set the MTU to 1500 bytes. Due to the potential use of routing protocols that require MTU negotiation (such as OSPF and IS-IS), interconnecting devices from different vendors must keep the MTUs matching. Therefore, it is recommended that the MTU be set to a larger value that meets network and carrier standards to ensure compatibility between devices.
MTU Configuration Recommendations for LANs Including Data Centers
MTU settings are not uniform in large data center networks. As new technologies are applied, MTU issues become apparent. For example, various tunneling technologies (e.g., VPLS, VXLAN, etc.) are widely used for Layer 2 extension, and these technologies generate oversized packets after encapsulation. The lack of unified MTU planning may lead to a decline in transmission efficiency and even affect business operation. Therefore, when building a data center network, it is recommended that the MTU be set to a larger value that can be supported by each vendor's equipment.