Posts

Showing posts with the label ns-3

Procedures to writing script in ns3

Image
Including necessary files Use appropriate namespace Set simulation time resolution Enable logging for different modules Creating codes Create net devices with MAC and PHY Attach Net devices to nodes and set interconnections Install protocol stack in nodes Set network address for interfaces Setup routing Install applications in nodes Setup tracing Set application start and stop time Set simulation start time Run simulation Release resources at end of the simulation source:  https://ns3tutorial.com/ns3-tutorial/ This is a checklist of the steps for writing a simulation script in ns-3, the discrete event network simulator, from including headers and setting the time resolution to creating nodes and devices and installing the protocol stack. Following the steps in order matters because each stage depends on the previous one, for example installing the internet stack before assigning addresses. It is a helpful map when starting a new ns-3 scenario.

Install ns-3.32 on Ubuntu 20.04

Image
  $ sudo apt-get update $ sudo apt-get upgrade $ sudo add-apt-repository ppa:rock-core/qt4 $ sudo apt update $ sudo apt upgrade $ sudo apt-get install gcc g++ python python-dev libgtk-3-dev wireshark gnuplot $ sudo apt install qt4-dev-tools libqt4-dev $ sudo apt install libqtcore4 libqtgui4 $ sudo apt install doxygen valgrind sqlite3 $ sudo apt-get install libgsl-dev $ sudo apt-get install pkg-config $ sudo apt-get install graphviz $ sudo apt-get install libgcrypt20-dev $ sudo apt-get install lldpd snmp $ sudo apt-get install dpdk-dev libdpdk-dev dpdk $ sudo apt-get install castxml $ sudo apt-get install mpi $ pip3 install pygccxml $ pip3 install graphviz $ pip3 install kiwi download https://www.nsnam.org/releases/ns-3-32/ $ tar xjf ns-allinone-3.32.tar.bz2 $ cd ns-allinone-3.32 $ cd ns-3.32 $ export CPPFLAGS="-Wno-error" $ ./waf configure --enable-examples --enable-tests $ ./waf build This is a step by step recipe for installing ns-3.32, the network simulator, on Ubuntu 20...