• Stars
    star
    184
  • Rank 209,187 (Top 5 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 7 years ago
  • Updated 5 months ago

Reviews

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

Repository Details

Extension to Mininet that makes P4 networks easier to build

P4-Utils

P4-Utils is an extension to Mininet that makes P4 networks easier to build, run and debug. P4-utils is strongly inspired by p4app. Here we only provide a quick summary of the main information about P4-Utils. Check out the online documentation for more details about P4-Utils installation and usage.

Installation

In order to work, P4-Utils needs different programs coming from different sources as prerequisites. Since the installation process can be long and cumbersome, we provide different methods to make the deployment easier for the users:

Virtual Machine

P4-Utils can run in a virtual machine to keep its environment separated from the rest of the system. Moreover, since P4-Utils is only available on Linux, other OS users can run it in a linux VM.

Running P4-Utils in a completely separated environment can be beneficial: in this way, installation and execution errors, that may arise, will not affect the whole system. For this reason, we recommend using a virtual machine.

You can choose to download and use one of our preconfigured VMs or to build it by yourself.

Manual Installation

If you have already installed all the requirements, you can simply install P4-Utils using the following commands:

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

Attention!
The install script will use pip -e to install the project in editable mode, meaning that every time you update the files in this repository, either by pulling or doing local edits, the changes will automatically take place without the need of installing the package again.

If you want to uninstall run:

sudo ./uninstall.sh

This will remove all the scripts that were added to /usr/bin as well as uninstall the python package using pip.

Requirements

P4-Utils depends on the following programs in the given order:

  1. PI LIBRARY REPOSITORY is required only for topologies with P4Runtime switches
  2. BEHAVIORAL MODEL (bmv2)
  3. p4c
  4. Mininet
  5. FRRouting is required only for topologies with routers

Since the installation process is long and cumbersome, we provide a Bash script that automatically installs the dependencies.

How does it work ?

P4-Utils creates virtual networks using Mininet and extended nodes that run P4-enabled switches. To create hosts, Mininet uses a bash process running in a network namespace, in order words, all the processes that run within the network namespaces have an isolated network stack. Switches are software-based switches like Open vSwitch, Linux Bridge, or BMV2 switches. Mininet uses virtual ethernet pairs, which live in the Linux kernel to connect the emulated hosts and switches.

For more information see:

Features

P4-Utils adds on top of Mininet:

  • A command-line launcher (p4run) to instantiate networks.
  • A helper script (mx) to run processes in namespaces.
  • Custom P4Host, P4Switch, P4RuntimeSwitch, FFRouter nodes (based on BMV2 and FRRouting).
  • A very simple way of defining networks using JSON files (see p4app_example.json and related documentation).
  • A very intuitive programmatic way of defining networks using a Python API (see related documentation).
  • Enhances Mininet command-line interface by adding useful commands to manage P4 switches.
  • Saves the topology information in an object that can be loaded and queried (see related documentation).
  • Re-implementation of the runtime_CLI and simple_switch_CLI as Python objects to use in controller code.
  • Re-implementation of the p4runtime-shell as Python objects to use in controller code.

More Repositories

1

p4-learning

Compilation of P4 exercises, examples, documentation, slides for learning or teaching
Python
536
star
2

mini_internet_project

The official repository of the mini-Internet exercise.
Shell
186
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