Report: Simulation of ECOFRAME MAC layer in ns Bogdan Ušćumlić, Annie Gravey, Michel Morvan, and Philippe Gravey

Size: px
Start display at page:

Download "Report: Simulation of ECOFRAME MAC layer in ns Bogdan Ušćumlić, Annie Gravey, Michel Morvan, and Philippe Gravey"

Transcription

1 Report: Simulation of ECOFRAME MAC layer in ns-2.31 Bogdan Ušćumlić, Annie Gravey, Michel Morvan, and Philippe Gravey May 12, 2009

2 Contents Introduction 1 1 The simulator Caracteristics Installation Simulation results Result treatment One traffic class Scenario Scenario Scenario Scenario Scenario Scenario Scenario Two traffic classes Scenario Scenario Scenario Experiment Conclusion 49 A mac-esope.h 50 B mac-esope.cc 53 C esope.tcl 66 D prog1.cc 75

3 CONTENTS 2 E histo.cc 80

4 Abstract A new Medium Access Control (MAC) has been simulated and added to Network Simulator, version The new MAC layer uses the slotted physical medium. This document explains the simulation and the procedure of installation of the simulator. The varios results of different simulation scenarios are presented, too.

5 Introduction This document explains our approach to simulating and modelling of the Medium Access Control (MAC) layer in Network Simulator (ns), more precisely in the most recent version od ns-2 (ns-2.31). A metropolitain area network (MAN) with a ring topology has been simulated. A slotted medium has been simulated, too. We talk about the simulator in Chapter 1. In Chapter 2 we present the results of different simulations. The following files are needed for the simulation: mac-esope.h; mac-esope.cc; esope.tcl; agent.h; agent.cc; channel.cc; ESOPE-exemple.tcl; ex1.tcl; histo.cc; ll.h; ll.cc; Makefile; ns-lib.tcl; packet.h;

6 CONTENTS 2 ping.h; ping.cc; prog1.cc; mac.h; varp.h and varp.cc. The code of the main simulation files 1 is given in the appendix to this document. 1 For the complete simulation code, please contact the authors.

7 Chapter 1 The simulator 1.1 Caracteristics Network Simulator gives us the possibility of simulating local area networks (LAN), with an appropriate MAC layer, but the offered LAN technology is always a bus (for the simulation of the wired networks). Our goal was to simulate a system with stations connected into a ring and using new MAC layer. Thus, we had to create a ring architecture using a MAC layer in Network Simulator. This architecture is created in OTcl language (Object Tool Command Language). In C++, we have created the slotted medium and the other fonctionalities of the new MAC layer. Network Simulator is written in two languages: C++ and OTcl. Our simulator is inspired by a Resilient Packet Ring simulation [1], where the problem of implementing the ring architecture in ns-2 is successfully resolved. Our simulator keeps some solutions from [1], while in the same time contains the original functions we developed in order to mimick the system we study [3]. Some of the simulator results are used in [9] and [8]. In this document we present a single-wavelength version of the simulator. Please contact the authors for the multi-wavelength version. In the reminder of this section we present some characteristics of the ECOFRAME network simulator. Each station periodicaly (T = 2 µs) checks the next slot state. There are 500 slots, that go around the network, which correspond to the delay of 1 ms. In reality, it corresponds to a ring size of 200 km (as the optical fiber signal propagation speed is approximatelly km/s). The work of the stations in the network is synchronized. The algorithm

8 1.1 Caracteristics 4 followed by the stations in the network is presented on the Fig Figure 1.1: The algorithm followed by the stations in the ring For packet numbering we use the properties of the congruence (from the

9 1.2 Installation 5 number theory): If a c (mod m) and b d (mod m), then a + b c + d (mod m). The packets are numbered from 0 to 499. A statical variable exists in the MAC class and it saves the actual ring position. This variable also has a value between 0 and Installation This section explains how to use our simulation, the way of adding our code to Network Simulator. Modeling of the Medium Access Control layer with Network Simulator has been excessively studied (for instance see [1], [11], [2], [10], [5], [4] et [6]). The name of the added MAC layer is ÉSOPE - coming from Énst Bretagne Slotted Optical PackEt ring. Node entry Agent uptarget_ Link Layer arptable_ ARP mac_ downtarget_ MAC uptarget_ uptarget_ New MAC layer added to NS-2.31 PHY downtarget_ Channel uptarget_ Figure 1.2: The new MAC layer added to NS For implementing our simulation, one should use Network Simulator version Here we give the list of changes necessary for adding our code to Network Simulator. The file esope.tcl defines the architecture of an optical ring. This file should be added to Network Simulator s folder \ns-2.31\tcl\lan. Also,

10 1.2 Installation 6 in the files Makefile and ns-lib.tcl one should add some new commands in order include this new file in the Network Simulator compilation. In the file Makefile the next command should be added: tcl\lan\esope.tcl, and in the file ns-lib.tcl the next command: source../lan/esope.tcl. In order to see where these commands were added exactly, consult the files Makefile and ns-lib.tcl, that are included with this document. The files mac-esope.h and mac-esope.cc define the new Medium Access Control layer and the slotted medium. They should be added to Network Simulator s folder \ns-2.31\mac. In order to enable compilation of these two files, the Makefile should be modified, by adding the command mac-esope.o (see Makefile for more details). The Network Simulator files varp.h, varp.cc, packet.h, agent.h, agent.cc, channel.cc, mac.h, ll.h and ll.cc were modified. They exist already in NS. These are inculuded with the document. The necessary changes in these files are marked with enstb. The compilation of NS has to be done with the commands: make depend and make ns A network of 5 nodes has been simulated (Fig. 1.3), but a much greater number of stations in network could be also simulated. Also, an algorithm that takes into the count the existance of two classes of traffic has been simulated. To declare an agent to be the best-effort class agent, you should use a TCL command, like in the following example: $tcp set [ns new Agent/TCP/NewReno] $tcp best-effort After this command, each packet having that agent s application as the source will carry the information of the low-priority class. This new fonctionality has been added by modifying the files agent.h and agent.cc. For the illustration, let us take the look at the file ex1.tcl 1 : set ns [new Simulator] #Define different colors for data flows (for NAM) 1 A modification of the file ex1.tcl from the address

11 1.2 Installation 7 Station 2 Station 1 Station 3 5 x 40 km Station 5 Station 4 Figure 1.3: The simulated network $ns color 1 Blue $ns color 2 Red #Open the Trace files set file1 [open out.tr w] set winfile [open WinFile w] $ns trace-all $file1 #Open the NAM trace file set file2 [open out.nam w] $ns namtrace-all $file2 #Define a finish procedure proc finish { { global ns file1 file2 $ns flush-trace close $file1 close $file2 exec nam out.nam & exit 0 #Create six nodes

12 1.2 Installation 8 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 $n2 2Mb 10ms DropTail $ns duplex-link $n1 $n2 2Mb 10ms DropTail $ns simplex-link $n2 $n3 0.3Mb 100ms DropTail $ns simplex-link $n3 $n2 0.3Mb 100ms DropTail $ns duplex-link $n3 $n4 0.5Mb 40ms DropTail $ns duplex-link $n3 $n5 0.5Mb 30ms DropTail #Give node position (for NAM) $ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns simplex-link-op $n2 $n3 orient right $ns simplex-link-op $n3 $n2 orient left $ns duplex-link-op $n3 $n4 orient right-up $ns duplex-link-op $n3 $n5 orient right-down #Set Queue Size of link (n2-n3) to 10 $ns queue-limit $n2 $n3 20 #Setup a TCP connection set tcp [new Agent/TCP/Newreno] $ns attach-agent $n0 $tcp set sink [new Agent/TCPSink/DelAck] $ns attach-agent $n4 $sink $ns connect $tcp $sink $tcp set fid_ 1 $tcp set window_ 8000 $tcp set packetsize_ 552 $tcp best-effort #Setup a FTP over TCP connection set ftp [new Application/FTP] $ftp attach-agent $tcp

13 1.2 Installation 9 $ftp set type_ FTP #Setup a UDP connection set udp [new Agent/UDP] $ns attach-agent $n1 $udp set null [new Agent/Null] $ns attach-agent $n5 $null $ns connect $udp $null $udp set fid_ 2 $udp best-effort #Setup a CBR over UDP connection set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set type_ CBR $cbr set packet_size_ 1000 $cbr set rate_ 0.01mb $cbr set random_ false $ns at 0.1 "$cbr start" $ns at 1.0 "$ftp start" $ns at "$ftp stop" $ns at "$cbr stop" # next procedure gets two arguments: the name of the # tcp source node, will be called here "tcp", # and the name of output file. proc plotwindow {tcpsource file { global ns set time 0.1 set now [$ns now] set cwnd [$tcpsource set cwnd_] set wnd [$tcpsource set window_] puts $file "$now $cwnd" $ns at [expr $now+$time] "plotwindow $tcpsource $file" $ns at 0.1 "plotwindow $tcp $winfile" $ns at "finish" $ns run

14 1.2 Installation 10

15 Chapter 2 Simulation results 2.1 Result treatment Basically, the input file for our simulation has the following form (file ESOPE-exemple.tcl): #ENST BRETAGNE 23 june 2007 #ESOPE exemple set opt(tr) "out.tr" set opt(stop) 15 proc finish { { global ns opt trfd $ns flush-trace close $trfd exit 0 proc create-trace { { global ns opt et set trfd [open $opt(tr) w] $ns trace-all $trfd return $trfd

16 2.1 Result treatment 12 set ns [new Simulator] set trfd [create-trace] set fromid 1 set fromid2 2 set toid 4 set toid2 3 set fromid3 1 set toid3 2 set fromid4 3 set toid4 4 set fromid5 1 set toid5 2 set nodelist [$ns CreateRing Mb] set index_ 0 foreach src $nodelist { set nodes($index_) $src set srcid [$src id] #puts -nonewline "node id:" #puts $srcid incr index_ #puts [$nodes(0) id] #puts [$nodes(1) id] set udp_ [new Agent/UDP] $ns attach-agent $nodes($fromid) $udp_ set null_0 [new Agent/Null]

17 2.1 Result treatment 13 $ns attach-agent $nodes($toid) $null_0 #$udp_ best-effort set cbr_0 [new Application/Traffic/CBR] $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ $cbr attach-agent $udp_ $ns connect $udp_ $null_0 #second flow set udp2_ [new Agent/UDP] $ns attach-agent $nodes($fromid2) $udp2_ set null_02 [new Agent/Null] $ns attach-agent $nodes($toid2) $null_02 $ns connect $udp2_ $null_02 set pareto1 [new Application/Traffic/Pareto] $pareto1 attach-agent $udp2_ $pareto1 set packetsize_ 1580 $pareto1 set rate_ 700Mb $pareto1 set burst_time_ 20ms $pareto1 set idle_time_ 5ms $pareto1 set shape_ 1.4 #end of second #third flow set udp3 [new Agent/UDP] $ns attach-agent $nodes($fromid3) $udp3 set null3 [new Agent/Null] $ns attach-agent $nodes($toid3) $null3 $ns connect $udp3 $null3 $udp3 best-effort

18 2.1 Result treatment 14 set exp3 [new Application/Traffic/Exponential] $exp3 attach-agent $udp3 $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms #end of third #fourth flow set udp4 [new Agent/UDP] $ns attach-agent $nodes($fromid4) $udp4 set null4 [new Agent/Null] $ns attach-agent $nodes($toid4) $null4 $ns connect $udp4 $null4 set exp4 [new Application/Traffic/Exponential] $exp4 attach-agent $udp4 $exp4 set packetsize_ 1000 $exp4 set rate_ 500Mb $exp4 set burst_time_ 15ms $exp4 set idle_time_ 5ms #end of fourth #fifth flow set udp5 [new Agent/UDP] $ns attach-agent $nodes($fromid5) $udp5 set null5 [new Agent/Null] $ns attach-agent $nodes($toid5) $null5 $ns connect $udp5 $null5 set exp5 [new Application/Traffic/Exponential] $exp5 attach-agent $udp5 $exp5 set packetsize_ 1000 $exp5 set rate_ 900Mb $exp5 set burst_time_ 17ms $exp5 set idle_time_ 5ms #end of fifth

19 2.1 Result treatment 15 #sixth flow #Setup a TCP connection set tcp [new Agent/TCP/Newreno] $ns attach-agent $nodes(0) $tcp set sink [new Agent/TCPSink/DelAck] $ns attach-agent $nodes(2) $sink $ns connect $tcp $sink $tcp set window_ 8000 $tcp set packetsize_ 552 $tcp best-effort #Setup a FTP over TCP connection set ftp [new Application/FTP] $ftp attach-agent $tcp $ftp set type_ FTP #end of sixth flow puts " " puts " " $ns at 0.0 "$cbr start" $ns at 0.0 "$ftp start" $ns at 13.0 "$ftp stop" #$ns at 0.0 "$pareto1 start" $ns at 0.0 "$exp3 start" $ns at 0.0 "$exp4 start" $ns at 0.0 "$exp5 start" $ns at 12.0 "$cbr stop" #$ns at 12.0 "$pareto1 stop" $ns at 12.0 "$exp3 stop" $ns at 12.0 "$exp4 stop" $ns at 12.0 "$exp5 stop" $ns at $opt(stop) "finish" $ns run

20 2.1 Result treatment 16 The execution of the input file will give, as a result, two new files (out.tr and results.txt), which are then used in the interpretation of the results. The file out.tr has the following form: r tcp h ack r tcp r tcp h ack r tcp r tcp h ack r tcp r tcp This form is already well known to ns users. It s an usual ns trace file form. The explaination of these form is given in [7]. In this file, the event marked with h (stands for hold) represent the moment in time when the packet left the Link Layer entity and entered the Medium Access Control entity, in a station. The event marked with r (stands for received) represent the moment in time when the packet left the Physical Layer entity and entered the Medium Access Control entity. The trace file we process with two C++ programs. The first program is named prog1.cc 1 and it gives a file named delais.txt as its result. This new text file is used like the entry for an another program written in C++, named histo.cc 2 and it has been developed by my colleague Minh Thanh Ngo. The file results.txt has the following form: The program code is given in the appendix D. 2 See appendix E.

21 2.2 One traffic class This file give the percentages of the slot occupancies in the entire network and between every two neighbouring stations in the network. Let: X % of the occupied slots in the entire network and Xij % of the occupied slots between the stations i and j. The file format is the following: time - X - X01 - X12 - X23 - X34 - X One traffic class In this section we present the simulation results for different scenarios, for the case when the station of the network use the algorithm shown in Fig. 2.1, i.e. for the case when there is only one traffic class in the network. Is the slot empty? true false Is the packet for me? Do I have a packet to send? false true true false It is a transit packet: send it! The packet is for me: take it! The slot is empty! Send it! The slot is occupied! Figure 2.1: The algorithm used by the stations

22 2.2 One traffic class Scenario 1 The first scenario was a quite simple scenario, with two flows like in Fig On of this flows was of pareto 3 type, i.e. a random nature flow and the other was classic Constant Bit Rate (CBR) flow. As the flow pareto uses the slots in a random maner, the jitter will appear in the system, verily the jitter of the second flow will be measurable. We have mesured the jitter and drawn the histogram of the flow CBR (Fig. 2.3). Station 2 CBR Station 1 VBR Station 3 5 x 40 km Station 5 Station 4 Figure 2.2: The scenario Scenario 2 In the scenario 2 (Fig. 2.4), there were three flows in the network: 1. The flow cbr, with the following characteristics: set cbr_0 [new Application/Traffic/CBR] $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ the flow pareto: 3 See [7] for more details.

23 2.2 One traffic class 19 Figure 2.3: The histogram 1 set pareto1 [new Application/Traffic/Pareto] $pareto1 set packetsize_ 1580 $pareto1 set rate_ 700Mb $pareto1 set burst_time_ 20ms $pareto1 set idle_time_ 5ms $pareto1 set shape_ and the flow expoo 4 : set exp3 [new Application/Traffic/Exponential] $exp3 attach-agent $udp3 $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms The packet delay histogram of the flow CBR is presented in Fig The percentage of the occupied slots in the network is given in Fig The percentage of slots occupied in the network is obtained by dividing the number of occupied slots in the network by total number of slots (500) and by multiplying the result with 100 (in order to get the percentage). 4 Consult [7] for more details.

24 2.2 One traffic class 20 Station 2 cbr Station 1 pareto Station 3 exp 5 x 40 km Station 5 Station 4 Figure 2.4: The scenario Histogram Histogram Probability Time [µs] Figure 2.5: The histogram 2 The duration of the simulated real time was 1 sec.

25 2.2 One traffic class Percentage of the slots in use Entire network Percentage [%] Time [s] Figure 2.6: The percentage of occupied slots in the network (scenario 2) Scenario 3 In the scenario 3 Fig. 2.7), we have simulated four flows: 1. The flow cbr, with the following characteristics: set cbr_0 [new Application/Traffic/CBR] $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ the flow pareto: set pareto1 [new Application/Traffic/Pareto] $pareto1 set packetsize_ 1580 $pareto1 set rate_ 700Mb $pareto1 set burst_time_ 20ms $pareto1 set idle_time_ 5ms $pareto1 set shape_ 1.4

26 2.2 One traffic class the flow expoo 3: set exp3 [new Application/Traffic/Exponential] $exp3 attach-agent $udp3 $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms 4. and the flow expoo 4: set exp4 [new Application/Traffic/Exponential] $exp4 attach-agent $udp3 $exp4 set packetsize_ 1500 $exp4 set rate_ 850Mb $exp4 set burst_time_ 45ms $exp4 set idle_time_ 5ms Station 2 cbr exp4 Station 1 pareto Station 3 exp3 5 x 40 km Station 5 Station 4 Figure 2.7: The scenario 3 The packet delay histogram of the flow CBR is presented in Fig The percentage of the occupied slots in the network is given in Fig. 2.9.

27 2.2 One traffic class Histogram Histogram Probability Time [µs] Figure 2.8: The histogram Scenario 4 The scenario 4 (Fig. 2.10) is similar to the previous scenario, but now we have even more traffic in the network. There were five different traffic flows: 1. The flow cbr, with the following characteristics: set cbr_0 [new Application/Traffic/CBR] $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ the flow pareto: set pareto1 [new Application/Traffic/Pareto] $pareto1 set packetsize_ 1580 $pareto1 set rate_ 700Mb $pareto1 set burst_time_ 20ms

28 2.2 One traffic class Percentage of the slots in use Entire network Percentage [%] Time [s] Figure 2.9: The percentage of occupied slots in the network (scenario 3) $pareto1 set idle_time_ 5ms $pareto1 set shape_ the flow expoo 3: set exp3 [new Application/Traffic/Exponential] $exp3 attach-agent $udp3 $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms 4. the flow expoo 4: set exp4 [new Application/Traffic/Exponential] $exp4 attach-agent $udp3 $exp4 set packetsize_ 1000 $exp4 set rate_ 100Mb $exp4 set burst_time_ 15ms $exp4 set idle_time_ 5ms

29 2.2 One traffic class and the flow expoo 5: set exp5 [new Application/Traffic/Exponential] $exp5 attach-agent $udp3 $exp5 set packetsize_ 1000 $exp5 set rate_ 83Mb $exp5 set burst_time_ 17ms $exp5 set idle_time_ 5ms Station 2 cbr exp4 Station 1 pareto Station 3 exp5 exp3 5 x 40 km Station 5 Station 4 Figure 2.10: The scenario 4 The packet delay histogram of the flow CBR is presented in Fig The percentage of the occupied slots in the network is given in Fig Scenario 5 In the scenario 5 (Fig. 2.13), we have for the first time a FTP application above a TCP agent. The nature of the traffic in the network is now different in comparing to previous scenarios. We have tried to see in what way this will affect the flow of CBR traffic, especially its jitter. There were five traffic flows in the network: 1. The flow cbr, with the following characteristics:

30 2.2 One traffic class Histogram Histogram Probability Time [µs] Figure 2.11: The histogram 4 $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ the flow ftp: #Setup a TCP connection set tcp [new Agent/TCP/Newreno] $ns attach-agent $nodes(0) $tcp set sink [new Agent/TCPSink/DelAck] $ns attach-agent $nodes(2) $sink $ns connect $tcp $sink $tcp set window_ 8000 $tcp set packetsize_ 552 #Setup a FTP over TCP connection set ftp [new Application/FTP] $ftp attach-agent $tcp $ftp set type_ FTP

31 2.2 One traffic class Percentage of the slots in use Entire network Percentage [%] Time [s] Figure 2.12: The percentage of occupied slots in the network (scenario 4) Station 1 exp4 Station 2 cbr Station 0 ftp exp5 exp3 5 x 40 km Station 3 Station 4 Figure 2.13: The scenario 5 3. the flow expoo 3: $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb

32 2.2 One traffic class 28 $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms 4. the flow expoo 4: $exp4 set packetsize_ 1000 $exp4 set rate_ 500Mb $exp4 set burst_time_ 15ms $exp4 set idle_time_ 5ms 5. and the flow expoo 5: $exp5 set packetsize_ 1000 $exp5 set rate_ 900Mb $exp5 set burst_time_ 17ms $exp5 set idle_time_ 5ms 0.14 Histogram Histogram Probability Time [µs] Figure 2.14: The histogram 5 We have simulated 15 s of the real time and packets of the flow CBR. The average delay was µs, the minimum delay µs and the maximum delay µs.

33 2.2 One traffic class Percentage of the slots in use Entire network Percentage [%] Time [s] Figure 2.15: The percentage of occupied slots in the network (scenario 5) The packet delay histogram of the flow CBR is presented in Fig The percentage of the occupied slots in the network is given in Fig Note that the jitter has the value similar to the values of jitter in the cases of previous scenarios Scenario 6 For the scenario 6 (Fig. 2.16), we have used two FTP application above the TCP agents. This time, the duration of the simulation was two times longer and we also had more traffic in the network. Again, we look how this change will affect the flow of CBR traffic, verily its jitter. There were six flows of traffic in the network: 1. The flow cbr, with the following characteristics: $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_

34 2.2 One traffic class 30 Station 1 exp4 Station 2 ftp1 ftp cbr Station 0 exp5 exp3 5 x 40 km Station 3 Station 4 Figure 2.16: The scenario 6 Histogram histo19.txt using 1: Probability Time [µs] Figure 2.17: The histogram 6 2. the flow ftp: #Setup a TCP connection set tcp [new Agent/TCP/Newreno]

35 2.2 One traffic class 31 $ns attach-agent $nodes(0) $tcp set sink [new Agent/TCPSink/DelAck] $ns attach-agent $nodes(2) $sink $ns connect $tcp $sink #$tcp set fid_ 1 $tcp set window_ 8000 $tcp set packetsize_ 1000 #Setup a FTP over TCP connection set ftp [new Application/FTP] $ftp attach-agent $tcp $ftp set type_ FTP 3. the flow ftp1: set tcp1 [new Agent/TCP/Newreno] $ns attach-agent $nodes(2) $tcp1 set sink1 [new Agent/TCPSink/DelAck] $ns attach-agent $nodes(3) $sink1 $ns connect $tcp1 $sink1 #$tcp set fid_ 1 $tcp1 set window_ 8000 $tcp1 set packetsize_ 1000 #Setup a FTP over TCP connection set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1 $ftp1 set type_ FTP 4. the flow expoo 3: $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms 5. the flow expoo 4: $exp4 set packetsize_ 1000 $exp4 set rate_ 500Mb $exp4 set burst_time_ 15ms $exp4 set idle_time_ 5ms

36 2.2 One traffic class and the flow expoo 5: $exp5 set packetsize_ 1000 $exp5 set rate_ 900Mb $exp5 set burst_time_ 17ms $exp5 set idle_time_ 5ms Percentage of the slots in use Entire network 0->1 1->2 2->3 3->4 4->0 70 Percentage [%] Time [s] Figure 2.18: The percentage of occupied slots in the network (scenario 6) We have simulated 30 s of the real time and packets of the flow CBR. The average delay was µs, the minimum delay 405 µs and the maximum delay µs. The packet delay histogram of the flow CBR is given in Fig Note that jitter has a greater value in comparing to the jitter values in the cases of previous scenarios. The percentages of the occupied slots in the entire network and between the neighbouring stations in the network are given in Fig The percentage of the occupied slots in the entire network is obtained by dividing the number of occupied slots in the entire network with the total number of slots (500) and by multiplying the result with 100 (to obtain the percentage).

37 2.2 One traffic class 33 Analogically, the percentage of the occupied slots between two neighbouring stations is obtained by dividing the number of occupied slots between these two stations with the total number of slots between two neighbouring stations (100) and by multiplying the result with 100 (to obtain the percentage). For every couple of the neighbouring stations, this value has been drawn in Fig In that way, the Fig offers more information on the system performances Scenario 7 In the scenario 7 (Fig. 2.19), we have a flow matrix with less traffic and without FTP applications above TCP agents. We examine the jitter of the flow of CBR traffic. Station 1 Station 2 exp4 cbr Station 0 exp3 5 x 40 km Station 3 Station 4 Figure 2.19: The scenario 7 There were three traffic flows in the network: 1. The flow cbr, with the following characteristics: $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ the flow expoo 3:

38 2.2 One traffic class Histogram Histogram Probability Time [µs] Figure 2.20: The histogram 7 $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms 3. and the flow expoo 4: $exp4 set packetsize_ 1000 $exp4 set rate_ 800Mb $exp4 set burst_time_ 20ms $exp4 set idle_time_ 5ms We have simulated 15 s of the real time and packets of the CBR flow. The average delay was µs, the minimum delay µs and the maximum delay µs. The packet delay histogram of the flow CBR is given in Fig The percentages of the occupied slots in the entire network and between the neighbouring stations in the network are given in Fig Note that the jitter value is similar to the values of jitter in the cases of scenarios 1, 2, 3, 4 and 5.

39 2.2 One traffic class Percentage of the slots in use Entire network 0->1 1->2 2->3 3->4 4->0 50 Percentage [%] Time [s] Figure 2.21: The percentage of occupied slots in the network (scenario 7)

40 2.3 Two traffic classes Two traffic classes In this section we give the simulation results of three similar scenarios. The algorithm followed by the stations in the network is now more complicated and it is the one already presented in Fig Two traffic service classes exist in the network. The scenario 8 examines the case where the CBR traffic flow is of the low-priority class (best-effort), while the other flows in the network are of the high-priority class. In the scenario 9, all traffic flows are of the same class, low-priority class. In the scenario 10, the flow of CBR traffic is of the high-priority class, while the other flows in the network are of the low-priority class. All the other characteristics of these scenarios are the same. We have shown that the jitter and average delay are greater in the case of the scenario 10, smaller in the case of the scenario 9 and the smallest in the case of the scenario Scenario 8 In the scenario 8 (Fig. 2.22), only the traffic flow CBR is of the low-priority class. There were three traffic flows in the network: 1. The flow cbr, with the following characteristics: $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ $cbr best-effort 2. the flow expoo 3: $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms #$exp3 best-effort 3. and the flow expoo 4:

41 2.3 Two traffic classes 37 $exp4 set packetsize_ 1000 $exp4 set rate_ 800Mb $exp4 set burst_time_ 20ms $exp4 set idle_time_ 5ms #$exp4 best-effort Station 1 Station 2 exp4 cbr Station 0 exp3 5 x 40 km Station 3 Station 4 cbr priority class exp3 best-effort class exp4 best-effort class Figure 2.22: The scenario 8 We have simulated 15 s of the real time and packets of the flow CBR. The average delay was µs, the minimum delay µs and the maximum delay µs. The delay packet histogram of the flow CBR is given in Fig The packet delay histogram of the flow CBR is given in Fig The percentages of the occupied slots in the entire network and between the neighbouring stations in the network are given in Fig Scenario 9 In the scenario 9 (Fig. 2.25), all the traffic is of the low-priority class. There were three traffic flows in the network: 1. The flow cbr, with the following characteristics:

42 2.3 Two traffic classes Histogram Histogram 0.2 Probability Time [µs] Figure 2.23: The histogram 8 $cbr set packetsize_ 978 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ $cbr best-effort 2. the flow expoo 3: $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms $exp3 best-effort 3. and the flow expoo 4: $exp4 set packetsize_ 1000 $exp4 set rate_ 800Mb $exp4 set burst_time_ 20ms

43 2.3 Two traffic classes Percentage of the slots in use Entire network 0->1 1->2 2->3 3->4 4->0 50 Percentage [%] Time [s] Figure 2.24: The percentage of occupied slots in the network (scenario 8) $exp4 set idle_time_ 5ms $exp4 best-effort We have simuted 15 s of the real time and packets of the flow CBR. The average delay was µs, the minimum delay µs and the maximum delay µs. The packet delay histogram of the flow CBR is given in Fig The percentages of the occupied slots in the entire network and between the neighbouring stations in the network are given in Fig Scenario 10 In the scenario 10 (Fig. 2.28), only the CBR traffic flow is of the high-priority class. There were three traffic flows in the network: 1. The flow cbr, with the following characteristics: $cbr set packetsize_ 978

44 2.3 Two traffic classes 40 Station 1 Station 2 exp4 cbr Station 0 exp3 5 x 40 km Station 3 Station 4 cbr best-effort class exp3 best-effort class exp4 best-effort class Figure 2.25: The scenario 9 $cbr set rate_ 623Mb $cbr set random_ 0 $cbr set maxpkts_ #$cbr best-effort 2. the flow expoo 3: $exp3 set packetsize_ 1500 $exp3 set rate_ 800Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms $exp3 best-effort 3. and the flow expoo 4: $exp4 set packetsize_ 1000 $exp4 set rate_ 800Mb $exp4 set burst_time_ 20ms $exp4 set idle_time_ 5ms $exp4 best-effort

45 2.3 Two traffic classes Histogram Histogram Probability Time [µs] Figure 2.26: The histogram 9 Scenario 8 Scenario 9 Scenario 10 Average delay [µs] Jitter [µs] Table 2.1: An overview of the simulation results of the scenarios 8, 9 and 10 We have simulated 15 s of real time and paquets du flux CBR. Le delai moyenne était µs, le delai minimum µs et le delai maximum µs. The delay histogram of CBR flow packets is presented in Fig The occupied slot percentage in the entire network and between network neighbouring stations is presented in Fig At the end of this section, we give a table (Tab. 2.1) summarizing the results of three simulations.

46 2.3 Two traffic classes Percentage of the slots in use Entire network 0->1 1->2 2->3 3->4 4->0 50 Percentage [%] Time [s] Figure 2.27: The percentage of occupied slots in the network (scenario 9) Station 1 Station 2 exp4 cbr Station 0 exp3 5 x 40 km Station 3 Station 4 cbr best-effort class exp3 priority class exp4 priority class Figure 2.28: The scenario 10

47 2.3 Two traffic classes Histogram Histogram Probability Time [µs] Figure 2.29: The histogram 10

48 2.3 Two traffic classes Percentage of the slots in use Entire network 0->1 1->2 2->3 3->4 4->0 50 Percentage [%] Time [s] Figure 2.30: The percentage of occupied slots in the network (scenario 10)

49 2.3 Two traffic classes Experiment 50 This was one of the experiments where we decided to test the network performances. We have taken the network with approximately 50% of the first class traffic and we have observed what happens if the best-effort traffic load progressively increases. We have compared the reaction of the network in the case of having one traffic class with the case of having two traffic classes. The traffic matrix simulated in this experiment is shown in Fig There were six different traffic flows in the network: 1. The flow cbr, with the following characteristics: $cbr set packetsize_ 950 $cbr set rate_ 795Mb $cbr set random_ 0 $cbr set maxpkts_ the flow expoo 3 (over an UDP agent): $exp3 set packetsize_ 1500 $exp3 set rate_ 920Mb $exp3 set burst_time_ 25ms $exp3 set idle_time_ 5ms 3. the flow expoo 4 (over an UDP agent): $exp4 set packetsize_ 1000 $exp4 set rate_ 575Mb $exp4 set burst_time_ 15ms $exp4 set idle_time_ 5ms 4. the flow expoo 5 (over an UDP agent): $exp5 set packetsize_ 1000 $exp5 set rate_ 920Mb $exp5 set burst_time_ 17ms $exp5 set idle_time_ 5ms 5. the flow expoo 8 (best-effort traffic over an UDP agent):

50 2.3 Two traffic classes 46 Best-effort Rate of Jitter Average Min. and Number of traffic load expoo 8, 9 [µs] delay [µs] max. delay simulated [%] [Mb] [µs] CBR packets , , , , , , , , Table 2.2: The simulation results in the without priority classes case $exp8 set packetsize_ 1000 $exp8 set rate_ 240Mb ;# for 5% best-effort traffic load $exp8 set burst_time_ 17ms $exp8 set idle_time_ 5ms 6. and the flow expoo 9 (best-effort traffic over an UDP agent): $exp9 set packetsize_ 1000 $exp9 set rate_ 240Mb ;# for 5% best-effort traffic load $exp9 set burst_time_ 20ms $exp9 set idle_time_ 5ms The simulation results are summarized in two tables. We observe the QoS parameters for the flow CBR. In Tab. 2.2 the simulation results are given for the case without priority traffic classes in the network. The simulation results for the case with two traffic classes are given in Tab The flows expoo 8 and expoo 9 were considered as best-effort traffic. We have obtained some interesting diagrams (Fig and Fig.2.33).

51 2.3 Two traffic classes 47 Best-effort Rate of Jitter Average Min. and Number of traffic load expoo 8, 9 [µs] delay [µs] max. delay simulated [%] [Mb] [µs] CBR packets , , , , , , , , Table 2.3: The simulation results in the two traffic classes case Station 2 cbr exp4 Station 1 exp9 exp8 Station 3 exp5 exp3 5 x 40 km Station 5 Station 4 Figure 2.31: The experiment 50

52 2.3 Two traffic classes Jitter values versus the best-effort traffic load Without priority With priority Jitter (Tmax - Tmin) [µs] Best-effort traffic load [%] Figure 2.32: Jitter versus best-effort traffic load Average delay values versus the best-effort traffic load Without priority With priority Average delay [µs] Best-effort traffic load [%] Figure 2.33: Average delay versus best-effort traffic load

53 Conclusion This document presents the first version (v 1.0) of our slotted medium optical network simulator. The name of the added MAC layer (Fig. 1.2) is ÉSOPE - coming from Énst Bretagne Slotted Optical PackEt ring. The different scenario simulation results are also presented in this document. The simulator works with all application types that exist in Network Simulator and it processes the case of two traffic classes, high-priority and low-priority class (best-effort). The algorithm followed by the stations is presented in Fig We continue the work on our simulator.

54 Appendix A mac-esope.h #ifndef mac_esope_h #define mac_esope_h #include "mac.h" #include "queue.h" #include "timer-handler.h" #include <stdio.h> enum tip {ONE_CLASS, TWO_CLASSES; class MacESOPE; class MyTimer : public TimerHandler { public: MyTimer(MacESOPE *a) : TimerHandler() {a_ = a; inline virtual void expire(event *e); protected: MacESOPE *a_; ; class CalculTimer : public TimerHandler {//this timer is used //only by "the first MAC layer"!!! public: CalculTimer(MacESOPE *b) : TimerHandler() {b_ = b; inline virtual void expire(event *e);

55 51 protected: MacESOPE *b_; ; //MAC MAIN CLASS definition! class MacESOPE : public Mac { //friend class MyTimer; public: MacESOPE(); void recv(packet* p, Handler* h); void senddown(packet* p); void sendup(packet *p); void onsend(); void calcfunction(); void start(); //definition of the common attributes static int slots[500]; static int system_activated; static int RING_POSITION; int MY_POSITION; static enum tip class_number; //Some new functions void newringposition(); void newposition(); void startposition(); static double ring_updated; //next variables are used only by the calcfunction() method!!! FILE* dat; int Ncbr; int Nvbr; int Nvide; private: PacketQueue *PB;//traffic of the high priority class

56 52 PacketQueue *BE;//traffic of the low priority class PacketQueue *SLOTS;//"transit" traffic MyTimer timer_; CalculTimer calctime_; int proba; int timer_activated; ; #endif /* mac_esope_h */

57 Appendix B mac-esope.cc #include <mac-esope.h> #include <string.h> //#include <iostream.h> //#include <packet.h> static class MacESOPEClass : public TclClass { public: MacESOPEClass() : TclClass("Mac/ESOPE") { TclObject* create(int, const char*const*) { return (new MacESOPE); class_macesope; enum tip MacESOPE::class_number = TWO_CLASSES; int MacESOPE::system_activated = 0; int MacESOPE::RING_POSITION = 0;//worked out position double MacESOPE::ring_updated = 0.0; //int i; //for (i = 0; i<500; i++) int MacESOPE::slots[i] = 0;

58 54 int MacESOPE::slots[500] = {0; MacESOPE::MacESOPE(): Mac(), timer_(this), timer_activated(0), calctime_(this), Ncbr(0), Nvbr(0), Nvide(0) { PB = new PacketQueue(); BE = new PacketQueue(); SLOTS = new PacketQueue(); void MyTimer::expire(Event *e) { //printf("expire FUNCTION CALLED!\n"); //return TIMER_HANDLED; a_->onsend(); //RING_POSITION = newringposition(); //MY_POSITION = newposition(); void CalculTimer::expire(Event *e) { b_->calcfunction(); void MacESOPE::calcFunction() { int i; int Nzauzeto = 0; for (i = 0; i < 500; i++) { if (slots[i]) Nzauzeto++; Scheduler &s= Scheduler::instance(); double rezultat = (double)nzauzeto/500*100; int startpos1; int endpos1; int startpos2; int endpos2; int startpos3; int endpos3;

59 55 int startpos4; int endpos4; int startpos5; int endpos5; startpos1 = (100 + RING_POSITION)%500; endpos1 = (199 + RING_POSITION)%500; startpos2 = (200 + RING_POSITION)%500; endpos2 = (299 + RING_POSITION)%500; startpos3 = (300 + RING_POSITION)%500; endpos3 = (399 + RING_POSITION)%500; startpos4 = (400 + RING_POSITION)%500; endpos4 = (499 + RING_POSITION)%500; startpos5 = (0 + RING_POSITION)%500; endpos5 = (99 + RING_POSITION)%500; //addition i = startpos1; int N1; N1 = 0;//reset of this value while (i!= endpos1) { if (slots[i]) N1++; i = (i + 1)%500; double result1 = (double)n1; i = startpos2; int N2; N2 = 0;//reset of this value while (i!= endpos2) { if (slots[i]) N2++;

60 56 i = (i + 1)%500; of timer double result2 = (double)n2; i = startpos3; int N3; N3 = 0;//reset of this value while (i!= endpos3) { if (slots[i]) N3++; i = (i + 1)%500; double result3 = (double)n3; i = startpos4; int N4; N4 = 0;//reset of this value while (i!= endpos4) { if (slots[i]) N4++; i = (i + 1)%500; double result4 = (double)n4; i = startpos5; int N5; N5 = 0;//reset of this value while (i!= endpos5) { if (slots[i]) N5++; i = (i + 1)%500; double result5 = (double)n5; //end of addition fprintf(dat,"%f %f %f %f %f %f %f\n", s.clock(), rezultat, result1,result2, result3, result4, result5);

61 57 calctime_.resched(0.25); void MacESOPE::onSend() { //printf("timer CALLED for MAC %d\n", Mac::index_); if (!system_activated) {//I am the first MAC in the network that has some traffic to send!!! //the commands here will be executed one time exactly! //new 12/june/2007 for the needs of CalculTimer activating dat = fopen("results.txt", "w"); calctime_.resched(0.0); //end of new //commented out: printf("system is activated for Mac of the station %d\n", Mac::index_); system_activated = 1; printf("exit_1 za MAC %d\n", Mac::index_); if (class_number == TWO_CLASSES) { if (PB->length()!= 0) { Packet* q = PB->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; newringposition(); slots[my_position] = 1; newposition(); senddown(q); else { if (BE->length()!= 0) { Packet* q = BE->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION;

62 58 newringposition(); slots[my_position] = 1; newposition(); senddown(q); else { printf("error_1!!!\n"); else {//there is only one class! if (PB->length()!= 0) { Packet* q = PB->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; newringposition(); slots[my_position] = 1; newposition(); senddown(q); else { printf("error_1!!!\n"); /* if (PB->length()!= 0) { Packet *q = PB->deque(); hdr_cmn *ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down;//is it necessary here? ptr2->slot_number = MY_POSITION; //commented out: printf("ring_position is = %d, says MAC %d\n", RING_POSITION, Mac::index_); newringposition(); //commented out: printf("ring_position is now = %d, says MAC %d\n", RING_POSITION, Mac::index_); slots[my_position] = 1; //commented out: printf("my_position = %d, says MAC %d\n",

63 59 MY_POSITION, Mac::index_); newposition(); //commented out: printf("my_position is now = %d, says MAC %d\n", MY_POSITION, Mac::index_); senddown(q); else { printf("error_1!!!\n"); */ else { if (slots[my_position]) {//slot is occupied! //printf("yes, MY_POZ is %d, says Mac %d\n", MY_POSITION, Mac::index_); if (SLOTS->length()!= 0) { Packet* p = SLOTS->lookup(0); hdr_mac* pok = HDR_MAC(p); hdr_cmn* pok2 = HDR_CMN(p); if (pok->slot_number == MY_POSITION) { //commented out: printf("we got it!!!\n"); p = SLOTS->deque(); if (pok->macda() == Mac::index_) { slots[my_position] = 0; sendup(p); //New stuff added on 20 june 2007 if (class_number == TWO_CLASSES) { if (PB->length()!= 0) { Packet* q = PB->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; slots[my_position] = 1; senddown(q); else { if (BE->length()!= 0) { Packet* q = BE->deque(); hdr_cmn* ptr = HDR_CMN(q);

64 60 hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; slots[my_position] = 1; senddown(q); else {//there is only one class! if (PB->length()!= 0) { Packet* q = PB->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; slots[my_position] = 1; senddown(q); //End of new stuff added on 20 june 2007 else {//packet is in transit! //HERE NEW FUNCTIONS NEED TO BE ADDED!!! 22 june 2007 if (class_number == TWO_CLASSES) { if (pok2->service_class) {//packet is of the class: best-effort! if (PB->length()!= 0) {//I have some first class traffic to send! //Destroying the packet p!!! drop(p); //Freeing the slot slots[my_position] = 0; //Adding new packet to the slot and occuping the slot: Packet* q = PB->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q);

65 61 ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; slots[my_position] = 1; senddown(q); else { pok2->direction() = hdr_cmn::down; senddown(p); else {//packet is of the priority class!!! pok2->direction() = hdr_cmn::down; senddown(p); else {//ONE_CLASS mode pok2->direction() = hdr_cmn::down; senddown(p); //END OF NEW FUNCTIONS!!! 22 june 2007 //new added for the check of the algorithm 16/06/2007 else { printf("something isn t OK!!! EXIT!!!\n"); exit(1); //end of new 16/06/2007 //end of check if the slot is busy else {//slot isn t busy if (class_number == TWO_CLASSES) { if (PB->length()!= 0) { Packet* q = PB->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down;

66 62 ptr2->slot_number = MY_POSITION; slots[my_position] = 1; senddown(q); else { if (BE->length()!= 0) { Packet* q = BE->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; slots[my_position] = 1; senddown(q); else {//there is only one class! if (PB->length()!= 0) { Packet* q = PB->deque(); hdr_cmn* ptr = HDR_CMN(q); hdr_mac *ptr2 = HDR_MAC(q); ptr->direction() = hdr_cmn::down; ptr2->slot_number = MY_POSITION; slots[my_position] = 1; senddown(q); newringposition(); newposition(); timer_.resched(2e-6); void MacESOPE::start() { timer_activated = 1; timer_.resched(0.0);//start checking right away! switch (Mac::index_) { case 0: MY_POSITION = 100;//8;//starting position; i.e. next comming slot!

67 63 break; case 1: MY_POSITION = 200;//6; break; case 2: MY_POSITION = 300;//4; break; case 3: MY_POSITION = 400;//2; break; case 4: MY_POSITION = 0; break; default: printf("error_4!!!\n"); break; if (system_activated) startposition(); printf("<<<<<<<<<<<<<<<<<<<function start()<<<<<<<<<<<<<\n"); printf("ring_position is now = %d, says MAC %d\n", RING_POSITION, Mac::index_); printf("my_position is now = %d, says MAC %d\n", MY_POSITION, Mac::index_); printf("<<<<<<<<<<<<<<<<<<<function start()<<<<<<<<<<<<<\n"); void MacESOPE::startPosition() { MY_POSITION = (MY_POSITION + RING_POSITION -1) % 500;//10; void MacESOPE::newPosition() { MY_POSITION = (MY_POSITION + 1) % 500;//10; //int i = 100 % 10; printf("100% 10 = %d\n",i); void MacESOPE::newRingPosition() { Scheduler &s= Scheduler::instance(); if (s.clock() > ring_updated) { RING_POSITION = (RING_POSITION + 1) % 500;//10; ring_updated = s.clock(); //printf("ring_position HAS BEEN CHANGED!\n"); //else printf("ring_position IS ALREADY UP TO DATE!!!!\n");

68 64 void MacESOPE::recv(Packet* p, Handler* h) { //timer activating if (!timer_activated) start(); //end of timer activating Scheduler& s = Scheduler::instance(); //commented out: printf("mesuring: packet is received at %f\n", s.clock());//this is new stuff! printf("simulated time: %f\r", s.clock()); hdr_cmn *ch = HDR_CMN(p); //commented out: printf("mac::recv method called, for the packet with uid = %d\n", ch->uid()); //bogdan, a try //hdr_mac* mh = HDR_MAC(p); if (ch->direction() == hdr_cmn::up) {//all UP cases covered!!! //commented out: printf("length of SLOTS is %d\n", SLOTS->length()); SLOTS->enque(p); else {//for the traffic of the station itself Mac::callback_ = h; hdr_mac* mh = HDR_MAC(p); hdr_cmn* ch = HDR_CMN(p); mh->set(mf_data, index_); Mac::state(MAC_SEND); if (class_number == TWO_CLASSES) { if (ch->service_class) { if (BE->length() < 2500) BE->enque(p); else { drop(p);printf("packet droped!!!\n");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

NS2 How to implement a new protocol?

NS2 How to implement a new protocol? NS2 How to implement a new protocol? Chang-Gun Lee (cglee@snu.ac.kr) Assistant Professor The School of Computer Science and Engineering Seoul National University NS directory structure ns-2.30 C++ objects

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

Chapter 5. Simulation Environment. Chapter 5 Simulation Environment... V Network Simulator... V NS-2 Installation...

Chapter 5. Simulation Environment. Chapter 5 Simulation Environment... V Network Simulator... V NS-2 Installation... Chapter 5 Simulation Environment Chapter 5 Simulation Environment... V-2 5.1 Network Simulator... V-2 5.2 NS-2 Installation... V-4 5.3 Sample Script... V-9 5.4 Adding New Routing Protocol in NS2... V-12

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

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

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

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

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

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

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

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

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

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

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

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

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

Note For NS2: How NS2 Connects Two Nodes. Teerawat Issariyakul

Note For NS2: How NS2 Connects Two Nodes. Teerawat Issariyakul Note For NS2: How NS2 Connects Two Nodes Teerawat Issariyakul July 19, 2006 2 Chapter 1 Introduction 1.1 Overview This note explains how NS2 really connects two nodes. Basically, it just uses a Tcl object

More information

FACULTY OF ENGINEERING

FACULTY OF ENGINEERING FACULTY OF ENGINEERING LAB SHEET ETM 3056 - COMMUNICATIONS NETWORKS TRIMESTER 1 (2010/2011) CN1 COMMUNICATION PROTOCOLS ANALYSIS CN2 WIRELESS NETWORK SIMULATION Note: On-the-spot evaluation may be carried

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

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

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

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

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

UNIVERSITY OF NAIROBI STABILITY OF TCP/IP PROTOCOLS

UNIVERSITY OF NAIROBI STABILITY OF TCP/IP PROTOCOLS UNIVERSITY OF NAIROBI STABILITY OF TCP/IP PROTOCOLS PROJECT INDEX: PRJ 148 BY NAME: NJERU PATRICK MAGOCHI REG. NO: F17/1360/2010 SUPERVISOR: DR. G.S. ODHIAMBO EXAMINER: PROF. V.K. ODUOL Project report

More information

A solution for Synchronization Problem of Interconnected Metro Access and Metro Core Ring Networks

A solution for Synchronization Problem of Interconnected Metro Access and Metro Core Ring Networks A solution for Synchronization Problem of Interconnected Access and Core Ring Networks Tülin ATMACA, Van T. NGUYEN, Dung T. NGUYEN, Glenda GONZALEZ Lab. CNRS/Samovar Institut Telecom/Telecom SudParis Evry

More information

Network Simulator Version 2 for VANET

Network Simulator Version 2 for VANET International Journal of Scientific Research in Computer Science, Engineering and Information Technology 2017 IJSRCSEIT Volume 2 Issue 5 ISSN : 2456-3307 Network Simulator Version 2 for VANET Venkatatamangarao

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

[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

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

International Journal of Intellectual Advancements and Research in Engineering Computations. Efficient routing protocol for MANET using.

International Journal of Intellectual Advancements and Research in Engineering Computations. Efficient routing protocol for MANET using. www.ijiarec.com ISSN:2348-2079 Volume-5 Issue-1 International Journal of Intellectual Advancements and Research in Engineering Computations Efficient routing protocol for MANET using STP and BRM First

More information

NS internals. Velibor Markovski Communication Networks Laboratory School of Engineering Science Simon Fraser University

NS internals. Velibor Markovski Communication Networks Laboratory School of Engineering Science Simon Fraser University NS internals Velibor Markovski Communication Networks Laboratory School of Engineering Science Simon Fraser University Software architecture Split programming model (C++ and OTcl) Simulation kernel fi

More information

Implementation of Wired and Wireless Networks, Analysis Simulation and Result Comparison Using Ns2

Implementation of Wired and Wireless Networks, Analysis Simulation and Result Comparison Using Ns2 Implementation of Wired and Wireless Networks, Analysis Simulation and Result Comparison Using Ns2 1 S.Jeneeth Subashini, 2 D. Guna Shekar, 3 C.Harinath Reddy, 4 M. Manikanta 1,2,3,4 ECE, Final year students,

More information

PERFORMANCE ANALYSIS OF AF IN CONSIDERING LINK

PERFORMANCE ANALYSIS OF AF IN CONSIDERING LINK I.J.E.M.S., VOL.2 (3) 211: 163-171 ISSN 2229-6X PERFORMANCE ANALYSIS OF AF IN CONSIDERING LINK UTILISATION BY SIMULATION Jai Kumar and U.C. Jaiswal Department of Computer Science and Engineering, Madan

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

SIMULATION OF PACKET DATA NETWORKS USING OPNET

SIMULATION OF PACKET DATA NETWORKS USING OPNET SIMULATION OF PACKET DATA NETWORKS USING OPNET Nazy Alborz, Maryam Keyvani, Milan Nikolic, and Ljiljana Trajkovic * School of Engineering Science Simon Fraser University Vancouver, British Columbia, Canada

More information

ECE4110 Internetwork Programming. Introduction and Overview

ECE4110 Internetwork Programming. Introduction and Overview ECE4110 Internetwork Programming Introduction and Overview 1 EXAMPLE GENERAL NETWORK ALGORITHM Listen to wire Are signals detected Detect a preamble Yes Read Destination Address No data carrying or noise?

More information

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN RMIT University Data Communication and Net-Centric Computing COSC 1111/2061/1110 Medium Access Control Methods & LAN Technology Slide 1 Lecture Overview During this lecture, we will Look at several Multiple

More information

Simulation and Analysis of Impact of Buffering of Voice Calls in Integrated Voice and Data Communication System

Simulation and Analysis of Impact of Buffering of Voice Calls in Integrated Voice and Data Communication System Simulation and Analysis of Impact of Buffering of Voice Calls in Integrated Voice and Data Communication System VM Chavan 1, MM Kuber 2 & RJ Mukhedkar 3 1&2 Department of Computer Engineering, Defence

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

TKN. Technische Universität Berlin. Circuit Switching Module for ns-2. Filip Idzikowski. Berlin, March 2009

TKN. Technische Universität Berlin. Circuit Switching Module for ns-2. Filip Idzikowski. Berlin, March 2009 TKN Telecommunication Networks Group Technische Universität Berlin Telecommunication Networks Group Circuit Switching Module for ns-2 Filip Idzikowski idzikowski@tkn.tu-berlin.de Berlin, March 2009 TKN

More information

PERFORMANCE ANALYSIS OF AF IN CONSIDERING LINK UTILISATION BY SIMULATION WITH DROP-TAIL

PERFORMANCE ANALYSIS OF AF IN CONSIDERING LINK UTILISATION BY SIMULATION WITH DROP-TAIL I.J.E.M.S., VOL.2 (4) 2011: 221-228 ISSN 2229-600X PERFORMANCE ANALYSIS OF AF IN CONSIDERING LINK UTILISATION BY SIMULATION WITH DROP-TAIL Jai Kumar, Jaiswal Umesh Chandra Department of Computer Science

More information

A Simulation Study of the PLC-MAC Performance using Network Simulator-2

A Simulation Study of the PLC-MAC Performance using Network Simulator-2 A Simulation Study of the PLC-MAC Performance using Network Simulator-2 Min-Soo Kim, Dong-Min Son*, Young-Bae Ko and Young-Hyun Kim** Graduate School of Information & Communication, Ajou University, Korea

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

Evaluation Strategies. Nick Feamster CS 7260 February 26, 2007

Evaluation Strategies. Nick Feamster CS 7260 February 26, 2007 Evaluation Strategies Nick Feamster CS 7260 February 26, 2007 Evaluation Strategies Many ways to evaluate new protocols, systems, implementations Mathematical analysis Simulation (ns, SSFNet, etc.) Emulation

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

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

GENERAL SELF-ORGANIZING TREE-BASED ENERGY BALANCE ROUTING PROTOCOL WITH CLUSTERING FOR WIRELESS SENSOR NETWORK

GENERAL SELF-ORGANIZING TREE-BASED ENERGY BALANCE ROUTING PROTOCOL WITH CLUSTERING FOR WIRELESS SENSOR NETWORK GENERAL SELF-ORGANIZING TREE-BASED ENERGY BALANCE ROUTING PROTOCOL WITH CLUSTERING FOR WIRELESS SENSOR NETWORK A PROJECT REPORT Submitted by DIVYA P Register No: 14MCO010 in partial fulfillment for the

More information

Implementation of Feedback Mechanism into AODV based on NS2

Implementation of Feedback Mechanism into AODV based on NS2 Implementation of Feedback Mechanism into AODV based on NS2 Sebastian Roschke [sebastian.roschke@hpi.uni-potsdam.de] 2007-05-16 Abstract This paper gives an overview on the implementation of a feedback

More information

Traffic Behaviour of VoIP in a Simulated Access Network

Traffic Behaviour of VoIP in a Simulated Access Network Complete Citation: Das Gupta, Jishu and Howard, Srecko and Howard, Angela (2006). Traffic behaviour of VoIP in a simulated access network. International Transactions on Engineering, Computing and Technology,

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

Sirindhorn International Institute of Technology Thammasat University

Sirindhorn International Institute of Technology Thammasat University Name.............................. ID............... Section...... Seat No...... Thammasat University Final Exam: Semester, 205 Course Title: Introduction to Data Communications Instructor: Steven Gordon

More information

Multi Service Link Layers: An Introduction

Multi Service Link Layers: An Introduction Multi Service Link Layers: An Introduction George Xylomenos October 2007 Abstract This document provides an introduction to the Multi Service Link Layer framework, describing its components and their interaction.

More information

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst EITF25 Internet Techniques and Applications L4: Network Access Stefan Höst Repetition The link layer protocol should make sure that the data is correctly transmitted over the physical link using error

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

EEL6951 Project: Simulation of LDoS Attack in Ad-hoc Network by Y. He et al. I. Introduction

EEL6951 Project: Simulation of LDoS Attack in Ad-hoc Network by Y. He et al. I. Introduction EEL6951 Project: Simulation of LDoS Attack in Ad-hoc Network by Y. He et al. By Paul Muri, Carlo Pascoe, and Brian Sapp I. Introduction Research Paper: LDoS Attack in Ad-hoc Network by Y. He et al. Citation:

More information

An Application of the Modification of Slow Start Algorithm in Campus Network

An Application of the Modification of Slow Start Algorithm in Campus Network Available online at www.sciencedirect.com Energy Procedia 17 (2012 ) 1326 1331 2012 International Conference on Future Electrical Power and Energy Systems An Application of the Modification of Slow Start

More information

and Networks Data Communications Second Edition Tata McGraw Hill Education Private Limited Managing Director SoftExcel Services Limited, Mumbai

and Networks Data Communications Second Edition Tata McGraw Hill Education Private Limited Managing Director SoftExcel Services Limited, Mumbai Data Communications and Networks Second Edition ACHYUT S GODBOLE Managing Director SoftExcel Services Limited, Mumbai ATUL KAHATE Senior Consultant Oracle Financial Services Software Limited, Pune Tata

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

Integrating Information Systems: Technology, Strategy, and Organizational Factors

Integrating Information Systems: Technology, Strategy, and Organizational Factors MASSACHUSETTS INSTITUTE OF TECHNOLOGY SLOAN SCHOOL OF MANAGEMENT 15.565 Integrating Information Systems: Technology, Strategy, and Organizational Factors 15.578 Global Information Systems: Communications

More information

QoS Provisioning in WDM Ring Networks with Tunable Transceivers

QoS Provisioning in WDM Ring Networks with Tunable Transceivers QoS Provisioning in WDM Ring Networks with Tunable Transceivers Ashok K. Turuk and Rajeev Kumar Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Kharagpur, WB 721

More information

Data Link Layer: Collisions

Data Link Layer: Collisions Data Link Layer: Collisions 1 Multiple Access Data Link layer divided into two sublayers. The upper sublayer is responsible for datalink control, The lower sublayer is responsible for resolving access

More information

Notes on the Inefficiency of e HCCA

Notes on the Inefficiency of e HCCA Notes on the Inefficiency of 802.e HCCA C. Casetti, C.-F. Chiasserini, M. Fiore and M. Garetto Dipartimento di Elettronica, Politecnico di Torino - Italy E-mail: {casetti,chiasserini,fiore,garetto}@polito.it

More information

1. The Internet 2. Principles 3. Ethernet 4. WiFi 5. Routing 6. Internetworking 7. Transport 8. Models 9. WiMAX & LTE 10. QoS 11. Physical Layer 12.

1. The Internet 2. Principles 3. Ethernet 4. WiFi 5. Routing 6. Internetworking 7. Transport 8. Models 9. WiMAX & LTE 10. QoS 11. Physical Layer 12. Lecture Slides 1. The Internet 2. Principles 3. Ethernet 4. WiFi 5. Routing 6. Internetworking 7. Transport 8. Models 9. WiMAX & LTE 10. QoS 11. Physical Layer 12. Additional Topics 1.1. Basic Operations

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

CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS

CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS 15.1 Computer room networks require very high data rates and usually are concerned with transfer of large blocks of data. 15.2 Backend LAN: Backend networks

More information

Optical Packet Switching

Optical Packet Switching Optical Packet Switching DEISNet Gruppo Reti di Telecomunicazioni http://deisnet.deis.unibo.it WDM Optical Network Legacy Networks Edge Systems WDM Links λ 1 λ 2 λ 3 λ 4 Core Nodes 2 1 Wavelength Routing

More information

Data Communication. Chapter # 1: Introduction. By: William Stalling

Data Communication. Chapter # 1: Introduction. By: William Stalling Data Communication Chapter # 1: By: Introduction William Stalling Data Communication The exchange of data between two devices via some form of transmission medium such as cable wire. For data communications

More information

Network Simulator 2, Protocol Implementation Assignment for Telecommunications Laboratory Course

Network Simulator 2, Protocol Implementation Assignment for Telecommunications Laboratory Course Network Simulator 2, Protocol Implementation Assignment for Telecommunications Laboratory Course 1 Introduction This document describes the Major NS2 Assignment for the Simulation Part of the Telecommunications

More information

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING UNIT-2 2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS 2.2.1 Pure ALOHA 2.2.2 Slotted ALOHA 2.2.3 Carrier Sense Multiple Access 2.2.4 CSMA with Collision Detection 2.2.5 Collision Free Protocols 2.2.5.1

More information

There are algorithms, however, that need to execute statements in some other kind of ordering depending on certain conditions.

There are algorithms, however, that need to execute statements in some other kind of ordering depending on certain conditions. Introduction In the programs that we have dealt with so far, all statements inside the main function were executed in sequence as they appeared, one after the other. This type of sequencing is adequate

More information

Introduction to Networks and the Internet

Introduction to Networks and the Internet Introduction to Networks and the Internet HTML tutorial today. Announcements CMPE 80N Spring 2003 Week 5 1 2 MAC Protocols MAC Protocols Round-robin. Scheduled-access. Contention-based. Contention-based

More information

Question Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100

Question Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100 NAME: Login name: Computer Science 461 Midterm Exam March 10, 2010 3:00-4:20pm This test has five (5) questions. Put your name on every page, and write out and sign the Honor Code pledge before turning

More information

CS610- Computer Network Solved Subjective From Midterm Papers

CS610- Computer Network Solved Subjective From Midterm Papers Solved Subjective From Midterm Papers May 08,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS610- Computer Network Midterm Examination - Fall 2011 1. Where are destination and source

More information

Actually, C provides another type of variable which allows us to do just that. These are called dynamic variables.

Actually, C provides another type of variable which allows us to do just that. These are called dynamic variables. When a program is run, memory space is immediately reserved for the variables defined in the program. This memory space is kept by the variables until the program terminates. These variables are called

More information

Networking for Data Acquisition Systems. Fabrice Le Goff - 14/02/ ISOTDAQ

Networking for Data Acquisition Systems. Fabrice Le Goff - 14/02/ ISOTDAQ Networking for Data Acquisition Systems Fabrice Le Goff - 14/02/2018 - ISOTDAQ Outline Generalities The OSI Model Ethernet and Local Area Networks IP and Routing TCP, UDP and Transport Efficiency Networking

More information