Skip to content

Blog#

SR Linux Syntax Highlighting with Pygments

For a very long time, I wanted to make a syntax highlighter for the SR Linux command-line interface mainly because I belong to a cohort of readers who appreciate visual aids in lengthy CLI snippets. Give me a piece of code that is not syntax highlighted, and my reading speed will significantly drop.

And even though the Network OS CLI snippets do not contain code per-se, they have markers (such as a current command, IP addresses, up/down statuses, etc.) that when highlighted, contribute to the clarity of the provided snippet.

So during a lazy first Thursday of 2023 I finally made myself looking into it and created the srlinux-pygments - a Pygments lexer to highlight SR Linux CLI snippets.

--{ * candidate shared default }--[ network-instance black ]--
A:leaf1# info static-routes
        static-routes {
            route 192.168.18.0/24 {
                admin-state enable
                metric 1
                preference 5
                next-hop-group static-ipv4-grp
            }
            route 2001:1::192:168:18:0/64 {
                admin-state enable
                metric 1
                preference 6
                next-hop-group static-ipv6-grp
            }
        }
--{ * candidate shared default }--[ network-instance black ]--
A:leaf1# info static-routes
        static-routes {
            route 192.168.18.0/24 {
                admin-state enable
                metric 1
                preference 5
                next-hop-group static-ipv4-grp
            }
            route 2001:1::192:168:18:0/64 {
                admin-state enable
                metric 1
                preference 6
                next-hop-group static-ipv6-grp
            }
        }

Jump under the cut to know how to create a custom syntax highlighter based on SR Linux CLI example and integrate it with mkdocs-material doc theme.

Using Ansible with SR Linux's JSON-RPC Interface

A few days after we fleshed out our JSON-RPC Basics tutorial, and we are releasing another one. While basics tutorial is essential to read to understand how the interface works, the curl utility we used in the examples there is not something you would like to automate your network with.

Quite a lot of network ops teams we've been talking to used Ansible to manage their infra, and they wanted to keep using it for network automation as well. While this is a questionable tactic, we still can give you the "fishing rod".

Please welcome - Using Ansible with SR Linux's JSON-RPC Interface tutorial, which puts our JSON-RPC interface to work under Ansible command through a set of task-oriented exercises.

JSON-RPC Management Interface

Nokia SR Linux Network OS architecture has been built on strong principles of model-driven APIs and interfaces. Not a single thing in SR Linux datastores can get away without having a matching YANG module describing it.

The ground-up model-driven approach allowed us to build management interfaces that don't have shortness of sight as every interface, in essence, uses the common API layer presented by the management server. One of such interfaces - JSON-RPC - that SR Linux offers has been in the shade of a cool-kid gNMI, though JSON-RPC has lots to offer.

We are glad to present you with an in-depth tutorial on SR Linux's JSON-RPC interface - JSON-RPC Basics.

In this tutorial, we explain the JSON-RPC capabilities and provide practical examples for every method this interface offers. Be it retrieval of state, model-driven configuration using JSON, or pushing CLI-styled commands - JSON-RPC has you covered.

Basic IXP Lab with OpenBGPd Route Server

Almost every Internet eXchange Point (IXP) leverages a Router Server (RS) to simplify peering between members of the exchange who exercise an open policy peering. A Route Server is a software component connected to the IXP network which acts as a BGP speaker with whom members peer to receive BGP updates from each other.

Nowadays, IXPs predominantly use BIRD routing daemon as a Route Server, but for diversity and sustainability reasons Route Server Support Foundation initiated a program to introduce other software solutions, like OpenBGPd, to the IXP market.

While OpenBGPd is not a new kid on the block of software BGP implementations, it is less known in the IXP domain (compared to BIRD). Lots of IXPs are interested in introducing OpenBGPd as a second Route Server in their networks and this lab opens the doors to explore "OpenBGPd as a Route Server" use case.

Design, Deploy, And Operate With Nokia Data Center Fabric Solution

Packet Pushers

In this Heavy Networking piece we’re talking data center operations and automation. Data centers aren’t immune from the pressures being felt across the IT organization: things like enabling new applications and services more quickly, getting better visibility to monitor performance and speed up troubleshooting, and tying into new capabilities that come from automation, APIs, containers, and microservices.

Today’s sponsor, Nokia, has been thinking about these pressures, and is here to talk about its fabric-based approach to the data center. That approach includes its SR Linux network OS, its Fabric Services System intent-based platform, its NetOps Development Kit, or NDK, and how all this ties together to address your operational life cycle across Day zero, Day 1, Day Two, and beyond.

Participants: Bruce Wallis

Configuration backup with Event Handler

The year is 2023. You wake up to a subtle 'ping' from your phone 📱, signifying there is a message from someone important. Still half asleep you reach out and grab it, glancing at the screen. It says: "The network went out - you're fired!"

Rollback to the present day, where I can confidentially share that this is exactly the kind of scenario that our engineers had in mind when they designed the new Event Handler feature for SR Linux. Because you can never have enough flexibility to add just the right amount of automation, configuring things properly and - critically - keeping track of changes to the configuration (and whichever #!$!! person made them)

SR Linux Blog Launch

Openness, extensibility, innovation and community focus make a large part of the Nokia SR Linux core. Mix it up with our engineering background and you get a resource where we share technical content in the engineers-to-engineers fashion.

Today we would like to take it one step further and augment the learn.srlinux.dev portal with a community blog section where Nokia engineers and our community members can post content relevant to modern network technologies.

This blog post explains how to contribute a blog article to our portal and what visual candies you can use to make your post look awesome.

Develop Custom Network Apps With Nokia’s SR Linux NDK

Packet Pushers

In this Tech Bytes podcast we talk with sponsor Nokia about its SR Linux network OS. More specifically, because SR Linux is open, customers can write homegrown applications to solve specific problems with the network OS using Nokia’s NetOps Development Kit (NDK).

The NDK provides documentation and examples to help you write apps quickly and easily. The NDK supports industry standards including YANG, gRPC, and gNMI. Is this a good idea? Do customers actually do this?

Participants: Jon Lundstrom