LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-05-2014, 07:39 AM   #1
erlin1991
LQ Newbie
 
Registered: Jun 2014
Posts: 1

Rep: Reputation: Disabled
Seeking help with NS2 Simulator assignment


Hello,can anyone help me with this task?

NS2 SIMULATION, PART 2
General
The objectives of this assignment (Part 2) are as follows:
[1] to continue acquaintance with simulation capabilities of the network simulator ns2;
[2] to conduct case studies dealing with: a) TCP and UDP ability to share available
bandwidth; b) how router buffer size affects TCP performance and network
characteristics; c) effects of parallel TCP connections on total TCP goodput and link
utilization.
Your task is to write a Tcl script according to these instructions and perform some simulations
with it.
Since Part 2 should be done only after successful completion of Part 1, it is presumed that
students have basic knowledge about ns2, such as creating simulation scenarios, tracing
objects, and processing trace files.
The network to be simulated
Use the network topology shown below (also known as “dumbbell topology”). In the figure,
every circle represents a node, while lines represent links.
All access links are full-duplex and have 100 Mbit/s of bandwidth and 2 ms of delay. The link
between r1 and r2 is also full-duplex and has 40 Mbit/s of bandwidth and 6 ms of delay. From
here it follows that the link r1-r2 is a bottleneck link.
The queuing discipline of all links is DropTail (FIFO).
Limit the maximum queue size at r1-r2 link to 67 packets.
2
Use the following TCP/UDP/CBR parameter:
#TCP Tahoe parameters
Agent/TCP set maxcwnd_ 200
Agent/TCP set window_ 200
Agent/TCP set windowInit_ 2
Agent/TCP set packetSize_ 1460
Agent/TCP set tcpTick_ 0.001
#TCP NewReno parameters (Slow-but-Steady)
Agent/TCP/Newreno set maxcwnd_ 300
Agent/TCP/Newreno set window_ 300
Agent/TCP/Newreno set windowInit_ 2
Agent/TCP/Newreno set packetSize_ 1460
Agent/TCP/Newreno set tcpTick_ 0.001
Agent/TCP/Newreno set newreno_changes_ 0
Agent/TCP/Newreno set newreno_changes1_ 0
#UDP and CBR parameters
$udp set packetSize_ 1500
$cbr set packetSize_ 1500
Use Agent/TCPSink as a TCP receiver and one-way TCP agent as a TCP sender.
Set different colours for data flows.
Generate TCP traffic using FTP and UDP traffic using CBR application.
Start sending data from all sources at the same time and stop each flow after 130 seconds. In
order to remove transient phase at the beginning of simulation start to trace data after 10
seconds from the beginning of simulation (or analyse only the last 120 seconds of the trace).
Since the number of sources (and, consequently, receivers) will vary in different tasks, you
are required to define network topology using loop statements.
Note that command namtrace-all may result in the creation of huge files. In order to save
Lintula’s processors and space use nam visualization only as a debugging tool at the script
debug phase.
Tasks
[1] Use TCP Tahoe senders and run simulations varying the number of TCP senders from
1 to 10. At each step calculate the average goodput (receive rate) of each connection
and its bottleneck bandwidth share, and summarize in a table. Plot a graph where the
bottleneck bandwidth share of the first connection is on the y-axis and the total
number of TCP connections is on the x-axis.
3
On a base of simulation results (provide the graph) explain TCP resource sharing
policy while coexisting with identical TCP connections.
[2] Set the number of sources to be equal to 2, where one of them is TCP Tahoe sender
and the other is UDP agent with a CBR application on top. Run 11 simulations
varying CBR rate from 0 to 40 Mbit/s with a step of 4 Mbit/s. At each step calculate
the average goodput of the TCP connection and its bottleneck bandwidth share. Plot a
graph where the bottleneck bandwidth share of the TCP connection is on the y-axis
and the CBR rate is on the x-axis.
On a base of simulation results (provide the graph) explain the difference between
TCP and UDP flows in sharing resources. When does UDP flow behave itself non-
aggressive and TCP-friendly?
[3] Set the number of sources to be equal to 1. Use TCP NewReno agent (Slow-but-
Steady variant) as a TCP sender (use maxcwnd_ 300 and window_ 300). Run
simulations varying the maximum queue size at r1-r2 link from 10 to 130 with a step
of 30 packets.
Let us define the ratio between queue size and bandwidth-delay product of the
network as
queue _ size
X= ,
BDP
where bandwidth-delay product (BDP) of the network can be found as
20ms × 40Mbit/s
BDP = ≈ 67pkts .
8 × 1500Bytes
Plot the following graphs:
- average TCP loss rate as a function of X ;
- average queuing delay as a function of X ;
- average bottleneck link utilization as a function of X .
Provide the graphs and give your explanation of the obtained results. How do you
think what is the most appropriate queue size for the given topology (in terms of small
loss rate, low delay, and high bottleneck link utilization)? Compare it with bandwidth-
delay product of the network.
Note that RTTobserved = RTTmin + queuing _ delay . Thus, the average queuing delay can
be calculated as
4
queuing _ delayaverage = RTT − RTTmin ,
where RTTmin = 20ms .
[4] Set the maximum queue size of r1-r2 link to be equal to 67 packets and the maximum
congestion window size of TCP Tahoe agent to be equal to 20 packets
(maxcwnd_ 20). Run simulations varying the number of TCP Tahoe senders as
follows: 1, 2, 3, 4, 8, 16, and 32. Plot a graph where the utilized bottleneck bandwidth
(or, what is the same thing, total goodput of the parallel TCP connections) is on the y-
axis and the number of parallel TCP connections is on the x-axis.
Provide the graphs and give your explanation of the obtained results. What is the
advantage of using parallel TCP connections? How many connections are required to
fully utilize available bandwidth in the given conditions?
 
Old 06-10-2014, 08:44 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by erlin1991 View Post
Hello,can anyone help me with this task?

NS2 SIMULATION, PART 2
General
The objectives of this assignment (Part 2) are as follows:.....
Yes, we will be glad to HELP you...so tell us what YOU have done/tried and where you're stuck. Otherwise, we are NOT going to do your homework for you, and you need to read the LQ rules about posting verbatim homework questions.

Anyone here will be happy to provide assistance, but you have to show effort of your own; this is YOUR homework assignment, not ours.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network simulator (NS2) rohitdaid Linux - Software 0 11-11-2013 09:24 PM
NS2 Simulator raji27 Linux - Software 7 03-28-2012 03:05 PM
NS2 simulator Vaishali4 Linux - Newbie 1 10-07-2011 09:03 AM
NS2 simulator raji27 Linux - Software 1 09-12-2011 06:34 PM
NS2 - network simulator liquid.o Linux - Networking 0 11-24-2006 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration