Last active
July 2, 2020 09:26
-
-
Save ontheklaud/9401febf8184a4c44a8e593ebb8f4996 to your computer and use it in GitHub Desktop.
Change KVM VM's network packet size (MTU)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Reference(s): | |
# https://libvirt.org/sources/virshcmdref/html/sect-net-edit.html | |
# 1. get information of virtual bridge (virbr*) | |
sudo virsh net-list --all | |
# 2. edit virbr mtu | |
sudo virsh net-edit <virbr connection name> | |
# append or insert the below item next to <bridge ~/> | |
# <mtu size='9000'/> and :wq | |
# 3. reboot and change mtu on guest | |
# 4. get virbr information | |
ifconfig <virbr*> | |
# virbr*: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000 | |
# 5. get mtu working status | |
tracepath <host> | |
# 1?: [LOCALHOST] pmtu 9000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment