Giter Club home page Giter Club logo

ngsdn-tutorial's Introduction

Next-Gen SDN Tutorial

Welcome to Next-Gen SDN tutorial!

This tutorial is targeted to developers who want to learn about the building blocks of the NG-SDN architecture, such as:

  • Data plane programming and control via P4 and P4Runtime
  • Configuration via OpenConfig and gNMI
  • Stratum
  • ONOS

The tutorial is organized around a sequence of hands-on exercises that show how to build an IPv6-based leaf-spine data center fabric using P4, Stratum, and ONOS.

Slides

Tutorial slides are available [online](ADD SLIDES URL). These slides provide an introduction to each exercise. We suggest you look at it before starting to work on the exercises.

System requirements

To facilitate access to the tools required to complete this tutorial, we provide two options for you to choose from:

  1. Download a pre-packaged VM with all included; OR
  2. Manually install Docker and other dependencies.

Option 1 - Download tutorial VM

Use the following link to download the VM (4 GB):

The VM is in .ova format and has been created using VirtualBox v5.2.32. To run the VM you can use any modern virtualization system, although we recommend using VirtualBox. For instructions on how to get VirtualBox and import the VM, use the following links:

Recommended VM configuration: The current configuration of the VM is 4 GB of RAM and 4 core CPU. These are the recommended minimum system requirements to complete the exercises. When imported, the VM takes approx. 8 GB of HDD space. For a smooth experience, we recommend running the VM on a host system that has at least the double of resources.

VM user credentials: Use credentials sdn/rocks to log in the Ubuntu system.

Option 2 - Manually install Docker and other dependencies

All exercises can be executed by installing the following dependencies:

  • Docker v1.13.0+ (with docker-compose)
  • make
  • Python 3
  • Bash-like Unix shell

Note for Windows users: all scripts have been tested on macOS and Ubuntu. Although we think they should work on Windows, we have not tested it. For this reason, we advise Windows users to prefer Option 1.

Get this repo or pull latest changes

To work on the exercises you will need to clone this repo:

cd ~
git clone https://github.com/opennetworkinglab/ngsdn-tutorial

If the ngsdn-tutorial directory is already present, make sure to update its content:

cd ~/ngsdn-tutorial
git pull origin master

Download / upgrade dependencies

The VM may have shipped with an older version of the dependencies than we would like to use for the exercises. You can upgrade to the latest version using the following command:

cd ~/ngsdn-tutorial
make pull-deps

This command will download all necessary Docker images (~1.5 GB) allowing you to work off-line. For this reason, we recommend running this step ahead of the tutorial, with a reliable Internet connection.

Using an IDE to work on the exercises

During the exercises you will need to write code in multiple languages such as P4, Java, and Python. While the exercises do not prescribe the use of any specific IDE or code editor, the tutorial VM comes with Java IDE IntelliJ IDEA Community Edition, already pre-loaded with plugins for P4 syntax highlighting and Python development. We suggest using IntelliJ IDEA especially when working on the ONOS app, as it provides code completion for all ONOS APIs.

Repo structure

This repo is structured as follows:

  • p4src/ P4 implementation
  • yang/ Yang model used in exercise 2
  • app/ custom ONOS app Java implementation
  • mininet/ Mininet script to emulate a 2x2 leaf-spine fabric topology of stratum_bmv2 devices
  • util/ Utility scripts
  • ptf/ P4 data plane unit tests based on Packet Test Framework (PTF)

Tutorial commands

To facilitate working on the exercises, we provide a set of make-based commands to control the different aspects of the tutorial. Commands will be introduced in the exercises, here's a quick reference:

Make command Description
make pull-deps Pull all required dependencies
make p4-build Build P4 program
make p4-test Run PTF tests
make start Start Mininet and ONOS containers
make stop Stop all containers
make reset Stop containers and remove any state associated
make onos-cli Access the ONOS CLI (password: rocks, Ctrl+D to exit)
make onos-log Show the ONOS log
make mn-cli Access the Mininet CLI (Ctrl+C to exit)
make mn-log Show the Mininet log (i.e., the CLI output)
make app-build Build custom ONOS app
make app-reload Install and activate the ONOS app
make netcfg Push netcfg.json file (network config) to ONOS

Exercises

Click on the exercise name to see the instructions:

  1. P4 and P4Runtime basics
  2. Yang, OpenConfig, and gNMI basics
  3. Using ONOS as the control plane
  4. IPv6 routing with in-switch NDP generation

Solutions

You can find solutions for each exercise in the solution directory. Feel free to compare your solution to the reference one whenever you feel stuck.

ngsdn-tutorial's People

Contributors

bocon13 avatar ccascone 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.