This shows you the differences between two versions of the page.
|
isrm:laboratoare:new:02a [2024/10/09 09:58] dragos.niculescu [Debugging cu valgrind/gdb] |
isrm:laboratoare:new:02a [2024/10/16 09:04] (current) dragos.niculescu |
||
|---|---|---|---|
| Line 33: | Line 33: | ||
| <code bash> | <code bash> | ||
| - | student@isrm-vm:~/ns3$ ./ns3 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$ ./ns3 run examples/wireless/wifi-tcp | + | student@isrm-vm:lab02$ ../ns3 run examples/wireless/wifi-tcp --cwd . |
| </code> | </code> | ||
| Line 55: | Line 56: | ||
| <code bash> | <code bash> | ||
| - | student@isrm-vm:~/ns3$ ./ns3 run "wifi-tcp --help" | + | student@isrm-vm:lab02$ ../ns3 run "wifi-tcp --help" |
| </code> | </code> | ||
| Line 61: | Line 62: | ||
| <code bash> | <code bash> | ||
| - | student@isrm-vm:~/ns3$ ./ns3 run "wifi-tcp --pcap --simulationTime=3" | + | 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 77: | 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 151: | 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 171: | 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 188: | 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 222: | 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 234: | 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 304: | 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> | ||