All the assignment can be done inside the VM created in the following way.
- Install Virtualbox 6.1 and Vagrant in your computer. If you use Windows, also install Git for Windows.
- Create an empty directory somewhere you can remember.
- Copy or download Vagrantfile in this directory.
- Open a terminal (Mac or Linux) or Git Bash (Windows).
- Go to the directory that includes Vagrantfile using
cd
command. - Launch a VM with:
vagrant up
This will take about 10-30 minutes in the first time, and slightly shorter in the later times because the base VM image has been cached. Below is some basic commands to control the VM (comments after #)
vagrant ssh # login to the vm
vagrant halt # shut down the vm
vagrant destroy # delete the vm
Note that these commands must be run in the same directory with Vagrantfile.
In the VM console window, you can login to the VM with "vagrant" for both username and password.
Files in the Vagrantfile directory can be seen inside the vm, which appear in /vagrant.
- Install Ubuntu 20.04 in a virtual machine using UTM. This link is also useful.
- Execute following commands in the terminal.
sudo apt-get update
sudo apt-get install python3-pip -y
python3 -m pip install matplotlib scapy
echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections
sudo apt-get install mininet tshark -y
sudo apt-get install python -y
git clone https://github.com/mininet/mininet
mininet/util/install.sh -w
python3 -m pip install ryu