Tutorials/CloudSim/1.3/bandwidth accounting

Start/stop the bandwidth accounting and logging ===

This tutorial covers:
 * The activation/deactivation of the vrc bandwidth tool

Prerequisites === This tutorial assumes that you have a cloudsim already installed and ready to use. Check out this section for setup. It is also assumed that you have a running trio constellation with Gazebo and ROS already started, and you are connected  using the vpn.

Introduction ===

Part of the Virtual Robotics Challenge is to reproduce the network environment that may be available in dangerous and degraded scenarios. To simulate this aspect, the teams may not exceed a specific allotments of uplink and downlink bits. As a first prototype, a tool called vrc_bandwidth has been included in the router of every trio constellation.

How to start/stop vrc_bandwidth ===

Once the constellation and gazebo simulator are up and running, download the router keys, start the vpn, ssh into the router machine, and `source /opt/ros/fuerte/setup.bash`.

Start the bandwidth accounting by publishing a message into the /vrc/state/start topic: rostopic pub -1 /vrc/state/start std_msgs/String start

After some time, stop the accounting by publishing a message into /vrc/state/stop topic: rostopic pub -1 /vrc/state/stop std_msgs/String stop

A new file in /tmp/bandwidth.log should be created with a content similar to this: 1363206568.45 7905.29 69.133 57.651 1363206569.46 7906.29 136.062 111.316 1363206570.49 7907.31 203.614 166.906 1363206571.5 7908.3 269.52 220.355 1363206572.55 7909.339 337.896 275.096 1363206573.51 7910.291 402.088 326.36 1363206574.53 7911.29 467.868 379.608 1363206575.55 7912.289 534.366 433.57

The first column represents the local time of the router. The second column captures the /clock topic from the simulator machine. The third and four columns store the inbound and outbound traffic respectively, measured in kilobytes. Every row accumulates the traffic since the /vrc/state/start topic was received.

vrc_bandwidth accounts IP traffic directly (headers and data) and is not doing any inspection of the packets.