Network Simulator 2: a Simulation Tool for Linux
SCTP is a transmission protocol that was introduced by the IETF workgroup SIGTRAN in October 2000 (RFC 2960) to allow SS7 traffic over IP. However, since then it has adopted many more uses because of its versatility as it also supports multihoming, network congestion control, error-free sequenced delivery and many other options.
After applying the SCTP patch to NS2 package, a README file is created: /usr/src/ns-allinone-2.1b8/ns-2.1b8/sctp.README. At the end of the sctp.README file, there is an example script for an SCTP interaction. In the simulation generated by this Tcl script, you will observe SCTP's four-way handshake as described in RFC 2960, as well as congestion control. This scenario examines FTP traffic over SCTP between two nodes: node 0 is FTP client and node 1 is FTP server.
The original script is hard coded for version 2.1b7a. You need to update few lines to reflect your own setup. Listing 1 has been updated assuming that NS2 version 2.1b8 was installed.
Listing 1. SCTP Simulation Script
The changes that were applied to the original script are basically setting the paths depending on the specific environment. Once you update the paths of all used tools, you are ready to start NS2 for a network simulation of SCTP. To start the simulation, follow these steps:
cd /usr/src/ns-allinone-2.1b8 ns ./sctp.tcl

Figure 2. Simulation Window
On execution, three windows will appear. The first window is represented by Figure 1 showing a graph with packet traffic. The second window shows the simulation window as seen in Figure 2. The third window is the control window of the network animator (NAM).
It is interesting to see the graph generated by NS2 (Figure 1). The yellow x represents a dropped packet and horizontally to the right is the retransmission. This dropped packet occurred because of an error loss model that was introduced into the script that simply drops the specified packets between nodes given. SCTP manages retransmission similarly to TCP, supporting fast retransmit.
set err [new ErrorModel/List]
$err droplist {15}
$ns lossmodel $err $n0 $n1
In the simulation window (Figure 2), right click on the link between both nodes and select graph --> graph bandwidth, and then click on Link 0-->1; you will obtain a bar graph representing bandwidth going from node 0 to node 1. You can repeat this process for reverse traffic bandwidth to monitor traffic going from node 1 to node 0. Now, you should see traffic bandwidth graphs below node display (Figure 3).
Before we start the scenario, we will take a brief look at some important lines in the script and explain what they do:
[...] // After initializing trace
// files and simulation windows
set n0 [$ns node] // two nodes are created
set n1 [$ns node] // (n0 and n1)
$ns duplex-link $n0 $n1 .5Mb 300ms DropTail
// then they are linked
// together
$ns duplex-link-op $n0 $n1 orient right
[...]
set sctp0 [new Agent/SCTP]
$ns attach-agent $n0 $sctp0
[...]
set sctp1 [new Agent/SCTP]
$ns attach-agent $n1 $sctp1
Then we define the protocol (SCTP) that will be used for destination and return traffic. An agent, defining what protocol to use, is similar to a carrier for packets. Each agent must be attached to a specific node:
$ns connect $sctp0 $sctp1 // connect both agents
// together to set up
// a communications
// channel, or a stream
[...]
set ftp0 [new Application/FTP] // define the type of
// application that
// will use the
// stream, FTP
$ftp0 attach-agent $sctp0
To start real-time simulation, press the play forward button. The first event to notice is the four packets that initiate the FTP connection. This corresponds to the stream initiation behavior specified in RFC 2960. The other event to observe is congestion control. SCTP will send few packets at a time and steadily increase until it reaches a maximum throughput but will not flood the network. Although we do not alter our network's bandwidth, the FTP connection between nodes 0 and 1 shows some basic congestion control. The beginning and end of the FTP connection are defined on these lines:
$ns at 0.5 "$ftp0 start" $ns at 4.5 "$ftp0 stop"
Notice how the packets are being sent in an increasing fashion, or visually, in longer formats. Actually, the packets are always the same length; however, the number of packets received by the server is increased as can be seen by the number of SACKS received by client (Figure 4). SACKS are sent to acknowledge each packet received to ensure packet validation and reliability.
The University of Delaware did not implement multihoming in their SCTP patch to NS2. This means that SCTP behaves similarly to TCP when it comes to streams. Otherwise, packets could be seen traveling both along the primary path and along another routing path to the server's second, third or other IP address. A similar behavior is dynamic rerouting, which is a secondary function of SCTP's primary path monitoring.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Validate an E-Mail Address with PHP, the Right Way
- Technical Support Rep
- Senior Perl Developer
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Introduction to MapReduce with Hadoop on Linux
- Cari Uang
42 min 36 sec ago - user namespaces
3 hours 36 min ago - yea
4 hours 1 min ago - One advantage with VMs
6 hours 30 min ago - about info
7 hours 3 min ago - info
7 hours 4 min ago - info
7 hours 5 min ago - info
7 hours 7 min ago - info
7 hours 8 min ago - abut info
7 hours 10 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?






Comments
Simulation for a High speed mass data transfer protocol
Hello everybody,
I'll be doing a project simulation for a high speed mass data transfer protocol.
Will be needing your help..
If anybody interested or want to contribute they are humbly invited.. :)
Just drop me a mail at:
kanishk@speedpost.net
is there any specific kernel support required for installing ns2
is there any specific kernel support required for installing ns-2.1b8-mcast
Change queue parameters dynamically during the simulation r
Dear friend,
I want to change parameters of a RED queue during the simulation but it seems that some parameters can be modified only before starting the simulation, not dynamically, while the simulation is in progress. For example the following subroutines works before $ns run command but it do not affect the behavior of the queue during the simulation( I want to change maxthresh_ and thresh_ after $ns run command):
#---------------------------------------------------------------
proc setREDParameters { redQueue MINth MAXth PER_MaxP Wq } {
$redQueue set thresh_ $MINth
$redQueue set maxthresh_ $MAXth
$redQueue set q_weight_ $Wq
$redQueue set linterm_ $PER_MaxP
return $redQueue
}
Who knows what I should do ?
Email:raeisy@shirazu.ac.ir
ns2-wsn
pls send me the ns2 code for any topology scheme preferably span in wireless sensor networking
voice security in ns-2
please, can i implement voice security in ns-2
all contributions would be appreciated.
cellular envirnoment in NS-2
i m doing the project in channel allocation in mobile communication, i wants to implement it in NS-2. i wants to create the wireless envirnoment. can anybody helps me in doing that?
Hi, Iam also doing project
Hi,
Iam also doing project in cellular networks. if you know how to simulate it in ns2 please tell me. My email: kiran.mvk123@gmail.com
Thankyou
About SCTP and NS-2.32
Now, I want to simulate SCTP on NS-2. And I use NS-2 2.32. I want to know does NS-2 2.32 support SCTP???
Thank for your help.