Looking for a similar answer, essay, or assessment help services?

Simply fill out the order form with your paper’s instructions in a few easy steps. This quick process ensures you’ll be matched with an expert writer who
Can meet your papers' specific grading rubric needs. Find the best write my essay assistance for your assignments- Affordable, plagiarism-free, and on time!

Posted: September 18th, 2024

Examining The Network Simulations Of NS2 Information Technology Essay

NS2 is a Linux based tool to perform network simulations. NS2 is based on C++ and TCL programming Languages. TCL uses simple commands to define network configuration and C++ allows users to adjust protocol functionalities in detail and also to define new protocols. Our Project involves simulation of VoIP over two transport layer protocols UDP and SCTP.

Installation of NS2:

What Citation Formats Do You Support?

We hear “Can you write in APA or MLA?” all the time—and the answer’s a big yes, plus way more! Our writers are wizards with every style—APA, MLA, Harvard, Chicago, Turabian, you name it—delivering flawless formatting tailored to your assignment. Whether it’s a tricky in-text citation or a perfectly styled reference list, they’ve got the skills to make your paper academically spot-on.

Installation of NS2 involves many steps. These Steps are:

Checking for pre-requisites:

Please make sure that you have installed the fedora 12 O.S with all packages and you are logged in as administrator.

Downloading latest version of NS2:

Are Paper Services Legal?

Yes, completely! They’re a valid tool for getting sample papers to boost your own writing skills, and there’s nothing shady about that. Use them right—like a study guide or a model to learn from—and they’re a smart, ethical way to level up your grades without breaking any rules.

We first Downloaded NS2 v. 2.34 from: http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.34/ns-allinone-2.34.tar.gz/download

Extracting the NS2 package:

Extract the contents of .tar file in a directory and go into that directory. The following snapshot shows the extracted file against .tar file.

How Much for a Paper?

Prices start at $10 per page for undergrad work and go up to $21 for advanced levels, depending on urgency and any extras you toss in. Deadlines range from a lightning-fast 3 hours to a chill 14 days—plenty of wiggle room there! Plus, if you’re ordering big, you’ll snag 5-10% off, making it easier on your wallet while still getting top-notch quality.

Patching of SCTP module:

Initially NS2 does not provide support to SCTP, so we have to download apply its patch before installation of NS2. The patch can be downloaded from http://pel.cis.udel.edu

Now untar the patch in a directory and type the given command in terminal: “patch -p0 < ns-allinone-2.24.sctp-rel3.3.patch.orig"

Now we are ready to install NS2 with SCTP module.

Installation of NS2 :

We can either install NS2 by typing commands in the terminal. Or we can do this by simply double clicking the ‘install’ file. The snapshot below shows the later.

Will Anyone Find Out I Used You?

Nope—your secret’s locked down tight. We encrypt all your data with top-tier security, and every paper’s crafted fresh just for you, run through originality checks to prove it’s one-of-a-kind. No one—professors, classmates, or anyone—will ever know you teamed up with us, guaranteed.

Now the installation has started. It would take some time to complete it.

Configuring the installation path of NS2:

The terminal will get get closed after installation of NS2. Now open terminal again and type: “gedit ~/.bashrc” to configure the path file

Now edit this file as in the figure:

Now save and close bash file and type following command in the terminal to tell your O.S about the path of NS2: “source ~/.bashrc”

Do You Rely on AI?

Not even a little—our writers are real-deal experts with degrees, crafting every paper by hand with care and know-how. No AI shortcuts here; it’s all human skill, backed by thorough research and double-checked for uniqueness. You’re getting authentic work that stands out for all the right reasons.

Confirming the installation of NS2:

To confirm that NS2 is correctly installed, type “ns” in the terminal. The outlook of the terminal will be changed in this way:

(Else it would print some filter of error in the terminal.)

To revert to the normal mode type “exit” in the terminal.

Running a simple code on NS2:

NS2 executes .tcl file format. If you have followed all the previous steps, then you can execute a .tcl file by typing the following syntax in the terminal: “ns [file name].tcl”

Why Are You Top for Research Papers?

Our writers are Ph.D.-level pros who live for nailing the details—think deep research and razor-sharp arguments. We pair that with top plagiarism tools, free revisions to tweak anything you need, and fast turnarounds that don’t skimp on quality. Your research paper won’t just shine—it’ll set the bar.

But make sure you are the directory where the .tcl file is present.

e.g: Here we have a sample code script.tcl. In this code we are simulating a simple topology of two wired nodes.

On typing “ns script.tcl” in the terminal, we get the following output:

Handling the output trace file:

On execution of .tcl code, two output files are generated. One is the .nam file with which we see the graphical simulation of our code. The other one is the .tr trace file, with which we can analyze the output of our simulation. The trace file looks like:

Who’s Behind My Essays?

You’re in good hands with degree-holding pros—many rocking Master’s or higher—who’ve crushed our tough vetting tests in writing and their fields. They’re your partners in this, hitting tight deadlines and academic standards with ease, all while tailoring every essay to your exact needs. No matter the topic, they’ve got the chops to make it stellar.

It contains various parameters such as arrival time of packets, packet size transport agent etc. Using the trace file, we can get the graphical outputs to analyze the behavior of our simulation.

To do this we need a graph drawing software such as xgraph or gnuplot. Here we are using gnuplot. But to draw a graph, we need to filter the trace file and get the coordinates out of which we can draw a graph.

To filter a trace file, we write an awk script. Since we have to draw graphs for latency and throughput, therefore we will write one script for each type of graph. The awk script for latency is:

#latency

Is My Paper Original?

100%—we promise! Every paper’s written fresh from scratch—no AI, no copying—just solid research and proper citations from our expert writers. You can even request a plagiarism report to see it’s 95%+ unique, giving you total confidence it’s submission-ready and one-of-a-kind.

BEGIN {

time1 = 0.0;

time2 = 0.0;

}

{

time2 = $2;

Can You Do Any Citation Style?

Yep—APA, Turabian, IEEE, Chicago, MLA, whatever you throw at us! Our writers nail every detail of your chosen style, matching your guidelines down to the last comma and period. It’s all about making sure your paper fits academic expectations perfectly, no sweat.

if ($1==”r”) {

printf(“%f %fn”, time1, time2) > “latency”;

time1 += $2;

}

}

END {

Can I Adjust Instructions Later?

Absolutely—life happens, and we’re flexible! Chat with your writer anytime through our system to update details, tweak the focus, or add new requirements, and they’ll pivot fast to keep your paper on point. It’s all about making sure the final draft is exactly what you need, no stress involved.

print(“Done”);

}

And awk script for throughput is:

#throughput

BEGIN {

How Do I Get Started?

It’s super easy—order online with a few clicks, then track progress with drafts as your writer works their magic. Once it’s done, download it from your account, give it a once-over, and release payment only when you’re thrilled with the result. It’s fast, affordable, and built with students like you in mind!

node =1;

time1 = 0.0;

time2 = 0.0;

num_packet=0;

How Fast for Rush Jobs?

We can crank out a killer paper in 24 hours—quality locked in, no shortcuts. Just set your deadline when you order, and our pros will hustle to deliver, even if you’re racing the clock. Perfect for those last-minute crunches without compromising on the good stuff.

bytes_counter=0;

}

{

time2 = $2;

if (time2 – time1 > 0.05) {

thru = bytes_counter / (time2-time1);

thru /= 1000000;

Can You Handle Complex Subjects?

For sure! Our writers with advanced degrees dive into any topic—think quantum physics or medieval lit—with deep research and clear, sharp writing. They’ll tailor it to your academic level, ensuring it’s thorough yet easy to follow, no matter how tricky the subject gets.

printf(“%f %fn”, time2, thru) > “throughput”;

time1 = $2;

}

if ($1==”r”) {

bytes_counter += $6;

num_packet++;

How Do You Meet Prof Standards?

We stick to your rubric like glue—nailing the structure, depth, and tone your professor wants—then polish it with edits for that extra shine. Our writers know what profs look for, and we double-check every detail to make sure it’s submission-ready and grade-worthy.

}

}

END {

print(“Done”);

}

Now type the following command in the terminal to filter the trace file:

“gawk –file=[awk file name].awk [trace file name].tr”

The filtered file would be like this:

What’s Your Editing Like?

Send us your draft and tell us your goals—we’ll refine it, tightening arguments and boosting clarity while keeping your unique voice intact. Our editors work fast, delivering pro-level results that make your paper pop, whether it’s a light touch-up or a deeper rework.

Now we’ve to give a plot for which our graph is to be ploted. (i.e: we’ve to tell about the x and y coordinates)

So we create a simple file in which we tell about these parameters.

set title ‘VoIP over UDP – Latency!’

set grid

set ylabel ‘s’

Can You Pick My Topic?

Yes—we’ve got your back! We’ll brainstorm fresh, workable ideas tailored to your assignment, picking ones that spark interest and fit the scope. You choose the winner, and we’ll turn it into a standout paper that’s all yours.

set xlabel ‘time’

plot ‘latency’ w linespoints title ‘voip throughput’

Now type “gnuplot” in the terminal to enter into gnuplot mode.

Here type the command: “load “[x-y parameters file]”” (inner double quotes inclusive)

And type “exit” to exit gnuplot

Formation of VOIP Traffic over the Network:

VoIP (Voice over IP) is simply the transmission of voice traffic over IP-based networks. The Internet Protocol (IP) was originally designed for data networking.  It is also referred to as IP Telephony or Internet Telephony.

Simulating VOIP in NS2:

VoIP is basically just UDP packets encapsulating RTP packets with the voice data inside, all you should need to do to simulate a VoIP stream is set the correct packet size and frequency that the packets are sent out and that would simulate a stream.

Do You Do Quick Revisions?

Yep—need changes fast? We’ll jump on your paper and polish it up in hours, fixing whatever needs tweaking so it’s ready to submit with zero stress. Just let us know what’s off, and we’ll make it right, pronto.

In NS2 we will implement VOIP over UDP and SCTP protocols. We will implement VOIP using a simple two-node topology. For this we will do the following steps:

create two .tcl files

simulate VOIP traffic

handle the trace files to draw graphs for latency and throughput for evaluation between the two protocols

Simulation of VoIP over the network using UDP:

Creating the tcl file:-

First create a tcl file for Voip simulation over UDP protocol.

Given below is the source code for our file voip_udp.tcl

# start new simulation

set ns [new Simulator]

# setup tracing/nam

Can You Outline First?

Sure thing! We’ll whip up a clear outline to map out your paper’s flow—key points, structure, all of it—so you can sign off before we dive in. It’s a handy way to keep everything aligned with your vision from the start.

set tr [open voip.tr w]

set nf [open voip.nam w]

$ns trace-all $tr

$ns namtrace-all $nf

# finish function, close all trace files and open up nam

proc finish {} {

global ns nf tr

$ns flush-trace

Can You Add Data or Graphs?

Absolutely—we’ll weave in sharp analysis or eye-catching visuals like stats and charts to level up your paper. Whether it’s crunching numbers or designing a graph, our writers make it professional and impactful, tailored to your topic.

close $nf

close $tr

exec nam voip.nam &

exit 0

}

### creating nodes

set node0 [$ns node]

$node0 label “Voice 1”

$node0 color red

set node1 [$ns node]

$node1 label “Voice 2”

How Do You Manage Big Projects?

We tackle each chunk with precision, keeping quality consistent and deadlines on track from start to finish. Whether it’s a dissertation or a multi-part essay, we stay in sync with you, delivering top-notch work every step of the way.

$node1 color blue

# creating duplex-link

$ns duplex-link $node0 $node1 256Kb 50ms DropTail

$ns duplex-link-op $node0 $node1 orient right

# setup colors

Do You Follow Global Academic Rules?

Yes—we’ve got it down! Our writers switch seamlessly between UK, US, Australian, or any other standards, matching your school’s exact expectations. Your paper will feel native to your system, polished and ready for wherever you’re studying.

$ns color 1 Yellow

$ns color 2 Green

## 2-way VoIP connection

#Create a UDP agent and attach it to node0

set udp0 [new Agent/UDP]

What is a progressive delivery and how does it work?

Progressive delivery is a cool option where we send your paper in chunks—perfect for big projects like theses or dissertations. You can even pay for it in installments. It’s just 10% extra on your order price, but the perks are worth it. You’ll stay in closer touch with your writer and can give feedback on each part before they move to the next. That way, you’re in the driver’s seat, making sure everything lines up with what you need. It saves time too—your writer can tweak things based on your notes without having to redo huge sections later.

$ns attach-agent $node0 $udp0

# set udp0 flowid to 1

$udp0 set fid_ 1

# Create a CBR traffic source and attach it to udp0

I received some comments from my teacher. Can you help me with them?

Absolutely! If your teacher’s got feedback, you can request a free revision within 7 days of approving your paper—just hit the revision request button on your personal order page. Want a different writer to take a crack at it? You can ask for that too, though we might need an extra 12 hours to line someone up. After that 7-day window, free revisions wrap up, but you can still go for a paid minor or major revision (details are on your order page). What if I’m not satisfied with my order? If your paper needs some tweaks, you’ve got that free 7-day revision window after approval—just use the “Revision” button on your page. Once those 7 days are up, paid revision options kick in, and the cost depends on how much needs fixing. Chat with our support team to figure out the best way forward. If you feel the writer missed the mark on your instructions and the quality’s off, let us know—we’ll dig in and sort it out. If revisions don’t cut it, you can ask for a refund. Our dispute team will look into it and figure out what we can offer. Check out our money-back guarantee page for the full scoop.

set cbr0 [new Application/Traffic/CBR]

$cbr0 set packetSize_ 128

$cbr0 set interval_ 0.020

# set traffic class to 1

$cbr0 set class_ 1

$cbr0 attach-agent $udp0

# Create a Null sink to receive UDP

set sinknode1 [new Agent/LossMonitor]

$ns attach-agent $node1 $sinknode1

# Connect the UDP traffic source to Null sink

$ns connect $udp0 $sinknode1

set udp1 [new Agent/UDP]

$ns attach-agent $node1 $udp1

$udp1 set fid_ 2

set cbr1 [new Application/Traffic/CBR]

$cbr1 set packetSize_ 128

$cbr1 set interval_ 0.020

$cbr1 set class_ 2

$cbr1 attach-agent $udp1

set sinknode0 [new Agent/LossMonitor]

$ns attach-agent $node0 $sinknode0

$ns connect $udp1 $sinknode0

# end of voice simulation setup

# start up traffic

$ns at 0.1 “$cbr0 start”

$ns at 0.1 “$cbr1 start”

$ns at 10.0 “$cbr0 stop”

$ns at 10.0 “$cbr1 stop”

$ns at 10.5 “finish”

# run the simulation

$ns run

Simulate VOIP traffic:

Now type the following command in the terminal to view simulation of VOIP over UDP: “ns voip_udp.tcl”

The output is:

Performance of SCTP:

Now we draw the graphs with gnuplot using above mentioned steps. The performance is evaluated on the basis of latency, throughput and capacity.

The capacity can be evaluated with the help of latency and throughput.

Latency:

Throughput:

Simulation of VoIP over the network using SCTP:

Creating the tcl file:-

First create a tcl file for Voip simulation over UDP protocol.

Given below is the source code for our file voip_sctp.tcl

# start new simulation

set ns [new Simulator]

# setup tracing/nam

set tr [open voip.tr w]

set nf [open voip.nam w]

$ns trace-all $tr

$ns namtrace-all $nf

# finish function, close all trace files and open up nam

proc finish {} {

global ns nf tr

$ns flush-trace

close $nf

close $tr

exec nam voip.nam &

exit 0

}

### creating nodes

set n0 [$ns node]

$n0 label “Voice 1”

$n0 color red

set n1 [$ns node]

$n1 label “Voice 2”

$n1 color blue

# creating duplex-link

$ns duplex-link $n0 $n1 256Kb 50ms DropTail

$ns duplex-link-op $n0 $n1 orient right

# setup colors

$ns color 1 Yellow

$ns color 2 Green

## 2-way VoIP connection

#Create a UDP agent and attach it to n0

set sctp0 [new Agent/SCTP]

$ns attach-agent $n0 $sctp0

$sctp0 set fid_ 1

set cbr0 [new Application/Traffic/CBR]

$cbr0 set packetSize_ 128

$cbr0 set interval_ 0.020

# set traffic class to 1

$cbr0 set class_ 1

$cbr0 attach-agent $sctp0

# Create a Null sink to receive Data

set sinknode1 [new Agent/LossMonitor]

$ns attach-agent $n1 $sinknode1

set sctp1 [new Agent/SCTP]

$ns attach-agent $n1 $sctp1

$sctp1 set fid_ 2

set cbr1 [new Application/Traffic/CBR]

$cbr1 set packetSize_ 128

$cbr1 set interval_ 0.020

$cbr1 set class_ 2

$cbr1 attach-agent $sctp1

set sinknode0 [new Agent/LossMonitor]

$ns attach-agent $n0 $sinknode0

$ns connect $sctp0 $sctp1

$ns at 0.1 “$cbr0 start”

$ns at 0.1 “$cbr1 start”

# stop up traffic

$ns at 10.0 “$cbr0 stop”

$ns at 10.0 “$cbr1 stop”

# finish simulation

$ns at 10.5 “finish”

# run the simulation

$ns run

Simulate VOIP traffic:

Now type the following command in the terminal to view simulation of VOIP over UDP: “ns voip_sctp.tcl”

The output is:

Performance of SCTP:

Now we draw the graphs with gnuplot using above mentioned steps. The performance is evaluated on the basis of latency, throughput and capacity.

The capacity can be evaluated with the help of latency and throughput.

Latency:

Throughput:

Difference between SCTP and UDP:

SCTP:

SCTP Stands for Stream Control Transmission Protocol. It is a Transport Layer protocol. It is a connection-oriented protocol similar to TCP, but provides facilities such as multi-streaming and multi-homing for better performance and redundancy. It is used in Unix-like operating systems.

UDP:

UDP stands for User Datagram Protocol. It is a minimal message-oriented transport layer protocol. It enables two hosts to connect and send short messages to one another. Unlike Transmission Control Protocol (TCP), it does not guarantee that data is received or that it is received in the order in which it was sent.

Comparison between SCTP and UDP:

Message Orientation:

In SCTP, message boundaries are preserved. If an application sends a 100-byte message, the peer application will receive all 100 bytes in a single read: no more, no less. UDP provides a message-oriented service, but without SCTP’s reliability.

Un-Ordered Service:

In addition to ordered message service (and parallel ordered service discussed above), SCTP offers the reliable delivery of messages with no order constraints. UDP provides unordered service, but again without SCTP’s reliability. Unordered reliable delivery will be useful for many applications, in particular disk over LAN services (iSCSI, RDMA, etc.) where the application already provides ordering.

Stronger checksum:

SCTP uses a 32-bit end-to-end checksum proven to be mathematically stronger than the 16-bit ones-complement sum used by UDP. SCTP’s better checksum provides stronger verification that a message passes end-to-end without bit errors going undetected.

These were some of the differences between SCTP and UDP. A tabulated contrast between the two protocols is given below:

Services/Features

SCTP

UDP

Connection-oriented

yes

no

Full duplex

yes

yes

Reliable data transfer

yes

no

Partial-reliable data transfer

optional

no

Ordered data delivery

yes

no

Unordered data delivery

yes

yes

Flow control

yes

no

Congestion control

yes

no

ECN capable

yes

no

Selective ACKs

yes

no

Preservation of message boundaries

yes

yes

Path MTU discovery

yes

no

Application PDU fragmentation

yes

no

Application PDU bundling

yes

no

Multistreaming

yes

no

Multihoming

yes

no

Protection against SYN flooding attacks

yes

n/a

Allows half-closed connections

no

n/a

Reachability check

yes

no

Psuedo-header for checksum

no (uses vtags)

yes

Time wait state

for vtags

n/a

SCTP vs. UDP

Latency:

From the graphs of latency we conclude that latency is slightly higher in UDP. In real practice, latency in UDP is much higher than in SCTP. Practically, the latency in UDP is about 15% more than SCTP.

Throughput:

From the graphs of throughput we see that UDP shows a constant but less throughput while SCTP shows continuous fluctuations in its graph. But overall SCTP has a higher throughput than UDP. In real practice, throughput in SCTP is about 15% more than in UDP.

Capacity:

By observing the graphs of throughput, we conclude the SCTP can support more capacity than UDP. UDP will loose its performance at higher data rates.

Conclusion:

From the above statistics, we conclude that SCTP is better than UDP in terms of latency, throughput and capacity. Therefore there is no doubt in the fact that that SCTP is going to be the future of VOIP and many other network technologies. But since this technology is under the process of evolution so it may take some time for it to replace the older technologies like UDP and TCP etc.

Refrences:

http://yonghoon.livejournal.com/4799.html

http://www.isoc.org/briefings/017/index.shtml

http://www.google.com/dictionary?source=dict-chrome-ex&sl=en&tl=en&q=sctp

http://www.google.com/dictionary?langpair=en|en&q=udp&hl=en&aq=f

http://mailman.isi.edu/pipermail/ns-users/2006-August/056723.html

http://books.google.com.pk/books?id=bF3L7g1u_mQC&pg=PA189&lpg=PA189&dq=udp+vs+sctp+latency+throughput&source=bl&ots=zdb5JeCsMf&sig=PPt8c4nvtcrIJcXr5eKBIe_GbkQ&hl=en&ei=XhIgTYCeLs-z8QO8_KS8BQ&sa=X&oi=book_result&ct=result&resnum=2&ved=0CB4Q6AEwAQ#v=onepage&q&f=true

Tags: Academic Paper Assistance, Affordable College Homework, APA Citation Assignment Help, Assignment Help Australia

Order|Paper Discounts

Why Choose Essay Bishops?

You Want The Best Grades and That’s What We Deliver

Top Essay Writers

Our top essay writers are handpicked for their degree qualification, talent and freelance know-how. Each one brings deep expertise in their chosen subjects and a solid track record in academic writing.

Affordable Prices

We offer the lowest possible pricing for each research paper while still providing the best writers;no compromise on quality. Our costs are fair and reasonable to college students compared to other custom writing services.

100% Plagiarism-Free

You’ll never get a paper from us with plagiarism or that robotic AI feel. We carefully research, write, cite and check every final draft before sending it your way.