To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

README.md 5.75 KB
Newer Older
thomahol's avatar
thomahol committed
1
# Advanced Topics in Communication Networks 2020
thomahol's avatar
thomahol committed
2

thomahol's avatar
thomahol committed
3
Welcome to the Advanced Topics in Communication Networks Repository!
4
Here you will find the weekly exercises and instructions on how to run these exercises in a virtual environment.
thomahol's avatar
thomahol committed
5
6
7

## How to start?

Thomas Holterbach's avatar
Thomas Holterbach committed
8
To make your life easier, we provide each of you with access to one VM where all the necessary tools and software are pre-installed.
thomahol's avatar
thomahol committed
9
10
11

### Access your own VM

12
To access your VM, you will use SSH. SSH is a UNIX based command-line interface and protocol for securely getting access
thomahol's avatar
thomahol committed
13
14
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
15
16
through the Terminal application. For Windows 10 users, there is SSH functionality avaliable in the Command Prompt. For other Windows users, a good and free SSH client is [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/).
Once you have installed an SSH client, use the following command to connect yourself to your
thomahol's avatar
thomahol committed
17
18
19
VM:

```
thomahol's avatar
thomahol committed
20
ssh -p X p4@moonshine.ethz.ch
thomahol's avatar
thomahol committed
21
22
23
24
25
26
```

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

```
thomahol's avatar
thomahol committed
27
ssh -p 2007 p4@moonshine.ethz.ch
thomahol's avatar
thomahol committed
28
29
30
```

If you cannot connect to your VM,
31
please report it immediately during the exercise session or in [Moodle](https://moodle-app2.let.ethz.ch/mod/forum/view.php?f=22500). If you want to simplify
thomahol's avatar
thomahol committed
32
33
34
35
36
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:

```
thomahol's avatar
thomahol committed
37
> scp -r -P X p4@moonshine.ethz.ch:~/path to the directory .
thomahol's avatar
thomahol committed
38
39
40
41
42
```

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.

43
44
45
46
47
48
49
50
51
52
53
54
### Remote Development

We need to be able to open and edit remote files in our local code editor to have a smooth development cycle. This way, we can work with our code locally, and execute it remotely without any friction. Below, we explain how to achieve this for Visual Studio Code as an example.

1) Download Visual Studio Code.
2) Access VS Code, in the left-side dock enter `Extensions` menu.  
3) Install `Remote - SSH` extension.
4) In the pop-up prompt: enter your SSH credentials as you did for the VM access.
5) Your "Remote Directory" should appear in the Explorer.
6) [Optional] Go to Extensions menu again, and install `P4 Language Extension` in your remote machine for highlights and syntax check.

For VS Code, you can find further information [here](https://code.visualstudio.com/docs/remote/ssh).
thomahol's avatar
thomahol committed
55
Many other text editors provide a similiar functionality. For example, Atom has the [remote-synch](https://atom.io/packages/remote-sync) package to upload and download files directly from inside Atom.
56

Thomas Holterbach's avatar
Thomas Holterbach committed
57
If you are already familiar with remote development, continue with your favourite code editor.
58
59


thomahol's avatar
thomahol committed
60
61
#### VM Credentials

thomahol's avatar
thomahol committed
62
During the lecture, we will have two types of exercises. First, we will have p4-based exercises. Then, we will have exercises based on the mini-Internet.
Thomas Holterbach's avatar
Thomas Holterbach committed
63
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`.
thomahol's avatar
thomahol committed
64
65
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.

thomahol's avatar
thomahol committed
66
### VM Contents
thomahol's avatar
thomahol committed
67

thomahol's avatar
thomahol committed
68
69
70
71
72
73
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
thomahol's avatar
thomahol committed
74
* All the tools required to run a [mini-Internet](https://github.com/nsg-ethz/mini_internet_project)
thomahol's avatar
thomahol committed
75
76
77
78


## Exercises

thomahol's avatar
thomahol committed
79
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).
thomahol's avatar
thomahol committed
80
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.
thomahol's avatar
thomahol committed
81
82
83

```
cd /home/p4/
galberto's avatar
galberto committed
84
git clone https://gitlab.ethz.ch/nsg/public/adv-net-2020
thomahol's avatar
thomahol committed
85
86
87
88
89
90
91
```

Update local repository to get new tasks and solutions
Remember to pull this repository before every exercise session:

```
cd /home/p4/adv-net-2020
galberto's avatar
galberto committed
92
git pull https://gitlab.ethz.ch/nsg/public/adv-net-2020
thomahol's avatar
thomahol committed
93
94
```

cedgar's avatar
cedgar committed
95
### P4 Exercise Sessions
cedgar's avatar
cedgar committed
96

cedgar's avatar
cedgar committed
97
#### Week 1: Introduction to P4 (15/09/2020)
thomahol's avatar
thomahol committed
98

cedgar's avatar
cedgar committed
99
* [Introduction to P4](https://gitlab.ethz.ch/nsg/public/adv-net-2020/-/tree/master/01-Tutorials)
thomahol's avatar
thomahol committed
100

cedgar's avatar
cedgar committed
101
102
103
104
#### Week 2: MPLS (22/09/2020)

 * [MPLS Data Plane](./02-MPLS)

cedgar's avatar
cedgar committed
105
106
107
108
#### Week 3 & 4: RSVP (29/09/2020 - 06/10/2020)

 * [RSVP Controller](./03-RSVP)

Thomas Holterbach's avatar
Thomas Holterbach committed
109
#### Week 5: Load balancing (13/10/2020)
cedgar's avatar
cedgar committed
110
111
112

 * [Load Balancing](./04-Load_balancing)

Thomas Holterbach's avatar
Thomas Holterbach committed
113
#### Week 6: Traffic control (20/10/2020)
thomahol's avatar
thomahol committed
114

Thomas Holterbach's avatar
Thomas Holterbach committed
115
116
117
118
119
120
121
122
123
 * [Load Balancing](./05-Traffic_control)

#### Week 7 & 8: BGP VPN with MPLS (27/10/2020 - 3/11/2020)

 * [MPLS_VPN_VRF](./07-MPLS_VPN_VRF)

#### Week 9: IP Fast Reroute to LFA (10/11/2020)

 * [Fast_Reroute](./08-Fast_reroute)
thomahol's avatar
thomahol committed
124

thomahol's avatar
thomahol committed
125
## Where to ask questions?
thomahol's avatar
thomahol committed
126

thomahol's avatar
thomahol committed
127
If you have questions, you can ask us during the exercise sessions (every Tuesday at 4.15pm) using the Zoom in-meeting chat or in the #exercise channel on [slack](adv-net20.slack.com). You can post more general questions on the [moodle](https://moodle-app2.let.ethz.ch/) forum.  
cedgar's avatar
cedgar committed
128
Please do **not** ask us questions by email.