Hi All, Our website moved to a new URL. Please bookmark the new link: https://ns2bloggers.blogspot.com/

Saturday 3 May 2014

APPLICATION LAYER SIMULATIONS ON NS-2

A framework named "ns2-app" is developed and maintained by Xizhi Zhu to simplify the application layer simulations on NS-2.

BE CAREFUL, it's only tested on NS2.33 above, but it should work on some older versions as it doesn't change any existing code.

Why this framework

NS2 supports only unreal applications that just contain the length of packets. There do exist some real applications, but they are difficult to reuse, or even restricted to a specific type of applications.
Therefore, we decide to write this framework trying to reduce the difficulty. Also, a P2P framework is to be provided based on it.

Usage

  • The application layer simulation framework
    1. Download the latest source code here, uncompress it into the ~/ns-2.33/ directory, and recompile NS. BE CAREFUL, it will overwrite the original Makefile. But you can also modify the Makefile yourself by adding -I./real-app to the INCLUDES section and real-app/adu.o real-app/wrapper.o real-app/real-app.o real-app/test/test.o to the OBJ_CC section.
    2. Derive a class from ADU to represent the application layer data, and rewrite the size function. The packets are sent by calling the RealApplication::send() function
    3. Derive a class from RealApplication to represent the application, and rewrite the recv function which is called when a packet is arrived.
    4. Derive a class from TclClass to combine the application in C++ with OTcl.
    5. Write an OTcl script to configure the simulation.
  • The P2P application
    1. It's still under development.

The source code can be downloaded from the following link:

Download ns2-app-0.02.tar.bz2
After downloading, untar the downloaded folder in  ~/ns-2.33 directory and recompile NS-2.
For more details on installation and the possible errors, please visit the official website of ns2-app here.

No comments :

Post a Comment