Giter VIP home page Giter VIP logo

mixed_mode_rollback's Introduction

Rollback demo using mixed management mode in SROS

In this demo, we will be using a simple containerlab topology with two containers. The DUT will be an SROS container operating in mixed management mode. The other container will be running SR Linux.

When the topology is launched, it will come up with a single link between the two devices. We will have an iBGP session running between the two devices' loopbacks, the IGP will be ISIS.

For the rollback test, we will be changing the ISIS configuration causing the ISIS adjacency to fail, which will trigger the iBGP session to fail.

We will finally use the rollback point to revert the changes, allowing ISIS and iBGP to restore.

Lab Steps

Step 1: Launching the demo

Make sure to have the latest containerlab installed.

you can check this with sudo clab version upgrade

Deploy the lab topology with the -c switch - this will always make sure that the lab is loaded from scratch, if you leave that off, it will load whatever the last state was from the configuration artifacts

sudo clab deploy -t topo.yml -c

When the topology finishes booting, you will have the following starting state.

Note that sros will be running in mixed-mode.


  1.1.1.1/32                    2.2.2.2/32
 ┌──────────┐                  ┌──────────┐
 │          │   12.12.12.0/31  │          │  
 │  sros    ├──────────────────┤   srl    │
 │          │.0              .1│          │
 │          │                  │ agg:12/8 │
 └──────────┘                  └──────────┘
                ISIS: 49.0001
                iBGP: 65001

Step 2: Running the script

Running in mixed-mode precludes us from using pysros. In order to achieve the goals of this script, I chose to utilize two different applications - pygnmi and netmiko

The cleanest way to install these is to run a python virtual env for this demo script:

python3 -m venv venv
source venv/bin/activate
pip install netmiko
pip install pygnmi

Once you have the prereqs installed and the topology is running in your containerlab, we can run the script.

The script is in the scripts directory, so I am assuming you are in the scripts directory when running the command

python rollback_demo.py

What the script does is very simple -

  • netmiko Saves a rollback point in SROS
  • pygnmi Changes the ISIS level-capability to 1, causing the ISIS adj to go down since the interfaces are set to level 2
  • pygnmi Checks the state of the ISIS adj, and if it is down, calls for a rollback
  • netmiko Performs a rollback

mixed_mode_rollback's People

Contributors

drewelliott avatar

Stargazers

Rodrigo H Padilla 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.