## Modelling NS3 Project with Source Code

What is ns3? The NS-3 aims to create an open simulation platform for the networking research community. It focuses on creating a platform to simulate modern networking systems. The ns3 create discrete event simulations, in which the processes/steps of simulations are stored as discrete events, which are executed one after the other in NS3 Project, thereby triggering future events in the simulation.

## Models of NS3 Project

To recreate the environmental conditions of real life, the NS3 Online simulator provides a large number of mathematical models which reproduce some expected behavior. The following are some of the mathematical models of NS3 Project which will be used in the experimental section and are described below:

Mobility Model

The mobility model helps in assigning positions to the nodes in an experiment. They also provide the flexibility to change the position of the node (make the node mobile) at different instances of time. The mobility model used in the experiments is the “ConstantPositionMobilityModel” of the NS-3. This model indicates that the positions of the nodes are fixed and the nodes are immobile physically. The “ConstantPositionMobilityModel” is used to create a grid structure.

Propagation Delay Model

The propagation delay models run in coherence with the mobility model. The propagation delay model help in including the delay in communication when there is mobility in the network and relative motions have to be considered for the delays. Since the experiments which shall be conducted are on fixed position nodes, thereby the “ConstantSpeedPropagationDelayModel” is used.

Propagation Loss Model

The propagation loss models account for the effects of sources of certain interference in the environment, such as scattering, reflection, diffraction, etc. This is important from the aspect of every variable environmental condition in the network including the behavior of the antennas, transmission range, etc. In the experiments we use the “FriisPropagationLossModel” in collaboration with the “NakagamiPropagationLossModel”. These two models help in accounting for sufficient effects of environments to obtain reliable data to infer strong opinions on the behavior of the network.

Seeds and Runs:

In NS-3 the randomization factor is provided by the concepts of seeds and runs. A seed is a set of random numbers whose value is equally distributed in the entire set, a run is a subdivision of seed in which every run consists of distinct and non-overlapping values. The seeds can be used for time-based or event-based random number utilization functions.

### Components in NS3 Project

The environment contains the following abstract components,

Node Container

The number of nodes required for a simulation is created and placed into a logical container called the node container. The node container technically holds pointers to the nodes, and any operation to a group of nodes can be performed by placing them under the same node container. The nodes consist of NetDevices, Interfaces, and Sockets for communication.

• NetDevice Container:

The NetDevice is the logical equivalent of a real-life network interface card. In NS-3 the netdevice is associated with the MAC and PHY layers. By installing the specific MAC and PHY protocols, the devices are assigned MAC addresses. Required netdevices can be placed under the common container called the NetDevice container.

• Interface Containers

The interfaces are of two types, IPv4 and IPv6. Each of these interfaces indicates the version of the internet protocol which shall be used by the specific Net-Device. Therefore, for every NetDevice from the NetDevice container, an interface is added. Then based on the type of interface, corresponding addresses are added, i.e. IPv4 or IPv6 address. Then the interface is moved to a container of similar types i.e. the NetDevices using IPv4 interfaces can be moved into a single interface container and the same applies to IPv6 interfaces.

• Helper Functions:

The helper functions, as the name indicates are indeed useful in simplifying a lot of complex steps in creating a communication stack in implementing ns3 project. The helper functions, assist in associating specific net device pointers with node pointers, assigning MAC addresses, creating interfaces to specific NetDevice, and assigning the IP addresses correspondingly, creating the unique pair of interface pointer and interface index, etc. Most of the functionality is done automatically, but manual configuration is also at the disposal of the user, such as assigning manual MAC and IPv6 addresses.

#### Efficient Energy Consumption by REB-R Protocol for WSN

One of the important goals of designing a routing algorithm is to manage the power consumption in a sensor network. Since the most important consumption area in routing is the use of signals and antennas. Our system proposes an energy-efficient routing protocol known as Remaining energy-based routing (REB-R). The concept of REB-R is to broadcast the energy remaining alongside the data inside packet data without calculating a parameter, following the remaining energy and broadcasting it.

##### Linear and Remainder Packet Marking for Fast IP Trace Back

These DDos attacks have become highly distributed as well as increasingly sophisticated. Even if the net sum of these attacking packets is enough to overrule the capacity of victim resources, the number of packets originating from individual sources is not that high in ns3 project. So to get an optimal traceback scheme, it must require a minimal number of packets from the attacker to perform an IP traceback. So our system proposes an efficient packet marking scheme also known as the linear packet marking scheme (LPM) that needs several packets equal to the hop distance between the victim and the attacker that is lower than 31. Also, our system proposes a more random version of LPM known as the Remainder packet marking (RPM). Even though RPM requires a bit more number packets for traceback as compared to LPM, well it’s more robust to other kinds of attacks that may affect LPM.

## Top 5 NS3 Project Research Topics

1. Joint Resource Allocation and Model Selection for Device-to-Device Communication Underlying Cellular Network
2. Resource Allocation Scheme for Guarantee of QoS in D2D Communications Using Deep Neural Network
3. Distributed Algorithm Design for Resource Allocation Problems of High-Order Multiagent Systems
4. NOMA-based Radio Resource Allocation for Machine-Type Communications in 5G and Beyond Cellular Networks
5. Performance Evaluation of Controller-Based SDN Network Over Non-controller Based Network in Data Center Network