The mpls mtu command configures the MTU of MPLS packets on an interface.
The undo mpls mtu command restores the default setting.
By default, the MTU of MPLS packets is equal to the interface MTU.
Parameter |
Description |
Value |
---|---|---|
mtu |
Specifies the MPLS MTU of an interface. |
The value range varies according to the interface type. |
VLANIF interface view, GE interface view, XGE interface view, MultiGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-trunk interface view, Tunnel interface view
The mpls mtu command does not take effect in the tunnel interface view.
Usage Scenario
An MTU value determines the maximum number of bytes that can be sent each time. If the size of packets exceeds the MTU supported by a transit node or a receiver, the transit node or receiver fragments the packets or even discards them, increasing the network transmission load. MTU values must be correctly negotiated between LSRs to enable packets to successfully reach the receiver.
To calculate the MPLS MTU, an LSR on the path to a specified FEC compares all MTUs advertised by downstream devices with the interface MTU of its own, and adds the smaller MTU (the MPLS MTU) to the MTU TLV field in the Label Mapping message, and send the Label Mapping message upstream.
If an MTU value changes (for example when the local outbound interface or its configuration changes), an LSR recalculates the MTU value and sends a Label Mapping message carrying the new MTU value to all upstream devices.
If no MPLS MTU is configured on an interface, the interface MTU is used to control forwarding of MPLS packets.
If both an MPLS MTU and an interface MTU are configured on an interface, the smaller value between the two MTUs is used to control forwarding of MPLS packets.
Prerequisites
MPLS has been enabled on the interface using the mpls (interface view) command.
Precautions
After changing the MTU using the mpls mtu or mtu command on an interface, you need to restart the interface to make the new MTU take effect. To restart the interface, run the shutdown command and then the undo shutdown command, or run the restart command in the interface view.
After the mpls mtu command is run, LDP compares the MPLS MTU and the interface MTU, and uses the smaller value between the two MTUs.
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] mpls [HUAWEI-Vlanif100] mpls mtu 1500
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] mpls [HUAWEI-GigabitEthernet0/0/1] mpls mtu 1500