TCP with Packet Control



Introduction

TCP with Packet Control was implemented in ns-2.26 (ns-2.1b10 for old version number) simulator on RedHat Linux 9. Simulations are conducted to investigate the performance of the packet control algorithms comparing to TCP Reno in the presence of long delays and delay variations in wireless links.

Installing ns-2

Download ns-2 version 2.26 from the ns-2 homepage.

In the sections that follow, we assume that ns-allinone was installed in your home directory (~).

Unpack the ns-2 package in your home directory:

> cd ~
> tar xzvf ns-allinone-2.26.tar.gz

This will create an "ns-allinone-2.26" subdirectory with all required files and subdirectories.

If you wish to use packet control, you should install it at this point. Follow the installation instructions in the next section. Then, run the ns-2 installation script:

> cd ~/ns-allinone-2.26
> ./install

When the installation completes, set the environment variables as instructed by the ns-2 install program.

Installing TCP with Packet Control

Copy packet control zip file to your home directory.

Unzip it and replace ns-2.26 directory in the "ns-allinone-2.26" directory:

> cd
> unzip ns-2.26.zip
> mv ns-allinone-2.26/ns-2.26 ns-allinone-2.26/ns-2.26.original (this backs up the original ns-2 source.
> mv ns-2.26 ns-allinone-2.26

This will install ns-2 with packet control algorithms implemented.

Recompiling ns-2

If you are installing packet control into an existing, already compiled ns-2 installation, then ns-2 needs to be recompiled before the changes take effect:

> cd ~/ns-allinone-2.26/ns-2.26
> ./configure
> ./make clean
> ./make

Using packet control

There are two properties exported for packet control: enableAckControl_ and Redefine3DupAck_. Setting enableAckControl_ to "1" enables packet control, while "0" disables it. Redefine3DupAck_ can be used to set user defined duplicate ACK threshold when packet control is enabled. The following is a sample OTcl script you can use to enable packet control.

# Use Packet Control Link Layer on BS ($node(0) in our network setup)
$lan addNode [list $node(0)] $opt(bw) $opt(delay) LL/LLWz $opt(ifq) $opt(mac)

# get LL object of BS
set nif [$lan set lanIface_($node(0))] ;#get network interface object.
set llBS [$nif set ll_]

# configure Packet Control
$llBS set enableAckControl_ 1 //enables packet control
$llBS set Redefine3DupAck_ 8 //set user defined dup ACK to 8
$node(0) label "n0 "

The simulation scripts used for performance evaluation in published paper can be found in the included zip file.

Publications and presentations

Other notes and limitations

For details of the design and implementation of TCP with Packet Control, please reference my Master thesis.

Questions

If you have any other questions, please e-mail me at wgzeng at cs.sfu.ca.

Wan Gang Zeng