... | ... | @@ -11,17 +11,20 @@ We will periodically add new content to this repository (specially documentation |
|
|
|
|
|
## Required Software
|
|
|
|
|
|
In order to be able to compile P4 code, run it in a software switch (provided by [BMv2](https://github.com/p4lang/behavioral-model)) and create virtual topologies with hosts, several dependencies and open source tools need to be installed first.
|
|
|
In order to be able to compile P4 code, run it in a software switch and create virtual topologies with hosts, several dependencies and open source tools need to be installed first. In particular, the following packages (and their dependencies) need to be installed on the machine.
|
|
|
|
|
|
- [PI](https://github.com/p4lang/PI) provides an implementation framework for a P4Runtime server.
|
|
|
- [*Behavioral Model* (BMv2)](https://github.com/p4lang/behavioral-model) contains the software implementation several variations of the behavioral model (e.g. `simple_switch` and `simple_switch_grpc`).
|
|
|
- [P4C](https://github.com/p4lang/p4c) is a reference compiler for the P4 programming language and supports both **P4-14** and **P4-16**.
|
|
|
- [*Mininet*](http://mininet.org/) allows to create a realistic virtual network, running real kernel, switch and application code, on a single machine (VM, cloud or native).
|
|
|
- [*FRRouting*](https://frrouting.org/) is a free and open source Internet routing protocol suite for Linux and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric and VRRP, with alpha support for EIGRP and NHRP. Routers node in *P4-Utils* are based on *FRRouting*.
|
|
|
- [*P4-Utils*](https://github.com/nsg-ethz/p4-utils) is an extension to *Mininet* that supports P4 devices. It was strongly inspired by the original [*p4app*](https://github.com/p4lang/p4app) from the [p4lang](https://github.com/p4lang) repository.
|
|
|
|
|
|
Since the installation process can be a bit tedious and cumbersome we provide you with a [Vagrant](https://www.vagrantup.com/intro/index.html) script that automatically builds a virtual machine with all required software already installed. You can find the VM setup instructions in the [P4 Virtual Machine Installation](vm/README.md) document.
|
|
|
|
|
|
> **Important**
|
|
|
> Some exercises or examples will only work (due to bug fixes) if you use the same version of BMv2 and P4C that we provide. See the following [installation](https://github.com/nsg-ethz/p4-learning/blob/junota/vm/bin/install-p4-tools.sh) script and use the same `commits`.
|
|
|
|
|
|
### *P4-Utils*
|
|
|
|
|
|
To run the exercises and examples we use [*P4-Utils*](https://github.com/nsg-ethz/p4-utils), an extension to *Mininet* to support P4 devices. It was strongly inspired by the original [*p4app*](https://github.com/p4lang/p4app) from the [p4lang](https://github.com/p4lang) repository.
|
|
|
|
|
|
## Virtual Machine (VM)
|
|
|
|
|
|
If you build the VM from the vagrant script we provide or directly download the OVA package you will have *P4-Utils* already installed, however if you already have the required software and use your own machine/VM you can manally install it:
|
... | ... | |