mtu (interface view)

Function

The mtu command sets the maximum transfer unit (MTU) value for an interface to send IPv4 packets.

The undo mtu command restores the default MTU value for an interface to send IPv4 packets.

The default MTU is 1500 bytes.

Format

mtu mtu

undo mtu

Parameters

Parameter Description Value
mtu

Specifies the MTU of an Ethernet interface.

The value is an integer ranging from 46 to 9600, in bytes. The parameter value range varies according to the interface.

Views

100GE interface view, 10GE interface view, 25GE interface view, 400GE Layer 2 sub-interface view, 400GE interface view, 40GE interface view, 50GE Layer 2 sub-interface view, 50GE interface view, Eth-Trunk Layer 2 sub-interface view, Eth-Trunk interface view, FlexE sub-interface view, FlexE interface view, GE Layer 2 sub-interface view, GE optical interface view, GE interface view, GE electrical interface view, GMPLS-UNI interface view, Global VE sub-interface view, PW-VE sub-interface view, PW-VE interface view, Tunnel interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view, Layer 2 sub-interface view, Sub-interface view, Management interface view, Virtual template view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
interface-mgr write

Usage Guidelines

Usage Scenario

Generally, the IP layer controls the maximum length of frames that are sent each time. Any time the IP layer receives an IP packet to be sent, it checks to which local interface the packet is to be sent and queries the MTU of the interface. Then, the IP layer compares the MTU with the packet length to be sent. If the packet length is greater than the MTU, the IP layer fragments the packet to ensure that the length of each fragment is smaller or equal to the MTU.

If forcible unfragmentation is configured, certain packets are lost during data transmission at the IP layer. To ensure jumbo packets are not dropped during transmission, you need to configure forcible fragmentation. In this case, you can run the mtu command to set the size of a fragment.

Configuration Impact

If the MTU is set too small and the size of packets is large, packets are broken into a great number of fragments, and may be discarded by QoS queues.

Precautions

The MTU configured on the sub-interface does not take effect on the main interface.

Example

# Set the MTU of an interface to 1400.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/1
[~HUAWEI-GigabitEthernet0/1/1] mtu 1400
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >