Tutorials/CloudSim/1.3/traffic shaper

Using the traffic shaper tool to modify latency ===

This tutorial covers:
 * Modify the latency between your local machine and some of the machines within the cloud.

Prerequisites === This tutorial assumes you have a cloudsim already installed and ready to use. Check out this section for setup.

Introduction ===

CloudSim allows you to vary the amount of additional latency that gets injected inside a constellation based on the intrinsic latency between the local machine and the cloud. The router (trio constellation) or the simulator machine (simulation constellation) makes the latency injection via tc command (show / manipulate traffic control settings). The intrinsic local machine/cloud latency is measured and the additional latency required to reach the desired latency is added.

How to modify latency on a single simulation machine ===

First of all you should start launching your simulator constellation. Check out the tutorials for launching a single simulator machine.

Once the constellations is up and running, click on the Download Keys link of the simulator machine. Unzip the content and change to the new directory created (note that the name of the file includes the constellation id, so your file name will be different from the one shown in the tutorial.

cd Downloads unzip simulator_cx9c69e124.zip cd simulator_cx9c69e124

Your current directory contains keys and scripts for starting the vpn and for opening a ssh session with the simulator machine easily. Let's try starting the vpn and doing a ssh to the router machine by running the next command.

sudo ./start_vpn.bash . ssh.bash

You'll see the prompt of the simulator machine confirming that the ssh connection is properly established. Now verify your current latency by running ping command towards your local machine.

ping 11.8.0.2

Modify the traffic shaper widget to reach 500ms. of round trip time latency between your local machine and the simulation machine.



Verify that the latency time in the ping console increases accordingly.



You can also press the Reset button to restore the default settings.

Be careful with high values of latency as they might cause that your router does not respond properly (values higher than 500ms. will be ignored to avoid connectivity problems).

How to modify latency on a VPC trio constellation ===

First of all you should start launching your VPC trio constellation. Check out the tutorial for launching a VPC trio.

Once the constellations is up and running, click on the Download Keys link of the router machine. Unzip the content and change to the new directory created (note that the name of the file includes the constellation id, so your file name will be different from the one shown in the tutorial. Let's start the vpn, using the key available from the router machine.

cd Downloads unzip router_cx17bdef98.zip cd router_cx17bdef98 sudo ./start_vpn.bash

Now that the VPN is started, the field computer is accessible. Use ping to send packets to your field computer. ping 10.0.0.52

Modify the traffic shaper widget to reach 500ms. of round trip time latency between your local machine and the field computer machine.



Verify that the latency time in the ping console increases accordingly.



You can also press the Reset button to restore the default settings.

Be careful with high values of latency as they might cause that your router does not respond properly (values higher than 500ms. for latency will be ignored to avoid connectivity problems).


 * 1) Next ##

Next: CloudSim development