Maximum transmission unit

The maximum transmission unit (MTU) is the size, in bytes, of the largest possible IP packet, including IP headers, Layer 4 protocol headers, and Layer 4 data, that can fit inside an Ethernet frame.

Valid VPC network MTU sizes

Virtual Private Cloud (VPC) networks use a default MTU of 1,460 bytes. You can set a VPC network's MTU to any value between 1,300 bytes and 8,896 bytes (inclusive). Common custom MTU sizes are 1,500 bytes (standard Ethernet) or 8,896 bytes (the maximum possible). We recommend that you configure the MTU for each Compute Engine instance network interface (NIC) to match the MTU of the VPC network to which it is connected. For more information, see Compute instances and MTU settings.

Communication between compute instances within VPC networks

IP packets up to the MTU size can be sent between two compute instances, if the following apply:

  • Both the sending and receiving instances use the same VPC network, or peered VPC networks that have identical MTUs.
  • The interfaces for both instances are configured to use the VPC network MTU.

To avoid MTU mismatch issues, we recommend that you use the same MTU for all of your connected VPC networks. Although that is the recommended practice, you are not forced to configure identical MTUs on connected VPC networks. For details about how protocols handle situations where there is a MTU mismatch between VPC networks, see Mismatched MTUs, MSS clamping, path MTU discovery.

From the perspective of a sending instance, paths to the following destinations represent instance-to-instance traffic routed within a VPC network:

  • A regional internal IPv4 address in a subnet primary IPv4 or subnet secondary IPv4 address range, including private IPv4 address ranges and privately used public IPv4 address ranges, used by these destination resources:
    • The primary internal IPv4 address of a receiving instance's network interface (NIC).
    • An internal IPv4 address in an alias IP range of a receiving instance's NIC.
    • An internal IPv4 address of an internal forwarding rule for either protocol forwarding or for an internal passthrough Network Load Balancer.
  • Internal IPv6 subnet address ranges used by these destination resources:
    • An IPv6 address from the /96 IPv6 address range assigned to a receiving instance's NIC.
    • An IPv6 address from the /96 IPv6 address range of an internal forwarding rule for either protocol forwarding or for an internal passthrough Network Load Balancer.
  • External IPv6 subnet address ranges used by these destination resources when packets are routed using subnet routes or peering subnet routes within the VPC network:
    • An IPv6 address from the /96 IPv6 address range assigned to a receiving instance's NIC.
    • An IPv6 address from the /96 IPv6 address range of an external forwarding rule for either protocol forwarding or for a regional external passthrough Network Load Balancer.

The following instance-to-instance paths are treated in the same way as Communication to destinations outside of a VPC network:

  • If the packet destination is an external IPv4 address of a receiving instance's NIC.
  • If the packet destination is an external IPv4 address of a regional external passthrough Network Load Balancer.
  • If the packet destination is an external IPv4 address of a forwarding rule for protocol forwarding
  • If the packet destination is an external IPv6 address of an instance's NIC, regional external passthrough Network Load Balancer, or forwarding rule for external protocol forwarding and the applicable route in the VPC network uses a default internet gateway next hop. In this scenario, receiving instances are neither in the same VPC network as the sending instance nor in a VPC network connected to the sending instance's VPC network using VPC Network Peering.

Communication to destinations outside of a VPC network

Google Cloud processes packets sent from compute instances to destinations outside of the sending instance's VPC network as shown in the following table. Destinations outside of a sending instance's VPC network include publicly routable IP addresses for resources outside of Google Cloud and customer-usable external IP addresses within Google Cloud.

Because the internet generally uses an MTU of 1,500 bytes, keeping IP packet size at 1,500 bytes or less usually avoids MTU-related packet loss.

Situation Behavior
TCP SYN and SYN-ACK packets Google Cloud performs MSS clamping if necessary, changing the MSS to ensure packets fits within the MTU.
IP packet MTU between 1,300 bytes and 1,600 bytes (inclusive) Google Cloud makes no changes to the packet, except for SYN and SYN-ACK packets as discussed in the first row.
IP packet larger than 1,600 bytes Google Cloud drops the packet and sends a Fragmentation Needed (ICMP over IPv4) or Packet Too Big (ICMPv6) message both when the DF bit is on and also when the DF bit is off.

Communication to Google APIs and services

Compute instances using any valid VPC network MTU size can send packets to Google APIs and services, including using Private Google Access and Private Service Connect for Google APIs. The details in this section also apply to on-premises resources that send packets to Google APIs and services using Private Google Access for on-premises hosts.

The traffic path to Google APIs and services described in this section is implemented by Google Front Ends (GFEs). These GFEs use non-configurable, fixed MTUs. Traffic from Google Cloud to Google APIs and services always uses the TCP protocol: If a compute instance connects to Google APIs and services from a VPC network whose MTU doesn't match the MTU of the GFE, the segment size is negotiated by using TCP MSS advertisement as described in Mismatched MTUs, MSS clamping, path MTU discovery.

Packet source Packet destination

Any internal IPv4 address: primary internal IPv4 address or internal IPv4 address from an alias IP range of the instance NIC

An external IPv4 address assigned to the instance NIC using a 1-1 NAT access config: In this situation, Google Cloud performs 1-1 NAT on egress, converting an original source primary internal IPv4 address to a source external IPv4 address specified in the access config.