INF5072 - Amazon VM and Transport Protocol FAQ

 

Page for resources and frequently asked questions for the Amazon EC2 VMs and Congestion Control. If you have any other questions, please send an email to inf5072@ifi.uio.no

 

Which VMs can we use for getting familiar with the test environment?

Instance in Ireland - instance ID: i-0af4f6f97dffb02e6

Instance in N. Virginia - instance ID: i-0513c194a46cd64f2

 

How can I install the Amazon EC2 command-line tools in Linux?

For Debian-based systems, you can install the ec2-api-tools package.

sudo apt-get install ec2-api-tools  

For other distributions, please consult the package manager in question.

 

How can I control my instances from the command line on non-Linux OSes?

There's a Python-based command-line interface that should work on all platforms. You have to get familiar with its use as we have only tested the Linux terminal controls so far. Check out the documentation for more information: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html

 

How can I get the Instance public IP and check wether it's running?

Instance in Ireland - instance ID: 

ec2-describe-instances -O <user access key> -W <user secret key> -region eu-west-1 <instance ID>

Instance in N. Virginia - instance ID: 

ec2-describe-instances -O <user access key> -W <user secret key> -region us-east-1 <instance ID>

 

How do I start and stop the Amazon instances?

Use the command-line tools to bring the VM down and up again:

 ec2stop -O <user access key> -W <user secret key> --region <region: [eu-west-1 | us-east-1]> <instance ID>

 ec2start -O <user access key> -W <user secret key> --region <region: [eu-west-1 | us-east-1]> <instance ID>

 

I cannot see the public IP when running ec2-describe-instances?

You need to start the instance before it will get a public IP. See the above question.

 

Where do I get the access keys to the Amazon Instances?

When you contact the course administration to get a group number, we will provide you with the access keys and the SSH key for logging in to the test instances.

When the graded assignment is handed out, all registered groups will get exclusive instances with the corresponding access keys on email.

 

How do I log into the amazon instances?

You can log into the instances using ssh and the key pair provided by us:

 ssh -i <private rsa key> ubuntu@<instance public IP>

 

SSH gives me an error when I try to connect?

Your key must not be publicly viewable for SSH to work. Use this command if needed:
chmod 400 key_name_rsa

 

What is the testbed scenario?

The testbed scenario is the case of a web service provider that needs to choose a transport protocol for providing services to clients in homes and businesses. The data centre of the provider is well provisioned with resources and bandwidth, so the assumption is that the bottleneck usually is located at the edge close to the client. See the below figure for reference.

Evaluation scenario

We will emulate this scenario by creating an artificial bottleneck on the client (receiver) side.

 

Why do we need to create an artificial bottleneck?

If we don't limit the bandwidth on the path and create a bottleneck for the experiments, we will, in practise, measure the functionality of the traffic-limiting token buckets applied by the VM resource control system on the sender. his defeats our purpose of a controlled experiment. The network capacity from the sender VM was measured to be between ~50Mbps and ~80Mbps. If we limit the bottleneck to 10Mbps, we should be pretty certain to measure what we really want. We will also save money as Amazon charges for the capacity used.

 

How do I limit the incoming bandwidth on the receiver node?

Usually, Linux traffic control (tc) will only be applicable on outgoing interfaces. To work around this, we have to create a virtual interface on the receiver and make the incoming traffic pass through this interface. We can then attach a bandwidth-limiting token bucket and any queue type and configuration that you might like to measure on that interface.

A code example to do this is listed below:

sudo modprobe ifb

sudo ip link set dev ifb0 up

sudo tc qdisc add dev eth0 ingress

sudo tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0

sudo tc qdisc add dev ifb0 root handle 1: htb default 10

sudo tc class add dev ifb0 parent 1: classid 1:10 htb rate 10mbit burst 3000

sudo tc qdisc add dev ifb0 parent 1:10 pfifo limit 120

These commands will create the virtual interface, attach a hierarchical token bucket to the interface and add a FIFO queue with room for 120 packets to the token bucket rate limiter.

The burst parameter needs to be large enough to fit one packet (but ideally no more). Since it seems the path MTU between the Amazon instances allows 2962 Byes of data in one packet, we tentatively set it to 3000 in this example.

 

Can I install package foo on the VM?

You have full sudo access and may install whatever tool helps your work.

 

I made a mistake configuring network interface bar0 and now I cannot connect to the VM.

Use the command-line tools to bring the VM down and up again:

 ec2stop -O <user access key> -W <user secret key> --region <region: [eu-west-1 | us-east-1]> <instance ID>

 ec2start -O <user access key> -W <user secret key> --region <region: [eu-west-1 | us-east-1]> <instance ID>

 

I made a mistake configuring network interface bar0 and now I cannot connect to the VM. By the way, I managed to change the configuration files to make the change persistent and active on boot.

Don't. Please Don't. 

(We'll have to make a new instance from the template and won't care about recovering the data from your old image in the process.)

 

I'm using iperf/iperf3 and seem to be getting strange results. Any pointers?

Strange things seem to happen when using iperf as a tool for generating traffic. Strange results may come both from the built-in statistics and from the traffic generation. Suggested solution: hack netcat so that the congestion control can be specified through a command-line parameter (someone might share a modded netcat eventually).

 

Can you point me to some tools that might be useful for analysing pcap traces?

Here's some links to tools that has come up as potentially useful, depending on what you want to achieve: