What applications can you write tests for?
Before we describe how to create a new Glasnost test, let us point out two important things about Glasnost tests.
First, Glasnost currently only supports testing application traffic that uses TCP; at this time UDP is not supported.
Second, our current implementation of Glasnost uses throughput as a measure for performance. This means that Glasnost
detects traffic differentiation that affects flow throughput (throttling or blocking). Hence, Glasnost is most suitable
to test application traffic that is bandwidth-intensive, such as P2P filesharing, HTTP downloads, etc. Testing for
latency-sensitive applications (e.g., Skype, online games) that may be shaped by delaying packets is currently not supported.
For accurate detection of traffic shaping, our algorithm assumes:
- The application flows are long (typically longer than 10 seconds) to allow for an accurate throughput estimation.
- The throughput of the application flow is not limited by the application. Applications that use a large download work
best (e.g., BitTorrent, Web download, etc.), while for example VoIP applications typically send data at a constant bitrate,
which is not suitable for Glasnost.
Please mind these assumptions when creating your own Glasnost test.
The 4 steps to create a new Glasnost test
This is a brief introductory tutorial to trace-emulate. We also provide a more detailed example here.
For more details on how Glasnost tests work, please
read our NSDI 2010 paper.
1. Download the test generation tool
You can download our trace-emulate tool by clicking on this link.
Trace-emulate is written in python.
You will need a python environment installed on your machine to run it.
Some systems (like MacOS and Linux) have python installed by default.
To download and install python for your operating system, please visit the official Python website.
A detailed description of the parameters of trace-emulate can be found below.
2. Collect a packet trace of a network application you suspect your ISP is differentiating
To create a new test, you have to collect a pcap packet trace of your application's traffic.
There are free programs available to do this, e.g.,
Tcpdump and
Wireshark.
We added detailed descriptions on how to collect a trace below:
Please note that for the moment Glasnost only supports traffic differentiation detection for
applications that use TCP.
3. Run trace-emulate on the collected trace
On the command line, type something like this:
python trace-emulate.py <yourPcapTraceFile>
Replace <yourPcapTraceFile> with the name of the file that contains your trace.
4. Upload the generated test file(s) to Glasnost and run the test
At this point, trace-emulate will produce a number of test files, one for each TCP connection contained in the trace.
You can upload one of these files to Glasnost through this Web page and run the test.
Important advice when generating a Glasnost test
Privacy:
A trace of your network traffic may contain sensitive information such as passwords, user names, or
credit card numbers. The generated tests will contain this information as well.
Make sure the generated tests do not contain information you are uncomfortable giving away:
Do not generate tests from traffic that might contain sensitive information and
inspect the generated test files and search for potential sensitive information that might be contained.
Creating accurate tests:
In order for trace-emulate to correctly generate a test, you should obey the following three points:
- Always capture full packet payloads. Trace-emulate needs the full packet payloads to generate the
message payloads. In tcpdump, use the "-s 0" option to tell Tcpdump to include the full packet
content. Wireshark captures full packet payloads by default.
- Start capturing packets before you start your application. Trace-emulate needs to see the initial
SYN/ACK exchange in order to generate a test for a TCP connection. Therefore, you need to start your
application before the packet capture process begins in order to be sure to capture the initial SYN/ACK
exchanges.
- Restrict your trace to the application you are interested in. Trace-emulate does not know which
application generated the trace, and will by default include all TCP connections in the output test
(see trace-emulate in detail below for how to adjust this). Therefore, try to
restrict your trace to the packets generated by the application you are interested in. You can do this by
using tcpdump/wireshark filters. If you have a trace that comprises many connections from multiple
applications, you can use some of the options presented below to filter out the connections to include in
the output.
Tip: If your application opens many connections (e.g., BitTorrent), it makes sense in many cases to
focus on the test generated from the connection that transferred the most data. Put simply, if you generate many
tests for an application and don't know which one to use, pick the largest one.
Trace-emulate in detail
Usage: python trace-emulate.py [options] <pcap_file>
Replace <pcap_file> with the name of your trace file. You can also use "–" to make trace-emulate read from the standard input. Trace-emulate supports reading from compressed gzip files (.gz), just make sure that the files have the .gz extension.
Trace-emulate accepts the following command line options:
- -h, --help shows this help message and exit
- -d, --include-delays whether to generate pause commands based on time
delays in the trace [default: none]
- -s SPACING, --spacing-lines=SPACING
number of empty lines to insert between subsequent
commands [default: 1]
- -p PROTO, --proto=PROTO
protocol name [default: name of pcap file]
- -l MAX_TEST_SIZE, --limit-test-size=MAX_TEST_SIZE
truncate test size to this value [default: 5MB]
- --client-host=CLIENT_HOST
if provided, only consider connections with this host
as client
- --server-host=SERVER_HOST
if provided, only consider connections with this host
as server
- --concatenate-tests concatenate all tests to standard output, don't create
any files
- --client-port=CLIENT_PORT
if provided, only consider connections with this
client port number
- --server-port=SERVER_PORT
if provided, only consider connections with this
server port number
- --port=PORT if provided, only consider connections involving this
port number
- --host=HOST if provided, only consider connections involving this
host
In case you have questions about this tool or our research, please contact us:
