Code Monkey home page Code Monkey logo

stratum-tofino-model-test's Introduction

Multiple tofino-model + Stratum instances

Work-in-progress!

Instructions

sudo docker-compose rm --force
#  --build
sudo docker-compose up --force-recreate --abort-on-container-exit --scale tofino_model=2

Linking tofino-model veth ports to host

This is only a rough sketch on how to achive it:

  1. Create n tofino-model + Stratum instances
  2. Create the veth pair (stratumveth000 , stratumveth001) for every tofino-model port for the n instances.
  3. Leave stratumveth000 in the "root" namespace in the host system, the other one stratumveth001 in the Docker container network namespace
  4. Bridge the stratumveth001 inside container to veth0 (= the first port of tofino-model)

Now, the stratumveth000 in the root namespace is connected with veth0 inside the first tofino-model container!

sudo ./link_ports.py --verbose

Voilá, the first port of the tofino-model switch is linked from within the Docker container into a host "root" namespace veth named stratumveth000.

The stratumvethXXX interfaces are deleted after you stop the Docker containers.

This is a very nice explanation/guide-through of network namespaces, especially for Docker.

stratum-tofino-model-test's People

Contributors

davidgengenbach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

liuliuliu0605

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.