Direction of building NS2 platform using Cygwin under Windows OS

Similar documents
Installation Guidelines for NS2 on Windows

LAE Enterprise Server Installation Guide

RecoveryVault Express Client User Manual

Installation Guide for WebSphere Application Server (WAS) and its Fix Packs on AIX V5.3L

Online Backup Linux Client User Manual

Installing (1.8.7) 9/2/ Installing jgrasp

Oracle Tools and Bindings with languages

Online Backup Client User Manual

PuTTY/Cygwin Tutorial. By Ben Meister Written for CS 23, Winter 2007

How to upload - copy PowerChute Network Shutdown installation files to VMware VMA from a PC

MatrixSSL Getting Started

Online Backup Client User Manual

SimbaEngine SDK 9.4. Build a C++ ODBC Driver for SQL-Based Data Sources in 5 Days. Last Revised: October Simba Technologies Inc.

Using Symantec NetBackup with Symantec Security Information Manager 4.5

Instructions for Registering for a Miradi Account & Installing Miradi Software

Running a Default Vulnerability Scan

ns-2 Tutorial Exercise

There s a variety of software that can be used, but the approach described here uses freely available Cygwin software: (1) Cygwin/X (2) Cygwin/openssh

Installation Guide for AmiRNA and WMD3 Release 3.1

Moxa Device Manager 2.0 User s Guide

Step By Step Guide for Starting "Hello, World!" on OpenWRT

Installing the VPN Client for Microsoft Windows OS

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories

S. Bouzefrane. How to set up the Java Card development environment under Windows? Samia Bouzefrane.

1. Product Information

Online Backup Client User Manual Linux

SheevaPlug Development Kit README Rev. 1.2

Running Knn Spark on EC2 Documentation

Upgrade: SAP Mobile Platform Server for Windows SAP Mobile Platform 3.0 SP02

Installing Eclipse C++ for Windows

CUSTOMER Installing SAP Afaria

and $HOME points to /home/username (your local login name) and this c:\cygwin\home\username to windows.

Tutorial on OpenCV for Android Setup

ML310 Creating a VxWorks BSP and System Image for the Base XPS Design

Driver Upgrade Instructions

Unix server Installation guide

SAS Marketing Automation 4.4. Unix Install Instructions for Hot Fix 44MA10

OpenOffice.org 3 Installation Guide

Ubuntu, FEAP, and Virtualiza3on. Jonathan Wong Lab Mee3ng 11/08/10

Oracle Retail Item Planning Configured for COE Installation Guide Release December 2008

Online Backup Client User Manual

Version Control with Subversion and Xcode

JobScheduler - Amazon AMI Installation

Backing up Microsoft Outlook For the PC Using MS Outlook 2000 Keith Roberts

Massey University Follow Me Printer Setup for Linux systems

Unix Sampler. PEOPLE whoami id who

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Authenticate vsftpd (a secure FTP server for UNIXlike systems) with IDENTIKEY Authentication Sever

BF2CC Daemon Linux Installation Guide

Integrating Apache Web Server with Tomcat Application Server

Running a Default Vulnerability Scan SAINTcorporation.com

FlashAir. Firmware Update Tool Ver User s Manual. (For updating a Mac system via the Internet)

Computer Science and Engineering Linux Cisco VPN Client Installation and Setup Guide

owncloud Configuration and Usage Guide

Attix5 Pro Server Edition

Using a login script for deployment of Kaspersky Network Agent to Mac OS X clients

HP Quality Center. Software Version: Microsoft Word Add-in Guide

Autograph 3.3 Network Installation

Tech Tips Helpful Tips for Pelco Products

Supported platforms & compilers Required software Where to download the packages Geant4 toolkit installation (release 9.6)

The Build Process. of (GNU Tools for ARM Embedded Processors)

Table of contents. Software Installation 2. User Software )AMV Convert Tool ) AMV Player 12

OpenCV on Android Platforms

Introduction to Mac OS X

HP Application Lifecycle Management

V-locity Installation

Java Web Services Developer Pack. Copyright 2003 David A. Wilson. All rights reserved.

Getting Started with Actinic Order Manager

Eclipse installation, configuration and operation

Installation notes ICECUP, ICE-GB and DCPSE

VERSION 9.02 INSTALLATION GUIDE.

Getting Started with Command Prompts

Installing the Cygwin UNIX Emulator on Windows 7

BioWin Network Installation

Installation Guide for FTMS and Node Manager 1.6.0

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

GTk+ and GTkGLExt Build Process for Windows 32- bit

StreamServe Persuasion SP4

Cosmic Board for phycore AM335x System on Module and Carrier Board. Application Development User Manual

1. Preparations Before Updating or Recovering

Lizard Standalone Mode Guide Version 1.0:

Source Code Review Using Static Analysis Tools

Omnistar Recruiter Install User Guide (Codelock)

Cincom Smalltalk. Installation Guide P SIMPLIFICATION THROUGH INNOVATION

LT Auditor+ for Windows

LICENSE4J FLOATING LICENSE SERVER USER GUIDE

Expresso Quick Install

Print Server Application Guide

MIGS Payment Client Installation Guide. EGate User Manual

How to install and run. in Microsoft Windows Environment

How to Build an RPM OVERVIEW UNDERSTANDING THE PROCESS OF BUILDING RPMS. Author: Chris Negus Editor: Allison Pranger 09/16/2011

Installation Guidelines (MySQL database & Archivists Toolkit client)

TransNav Management System Documentation. Management Server Guide

CS 2112 Lab: Version Control

MIS Export via the FEM transfer software

Acquisition of the Microsoft Surface RT

Transcription:

Direction of building NS2 platform using Cygwin under Windows OS Huang Xuguang 22082228 xuguangmit@gmail.com 1. Introduction This document aims to give the direction of building NS2 using Cygwin under windows os. The procedures and common errors are listed in this document. The software and source codes we need are: 2. Steps Cygwin: Downloaded from http://www.cygwin.com NS2 source code: Downloaded from http://www.isi.edu/nsnam/dist/ns-allinone-2.27.tar.gz version: ns-allinone-2.27.tar.gz Patch of NS2: Downloaded from http://www.ececs.uc.edu/~cdmc/ucbt/src/ns227-gcc34.patch Patch of tk: Downloaded from http://bugs.gentoo.org/show_bug.cgi?id=225999 version: tk-8.4.18-tkbind.patch LEACH source code: Downloaded http://www.internetworkflow.com/downloads/ns2leach/mit.tar.gz 1> Install Cygwin It is easy to install Cygwin under windows os. a. First, get the software from http://www.cygwin.com. b. Launch setup.

c. Here you must install these packages because NS2 needs them: XFree86-base, XFree86-bin, XFree86-prog, XFree86-lib, XFree86-etc, make, patch, perl, gcc, gcc-g++, gawk, gnuplot, tar and gzip d. After finishing the setup, you can start Cygwin and the screen should be like this:

Then checking the root of Cygwin, making sure there are one folder named home and there are three hidden files in home/{username} which are.bashrc,.bashrc_profile and.inputrc. no home folder and no three hidden files Check the Environment Variable of your computer; delete the entry which named HOME 2> Install NS2 a. Unzip the source code of NS2 and it includes these files: tar xvfz ns-allinone-2.27.tar.gz TCL release 8.4.5 (required component) TK release 8.4.5 (required component) Otcl release 1.8 (required component) TclCL release 1.15 (required component) Ns release 2.27 (required component) Nam release 1.10 (optional component) Xgraph version 12.1 (optional component) CWeb (optional component) SGB (optional component, builds sgblib for all UNIX type platforms) Gt-itm (optional component) Zlib version 1.1.4 (optional, but required when Nam is used) b. Install patch. Before we excuse the compilation process, we d better to install patch of NS2 to avoid mistakes. Download the patch named ns227-gcc34.patch and put it in the same dir with ns-allinone-2.27. Install it. patch -p0 <ns227-gcc34.patch c. Enter the dir of ns2 and install it. cd ns-allinone-2.27./install

d. Finish compiling. Generally, the compilation process will cost about 4 hours (depended on your computer). If you finish this step successfully, you will see this: During this step, you would meet many problems. I list the common errors I met and give the salvations. Tcl is not part of the ns project Modify the following files, find the words.relid'` and use.relid` instead. ns-allinone-2.28\tcl8.4.5\unix\configure ns-allinone-2.28\tcl8.4.5\unix\tcl.m4 ns-allinone-2.28\tk8.4.5\unix\configure ns-allinone-2.28\tk8.4.5\unix\tcl.m4 ns-allinone-2.28\otcl-1.8\configure e. Setting environment variables. Edit the file.bashrc which is a hidden file in your home/{username} folder and insert these sentences: export NS_HOME=`pwd`/ns-allinone-2.27 export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/otcl-1.8:$N S_HOME/lib:$LD_LIBRARY_PATH export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library f. Test NS2. Now, you have finished installing NS2. You can use an example to test NS2. Start xwindow startxwin.bat

Launch the example cd ns-allinone-2.27/ns-2.27/ns-tutorial/examples ns example2.tcl nam: no such file or directory There are two methods: 1. Check the folder ns-allinone-2.28/nam-1.11, copy nam.exe to ns-allinone-2.28/bin if it exists. 2. Recompile the nam if there is no nam.exe in this catalog ns-allinone-2.28/nam-1.11. Edit the file agent.h under nam-1.11/agent.h Change NULL to 0 in line 73. Run./configure; make Executing the example and you would see:

Congratulations if you can see these two windows! You have installed NS2 sucessfully. 3> Loading LEACH a. Dowload LEACH source code and put it under ns-allinone-2.27/ns-2.27. Unzip the package. gunzip mit.tar.gz tar -xvf mit.tar b. Modify makefile file. Find the paragraph beginning with DEFINE, add -DMIT_uAMPS in its end. Find the paragraph beginning with INCLUDES, add one line -I./mit/rca I./mit/uAMPS in its end. Find the line gaf/gaf.o \, add these before it. mit/rca/energy.o mit/rca/rcagent.o \ mit/rca/rca-ll.o mit/rca/resource.o \ mac/mac-sensor-timers.o mac/mac-sensor.o mit/uamps/bsagent.o \ The file should be like this: c. Set environment variable Edit the file.bashrc which is under the catalog home/{username}. Add export RCA_LIBRARY={$NS_HOME}/ns-allinone-2.27/ns-2.27/mit/rca export uamps_library={$ns_home}/ns-allinone-2.27/ns-2.27/mit/uamps Edit wireless-phy.cc which is under ns-allinone-2.27/ns-2.27/mac, add the definition #define min(a,b) (((a)>(b))?(b):(a)) behind the sentence #define max(a,b) (((a)<(b))?(b):(a)) d. Compile the LEACH make clean make To compile the LEACH would cost about 10 to 30 minutes (depend on your computer). After this step, you can run an example to test LEACH../test

LEACH is successfully installed if you see this: line3: ns:command not found 1. Modify./test file, put the line./leach_test under the line cd../../. It looks like this: sleep 2 cd../.././leach_test 2. Modify./leach_test file, add RCA_LIBRARY=mit/rca export RCA_LIBRARY uamps_library=mit/uamps export uamps_library before the line ns tcl/ex/wireless.tcl \ e. Check the leach.err file under ns-allinone-2.27\ns-2.27\mit\leach_sims, the content would be this if LEACH works well.