• Stars
    star
    536
  • Rank 82,794 (Top 2 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Compilation of P4 exercises, examples, documentation, slides for learning or teaching

P4-Learning

This repository contains a compilation of useful resources for data plane programming, specially for the ones wanting to learn how to write P4-16 programs and test them in a virtual environment. All the exercises and examples provided are designed to work with P4-Utils, a testing and prototyping framework available here.

A big part of the materials come from the Advanced Topics in Communication Networks lecture taught at ETH Zürich. For more information visit our website.

Attention: new update released!
As of 2021, a large update in the P4-Utils framework has been released. This entails several improvements that, unfortunately, make the new prototyping platform not backward compatible with the old exercises and examples of this repository. In response to this, P4-Learning has been updated too: all the relevant information about the migration from the old to the new version are available here.

What will you find here?

You will find software installation guides, lecture slides, specific development documentation, exercises, a collection of examples and much more. Specifically:

  • Slides: deck of slides that go from the story of SDN and introduction to data plane programming to advanced (research level) applications.
  • Examples: a collection of examples showing how to use almost all the simple switch features.
  • Exercises: a set of P4 exercises with a long description and solutions.
  • Environment Installation: a guide and scripts to install the required software to start developing P4 applications in your own machine.

The documentation of P4-Learning is available in the Wiki. It contains helpful information that will help you getting started with the exercises and examples contained in this repository. Moreover, you will also find documentation about the software switches used in the network topologies and how to configure them using their control plane.

Migrate to the new version

The recent update of P4-Utils introduced several improvements, affecting also P4-Learning. All the exercises and examples have been already migrated to the new version and they are now compatible with the new framework. However, should you have customized examples crafted from the old ones, please make sure that you have ported any controller to Python 3 and that the JSON network configuration file is compliant with the new specification.

Notice
Old network JSON configuration files are not compatible with the new version of P4-Utils.

You can find further information about the update changelog and how the JSON configuration file specification has changed in the Wiki. Moreover, consider that, in the new version of P4-Utils, networks can be started also using a Python script and the new NetworkAPI.

Getting started

Clone this repository into your machine

If you already have the required software and 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.

Notice
In case you have not installed the dependencies, make sure to check out this section and follow the instructions.

Install the required software

P4-Learning depends on the following software that needs to be installed before any exercises or example can be run. Please refer to these links to build and install it on your device.

A more detailed user guide on how to start with P4-Learning is available in the Wiki. It contains helpful information about the dependencies and the installation process. Moreover, you will find also instructions on how to use the virtual machine that we provide, so that the cumbersome installation of the various components can be skipped and you can directly start learning P4!

More Repositories

1

mini_internet_project

The official repository of the mini-Internet exercise.
Shell
186
star
2

p4-utils

Extension to Mininet that makes P4 networks easier to build
Python
184
star
3

SP-PIFO

Approximating Push-In First-Out Behaviors using Strict-Priority Queues
Java
51
star
4

ACC-Turbo

Aggregate-Based Congestion Control for Pulse-Wave DDoS Defense
Shell
49
star
5

hijack-btc

Python
36
star
6

synet-plus

Practical Network-Wide Configuration Synthesis with Autocompletion
Python
36
star
7

netdice

A scalable and accurate probabilistic network configuration analyzer verifying network properties in the face of random failures.
Python
30
star
8

ditto

ditto: WAN Traffic Obfuscation at Line Rate (source code belonging to the NDSS 2022 paper)
P4
28
star
9

synet

SyNET Network-wide Configuration Synthesis
Python
26
star
10

Blink

Blink: Fast Connectivity Recovery Entirely in the Data Plane
Python
25
star
11

config2spec

Mining Network Specifications from Network Configurations
Python
24
star
12

FANcY

FANcY: FAst In-Network GraY Failure Detection for ISPs
Python
19
star
13

Metha

A framework for automated testing of network analysis and verification tools.
Python
15
star
14

O4

Reducing P4 Language’s Voluminosity using Higher-Level Constructs
Racket
15
star
15

snowcap

Synthesizing Network-Wide Configuration Updates
Rust
14
star
16

tekton

A library to create networks and to generate network configurations
Python
10
star
17

Chameleon

Taming the transient while reconfiguring BGP (SIGCOMM'23)
Rust
9
star
18

swift

SWIFT: Predictive Fast Reroute
Python
9
star
19

net2text

Net2Text (NSDI'18)
Python
6
star
20

trace-get

Tool to download caida traces
Python
6
star
21

SIFT

"Is my Internet down?" Sifting through User-Affecting Outages with Google Trends
Python
4
star
22

minigenerator

Simple udp/tcp traffic generator for mininet-based prototypes
Python
4
star
23

PowerDB_Datasheets

PowerDB_Datasheets is an open-source project dedicated to collecting and maintaining information about the power consumption of various network devices, including routers and transceivers. This data contributes to a larger database called NetPowerDB, which supports energy-efficient network design and management.
4
star
24

Magnifier

Official repository for the Magnifier paper (NSDI'23)
Python
4
star
25

bgpsim

A network control-plane simulator
Rust
3
star
26

supercharged_router

Boosting Routers Convergence with SDN
Python
3
star
27

autopower

A software suite to conveniently collect, gather, and display power measurement from networking hardware.
Python
2
star
28

SIDR

Python
2
star
29

ns3-fancy

C++
2
star
30

atlas_interference

Quantifying interference between measurements on the RIPE Atlas platform
Python
1
star
31

PowerDB_Scrappers

1
star
32

iTAP-controller

iTAP prototype implementation
Java
1
star
33

hypnos

Codebase for the evaluation of Hypnos
Python
1
star
34

Memento-Artefacts

Public artefacts for the Memento sample selection project.
Jupyter Notebook
1
star