Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • P p4-learning
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • p4git
  • p4-learning
  • Wiki
  • Getting Started

Getting Started · Changes

Page history
Updated Getting Started (markdown) authored Jul 26, 2021 by Jurij Nota's avatar Jurij Nota
Hide whitespace changes
Inline Side-by-side
Showing with 8 additions and 2 deletions
+8 -2
  • Getting-Started.md Getting-Started.md +8 -2
  • No files found.
Getting-Started.md
View page @ 4035a77b
## Clone this repository into your machine
If you want to solve the exercises, run the examples or simply download the content get a local copy of this repository in your machine:
```bash
git clone https://github.com/nsg-ethz/p4-learning.git
```
We will periodically add new content to this repository (specially documentation and new examples), so make sure to check it regularly or `git pull` it from your machine.
## Required Software
In order to be able to compile P4 code, run it in a software switch (bmv2) 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 (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.
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](./vm/bin/install-p4-tools.sh) script and use the same `commits`.
> 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:
```bash
git clone https://github.com/nsg-ethz/p4-utils.git
cd p4-utils
......@@ -28,6 +33,7 @@ sudo ./install.sh
```
To update you just simply run:
```bash
cd /home/p4/p4-tools/p4-utils
git pull
......
Clone repository

P4-Learning Documentation

  • Getting Started
  • Migrate to the new version
  • BMv2 Simple Switch
  • Control Plane
  • Debugging and Troubleshooting

沪ICP备19002739号