FACULTY OF ENGINEERING

Size: px
Start display at page:

Download "FACULTY OF ENGINEERING"

Transcription

1 FACULTY OF ENGINEERING LAB SHEET ETM COMMUNICATIONS NETWORKS TRIMESTER 1 (2010/2011) CN1 COMMUNICATION PROTOCOLS ANALYSIS CN2 WIRELESS NETWORK SIMULATION Note: On-the-spot evaluation may be carried out during or at the end of the experiment. Students are advised to read through this lab sheet before doing experiment. Your performance, teamwork efford, and learning attitude will count towards the marks.

2 1. OBJECTIVES CN1 : COMMUNICATION PROTOCOL ANALYSIS Faculty of Engineering Multimedia University CN1 Experiment(1): NS-2: The Beginning Objective: To understand the basic components, simulation setup and simulation animation using NS-2 Experiment(2): Simulation Analysis Tools Objective: To understand the simulation output tools and analysis using NS-2 Experiment(3): TCP Analysis Objective: To study different versions of TCP. 2. LIST OF EQUIPMENTS AND SOFTWARES Computer running ns-allinone (latest release is 2.31) is a package which contains required components and some optional components used in running NS-2. The package contains an "install" script to automatically configure, compile and install these components. Currently the package contains: Tcl release (Main component) Tk release ( Main component) Otcl release 1.13 ( Main component) TclCL release 1.19 ( Main component) Ns release 2.31 (Main component) Nam (Animation purpose) Gnuplot (Plotting purpose) External storage to save the simulation output. 3. INTRODUCTION 3.1 NS-2 SIMULATION TOOL NS-2 is a network simulator. NS-2 is an event-driven object-oriented simulator, written in C++, with an Otcl interpreter as a front-end. This means that most of your simulation scripts will be written in Tcl. If you want to develop new components for NS-2 you might have to use both Tcl and C++. NS-2 uses two languages because any network simulator, in general, has two different kinds of things it needs to do. On the one hand, detailed simulations of protocols requires a systems programming language which can effciently manipulate bytes, packet headers, and implement algorithms that run over large data sets. For these tasks run-time speed is important and turn-around time (run simulation, find bug, fix bug, recompile, re-run) is less important. On the other hand, a large part of network research involves slightly varying parameters or configurations, or quickly exploring a number of scenarios. In these cases, iteration time (change the model and re-run) is more important. Since configuration runs once (at the beginning of the simulation), run-time of this part of the task is less important. Khairil/Shamini/Muslim Updated (CN1) 1 of 15

3 NS-2 meets both of these needs with two languages, C++ and Otcl. C++ is fast to run but slower to change, making it suitable for detailed protocol implementation. Otcl runs much slower but can be changed very quickly (and interactively), making it ideal for simulation configuration. NS-2 (via tclcl) provides glue to make objects and variables appear on both languages. Traces in NS-2 format $ns trace-all [open tr.out w] Figure 1 <event> <time> <from> <to> <pkt> <size> -- <fid> <src> <dst> <seq> <attr> cbr cbr r cbr d cbr Queue Time From Node To Node Traff Type Pkt Size Flags Flow ID Src Port Dst. Port Seq. Num. +,-,r,d double int int string int string int int. int int. int int int Pkt ID Queue + queue, - dequeue, r received, d dropped Time time stamp From/To Nodes paket is between these nodes Traffic Type what type of agent created this traffic Packet Size The size of the packet moving from one node to the next Flags Any flow control of congestion flags Flow ID Helps identify which traffic path this is apart of Source Port and Destination Port The end points of the packet Sequence Number Used in TCP Windowing and Acking Packet Number Unique number used to id this single packet for monitoring sake. NAM allows you to actually track a packets movement through a network using this ID Khairil/Shamini/Muslim Updated (CN1) 2 of 15

4 4. EXPERIMENTS 4.1 EXPERIMENT(1): NS-2 SIMULATION RUNNING KNOPPIX For these experiments, we will be using Knoppix with embedded NS-2. Knoppix is complete Linux distribution that can run for a single CD. Usually this kind of distribution is called a live CD where it can load Linux system without installing it on a hard drive. The distribution used for this experiment come with NS-2 embedded in it. Hence, student can run the NS-2 without having to install it on the hard drive. Please get a Knoppix CD from the lab technician. Start using Knoppix After Knoppix uploaded, type the command below to run the KDE environment: startx Bring up the Konsole, and setup path for nam and xgraph line by line (press Enter after each line): PATH= $PATH:/usr/local/ns-allinone-2.29/nam-1.11 export PATH PATH= $PATH:/usr/local/ns-allinone-2.29/xgraph-12.1 export PATH To check either the paths are already set, type the commands below one by one. It should return the path to the required applications: which ns which nam which xgraph To set your working path, type cd Desktop From now on, do save all the documents and files on your desktop. At the end of session, after logout from the KDE environment, press the below keys simultaneously to eject the CD: Ctrl+Alt+Del Khairil/Shamini/Muslim Updated (CN1) 3 of 15

5 4.1.2 RUNNING NS-2: THE BEGINNING Objective: To understand the basic components, simulation setup and simulation animation using NS-2 Step1: Login to the computer as being instructed by the technical staff. Step2: Identify the working folder for your working space where all your files will be saved. Step3: Now, bring up the console to set your working path. Step4: To start NS-2, type inside the console: ns Step5: In this section you are going to write a template that you can use for all your simulation scripts. A simulation in NS-2 is described by a Tcl class Simulator. A simulation script, therefore, generally begins by creating an instance of this class. This is done with the command set ns [new Simulator] Step6: After creating the simulator object a simulation script usually calls various methods to create nodes and topologies. Next we have to define what exactly we want to happen in the simulation. Since the NS-2 simulator is an event-driven simulator this is done by scheduling events: when creating a simulator object a scheduler is created which runs by selecting the next earliest event, executing it to completion, and returning to execute the next event. An event can for example be the sending of data from one node to another node or the failure of a link. The command to schedule an event is Example: $ns at <time in sec> <event> $ns at 1.0 puts \ Hello World!\ $ns at 1.5 exit Step7: After scheduling all the events, we are ready to start the simulation: $ns run Although we have seen the basics of running a simulation we don t have a way yet to get any output from the simulation. Fortunately, NS-2 provides a number of ways of collecting output or trace data on a simulation (We will see this in Section 4.1.3). Optionally, we can run the above scripts by inserting all the scripts inside a file (say experiment1-1.tcl) and run the file by executing: ns experiment1-1.tcl Khairil/Shamini/Muslim Updated (CN1) 4 of 15

6 4.1.3 CREATING A TCL FILE Create a new file by the name experiment1-2.tcl. Type all the followings inside the file. Line1: set ns [new Simulator] The following code for example first opens the file out.nam for writing and gives it the file handle nf. It then tells the simulator to trace each packet on every link in the topology and write the data into the file. Line2: set nf [open experiment1-2.nam w] Line3: $ns namtrace-all $nf The trace data is collected in a format that can later be used by the nam program to visualize the simulation in an animation. The only remaining step is to make sure that all the trace data is flushed into the file at the end of the simulation and that the file is closed. Furthermore, we have to run the nam tool on the created trace file to produce the animation. We do this by writing a finish procedure that we call at the end of the simulation and that performs all these tasks. Line4: proc finish { { Line5: global ns nf Line6: $ns flush-trace Line7: close $nf Line8: exec experiment1-2.nam & Line9: exit 0 Line10: To create a node we can simply use the simulator method node. The following two lines create two nodes and assign them to the handles n0 and n1. Line11: set n0 [$ns node] Line12: set n1 [$ns node] We can then either use the simulator method simplex-link or the method duplex-link to connect the nodes with a link: Line13: $ns duplex-link $n0 $n1 1Mb 10ms DropTail This creates a bidirectional link between n0 and n1 with bandwidth 1Mbps, a propagation delay of 10ms and a DropTail queue. In addition to the DropTail queue, NS-2 also supports many other queuing policies like for example FairQueueing(FQ), Random Early Detection (RED), and Classbased queuing (CBQ). By now you have some scripts that create topologies but there is not yet trace. Trace generation in NS-2 is based on objects of two classes, the Agent and the Application. Agents represent endpoints where network-layer packets are constructed or consumed. Every node in the network that needs to send or receive trace must have an agent attached to it. These agents can be thought of as the implementation of the transport protocol. Khairil/Shamini/Muslim Updated (CN1) 5 of 15

7 On top of an agent runs an application. The application determines the kind of trace source that is simulated (e.g. ftp or telnet). Applications represent the application layer in an NS-2 simulation. Creating Agents: Corresponding to the two most popular transport protocols used in the Internet there are also two types of agents in NS-2: UDP agents and TCP agents. The following code shows an example of attaching a UDP agent to nodes n0 and n1: Line14: set udp0 [new Agent/UDP] Line15: $ns attach-agent $n0 $udp0 Line16: set null0 [new Agent/Null] Line17: $ns attach-agent $n1 $null0 Line18: $ns connect $udp0 $null0 This code first creates a UDP agent and attaches it to n0 using the attach-agent procedure. It then creates a Null agent which will act as a traffic sink and attaches it to n1. Finally, the two agents are connected using the simulator method connect. In the next section the UDP agent will be used by an application to send data. Creating Applications: In the previous section, we have set up the agents implementing the transport layer. We will now create applications that we attach to the transport agents and that will actually generate traffic. In NS-2 there are two basic types of applications: simulated applications and traffic generators. Traffic generators generate On/Off traffic: during On-periods, packets are generated at a constant burst rate and during Off-periods no packets are generated. NS-2 provides three different classes of traffic generators which differ in how the lengths of the On and Off-periods are modelled: 1. A traffic generator of the type Application/Traffic/Exponential takes the length of the On and Off periods from an Exponential distribution. 2. An Application/Traffic/Pareto source generates the lengths of these periods from a Pareto distribution. 3. Finally, the class Application/Traffic/CBR has no off periods and generates packets at a constant bit rate. The following code generates one traffic generator of each class. set exp [new Application/Traffic/Exponential] set par [new Application/Traffic/Pareto] set cbr0 [new Application/Traffic/CBR] See the NS-2 manual for how to configure these traffic generators. All traffic generators run on top of a UDP agent. Therefore, we have to attach a traffic generator to a UDP agent before we can use it to send data. The following example illustrates the use of the CBR traffic generator that we created above. Line19: set cbr0 [new Application/Traffic/CBR] Line20: $cbr0 set packetsize 500 Line21: $cbr0 set interval Line22: $cbr0 attach-agent $udp0 Khairil/Shamini/Muslim Updated (CN1) 6 of 15

8 Line23: $ns at 1.0 $cbr0 start Line24: $ns at 4.5 $cbr0 stop The simulated applications currently implemented in NS-2 are Application/FTP and Application/Telnet. These try to simulate the corresponding applications in the real world: FTP and Telnet. Like the real applications the NS-2 applications can run only on TCP. They therefore have to be attached to a TCP agent. The following line calls this procedure at the end of the simulation, Line25: $ns at 5.0 finish Line26: $ns run TRACING AND MONITORING So far, when we wanted to see what is happening in a simulation we have used nam to visualize the events. However, often we want more detailed trace data on a simulation which then allows us to compute numbers like packet loss rates or per-connection throughput. The easiest way to do this is to use the simulator method trace-all which traces all the links in the topology (insert these 2 lines into your previous file): set f [open out.tr w] $ns trace-all $f When you use trace-all you also have to remember to change the finish procedure to flush the trace and close the file (as we did previously for the nam tracing). Sometimes we are only interested in the events at one particular queue and want to avoid the overhead that comes with tracing every single link in the topology. For this case NS-2 provides us with the trace-queue method. In addition, Section 22 of the NS-2 manual describes many other ways of collecting trace data. Instead of tracing events it is often useful to trace C++ or Tcl instance variables. Below is an example of setting up variable tracing in NS-2. # $tcp tracing its own variable cwnd $tcp trace cwnd # the variable ssthresh of $tcp is traced by a generic $tracer set tracer [new Trace/Var] $tcp trace ssthresh $tracer As a summary, a NS-2 simulation script generally includes Create the event scheduler Turn on tracing, if needed Create network topology Setup routing Create transport agent Create traffic source/sink Transmit application-level data Khairil/Shamini/Muslim Updated (CN1) 7 of 15

9 Figure 2 Task(1a): Now execute the file that you have created which refer to Figure 2 (experiment1-2.tcl) Run the file by executing ns experiment1-2.tcl Task(1b): Describes your simulation above. Hence, construct the topology in Figure 3 and name the file experiment1-3.tcl Figure 3 Khairil/Shamini/Muslim Updated (CN1) 8 of 15

10 4.2 EXPERIMENT(2): SIMULATION ANALYSIS TOOLS Objective: To understand the simulation output tools and analysis using NS-2 Execute experiment2.tcl and see the animation ns experiment2.tcl Task(2a): Comment on the animation The grep command in unix allow us to filter a file. We can create a new file which consists of only those lines from the original file that contain a given character sequence. For example, output traces in NS-2 may obtain all types packets that go through all links and we may be interested only in the data concerning tcp packets that went from node 0 to node 3. If lines concerning such events contain the string 0 3 tcp then all we have to do is type grep 0 3 tcp experiment2.tr > experiment2-1.tr where experiment2.tr is the original trace and experiment2-1.tr is the new file. If we wish to obtain a file containing all lines of experiment2.tr that begin with the letter r, we should type grep -r experiment2.tr > experiment2-1.tr if we wish to make a file of all the lines begin with s and have later tcp 1040 we should type grep -s experiment2.tr grep tcp 1040 > experiment2-1.tr Plotting with XGRAPH We are going to use xgraph instead of gnuplot to do our analysis. To plot using xgraph, it will only read from file consist only 2 columns of data. Hence, to extract certain columns from the required data: awk {print $column1, $column2 outputfile.tr > newfile.tr Example to select column 1 and column 2 from file experiment2.tr and save it into new file plot1.tr : awk {print $1, $2 experiment2.tr > plot1.tr To start plotting: xgraph plot1.tr or to have more plotting options use: xgraph plot1.tr t Graph Label x xlabel y ylabel Task(2b): Plot the graph of experiment2.tr from different link and comment on the results Task(2c): Plot the graph of experiment2.tr from different link and comment on the results. PLOT in EXCEL Khairil/Shamini/Muslim Updated (CN1) 9 of 15

11 4.3 EXPERIMENT(3): TCP ANALYSIS Objective: To study different versions of TCP. Type the below lines onto the console ns experiment3-1.tcl nam experiment3-1.nam Task(3a) Draw and indicate network properties of the simulated script. Identify the queuing discipline of the router used in the simulation Plot the sender's TCP window over simulation time. Determine where the TCP slow-starts ends and where congestion avoidance begins. Calculate the throughput of the transfer. Say now that we consider the same topology but the link experiences random losses (usually wireless link) ns experiment3-2.tcl nam experiment3-2.nam Task(3b) Plot the same sender's TCP window over simulation time. Calculate the throughput of this connection By changing the script from using TCP/Reno to TCP/Newreno, repeat the simulation and again calculate the throughput. Is there any improvement between TCP/Reno compare to TCP/Newreno? Comment if there is any improvement. 5. POST-EXPERIMENTAL ANALYSIS AND DISCUSSIONS Discuss what are the limitations of conducting simulation experiment using NS-2 compare to real implementation testing? Besides using the xgraph to plot the out graph, name and discuss other tools that can use for the same purpose? Discuss in brief, what would be the best implementation and assumptions for a video conference simulation. 6. REFERENCES [1] The Network Simulator - NS-2 (no date). Home page. [Online]. University of Michigan. [2007, June 11]. [2] NS Manual (no date). Home page. [Online]. University of Michigan. [2007, June 11]. [3] NS by Example (no date). Home page. [Online]. University of Michigan. [2007, June 11]. [4] Fred Halsall, Computer Networking and the Internet, 5th Edition, Addison Wesley; 2005 Khairil/Shamini/Muslim Updated (CN1) 10 of 15

12 Appendix I How to Start Create an event scheduler set ns [new Simulator] Open a file for trace data set nf [open out.nam w] $ns namtrace-all $nf A procedure to close file and start NAM proc finish { { global ns nf $ns flush-trace close $nf exec nam out.nam & exit 0 Schedule the procedure $ns at 5.0 "finish" Start simulation $ns run Topology Node set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] Link $ns duplex-link $n0 $n1 1Mb 5ms DropTail $ns duplex-link $n1 $n2 400Kb 10ms DropTail Agent/Application Create a UDP agent and attach it to node n0 set udp [new Agent/UDP] $ns attach-agent $n0 $udp Create a CBR traffic source and attach it to udp0 set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp Create a null agent to be traffic sink set null [new Agent/Null] $ns attach-agent $n2 $null Connect them $ns connect $udp $null Schedule the event $ns at 0.5 "$cbr start" $ns at 4.5 "$cbr stop" Create a TCP agent and attach it to node n0 set tcp [new Agent/TCP] $ns attach-agent $n0 $tcp Create a TCPSink agent to be traffic sink set sink [new Agent/TCPSink] $ns attach-agent $n2 $sink Connect them $ns connect $tcp $sink Schedule the event $ns at 0.5 "$ftp start" $ns at 4.5 "$ftp stop" Traces Traces in NS-2 format $ns trace-all [open tr.out w] <event> <time> <from> <to> <pkt> <size> -- <fid> <src> <dst> <seq> <attr> cbr cbr r cbr d cbr Traces in NAM format $ns namtrace-all [open tr.nam w] Turn on tracing on specific links $ns trace-queue $n0 $n1 $ns namtrace-queue $n0 $n1 Event and Queuing Schedule events $ns at <time> <event> <event>: any legitimate ns/tcl commands Links and queuing $ns duplex-link $n0 $n1 <bandwidth> <delay> <queue_type> <queue_type>: DropTail, RED, CBQ, FQ, SFQ, DRR Routing Unicast $ns rtproto <type> <type>: Static, Session, DV, cost, multi-path Multicast $ns multicast (right after [new Simulator]) or set ns [new Simulator multicast on] $ns mrtproto <type> <type>: CtrMcast, DM, ST, BST (centralized,dense mode, shared tree) Create a FTP traffic source and attach it to udp0 set ftp [new Application/FTP] $ftp attach-agent $tcp Khairil/Shamini/Muslim Updated (CN1) 11 of 15

13 Traffic on top of UDP UDP set udp [new Agent/UDP] set null [new Agent/Null] $ns attach-agent $n0 $udp $ns attach-agent $n1 $null $ns connect $udp $null CBR set src [new Application/Traffic/CBR] Exponential or Pareto set src [new Application/Traffic/Exponential] set src [new Application/Traffic/Pareto] Traffic on Top of TCP TCP set tcp [new Agent/TCP] set tcpsink [new Agent/TCPSink] $ns attach-agent $n0 $tcp $ns attach-agent $n1 $tcpsink $ns connect $tcp $tcpsink FTP set ftp [new Application/FTP] $ftp attach-agent $tcp Telnet set telnet [new Application/Telnet] $telnet attach-agent $tcp Khairil/Shamini/Muslim Updated (CN1) 12 of 15

14 Appendix II Experiment 2 Source Code #Create a simulator object set ns [new Simulator] #Open trace files set f [open experiment2.tr w] $ns trace-all $f #Open the nam trace file set nf [open experiment2.nam w] $ns namtrace-all $nf #s1, s2 and s3 act as sources. set s1 [$ns node] set s2 [$ns node] set s3 [$ns node] #G acts as a gateway. set G [$ns node] #r acts as a receiver. set r [$ns node] #Define different colors for data flows $ns color 1 red ;# the color of packets from s1 $ns color 2 SeaGreen ;# the color of packets from s2 $ns color 3 blue ;# the color of packets from s3 #Create links between the nodes $ns duplex-link $s1 $G 6Mb 1ms DropTail $ns duplex-link $s2 $G 6Mb 1ms DropTail $ns duplex-link $s3 $G 6Mb 1ms DropTail $ns duplex-link $G $r 3Mb 1ms DropTail #Define the queue size for the link between node G and r $ns queue-limit $G $r 5 #Define the layout of the topology $ns duplex-link-op $s1 $G orient right-up $ns duplex-link-op $s2 $G orient right $ns duplex-link-op $s3 $G orient right-down $ns duplex-link-op $G $r orient right #Monitor the queues for links $ns duplex-link-op $s1 $G queuepos 0.5 $ns duplex-link-op $s2 $G queuepos 0.5 $ns duplex-link-op $s3 $G queuepos 0.5 $ns duplex-link-op $G $r queuepos 0.5 #Create a TCP agent and attach it to node s1 set tcp1 [new Agent/TCP/Reno] $ns attach-agent $s1 $tcp1 $tcp1 set window_ 8 $tcp1 set fid_ 1 #Create a TCP agent and attach it to node s2 set tcp2 [new Agent/TCP/Reno] $ns attach-agent $s2 $tcp2 $tcp2 set window_ 8 $tcp2 set fid_ 2 #Create a TCP agent and attach it to node s3 set tcp3 [new Agent/TCP/Reno] $ns attach-agent $s3 $tcp3 $tcp3 set window_ 4 $tcp3 set fid_ 3 #Create TCP sink agents and attach them to node r set sink1 [new Agent/TCPSink] set sink2 [new Agent/TCPSink] set sink3 [new Agent/TCPSink] $ns attach-agent $r $sink1 $ns attach-agent $r $sink2 $ns attach-agent $r $sink3 #Connect the traffic sources with the traffic sinks $ns connect $tcp1 $sink1 $ns connect $tcp2 $sink2 $ns connect $tcp3 $sink3 #Create FTP applications and attach them to agents set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1 set ftp2 [new Application/FTP] $ftp2 attach-agent $tcp2 set ftp3 [new Application/FTP] $ftp3 attach-agent $tcp3 #Define a 'finish' procedure proc finish { { global ns $ns flush-trace puts "running nam..." exec nam experiment2 & exit 0 $ns at 0.0 "$s1 label Sender1" $ns at 0.0 "$s2 label Sender2" $ns at 0.0 "$s3 label Sender3" $ns at 0.0 "$G label Gateway" $ns at 0.0 "$r label Receiver" $ns at 0.1 "$ftp1 start" $ns at 0.1 "$ftp2 start" $ns at 0.1 "$ftp3 start" $ns at 5.0 "$ftp1 stop" $ns at 5.0 "$ftp2 stop" $ns at 5.0 "$ftp3 stop" $ns at 5.25 "finish" $ns run Khairil/Shamini/Muslim Updated (CN1) 13 of 15

15 Appendix III Experiment 3-1 Source Code # Author: Jeff Pang edited MMU # whether to create the nam log for visualization {yes,no set namlog "yes" # when to start the sender set starttime 1.0 # when to stop the simulation set stoptime 10.0 # where to log the sender's cwnd trace set logfilename "experiment3-1.out" $tcpsender tracevar cwnd_ $ns connect $tcpsender $tcpreceiver $ns at $starttime "$ftp start" $ns at $stoptime "$ftp stop" $ns at $stoptime "finish" # do the simulation $ns run set ns [new Simulator] set cwndf [open $logfilename w] if {$namlog == "yes" { set namf [open experiment3-1.nam w] $ns namtrace-all $namf proc finish { { global ns namlog cwndf namf $ns flush-trace close $cwndf if {$namlog == "yes" { close $namf exit 0 # source node set src [$ns node] # desination node set dst [$ns node] # routers set r1 [$ns node] set r2 [$ns node] # bottleneck link $ns duplex-link $r1 $r2 1Mb 16ms DropTail # router queue $ns queue-limit $r1 $r2 5 # access links $ns duplex-link $src $r1 11Mb 2ms DropTail $ns duplex-link $dst $r2 11Mb 2ms DropTail # attach tcp agents set tcpsender [new Agent/TCP/Reno] # configure tcp agent $ns attach-agent $src $tcpsender set tcpreceiver [new Agent/TCPSink] $ns attach-agent $dst $tcpreceiver # have the sender run an ftp app set ftp [new Application/FTP] $ftp attach-agent $tcpsender # trace the sender's cwnd $tcpsender attach $cwndf Khairil/Shamini/Muslim Updated (CN1) 14 of 15

16 Appendix IV Experiment 3-2 Source Code # Author: Jeff Pang edited MMU # whether to create the nam log for visualization {yes,no set namlog "yes" # when to start the sender set starttime 1.0 # when the link starts being lossy set losstime 10.0 # when to stop the simulation set stoptime 40.0 # where to log the sender's cwnd trace set logfilename "experiment3-2.out" set ns [new Simulator] set cwndf [open $logfilename w] if {$namlog == "yes" { set namf [open experiment3-2.nam w] $ns namtrace-all $namf proc finish { { global ns namlog cwndf namf $ns flush-trace close $cwndf if {$namlog == "yes" { close $namf exit 0 # attach tcp agents set tcpsender [new Agent/TCP/Newreno] # configure tcp agent $ns attach-agent $src $tcpsender set tcpreceiver [new Agent/TCPSink] $ns attach-agent $dst $tcpreceiver # have the sender run an ftp app set ftp [new Application/FTP] $ftp attach-agent $tcpsender # trace the sender's cwnd $tcpsender attach $cwndf $tcpsender tracevar cwnd_ $ns connect $tcpsender $tcpreceiver $ns at $starttime "$ftp start" $ns at $stoptime "$ftp stop" $ns at $stoptime "finish" # do the simulation $ns run # source node set src [$ns node] # desination node set dst [$ns node] # routers set r1 [$ns node] set r2 [$ns node] # bottleneck link $ns duplex-link $r1 $r2 1Mb 10ms DropTail # router queue $ns queue-limit $r1 $r2 10 # access links $ns duplex-link $src $r1 11Mb 2ms DropTail $ns duplex-link $r2 $dst 11Mb 2ms DropTail # pretend the receiver is on a lossy wireless link # the error model for the link % loss rate set em [new ErrorModel/Uniform 0.1 pkt] $em drop-target [new Agent/Null] # attach error model to the link after slow start $ns at $losstime "$ns lossmodel $em $r2 $dst" Khairil/Shamini/Muslim Updated (CN1) 15 of 15

17 ETM3056 Communication Networks Wireless Network Simulation 1. OBJECTIVE CN2 : WIRELESS NETWORK SIMULATION Faculty of Engineering Multimedia University CN2 In this laboratory, you are going to learn to use the mobile wireless simulation model available in the Network Simulator (NS). Three experiments have been setup to simulate different topology and different functionalities of the wireless capability in NS. 2. INTRODUCTION NS is an Application Programming Interface (API). The wireless model in NS was originally designed by CMU's Monarch group's mobility extension. In this original version, it covers the internal of a mobilenode, routing mechanisms and network components that are used to construct the network stack for a mobilenode. The components that are covered briefly are Channel, Network-interface, Radio Propagation model, MAC protocols, Interface Queue, Link Layer and Address Resolution Protocol model (ARP). CMU trace support and Generation of node movement and traffic scenario files are also covered. The original CMU model allows simulation of pure wireless LANs or multihop ad-hoc networks. Further extensions were made to this model to allow combined simulation of wired and wireless networks. MobileIP was also extended to the wireless model. A mobilenode consists of network components like Link Layer (LL), Interface Queue (IfQ), MAC layer, the wireless channel nodes transmit and receive signals from, etc. For details about these network components refer to the NS Manual. At the beginning of a wireless simulation, we need to define the type for each of these network components. For example, there are four different wireless ad-hoc routing protocols currently implemented for mobile networking in NS that we could choose from. They are (i) DSDV (Highly Dynamic Destination-Sequenced Distance Vector routing protocol), (ii) Dynamic Source Routing (DSR), (iii) TORA (Temporally-Ordered Routing Algorithm routing protocol) and (iv) Ad hoc Ondemand Distance Vector Routing (AODV). Additionally, we need to define other parameters like the type of antenna, the radio-propagation model used by mobilenodes, etc. See comments in the code below for a brief description of each variable defined. The array used to define these variables, val() is not global as it used to be in the earlier wireless scripts. We will begin our tcl script with a list of these different parameters described above, as follows: # ====================================================================== # Define options # ====================================================================== set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(ant) Antenna/OmniAntenna ;# Antenna type set val(ll) LL ;# Link layer type set val(ifq) Queue/DropTail/PriQueue ;# Interface queue type set val(ifqlen) 50 ;# max packet in ifq set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(rp) DSDV ;# ad-hoc routing protocol set val(nn) 2 ;# number of mobilenodes An object god will need to be created. Quoted from CMU document on god, "God (General Operations Director) is the object that is used to store global information about the state of the environment, network or nodes that an omniscient observer would have, but that should not be made known to any participant in the simulation." Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 1 of 13

18 ETM3056 Communication Networks Wireless Network Simulation Currently, god object stores the total number of mobile nodes and a table of shortest number of hops required to reach from one node to another. The next hop information is normally loaded into god object from movement pattern files, before simulation begins, since calculating this on the fly during simulation runs can be quite time consuming. However, in order to keep this example simple we avoid using movement pattern files and thus do not provide god with next hop information. The usage of movement pattern files and feeding of next hop info to god shall be shown in the example in the next sub-section. The procedure create-god is defined in ~ns/tcl/mobility/com.tcl, which allows only a single global instance of the god object to be created during a simulation. In addition to the evaluation functionalities, the god object is called internally by MAC objects in mobilenodes. So even though we may not utilise god for evaluation purposes, we still need to create god. A setdest program generates movement pattern files using the random waypoint algorithm. The nodemovement files generated using setdest (like scen-3-test which we will use in Experiment 2) already include lines like above to load the god object with the appropriate information at the appropriate time. A program called calcdest (~ns/indep-utilities/cmu-scen-gen/setdest/calcdest) can be used to annotate movement pattern files generated by other means with the lines of god information. calcdest makes several assumptions about the format of the lines in the input movement pattern file which will cause it to fail if the file is not formatted properly. If calcdest rejects a movement pattern file you have created, the easiest way to format it properly is often to load it into ad-hockey and then save it out again. If adhockey can read your input correctly, its output will be properly formatted for calcdest. Both setdest and calcdest calculate the shortest number of hops between nodes based on the nominal radio range, ignoring any effects that might be introduced by the propagation model in an actual simulation. The nominal range is either provided as an argument to the programs, or extracted from the header in node-movement pattern files. The path length information provided to god was used by CMU's Monarch Project to analyze the path length optimality of ad hoc network routing protocols, and so was printed out as part of the CMUTrace output for each packet. 3. SOFTWARE REQUIRED i. Network Simulator (NS) ii. Network Animator (nam) iii. Object Oriented Tool Control Language (OTcl) 4. EXPERIMENT 4.1 Experiment 1: Creating a simple wireless scenario We are going to simulate a very simple 2-node wireless scenario. The topology consists of two mobilenodes, node_(0) and node_(1). The mobilenodes move about within an area whose boundary is defined in this example as 500mX500m. The nodes start out initially at two opposite ends of the boundary. Then they move towards each other in the first half of the simulation and again move away for the second half. A TCP connection is setup between the two mobilenodes. Packets are exchanged between the nodes as they come within hearing range of one another. As they move away, packets start getting dropped. Just as with any other ns simulation, we begin by creating a tcl script for the wireless simulation. You need to assign a name to this tcl file such as mywireless.tcl. Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 2 of 13

19 ETM3056 Communication Networks Wireless Network Simulation Next we go to the main part of the program and start by creating an instance of the simulator, set ns_ [new Simulator] Then setup trace support by opening a xxx.tr file (such as simple.tr) and call the procedure trace-all { as follows: set tracefd [open simple.tr w] $ns_ trace-all $tracefd Also we are going to set up nam traces. To support nam trace, setup this by opening a xxx.nam file (such as wireless-out.nam). set namtrace [open wireless-out.nam w] $ns_ namtrace-all-wireless $namtrace ;# for nam tracing Next create a topology object that keeps track of movements of mobilenodes within the topological boundary. set topo [new Topography] We had earlier mentioned that mobilenodes move within a topology of 500mX500m. We provide the topography object with x and y co-ordinates of the boundary, (x=500, y=500) : $topo load_flatgrid The topography is broken up into grids and the default value of grid resolution is 1. A different value can be passed as a third parameter to load_flatgrid { above. Next we create the object god, as follows: create-god $val(nn) Then, we create mobilenodes. First, we need to configure nodes before we can create them. Node configuration API may consist of defining the type of addressing (flat/hierarchical etc), the type of adhoc routing protocol, Link Layer, MAC layer, IfQ etc. The configuration API can be defined as follows: (parameter examples) # $ns_ node-config -addressingtype flat or hierarchical or expanded # -adhocrouting DSDV or DSR or TORA # -lltype LL # -mactype Mac/802_11 # -proptype "Propagation/TwoRayGround" # -ifqtype "Queue/DropTail/PriQueue" # -ifqlen 50 # -phytype "Phy/WirelessPhy" # -anttype "Antenna/OmniAntenna" # -channeltype "Channel/WirelessChannel" # -topoinstance $topo # -energymodel "EnergyModel" # -initialenergy (in Joules) # -rxpower (in W) # -txpower (in W) # -agenttrace ON or OFF # -routertrace ON or OFF # -mactrace ON or OFF # -movementtrace ON or OFF Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 3 of 13

20 ETM3056 Communication Networks Wireless Network Simulation Note: All default values for these options are NULL except for addressingtype = flat We are going to use the default value of flat addressing. Also let s turn on only AgentTrace and RouterTrace. You can experiment with the traces by turning all of them on. MovementTrace, when turned on, shows the movement of the mobilenodes. The configuration API for creating mobilenodes looks as follows: # Configure nodes $ns_ node-config -adhocrouting $val(rp) \ -lltype $val(ll) \ -mactype $val(mac) \ -ifqtype $val(ifq) \ -ifqlen $val(ifqlen) \ -anttype $val(ant) \ -proptype $val(prop) \ -phytype $val(netif) \ -topoinstance $topo \ -channeltype $val(chan) \ -agenttrace ON \ -routertrace ON \ -mactrace OFF \ -movementtrace ON Next we create the two (2) mobilenodes as follows: for {set i 0 {$i < $val(nn) {incr i { set node_($i) [$ns_ node ] $node_($i) random-motion 0 ;# disable random motion The random-motion for nodes is disabled here, as we are going to provide node position and movement (speed & direction) directives next. Now that we have created mobilenodes, we need to give them a position to start with, # # Provide initial (X,Y, for now Z=0) co-ordinates for node_(0) and node_(1) # $node_(0) set X_ 5.0 $node_(0) set Y_ 2.0 $node_(0) set Z_ 0.0 $node_(1) set X_ $node_(1) set Y_ $node_(1) set Z_ 0.0 Node0 has a starting position of (5,2) while Node1 starts off at location (390,385). Next we produce some node movements: # # Node_(1) starts to move towards node_(0) # $ns_ at 50.0 "$node_(1) setdest " $ns_ at 10.0 "$node_(0) setdest " # Node_(1) then starts to move away from node_(0) $ns_ at "$node_(1) setdest " $ns_ at 50.0 "$node_(1) setdest " means at time 50.0s, node1 starts to move towards the destination (x=25,y=20) at a speed of 15m/s. This API is used to change direction and speed of movement of the mobilenodes. Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 4 of 13

21 ETM3056 Communication Networks Wireless Network Simulation Next setup traffic flow between the two nodes as follows: # TCP connections between node_(0) and node_(1) set tcp [new Agent/TCP] $tcp set class_ 2 set sink [new Agent/TCPSink] $ns_ attach-agent $node_(0) $tcp $ns_ attach-agent $node_(1) $sink $ns_ connect $tcp $sink set ftp [new Application/FTP] $ftp attach-agent $tcp $ns_ at 10.0 "$ftp start" This sets up a TCP connection between the two nodes with a TCP source on node0. Next add the following lines for providing initial position of nodes in nam. # Define node initial position in nam for {set i 0 {$i < $val(nn) {incr i { # 20 defines the node size in nam, must adjust it according to your # scenario size. # The function must be called after mobility model is defined $ns_ initial_node_pos $node_($i) 20 Then we need to define stop time when the simulation ends and tell mobilenodes to reset which actually resets their internal network components, # # Tell nodes when the simulation ends # for {set i 0 {$i < $val(nn) {incr i { $ns_ at "$node_($i) reset"; # ending nam and the simulation $ns_ at $val(stop) "$ns_ nam-end-wireless $val(stop)" $ns_ at $val(stop) "stop" $ns_ at "puts \"end simulation\" ; $ns_ halt" proc stop { { global ns_ tracefd namtrace $ns_ flush-trace close $tracefd close $namtrace At time 150.0s, the simulation shall stop. The nodes are reset at that time and the "$ns_ halt" is called at s, a little later after resetting the nodes. The procedure stop{ is called to flush out traces and close the trace file. And finally the command to start the simulation, puts "Starting Simulation..." $ns_ run Now that you have finished writing the code, save the file and assign it a name (such as mywireless.tcl). Next run the simulation by typing "ns filename.tcl " such as "ns mywireless.tcl" at prompt. At the end of the simulation run, trace-output file simple.tr and nam file wireless.nam are created. You can open the file to see the content of these files. As we have turned on the AgentTrace and RouterTrace we see DSDV routing messages and TCP packets being received and sent by Router and Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 5 of 13

22 ETM3056 Communication Networks Wireless Network Simulation Agent objects in node _0_ and _1_. We see TCP flow starting at 10.0s from node0. Initially both the nodes are far apart and thus TCP packets are dropped by node0 as it cannot hear from node1. Around 81.0s the routing info begins to be exchanged between both the nodes and around 100.0s we see the first TCP pkt being received by the Agent at node1 which then sends an ACK back to node0 and the TCP connection is setup. However as node1 starts to move away from node0, the connection breaks down again around time 116.0s. Packets start getting dropped as the nodes move away from one another. To see the movement or animation, type nam filename.nam or nam wireless.nam at prompt. Nam windows will come up and you can see the nodes in one of them. Click on the play button to start the animation. 4.2 Experiment 2: Using node-movement/traffic-pattern files As an extension to the previous experiment, we are going to simulate a simple multihop wireless scenario consisting of 3 mobilenodes here. As before, the mobilenodes move within the boundaries of a defined topology. However the node movements for this example shall be read from a node-movement file called scen-3-test. scen-3-test defines random node movements for the 3 mobilenodes within a topology of 670mX670m. This file is available as a part of the ns distribution and can be found, along with other node-movement files, under directory ~ns/tcl/mobility/scene. Random node movement files like scen-3-test can be generated using CMU's node-movement generator "setdest". In addition to node-movements, traffic flows that are setup between the mobilenodes, are also read from a traffic-pattern file called cbr-3-test. cbr-3-test is also available under ~ns/tcl/mobility/scene. Random CBR and TCP flows are setup between the 3 mobilenodes and data packets are sent, forwarded or received by nodes within hearing range of one another. We shall make changes to the tcl script, we had created in Experiment 1 and shall assign a new name to the resulting file (such as wireless1.tcl). In addition to the variables (LL, MAC, antenna etc) that were declared at the beginning of the script, we now define some more parameters like the connectionpattern and node-movement file, x and y values for the topology boundary, for convenience. They are listed as follows: set val(chan) Channel/WirelessChannel set val(prop) Propagation/TwoRayGround set val(netif) Phy/WirelessPhy set val(mac) Mac/802_11 set val(ifq) Queue/DropTail/PriQueue set val(ll) LL set val(ant) Antenna/OmniAntenna set val(x) 670 ;# X dimension of the topography set val(y) 670 ;# Y dimension of the topography set val(ifqlen) 50 ;# max packet in ifq set val(seed) 0.0 set val(adhocrouting) DSR set val(nn) 3 ;# how many nodes are simulated set val(cp) "../mobility/scene/cbr-3-test" set val(sc) "../mobility/scene/scen-3-test" set val(stop) ;# simulation time Number of mobilenodes is changed to 3. Also we use DSR (dynamic source routing) as the adhoc routing protocol in place of DSDV (Destination sequence distance vector); After the creation of ns_, the simulator instance, open a file (such as wireless1-out.tr) for wireless traces. Also we are going to set up nam traces. You can assign new names for these files as to be different from Experiment 1. set tracefd [open wireless1-out.tr w] $ns_ trace-all $tracefd ;# for wireless traces Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 6 of 13

23 ETM3056 Communication Networks Wireless Network Simulation set namtrace [open wireless1-out.nam w] ;# for nam tracing $ns_ namtrace-all-wireless $namtrace $val(x) $val(y) Next (after the creation of mobilenodes) source node-movement and connection pattern files that were defined earlier as val(sc) and val(cp) respectively. # # Define node movement model # puts "Loading connection pattern..." source $val(cp) # # Define traffic model # puts "Loading scenario file..." source $val(sc) In node-movement file scen-3-test, we see node-movement commands like $ns_ at "$node_(2) setdest \ " This, as described in earlier sub-section, means at time 50s, node2 starts to move towards destination (368.4,170.5) at a speed of 3.37m/s. We also see other lines like $god_ set-dist These are command lines used to load the god object with the shortest hop information. It means the shortest path between node 1 and 2 is 2 hops. By providing this information, the calculation of shortest distance between nodes by the god object during simulation runs, which can be quite time-consuming, is prevented. Next add informative headers for the CMUTrace file, just before the line "ns_ run" : puts $tracefd "M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocrouting)" puts $tracefd "M 0.0 sc $val(sc) cp $val(cp) seed $val(seed)" puts $tracefd "M 0.0 prop $val(prop) ant $val(ant)" The rest of the script remains unchanged. Save the file and assign a name such as wireless1.tcl. Make sure the connection-pattern and nodemovement files exist under the directories as declared above. Run the script by typing at the prompt: ns wireless1.tcl On completion of the run, CMUTrace output file "wireless1-out.tr" and nam output file "wireless1- out.nam" are created. Running wireless1-out.nam we see the three mobilenodes moving in nam window. Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 7 of 13

24 ETM3056 Communication Networks Wireless Network Simulation 4.3 Experiment 3: Creating a simple wired-and-wireless scenario The wireless simulation described earlier supports multi-hop ad-hoc networks or wireless LANs. But we may need to simulate a topology of multiple LANs connected through wired nodes, or in other words we need to create a wired-and-wireless topology. In this section we are going to extend the simple wireless topology created earlier to create a mixed scenario consisting of a wireless and a wired domain, where data is exchanged between the mobile and non-mobile nodes. Modifications have been made to the earlier tcl script and named as wireless2.tcl. For the mixed scenario, we are going to have 2 wired nodes, W(0) and W(1), connected to our wireless domain consisting of 3 mobilenodes (nodes 0, 1 & 2) via a base-station node, BS. Base station nodes are like gateways between wireless and wired domains and allow packets to be exchanged between the two types of nodes. Fig1 below shows the topology for this example described above. The Adhoc routing protocol used is DSDV. Also, we define TCP and CBR connections between the wired and wireless nodes in the script itself. So we do not need to use the connection pattern file used in earlier simulation. Also the simulation stop time has been changed. Note here that we use array opt() Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 8 of 13

25 ETM3056 Communication Networks Wireless Network Simulation instead of val() simply to illustrate that this is no longer a global array variable and its scope is defined only in the test script. The full script is included in the Appendix. Run the script. The ns and nam trace files are generated at the end of simulation run. Running wireless2-out.nam shows the movement of mobilenodes and traffic in the wired domain. 5. REFERENCE i. NS manual, ii. NS tutorial, 6. DISCUSSION/ QUESTIONS i. Discuss and analyze the simulation/animation of the above experiments. Provide your own conclusion. (Possible keywords: TCP, packet, transmit, receive, drop, node movement) ii. Analyze and comment the output trace file (xxx.tr) for each of the experiments. iii. Analyze and comment the output nam file (xxx.nam) for each of the experiments iv. Comment how you would use NS in your own research. v. Name and elaborate some common criteria used in measuring the performance of a communication network. Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 9 of 13

26 ETM3056 Communication Networks Wireless Network Simulation APPENDIX I Below is the connection pattern file cbr-3-test used in Experiment 2: # # 0 connecting to 2 at time # set udp_(0) [new Agent/UDP] $ns_ attach-agent $node_(0) $udp_(0) set null_(0) [new Agent/Null] $ns_ attach-agent $node_(2) $null_(0) set cbr_(0) [new Application/Traffic/CBR] $cbr_(0) set packetsize_ 512 $cbr_(0) set interval_ 4.0 $cbr_(0) set random_ 1 $cbr_(0) set maxpkts_ $cbr_(0) attach-agent $udp_(0) $ns_ connect $udp_(0) $null_(0) $ns_ at "$cbr_(0) start" set tcp [new Agent/TCP] $tcp set class_ 2 set sink [new Agent/TCPSink] $ns_ attach-agent $node_(1) $tcp $ns_ attach-agent $node_(2) $sink $ns_ connect $tcp $sink set ftp [new Application/FTP] $ftp attach-agent $tcp $ns_ at "$ftp start" Below is the node movement file file scen-3-test used in Experiment 2: set god_ [God instance] $ns_ at "$node_(2) setdest " $ns_ at "$node_(1) setdest " $ns_ at "$node_(0) setdest " $god_ set-dist $god_ set-dist $god_ set-dist $node_(2) set Z_ $node_(2) set Y_ $node_(2) set X_ $node_(1) set Z_ $node_(1) set Y_ $node_(1) set X_ $node_(0) set Z_ $node_(0) set Y_ $node_(0) set X_ Authors: Zalifah/Khairil/Nazeri/ (T1 Session 2010/2011) Page 10 of 13

DMN1 : COMMUNICATION PROTOCOL SIMULATION. Faculty of Engineering Multimedia University

DMN1 : COMMUNICATION PROTOCOL SIMULATION. Faculty of Engineering Multimedia University DMN1 : COMMUNICATION PROTOCOL SIMULATION Faculty of Engineering Multimedia University DMN1 Marking Scheme No Component Criteria Not answered 0 marks Poor 2 marks Acceptable 4 (max) marks 1 Viva Students

More information

Comparing ad-hoc wireless to wiredwireless

Comparing ad-hoc wireless to wiredwireless TNK092: Network Simulation/Nätverkssimulering Network Simulation---ns2 Lecture 6 wired-wireless simulation Comparing ad-hoc wireless to wiredwireless We are going to make modifications to the tcl script

More information

Eexercise5: How to do Data Transmission between Nodes Using TCP in NS2

Eexercise5: How to do Data Transmission between Nodes Using TCP in NS2 Eexercise5: How to do Data Transmission between Nodes Using TCP in NS2 In wireless network, nodes communicate using the communication model that consists of TCP agent, TCPSink agent, and FTP application.

More information

CDA6530: Performance Models of Computers and Networks. Chapter 10: Introduction to Network Simulator (NS2)

CDA6530: Performance Models of Computers and Networks. Chapter 10: Introduction to Network Simulator (NS2) CDA6530: Performance Models of Computers and Networks Chapter 10: Introduction to Network Simulator (NS2) Some Contents are from. USC ISI Network Simulator (ns) Tutorial 2002 http://www.isi.edu/nsnam/ns/ns-tutorial/tutorial-02/index.html

More information

Network Simulator 2. Reti di Telecomunicazioni (CdL Ing. TLC) Telematica I (CdL Ing. INF) Ing. Carla Passiatore.

Network Simulator 2. Reti di Telecomunicazioni (CdL Ing. TLC) Telematica I (CdL Ing. INF) Ing. Carla Passiatore. Network Simulator 2 Reti di Telecomunicazioni (CdL Ing. TLC) Telematica I (CdL Ing. INF) Ing. Carla Passiatore c.passiatore@poliba.it 1 NS2 wireless simulation Use NS to simulate Wireless Network Simple

More information

Part 5. Wireless Network

Part 5. Wireless Network Introduction to NS-2 Part 5. Wireless Network Min Chen School of Computer Science and Engineering Seoul National University 1 Outline Introduction to Wireless Network An Example of Wireless Simulation

More information

PART A SIMULATION EXERCISES

PART A SIMULATION EXERCISES PART A SIMULATION EXERCISES 1. Simulate a three nodes point to point network with duplex links between them. Set the queue size and vary the bandwidth and find the number of packets dropped. set ns [ new

More information

REVA INSTITUTE OF TECHNOLOGY AND MANAGEMENT. Kattigenahalli, Jala Hobli, Yelahanka, Bangalore

REVA INSTITUTE OF TECHNOLOGY AND MANAGEMENT. Kattigenahalli, Jala Hobli, Yelahanka, Bangalore REVA INSTITUTE OF TECHNOLOGY AND MANAGEMENT Kattigenahalli, Jala Hobli, Yelahanka, Bangalore 560 064 Department of Master of Computer Applications III Semester MCA Laboratory Manual 1 Subject Code: I.A

More information

ANALYSIS OF SMART DEVICE GAME PROTOCOL

ANALYSIS OF SMART DEVICE GAME PROTOCOL ENSC 427: COMMUNICATION NETWORKS SPRING 2013 ANALYSIS OF SMART DEVICE GAME PROTOCOL http://www.sfu.ca/~mea19/ Mehdi Elahi (mea19@sfu.ca) 301043763 Seyed Ahmari (mahmari@sfu.ca) 301124836 Bilal Nurhusien

More information

The Network Simulator Fundamentals. Downloads and further info at:

The Network Simulator Fundamentals. Downloads and further info at: ns-2 The Network Simulator Fundamentals Downloads and further info at: http://www.isi.edu/nsnam/ns 1 ns Primer Basic ns Architecture Basic Tcl, OTcl Elements of ns 2 ns Architecture Object-oriented (C++,

More information

Mohammad Hossein Manshaei 1393

Mohammad Hossein Manshaei 1393 Mohammad Hossein Manshaei manshaei@gmail.com 1393 A brief Introduction to ns-2 2 Contents 1. Introduction to ns-2 2. ns-2 Components 3. Create a Basic ns-2 Model 4. Case Study: WiFi Simulation 5. Simulation

More information

Network Simulator 2. Telematica I (CdL Ing. INF) Ing. Giuseppe Piro.

Network Simulator 2. Telematica I (CdL Ing. INF) Ing. Giuseppe Piro. Network Simulator 2 Telematica I (CdL Ing. INF) Ing. Giuseppe Piro g.piro@poliba.it 1 NS-2 Goals NS-2 is a Network Simulator - version 2 Can setup network topologies Generate packet traffic similar to

More information

Simulations: ns2 simulator part I a

Simulations: ns2 simulator part I a Simulations: ns2 simulator part I a Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/ moltchan/modsim/ a Based on: Eitan Altman and Tania Jimenez NS Simulator for Beginners,...

More information

Network Simulator 2: Introduction

Network Simulator 2: Introduction Network Simulator 2: Introduction Presented by Ke Liu Dept. Of Computer Science SUNY Binghamton Spring, 2006 1 NS-2 Overview 2 NS-2 Developed by UC Berkeley Maintained by USC Popular simulator in scientific

More information

An Introduction to NS-2

An Introduction to NS-2 An Introduction to NS-2 * Roadmap For Today s Lecture 1. ns Primer 2. Extending ns Part I: ns Primer What is ns? Object-oriented, discrete event-driven network simulator Written in C++ and OTcl By VINT:

More information

Analysis and Performance Evaluation of Routing Protocols in MANETS

Analysis and Performance Evaluation of Routing Protocols in MANETS Analysis and Performance Evaluation of Routing Protocols in MANETS Team Effort by Ankita Mukherjee Roopashree N Department of Computer Science & Engineering, Santa Clara University Fall 2014 Preface Mobile

More information

IJESRT INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY INVESTIGATION ON THE INTERNET OF THINGS Jin Wang *, Yi bin Hou *

IJESRT INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY INVESTIGATION ON THE INTERNET OF THINGS Jin Wang *, Yi bin Hou * IJESRT INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY INVESTIGATION ON THE INTERNET OF THINGS Jin Wang *, Yi bin Hou * School of software engineering, Department of Information, Beijing

More information

ns-2 Tutorial Exercise (1)

ns-2 Tutorial Exercise (1) ns-2 Tutorial Exercise (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Adopted from Nicolas s slides Jianping Wang, 2002 cs757 On to the Tutorial Work in group of

More information

TCP over Ad Hoc Networks : NS-2 Simulation Analysis. Ren Mao, Haobing Wang, Li Li, Fei Ye

TCP over Ad Hoc Networks : NS-2 Simulation Analysis. Ren Mao, Haobing Wang, Li Li, Fei Ye TCP over Ad Hoc Networks : NS-2 Simulation Analysis Ren Mao, Haobing Wang, Li Li, Fei Ye Chapter 1 Introduction This report is for simulation of TCP transimition in Ad-hoc networks.to begin with,we have

More information

Wireless Networks - Preliminaries

Wireless Networks - Preliminaries This chapter describes an overview and classification of networks used for communication. A comparative simulation study regarding nature of wired and wireless network through commercially available simulators

More information

Project Network Simulation CSE 5346/4346

Project Network Simulation CSE 5346/4346 Project Network Simulation CSE 5346/4346 Project Overview This is a comprehensive project designed to be completed by 4 phases, and intended to demonstrate network performance and quality of service (QoS)

More information

The Transport Control Protocol (TCP)

The Transport Control Protocol (TCP) TNK092: Network Simulation - Nätverkssimulering Lecture 3: TCP, and random/short sessions Vangelis Angelakis Ph.D. The Transport Control Protocol (TCP) Objectives of TCP and flow control Create a reliable

More information

Scholars Research Library. Investigation of attack types in Ad Hoc networks and simulation of wormhole avoidance routing protocol

Scholars Research Library. Investigation of attack types in Ad Hoc networks and simulation of wormhole avoidance routing protocol Available online at www.scholarsresearchlibrary.com European Journal of Applied Engineering and Scientific Research, 2012, 1 (4):207-215 (http://scholarsresearchlibrary.com/archive.html) ISSN: 2278 0041

More information

Tcl script 2

Tcl script 2 Ns : 5... 1 5...nam ns 6... ns 6... nam 1.1 1.2 1.3 7... Tcl script 2 8... 9... 10... 2.1 2.2 2.3 12... 3 13... ( ) 14... 16... 17... 3.1 3.2 3.3 3.4 18... 4 18... 20... 4.1 4.2 22... Xgraph 5 22... 5.1

More information

Introduction. Ns Tutorial Ns Goals. SAMAN and CONSER Projects. Ns Status. Ns functionalities

Introduction. Ns Tutorial Ns Goals. SAMAN and CONSER Projects. Ns Status. Ns functionalities Introduction Ns Tutorial 2002 Padmaparna Haldar (haldar@isi.edu) Xuan Chen (xuanc@isi.edu) Nov 21, 2002 1989: REAL network simulator 1995: DARPA VINT project at LBL, Xerox PARC, UCB, and USC/ISI Present:

More information

Performance Analysis of Routing Protocols

Performance Analysis of Routing Protocols IOSR Journal of Engineering (IOSRJEN) ISSN (e): 2250-3021, ISSN (p): 2278-8719 Vol. 08, Issue 5 (May. 2018), VI PP 69-77 www.iosrjen.org Performance Analysis of Routing Protocols N Dinesh Kumar 1, V.S

More information

Simulation with NS-2 and CPN tools. Ying-Dar Lin Department of Computer Science, National Chiao Tung University

Simulation with NS-2 and CPN tools. Ying-Dar Lin Department of Computer Science, National Chiao Tung University Simulation with NS-2 and CPN tools Ying-Dar Lin Department of Computer Science, National Chiao Tung University Outline NS-2 simulator NS-2 basics Basic syntax Tracing a simple network Mini and term projects

More information

NS-2 Tutorial. Kumar Viswanath CMPE 252a.

NS-2 Tutorial. Kumar Viswanath CMPE 252a. NS-2 Tutorial Kumar Viswanath CMPE 252a kumarv@cse.ucsc.edu 1 What is ns-2? ns-2 stands for Network Simulator version 2. ns-2: Is a discrete event simulator for networking research packet level simulator.

More information

DMN2 : ROUTING AND LAN EXPERIMENT. Faculty of Engineering Multimedia University

DMN2 : ROUTING AND LAN EXPERIMENT. Faculty of Engineering Multimedia University DMN2 : ROUTING AND LAN EXPERIMENT Faculty of Engineering Multimedia University DMN2 Marking Scheme No Component Criteria Not answered 0 marks Poor 2 marks Acceptable 4 (max) marks 1 Viva Students able

More information

Babak Shahabi ( ), Shaoyun Yang ( ) Team # 7

Babak Shahabi ( ), Shaoyun Yang ( ) Team # 7 www.sfu.ca/~bshahabi Babak Shahabi (301102998), Shaoyun Yang (301133524) bshahabi@sfu.ca yshaoyun@sfu.ca Team # 7 1 Table of contents Contents Contents... 2 Related Works... 5 1. Mobile IP overview...

More information

ABSTRACT. socialize with nearby users of common interest, but there exists no pre-established session

ABSTRACT. socialize with nearby users of common interest, but there exists no pre-established session ii ABSTRACT An opportunistic network application is a scenario in which mobile node users socialize with nearby users of common interest, but there exists no pre-established session by which users register

More information

EE 122: Computer Networks Network Simulator ns2

EE 122: Computer Networks Network Simulator ns2 EE 122: Computer Networks Network Simulator ns2 Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA 94720-1776 Adapted from F04 Slides K. Fall, J.

More information

Network Simulator 2 (NS2)

Network Simulator 2 (NS2) Network Simulator 2 (NS2) Basics and Mobility Management 1. Experiment 1 Let the following example be considered. All links in this network have a bandwidth of 1 Mbit/s. Please go through the tasks (1-1)

More information

ns-2 Tutorial Contents: Today Objectives of this week What is ns-2? Working with ns-2 Tutorial exercise ns-2 internals Extending ns-2

ns-2 Tutorial Contents: Today Objectives of this week What is ns-2? Working with ns-2 Tutorial exercise ns-2 internals Extending ns-2 ns-2 Tutorial Contents: Objectives of this week What is ns-2? Working with ns-2 Tutorial exercise ns-2 internals Extending ns-2 Today Partly adopted from Nicolas slides. 1 Objectives of this week Get some

More information

Simple Data Link Protocols

Simple Data Link Protocols Simple Data Link Protocols Goals 1) Become familiar with Network Simulator 2 2) Simulate Stop & wait and Sliding Window 3) Investigate the effect of channel with loss on link utilization Introduction Data

More information

arxiv: v2 [cs.ni] 26 Jul 2010

arxiv: v2 [cs.ni] 26 Jul 2010 arxiv:1007.4065v2 [cs.ni] 26 Jul 2010 A Tutorial on the Implementation of Ad-hoc On Demand Distance Vector (AODV) Protocol in Network Simulator (NS-2) Mubashir Husain Rehmani, Sidney Doria, and Mustapha

More information

Part 3: Network Simulator 2

Part 3: Network Simulator 2 S-38.148 Simulation of data networks / fall-04 Part 3: Network Simulator 2 24.11.2004 1 NS2: Contents NS2 Introduction to NS2 simulator Background info Main concepts, basics of Tcl and Otcl NS2 simulation

More information

Tutorial Schedule. Introduction Ns fundamentals Ns programming internal Extending ns-2 Simulator. Sep. 25,

Tutorial Schedule. Introduction Ns fundamentals Ns programming internal Extending ns-2 Simulator. Sep. 25, NS-2 Tutorial Presenter: Qing (Kenny) Shao (SFU/CNL) Author: Polly Huang (AT&T Labs Research) Padmaparna Haldar (USC/ISI) Xuan Chen (USC/ISI) Communication Networks Laboratory http://www.ensc.sfu.ca/research/cnl

More information

Brief Overview and Background

Brief Overview and Background Brief Overview and Background In this assignment you will be studying the performance behavior of TCP, using ns 2. At the end of this exercise, you should be able to write simple scripts in ns 2 as well

More information

ENSC 427: COMMUNICATION NETWORKS SPRING 2014 FINAL PROJECT

ENSC 427: COMMUNICATION NETWORKS SPRING 2014 FINAL PROJECT ENSC 427: COMMUNICATION NETWORKS SPRING 2014 FINAL PROJECT VoIP Performance of City-Wide Wi-Fi and LTE www.sfu.ca/~tly/webpage.html Ou, Cheng Jie 301144355 Yang, Tian Lin 301107652

More information

John Heidemann, USC/ISI and Polly Huang, ETH-Zurich 14 March 2002

John Heidemann, USC/ISI and Polly Huang, ETH-Zurich 14 March 2002 QVWKHQHWZRUNVLPXODWRU,3$07XWRULDO 1HWZRUN0RGHOLQJDQG7UDIILF $QDO\VLVZLWKQV John Heidemann, USC/ISI and Polly Huang, ETH-Zurich 14 March 2002 a discrete event simulator simple model focused on modeling

More information

Part 6. Confidence Interval

Part 6. Confidence Interval Introduction to NS-2 Part 6. Confidence Interval Min Chen School of Computer Science and Engineering Seoul National University 1 Outline Definitions Normal Distribution Confidence Interval Central Limit

More information

S Quality of Service in Internet. Introduction to the Exercises Timo Viipuri

S Quality of Service in Internet. Introduction to the Exercises Timo Viipuri S-38.180 Quality of Service in Internet Introduction to the Exercises Timo Viipuri 8.10.2003 Exercise Subjects 1) General matters in doing the exercises Work environment Making the exercises and returning

More information

Simulation-Based Comparative Study of Routing Protocols for Wireless Ad-Hoc Network

Simulation-Based Comparative Study of Routing Protocols for Wireless Ad-Hoc Network Master s Thesis Electrical Engineering September 2014 Simulation-Based Comparative Study of Routing Protocols for Wireless Ad-Hoc Network Jani Saida Shaik School of Computing Blekinge Institute of Technology

More information

1 What is network simulation and how can it be useful?

1 What is network simulation and how can it be useful? CESNET Technical Report 26/2003 Experience with using simulations for congestion control research Sven Ubik, ubik@cesnet.cz Jan Klaban, xklaban@quick.cz December 5, 2003 Abstract As part of the CESNET

More information

Project report Cross-layer approach in mobile as hoc routing by

Project report Cross-layer approach in mobile as hoc routing by Project report Cross-layer approach in mobile as hoc routing by Alexandre Boursier boursier@kom.aau.dk Stéphane Dahlen sdahlen@kom.aau.dk Julien Marie-Françoise mariefra@kom.aau.dk Thior Santander Marin

More information

LAN-WAN-LAN end-to-end Network Simulation with NS2

LAN-WAN-LAN end-to-end Network Simulation with NS2 International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 17 (2018) pp 13136-13140 Research India Publications http://wwwripublicationcom LAN-WAN-LAN end-to-end Network Simulation

More information

ICE 1332/0715 Mobile Computing (Summer, 2008)

ICE 1332/0715 Mobile Computing (Summer, 2008) ICE 1332/0715 Mobile Computing (Summer, 2008) Ns-2 Laboratory Prof. Chansu Yu http://academic.csuohio.edu/yuc/ In-Class Lab: Mobile IP 5 nodes 2 wired nodes, W(0) and W(1) 2 mobile agents, HA and FA A

More information

Evaluation of Epidemic Routing Protocol in Delay Tolerant Networks

Evaluation of Epidemic Routing Protocol in Delay Tolerant Networks Evaluation of Epidemic Routing Protocol in Delay Tolerant Networks D. Kiranmayi Department of CSE, Vignan s Institute Of IT, Visakhapatnam, India ABSTRACT:There are many routing protocols that which can

More information

ns-2 Tutorial (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Jianping Wang, 2002 cs757 1

ns-2 Tutorial (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Jianping Wang, 2002 cs757 1 ns-2 Tutorial (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Jianping Wang, 2002 cs757 1 Contents: Objectives of this week What is ns-2? Working with ns-2 Tutorial

More information

Part 3. Result Analysis

Part 3. Result Analysis Introduction to NS-2 Part 3. Result Analysis Min Chen School of Computer Science and Engineering Seoul National University 1 Outline A Simulation and its results The Format of Trace File The AWK language

More information

WIRELESS NETWORK STUDY AND ANALYSIS USING NS2 SIMULATOR

WIRELESS NETWORK STUDY AND ANALYSIS USING NS2 SIMULATOR UNIVERSITY OF VAASA FACULTY OF TECHNOLOGY TELECOMMUNICATIONS ENGINEERING Xiang Chao WIRELESS NETWORK STUDY AND ANALYSIS USING NS2 SIMULATOR Master s thesis for the degree of Master of Science in Technology

More information

ENSC 427. Group 05 - Final Report UMTS Cellular & Wi- Fi Network Simulation in NS- 2 3/17/2012

ENSC 427. Group 05 - Final Report UMTS Cellular & Wi- Fi Network Simulation in NS- 2 3/17/2012 2012 ENSC 427 Group 05 - Final Report UMTS Cellular & Wi- Fi Network Simulation in NS- 2 Gyuhan David Choi Seungjae Andy Back Calvin Chun Kwan Ho gca16@sfu.ca sjb18@sfu.ca cch8@sfu.ca 3/17/2012 Contents

More information

Comparison of AODV, DSR, and DSDV Routing Protocols in a Wireless Network

Comparison of AODV, DSR, and DSDV Routing Protocols in a Wireless Network Comparison of AODV, DSR, and DSDV Routing Protocols in a Wireless Network Pushpender Sarao Hyderabad Institute of Technology and Management, Hyderabad-1401, India Email: drpushpendersarao@gmail Abstract

More information

S Ns2 simulation exercise

S Ns2 simulation exercise S-38.3148 Ns2 simulation exercise Fall 2007 1 Table of contents 1. Introduction... 3 2. Theoretical background... 3 2.1. IEEE 802.11 MAC protocol... 3 2.2. Overview of TCP s congestion control... 4 2.3.

More information

STUDY OF PERFORMANCE OF ROUTING PROTOCOLS FOR MOBILE ADHOC NETWORKING IN NS-2

STUDY OF PERFORMANCE OF ROUTING PROTOCOLS FOR MOBILE ADHOC NETWORKING IN NS-2 STUDY OF PERFORMANCE OF ROUTING PROTOCOLS FOR MOBILE ADHOC NETWORKING IN NS-2 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF Bachelor of Technology In Computer Science

More information

Analysis of Routing Protocols in MANETs

Analysis of Routing Protocols in MANETs Analysis of Routing Protocols in MANETs Musica Supriya, Rashmi, Nishchitha, Ashwini C Shetty, Sharath Kumar Student, Dept. of CSE, SMVITM Bantakal, Karnataka, India Student, Dept. of CSE, SMVITM Bantakal,

More information

Modeling of data networks by example: ns-2 (I)

Modeling of data networks by example: ns-2 (I) Modeling of data networks by example: ns-2 (I) Holger Füßler Holger Füßler Course overview 1. Introduction 7. NS-2: Fixed networks 2. Building block: RNG 8. NS-2: Wireless networks 3. Building block: Generating

More information

Flow Control Packet Marking Scheme: to identify the sources of Distributed Denial of Service Attacks

Flow Control Packet Marking Scheme: to identify the sources of Distributed Denial of Service Attacks Flow Control Packet Marking Scheme: to identify the sources of Distributed Denial of Service Attacks A.Chitkala, K.S. Vijaya Lakshmi VRSE College,India. ABSTRACT-Flow Control Packet Marking Scheme is a

More information

S Ns2 simulation exercise

S Ns2 simulation exercise S-38.148 Ns2 simulation exercise 1. Introduction...3 2. Theoretical background...3 2.1. Overview of TCP s congestion control...3 2.1.1. Slow start and congestion avoidance...4 2.1.2. Fast Retransmit...4

More information

LAMPIRAN. set ns [new Simulator]

LAMPIRAN. set ns [new Simulator] LAMPIRAN set ns [new Simulator] $ns color 0 pink $ns color 1 red $ns color 2 green $ns color 3 yellow $ns color 4 brown $ns color 5 purple $ns color 6 black $ns color 7 grey $ns color 8 maroon set n0 [$ns

More information

Performance Analysis of WLAN MAC algorithms

Performance Analysis of WLAN MAC algorithms MEE10:91 Performance Analysis of WLAN MAC algorithms Author: Ramaz Samhan Amer Khoulani Supervisor: Dr. Jorgen Nordberg A Thesis Presented in partial fulfillment of the requirements for the degree of Master

More information

Routing Protocols Simulation of Wireless Self-organized Network Based. on NS-2. Qian CAI

Routing Protocols Simulation of Wireless Self-organized Network Based. on NS-2. Qian CAI International Conference on Computational Science and Engineering (ICCSE 2015) Routing Protocols Simulation of Wireless Self-organized Network Based on NS-2 Qian CAI School of Information Engineering,

More information

Comparison of Different Types of Sources of Traffic Using SFQ Scheduling Discipline

Comparison of Different Types of Sources of Traffic Using SFQ Scheduling Discipline Comparison of Different Types of Sources of Traffic Using SFQ Scheduling Discipline Alejandro Gomez Suarez, and H. Srikanth Kamath Abstract In this paper, SFQ (Start Time Fair Queuing) algorithm is analyzed

More information

USE OF THE NETWORK SIMULATOR NS-2 TOOL IN LECTURES

USE OF THE NETWORK SIMULATOR NS-2 TOOL IN LECTURES USE OF THE NETWORK SIMULATOR NS-2 TOOL IN LECTURES Petr Berka, Petr Hujka Department of Telecommunications, Brno University of Technology, Purkynova 118, 612 00 Brno, Czech Republic, phone: +420 5 41149190,

More information

CSE 573S Protocols for Computer Networks (Spring 2005 Final Project)

CSE 573S Protocols for Computer Networks (Spring 2005 Final Project) CSE 573S Protocols for Computer Networks (Spring 2005 Final Project) To Investigate the degree of congestion control synchronization of window-based connections bottlenecked at the same link Kumar, Vikram

More information

4. Simulation Model. this section, the simulator and the models used for simulation are discussed.

4. Simulation Model. this section, the simulator and the models used for simulation are discussed. 4. Simulation Model In this research Network Simulator (NS), is used to compare and evaluate the performance of different ad-hoc routing protocols based on different mobility models. In this section, the

More information

A BENEFICIAL ANALYSIS OF NODE DEPLOYMENT SCHEMES FOR WIRELESS SENSOR NETWORKS

A BENEFICIAL ANALYSIS OF NODE DEPLOYMENT SCHEMES FOR WIRELESS SENSOR NETWORKS A BENEFICIAL ANALYSIS OF NODE DEPLOYMENT SCHEMES FOR WIRELESS SENSOR NETWORKS G Sanjiv Rao 1 and V Vallikumari 2 1 Associate Professor, Dept of IT, Sri Sai Aditya Institute of Science And Technology, Surampalem,

More information

Routing Protocols in MANETs

Routing Protocols in MANETs Chapter 4 Routing Protocols in MANETs 4.1 Introduction The main aim of any Ad Hoc network routing protocol is to meet the challenges of the dynamically changing topology and establish a correct and an

More information

The simulation and emulation verification that was based on NS-2

The simulation and emulation verification that was based on NS-2 210 The simulation and emulation verification that was based on NS-2 Ju-Young Shin, Jong-Wook Jang, Jin-Man Kim Department of Computer Engineering Dong-Eui University, Busan, Korea Department of Computer

More information

Performance Evaluation of Routing Protocols for Mobile Ad Hoc Networks

Performance Evaluation of Routing Protocols for Mobile Ad Hoc Networks 2013, TextRoad Publication ISSN 2090-4304 Journal of Basic and Applied Scientific Research www.textroad.com Performance Evaluation of Routing Protocols for Mobile Ad Hoc Networks Hina Tariq 1, Urfa Suhaib

More information

Performance analysis of aodv, dsdv and aomdv using wimax in NS-2

Performance analysis of aodv, dsdv and aomdv using wimax in NS-2 Performance analysis of aodv, dsdv and aomdv using wimax in NS-2 Madhusrhee B Department Computer Science, L.J Institute of Technology, Ahmedabad, India Abstract WiMAX (IEEE 802.16) technology empowers

More information

[1] Chowdhury, A. K., Ibrahim, M., Shanmugam, V., Singh, A. K. (2013). [2] Chowdhury, A. K., Raj, N., Singh, A. K., Area efficient MAX operator for

[1] Chowdhury, A. K., Ibrahim, M., Shanmugam, V., Singh, A. K. (2013). [2] Chowdhury, A. K., Raj, N., Singh, A. K., Area efficient MAX operator for References [1] Chowdhury, A. K., Ibrahim, M., Shanmugam, V., Singh, A. K. (2013). Multiple valued logic (MVL) reduction operator, its synthesis and application on network congestion. Proceeding of 7th

More information

Analysis of Network Traffic in Ad-Hoc Networks based on DSDV Protocol

Analysis of Network Traffic in Ad-Hoc Networks based on DSDV Protocol Analysis of Network Traffic in Ad-Hoc Networks based on DSDV Protocol with Emphasis on Mobility and Communication Patterns Vahid Garousi Department of Systems and Computer Engineering Carleton University,

More information

Modeling of data networks by example: NS-2 (II)

Modeling of data networks by example: NS-2 (II) Modeling of data networks by example: NS-2 (II) Holger Füßler H. Füßler Course overview 1. Introduction 7. NS-2: Fixed networks 2. Building block: RNG 8. NS-2: Wireless networks 3. Building block: Generating

More information

Network Simulator 2: Introduction

Network Simulator 2: Introduction Network Simulator 2: Introduction Presented by Ke Liu Dept. Of Computer Science SUNY Binghamton Spring, 2006 1 NS-2 Overview 2 NS-2 Developed by UC Berkeley Maintained by USC Popular simulator in scientific

More information

Performance Evaluation. of Input and Virtual Output Queuing on. Self-Similar Traffic

Performance Evaluation. of Input and Virtual Output Queuing on. Self-Similar Traffic Page 1 of 11 CS 678 Topics in Internet Research Progress Report Performance Evaluation of Input and Virtual Output Queuing on Self-Similar Traffic Submitted to Zartash Afzal Uzmi By : Group # 3 Muhammad

More information

A Study on the Behaviour of SAODV with TCP and SCTP Protocols in Mobile Adhoc Networks

A Study on the Behaviour of SAODV with TCP and SCTP Protocols in Mobile Adhoc Networks International Journal of Research in Advent Technology, Vol.6, No.8, August 218 A Study on the Behaviour of SAODV with TCP and SCTP Protocols in Mobile Adhoc Networks S. Mahalakshmi 1, Dr. K. Geetha 2

More information

Mobile Routing : Computer Networking. Overview. How to Handle Mobile Nodes? Mobile IP Ad-hoc network routing Assigned reading

Mobile Routing : Computer Networking. Overview. How to Handle Mobile Nodes? Mobile IP Ad-hoc network routing Assigned reading Mobile Routing 15-744: Computer Networking L-10 Ad Hoc Networks Mobile IP Ad-hoc network routing Assigned reading Performance Comparison of Multi-Hop Wireless Ad Hoc Routing Protocols A High Throughput

More information

3. Evaluation of Selected Tree and Mesh based Routing Protocols

3. Evaluation of Selected Tree and Mesh based Routing Protocols 33 3. Evaluation of Selected Tree and Mesh based Routing Protocols 3.1 Introduction Construction of best possible multicast trees and maintaining the group connections in sequence is challenging even in

More information

Channabasaveshwara Institute of Technology. (An ISO 9001:2008 Certified Institution) NH 206 (B.H. Road), Gubbi, Tumkur Karnataka.

Channabasaveshwara Institute of Technology. (An ISO 9001:2008 Certified Institution) NH 206 (B.H. Road), Gubbi, Tumkur Karnataka. Channabasaveshwara Institute of Technology (An ISO 9001:2008 Certified Institution) NH 206 (B.H. Road), Gubbi, Tumkur 572 216. Karnataka. QMP 7.1 D/F Department of Computer Science & Engineering Network

More information

QoS in Network Simulator 2

QoS in Network Simulator 2 QoS in Network Simulator 2 This experiment provides experience in how to apply and simulate QoS mechanisms in communication networks by means of NS2. We focus on RSVP in this experiment. 1. RSVP in NS2

More information

A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols. Broch et al Presented by Brian Card

A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols. Broch et al Presented by Brian Card A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols Broch et al Presented by Brian Card 1 Outline Introduction NS enhancements Protocols: DSDV TORA DRS AODV Evaluation Conclusions

More information

MANET With ADMEN SIMULATION

MANET With ADMEN SIMULATION Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320 088X IMPACT FACTOR: 6.017 IJCSMC,

More information

Implementation of AODV Routing Protocol in NS2: A comparison with DSDV routing protocol

Implementation of AODV Routing Protocol in NS2: A comparison with DSDV routing protocol Implementation of AODV Routing Protocol in NS2: A comparison with DSDV routing protocol N Dinesh Kumar, Associate Professor & Head - EIE, Vignan Institute of Technology & Science, Deshmukhi, Andhra Pradesh,

More information

Performance Evaluation of Routing Protocols (AODV, DSDV and DSR) with Black Hole Attack

Performance Evaluation of Routing Protocols (AODV, DSDV and DSR) with Black Hole Attack Performance Evaluation of Routing Protocols (AODV, DSDV and DSR) with Black Hole Rozy Rana 1, Kanwal Preet Singh 2 1 Department of Computer Engineering, Master of Engineering, UCOE, Punjabi University

More information

PESIT Bangalore South Campus. Department OF Information Science & Engineering

PESIT Bangalore South Campus. Department OF Information Science & Engineering PESIT Bangalore South Campus 1Km before Electronic City, Hosur Road, Bangalore-560100. Department OF Information Science & Engineering COMPUTER NETWORK LABORATORY 15CSL57 Lab Manual 2017-18 Introduction

More information

Performance of a Wi-Fi Network as a function of Distance and Number of Connections in a School Environment

Performance of a Wi-Fi Network as a function of Distance and Number of Connections in a School Environment Performance of a Wi-Fi Network as a function of Distance and Number of Connections in a School Environment Group 1 Rajdeep Bhullar - 301187037 Kamal Ezz - 301213002 Daniel Quon 301170142 http://www.sfu.ca/~rsa83/

More information

Assignment 3 Solutions 2/10/2012

Assignment 3 Solutions 2/10/2012 INFO334 / TELE302 Assignment 3 Solutions 2/10/2012 The WAN topology to be adopted for the enterprise WAN is shown in Figure 1. Figure 1: NZAM WAN topology. 1 Task 1: Reliability Analysis (4 marks) 1. What

More information

Wireless TCP Performance Issues

Wireless TCP Performance Issues Wireless TCP Performance Issues Issues, transport layer protocols Set up and maintain end-to-end connections Reliable end-to-end delivery of data Flow control Congestion control Udp? Assume TCP for the

More information

SUMMERY, CONCLUSIONS AND FUTURE WORK

SUMMERY, CONCLUSIONS AND FUTURE WORK Chapter - 6 SUMMERY, CONCLUSIONS AND FUTURE WORK The entire Research Work on On-Demand Routing in Multi-Hop Wireless Mobile Ad hoc Networks has been presented in simplified and easy-to-read form in six

More information

CHAPTER 4 SIMULATION MODEL AND PERFORMANCE METRICS

CHAPTER 4 SIMULATION MODEL AND PERFORMANCE METRICS 59 CHAPTER 4 SIMULATION MODEL AND PERFORMANCE METRICS 4.1 OVERVIEW OF SIMULATION MODEL The performance of a MANET routing protocol under varying network conditions is to be evaluated in order to understand

More information

Analysis and Simulations of Routing Protocols with Different Load Conditions of MANETs

Analysis and Simulations of Routing Protocols with Different Load Conditions of MANETs Analysis and Simulations of Routing Protocols with Different Load Conditions of MANETs Poonam Pahuja Department of Computer Engineering, Mewar University, Chittorgarh Rajasthan, Email: poonamsanjay2007@gmail.com

More information

S Ns2 simulation exercise

S Ns2 simulation exercise S-38.148 Ns2 simulation exercise Table of contents 1. Introduction...3 2. Theoretical background...3 2.1. Overview of TCP s congestion control...3 2.1.1. Slow start and congestion avoidance...4 2.1.2.

More information

NSIS for NS-2. N4 TCP connection. Figure 1: TCP connection reuse

NSIS for NS-2. N4 TCP connection. Figure 1: TCP connection reuse NSIS for NS-2 NSIS (Next Steps in Signalling) is a signalling framework being developed by the IETF, based on various signalling protocols, of which the Resource Reservation Protocol (RSVP) is the corner

More information

QoS Routing By Ad-Hoc on Demand Vector Routing Protocol for MANET

QoS Routing By Ad-Hoc on Demand Vector Routing Protocol for MANET 2011 International Conference on Information and Network Technology IPCSIT vol.4 (2011) (2011) IACSIT Press, Singapore QoS Routing By Ad-Hoc on Demand Vector Routing Protocol for MANET Ashwini V. Biradar

More information

COMPARISON OF DIFFERENT VERSIONS OF TCP IN

COMPARISON OF DIFFERENT VERSIONS OF TCP IN SONG XING COMPARISON OF DIFFERENT VERSIONS OF TCP IN 802.11 WLANS Master of Science Thesis Examiner: Yevgeni Koucheryavy Dmitri Moltchanov Examiner and topic approved by the Faculty Council of the Faculty

More information

SIMULATING SENSOR NETWORKS IN NS-2

SIMULATING SENSOR NETWORKS IN NS-2 1 SIMULATING SENSOR NETWORKS IN NS-2 Ian Downard Naval Research Laboratory Code 5523 4555 Overlook Ave Washington DC, 20375-5337 downard@itd.nrl.navy.mil Abstract Optimizing sensor networks involves addressing

More information

II. ROUTING CATEGORIES

II. ROUTING CATEGORIES ANALYSIS OF ROUTING PROTOCOLS IN MANETS DIVYA GHOSH Researcher,Kolkata,India Abstract: The study of routing protocols in MANETs is one that requires a great deal of research due to the challenges it poses

More information

Mobility and Density Aware AODV Protocol Extension for Mobile Adhoc Networks-MADA-AODV

Mobility and Density Aware AODV Protocol Extension for Mobile Adhoc Networks-MADA-AODV Journal of Computer Science 8 (1): 13-17, 2012 ISSN 1549-3636 2011 Science Publications Mobility and Density Aware AODV Protocol Extension for Mobile Adhoc Networks-MADA-AODV 1 S. Deepa and 2 G.M. Kadhar

More information