GithubHelp home page GithubHelp logo

mnm-team / p4-sdn Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 3.0 17.44 MB

SDN based on P4 and P4-Runtime

License: Apache License 2.0

Python 82.71% P4 3.71% Shell 1.04% PHP 0.15% HTML 8.80% JavaScript 3.00% CSS 0.36% Vim Script 0.23%

p4-sdn's Introduction

p4-sdn

Software-defined Networks (SDN) is a new approach for networking in contrast to traditional networks. Network control is decoupled from forwarding functions and is directly programmable in SDN, instead of being (manually) configurable as in traditional networks. RFC7426 delineates the key points to comprehend SDN.

We demonstrate SDN based on P4 and P4-Runtime, which are a data plane programming language and the API for communication between the control plane and the data plane, respectively (check p4.org/specs for specifications of P4 and P4Runtime). In the past (since approx. 2010), OpenFlow tended to be the standard for SDN. Recently, OpenFlow is claimed to be replaced by P4 (see: Clarifying the differences between P4 and OpenFlow).

The library of this repository, p4utils, is based on the p4-utils repository, which is again based on the p4-shell repository. We implement further APIs for the SDN controller, e.g., packet-in, packet-out, APIs related to idle timeout, and provide useful examples.

The examples are designed for the Rechnernetze Praktikum (RNP) at MNM-Team, LMU. The specification of the infrastructure and details about the course are provided in the course's script. The course are usually held annually in the winter semester (e.g., RNP WS2023/2024).

One can also create his/her own test-bed (e.g., in a laptop) by following instructions in Infrastructure-as-Code. After finishing basic setup, a description of the desired test-bed in json format can be input to the existing script to bring it up. The VM-based test-bed allows customization of each individual component (e.g., host, switch, controller...) as one's wish.

  • We first explain SDN based on P4 and P4-Runtime, which is important to understand the basic of P4 and SDN, and to understand the subsequent examples.

  • The simple_demo example shows a simple demonstration of SDN.

  • The simple_switch examples illustrate how a normal switch can be implemented by P4-based SDN.

  • As a switch cannot work properly in a network topology containing loops, we present a more advanced example, ARPcache, to cope with that problem.

  • The controller can measure the data throughput of a switch's port, or the number of packets matched by a certain rule in a switch. Counters are used for these purposes.

  • In some case, we might want to remove idle rules, i.e., rules that do not match any packet for some lapse of time. The idle timeout example demonstrates how this can be achieved.

  • SDN boosts the adoption of policy-based network management, and recently intent-based networking. In this regard, we provide an example, in which the SDN controller exposes useful REST APIs for controlling the data plane. Check it out in Intent-based Networking.

For deeper diving in the area, we propose a selection of ideas. They are relevant for small projects in the RNP-Praktikum, some can be developed further for theses.

TODO:

  • Topics for projects, theses (see ideas)
  • Network Telemetry

p4-sdn's People

Contributors

winspring avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.