This shows you the differences between two versions of the page.
isrm:laboratoare:new:04 [2020/05/05 22:18] vlad.traista [[04] Capacitatea ideală simulare UDP/TCP multiple uplink] |
isrm:laboratoare:new:04 [2024/03/19 09:04] (current) mbarbulescu [[00] Pregătire laborator] |
||
---|---|---|---|
Line 14: | Line 14: | ||
====== [00] Pregătire laborator ====== | ====== [00] Pregătire laborator ====== | ||
- | Intrați în directorul ''/home/student/Desktop/ISRM/ns-3-dev''. Rulați comenzile: | ||
+ | <note important> | ||
+ | Pe [[:isrm:mv|mașina virtuală]] aveți tot ce trebuie în ''/home/student/ns-3-dev''. | ||
+ | |||
+ | Dacă lucrați pe alt dispozitiv trebuie să rulați comenzile: | ||
<code bash> | <code bash> | ||
- | git remote add isrm https://gitlab.com/b12mihai1/ns-3-dev.git | + | student@isrm-vm-2020:~$ git clone https://gitlab.com/nsnam/ns-3-dev.git |
- | git remote update | + | student@isrm-vm-2020:~$ cd ~/ns-3-dev |
- | git checkout -b isrm_2020 remotes/isrm/isrm_2020 | + | student@isrm-vm-2020:~/ns-3-dev$ git checkout -b ns-332-rel ns-3.32 |
- | git submodule init | + | student@isrm-vm-2020:~$ cd ~/ns-3-dev/examples |
- | git submodule update --remote --merge | + | student@isrm-vm-2020:~/ns-3-dev/examples$ git clone https://github.com/isrm-lab/ns3-labs.git |
- | git submodule foreach git pull origin master # in caz ca cea anterioara nu ne muta pe ultimul commit din master | + | student@isrm-vm-2020:~$ cd ~/ns-3-dev |
+ | student@isrm-vm-2020:~$ ./waf configure --build-profile=debug --enable-examples --enable-tests | ||
+ | student@isrm-vm-2020:~$ ./waf build -j4 | ||
</code> | </code> | ||
+ | </note> | ||
- | Dacă directorul nu există rulați comenzile de mai jos și țineți minte unde aveți ''ns-3-dev'' folder cu toate lucrurile compilate: | + | Pentru a lansa aplicatia de Jupyter Notebook, rulati urmatoarea comanda: |
<code bash> | <code bash> | ||
- | git clone https://gitlab.com/b12mihai1/ns-3-dev.git ~/ns-3-dev | + | student@isrm-vm-2020:~$ jupyter-notebook |
- | cd ~/ns-3-dev | + | |
- | git checkout -b isrm_2020 remotes/origin/isrm_2020 | + | |
- | git submodule init | + | |
- | git submodule update --remote --merge | + | |
- | git submodule foreach git pull origin master | + | |
- | ./waf configure --build-profile=debug --enable-examples --enable-tests && ./waf build -j4 | + | |
</code> | </code> | ||
- | Pentru a realiza grafice, trebuie sa instalam si pachetele de Python: | + | Pe parcursul laboratorului, vom avea nevoie de utilitarul ''tshark'': |
<code bash> | <code bash> | ||
- | student@isrm-vm-2020:~$ sudo apt-get update | + | student@isrm-vm-2020:~$ sudo apt-get install tshark |
- | student@isrm-vm-2020:~$ sudo apt-get install python3-pip | + | |
- | student@isrm-vm-2020:~$ pip3 install matplotlib jupyter | + | |
- | student@isrm-vm-2020:~$ sudo ln -s ~/.local/bin/jupyter-notebook /usr/bin/jupyter-notebook | + | |
</code> | </code> | ||
- | Pentru a lansa aplicatia de Jupyter Notebook, rulati urmatoarea comanda: | + | Daca sunt probleme cu plot-ul (in special in Windows Subsystem for Linux) mai e nevoie de acest pachet: |
<code bash> | <code bash> | ||
- | student@isrm-vm-2020:~$ jupyter-notebook | + | sudo apt install -y python3-tk |
</code> | </code> | ||
+ | ====== [01] Capacitatea ideală simulare UDP 2 noduri RTS/CTS ====== | ||
+ | |||
+ | Atentie trebuie rulat pentru 802.11b: | ||
- | Pe parcursul laboratorului, vom avea nevoie de utilitarul ''tshark'': | ||
<code bash> | <code bash> | ||
- | student@isrm-vm-2020:~$ sudo apt-get install tshark | + | sed -i 's/WIFI_PHY_STANDARD_80211g/WIFI_PHY_STANDARD_80211b/g' ./ns3-labs/lab-03-04-capacity/lab3.cc |
</code> | </code> | ||
- | ====== [01] Capacitatea ideală simulare UDP 2 noduri RTS/CTS ====== | ||
Re-rulați simularea de capacitate ideală trafic UDP cu 2 noduri activând RTS/CTS. | Re-rulați simularea de capacitate ideală trafic UDP cu 2 noduri activând RTS/CTS. | ||
Line 74: | Line 72: | ||
<code bash> | <code bash> | ||
- | for mcs in 1 2 3 4 | + | for mcs in 1 2 3 4; do |
- | do | + | for payload in 100 200 300 400; do |
- | for payload in 100 200 300 400 | + | |
- | do | + | |
./waf --run "lab3 --numberOfNodes=2 --payloadSize=$payload --offeredRate=11Mbps --phyRate=$mcs --simulationTime=2 --tracing=true --enableRtsCts=true" | ./waf --run "lab3 --numberOfNodes=2 --payloadSize=$payload --offeredRate=11Mbps --phyRate=$mcs --simulationTime=2 --tracing=true --enableRtsCts=true" | ||
done | done |