Skip to content

stratum/tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Stratum Tutorials

This repository contains the "getting started" tutorial. At the bottom of this page, there are more links to other more advanced tutorials that leverage Stratum.

"Getting Started" Tutorial

This tutorial will teach you how to start a Mininet network of Stratum software switches (backed by bmv2).

The basic tutorial will show you how to use the P4Runtime shell and Stratum's gNMI client to connect to a Stratum switch as well as how to connect the switch to the ONOS controller.

The Trellis tutorial will show you how to start a 2x2 leaf-spine fabric topology, start ONOS with the required Trellis applicaitons, and push the configuration to get everything connected.

Starting a Mininet topology of Stratum switches

This tutorial uses Docker. If it is not installed, follow these instructions to install it.

There is a Docker container with Mininet and the Stratum BMv2 switch preinstalled: opennetworking/mn-stratum

We can use the following command to start the container:

docker run --privileged --rm -it -p 50001:50001 opennetworking/mn-stratum

This will start a single switch and connect two Mininet hosts to switch ports 1 and 2.

Note on the Docker flags:

  • --privileged is required to create network namespaces and virtual interfaces
  • --rm will remove the container upon exit
  • -it will allocate a TTY and run the container in interactive mode
  • -p 50001:50001 will publish the Stratum switch's gRPC port to the host. By default, Mininet will allocate gRPC ports to the switches sequentially starting at 50001.

You can also pass standard Mininet arguments. For example to start a 3 switch linear topology, append: --topo linear,3

To see a full list of Mininet arguments by appending -h to the Docker command.

Basic Tutorial

You can find the basic tutorial in the basic directory.

Trellis Tutorial

You can find the Trellis tutorial in the trellis directory.

NG-SDN (Next-Generation SDN) Tutorial

To learn more about Stratum's northbound interfaces (P4Runtime, gNMI and gNOI), you can find the NG-SDN tutorial in the ngsdn-tutorial repo.

ONF Connect 2019 Interoperability Demo

If you'd like to try Stratum out on hardware, you can find the code in the stratum-onos-demo repo to reproduce the ONF Connect 2019 Interoperability Demo.

P4 Tutorials

To learn P4, you can find a basic tutorial in the p4lang/tutorials repo.

For a more advanced tutorial that use ONOS and Stratum in an SRv6 fabric, you can try the onos-p4-tutorial.

About

Stratum "Getting Started" Tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published