ArticleslgStudy

computer science

Ns (simulator)

Ns (simulator) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Ns (simulator) rather than just read about it. In short: ns (from network simulator) is a name for a series of discrete event network simulators, specifically ns-1, ns-2, and ns-3. All are discrete-event computer network simulators, primarily used in research and teaching.

Key takeaways

  • Ns (simulator) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Ns (simulator) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Ns (simulator) from memory before moving on to harder problems.

Reference excerpt

ns (from network simulator) is a name for a series of discrete event network simulators, specifically ns-1, ns-2, and ns-3. All are discrete-event computer network simulators, primarily used in research and teaching.

History

ns-1 The first version of ns, known as ns-1, was developed at Lawrence Berkeley National Laboratory (LBNL) in the 1995-97 timeframe by Steve McCanne, Sally Floyd, Kevin Fall, and other contributors. This was known as the LBNL Network Simulator, and derived in 1989 from an earlier simulator known as REAL by S. Keshav.

ns-2 Ns-2 began as a revision of ns-1. From 1997 to 2000, ns development was supported by DARPA through the VINT project at LBL, Xerox PARC, UC Berkeley, and USC/ISI. In 2000, ns-2 development was supported through DARPA with SAMAN and through NSF with CONSER, both at USC/ISI, in collaboration with other researchers including ACIRI.

Features of NS2 support to simulate several protocols like TCP, FTP, UDP, https, and DSR simulates wired and wireless networks Uses TCL as its scripting language Otcl: Object-oriented support Tclcl: C++ and otcl linkage Ns-2 incorporates substantial contributions from third parties, including wireless code from the UCB Daedelus and CMU Monarch projects and Sun Microsystems.

ns-3 In 2005, a team led by Tom Henderson, George Riley, Sally Floyd, and Sumit Roy, applied for and received funding from the U.S. National Science Foundation (NSF) to build a replacement for ns-2, called ns-3. This team collaborated with the Planete project of INRIA at Sophia Antipolis, with Mathieu Lacage as the software lead, and formed a new open source project. In the process of developing ns-3, it was decided to completely abandon backward-compatibility with ns-2. The new simulator would be written from scratch, using the C++ programming language. Development of ns-3 began in July 2006. Current status of the three versions is:

ns-1 development stopped when ns-2 was founded. It is no longer developed nor maintained. ns-2 development stopped around 2010. It is no longer developed nor maintained. ns-3 is actively being developed and maintained.

Design of ns-3 ns-3 is a discrete-event network simulator, sometimes called a 'system simulator' in contrast to a 'link simulator' that models an individual communications link in more detail. ns-3 is written in C++ and compiled into a set of shared libraries that are linked by executable programs that describe the desired simulation topology and configuration. Python bindings are optionally provided using cppyy, allowing users to write simulation programs in Python. The ns-3 simulator features an integrated attribute-based system to manage default and per-instance values for simulation parameters.

Requirements for ns-3 To build ns-3, you need a computer with a C++ compiler, Python, and the CMake build system. Simple scenarios should run on typical home or office computers, but very large scenarios benefit from large amounts of memory and faster CPUs. The project provides an installation guide that details the requirements, and a tutorial on how to get started.

Simulation workflow The general process of creating a simulation using either ns-2 or ns-3 can be divided into several steps:

Topology definition: To ease the creation of basic facilities and define their interrelationships, ns-3 has a system of containers and helpers that facilitates this process. Model development: Models are added to simulation (for example, UDP, IPv4, point-to-point devices and links, applications); most of the time this is done using helpers. Node and link configuration: models set their default values (for example, the size of packets sent by an application or MTU of a point-to-point link); most of the time this is done using the attribute system. Execution: Simulation facilities generate events, data requested by the user is logged. Performance analysis: After the simulation is finished and data is available as a time-stamped event trace. This data can then be statistically analysed with tools like R to draw conclusions. Graphical Visualization: Raw or processed data collected in a simulation can be graphed using tools like Gnuplot, matplotlib or XGRAPH.

See also GloMoSim

References

External links ns-3 webpage

Worked examples

Example 1 — a first encounter with Ns (simulator)

Start with the simplest possible case. Write down what Ns (simulator) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Ns (simulator) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Ns (simulator) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Ns (simulator)

In research
Ns (simulator) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Ns (simulator) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Ns (simulator) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer network analysis, Computer networking, Free software programmed in C++, so understanding it makes those chapters shorter.
In everyday life
Look for Ns (simulator) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Ns (simulator)” →

How to study Ns (simulator) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Ns (simulator) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Ns (simulator) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Ns (simulator) in simple terms?

ns (from network simulator) is a name for a series of discrete event network simulators, specifically ns-1, ns-2, and ns-3. All are discrete-event computer network simulators, primarily used in research and teaching.

Why does Ns (simulator) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Ns (simulator)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Ns (simulator).

Tags

  • Computer network analysis
  • Computer networking
  • Free software programmed in C++
  • Simulation software
  • Software using the GNU General Public License
  • Telecommunications engineering

Keep exploring