Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membuat dan memverifikasi jaringan MTU frame jumbo
Halaman ini akan memandu Anda dalam membuat jaringan Virtual Private Cloud (VPC) dan sepasang VM untuk pengujian. Anda dianggap sudah familier dengan MTU jaringan.
Membuat jaringan VPC mode otomatis
Konsol
Di Google Cloud konsol, buka halaman VPC networks.
Agar VM dapat mengirim dan menerima frame jumbo, NIC virtual VM harus
terhubung ke jaringan VPC dengan nilai MTU yang sama besar atau
lebih besar dari MTU mesin. Tetapkan MTU ke nilai terbesar yang mungkin
untuk VM, misalnya 8896. Jika Anda menggunakan mesin GPU, lihat
Frame jumbo dan mesin GPU.
Klik Buat.
Membuat aturan firewall
Konsol
Di Google Cloud console, buka halaman Firewall policies.
Di terminal untuk VM pertama Anda, jalankan perintah berikut:
/sbin/ifconfig | grep mtu
MTU yang dilaporkan harus 8896.
ens4: flags=4163 mtu 8896
lo: flags=73 mtu 65536
Di terminal untuk VM kedua, instal tcpdump:
sudo apt-get install tcpdump --yes
Di terminal VM kedua, mulai tcpdump. Ganti FIRST_VM_NAME dengan nama VM pertama Anda.
sudo tcpdump host FIRST_VM_NAME -v
Ping VM kedua Anda di terminal VM pertama. Perintah ping harus menentukan ukuran paket yang lebih kecil 28 byte dari MTU jaringan.
Ganti SECOND_VM_NAME dengan nama VM kedua Anda.
ping SECOND_VM_NAME -c 10 -M do -s 8868
Periksa VM kedua Anda. Anda akan melihat sesuatu seperti berikut:
tcpdump: listening on ens4, link-type EN10MB (Ethernet), snapshot length 262144 bytes
19: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 8876
19: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
Variabelnya memiliki arti sebagai berikut:
FIRST_VM_NAME adalah nama VM pertama Anda.
SECOND_VM_NAME adalah nama VM kedua Anda.
PROJECT_ID adalah ID project yang berisi VM.
Di VM kedua Anda, tekan Ctrl-c untuk menghentikan tcpdump.
Setelah selesai menguji, hapus resource dalam urutan berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 UTC."],[],[],null,["# Create and verify a jumbo frame MTU network\n===========================================\n\nThis page walks you through creating a Virtual Private Cloud (VPC) network and\na pair of VMs for testing. It assumes you are generally familiar with network\n[MTU](/vpc/docs/mtu).\n\nCreate an auto mode VPC network\n-------------------------------\n\n### Console\n\n1. In the Google Cloud console, go to the **VPC networks** page.\n\n [Go to VPC networks](https://console.cloud.google.com/networking/networks/list)\n2. Select a project in the project pull-down menu.\n\n3. Click **Create VPC network**.\n\n4. Enter a **Name** for the network.\n\n5. Choose **Automatic** for the **Subnet creation mode**.\n\n6. Set the **Maximum transmission unit (MTU)**.\n\n For a VM to send and receive jumbo frames, the VM's virtual NIC needs\n to be connected to a VPC network with a MTU value that is as large or\n larger than the machine MTU. Set the MTU to the largest possible value\n for the VM, for example 8896. If you're using GPU machines, see\n [Jumbo frames and GPU machines](/compute/docs/network-bandwidth#jumbo-frames-mtu).\n7. Click **Create**.\n\nCreate firewall rules\n---------------------\n\n### Console\n\n1. In the Google Cloud console, go to the **Firewall policies** page.\n\n [Go to Firewall policies](https://console.cloud.google.com/net-security/firewall-manager/firewall-policies/list)\n2. Click **Create firewall rule**.\n\n3. Enter a **Name** for the firewall rule. \n\n This name must be unique for the project.\n\n4. In the **Network** pull-down menu, specify the name of the network you\n created.\n\n5. In the **Targets** pull-down menu, select **All instances in the\n network**.\n\n6. From the **Source filter** pull-down menu, select **IPv4 ranges**.\n\n7. In the field enter **10.128.0.0/16**.\n\n8. In **Protocols and ports** , select **Specified protocols and ports**.\n\n9. Check the **tcp** checkbox and enter **22** in the field.\n\n10. Check the **Other protocols** checkbox and enter **icmp** in the field.\n\n11. Click **Create**.\n\nCreate VMs\n----------\n\nThis section shows you how to create two VM instances for testing. \n\n### Console\n\nDo these steps twice to get two VMs in the same zone.\n\n1. In the Google Cloud console, go to the **VM instances** page.\n\n [Go to VM instances](https://console.cloud.google.com/compute/instances)\n2. Click **Create instance**.\n\n3. Specify a **Name** for your first VM.\n\n4. Click **Networking, Disks, Security, Management, Sole-tenancy**.\n\n5. Click **Networking**.\n\n6. In **Network interfaces** , click **default default (10.128.0.0/20)**.\n\n7. In the **Network** pull-down menu, select the network you created.\n\nConnect to VM instances using SSH\n---------------------------------\n\n### Console\n\n1. In the Google Cloud console, go to the **VM instances** page.\n\n [Go to VM instances](https://console.cloud.google.com/compute/instances)\n2. In the **Connect** column of your first instance, click **SSH**.\n\n3. In the **Connect** column of your second instance, click **SSH**.\n\nVerify MTU\n----------\n\n1. In the terminal for your *first* VM, run the following command:\n\n ```\n /sbin/ifconfig | grep mtu\n ```\n\n \u003cbr /\u003e\n\n The reported MTU should be `8896`. \n\n ```\n ens4: flags=4163 mtu 8896\n lo: flags=73 mtu 65536\n ```\n\n \u003cbr /\u003e\n\n2. In the terminal for your *second* VM, install `tcpdump`:\n\n ```\n sudo apt-get install tcpdump --yes\n ```\n\n \u003cbr /\u003e\n\n3. In the terminal of your *second* VM, start `tcpdump`. Replace\n \u003cvar translate=\"no\"\u003eFIRST_VM_NAME\u003c/var\u003e with the name of your first VM.\n\n ```\n sudo tcpdump host FIRST_VM_NAME -v\n ```\n\n \u003cbr /\u003e\n\n4. In the terminal of your *first* VM, ping your second VM. The ping command\n must specify a packet size that is 28 bytes smaller than the network MTU.\n Replace\n \u003cvar translate=\"no\"\u003eSECOND_VM_NAME\u003c/var\u003e with the name of your second VM.\n\n ```\n ping SECOND_VM_NAME -c 10 -M do -s 8868\n ```\n\n \u003cbr /\u003e\n\n5. Check your second VM. You should see something like the following:\n\n ```\n tcpdump: listening on ens4, link-type EN10MB (Ethernet), snapshot length 262144 bytes\n 19:43:57.116005 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 8896)\n FIRST_VM_NAME.c.PROJECT_ID.internal \u003e SECOND_VM_NAME.c.PROJECT_ID.internal: ICMP echo request, id 5253, seq 1, length 8876\n 19:43:57.116053 IP (tos 0x0, ttl 64, id 23961, offset 0, flags [none], proto ICMP (1), length 8896)\n SECOND_VM_NAME.c.PROJECT_ID.internal \u003e FIRST_VM_NAME.c.PROJECT_ID.internal: ICMP echo reply, id 5253, seq 1, length 8876\n ```\n\n \u003cbr /\u003e\n\n The variables mean the following:\n - \u003cvar translate=\"no\"\u003eFIRST_VM_NAME\u003c/var\u003e is a name of your first VM.\n - \u003cvar translate=\"no\"\u003eSECOND_VM_NAME\u003c/var\u003e is a name of your second VM.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the ID of the project containing the VMs.\n6. On your second VM, press `Ctrl-c` to stop `tcpdump`.\n\n7. When you're done testing, delete your resources in the following order:\n\n 1. Firewall rule and VM instances\n 2. VPC network\n\nWhat's next\n-----------\n\n- Learn more about [MTU](/vpc/docs/mtu).\n- Create a [VPC network with a specified\n MTU](/vpc/docs/create-modify-vpc-networks#creating_networks)."]]