# Advanced Topics in Communication Networks 2020 Welcome to the Advanced Topics in Communication Networks Repository! Here you will find the weekly exercises along with the instructions on how to run them in a virtual environement. ## How to start? To make your life simpler, we give to each of you access to one VM where all the necessary tools and software are pre-installed. ### Access your own VM To access your VM, you willl SSH. SSH is a UNIX based command interface and protocol for securely getting access to a remote computer. It is widely used by system administrators to control network devices and servers remotely. An SSH client is available by default on any Linux and MAC installation through the Terminal application. For Windows user, a good and free SSH client is [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/). Once you have installed a SSH client, use the following command to connect yourself to your VM: ``` ssh -p X p4@moonshine.ethz.ch ``` where X = 2000 + your student number for this lecture that we have sent you by email. For instance if you are the student 7, use the following command ``` ssh -p 2007 p4@moonshine.ethz.ch ``` If you cannot connect to your VM, please report it immediately during the exercise session or in moodle. If you want to simplify the access to your VM (optional), please use SSH key authentication, but do not change your password. If you want to download an entire directory (e.g. the configs directory) from your VM to the current directory of your own machine, you can use scp: ``` > scp -r -P X p4@moonshine.ethz.ch:~/path to the directory . ``` where X = 2000 + group number. On Windows, you can use WinSCP7 to do that. Note the dot at the end of the command and the capitalized P. #### VM Credentials During the lecture, we will two types of exercises. First, we will have p4-based exercises. Then we will have exercises based on the mini-Internet. We will use two different users for the two types of exercises. For the p4-based exercises please use the login `p4`, and for the mini-Internet-based exercises please use the login `mini_internet`. We have sent you your password by email. It is the same for both logins. If you have not received your password please let us know immediately. ### VM Contents The VM is based on a Ubuntu 16.04.05 and after building it contains: * The suite of P4 Tools ([p4lang](https://github.com/p4lang/), [p4utils](https://github.com/nsg-ethz/p4-utils/tree/master/p4utils), etc) * Text editors with p4 highlighting (sublime, atom, emacs, vim) * [Wireshark](https://www.wireshark.org/) * [Mininet](http://mininet.org/) network emulator * All the tools required to run a [mini-Internet](https://github.com/nsg-ethz/mini_internet_project) ## Exercises In this section we provide the links to the weekly exercises. There are two types of exercises. The first ones will be P4-based whereas later during the semester you will have mini-Internet-based exercises (the same kind of mini-Internet that you used in the Communication Networks lecture)). To get the exercises ready in your VM, please clone this repository both times; one in the `p4` user home directory and one in the `mini_internet` user home directory. We illustrate how to do that for the `p4` user. ``` cd /home/p4/ git clone git@gitlab.ethz.ch:nsg/public/adv-net-2020.git ``` Update local repository to get new tasks and solutions Remember to pull this repository before every exercise session: ``` cd /home/p4/adv-net-2020 git pull git@gitlab.ethz.ch:nsg/public/adv-net-2020.git ``` #### P4 #### Mini-Internet Starting on October 26, 2020.