I'm experiencing low bandwidth on my VPN connection. What tests can I run to verify that the issue is not occurring inside my Amazon Virtual Private Cloud (Amazon VPC)?

Launch two EC2 instances running Linux for testing

Before beginning performance tests, launch EC2 Linux instances in at least two different Availability Zones in the same VPC. You'll use these instances for network performance testing. Verify that the instances support enhanced networking on Linux.

Note: If you are performing network testing between instances that are not co-located in the same placement group or that do not support jumbo frames, check and set the MTU on your Linux instance.

Then, make sure that you can connect to the instances through SSH, and configure the security groups used by your instances to allow communication over the port used by iperf3. When testing TCP performance, the default port is 5001.

Note: You can use -p to configure iperf3 to use your desired port.

Install the iperf3 network benchmark tool on both instances

Connect to your Linux instances using a terminal session, and then install iperf3:

To install iperf3 on RHEL-based Linux hosts:

$ sudo yum --enablerepo=epel install iperf iperf3

To install iperf3 on Debian/Ubuntu hosts:

$ sudo apt-get update    
$ sudo apt-get upgrade
$ sudo apt-get install git gcc make
$ git clone https://github.com/esnet/iperf
$ cd iperf
$ ./configure
$ sudo make
$ sudo make install
# optionally run "make clean" to free up disk space
# by removing artifacts in the build tree.
$ sudo make clean
$ sudo ldconfig

Next, run the following command to configure one instance as a server to listen on the default port:

$ sudo iperf3 -s -V

Run network tests using iperf3

Configure your on-premises host as a client, and then run one or more of the following tests against your instance:

The output of the following commands displays the results of 20 parallel streams with increasing window size per TCP connection:

sudo iperf3 -c <Private/public IP of instance> -P 20 -w 128K -V
sudo iperf3 -c <Private/public IP of instance> -P 20 -w 512K -V
sudo iperf3 -c <Private/public IP of instance> -P 20 -w 1024K -V

The output of the following commands displays the results of increasing bandwidth capacity and a time frame of 30 seconds per UDP connection:

iperf3 -c <Private/public IP of EC2 instance> -u -b 200M -t 30
iperf3 -c <Private/public IP of EC2 instance> -u -b 500M -t 30
iperf3 -c <Private/public IP of EC2 instance> -u -b 1G -t 30

Run the iperf3 tests between the private IP addresses of your EC2 instances and on-premises hosts bi-directionally to benchmark the network throughput on your VPN connection. Then, run these tests between the two public IP addresses of your instances to benchmark throughput over the Internet. If the variance between the two test results is significant, contact AWS Support and provide the following:

  • The results from the iperf3 tests you performed
  • The VPN ID
  • Your AWS account number
  • A copy of your customer gateway device configuration along with its make, model, and software version
    Note: Remove any sensitive information (for example, passwords) from anything you provide to AWS Support.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2017-02-24

Updated: 2018-01-03