π Making MTU 9000 Persistent on XCP-ng (OVS)
Making MTU 9000 Persistent on XCP-ng (OVS)
π Purpose
This guide explains how to correctly configure MTU 9000Β on Open vSwitch (OVS)Β inside XCP-ngΒ to ensure jumbo frames survive across reboots.
π Requirements
π Background
π Steps
π Step 1: Create the MTU Fix Bash Script
sudo nano /usr/local/bin/fix-ovs-mtu.sh
Paste this:
#!/bin/bash
sleep 20
ovs-vsctl set interface eth4 mtu_request=9000
ovs-vsctl set interface xenbr4 mtu_request=9000
echo "$(date) - MTU 9000 applied to eth4 and xenbr4" >> /var/log/fix-ovs-mtu.log
Make it executable:
sudo chmod +x /usr/local/bin/fix-ovs-mtu.sh
π Step 2: Create the systemd Service
sudo nano /etc/systemd/system/fix-ovs-mtu.service
Paste this:
[Unit]
Description=Fix OVS Interfaces MTU to 9000 After Boot
After=network-online.target openvswitch-switch.service
[Service]
ExecStart=/usr/local/bin/fix-ovs-mtu.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
π Step 3: Enable the Service
sudo systemctl daemon-reload
sudo systemctl enable fix-ovs-mtu.service
sudo systemctl start fix-ovs-mtu.service
sudo systemctl status fix-ovs-mtu.service
π Step 4: Validate
sudo systemctl status fix-ovs-mtu.service
ip link show eth4
ip link show xenbr4
ovs-vsctl list interface eth4 | grep mtu
ovs-vsctl list interface xenbr4 | grep mtu
π Expected Results
π Troubleshooting
π Bonus: Quick MTU Validation Script
#!/bin/bash
echo "Checking eth4:"
ip link show eth4 | grep mtu
echo "Checking xenbr4:"
ip link show xenbr4 | grep mtu
echo "Checking VMs VIFs:"
ip link | grep vif | grep mtu
π Final Notes
mtu_requestΒ in OVS and using a small systemd service guarantees success across reboots.
Jumbo frames dramatically improve 10GbE performance, especially with storage traffic like iSCSI and NFS.