Fix Extremely Slow NAT in VMWare ESXi Host Using Linux VMs

debianlinuxnat;routervmware-esxi

I have a VMWare ESXi host attached to a fast network.
The host runs two virtual machines:

  1. Gateway
  2. Client

The gateway has two network interfaces, one that's bridged to the external network (vSwitch0), and one that's bridged to the server's internal network (vSwitch1). It has firehol installed and it's doing NAT and port forwards for the internal client machine.

The client machine has an internal IP and connects via the gateway to the internet. Everything works well, but transfer speeds from the client to the internet is very slow, less than 30kB/s. Tranfers both to and from the gateway to the internet is fast (100Mbit), and so is traffic from the internet to the client. I've tried doing a network dump to see where the problem could be, but didn't find anything. Everything just looks like the line is slow.

Also, the transfer speed between the two VMs is almost a full gigabit. So that's not the problem either. Both machines are running Debian Lenny with no special modifications. I'm using open-vm-tools for VMXNET paravirtualized networking.

Best Answer

I found the solution to this problem.

For a completely internal network (that's not attached to any physical network interface) you need to disable TCP Segmentation Offloading from inside the OS.

It's a simple command:

ethtool -K <interface> tso off

After this command my transfer speeds went from 30kb/s to full 100Mbit.