Jumbo Frame Testing in ESX4

You are here: Home » Virtualization » Jumbo Frame Testing in ESX4

How to test your jumbo frame (MTU 9000) setup in ESX4:

vmkping -s 8700 192.168.4.254

Here is a shell script to turn on Jumbo Frames (MTU 9000) in ESX4 (change the line with 192\.168 to your subnet):
ON

NEWMTU=”9000″
# grep the virtual switch MTU
echo Old vSwitch0 MTU: `esxcfg-vswitch -l | grep vSwitch | awk ‘{print $5}’`
esxcfg-vswitch -m $NEWMTU vSwitch0
echo New vSwitch0 MTU: `esxcfg-vswitch -l | grep vSwitch | awk ‘{print $5}’`
# grep the virtual vm nic MTU
#esxcfg-vmknic -l | grep 192\.168| awk ‘{print $9}’
#fix this IP
IP=`esxcfg-vmknic -l | grep 192\.168| awk ‘{print $5}’`
esxcfg-vmknic -d “VMkernel 2”; esxcfg-vmknic -a -i $IP -n 255.255.255.0 -m $NEWMTU “VMkernel 2”
# this is very important
ifconfig vswif0 mtu $NEWMTU

OFF
NEWMTU=”1500″
# grep the virtual switch MTU
echo vSwitch0 MTU: `esxcfg-vswitch -l | grep vSwitch | awk ‘{print $5}’`
esxcfg-vswitch -m $NEWMTU vSwitch0
echo vSwitch0 MTU: `esxcfg-vswitch -l | grep vSwitch | awk ‘{print $5}’`
# grep the virtual vm nic MTU
esxcfg-vmknic -l | grep 192\.168| awk ‘{print $9}’
#fix this IP
IP=`esxcfg-vmknic -l | grep 192\.168| awk ‘{print $5}’`
esxcfg-vmknic -d “VMkernel 2”; esxcfg-vmknic -a -i $IP -n 255.255.255.0 -m $NEWMTU “VMkernel 2”
ifconfig vswif0 mtu $NEWMTU

These are unsupported tweaks. After the CLI changes you need to enable MTU 9000 on your virtual switches.