Courseiva
InterfacesInterface Config

mtu [bytes]

Sets the maximum transmission unit (MTU) size for an interface, controlling the largest packet that can be transmitted without fragmentation.

Definition: mtu [bytes] is a Cisco IOS interface config command. Sets the maximum transmission unit (MTU) size for an interface, controlling the largest packet that can be transmitted without fragmentation.

Overview

The `mtu` command in Cisco IOS is used to set the Maximum Transmission Unit (MTU) size on an interface. The MTU defines the largest packet size (in bytes) that can be transmitted over a network interface without requiring fragmentation. This command is critical in network design and troubleshooting because it directly impacts how packets are handled across Layer 3 boundaries.

When a packet exceeds the MTU of an outgoing interface, it must be fragmented (if the Don't Fragment bit is not set) or dropped (if DF is set). Proper MTU configuration ensures efficient data transmission, avoids unnecessary fragmentation, and prevents packet loss. Network engineers reach for this command when dealing with performance issues, connectivity problems across VPN tunnels (especially IPsec, which adds overhead), or when integrating with technologies like MPLS, jumbo frames, or PPPoE.

It is also used to match the MTU of a path end-to-end, often discovered via Path MTU Discovery (PMTUD). The `mtu` command is configured in interface configuration mode and affects the Layer 3 MTU (IP MTU). Note that Cisco IOS also has the `ip mtu` command, which sets the IP MTU independently of the Layer 2 MTU; the `mtu` command sets the interface MTU, which includes Layer 2 headers.

A common mistake is confusing these two. The `mtu` command is available in most IOS versions, including 12.x, 15.x, and 16.x (IOS-XE). It requires privilege level 15 (enable mode) to configure.

Changes take effect immediately but are not saved to the running configuration until you issue `write memory` or `copy running-config startup-config`. Setting an MTU too low can cause excessive fragmentation and performance degradation; setting it too high can cause packet drops if the next-hop interface has a smaller MTU. The default MTU on most Ethernet interfaces is 1500 bytes.

For serial interfaces, the default is typically 1500 as well, but can vary. The command can be verified with `show interfaces` or `show ip interface`. In troubleshooting, mismatched MTUs along a path are a common source of black-hole connectivity, especially with VPNs or jumbo frames.

The `mtu` command is also used in conjunction with `ip tcp adjust-mss` to avoid fragmentation by adjusting the TCP MSS to fit within the MTU. Overall, understanding and correctly configuring MTU is fundamental for network reliability and performance.

Syntax·Interface Config
mtu [bytes]

When to Use This Command

  • Adjusting MTU to match a VPN tunnel endpoint to avoid fragmentation overhead.
  • Reducing MTU on a serial link to improve performance with small packets.
  • Setting a larger MTU on a Gigabit Ethernet interface to support jumbo frames for data transfers.
  • Aligning MTU with a service provider's requirement for a WAN circuit.

Parameters

ParameterSyntaxDescription
bytes<64-18000>Specifies the MTU size in bytes. The valid range depends on the interface type; for Ethernet, the range is typically 64 to 18000 (jumbo frames supported on some platforms). Common values are 1500 (default), 1492 (for PPPoE), 1400 (for VPN overhead), and 9000 (jumbo frames). Setting a value below 68 is not allowed as the minimum IP MTU is 68. A common mistake is setting the MTU too low, causing excessive fragmentation, or too high, causing packet drops if the path does not support it.

Command Examples

Set MTU to 1400 on GigabitEthernet0/1

interface GigabitEthernet0/1 mtu 1400
Router(config-if)# mtu 1400
Router(config-if)# end
Router# show interfaces gigabitEthernet 0/1 | include MTU
  MTU 1400 bytes

The command sets the MTU to 1400 bytes. The output from 'show interfaces' confirms the new MTU value.

Reset MTU to default on Serial0/0/0

interface Serial0/0/0 no mtu
Router(config-if)# no mtu
Router(config-if)# end
Router# show interfaces serial 0/0/0 | include MTU
  MTU 1500 bytes

The 'no mtu' command resets the MTU to the default value (1500 bytes for most interfaces). The output shows the default MTU.

Understanding the Output

The 'show interfaces' command displays the current MTU value for the interface. Look for the line starting with 'MTU' followed by the byte count. A typical default is 1500 bytes.

Values below 1500 may indicate intentional reduction for tunnels or QoS. Values above 1500 (e.g., 9000) indicate jumbo frame support, which requires all devices in the path to support the larger MTU. If the MTU is set incorrectly, packets may be fragmented or dropped, causing performance issues or connectivity loss.

Configuration Scenarios

Adjusting MTU for IPsec VPN Tunnel

A site-to-site IPsec VPN tunnel is experiencing packet drops for large packets due to IPsec overhead. The physical interface MTU is 1500, but after adding IPsec headers (typically 50-60 bytes), the effective MTU is reduced. To avoid fragmentation, the MTU on the tunnel interface or physical interface should be lowered.

Topology

R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2 IPsec tunnel: 192.168.1.0/24 <-> 192.168.2.0/24

Steps

  1. 1.Step 1: Enter global configuration mode: configure terminal
  2. 2.Step 2: Enter interface configuration mode for the physical interface: interface GigabitEthernet0/0
  3. 3.Step 3: Set the MTU to 1400 bytes to accommodate IPsec overhead: mtu 1400
  4. 4.Step 4: Exit and verify: end, show interfaces GigabitEthernet0/0 | include MTU
Configuration
! Adjust MTU on physical interface for IPsec
interface GigabitEthernet0/0
 mtu 1400
 end

Verify: show interfaces GigabitEthernet0/0 | include MTU Expected output: MTU 1400 bytes

Watch out: Setting the MTU on the physical interface affects all traffic, not just VPN. A better approach is to set the MTU on the tunnel interface using `ip mtu` or use `ip tcp adjust-mss` to avoid fragmentation without changing the interface MTU.

Configuring Jumbo Frames on a Switch Interface

A data center network requires jumbo frame support (MTU 9000) for storage traffic (iSCSI) between servers and storage arrays. The switch interfaces must be configured with an MTU of 9000 to allow large frames without fragmentation.

Topology

Server1(Gi1/0/1)---Switch1---(Gi1/0/2)Storage All interfaces must support MTU 9000

Steps

  1. 1.Step 1: Enter global configuration mode: configure terminal
  2. 2.Step 2: Enter interface configuration mode: interface GigabitEthernet1/0/1
  3. 3.Step 3: Set the MTU to 9000: mtu 9000
  4. 4.Step 4: Repeat for other interfaces: interface GigabitEthernet1/0/2, mtu 9000
  5. 5.Step 5: Verify: end, show interfaces GigabitEthernet1/0/1 | include MTU
Configuration
! Configure jumbo frames on switch interfaces
interface GigabitEthernet1/0/1
 mtu 9000
!
interface GigabitEthernet1/0/2
 mtu 9000
 end

Verify: show interfaces GigabitEthernet1/0/1 | include MTU Expected output: MTU 9000 bytes Also verify end-to-end connectivity with ping of size 8972 (9000 - 28 for ICMP header): ping 192.168.1.2 size 8972 df-bit

Watch out: On many Cisco switches, the `mtu` command sets the Layer 2 MTU (including headers). For jumbo frames, you may need to use `system mtu` globally or `mtu` per interface, but some platforms require `jumbo` or `mtu 9000` under the interface. Also, all devices in the path must support the same MTU.

Troubleshooting with This Command

When troubleshooting MTU-related issues, the first step is to verify the current MTU setting on the interface using `show interfaces [interface] | include MTU`. A healthy output shows the configured MTU (e.g., 1500 bytes). Problem indicators include an MTU that is unexpectedly low (e.g., 576) or mismatched between interfaces.

Common symptoms that MTU issues cause include: large packets being dropped (often seen as 'packets input/output errors' or 'giants' on the interface), connectivity failures for certain applications (e.g., file transfers, VoIP) while small pings succeed, and 'fragmentation needed but DF set' ICMP messages (type 3, code 4) which indicate a path MTU issue. To diagnose, follow this step-by-step flow: 1) Check the interface MTU with `show interfaces`. 2) Perform a ping with the DF bit set and increasing packet sizes to find the maximum MTU: `ping [destination] size [1500] df-bit`. If the ping fails, reduce the size until it succeeds.

The largest successful size plus 28 (ICMP header) gives the path MTU. 3) Use `debug ip icmp` to see ICMP fragmentation-needed messages (caution: high CPU). 4) Check for MTU mismatches on adjacent devices. 5) If using VPNs, check the tunnel interface MTU and adjust `ip mtu` or `ip tcp adjust-mss`. 6) On routers, use `show ip interface [interface]` to see the IP MTU, which may differ from the interface MTU. Correlate with `show interface` output. Also, `show ip route` can help identify the next-hop interface.

For TCP-based issues, `show tcp` statistics can show retransmissions due to fragmentation. The `mtu` command itself is not a troubleshooting command but a configuration command; however, its correct setting is crucial. In Cisco IOS, the `ip mtu` command overrides the interface MTU for IP packets, so both should be checked.

For example, if the interface MTU is 1500 but IP MTU is 1400, IP packets will be fragmented at 1400. A common mistake is to set the interface MTU but forget to adjust the IP MTU, or vice versa. Always verify both.

In summary, MTU troubleshooting is about identifying the smallest MTU along the path and ensuring consistent configuration across all devices.

CCNA Exam Tips

1.

Remember that the default MTU on Cisco IOS is 1500 bytes for most interfaces.

2.

The 'mtu' command is configured under interface configuration mode, not globally.

3.

On serial interfaces, the default MTU is also 1500, but can be changed for efficiency.

4.

Be aware that changing MTU can affect routing protocols like OSPF, which use MTU to determine adjacency formation.

Common Mistakes

Setting MTU too low causes excessive fragmentation and performance degradation.

Setting MTU too high on a link that doesn't support jumbo frames causes packet drops.

Forgetting to apply the same MTU on both ends of a tunnel or link, leading to mismatched MTU issues.

mtu [bytes] vs show interfaces

The 'mtu' command configures an interface parameter, while 'show interfaces' displays that parameter among many others. They are commonly paired when verifying or troubleshooting the MTU setting after configuration.

Aspectmtu [bytes]show interfaces
ScopeConfigures MTU for a single interfaceDisplays all Layer 1/2 stats for one or all interfaces
Configuration modeInterface configuration modePrivileged EXEC mode (show command)
PersistenceSaved to running-config, permanentTransient output, not saved
PrecedenceOverrides default MTU; can be overridden by ip mtu if set laterReflects current operational state
Typical useSet MTU to 1500, 9000 (jumbo), or lower for tunnelsVerify MTU value, check input/output errors

Use mtu [bytes] when you need to change the maximum packet size allowed on an interface, such as for jumbo frames or to match a path MTU.

Use show interfaces when you need to verify the current MTU setting or diagnose packet drops, errors, or performance issues on an interface.

Platform Notes

In Cisco IOS-XE (e.g., 16.x), the `mtu` command behaves similarly to classic IOS, but the output of `show interfaces` may include additional fields like 'MTU 1500 bytes' in the same format. On NX-OS (Cisco Nexus switches), the equivalent command is `mtu` under interface configuration mode, but the range and behavior may differ. For example, on Nexus 9000 series, the MTU range is 576 to 9216, and jumbo frames are supported by default.

The command syntax is the same: `interface ethernet 1/1 ; mtu 9216`. However, NX-OS also has `system jumbomtu` for global jumbo MTU configuration. On Cisco ASA firewalls, the MTU is set using the `mtu` command in interface configuration mode, but the ASA uses a different default (1500) and the range is 64 to 1500 (or up to 9198 for jumbo frames on some models).

The ASA also has `mtu inside` and `mtu outside` commands for context. In IOS-XR (Cisco routers running IOS-XR), the command is `mtu` under interface configuration, but the syntax is slightly different: `mtu 1500` is valid, but the range is 64 to 65535, and the default is 1500. IOS-XR also supports `ipv4 mtu` and `ipv6 mtu` for per-protocol MTU.

In older IOS versions (12.x), the `mtu` command was available, but some platforms (like 2600 series) had a maximum of 18000. In 15.x and later, jumbo frame support is more common. Always check the specific platform documentation for exact ranges and limitations.

For example, on Catalyst 3750 switches, the `mtu` command sets the Layer 2 MTU, and you need `system mtu 9000` globally for jumbo frames. On ISR routers, the `mtu` command works as described. In summary, while the basic `mtu` command is consistent across Cisco platforms, always verify the exact syntax and capabilities for your specific hardware and IOS version.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions