This shows you the differences between two versions of the page.
isrm:mv [2021/01/04 22:05] mbarbulescu [Mașină virtuală] |
isrm:mv [2024/10/16 09:00] (current) dragos.niculescu [A. Linux install (Dacă rulați direct într-o mașină linux)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Setup ISRM ===== | + | ====== Setup ISRM ====== |
- | ==== Mașină virtuală ==== | + | ===== Repository dev ===== |
+ | |||
+ | * [[https://gitlab.com/nsnam/ns-3-dev|nsnam/ns-3]] - Simulatorul de ns-3. Noi folosim release-ul de pe tag-ul ''ns-3.35''. | ||
+ | * [[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]] | ||
+ | |||
+ | |||
+ | ===== 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) ===== | ||
+ | |||
+ | * Instalați [[https://www.virtualbox.org/wiki/Downloads|VirtualBox]] | ||
+ | * Folosiți o imagine [[https://www.osboxes.org/ubuntu/|Ubuntu]] sau [[https://www.osboxes.org/linux-mint/|Linux Mint]] | ||
+ | * Setari virtualbox necesare: | ||
+ | * Port forwarding: https://bobcares.com/blog/virtualbox-ssh-nat/ : “Settings” >> “Network” >> “Advanced” section. This will show additional network adapter options. Then, we click on “Port Forwarding” button. | ||
+ | * Settings > System > Motherboard > minim 4096 MB RAM | ||
+ | * Settings > System > Processor > Enable PAE/NX | ||
+ | * Settings > System > Acceleration > Bifați la Hardware Virtualization Enable Nested Paging | ||
+ | * Settings > System > Processor > Dați minim 2 CPU | ||
+ | * Settings > System > Display > VBoxVGA | ||
+ | |||
+ | |||
+ | ==== Cum creez o mașină virtuală cu VDI existent? (opțional) ==== | ||
+ | |||
+ | {{:isrm:1.png?direct&200|}} | ||
+ | |||
+ | {{:isrm:2.png?direct&200|}} | ||
+ | |||
+ | {{:isrm:3.png?direct&200|}} | ||
+ | |||
+ | {{:isrm:4.png?direct&200|}} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <hidden> | ||
+ | |||
+ | |||
+ | |||
+ | ===== Mașină virtuală ===== | ||
Link download 2020-2021 (autentificare cu credențialele LDAP cs.curs.pub.ro): | Link download 2020-2021 (autentificare cu credențialele LDAP cs.curs.pub.ro): | ||
Line 8: | Line 103: | ||
Link alternativ: | Link alternativ: | ||
+ | |||
https://ctipub-my.sharepoint.com/:u:/g/personal/mbarbulescu_upb_ro/EXFahQvtHkVOks9px5WqO5YBtn25ClMqyF97RPrV4iBP9A?e=q5SUds | https://ctipub-my.sharepoint.com/:u:/g/personal/mbarbulescu_upb_ro/EXFahQvtHkVOks9px5WqO5YBtn25ClMqyF97RPrV4iBP9A?e=q5SUds | ||
Line 24: | Line 120: | ||
- VisualStudioExptTeam.vscodeintellicode | - VisualStudioExptTeam.vscodeintellicode | ||
- callegustafsson.waf-task-provider | - callegustafsson.waf-task-provider | ||
- | + | </hidden> | |
- | ==== Repository dev ==== | + | |
- | + | ||
- | * [[https://gitlab.com/nsnam/ns-3-dev|nsnam/ns-3]] - Simulatorul de ns-3. Noi folosim release-ul de pe tag-ul ''ns-3.32''. | + | |
- | * [[https://github.com/isrm-lab/ns3-labs|Laboratoarele de ISRM]] compatibile cu ns-3. | + | |