Home | Schedule | Papers | Resources | Review Template | Project 1

NS-2 Project: Trace-based Simulations

In this project, you will use ns-2 to measure NEO performance when traffic follows the pattern given through a trace file. The trace file is a tcpdump of a number of players using a Counterstrike server. From this file, you will need to extract at least one play session between players and determine the size of each packet sent, and by who, so that these values can be used for NEO.


The files you need are as follows:

Note that the trace file, in particular is BIG (.75G), so try to download it only once. Do not try this at home, it'll take a long time. Also, DON'T check it into the respository!

In addition to the ns-allinone-2.31.tar.gz, you'll want to grab the NEO files from the subversion respository. You can get these from: https://svn.cs.du.edu/courses/comp4705/s2007. You'll want to make sure you visit the https://svn.cs.du.edu website for instructions on generating a password that you can send to Christian to get an svn account. Make sure in your email you specify that this is for COMP4705.

NEO Protocol

NEO is a protocol, that in its most basic form, simply unicasts packets to all other peers based on updates given by the player. It does this periodically, where the period is determined by the game style and game designers. We refer to this period as a round, which has a round length (or duration). Initially, players synchronize clocks, and all rounds occur at the same time for all players and rounds proceed until the end of the game.

What to Do

Now the trace file is going to show the inputs received by the server and since we don't know when they were sent (because we don't know the amount of time it takes for each packet to travel from the clients to the server), they may be received at some input greater rate (i.e., shorter) than the round length permits. Your goal is to basically queue up the data and send it as a packet. You'll have to modify some of the neo C++ code and TCL code to do this.

To read from the tcpdump file, use the command tcpdump -r <filename>. You can use this to process the lines and determine what data is being sent to the server, and in what quanity.

Under the neo directory, you will see the source code for the NEO protocol. The way the protocol currently works, you configure the round length, tell ns-2 when to start the protocol, and every round length in seconds each NEO client will send an update to every other NEO client (we also have to put all the NEO clients into the same group, which is done through TCL: look in the scripts directory for examples). By default, the size of a NeoUpdate is fixed in the neo.h header file. You'll want to figure out how to set this size dynamically according to how much data the client should be sending.

For the actual simulation, just use a simple star topology, with 50ms links to the center of the star and 1Mbps bandwidth per link.