This shows you the differences between two versions of the page.
isrm:mv [2022/10/29 13:05] mbarbulescu [Cum creez o mașină virtuală cu VDI existent? (opțional, pentru cei fără Docker)] |
isrm:mv [2024/10/16 09:00] (current) dragos.niculescu [A. Linux install (Dacă rulați direct într-o mașină linux)] |
||
---|---|---|---|
Line 6: | Line 6: | ||
* [[https://github.com/isrm-lab/ns3-labs|Laboratoarele de ISRM]] compatibile cu ns-3. | * [[https://github.com/isrm-lab/ns3-labs|Laboratoarele de ISRM]] compatibile cu ns-3. | ||
* [[https://github.com/isrm-lab/isrm-vm-docker-img|Imagine docker cu setup ISRM]] | * [[https://github.com/isrm-lab/isrm-vm-docker-img|Imagine docker cu setup ISRM]] | ||
+ | |||
+ | |||
+ | ===== A. Linux install (Dacă rulați direct într-o mașină linux) ===== | ||
+ | |||
+ | Comenzile sunt pentru ubuntu 24. | ||
+ | |||
+ | * Toate comenzile cu 'install' din acest [[https://raw.githubusercontent.com/isrm-lab/isrm-vm-docker-img/refs/heads/main/Dockerfile|script]] | ||
+ | <code bash> | ||
+ | apt update | ||
+ | apt install build-essential git vim emacs ... | ||
+ | </code> | ||
+ | |||
+ | * ns-3 și laboratoarele: | ||
+ | <code bash> | ||
+ | git clone https://gitlab.com/nsnam/ns-3-dev.git | ||
+ | cd ns-3-dev | ||
+ | git checkout -b rel-342 ns-3.42 | ||
+ | cd examples | ||
+ | git clone https://github.com/isrm-lab/ns3-labs.git | ||
+ | cd .. | ||
+ | ./ns3 configure --enable-examples --enable-tests | ||
+ | ./ns3 build # takes 5-10 minutes | ||
+ | ./ns3 run "wifi-tcp --pcap --simulationTime=3" | ||
+ | </code> | ||
+ | |||
+ | * plot | ||
+ | <code bash> | ||
+ | mkdir lab01; cd lab01 | ||
+ | ../ns3 run "wifi-tcp --pcap --simulationTime=3" --cwd . | tee lab01.out | ||
+ | # python code to plot ouput file | ||
+ | </code> | ||
+ | |||
+ | ===== B. Docker install (Dacă rulați în windows, osx, sau docker sub linux) ===== | ||
+ | |||
+ | O dată ce a pornit mașina virtuală trebuie rulat: | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt install docker.io | ||
+ | </code> | ||
+ | |||
+ | <code bash> | ||
+ | # https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user | ||
+ | sudo groupadd docker && sudo usermod -aG docker $USER | ||
+ | </code> | ||
+ | |||
+ | ==== Create docker image ==== | ||
+ | |||
+ | <code bash> | ||
+ | git clone https://github.com/isrm-lab/isrm-vm-docker-img.git | ||
+ | cd isrm-vm-docker-img | ||
+ | docker build -t isrm2023 . | ||
+ | </code> | ||
+ | |||
+ | <note important> | ||
+ | ''**docker build**'' a fost testat pe un host cu Linux Mint 20.3 și pe un VM cu Ubuntu Server 22.10. | ||
+ | |||
+ | De asemenea am făcut un test și pe Windows 11, cu WSL 2 ([[https://www.windows11.dev/ce7in/how-to-install-wsl2-and-linux-distros-on-windows-11-6od|Windows Subsystem for Linux]]) având Hyper-V activat și Ubuntu 22.04 ca distribuție instalat. Instalarea docker în WSL a fost făcută urmând [[https://tjisblogging.blogspot.com/2022/05/install-docker-on-windows-11-with-wsl.html|pașii de aici]] apoi totul funcționează, exceptând faptul că trebuie să porniți de mână serviciul de docker: ''**systemctl start docker**'' | ||
+ | </note> | ||
+ | |||
===== Mașină virtuală (opțional) ===== | ===== Mașină virtuală (opțional) ===== | ||
Line 18: | Line 77: | ||
* Settings > System > Processor > Dați minim 2 CPU | * Settings > System > Processor > Dați minim 2 CPU | ||
* Settings > System > Display > VBoxVGA | * Settings > System > Display > VBoxVGA | ||
+ | |||
==== Cum creez o mașină virtuală cu VDI existent? (opțional) ==== | ==== Cum creez o mașină virtuală cu VDI existent? (opțional) ==== | ||
Line 28: | Line 88: | ||
{{:isrm:4.png?direct&200|}} | {{:isrm:4.png?direct&200|}} | ||
- | ==== Docker install ==== | ||
- | O dată ce a pornit mașina virtuală trebuie rulat: | ||
- | <code bash> | ||
- | sudo apt install docker.io | ||
- | </code> | ||
- | <code bash> | ||
- | # https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user | ||
- | sudo groupadd docker && sudo usermod -aG docker $USER | ||
- | </code> | ||
- | ==== Create docker image ==== | + | <hidden> |
- | <code bash> | ||
- | git clone https://github.com/isrm-lab/isrm-vm-docker-img.git | ||
- | cd isrm-vm-docker-img | ||
- | docker build -t isrm2023 . | ||
- | </code> | ||
- | <hidden> | ||
===== Mașină virtuală ===== | ===== Mașină virtuală ===== | ||