Skip to main content

Posts

P2P network Simulation using NS3 | NS3 Tutorial

In this post, we are going to see how to define and design a p2p network between two wired nodes with a decent bandwidth and delay. Here is the problem statement.  NS3 will be used to simulate the network Tools required: NS3  Tracemetrics (for measuring throughput) NetAnim (for Animation) Gnuplot (for plotting the characteristics) Complete Instructions are available in the video  Problem Statement: Design two wired nodes that can connect to each other through a point-to-point network that handles a data rate of 50mbps and a delay of 5ms. The first node acts as a server and the second node acts as a client and they exchange at least 10 packets in a total simulation time of 20 seconds. The maximum packet size is 1024 bytes and 512 bytes. Plot the throughput of each node for the above packet sizes. (Use any charting solution you are comfortable with). NS3 already had this file in the name as first.cc which is located at  ~ns-3.38/examples/tutorial/ Copy the above file...

Netsimulyzer - a 3D visualizer for Network Simulator 3

Netsimulyzer - 3D visualizer Netsimulyzer is a third-party software that can show the visuals of the ns3 output in a 3D virtual world. we can make the nodes look either like land drones, drones, smartphones, etc. We can construct buildings, towers, antennas, etc within the visualizer and the movement of the nodes can be simulated as well.  Here is the screenshot of a simulation generated using ns3 and shown in the Netsimulyzer.  This post will help you to understand and install Netsimulyzer in Ubuntu 22.04 and add a module to support ns3 in generating the Netsimulyzer JSON file. Netsimulyzer Installing Netsimulyzer in Ubuntu and NS3 Prerequisites Ubuntu 22.04 OS ns-3.38 Netsimulyzer version 1.0.7  There are older versions also available for other distributions of ubuntu., but we will focus on these versions Steps for installation: ns-3.38 along with Netsimulyzer module to be installed. Netsimulyzer software to be installed on Ubuntu 22.04 (the software can be installed ...

Installation of ns3 in Ubuntu 22.04 | NS-3.38

Installation of ns3 in Ubuntu 22.04 In this post, we are going to install ns3.38 in Ubuntu 22.04 OS After the fresh installation of Ubuntu, perform the following command to run the updates  Prerequisites: Download ns-3.38 from the following link ( https://www.nsnam.org/releases/ns-allinone-3.38.tar.bz2 ) Fresh installation of Ubuntu 22.04  For complete instructions, follow the video Step 1:  Install the basic requirements Open a terminal and just copy and paste the following two lines into a terminal and install it. It will take some time to complete the full process. $ sudo apt update $ sudo apt install g++ python3 cmake ninja-build git gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 tcpdump wireshark sqlite sqlite3 libsqlite3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools openmpi-bin openmpi-common openmpi-doc libopenmpi-dev doxygen graphviz imagemagick python3-sphinx dia imagemagick texlive dvipng latexmk texlive-extra...

SUMO Emission of Vehicles | VANETs

Emission of Gases by Vehicles using SUMO In this post, we will be discussing how floating cars can emit gases namely  Carbon Monoxide (CO) Carbon Dioxide (CO2) Hydro Carbons (HC) Particle Matter (PMx) Nitrous Oxide (NOx) SUMO generates this emission of gases based on the EU4 norms. How to capture these gases in our simulation?  The following video contains complete information Prerequisites 1. SUMO to be installed in Ubuntu  ( SUMO installation ) 2. Python3 to be installed 3. Knowledge of XML files The following is the image of the road design I have created,  there are a totally of 6 junctions ( 0 to 5) and two edges from one junction to another intersection (each edge has two lanes). All the junctions are priority junctions except 2 and 5. These junctions are traffic light junctions. Custom road design in SUMO We are going to design a custom road.  In our machine, I will store all the files in a folder called  /home/pradeepkumar/customroad Step 1: Creat...

How to write Publisher Subscriber in ROS Noetic | Step by Step instructions

ROS1 Noetic -Publisher and Subscriber Example This post tells about the implementation of a publisher and a subscriber in ROS Noetic.   In this example, we have considered the following: Example 1:  One publisher (pub.py) and one Subscriber (Sub.py) Topic: first_lecture Message: String Message  Example 2: Two publishers (pub.py and pub1.py) and Two subscribers (sub.py and sub1.py) Topic: first_lecture   See the following video for step by step instructions for running this example: The following picture shows the nodes (The picture is taken by running the rqt_graph command) Publisher Subscriber in ROS Noetic How to run in ROS Noetic Prerequsities  1. Ubuntu Basic commands 2. PATH Setting in Ubuntu 3. Basic knowledge of Linux  4. Programming fundamentals To Install ROS1 Noetic in Ubuntu 20.04, you can refer the following video in my channel. ROS is enabled with a catkin make system which perform the easier build operation and cross compilation enablemen...