Configuring the MTU for an Ethernet Interface

MTU is the largest packet of data that can be transmitted on a network, expressed in bytes. MTU is determined by data link layer protocols, and MTU values vary with networks. A proper MTU is a prerequisite for normal communication between network devices.

Context

The size of packets is limited at the network layer. Whenever receiving an IP packet, the IP layer determines the next-hop interface for the packet and obtains the MTU configured on the interface. Then, the IP layer compares the MTU with the packet length. If the packet length is longer than the MTU, the IP layer fragments the packet into smaller packets, which are shorter than or equal to the MTU.

If unfragmentation is configured, some packets may be discarded during data transmission at the IP layer. To ensure that jumbo packets are not dropped during transmission, set an MTU on an interface to fragment these packets into smaller ones.

  • If the size of packets is much greater than the configured MTU value, the packets are broken into a great number of fragments. The packets may be discarded by quality of service (QoS) queues.

  • If the configured MTU value is too large, packets may be transmitted at a low speed.

  • After changing the MTU of an Ethernet interface, also change the MTU of the peer Ethernet interface to ensure that the MTUs of both interfaces are the same. If the MTUs are different, services may be interrupted.

Perform the following steps on each router:

Procedure

  • Set an IPv4 MTU for an Ethernet interface.
    1. Run system-view

      The system view is displayed.

    2. Run interface gigabitethernet interface-number

      The specified Ethernet interface view is displayed.

    3. Run mtu mtu

      An IPv4 MTU is set for the Ethernet interface.

      The MTU is expressed in bytes. The MTU value range of an Ethernet interface is determined by the device type.

    4. Run commit

      The configuration is committed.

  • Set an IPv6 MTU for an Ethernet interface.
    1. Run system-view

      The system view is displayed.

    2. Run interface gigabitethernet interface-number

      The specified Ethernet interface view is displayed.

    3. Run ipv6 enable

      IPv6 is enabled on the Ethernet interface.

    4. Run ipv6 mtu mtu

      An IPv6 MTU is set for the Ethernet interface.

      The MTU is expressed in bytes. The MTU value range of an Ethernet interface is determined by the specific device.

    5. Run commit

      The configuration is committed.

Follow-up Procedure

The length of a QoS queue is limited. If the size of packets is much greater than the configured MTU value, the packets are broken into a great number of fragments. The packets may be discarded by the QoS queue. To address this problem, you can increase the length of the QoS queue. The queue scheduling mechanism First In First Out (FIFO) is used on an interface by default. You can change the FIFO queue length. For detailed configuration of a QoS queue, see HUAWEI NetEngine 8000 F Series Router Configuration Guide - QoS.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >