Differences

This shows you the differences between two versions of the page.

Link to this comparison view

isrm:laboratoare:new:02a [2024/10/09 09:48]
dragos.niculescu
isrm:laboratoare:new:02a [2024/10/16 09:04] (current)
dragos.niculescu
Line 33: Line 33:
  
 <code bash> <code bash>
-student@isrm-vm:​~/​ns3$ ./waf --run wifi-tcp+student@isrm-vm:​~/​ns3$ cd lab02 
 +student@isrm-vm:​lab02../ns3 run wifi-tcp ​--cwd .
 Waf: Entering directory `/​home/​student/​ns3/​build'​ Waf: Entering directory `/​home/​student/​ns3/​build'​
 Waf: Leaving directory `/​home/​student/​ns3/​build'​ Waf: Leaving directory `/​home/​student/​ns3/​build'​
Line 49: Line 50:
  
 <code bash> <code bash>
-student@isrm-vm:​~/ns3$ ./waf --run examples/​wireless/​wifi-tcp+student@isrm-vm:​lab02../ns3 run examples/​wireless/​wifi-tcp ​ --cwd .
 </​code>​ </​code>​
  
-Dacă vrem să transmitem parametrii în linia de comandă ​simulării ​(deoarece ''​wifi-tcp''​ suportă), o putem face cu ghilimele:+Această simulare are parametri expuși pe linia ei de comandă (nu a ns3): 
  
 <code bash> <code bash>
-student@isrm-vm:​~/ns3$ ./waf --run "​wifi-tcp --pcap --simulationTime=3"​+student@isrm-vm:​lab02../ns3 run "wifi-tcp --help" ​   
 +</​code>​ 
 + 
 +Dacă vrem să transmitem parametri în linia de comandă simulării, o putem face cu ghilimele:​ 
 + 
 +<code bash> 
 +student@isrm-vm:​lab02$ ../​ns3 ​run "​wifi-tcp --pcap --simulationTime=3" ​ --cwd .
 Waf: Entering directory `/​home/​student/​ns3/​build'​ Waf: Entering directory `/​home/​student/​ns3/​build'​
 Waf: Leaving directory `/​home/​student/​ns3/​build'​ Waf: Leaving directory `/​home/​student/​ns3/​build'​
Line 71: Line 78:
  
 <code bash> <code bash>
-student@isrm-vm:​~/ns3$ ls AccessPoint*.pcap Station*.pcap+student@isrm-vm:​lab02$ ls AccessPoint*.pcap Station*.pcap
 AccessPoint-0-0.pcap ​ Station-1-0.pcap AccessPoint-0-0.pcap ​ Station-1-0.pcap
 </​code>​ </​code>​
Line 108: Line 115:
  
 <code bash> <code bash>
-student@isrm-vm:​~/​ns3$ ./waf --command-template="​valgrind \+student@isrm-vm:​~/​ns3$ ./ns3 run --command-template="​valgrind \
     --leak-check=full --show-reachable=yes %s" \     --leak-check=full --show-reachable=yes %s" \
     --run wifi-tcp     --run wifi-tcp
Line 145: Line 152:
 ===== [00] Pregătirea mediului pentru viitoarele laboratoare ===== ===== [00] Pregătirea mediului pentru viitoarele laboratoare =====
  
-<note tip>​Codul sursă al laboratoarelor de ISRM este disponibil pe [[https://​github.com/​isrm-lab/​ns3-labs|Github]]. ​Dacă vreți să lucrați pe propriul calculator atunci trebuie să urmați acești pași: +<note tip>​Codul sursă al laboratoarelor de ISRM este disponibil pe [[https://​github.com/​isrm-lab/​ns3-labs|Github]].
- +
-<code bash> +
-# Clonați repo-ul ns-3-dev  +
-git clone --branch ns-3.35 https://​gitlab.com/​nsnam/​ns-3-dev.git +
- +
-# Clonați repo-ul ns-3-labs în folderul ns-3-dev/​examples +
-cd ns-3-dev/​examples +
-git clone https://​github.com/​isrm-lab/​ns3-labs.git +
- +
-# Rulați build-ul sistemului de ns3 +
-./waf configure --build-profile=debug --enable-examples --enable-tests +
-./waf build -j4 +
-</​code>​ +
 </​note>​ </​note>​
  
Line 165: Line 158:
  
 <code bash> <code bash>
-student@isrm-vm-2020:~$ cd ns-3-dev +student@isrm-vm:​~$ cd ns-3-dev 
-student@isrm-vm-2020:~$ student@isrm-vm-2020:​~/​ns-3-dev$ ./waf --run lab3+student@isrm-vm:​~/​ns-3-dev$ ./ns3 run lab3
 Waf: Entering directory `/​home/​student/​ns-3-dev/​build'​ Waf: Entering directory `/​home/​student/​ns-3-dev/​build'​
 Waf: Leaving directory `/​home/​student/​ns-3-dev/​build'​ Waf: Leaving directory `/​home/​student/​ns-3-dev/​build'​
Line 182: Line 175:
 </​code>​ </​code>​
  
 +  * Aflați parametrii specifici cu care poate fi rulat laboratorul 3. 
 +  * Ce face opțiunea --PrintGlobals,​ și ce parametri interesanți expune?
  
 ===== [01] Grafic throughput ===== ===== [01] Grafic throughput =====
Line 216: Line 211:
  
 <code bash> <code bash>
-student@isrm-vm-2020:~$ sudo apt-get install tshark+student@isrm-vm:​~$ sudo apt-get install tshark
 </​code>​ </​code>​
  
Line 228: Line 223:
  
 <code bash> <code bash>
-student@isrm-vm:​~/​ns-3-dev$ ./waf --run "​wifi-tcp --pcap=true"​+student@isrm-vm:​~/​ns-3-dev$ ./ns3 run "​wifi-tcp --pcap=true"​
 (...) (...)
 student@isrm-vm:​~/​ns-3-dev$ ls -al *.pcap student@isrm-vm:​~/​ns-3-dev$ ls -al *.pcap
Line 298: Line 293:
  
 <code bash> <code bash>
-./waf --run "lab3 --numberOfNodes=2 --payloadSize=1400 \+./ns3 run "lab3 --numberOfNodes=2 --payloadSize=1400 \
     --offeredRate=11Mbps --phyRate=DsssRate11Mbps --simulationTime=2 --tracing=true"​     --offeredRate=11Mbps --phyRate=DsssRate11Mbps --simulationTime=2 --tracing=true"​
 </​code>​ </​code>​
isrm/laboratoare/new/02a.1728456514.txt.gz · Last modified: 2024/10/09 09:48 by dragos.niculescu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0