Problem solve Get help with specific problems with your technologies, process and projects.

How to simulate a multisite network with VMware Workstation

If you want to test out a WAN link between two networks with VDI, VMware Workstation can help. Here's how it works.

As an IT professional, it is common to use VMware Workstation to simulate a production VDI deployment to test changes...

before implementing them across the organization. You can also use Workstation to simulate a multisite network with a WAN link between two sets of machines.

There is an excellent feature in VMware Workstation that allows you to simulate a WAN link between two networks -- each with their own VMs -- all on one PC. There are expensive hardware boxes that simulate WAN links, as well as virtual appliances, but the built-in functionality in VMware Workstation is easy to implement and use. You can specify the three primary characteristics of a WAN link: the bandwidth of the network, latency and packet loss.

This example multisite network shows how to set up a WAN link that spans across the Pacific Ocean, with one VM in New Zealand and the other in California. A router joins the two VMs.

This router VM's network interfaces are configured to represent the WAN link with bandwidth limits and latency. You can easily expand the two sites by adding more VMs to each network.

Start with two networks

To keep things simple, start with two networks. Open the Virtual Network Editor from the Edit menu in VMware Workstation.

Virtual Network Editor
Open Virtual Network Editor.

Use the existing VMnet1 as one of the sites and add VMnet3 as the other. Enable changes by clicking Change Settings, then click Add Network. You can accept the defaults and add another network.

Next, turn off the VMware Workstation Dynamic Host Configuration Protocol (DHCP) server for these networks and untick the box for the two network adapters. Use the router VM as a DHCP server.

That is all you need to change. Note the subnet addresses and click OK to apply the changes.

Note the subnet addresses
Note subnet addresses and click OK.

Deploy a router

To create a multisite network you can use any router that will run in a VM. This example uses VyOS, an open source router.

You can download the virtual appliance and open it with Workstation. The only change you have to make is to assign one network interface card (NIC) each to VMnet1 and VMnet3.

Assign NICs
Assign one NIC each to VMnet1 and VMnet3.

Once you boot the VM, do some basic configuration following the directions in the VyOS User Guide.

The tasks are to assign IP addresses to the two NICs then enable DHCP. On VyOS, this requires seven lines of configuration.

VMs at the sites

You can build a simple Windows 10 VM and copy it so you have two VMs. One is connected to VMnet1 and the other to VMnet3. When you power them on, they each get an IP address in their respective subnet from the router.

To test basic IP connectivity, ping one VM from the other. The VyOS router does this. Notice this example uses ping -l 5000. The -l switch uses a larger packet, which will be important when you start limiting bandwidth.

Test basic IP connectivity
Ping one VM from the other with the VyOS router.

Now you have two sites with different IP subnets with routing between them. You could use this to look at how Active Directory replication works between sites or maybe have an application server in a data center site and use the other site as a remote branch to test application performance over the network.

To make the network look more like a branch office, you must add some of the characteristics of a WAN.

Make a LAN into a WAN

When you create a multisite network, you manipulate just one interface on the VyOS router, setting both inbound and outbound values on the same interface. Open the VM settings, choose the first NIC and click the Advanced button.

Now add some latency. This example uses 80 milliseconds (ms) in each direction because it provides 160 ms of round-trip latency, which is about what you would get from New Zealand to California. Latency is the amount of time it takes for a one or zero to get from one site to the other. The minimum latency for a link is caused by the one or zero traveling at the speed of light from one end to the other, so it is directly related to the distance between the ends.

Network latency
Add latency to the network.

Now, when the Windows 10 VM pings, the time= column says around 160 ms where it used to read 1 ms.

Latency changes
Results of Windows 10 VM pinging the time= column

Limit the bandwidth between the sites by increasing the time it takes to move those 5,000-byte packets. This example uses a limit of 192 Kbps so that the difference is visible. The actual bandwidth of 10 MBps wouldn't limit such a small transfer, but is very noticeable when you download hundreds of megabytes. There are a variety of preconfigured options in the Bandwidth drop down or you can simply enter a value in the Kbps box.

Limiting bandwidth
Limit the bandwidth between sites.
Bandwidth results
The bandwidth results

Now the 5,000-byte packet takes even longer to transfer.

The example network is now a multisite network with WAN joining the two site LANs, and it replicates the physical WAN links in the real network.

Depending on what you need to test, you can make a variety of changes.

Depending on what you need to test, you can make a variety of changes. You could add another NIC to the router and have it provide internet access with its own bandwidth and latency limits. You could add more NICs and more site networks or use virtual networks that are bridged to different physical network adapters in your PC, then connect physical computers to the site network.

This was last published in June 2018

Dig Deeper on Virtual desktop strategies and architecture

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

What is the ideal use case for a WAN link that spans two networks?
Cancel

-ADS BY GOOGLE

SearchEnterpriseDesktop

SearchServerVirtualization

SearchCloudComputing

SearchVMware

Close