Create and verify a jumbo frame MTU network

This page walks you through creating a Virtual Private Cloud (VPC) network anda pair of VMs for testing. It assumes you are generally familiar with networkMTU.

Create an auto mode VPC network

Console

  1. In the Google Cloud console, go to theVPC networks page.

    Go to VPC networks

  2. Select a project in the project pull-down menu.

  3. ClickCreate VPC network.

  4. Enter aName for the network.

  5. ChooseAutomatic for theSubnet creation mode.

  6. Clear theSet MTU automatically checkbox.

  7. Set theMaximum transmission unit (MTU).

    For a VM to send and receive jumbo frames, the VM's virtual NIC needsto be connected to a VPC network with a MTU value that is as large orlarger than the machine MTU. Set the MTU to the largest possible valuefor the VM, for example 8896. If you're using GPU machines, seeJumbo frames and GPU machines.

  8. ClickCreate.

Create firewall rules

Console

  1. In the Google Cloud console, go to theFirewall policies page.

    Go to Firewall policies

  2. ClickCreate firewall rule.

  3. Enter aName for the firewall rule.
    This name must be unique for the project.

  4. In theNetwork pull-down menu, specify the name of the network youcreated.

  5. In theTargets pull-down menu, selectAll instances in thenetwork.

  6. From theSource filter pull-down menu, selectIPv4 ranges.

  7. In the field enter10.128.0.0/16.

  8. InProtocols and ports, selectSpecified protocols and ports.

  9. Check thetcp checkbox and enter22 in the field.

  10. Check theOther protocols checkbox and entericmp in the field.

  11. ClickCreate.

Create VMs

This section shows you how to create two VM instances for testing.

Console

Do these steps twice to get two VMs in the same zone.

  1. In the Google Cloud console, go to theVM instances page.

    Go to VM instances

  2. ClickCreate instance.

  3. Specify aName for your first VM.

  4. ClickNetworking, Disks, Security, Management, Sole-tenancy.

  5. ClickNetworking.

  6. InNetwork interfaces, clickdefault default (10.128.0.0/20).

  7. In theNetwork pull-down menu, select the network you created.

Connect to VM instances using SSH

Console

  1. In the Google Cloud console, go to theVM instances page.

    Go to VM instances

  2. In theConnect column of your first instance, clickSSH.

  3. In theConnect column of your second instance, clickSSH.

Verify MTU

  1. In the terminal for yourfirst VM, run the following command:

    /sbin/ifconfig | grep mtu

    The reported MTU should be8896.

    ens4: flags=4163  mtu 8896lo: flags=73  mtu 65536

  2. In the terminal for yoursecond VM, installtcpdump:

    sudo apt-get install tcpdump --yes

  3. In the terminal of yoursecond VM, starttcpdump. ReplaceFIRST_VM_NAME with the name of your first VM.

    sudo tcpdump hostFIRST_VM_NAME -v

  4. In the terminal of yourfirst VM, ping your second VM. The ping commandmust specify a packet size that is 28 bytes smaller than the network MTU.ReplaceSECOND_VM_NAME with the name of your second VM.

    pingSECOND_VM_NAME -c 10 -M do -s 8868

  5. Check your second VM. You should see something like the following:

    tcpdump: listening on ens4, link-type EN10MB (Ethernet), snapshot length 262144 bytes19:43:57.116005 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 8896)FIRST_VM_NAME.c.PROJECT_ID.internal >SECOND_VM_NAME.c.PROJECT_ID.internal: ICMP echo request, id 5253, seq 1, length 887619:43:57.116053 IP (tos 0x0, ttl 64, id 23961, offset 0, flags [none], proto ICMP (1), length 8896)SECOND_VM_NAME.c.PROJECT_ID.internal >FIRST_VM_NAME.c.PROJECT_ID.internal: ICMP echo reply, id 5253, seq 1, length 8876

    The variables mean the following:

    • FIRST_VM_NAME is a name of your first VM.
    • SECOND_VM_NAME is a name of your second VM.
    • PROJECT_ID is the ID of the project containing theVMs.
  6. On your second VM, pressCtrl-c to stoptcpdump.

  7. When you're done testing, delete your resources in the following order:

    1. Firewall rule and VM instances
    2. VPC network

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.