160
Usage guidelines
It is a good practice to specify the IP address of the loopback interface as the source IP address for
outgoing ping echo request and ICMP error messages. This feature helps users to locate the
sending device easily.
Examples
# Specify 1.1.1.1 as the source address for outgoing ICMP packets.
<Sysname> system-view
[Sysname] ip icmp source 1.1.1.1
ip mtu
Use ip mtu to configure an MTU for an interface.
Use undo ip mtu to restore the default.
Syntax
ip mtu mtu-size
undo ip mtu
Default
No MTU is configured for an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
mtu-size: Specifies an MTU in the range of 128 to 2000 bytes.
Usage guidelines
When a packet exceeds the MTU of the output interface, the device processes it in one of the
following ways:
If the packet disallows fragmentation, the device discards it.
If the packet allows fragmentation, the device fragments it and forwards the fragments.
Fragmentation and reassembling consume system resources, so set an appropriate MTU for an
interface to avoid fragmentation.
If an interface supports both the mtu and ip mtu commands, the device fragments a packet based
on the MTU set by the ip mtu command.
The MTU configured for an interface takes effect on only packets that are sent to the CPU for
software forwarding, including packets sent from or destined for this interface.
Examples
# Set the MTU of VLAN interface 100 to 1280 bytes.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ip mtu 1280