Empirical Study on NS3 Online Simulator

What is ns3? NS-3 is a network simulator that uses C++ and Python to simulate network protocols and real-life implementations taken directly from the Linux kernel among other application areas. Strong points are its accurate representation of flat packets, good emulation, and socket support, PCAP output that enables analyses with other tools like Wireshark, and good community support.

Simulating a Computer Network in NS3

The NS3 online simulator is developed and distributed completely in the C++programming language. To construct a simulation using ns–3, the user writes a C++main program that constructs the various elements needed to describe the communication network being simulated and the network activity desired for that network. The program is then compiled, and linked with the library of network models distributed with ns–3.In writing the C++simulation program, there are four basic steps to perform:

  • Create the network topology: This consists of instantiating C++objects for the nodes, devices, channels, and network protocols that are being modelled in the simulation.
  • Create the data demand on the network: This consists of creating simulation models of various network applications that send and receive information from a network, and cause packets to be either created or accepted and processed.
  • Execute the simulation: Typically, this results in the simulator entering the main event loop, which reads and removes events in timestamp order from the sorted event data structure described earlier. This process repeats continually until either the event list becomes empty, or a predetermined stop time has been reached.
  • Analyze the results: This is typically done by post-analysis of the trace information produced by the ns–3program execution. The trace files will usually have enough information to compute average link utilization on the communication channels in the simulation, average queue sizes at the various queue, and drop rate in the queues, just to name a few. Using the optional pcap trace format, any of the various publicly available tools for analysing pcap traces can be used.

DDoS Simulation in NS3 Online Simulator

  • Creating Base Model: The base model for this attack is relatively simple: We have 3 main nodes Legitimate Client, Server Application, and a connecting node. Now we will add as many bots as we want to attack the network and let’s call them Mallory. The bots will flood Dave to produce network congestion from client to server. This will result in extended communication delay between clients to server and eventually deny the resource for the client.
  • Connection between nodes: We can use the point-to-point-helper class to connect different nodes and then install the P2P device in the nodes to connect them. One thing to keep in mind here is that our numbers of bots are dynamic and we don’t want the user to change the whole algorithm when changing the number so we can use simple for loop for P2P installation in the bots.

Assignment of IP Address and Internet Stack

In this case, we are using the IPv4 Address for our nodes and can be set up by the ipv4-helper class. This will connect our devices to a virtual internet stack.

Installing Attacker Application in bots: Now we want to install applications in our nodes so that they can communicate with their neighbors. Let’s create an attacker application. Installing Attacker Application in bots. Now we want to install applications in our nodes so that they can communicate with their neighbors. Let’s create an attacker application by using the NS3 Online Simulator Source Code. Then we can install the application in each bot node by using the NS3 Examples source code .

Client Application: Now the client also needs an application stack to simulate communication from the server. We will use BulkTCP connection for this purpose simulation of some large file transfers for resource requests.

Online NS3 Simulator Projects with source code

NS-3 based Named Data Networking (NDN)

A new release of NS-3 based Named Data Networking (NDN) simulator went through a number of extensive refactoring and rewriting. The key new features of the new version:

  • Packet format changed to the NDN packet format
  • ndnSIM uses an implementation of basic NDN primitives from ndn-cxx library (NDN C++ library with eXperimental eXtensions)
  • All NDN forwarding and management is implemented directly using source code of Named Data Networking Forwarding Daemon (NFD)
  • It is possible to simulate some real applications written against ndn-cxx library ndnSIM applications
  • ConsumerCbr: ConsumerCbr is an application that generates Interest traffic with a predefined pattern (constant frequency, constant average rate with inter-Interest gap distributed uniformly at random, exponentially at random, etc.). This application has the following attributes:
    • Frequency à Either exact (for content version) or expected (for randomized version) frequency with which Interests are generated ns3 online simulator
    • Randomize à Specify whether to do randomization for an inter-Interest gap or not.
  • ConsumerZipfMandelbrot : An app that requests contents (names in the requests) following Zipf-Mandelbrot distribution (number of Content frequency Distribution). This class is a subclass of ConsumerCbr. Frequency and Randomized attributes can be used in the same way as in the base ConsumerCbr applications. Additional attributes:
    • NumberOfContents à Number of different content (sequence numbers) that will be requested by the applications
  • ConsumerBatches: Consumer Batches is an on-off-style application generating a specified number of Interests at specified points of simulation. This application has the following attributes:
    • Batches à Specify exact pattern of Interest packets, specifying when and how many Interest packets should be sent.
  • ConsumerWindow
    • Consumer Window is an application generating variable-rate Interest traffic. It implements a simple sliding-window-based Interest generation mechanism. This application has the following attributes:
    • Initial number of Interests that will be sent out without waiting for the data (number of outstanding Interests)
    • Expected size of the Data payload (necessary only when Size is specified)
    • Size Amount of data to be requested (will stop issuing Interests after Size data is received)

NS3 Online Simulator Project Titles

  1. Joint Optimal Multicast Scheduling and Caching for Improved Performance and Energy Saving in Wireless Heterogeneous Networks
  2. Quaternion-Valued Twin-Multistate Hopfield Neural Networks With Dual Connections
  3. Multi-Rate Data Fusion for Wireless Sensor Networks with Time-Delay Based on Improved Cubature Kalman Filter
  4. Provisioning Optimization for Determining and Embedding 5G NS3 End-to-End Information-Centric Network Slice
  5. Wireless Mesh Video Based on Neural Network in Cloud Edge Collaborative Management and Control Software