Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Modify the MTU value under linux

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Jumbo frames related

1 What are Jumbo Frames?

Jumbo frames refer to frames longer than standard Ethernet Frames, i.e. frames larger than 1518/1522 bits. The size of Jumbo frames is specified by each device manufacturer and does not belong to IEEE standards. Jumbo frames run on full-duplex Ethernet networks. Jumbo frames define a "link negotiation" protocol to negotiate with peer devices whether the peer devices support Jumbo frames. The standard Ethernet IP packet size is: 1500 bits, 18 bits (6+6+2+4) excluding Ethernet header and FCS, 1518 bits if Ethernet header and FCS are included;Jumbo frame generally refers to the message with the value of Layer 2 encapsulation Layer 3 IP message greater than 9000 bits.

Jumbo frames Background: In 1998, Alteon Networks proposed to increase the maximum data transmission capacity of the Data Link Layer from 1500 bits to 9000 bits. Although this proposal was not approved by the IEEE 802.3 Working Group, most equipment manufacturers already supported it.

Advantages of Jumbo Frames

In data transmission, since IEEE regulations specify a maximum frame size of 1,500 bits (hosts in early half-duplex networks), the number of bits required for transmission must go through the process of data importance-transmission-data combination. The smaller the maximum frame used, the larger the amount of packets transmitted and the corresponding amount of computation, and the consequences are:

a: Increase the calculation amount of the host computer and consume CPU resources;

b: Affects the speed of network transmission.

The advantages of using large frames are naturally self-evident--reducing CPU calculations and speeding up data transmission.

Second, modify the MTU value

The actual operation required to modify the frame size is to modify the MTU (Maximum Transmission Unit) value, that is, to modify the Maximum Transmission Unit. The modifications are as follows:

1. ifconfig command modification

ifconfig ${Interface} mtu ${SIZE} upifconfig eth2 mtu 9000 up

This is the most common method and works with all linux distributions. The disadvantage is that it fails after restarting and needs to be loaded in the boot item.

2. Modify the configuration file

CentOS / RHEL / Fedora Linux

# vi /etc/sysconfig/network-scripts/ifcfg-eth0#Add the following content MTU="9000"#Restart the network card after saving # service network restart#Enable IPv6 address, modify the parameter of IPv6 mtu to IPV6_MTU="1280"

Debian / Ubuntu Linux

# vi /etc/network/interfaces#Add the following value mtu 9000 #After saving, restart the network to take effect # /etc/init.d/networking restart III. Why is the maximum MTU value 9000 bytes

Theoretically, a 4-bit CRC can support up to 12000 bytes, and there is no way to check it beyond that. There are also limitations of other protocols such as NFS.

Finally, it should be noted that when switching network devices, it is not possible to modify the MTU value of the host side only, and it is also necessary to enable the jumbo frames function on the switching network devices.

IV. MTU test

Use ping command, -l specifies packet size, -f option informs operating system that packet size cannot be changed without permission

Packet needs to be fragmented but DF set .

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report