Find out how ICT can support biomedical and clinical researchFind out more. From Clever cars to clever farms... Embedded Systems
Latest Tweets
freezetcp

Freeze-TCP (ns-2 and Linux implementations)




Freeze-TCP is an extension proposed in [1] to mitigate the effect of mobility on TCP connections. The basic idea is to "freeze" the TCP senders' streams little before a disconnection is to occur. This is done by artificially sending a "Zero Windows Advertisement" informing the sender that the receiver cannot receive data at the moment. When the sender resumes its connectivity, it can unfreeze the sender by sending the value of its actual receive window. The most interesting advantage of this proposal is the avoidance of the slow-start period upon re-establishment of connectivity.

nsFreeze-TCP extension for ns-2

ns-2 patch

In [2], A. Baig et al. evaluated the performances of Freeze-TCP for in-vehicle communication, using the wireless signal information to predict connectivity losses. Part of the evaluation was simulation-based and led to the writing of a Freeze-TCP modification set for ns-2.1b9a. These modifications have then been gathered into a a patch file, before being ported to ns-2.33.

Comparison of TCP and Freeze-TCP upon restablishement of connectivity

ns-2 dynamic library module

OpenNicta

As of ns-2.33, the simulator includes support for dynamic loadable modules, which allows to add new protocols to ns-2 by loading a library at runtime instead of patching the source tree. This feature makes usage of third party extensions to ns-2 much more easily. Thus, the Freeze-TCP extension has been ported to a self-contained module.

Download the Freeze-TCP module for ns-2 (2.33 or later). Refer to the README file included in the package for installation and usage details.

Porting to a self-contained dynamically loadable library (based on the original work of Baig et al.) has been done by Olivier Mehani to whom all requests concerning this module should be directed. In short: Please, do not harass former authors about this, all bugs are mine (:

Readme

For ease of access, the content of the README file provided in the source archive is duplicated below:
Freeze-TCP extension for ns-2


I. Description

This module provides a Freeze-TCP [0] extension for ns-2 in the form of a dynamic
library [1]. This is based on a work made to study the impact of outage prediction
[2] and subsequent patches for various ns-2 releases [3,4].

New versions of this package SHOULD be available at [5].


II. Requirements

A version of NS superior or equal to 2.33 (and its configured tree, either
allinone or the standalone version) is needed, as support for dynamic libraries
has been introduced at this point. 

NOTA: if the source tree is present but not configured, the configure script for
this package will fail and exit claiming that the NS tree is not present.
Simply running ./configure in the NS source tree is enough.


III. Installation

This package can be configured, built and installed in the regular
autoconf-based fashion. It is mandatory, though, to give the configure script
the path to the ns-2 source tree, e.g.

$ ./configure --with-ns=/usr/src/ns-2.33
or
$ ./configure --with-ns-allinone=/usr/src/ns-allinone-2.33
then
$ make
$ sudo make install

This would build the module and install it in /usr/local/lib unless another
prefix has been specified.


IV. Example use

See in subdirectory samples/ for a simple example use of this extension. It
basically compares the operation of TCP versus Freeze-TCP (when run with
'freeze' as a argument to the script) in situations with disconnections.
Scripts to generate disconnection events and the appropriate freeze commands are
made available as well.

As a rule of thumb, the library must be loaded _before_ instantiating the
simulator to add support for the new agents. Old Plain-TCP simulations can be
adapted by replacing Agent/TCP/* with Agent/TCP/Freeze and Agent/TCPSink with
Agent/TCPSink/Freeze.


V. References

[0] T. Goff, J. Moronski, D. S. Phatak, and V. Gupta, "Freeze-TCP: a True
End-to-end TCP Enhancement Mechanism for Mobile Environments," In Proceedings of
IEEE INFOCOM 2000.

[1] http://www.dei.unipd.it/~baldo/ns_dl_patch/ns_dl_patch.html

[2] A. Baig, L. Libman, and M. Hassan, "Performance Enhancement of On-Board
Communication Networks using Outage Prediction", In IEEE Journal on Selected
Areas in Communications, 24(9), September 2006.

[3] http://mobqos.ee.unsw.edu.au/~omehani/ns/ns-21b9agcc32-freezetcp-1.patch

[4] http://www.nicta.com.au/people/mehanio/nsmisc/ns-233-freezetcp.patch

[5] http://www.nicta.com.au/people/mehanio/freezetcp#nsfreezetcp

Linux-2.6 implementation

In order to provide basic Freeze-TCP functionnality, and a starting point for more advanced works, a quick patch for Linux 2.6.30-rc8 (actually, Git commit d9244b5d2fbfe9fa540024b410047af13ceec90f) has been rewritten. The basic ZWA signaling and DUPACKs sending after unfreezing have been implemented.

An application can signal its receiver to send (or stop sending) ZWA using socket option TCP_FREEZE. Most of the actual work is done in file net/ipv4/tcp_freeze.c. The code for a quick receiver application, which can be instructed to freeze/unfreeze its socket using Unix signals USR1 and USR2, is also available.

This code has not been thoroughly tested at all as only some quick runs have been done to check the basic behavior. It worked as expected for a single IPv4 flow (see figure below in which the advertized window is in red, the sender's throughput is black and ZWAs appear in green), and may work similarly with other background traffic or IPv6. Please let me know if you investigate this code further and have interesting results.

A frozen TCP connection between a Freeze-TCP receiver and a standard Linux TCP sender

References

  1. T. Goff, J. Moronski, D. S. Phatak, and V. Gupta, Freeze-TCP: a True End-to-end TCP Enhancement Mechanism for Mobile Environments, In Proceedings of IEEE INFOCOM';
  2. A. Baig, L. Libman, and M. Hassan, Performance Enhancement of On-Board Communication Networks using Outage Prediction, In IEEE Journal on Selected Areas in Communications, 24(9), September 2006;
  3. Other ns-2 resources.