XenServer 6.2 – Changing MTU Settings

interfacemtuxenserver

So I've looked around for a way to change the MTU of interfaces on XenServer 6.2, but can't find anything that works for me …

One method spoke about changing the ifcnfg-intX files in the /etc/sysconfig/network-scripts directory, but the files just aren't there … The only one there is the ifcnfg-lo file. Do I just need to create a file for each interface?

Then I thought, I'll just make a startup script:

#!/bin/bash
#Saved as /etc/init.d/mtuchange.sh
#Change mtu of interfaces
ifconfig xenbr0 mtu 1454
ifconfig xenbr1 mtu 1454
ifconfig eth0 mtu 1454
ifconfig eth1 mtu 1454

This script works when ran in console.

So, to make it run at start:

ln -s /etc/init.d/mtuchange.sh /etc/rc3.d/S99mtuchange

But, it wont run …

The reason I need to change the MTU, is for some strange reason, XenCenter can't connect with the MTU being the default of 1500, it has to be 1454

Anyone know what I'm doing wrong?

Best Answer

There's some discussion on the Xen wiki of how to do this: Xen wiki network performance page. In short:

Enabling Jumbo Frames

Suppose eth6 and xenbr6 are the device and the bridge corresponding to the 10 GiB/sec connection used.

Shut down user domains:

VMs=$(xe vm-list is-control-domain=false params=uuid --minimal | sed 's/,/ /g')
for uuid in $VMs; do xe vm-shutdown uuid=$uuid; done`

Set network MTU to 9000, and re-plug relevant PIFs:

net_uuid=`xe network-list bridge=xenbr6 params=uuid --minimal`
xe network-param-set uuid=$net_uuid MTU=9000
PIFs=$(xe pif-list network-uuid=$net_uuid --minimal | sed 's/,/ /g')
for uuid in $PIFs; do xe pif-unplug uuid=$uuid; xe pif-plug uuid=$uuid; done

Start user domains (you might want to make sure that VMs are started one after another to avoid potential VIF static allocation problems):

VMs=$(xe vm-list is-control-domain=false params=uuid --minimal | sed 's/,/ /g')
for uuid in $VMs; do xe vm-start uuid=$uuid; done

Set up the connections you will use inside the user domains to use MTU 9000. For Linux VMs, this is done with:

ETH=eth1   # the user domain connection you are concerned with
ifconfig $ETH mtu 9000 up

Verifying:

xe vif-list network-uuid=$net_uuid params=MTU --minimal
Related Topic