Network Condition Simulation with VMware Workstation Pro

If you are a network geek like me, I am keenly interested in the features and capabilities available from a network perspective. There is a feature available as part of VMware Workstation Pro that caught my attention that can be an extremely powerful tool for use in testing, development, architecting solutions, etc. It is Network Condition Simulation with VMware Workstation Pro. What is Network Condition Simulation? How do you use it with VMware Workstation Pro 16?

What is Network Condition Simulation?

Network Condition Simulation is a new feature contained in VMware Workstation Pro since version 14 that allows simulating various types of network features. These features include:

  • Bandwidth (Kbps)
  • Latency
  • Packet Loss

You can control these features of your connection for both the incoming and outgoing connections.

I have written about ways to simulate network latency in a lab before using the Linux tools TC and NetEM. 

Below is an example of using TC and NetEM to for simulating network latency and other characteristics. 

tc qdisc add dev eth1 root handle 1: htb
tc class add dev eth1 parent 1: classid 1:1 htb rate 1000mbit
tc filter add dev eth1 parent 1: protocol ip prio 1 u32 flowid 1:1 match ip src 192.168.80.0/24
tc qdisc add dev eth1 parent 1:1 handle 10: netem delay 100ms 10ms

Use Cases for simulating network latency, packet loss, and bandwith

You may ask, what specific use cases are there for simulating network latency, packet loss, and bandwidth? Well, there are actually quite a few to think about.

Suppose you are a developer who is coding an application that has slow WAN links in the mix. It would be nice to actually see how your application handles connectivity that is less than desirable.

Also, what if you are creating a lab environment that takes multiple sites into account? Wouldn’t it be great and realistic to incorporate the actual characteristics of the network links in between your nodes?

There are probably many other scenarios that when you start to think about it, network condition simulation would be a great tool.

Network Condition Simulation with VMware Workstation Pro

There is a feature found in VMware Workstation Pro since VMware Workstation Pro 14 called Network Condition Simulation. With this feature, you have the ability to easily simulate various network characteristics including bandwidth, latency, and packet loss. How is this implemented?

I am using VMware Workstation Pro 16 for the demonstration. Take a look first at the scenario here. I have a Windows 10 Pro workstation running in VMware Workstation. I have started a continuous ping on my lab gateway which is working as expected. I see sub 1 ms latency, no packet loss, etc.

Pinging a network address without any network condition simulation in vmware workstation pro
Pinging a network address without any network condition simulation in vmware workstation pro

Now, let’s have some fun with the network connection on the VMware Workstation Pro virtual machine. Navigate to the virtual machine Settings > Network Adapter > Advanced button.

Configuring the advanced network adapter settings for a vm in vmware workstation pro
Configuring the advanced network adapter settings for a vm in vmware workstation pro

After clicking the Advanced button, you will see the Network Adapter Advanced Settings dialog box displayed. Note the wealth of options we have for configuring the network condition simulation. These include:

  • Bandwidth
  • Packet Loss % – range is 0 to 2000 ms
  • Latency (ms)
  • Incoming and Outgoing configuration

Below I have introduced 20% packet loss and 50ms latency on Outgoing Transfer. After you click OK on the dialog box and OK on the settings box, the network condition simulation configuration starts immediately.

Viewing the network condition simulation settings in vmware workstation pro
Viewing the network condition simulation settings in vmware workstation pro

Note below, the screen of the continuous ping I had working on the gateway address. Immediately you see the impact on the ping running on the gateway device.

After introducing latency and packet loss with vmware workstation pro
After introducing latency and packet loss with vmware workstation pro

As you can tell, you can easily simulate the impact of extremely slow or otherwise flaky network connections using the Network Condition Simulation functionality found in VMware Workstation Pro.

Notes from VMware

VMware makes the note below regarding latency:

Note:

Expect actual network latency to be up to 10 ms above the number you set. For example, if you set latency at 200 ms, expect the actual latency to be between 200 to 210 ms.

Wrapping Up

Many other great features found in the latest versions of VMware Workstation Pro are highlighted by various blogs and feature announcements and the new functionality is excellent. However, network condition simulation is a very underrated new feature in VMware Workstation Pro IMHO. Hopefully, this post will shed light on this great new feature.

Post a Comment

0 Comments