MTU and TCP MSS Adjust Configuration Guide
Author: Cisco Systems, Inc.

Chapter 1. Configure System MTU

- Feature History for MTU

- Maximum Transmission Unit

- System MTU

- Configure System MTU

- Configuration examples for System MTU

- Additional References for System MTU

Feature History for MTU

This table provides release and platform support information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Release

Feature name and description

Supported platform

Cisco IOS XE 26.2.1ea

Maximum Transmission Unit: The MTU feature support has been introduced.

Cisco C9550 Series Smart Switches

Cisco IOS XE 17.18.1

The Maximum Transmission Unit (MTU) features discusses about two primary types of MTU:

1. System MTU (Global MTU)

2. Per-Port MTU (Interface MTU)

Cisco C9350 Series Smart Switches

Cisco C9610 Series Smart Switches

Maximum Transmission Unit

The Maximum Transmission Unit (MTU) in network switching refers to the largest size of a packet or frame, measured in bytes, that a network interface can send or receive. If a packet exceeds the MTU of an interface, the system must either fragment the packet into smaller pieces before transmission or drop the packet.

In Cisco switching, you typically configure two primary types of MTU:

1. System MTU (Global MTU)

2. Port MTU (Interface MTU)

System MTU

The System MTU is a global setting that defines the default MTU size for all interfaces on a Cisco switch. It serves as a baseline or the maximum allowable MTU for the entire device.

This setting applies globally to the entire switch. When you configure the System MTU, the system applies this value to all relevant interfaces, such as Ethernet ports and Virtual Local Area Network (VLAN) interfaces, that support it.

The default system MTU is 1500 bytes for all switch models.

For IP MTU, use the ip mtu bytes command.

For IPv6 MTU, use the ipv6 mtu bytes command.

Note

The MTU value is the applied value, not the configured value.

MTU specifications for Cisco Smart Switches

The table lists the range of system MTU values, in bytes, supported across Cisco Smart Switches.

Device

System MTU range

IP MTU range

IPv6 MTU range

C9350 Series Smart Switches

1500 - 9198

832 - configured system MTU value

1280 - configured system MTU value

C9610 Series Smart Switches

1500 - 9216

840 - configured system MTU value

1280 - configured system MTU value

C9550 Series Smart Switches

1500 - 9216

840 - configured system MTU value

1280 - configured system MTU value

Configure System MTU

Modify the Maximum Transmission Unit (MTU) settings for optimized network performance. MTU defines the largest size of packets that can be transmitted over the network without fragmentation. Configuring an appropriate MTU size can improve transmission efficiency and reduce latency.

Before you begin

Ensure you have the necessary privileges to access the device in EXEC mode.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode. Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

system mtu bytes

Example:

Device(config)# system mtu 1900

Displays MTU byte information

Step 4

end

Example:

Device(config)# end

Enters global configuration mode, and returns to privileged EXEC mode.

Step 5

copy running-config startup-config

Example:

Device# copy running-config startup-config

Saves your entries in the configuration file.

Step 6

show platform so fed switch active ifm interface_name interface name

Example:

Device# show platform software fed switch active ifm interface_name GigabitEthernet2/0/1
Interface Name: GigabitEthernet2/0/1
if_id: 0x123
admin_state: up
oper_state: up
l2_mtu: 9198
ip_mtu: 1500
encap: ethernet
vlan_mode: access
access_vlan: 10
l2_fwd: enabled
l3_fwd: disabled
asic_port: 25

Displays the IP/IPv6 MTU.

The MTU size for switched packets is configured successfully, and changes are confirmed to persist upon a system restart.

- Configure Protocol-Specific MTU

Configure Protocol-Specific MTU

To override system MTU values on routed interfaces, configure protocol-specific MTU under each routed interface. To change the MTU size for routed ports, perform this procedure

Procedure

Step 1

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 2

interface interface

Example:

Device(config)# interface gigabitethernet0/0

Enters interface configuration mode.

Step 3

ip mtu bytes

Example:

Device(config-if)# ip mtu 832

Changes the IPv4 MTU size

Step 4

ipv6 mtu bytes

Example:

Device(config-if)# ipv6 mtu 1280

(Optional) Changes the IPv6 MTU size.

Step 5

end

Example:

Device(config-if)# end

Exits interface configuration mode, and returns to privileged EXEC mode.

Step 6

copy running-config startup-config

Example:

Device# copy running-config startup-config

Saves your entries in the configuration file.

Step 7

show system mtu

Example:

Device# show system mtu
System MTU size is 9198 bytes

Verifies your settings.

Configuration examples for System MTU

Protocol-specific MTU configuration example

Protocol-specific MTU configurations allow network professionals to adjust the maximum transmission unit (MTU) for different protocols to optimize performance and minimize packet fragmentation. This is crucial for efficiently managing network traffic across various interfaces.

This example shows how you can configure protocol-specific MTU:

- Gigabit Ethernet Interface

Device# configure terminal
Device(config)# interface gigabitethernet 0/1
Device(config-if)# ip mtu 900
Device(config-if)# ipv6 mtu 1286
Device(config-if)# end

- Forty Gigabit Ethernet Interface

Device# configure terminal
Device(config)# interface fortygigabitethernet 0/0
Device(config-if)# ip mtu 900
Device(config-if)# ipv6 mtu 1286
Device(config-if)# end

Effective MTU configuration reduces the risk of fragmentation and ensures efficient packet transmission across network segments.

System MTU configuration example

Change the maximum transmission unit (MTU) size for a Cisco network device. Context: This task is useful for adjusting the packet size to accommodate specific network performance requirements. This example shows how you can configure the system MTU:

Device# configure terminal
Device(config)# system mtu 1600
Device(config)# exit

Additional References for System MTU

Related Documents

Related Topic | Document Title
For complete syntax and usage information for the commands used in this chapter. | See the Interface and Hardware Commands section in the Command Reference (Cisco 9350 Series Smart Switches)

Related Documents

Related Topic | Document Title
For complete syntax and usage information for the commands used in this chapter. | See the Interface and Hardware Commands section in the Command Reference (Cisco 9610 Series Smart Switches)

Standards and RFCs

Standard/RFC | Title
RFC 8200 | Internet Protocol, Version 6 (IPv6) Specification

Chapter 2. Configure Per-Port MTU

- Feature History for Per-port MTU

- Per-Port MTU

- Restrictions for configuring per-port MTU

- Port MTU specifications for Cisco Smart Switches

- Configure per-port MTU

- Configuration Examples for Per-Port MTU

Feature History for Per-port MTU

This table provides release and platform support information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Release

Feature name and description

Supported platform

Cisco IOS XE 26.2.1ea

Per-port MTU: This feature support has been introduced.

Cisco C9550 Series Smart Switches

Cisco IOS XE 17.18.1

Per-port MTU: Per-port MTU defines the maximum transmission unit size for frames received and transmitted on a particular port or port channel.

Cisco C9350 Series Smart Switches

Cisco C9610 Series Smart Switches

Per-Port MTU

The Per-Port MTU, also known as Interface MTU, is a setting that defines the MTU size for a specific physical or logical interface, such as a GigabitEthernet port, a VLAN interface, or a Port-Channel.

This setting applies only to the individual interface on which it is configured.

Relationship to System MTU:

The Port MTU can override the System MTU for a particular interface. If a Port MTU is explicitly configured on an interface, that interface uses its configured Port MTU, regardless of the System MTU.

However, the Port MTU cannot exceed the System MTU on Cisco platforms. The System MTU often acts as an upper limit for individual Port MTU configurations. If you attempt to configure a Port MTU larger than the System MTU, the switch might reject the configuration or silently cap it at the System MTU value.

Restrictions for configuring per-port MTU

Several restrictions apply to configuring per-port MTU on Cisco Catalyst switches. These restrictions vary depending on the platform, interface type, and other configuration conditions.

General restrictions:

- Per-port MTU cannot be configured on the management port.

- Do not configure the per-port MTU value while traffic is flowing (e.g., during active data transmission).

Port-channel restrictions:

- Members of a port channel cannot be configured with a per-port MTU value; they derive their MTU from the port-channel MTU configuration.

- Per-port MTU can be configured on port-channel interfaces but not on the port-channel members.

Subinterface restrictions:

- Per-port MTU is not supported on subinterfaces or port-channel subinterfaces.

Layer 2 MTU restrictions:

- Ingress and egress Layer 2 MTU is derived from per-port MTU. If per-port MTU is not configured, the System MTU is used.

- On ingress ports configured with Layer 2 MTU, packets that exceed the configured MTU size are dropped.

Platform-specific restrictions:

- On Cisco C9610 Series SUP-3 and SUP-3XL, the following restrictions are applicable:

- If no protocol-specific MTU configuration is present, per-port MTU is used as protocol-specific MTU.

- If per-port MTU is not configured, System MTU is used as protocol-specific MTU.

Port MTU specifications for Cisco Smart Switches

You can configure the MTU size for all interfaces on a device at the same time using the system mtu command. The default maximum transmission unit (MTU) size for frames received and transmitted on all interfaces is 1500 bytes. The system mtu command is a global command and does not allow MTU to be configured at a port level. You can also configure Per-Port MTU. Per-Port MTU supports port level and port channel level MTU configuration. With Per-Port MTU you can set different MTU values for different interfaces as well as different port channel interfaces.

C9350: Per-port MTU can be configured in the range of 1500-9198 bytes.

C9610: Per-port MTU can be configured in the range of 1500-9216 bytes.

C9550: Per-port MTU can be configured in the range of 1500-9216 bytes.

Once the Per-Port MTU value has been configured on a port, the protocol-specific MTU for that port is also changed to the Per-Port MTU value. When Per-Port MTU is configured on a port, you can still configure protocol-specific MTU on the interface.

If the Per-Port MTU is disabled, the MTU for the port will revert to the system MTU value.

You can view the Per-Port MTU configurations on an interface using the show interface mtu command.

The following are expected behavior if the Per-Port MTU configuration is changed on any interface:

- The interface flaps if the port-channel is in PAgP or LACP mode.

- The interface does not flap if the port channel is in the on mode.

- The interface does not flap if the interface is not a port channel.

You can disable Per-Port MTU by using the no form of the mtu bytes command in the interface configuration mode.

Note

To form routing protocol adjacency, ensure port MTUs match between devices. Configure matching IP MTU or IPv6 MTU values on the interfaces of both devices.

Configure per-port MTU

Change the MTU size for switched packets on specific ports. Adjust MTU size for optimized network performance on selected interfaces.

Before you begin

Ensure privileged EXEC mode access and necessary credentials.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode. Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface type {switch-number | slot-number | port-number}

Example:

Device# int FortyGigabitEthernet2/5/0/20

Configures the interface and enters interface configuration mode.

Step 4

mtu bytes

Example:

Device# mtu 6666

Configures the MTU size for a particular port on the interface.

Step 5

end

Example:

Device(config)# end

Enters global configuration mode, and returns to privileged EXEC mode.

What to do next

Verify MTU size configuration by checking network performance or consulting device- specific MTU readouts.

Configuration Examples for Per-Port MTU

Configure per-port MTU

Follow these steps to configure per-port MTU on an interface:

Device# configure terminal
Device(config)# interface FortyGigabitEthernet2/5/0/20 Device(config-if)# mtu 6666
Device(config-if)# end

Verification of per-port MTU

The following example illustrates how to verify the per-port MTU configuration on an interface using the show interface mtu command.

Device# show interface mtu
Port           Name               MTU
Fo2/5/0/19                        1500
Fo2/5/0/20                        6666
Fo2/5/0/21      ixia_7_21         1500

Disable per-port MTU

Before you begin:

- Ensure that you have administrative access to the device.

- Confirm the interface ID where you want to disable the per-port MTU.

This example shows how to disable per-port MTU on an interface:

Device# configure terminal
Device(config)# interface FortyGigabitEthernet2/5/0/20
Device(config-if)# no mtu
Device(config-if)# end

Chapter 3. Configure TCP MSS Adjustment

- Feature History for TCP MSS Adjustment

- Restrictions for TCP MSS Adjustment

- Information about TCP MSS Adjustment

- How to Configure TCP MSS Adjustment

- Configuration Examples for TCP MSS Adjustment

Feature History for TCP MSS Adjustment

This table provides release and related information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Feature history for TCP MSS Adjustment

Release

Feature

Feature information

Cisco IOS XE 26.2.1

Transmission Control Protocol (TCP) Maximum Segment Size (MSS) Adjustment: The TCP MSS Adjustment feature has been introduced.

Cisco C9610 Series Smart Switches

Cisco C9550 Series Smart Switches

Cisco IOS XE 26.1.1

Transmission Control Protocol (TCP) Maximum Segment Size (MSS) Adjustment: The TCP MSS Adjustment feature enables the configuration of the maximum segment size for transient packets that traverse a router, specifically TCP segments with the SYN bitset. This feature helps prevent TCP sessions from being dropped by adjusting the MSS value of the TCP SYN packets.

Cisco C9350 Series Smart Switches

Use the Cisco Feature Navigator to find information about platform and software image support.

Restrictions for TCP MSS Adjustment

- Subinterfaces do not support TCP MSS Adjust.

- TCP MSS adjustment configuration works only if applied on an ingress interface. This configuration does not work if applied on an egress interface.

Information about TCP MSS Adjustment

The Transmission Control Protocol (TCP) Maximum Segment Size (MSS) Adjustment feature enables the configuration of the maximum segment size for transient packets that traverse a router, specifically TCP segments with the SYN bit set. Use the ip tcp adjust-mss command in interface configuration mode to specify the MSS value on the intermediate router of the SYN packets to avoid truncation.

When a host (usually a PC) initiates a TCP session with a server, it negotiates the IP segment size by using the MSS option field in the TCP SYN packet. The value of the MSS field is determined by the MTU configuration on the host. The default MSS value for a PC is 1500 bytes.

The PPP over Ethernet (PPPoE) standard supports an MTU of only 1492 bytes. The disparity between the host and PPPoE MTU size can cause the router in between the host and the server to drop 1500-byte packets and terminate TCP sessions over the PPPoE network. Even if the path MTU (which detects the correct MTU across the path) is enabled on the host, sessions may be dropped because system administrators sometimes disable the ICMP error messages that must be relayed from the host in order for path MTU to work.

The ip tcp adjust-mss command helps prevent TCP sessions from being dropped by adjusting the MSS value of the TCP SYN packets.

The ip tcp adjust-mss command is effective only for TCP connections passing through the router.

In most cases, the optimum value for the max-segment-size argument of the ip tcp adjust-mss command is 1452 bytes. This value plus the 20-byte IP header, the 20-byte TCP header, and the 8-byte PPPoE header add up to a 1500-byte packet that matches the MTU size for the Ethernet link.

Note

TCP MSS adjustment-based traffic is always software switched.

Supported Interfaces

TCP MSS Adjust is supported only on the following interfaces:

- Physical Layer 3 interface

- SVI

- Layer 3 port channel

How to Configure TCP MSS Adjustment

The following sections provide configuration information for TCP MSS adjustment.

- Configure the MSS Value for Transient TCP SYN Packets

- Configure the MSS Value for IPv6 Traffic

Configure the MSS Value for Transient TCP SYN Packets

Before you begin

Perform this task to configure the MSS for transient packets that traverse a router, specifically TCP segments with the SYN bit set.

We recommend that you use ip tcp adjust-mss 1452 command.

Procedure

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

Enter your password if prompted

Step 2

configure terminal

Example:

Device#config terminal

Enters the global configuration mode.

Step 3

interface type number

Example:

Device(config)#interface GigabitEthernet 1/0/1

Configures an interface type and enters interface configuration mode.

Step 4

ip tcp adjust-mss max-segment-size

Example:

Device(config-if)#ip tcp adjust-mss 1452

Adjusts the MSS value of TCP SYN packets going through a router.

The max-segment-size argument is the maximum segment size, in bytes.

- The configurable ranges are:

- IPv4: 500–9176 bytes

- IPv6: 1220–9156 bytes

With the interface MTU set to 1500, typical MSS values are:

- IPv4: 1460 bytes

- IPv6: 1440 bytes

Step 5

end

Example:

Device(config-if)#end

Exits to global configuration mode.

Configure the MSS Value for IPv6 Traffic

Procedure

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

Enter your password if prompted

Step 2

configure terminal

Example:

Device#config terminal

Enters the global configuration mode.

Step 3

interface type number

Example:

Device(config)#interface GigabitEthernet 1/0/1

Configures an interface type and enters interface configuration mode.

Step 4

ipv6 tcp adjust-mss max-segment-size

Example:

Device(config-if)#ipv6 tcp adjust-mss 1440

Adjusts the MSS option in IPv6 TCP SYN packets, including SYN-ACK packets, traversing the device. The adjustment is applied on ingress interfaces.

The max-segment-size argument is the maximum segment size, in bytes. The range is from 1220–9156.

Step 5

end

Example:

Device(config-if)#end

Exits interface configuration mode and returns to privileged EXEC mode.

Configuration Examples for TCP MSS Adjustment

The following sections provide configuration examples for TCP MSS adjustment.

- Example: Configure the TCP MSS Adjustment

- Example: Configure the TCP MSS Adjustment for IPv6 traffic

Example: Configure the TCP MSS Adjustment

Device(config)#interface GigabitEthernet 1/0/1
Device(config-if)#ip address 192.168.100.1.255.255.255.0
Device(config-if)#ip tcp adjust-mss 1452
Device(config-if)#ip nat inside
Device(config-if)#exit

Example: Configure the TCP MSS Adjustment for IPv6 traffic

Device>enable
Device#configure terminal
Device(config)#interface GigabitEthernet 1/0/1
Device(config)#ipv6 tcp adjust-mss 1440
Device(config)#end

Read Me First

Only supported features are documented. To confirm or clarify all the supported features for a platform, go to Cisco Feature Navigator.

Full Cisco Trademarks with Software License

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

All printed copies and duplicate soft copies of this document are considered uncontrolled. See the current online version for the latest version.

Cisco has more than 200 offices worldwide. Addresses and phone numbers are listed on the Cisco website at www.cisco.com/go/offices.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: https://www.cisco.com/c/en/us/about/legal/trademarks.html. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1721R)