Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Media MTU and Protocol MTU

A maximum transmission unit (MTU) is the largest data unit that can be forwarded without fragmentation. Configure the media MTU for a physical interface and the MTU for a protocol to optimize traffic over your network.

MTU Overview

A maximum transmission unit (MTU) is the largest data unit that can be forwarded on a link without fragmentation. If a packet exceeds the MTU for the interface or protocol it passes through, the device fragments the packet. When a packet is larger than the MTU, the device either drops the packet or fragments it and transmits the fragments. Fragmentation slows down the network and can lead to packet loss.

Some protocols such as IS-IS do not support fragmentation. With these protocols, if a packet exceeds the MTU for a link, the device drops the packet.

Configure the media MTU for a physical interface and the MTU for a protocol to avoid packet loss and optimize traffic over your network.

Use Feature Explorer to confirm platform and release support for specific features.

Review the Platform-Specific MTU Behavior section for notes related to your platform.

Media MTU Overview

The media maximum transmission unit (MTU) for an interface is the largest data unit that can be forwarded through that interface without fragmentation.

The default media MTU depends on the encapsulation used on that interface and the default IP MTU. In some cases, the default IP MTU depends on whether the protocol used is IP version 4 (IPv4) or International Organization for Standardization (ISO).

The default media MTU for a physical interface is calculated as follows:

The actual frames transmitted also contain cyclic redundancy check (CRC) bits, which are not part of the media MTU. For example, the media MTU for a Gigabit Ethernet Version 2 interface is specified as 1514 bytes, but the largest possible frame size is actually 1518 bytes. You need to consider the extra bits when you calculate MTUs for interoperability.

Keep the following in mind when configuring the media MTU:

  • The MTU size must be the same on both sides of a point-to-point connection.
  • All interfaces in the subnet of point-to-multipoint connections must use the same MTU size.
  • The physical MTU for Ethernet interfaces does not include the 4-byte frame check sequence (FCS) field of the Ethernet frame.
  • The maximum number of data-link connection identifiers (DLCIs) is determined by the MTU on the interface. If you have keepalives enabled with the MTU set to 5012, the maximum number of DLCIs is 1000.

Because tunnel services interfaces are considered logical interfaces, you cannot configure the MTU setting for the associated physical interface. This means that you cannot configure the MTU size for the following interface types:

  • Loopback (lo-)

Configure the Media MTU

If you change the size of the media MTU, you must ensure that the size is equal to or greater than the sum of the protocol MTU and the encapsulation overhead. In other words:

The maximum media MTU size that you can configure depends on your device and the type of interface.

Note:

Changing the media MTU or protocol MTU causes an interface to be deleted and added again. This causes the link to flap.

To configure the media MTU:

  1. In configuration mode, go to the [edit interfaces interface-name] hierarchy level.
  2. Include the mtu statement.

Protocol MTU

Overview

The default protocol MTU depends on your device and the interface type. When you initially configure an interface, the protocol MTU is calculated automatically. If you subsequently change the media MTU, the protocol MTU on existing address families automatically changes.

If you reduce the media MTU size but one or more address families are already configured and active on the interface, you must also reduce the protocol MTU size. If you increase the size of the protocol MTU, you must ensure that the size of the media MTU is equal to or greater than the sum of the protocol MTU and the encapsulation overhead.

You can configure the protocol MTU on all tunnel interfaces.

Protocol MTU for MPLS

If you do not configure an MPLS MTU, Junos OS Evolved derives the MPLS MTU from the physical interface MTU. From this value, the software subtracts the encapsulation-specific overhead and space for the maximum number of labels that might be pushed in the Packet Forwarding Engine. The software provides for three labels of four bytes each, for a total of 12 bytes.

In other words, the formula used to determine the MPLS MTU is as follows:

Encapsulation Overhead by Interface Encapsulation Type

If you change the size of the media MTU, you must ensure that the size is equal to or greater than the sum of the protocol MTU and the encapsulation overhead. The following table lists the interface encapsulation and corresponding encapsulation overhead.

Table 1: Encapsulation Overhead by Encapsulation Type

Interface Encapsulation

Encapsulation Overhead (Bytes)

802.1Q/Ethernet 802.3

21

802.1Q/Ethernet Subnetwork Access Protocol (SNAP)

26

802.1Q/Ethernet version 2

18

ATM Cell Relay

4

ATM permanent virtual connection (PVC)

12

Cisco HDLC

4

Ethernet 802.3

17

Ethernet circuit cross-connect (CCC) and virtual private LAN service (VPLS)

4

Ethernet over ATM

32

Ethernet SNAP

22

Ethernet translational cross-connect (TCC)

18

Ethernet version 2

14

Extended virtual local area network (VLAN) CCC and VPLS

4

Extended VLAN TCC

22

Frame Relay

4

PPP

4

VLAN CCC

4

VLAN VPLS

4

VLAN TCC

22

MTU and MACsec

Media Access Control security (MACsec) is a Layer 2 (L2) security protocol that provides point-to-point security. With protocols that do not support fragmentation, if a MACsec packet exceeds the MTU for a link, the device drops the packet. Before enabling MACsec, you must ensure your protocol MTU is large enough to accommodate the additional 32 bytes of MACsec overhead.

Note: The MACsec header can be smaller than 32 bytes when there is no Secure Channel Identifier (SCI) field. We recommend assuming the MACsec header is 32 bytes to ensure the device transmits the MACsec packet.

Automatic MTU Adjustment for MACsec

Some devices adjust the MTU to include the MACsec header automatically. When MACsec is enabled on the interfaces of these devices, the device automatically increases the interface MTU so it accommodates the 32 bytes of the MACsec header. When MACsec is enabled on a specific logical interface, the protocol families under that logical interface use an adjusted MTU that accommodates the MACsec header.

If you (the network administrator) have configured an MTU on a physical or logical interface, the device uses the MTU you configured instead of adjusting it.

The following table shows how devices that support automatic MTU adjustment react when you have not already configured the MTU.

Table 2: Automatic MTU Adjustment for MACsec
MACsec Enabled At: Physical Interface (IFD) MTU Protocol MTU
Physical interface (IFD) level Device increases the IFD MTU by 32 bytes to account for the MACSec overhead. (Adjusted IFD MTU) − (32 + L2 overhead)
Logical interface (IFL) level IFD MTU remains unchanged. (IFD MTU) − (32 + L2 overhead)

This feature is enabled by default when you configure MACsec at both the [edit interfaces interface-name] and the [edit security macsec interfaces interface-name] hierarchy levels for a logical interface. To prevent the device from automatically adjusting the MTU, configure the disable-auto-mtu-update statement at the [edit security macsec] hierarchy level.

Note:
  • This feature is not supported on aggregated Ethernet interfaces.

  • This feature is not supported for the CCC, VPLS, BRIDGE, or TCC protocol families.

    • When MACsec is enabled at the physical interface level—If any logical interface under it uses any of these protocols, the device skips MTU adjustment for all logical interfaces under that physical interface hierarchy.

    • When MACsec is enabled at the logical interface level—If the logical interface uses any of these protocols, the device skips MTU adjustment only for the protocol configured under that logical interface.

Platform-Specific MTU Behavior

Use Feature Explorer to confirm platform and release support for specific features.

Use the following table to review platform-specific behavior for your platform:

Platform Difference

ACX Series

  • ACX Series routers that support protocol MTU need to explicitly configure MTU at the family level for IPv4 and IPv6 make MTU exception work in egress.

    Follow the guidelines below while configuring MTUs. If you configure MTUs:

    • If you configure MTUs for both inet and inet6 families, inet MTU gets precedence.

    • If you configure MTU only at inet level, the same value applies to inet6 as well.

    • If you configure MTU only for inet6 level, the same value applies to inet as well.

MX Series

  • MX304, MX960, MX2020, MX10003, MX10008: When MACsec is enabled on the interfaces of these devices, the device automatically increases the interface MTU as described in the Automatic MTU Adjustment for MACsec section above.