Network Simulator and problems in installing. Introduction Problems in installing Wired networks modified example2.tcl commands in OTcl usual problems.

Slides:



Advertisements
Similar presentations
Vacha Dave, University of Texas at Austin 1 Network Simulator Tutorial Advanced Computer Networks (CS378)
Advertisements

1 The ns-2 Network Simulator H Plan: –Discuss discrete-event network simulation –Discuss ns-2 simulator in particular –Demonstration and examples: u Download,
Network Simulator (NS-2)
1 NS-2 Tutorial COMP R2 University of Manitoba March 4, 2009.
Introduction to nam Tim Buchheim 21 November 2002 ns tutorial - fall 2002.
Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2004) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences.
NS2 Tutorial – Part II Internet Computing KUT Youn-Hee Han.
1 Multicast in ns-2 報告者 : 陳沐恩. 2 Multicast 簡介 3 Multicast Routing set ns [new Simulator] $ns multicast Or set ns [new Simulator – multicast on] set mproto.
Wireless Communication : LAB 3
NS-2 (network simulator) NS by example παρουσίαση Κων/νος Τρούλος.
Ns Tutorial 成功大學電機所電腦與網路組 博士候選人 柯志亨
NS2-TCP Internet Computing KUT ( Youn-Hee Han It is licensed under a Creative Commons Attribution.
Wireless and Mobile Computing Simulations Lecture 27.
Introduction to Network Simulator NS-2 Part I
1 ns-2 Tutorial, part 2 Dave Anderson, Xiaowei Yang (Modified from Polly Huang’s slides)
Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-
An Introduction to NS-2 * Gayatri Swamynathan CS 276 TA *some slides are from a presentation by Haobo Yu & Nader Salehi, USC/ISI.
NS-2 Shahin Shayandeh December 2004 Session 2. Ns programming  Create the event scheduler  Turn on tracing  Create network  Setup routing  Insert.
Brief Intro to ns2: The most widely used Network Simulator COMP5416 Advanced Network Technologies Based on: Marc Greis's
Ns-2 Tutorial Exercise (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Adopted from Nicolas’s slides Jianping Wang,
Ns-2 tutorial Karthik Sadasivam Banuprasad Samudrala CSCI 5931 Network Security Instructor : Dr. T. Andrew Yang.
NS-2 網路模擬器介紹與使用 吳賢明國立中興大學 計算機及資訊網路中心中華民國九十三年十月二十七日.
5-Jul-141 S.Pushpalatha, Associate Professor, PSNACET.
Introduction to NS. Information Main website Documentation, mailing list archive, tutorial Location of Source codes –C++ files.
Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2003) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences.
CprE 543x – ns-2 Tutorial Zak Abichar, Dept of Electrical and Computer Engineering Iowa State University Ames,
EECS122 - UCB1 Project 3: ns Simulation of Application-Level Routing Improve the application performance by user-level / application-level routing. Understand.
1 Modified Schedule Day 2 Network AniMator (nam) Examples simple.tcl mcast.tcl Day 3 Wireless (ad-hoc)
Downloading and Installing AutoCAD Architecture 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the software.
EECS122 - UCB1 Measurements and Modeling Table of Contents 1. Measurements Measurements 2. Modeling and its Shortcomings Modeling and its Shortcomings.
IS 426: Information Systems Construction in Modern Society Downloading and exploring oracle development environments.
Network Simulator (NS2) 1 Tutorial on Network Simulator (NS2) Hemant Kumar Rath Infonet Lab, Dept of Electrical Engineering IIT Bombay, Mumbai
Wireless Networking and Systems CSE 590 ns2 tutorial.
Introduction to NS2 -Network Simulator- -Prepared by Changyong Jung.
Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold.
NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links.
JIA-HUI HUANG INSTITUTE OF COMPUTER SCIENCE AND INFORMATION ENGINEERING NATIONAL TAIPEI UNIVERSITY OF TECHNOLOGY Network Simulator – NS-2 1.
Network Simulator-2 Sandeep singla 1998A2A7540. NS-2 A discrete event simulator Focused on modeling network protocols –Wired, wireless –TCP,UDP,unicast,multicast.
NetFlow Very useful for traffic analysis Very useful for traffic analysis Standard sampler: Standard sampler: –Cisco Netflow –Juniper Traffic Sampling.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Internet Computing KUT Youn-Hee Han
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
1 NS Fundamentals. USC INFORMATION SCIENCES INSTITUTE 2 OTcl and C++: The Duality C++ OTcl Pure C++ objects Pure OTcl objects C++/OTcl split objects ns.
Ns-2 Tutorial (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Jianping Wang, 2002 cs757 1.
1 Introduction to NS-2 r Tutorial overview of NS m Create basic NS simulation r Walk-through a simple example m Model specification m Execution and trace.
Lab 2, Network Simulator ns2 Shiv Kalyanaraman Yong Xia (TA) Satish Raghunath Sept 4,
Network Simulator Tutorial Wireless Networks. Acknowledgements Material is taken from the presentations by Jim Kurose, University of Massachusetts, Amherst.
Network Simulator 2. Introduction Open source network simulator NS uses two languages: C++ and OTcl  C++ is fast to run but slower to change Kernel 
TNK092: Network Simulation - Nätverkssimulering Lecture #1: Course basics and a first taste of NS2 Vangelis Angelakis Ph.D.
2007 TAX YEARERO TRAINING - MODULE 61 ERO (Transmitter) Training Module 6 Federal and State Installation and Updates.
NS-2 Shahin Shayandeh December 2004 Session 1. Ns-2, the Network Simulator  A discrete event simulator Simple model  Focused on modeling network protocols.
SQL SERVER 2008 Installation Guide A Step by Step Guide Prepared by Hassan Tariq.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
Recen progress R93088 李清新. Recent status – about hardware design Finishing the EPXA10 JPEG2000 project. Due to the DPRAM problem can’t be solved by me,
Lab 2, Network Simulator ns2
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
CACI Proprietary Information | Date 1 PD² SR13 Client Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8, 2011.
HOW TO FIX MSVCR100. DLL IS MISSING ERROR? missing-error.
NS-2 Simulator 최 종 훈 Contents  About NS  Installation  Based on Linux  Based on Windows  Architecture  Using NS-2  Example  References.
ECE 6610 Sandeep Kakumanu GNAN research Lab
DMET 602: Networks and Media Lab
Fundamental of Databases
(Modified from Polly Huang’s and last year’s original)
Network Simulator Tutorial
Basics of NS-2 Training in TCL script
Choe, Hyun Jung (Stella)
Introduction to ns-2: “The” Network Simulator
Karthik Sadasivam Banuprasad Samudrala
Presentation transcript:

Network Simulator and problems in installing

Introduction Problems in installing Wired networks modified example2.tcl commands in OTcl usual problems in compiling running the simulation

Problems in installing Installation of NS2 is very easy if you pay attention on the following instructions. However, installing for me was very hard and it last very long time, about 10 days. There is a lot of problems I have meet, such as download speed, choosing the right server for downloading, installing the correct version of NS2. Now I will show you the best and most safe way for installing the NS2. Installing Cygwin: First problem in installation of NS2 is Cygwin platform for Windows. On my computer I have Windows XP Service Pack 3 (SP3). I try to download cygwin, following instruction step by step from book by Apidach Booranawong, except I choose to download all components of Cygwin. But I have no success. At some point (usually about 99% of downloading) I get this message Download incomplete. Try again?. If you choose Yes the installation will start all over again and you have to wait few hours (depend on download speed) to complete your work. If you choose No your Cygwin platform will be installed on your computer, but it will not be ready to support NS2. Another big problem is to choose right server for downloading the Cygwin. This is the most important step. When you start the installation after step 11 (page 5, Apidach Booranawong, Network Simulator NS2), you will need to choose some ftp or http for downloading. I choose many download sites, but most of them are very slow or not available or far away from Thailand, which is very important. And again I havet success. At this point I decided to start all over again, from the root. I do the following:

Problems in installing Guide for installing Cygwin: Choose right server for downloading. Always chose that one with word MIRROR or MIRRORS. For example you can choose: or If you choose between http and ftp, you better choose http. Dont install every component of Cygwin (it lasts too long because you have to select file by file, there is no option select all). Install components shown on page No.2, Apidach Booranawong, Network Simulator NS2. Entire X11 and these packages: gcc, gcc-gcc+, gawk, tar, gzip, make, patch, perl, w32api. If your download speed is high, you will finish the job very fast and safe. After installation you must have these 3 files:.bash_profile.bashrc.inputrc, under c:\cygwin\home\MyComputerName. If you dont have it, your installation failed. If you still cant install Cygwin uninstall Windows XP Service Pack 3 (SP3) and install Windows XP Service Pack 2 (SP2) and repeat steps 1,2,3,4.

Problems in installing Installing NS2: couldnt execute problem Second problem can be the version of Network Simulator. There is many version, for example ns-allinone-2.28, ns-allinone-2.29 and the latest version at this moment ns-allinone I choose to install ns-allinone- 2.29, because this version have examples of some simulation inside folder c:\cygwin\home\MyComputerName\ns-allinone-2.33\ns-2.33\ns- tutorial\examples. The version ns-allinone-2.33 does not have implemented examples inside. It doesn not have folder ns-tutorial\examples. After installation of ns-allinone-2.29, there was a problem. I try to run command ns example2.tcl to see if my NS is working, but I get this message: running nam... ns: finish: couldn't execute "nam": no such file or directory while executing "exec nam out.nam &" (procedure "finish" line 8) invoked from within finish

Problems in installing The problem was in version on Network Animator (NAM). When you download ns-allinone-2.28 or ns-allinone-2.29 or ns-allinone-2.30 you automatically get nam-1.11 which has a bug. You can fix the bug by replacing the NULL with 0 in line 73 of file agent.h in nam-1.11 directory. Then set the path to c:\cygwin\home\MyComputerName\ns- allinone-2.33\ns-2.33 \nam-1.11 and then compile it again, run the command./configure. I try it, but everything was same like before. I dont know why. So I choose do uninstall ns-2.29, by deleting the directory ns-allinone-2.29, ns-allinone-2.33.tar.gz and deleting the file.bash_history under c:\cygwin\home\MyComputerName. Dont delete these files:.bash_profile,.bashrc,.inputrc. I downloaded ns-allinone-2.33.tar.gz, and after installation everything was OK. Guide for installing NS2: Install this verson of NS: ns-allinone-2.33.tar.gz. Its the fastest and most safe way to make your NS usable. Now you have to copy the directory examples from your collegue which already have NS. Put this directory under the c:\cygwin\home\MyComputerName\ns-allinone-2.33\ns-2.33\ns- tutorial. Then check if your NS is working, by running the simulation. You have to type ns example2.tcl, but set the path first. Good luck!

Wired networks original example2.tcl: UDP NULL CBR

Wired networks my modified example: UDP TCP SINK NULL FTP CBR

source code is: #create a simulator object set ns [new Simulator] #define different color for data flow # number of color is fid = flow id $ns color 1 blue $ns color 2 red #open the nam trace file set nf [open out.nam w] $ns namtrace-all $nf #define a 'finish ' pocedure proc finish {} { global ns nf $ns flush-trace #close the trace file close $nf #execute nam on trace file exec nam out.nam & exit 0 } 1 #create 6 nodes set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] #create links between the nodes $ns duplex-link $n0 $n3 1Mb 10ms DropTail $ns duplex-link $n1 $n3 1Mb 10ms DropTail $ns duplex-link $n2 $n3 1Mb 10ms DropTail $ns duplex-link $n3 $n4 1Mb 10ms DropTail $ns duplex-link $n3 $n5 2Mb 20ms DropTail #create the position of nodes in NAM $ns duplex-link-op $n0 $n3 orient right-down $ns duplex-link-op $n1 $n3 orient right $ns duplex-link-op $n2 $n3 orient right-up $ns duplex-link-op $n3 $n4 orient right-up $ns duplex-link-op $n3 $n5 orient right-down 2

#set queue size of LINK (n3-n4) to 10 $ns queue-limit $n3 $n4 10 #monitor the queue for the link between n3 and n4 $ns duplex-link-op $n3 $n4 queuePos 0.5 #create a UDP agent and attach it to the n0 set udp0 [new Agent/UDP] $udp0 set class_ 1 $ns attach-agent $n0 $udp0 #create a CBR traffic souce and attach it to the udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 500 $cbr0 set interval_ $cbr0 attach-agent $udp0 #create a UDP agent and attach it to the n1 set udp1 [new Agent/UDP] $udp1 set class_ 1 $ns attach-agent $n1 $udp1 #create a CBR traffic souce and attach it to the udp1 set cbr1 [new Application/Traffic/CBR] $cbr1 set packetSize_ 500 $cbr1 set interval_ $cbr1 attach-agent $udp1 #create a TCP agent and attach it to the n2 set tcp0 [new Agent/TCP] $tcp0 set class_ 2 $ns attach-agent $n2 $tcp0 3 #create a FTP traffic source and attach it to the tcp0 set ftp0 [new Application/FTP] $ftp0 attach-agent $tcp0 $ftp0 set type_ FTP #create a NULL agent (a traffic sink) and attach it to the n4 set null0 [new Agent/Null] $ns attach-agent $n4 $null0 #create a NULL agent (a traffic sink) and attach it to the n5 set null1 [new Agent/Null] $ns attach-agent $n5 $null1 #create a SINK agent and attach it to the n4 set sink0 [new Agent/TCPSink] $ns attach-agent $n4 $sink0 #connect the traffic sources with the traffic sinks $ns connect $tcp0 $sink0 $ns connect $udp0 $null0 $ns connect $udp1 $null1 #schedule events for CBR and FTP agents $ns at 0.8 "$cbr0 start" $ns at 1.0 "$ftp0 start" $ns at 1.2 "$cbr1 start" $ns at 4.0 "$cbr0 stop" $ns at 4.5 "$ftp0 stop" $ns at 4.8 "$cbr1 stop" #call the procedure finish after 5 sec of simulation time $ns at 5.0 "finish" #run the simulation $ns run 4

Wired networks usual problems in compiling first usual problem is the topology of the network. Topology must have sense. For example you cant connect one source with two sink and send the packages at the same time. Every source has to be connected with one sink. second usuall problem is error in syntax. For example if you replace character $ with # in front of the command $ns, you will get the error message.Or if you type set sink0 [new Agent/TCPsink] instead set sink0 [new Agent/TCPSink] you will again get the error message.

Wired networks running the simulation: after checking the topology of network, syntax errors we can run the simulation. First thing we have to do is to set the path first. In my case: c:\cygwin\home\Sasa\ns-allinone-2.33\ns-2.33\ns-tutorial\examples and then run the simulation with command ns NameOfExample.tcl

Wired networks THE END