Skip to main content

Instalasi ns-3 di ubuntu 22.04

Bahan
1. ubuntu 22.04
2. ns-3.36.1
Fyi: Sejak ns-3.36.1 perintah ./waf diganti menjadi ./ns3

Alat, bisa mnggunakan pc'laptop atau vmware yg sdh diinstall ubuntu 22.04.
1. PC/Laptop
2. VMware


Langkah instalasi:
1. $ cd ~ : memastikan posisi di home/user sendiri.

2. $sudo apt update  : update apt


3. $ sudo apt install g++ python3 python3-dev pkg-config sqlite3 cmake python3-setuptools git qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar gsl-bin libgsl-dev libgslcblas0 wireshark tcpdump sqlite sqlite3 libsqlite3-dev  libxml2 libxml2-dev libc6-dev libc6-dev-i386 libclang-dev llvm-dev automake python3-pip libxml2 libxml2-dev libboost-all-dev 

Download ns-allinone-3.36.1.tar.bz2
4. $ wget -c https://www.nsnam.org/releases/ns-allinone-3.36.1.tar.bz2 

Extract ns-allinone-3.36.1.tar.bz2
5. $ tar jxvf ns-allinone-3.36.1.tar.bz2


$ ./ns3 configure --enable-examples --enable-tests

Then, use ns3 to build ns-3:

$ ./ns3 build

Once complete, you can run the unit tests to check your build:

$ ./test.py

All tests should either PASS or be SKIPped. At this point, you have a working ns-3 simulator. From here, you can start to run programs (look in the examples directory). To run the first tutorial program, whose source code is located at examples/tutorial/first.cc, use ns3 to run it (by doing so, the ns-3 shared libraries are found automatically):

$ ./ns3 run first

+2s client sent 1024 bytes to 10.1.1.2 port 9
At time +2.00369s server received 1024 bytes from 10.1.1.1 port 49153
At time +2.00369s server sent 1024 bytes to 10.1.1.1 port 49153
At time +2.00737s client received 1024 bytes from 10.1.1.2 port 9


To view possible command-line options, specify the –PrintHelp argument:

$ ./ns3 run 'first --PrintHelp'

To continue reading about the conceptual model and architecture of ns-3, the tutorial chapter Conceptual Overview would be the next natural place to skip to, or you can learn more about the project and the various build options by continuing directly with the Introduction and Getting Started chapters.


   
7. mengintegrasikan python ke ns-3.36.1. The libraries should get built.

 $ cd ns-3.36.1/
  $./ns3 configure --enable-python-bindings

8. selesai dan sekarang di tes print "Hello Simulator"
    $ ./ns3 run hello-simulator
output:
Hello Simulator

9. Tes file simulasi bahasa C yaitu .cc dan file simulasi bahasa pyhton .py copy file first.cc dan first.py di folder /home/user/ns-allinone-3.36.1/ns-3.36.1/example/tutorial ke folder /home/user/ns-allinone-3.36.1/ns-3.36.1/scratch

9.a. cp -r first.cc /home/user/ns-allinone-3.36.1/ns-3.36.1/example/tutorial /home/user/ns-allinone-3.36.1/ns-3.36.1/scratch

 
9.b.
cp -r first.py /home/user/ns-allinone-3.36.1/ns-3.36.1/example/tutorial /home/user/ns-allinone-3.36.1/ns-3.36.1/scratch

 
10. Tes file .cc
    
$ ./ns3 run scratch/first

Output:
At time +2s client sent 1024 bytes to 10.1.1.2 port 9
At time +2.00369s server received 1024 bytes from 10.1.1.1 port 49153
At time +2.00369s server sent 1024 bytes to 10.1.1.1 port 49153
At time +2.00737s client received 1024 bytes from 10.1.1.2 port 9


11. Tes file .py
     $ ./ns3 run scratch/first.py
Output:
At time +2s client sent 1024 bytes to 10.1.1.2 port 9
At time +2.00369s server received 1024 bytes from 10.1.1.1 port 49153
At time +2.00369s server sent 1024 bytes to 10.1.1.1 port 49153
At time +2.00737s client received 1024 bytes from 10.1.1.2 port 9


jika first.py tidak berhasil, ganti versi cppyy dari 3.0 ke cppyy 2.4.2

$python3 -m pip install --user cppyy==2.4.2
$./ns3 configure --enable-python-bindings 

 

Install NetAnim

NetAnim, otomatis sudah terinstall saat melakukan instalasi langkah ke 1. 

namun kalo gak bisa, coba lakukan hal ini.

1. masuk ke folder netanim

2. ketikan CLI

$make clean

$qmake NetAnim.pro

$make

Kemudian masuk ke aplikasi netanim 

arie@RV:~/Downloads/ns-allinone-3.36.1/netanim-3.108$ ./NetAnim
 


Salam,
Arie Budiansyah


Comments

Popular posts from this blog

Masalah Deassigned assigned hotspot mikrotik

Tiba-tiba dapat masalah user hotspot terputus dari jaringan dan otomatis internet terputus.  kemudian dilakukan pengcekan log dan didapatkan log mencurigakan dhcp1 deassigned .. dhcp1 assigned ... dhcp1 deassigned .. dhcp1 assigned ... dhcp1 deassigned .. dhcp1 assigned ... dan jumlahnya sangat banyak. Identifikasi dhcp1 adalah proses dhcp server meminjamkan (assigned) dan menarik kembali (deassigned) ip address ke perangkat di jaringan. setingnya di /ip dhcp server dengan mengacukan pada /ip pool dhcp_pool0 . TAPI hotspot mikrotik juga mengacu ke pool yang sama di /ip hotspot address-pool . Solusi: disable-kan dhcp server di hotspot. caranya masuk ke  /ip hotspot address-pool seting ke none. Sumber: https://forum.mikrotik.com/viewtopic.php?t=49054 Salam, Arie B. 

Merubah Akun Default SUPERUSER ( telcomadmin dan Support ) Pada Modem Huawei HG8245A Indihome

Tujuan merubah akun default modem huawei hg8245a ini adalah untuk melindungi modem dari tangan-tangan jahil yang mau merubah setingan modem. Klo modem ini digunakan di cafee, tentu yang terjadi adalah ketidaknyamanan menggunakan internet di cafe/warkop tersebut. Ok langsung saja, jadi perlu diketahui bahwasannya modem ini bisa diakses melalui IP 192.168.100.1 dan memiliki akun default yaitu: username: telecomadmin | password: admintelecom atau username: Support | password: theworldinyourhand Nah, coba saja salah satu akun diatas, insyaAllah bisa masuk dan mendapat akses SUPERUSER. Para teknisi telkom menggunakan akun ini untuk menseting modem-modem pelanggan tanpa perlu menanyakan password modem. Kedua akun diatas derajatnya lebih tinggi dibanding akun default yang tertulis di belakang modem, yang biasanya:  username: Admin | password: admin Baik, saya akan mejelaskan cara-cara merubah kedua akun default SUPERUSER tersebut. 1. Masuk ke modem HG8245A melalui web. biasanya be

Block iklan Ads melalui MikroTik

Assalamuallaikum Wr. Wb. bagi saudaraku muslim yang berkunjung ke blog ini. Salam dari banda aceh, prov terujung di pulau sumatera, satu-satu nya daerah/wilayah yang diberi kewenangan menjalankan syariat islam bagi pemeluknya. Ok, kali ini saya ingin mendokumentasikan teknis pemblokiran iklan atau ads yang sering sekali muncul ketika mengakses internet. Iklan atau ads ini bisa muncul ketika mengakses suatu website seperti detik.com, kompas.com, youtube.com atau ads yang muncul sebelum video streaming yang benar memutar. Ads ini tentu menganggu kenyamanan ketika surfing di internet dan juga membebani trafik jaringan karena ter-download ke jaringan lokal hingga masuk ke perangkat user. Ads bagi sebagian orang adalah income karena mereka berburu mendapatkan ads dari provider ads seperti google, youtube, yahoo dan sebagainnya. Namun bagi sebagian lain, mayoritas, ads mengganggu kenyamanan surfing internet dan beban trafik jaringan lokal. OK, adapun cara pemblokiran ads