Skip to content

GitLab

  • Menu
项目 Groups 代码片段
    • 正在加载...
  • 帮助
    • 帮助
    • 支持
    • 社区论坛
    • 提交反馈
  • 登录/注册
  • P p4-learning
  • Project information
    • Project information
    • 动态
    • 标记
    • 成员
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • 议题 0
    • 议题 0
    • 列表
    • 看板
    • 服务台
    • 里程碑
  • 合并请求 0
    • 合并请求 0
  • CI/CD
    • CI/CD
    • 流水线
    • 作业
    • 计划
  • Deployments
    • Deployments
    • 环境
    • 发布
  • Monitor
    • Monitor
    • 事件
  • 软件包与镜像库
    • 软件包与镜像库
    • 软件包注册表
    • Infrastructure Registry
  • 分析
    • 分析
    • CI/CD
    • 仓库
    • Value stream
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 动态
  • 分支图
  • 创建新议题
  • 作业
  • 提交
  • 议题看板
收起侧边栏
  • p4git
  • p4-learning
  • Wiki
  • Getting Started

Last edited by Jurij Nota 9月 10, 2021
页面历史
这是此页面的过期版本。 您可以查看 最新版本 或浏览 历史。

Getting Started

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:

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 (provided by BMv2) 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 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 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 script and use the same commits.

P4-Utils

To run the exercises and examples we use P4-Utils, an extension to Mininet to support P4 devices. It was strongly inspired by the original p4app from the 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:

git clone https://github.com/nsg-ethz/p4-utils.git
cd p4-utils
sudo ./install.sh

To update you just simply run:

cd /home/p4/p4-tools/p4-utils
git pull
克隆仓库

P4-Learning Documentation

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

沪ICP备19002739号