Skip to content

sros-labs/srv6-flexalgo-telemetry-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

238 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SRv6 FlexAlgo Telemetry Lab (Nokia SR OS)

Discord DevPod Codespaces
w212Learn more w90Learn more


πŸ“– Table of Contents


🎯 Lab Overview

This lab demonstrates traffic-engineered paths using SRv6 transport with FlexAlgo between two customer endpoints (Client1 β†’ R1 β†’ R5 β†’ Client2) with:

Component Technology
Transport Classic SRv6 (Algo 0) + FlexAlgo 128 with delay metric
Service EVPN IFL (Interface-Less) for VPRN 50
Delay Measurement STAMP (Simple Two-Way Active Measurement Protocol)
Telemetry gNMIc β†’ Prometheus β†’ Grafana

An end-to-end SRv6 transport based on Nokia SR OS routers is spanning from Access/Aggregation using (7250 IXR Gen2/2c) to Edge/Core using (7750 SR, FP4/FP5-based):

wan_nodes drawio

πŸŽ“ Learning Objectives

After completing this lab, you will understand:

  1. βœ… SRv6 locator and function concepts (End, End.DT46, End.X)
  2. βœ… FlexAlgo configuration for delay-optimized routing
  3. βœ… TWAMP-light dynamic delay measurement
  4. βœ… Streaming telemetry with gNMI subscriptions

🧠 Concepts Deep Dive

πŸ”· Understanding SRv6

Segment Routing over IPv6 (SRv6) encodes forwarding instructions in IPv6 addresses:

SRv6 Address Structure
══════════════════════════════════════════════════════════════════════

         ◄────── Locator (64 bits) ──────►◄──── Function (16 bits) ─►
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚     c128:0db8:0aaa:0101        β”‚       0001 (End)        β”‚
         β”‚                                β”‚       0040 (End.DT46)   β”‚
         β”‚     Identifies the node        β”‚       0041 (End.X)      β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚                                β”‚
                      β–Ό                                β–Ό
                "Route to me"                  "What to do here"

SRv6 Functions Used in This Lab

Function Purpose Example
End Continue to next segment Node traversal
End.X Exit via specific interface Adjacency SID
End.DT46 Decap and lookup in VRF Service termination

πŸ”· FlexAlgo Explained

Flexible Algorithm (FlexAlgo) allows multiple routing topologies using different metrics:

                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                      β”‚          FlexAlgo 128 (Delay Metric)          β”‚
                      β”‚                                               β”‚
             β”Œβ”€β”€β”€β”€β”€β”€β–Ί β”‚    R1 ─────── R3 ─────── R5    ← Lowest       β”‚
             β”‚        β”‚     β”‚   5ms    β”‚   3ms    β”‚       Delay       β”‚
             β”‚        β”‚     β”‚          β”‚          β”‚       Path        β”‚
             β”‚        β”‚     β–Ό          β–Ό          β”‚                   β”‚
             β”‚        β”‚    R2 ─────── R4 β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
             β”‚        β”‚        15ms        10ms                       β”‚
             β”‚        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Client1  ────│ OR       
             β”‚        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β”‚        β”‚          Algorithm 0 (IGP Metric)             β”‚
             β”‚        β”‚                                               β”‚
             └──────► β”‚    R1 ─────── R2 ─────── R4 ─────── R5        β”‚
                      β”‚          10         10        10              β”‚
                      β”‚                                               β”‚
                      β”‚    Shortest hop count path                    β”‚
                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

FlexAlgo Configuration Building Blocks

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  1. FLEX-ALGO DEFINITION                                            β”‚
β”‚     routing-options {                                               β”‚
β”‚         flexible-algorithm-definitions {                            β”‚
β”‚             flex-algo "flexalgo-128" {                              β”‚
β”‚                 admin-state enable                                  β”‚
β”‚                 metric-type delay    ◄── Use delay instead of IGP   β”‚
β”‚             }                                                       β”‚
β”‚         }                                                           β”‚
β”‚     }                                                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  2. ISIS PARTICIPATION                                              β”‚
β”‚     isis 0 {                                                        β”‚
β”‚         flexible-algorithms {                                       β”‚
β”‚             flex-algo 128 {                                         β”‚
β”‚                 participate true                                    β”‚
β”‚                 advertise "flexalgo-128"                            β”‚
β”‚             }                                                       β”‚
β”‚         }                                                           β”‚
β”‚     }                                                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  3. SRV6 LOCATOR WITH ALGORITHM                                     β”‚
β”‚     segment-routing {                                               β”‚
β”‚         segment-routing-v6 {                                        β”‚
β”‚             locator "loc-128" {                                     β”‚
β”‚                 algorithm 128        ◄── Bind to FlexAlgo 128       β”‚
β”‚                 prefix {                                            β”‚
β”‚                     ip-prefix c128:db8:aaa:101::/64                 β”‚
β”‚                 }                                                   β”‚
β”‚             }                                                       β”‚
β”‚         }                                                           β”‚
β”‚     }                                                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—ΊοΈ Network Topology

Screenshot 2024-03-04 at 12 52 16β€―PM

Router Types and Roles

Node Chassis Type Role SRv6 Locators
R1 7250 IXR-e2c PE (Provider Edge) c000:db8:aaa:101::/64 (Algo 0)
c128:db8:aaa:101::/64 (Algo 128)
R2 7250 IXR-e2 P (Transit) c000:db8:aaa:102::/64 (Algo 0)
c128:db8:aaa:102::/64 (Algo 128)
R3 7250 IXR-R6D P (Transit) c000:db8:aaa:103::/64 (Algo 0)
c128:db8:aaa:103::/64 (Algo 128)
R4 7750 SR-1 P (Transit) c000:db8:aaa:104::/64 (Algo 0)
c128:db8:aaa:104::/64 (Algo 128)
R5 7750 SR-1se PE (Provider Edge) c000:db8:aaa:105::/64 (Algo 0)
c128:db8:aaa:105::/64 (Algo 128)

βš™οΈ SR-SIM Configuration Deep Dive

πŸ“‹ Containerlab Topology Configuration

The lab uses nokia_srsim kind for SR OS simulation:

# Node Definition for Different Chassis Types
topology:
  kinds:
    nokia_srsim:
      image: registry.srlinux.dev/pub/nokia_srsim:25.10.R2
      license: /opt/nokia/sros/license-25.txt
      env:
        CLAB_SROS_DISABLE_COMPONENT_CONFIG: "xyz"

  nodes:
    # Simple chassis (IXR-e2c)
    R1:
      kind: nokia_srsim
      type: ixr-e2c                              # Chassis type
      mgmt-ipv4: 172.90.90.11
      startup-config: configs/R1/R1.partial.cfg

    # Multi-component chassis (IXR-R6D)
    R3:
      kind: nokia_srsim
      type: ixr-r6d
      components:
        - slot: A                                 # CPM slot
        - slot: 1
          type: cpm-ixr-r6d/iom-ixr-r6d          # Line card type
      env:
        NOKIA_SROS_SFM: cpm-ixr-r6d/iom-ixr-r6d
        NOKIA_SROS_MDA_1: m5-100g-qsfp28          # MDA type

πŸ“‹ SRv6 Segment Routing Configuration

╔═══════════════════════════════════════════════════════════════════════╗
β•‘                    SRv6 CONFIGURATION HIERARCHY                       β•‘
╠═══════════════════════════════════════════════════════════════════════╣
β•‘                                                                       β•‘
β•‘  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘  β”‚ 1. GLOBAL SRV6 LOCATORS (segment-routing context)               β”‚  β•‘
β•‘  β”‚                                                                 β”‚  β•‘
β•‘  β”‚    segment-routing {                                            β”‚  β•‘
β•‘  β”‚        segment-routing-v6 {                                     β”‚  β•‘
β•‘  β”‚            locator "loc-0" {              ◄── Algorithm 0       β”‚  β•‘
β•‘  β”‚                admin-state enable                               β”‚  β•‘
β•‘  β”‚                block-length 48            ◄── Prefix portion    β”‚  β•‘
β•‘  β”‚                prefix {                                         β”‚  β•‘
β•‘  β”‚                    ip-prefix c000:db8:aaa:101::/64              β”‚  β•‘
β•‘  β”‚                }                                                β”‚  β•‘
β•‘  β”‚            }                                                    β”‚  β•‘
β•‘  β”‚            locator "loc-128" {            ◄── FlexAlgo 128      β”‚  β•‘
β•‘  β”‚                admin-state enable                               β”‚  β•‘
β•‘  β”‚                block-length 48                                  β”‚  β•‘
β•‘  β”‚                algorithm 128              ◄── Bound to FlexAlgo β”‚  β•‘
β•‘  β”‚                prefix {                                         β”‚  β•‘
β•‘  β”‚                    ip-prefix c128:db8:aaa:101::/64              β”‚  β•‘
β•‘  β”‚                }                                                β”‚  β•‘
β•‘  β”‚            }                                                    β”‚  β•‘
β•‘  β”‚        }                                                        β”‚  β•‘
β•‘  β”‚    }                                                            β”‚  β•‘
β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘                                                                       β•‘
β•‘  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘  β”‚ 2. ISIS SRV6 ADVERTISEMENT                                      β”‚  β•‘
β•‘  β”‚                                                                 β”‚  β•‘
β•‘  β”‚    isis 0 {                                                     β”‚  β•‘
β•‘  β”‚        segment-routing-v6 {                                     β”‚  β•‘
β•‘  β”‚            admin-state enable                                   β”‚  β•‘
β•‘  β”‚            locator "loc-0" {                                    β”‚  β•‘
β•‘  β”‚                level-capability 2         ◄── Advertise in L2   β”‚  β•‘
β•‘  β”‚            }                                                    β”‚  β•‘
β•‘  β”‚            locator "loc-128" {                                  β”‚  β•‘
β•‘  β”‚                level-capability 2                               β”‚  β•‘
β•‘  β”‚            }                                                    β”‚  β•‘
β•‘  β”‚        }                                                        β”‚  β•‘
β•‘  β”‚    }                                                            β”‚  β•‘
β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘                                                                       β•‘
β•‘  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘  β”‚ 3. SRV6 FUNCTIONS FOR BASE ROUTING                              β”‚  β•‘
β•‘  β”‚                                                                 β”‚  β•‘
β•‘  β”‚    base-routing-instance {                                      β”‚  β•‘
β•‘  β”‚        locator "loc-0" {                                        β”‚  β•‘
β•‘  β”‚            function {                                           β”‚  β•‘
β•‘  β”‚                end 1 {                    ◄── Node SID          β”‚  β•‘
β•‘  β”‚                    srh-mode usp           ◄── Ultimate Segment  β”‚  β•‘
β•‘  β”‚                }                               Pop              β”‚  β•‘
β•‘  β”‚                end-x-auto-allocate usp    ◄── Adjacency SIDs    β”‚  β•‘
β•‘  β”‚                    protection protected                         β”‚  β•‘
β•‘  β”‚            }                                                    β”‚  β•‘
β•‘  β”‚        }                                                        β”‚  β•‘
β•‘  β”‚    }                                                            β”‚  β•‘
β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸ“‹ VPRN Service with SRv6 FlexAlgo

╔═══════════════════════════════════════════════════════════════════════╗
β•‘                    VPRN 50 - FlexAlgo 128 Service                     β•‘
╠═══════════════════════════════════════════════════════════════════════╣
β•‘                                                                       β•‘
β•‘    service {                                                          β•‘
β•‘        vprn "50" {                                                    β•‘
β•‘            admin-state enable                                         β•‘
β•‘            description "vprn_using_flex-algo_128_srv6"                β•‘
β•‘            customer "1"                                               β•‘
β•‘                                                                       β•‘
β•‘            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘            β”‚  SRv6 Instance - Binds service to FlexAlgo locator    β”‚  β•‘
β•‘            β”‚                                                       β”‚  β•‘
β•‘            β”‚  segment-routing-v6 1 {                               β”‚  β•‘
β•‘            β”‚      locator "loc-128" {    ◄── Uses FlexAlgo 128     β”‚  β•‘
β•‘            β”‚          function {                                   β”‚  β•‘
β•‘            β”‚              end-dt46 { }   ◄── Decap & VRF lookup    β”‚  β•‘
β•‘            β”‚          }                                            β”‚  β•‘
β•‘            β”‚      }                                                β”‚  β•‘
β•‘            β”‚  }                                                    β”‚  β•‘
β•‘            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘                                                                       β•‘
β•‘            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘            β”‚  BGP-EVPN Control Plane                               β”‚  β•‘
β•‘            β”‚                                                       β”‚  β•‘
β•‘            β”‚  bgp-evpn {                                           β”‚  β•‘
β•‘            β”‚      segment-routing-v6 1 {                           β”‚  β•‘
β•‘            β”‚          admin-state enable                           β”‚  β•‘
β•‘            β”‚          route-distinguisher "1.1.1.1:50"             β”‚  β•‘
β•‘            β”‚          vrf-target {                                 β”‚  β•‘
β•‘            β”‚              community "target:100:50"                β”‚  β•‘
β•‘            β”‚          }                                            β”‚  β•‘
β•‘            β”‚          vrf-import {                                 β”‚  β•‘
β•‘            β”‚              policy ["vprn50"]  ◄── Applies FlexAlgo  β”‚  β•‘
β•‘            β”‚          }                                            β”‚  β•‘
β•‘            β”‚          srv6 {                                       β”‚  β•‘
β•‘            β”‚              instance 1                               β”‚  β•‘
β•‘            β”‚              default-locator "loc-128"                β”‚  β•‘
β•‘            β”‚          }                                            β”‚  β•‘
β•‘            β”‚      }                                                β”‚  β•‘
β•‘            β”‚  }                                                    β”‚  β•‘
β•‘            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘                                                                       β•‘
β•‘            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘            β”‚  Customer Interface                                   β”‚  β•‘
β•‘            β”‚                                                       β”‚  β•‘
β•‘            β”‚  interface "to-Client1" {                             β”‚  β•‘
β•‘            β”‚      ipv4 {                                           β”‚  β•‘
β•‘            β”‚          primary {                                    β”‚  β•‘
β•‘            β”‚              address 172.17.11.1                      β”‚  β•‘
β•‘            β”‚              prefix-length 30                         β”‚  β•‘
β•‘            β”‚          }                                            β”‚  β•‘
β•‘            β”‚      }                                                β”‚  β•‘
β•‘            β”‚      sap 1/1/c3/1 { }        ◄── Service Access Point β”‚  β•‘
β•‘            β”‚  }                                                    β”‚  β•‘
β•‘            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘        }                                                              β•‘
β•‘    }                                                                  β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸ“‹ TWAMP-Light Delay Measurement

╔════════════════════════════════════════════════════════════════════════╗
β•‘                    DYNAMIC DELAY MEASUREMENT                           β•‘
╠════════════════════════════════════════════════════════════════════════╣
β•‘                                                                        β•‘
β•‘  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘  β”‚ Interface Delay Configuration                                    β”‚  β•‘
β•‘  β”‚                                                                  β”‚  β•‘
β•‘  β”‚    interface "to-R3" {                                           β”‚  β•‘
β•‘  β”‚        if-attribute {                                            β”‚  β•‘
β•‘  β”‚            delay {                                               β”‚  β•‘
β•‘  β”‚                delay-selection dynamic  ◄── Use measured delay   β”‚  β•‘
β•‘  β”‚                dynamic {                                         β”‚  β•‘
β•‘  β”‚                    measurement-template "standard-direct"        β”‚  β•‘
β•‘  β”‚                    twamp-light {                                 β”‚  β•‘
β•‘  β”‚                        ipv4 {                                    β”‚  β•‘
β•‘  β”‚                            admin-state enable                    β”‚  β•‘
β•‘  β”‚                        }                                         β”‚  β•‘
β•‘  β”‚                    }                                             β”‚  β•‘
β•‘  β”‚                }                                                 β”‚  β•‘
β•‘  β”‚            }                                                     β”‚  β•‘
β•‘  β”‚        }                                                         β”‚  β•‘
β•‘  β”‚    }                                                             β”‚  β•‘
β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘                                                                        β•‘
β•‘  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘  β”‚ TWAMP-Light Reflector (responds to probes)                       β”‚  β•‘
β•‘  β”‚                                                                  β”‚  β•‘
β•‘  β”‚    twamp-light {                                                 β”‚  β•‘
β•‘  β”‚        reflector {                                               β”‚  β•‘
β•‘  β”‚            admin-state enable                                    β”‚  β•‘
β•‘  β”‚            udp-port 862              ◄── Standard TWAMP port     β”‚  β•‘
β•‘  β”‚            prefix 0.0.0.0/0 { }      ◄── Accept from any source  β”‚  β•‘
β•‘  β”‚        }                                                         β”‚  β•‘
β•‘  β”‚    }                                                             β”‚  β•‘
β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘                                                                        β•‘
β•‘  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘  β”‚ Measurement Template                                             β”‚  β•‘
β•‘  β”‚                                                                  β”‚  β•‘
β•‘  β”‚    test-oam {                                                    β”‚  β•‘
β•‘  β”‚        link-measurement {                                        β”‚  β•‘
β•‘  β”‚            measurement-template "standard-direct" {              β”‚  β•‘
β•‘  β”‚                admin-state enable                                β”‚  β•‘
β•‘  β”‚                aggregate-sample-window {                         β”‚  β•‘
β•‘  β”‚                    multiplier 5         ◄── 5 samples per window β”‚  β•‘
β•‘  β”‚                    window-integrity 1                            β”‚  β•‘
β•‘  β”‚                    threshold {                                   β”‚  β•‘
β•‘  β”‚                        relative 50      ◄── % change threshold   β”‚  β•‘
β•‘  β”‚                        absolute 50      ◄── Absolute threshold   β”‚  β•‘
β•‘  β”‚                    }                                             β”‚  β•‘
β•‘  β”‚                }                                                 β”‚  β•‘
β•‘  β”‚            }                                                     β”‚  β•‘
β•‘  β”‚        }                                                         β”‚  β•‘
β•‘  β”‚    }                                                             β”‚  β•‘
β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸ“‹ Policy for FlexAlgo Route Import

╔═══════════════════════════════════════════════════════════════════════╗
β•‘                    FLEXALGO IMPORT POLICY                             β•‘
╠═══════════════════════════════════════════════════════════════════════╣
β•‘                                                                       β•‘
β•‘    policy-options {                                                   β•‘
β•‘        community "vprn50" {                                           β•‘
β•‘            member "target:100:50" { }                                 β•‘
β•‘        }                                                              β•‘
β•‘                                                                       β•‘
β•‘        policy-statement "vprn50" {                                    β•‘
β•‘            entry 10 {                                                 β•‘
β•‘                from {                                                 β•‘
β•‘                    community {                                        β•‘
β•‘                        name "vprn50"        ◄── Match RT community    β•‘
β•‘                    }                                                  β•‘
β•‘                }                                                      β•‘
β•‘                action {                                               β•‘
β•‘                    action-type accept                                 β•‘
β•‘                    flex-algo 128            ◄── Force FlexAlgo 128    β•‘
β•‘                }                              resolution for routes   β•‘
β•‘            }                                                          β•‘
β•‘        }                                                              β•‘
β•‘    }                                                                  β•‘
β•‘                                                                       β•‘
β•‘    This ensures all VPRN 50 routes use the delay-optimized path!      β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸš€ Quick Start

Prerequisites

Requirement Version Notes
Docker Latest Container runtime
containerlab β‰₯ 0.71 Lab orchestration
Nokia SR-SIM image 25.7.R1+ SR OS simulation
License file Valid Required for SR-SIM

Option 1: Cloud-Based (Recommended for Quick Start)

Click one of the badges at the top to launch in:

  • GitHub Codespaces - Zero local setup required
  • DevPod - Portable dev environment

Option 2: Local Deployment

# Clone the repository
git clone https://github.com/sros-labs/srv6-flexalgo-telemetry-lab.git
cd srv6-flexalgo-telemetry-lab

# Deploy the lab
clab deploy --reconfigure

# Wait for all nodes to boot (approximately 2 minutes for SR-SIM)
watch -n 5 'docker ps --format "table {{.Names}}\t{{.Status}}"'

Verify Deployment

# Check all containers are running
docker ps

# Connect to routers
ssh admin@R1    # Password: admin
ssh admin@R5    # Password: admin

# Access telemetry
open http://localhost:3000   # Grafana (admin/admin)
open http://localhost:9090   # Prometheus

πŸ”¬ Checking the Lab

Check 1: Explore SRv6 Locators

A:admin@R1# show router segment-routing srv6 locator 

=========================================================================================
Segment Routing v6 Locators
=========================================================================================
Name                              Admin   Operational  Function    Prefix
                                  State   State        Count
-----------------------------------------------------------------------------------------
loc-0                             Up      Up           3           c000:db8:aaa:101::/64
loc-128                           Up      Up           3           c128:db8:aaa:101::/64
-----------------------------------------------------------------------------------------
No. of SRv6 Locators: 2

🎯 What to observe:

  • Two locators: one for Algo 0, one for FlexAlgo 128
  • Different prefix schemes (c000 vs c128)

Check 2: Verify FlexAlgo Participation

A:admin@R1# show router isis flexible-algorithms 

===============================================================================
ISIS Flexible Algorithms
===============================================================================
Flex-Algo   Metric Type    Advertised FAD         
-------------------------------------------------------------------------------
128         delay          flexalgo-128           
-------------------------------------------------------------------------------
No. of Flex-Algos: 1

Check 3: Verify ISIS SRv6 Endpoints

A:admin@R1# show router isis srv6-endpoint 

===============================================================================
SRv6 Endpoints
===============================================================================
SID                                          Endpoint  Locator    
-------------------------------------------------------------------------------
c000:db8:aaa:101::1                          End       loc-0      
c000:db8:aaa:101::40                         End.DT46  loc-0      
c128:db8:aaa:101::1                          End       loc-128    
c128:db8:aaa:101::40                         End.DT46  loc-128    
-------------------------------------------------------------------------------
No. of SRv6 Endpoints: 4

Check 4: View FlexAlgo Path Calculation

A:admin@R1# show router isis flex-algo 128 spf-log 

===============================================================================
ISIS Flex-Algo 128 SPF Log
===============================================================================
When                  Duration     Reason
-------------------------------------------------------------------------------
2024-03-04 12:30:15   2ms          Link delay change
2024-03-04 12:25:10   3ms          Initial calculation
-------------------------------------------------------------------------------

Check 5: Verify VPRN Service

A:admin@R1# show service id 50 base 

===============================================================================
Service Basic Information
===============================================================================
Service Id        : 50
Service Type      : VPRN
Customer Id       : 1
Description       : vprn_using_flex-algo_128_srv6
Admin State       : Up
Oper State        : Up

===============================================================================
SRv6 Information
===============================================================================
Locator           : loc-128
Function          : End.DT46

Check 6: Verify Link Delays

A:admin@R1# show router interface "to-R3" delay 

===============================================================================
Interface Delay Information
===============================================================================
Interface         : to-R3
Delay Selection   : dynamic
Current Delay     : 8 microseconds
Last Update       : 2024-03-04 12:35:00

TWAMP-Light Status: Active
Measurement Template: standard-direct

Check 7: Trace Traffic Path

A:admin@R1# traceroute 50.0.0.5 source 50.0.0.1 

traceroute to 50.0.0.5, 30 hops max, 60 byte packets
 1  192.168.13.2 (R3)  2.103 ms
 2  192.168.35.2 (R5)  4.215 ms
 3  50.0.0.5           5.891 ms

# Note: Path goes via R3 (lower delay) instead of R2-R4 (higher delay)

πŸ“Š Telemetry Stack

Nowadays, observability is becoming essential for every organisation. An open source GPG (gnmic/prometheus/grafana) telemetry stack is used to collect and report all the objects of interest via Telemetry/gRPC (links delay, interfaces state, metrics, cpu, mem, etc.).

gnmic is then using prometheus TSDB as output for storing the metrics which can then be fetched by Grafana for monitoring (PromQL).

╔═══════════════════════════════════════════════════════════════════════╗
β•‘                    TELEMETRY DATA FLOW                                β•‘
╠═══════════════════════════════════════════════════════════════════════╣
β•‘                                                                       β•‘
β•‘                                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”                        β•‘
β•‘                                    β”‚         β”‚                        β•‘
β•‘                                    β”‚         β”‚                        β•‘
β•‘    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   gNMI Subscribe    β”‚  gNMIc  β”‚                        β•‘
β•‘    β”‚  R1-R5  β”‚ ─────────────────►  β”‚         β”‚                        β•‘
β•‘    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β”‚  :9804  β”‚                        β•‘
β•‘                                    β”‚         β”‚                        β•‘
β•‘                                    β”‚         β”‚                        β•‘
β•‘                                    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜                        β•‘
β•‘                                         β”‚                             β•‘
β•‘                                    Prometheus                         β•‘
β•‘                                    Remote Write                       β•‘
β•‘                                         β”‚                             β•‘
β•‘                                         β–Ό                             β•‘
β•‘                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      β•‘
β•‘                                  β”‚ Prometheus  β”‚                      β•‘
β•‘                                  β”‚   :9090     β”‚                      β•‘
β•‘                                  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜                      β•‘
β•‘                                         β”‚                             β•‘
β•‘                                    PromQL                             β•‘
β•‘                                    Queries                            β•‘
β•‘                                         β”‚                             β•‘
β•‘                                         β–Ό                             β•‘
β•‘                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      β•‘
β•‘                                  β”‚   Grafana   β”‚                      β•‘
β•‘                                  β”‚   :3000     β”‚                      β•‘
β•‘                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                      β•‘
β•‘                                                                       β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Collected Telemetry Paths

# gNMIc Configuration Excerpt
subscriptions:
  - /state/router[router-name=Base]/interface[interface-name=*]/statistics
  - /state/router[router-name=Base]/isis[isis-instance=0]/statistics
  - /state/system/cpu[sample-period=*]
  - /state/system/memory-pools
  - /state/test-oam/link-measurement

Grafana Dashboards

Dashboard Metrics Displayed
Interface Statistics Throughput, errors, discards per interface
Link Delay TWAMP-measured delay per link
BGP Overview Peers, routes, states
System Resources CPU, memory utilization
Flow Visualization Traffic flow through the network

Using Grafana dashboard, it is possible to get direct correlation between the sum of TWAMP delay measurement on individual links and the IPv6 route table as shown below:

Screenshot 2024-03-04 at 1 03 17β€―PM

Access Telemetry

# Grafana UI
http://localhost:3000
# Credentials: admin/admin

# Prometheus UI
http://localhost:9090

# gNMIc metrics endpoint
http://localhost:9804/metrics

πŸ”§ Traffic Generation & Delay Manipulation

Start Traffic

# Generate 2Mbps UDP traffic from Client1 to Client2
./start_traffic.sh

# Or manually from Client1
docker exec -it client1 iperf3 -c 172.17.44.2 -u -b 2M -t 3600

Stop Traffic

./stop_traffic.sh

# Or manually
docker exec -it client1 pkill iperf3

Manipulate Link Delay (Force Path Change!)

# Add 100ms delay to R1-R2 link (makes R1-R3 path preferred)
containerlab tools netem set -n R1 -i eth1 --delay 100ms

# Add delay to R1-R3 link (may shift traffic to R2)
containerlab tools netem set -n R1 -i eth2 --delay 200ms

# Remove delay
containerlab tools netem set -n R1 -i eth1 --delay 0ms

🎯 Experiment: Watch FlexAlgo Adapt

  1. Before: Check the path in Grafana Flow dashboard
  2. Add delay: containerlab tools netem set -n R1 -i eth2 --delay 100ms
  3. Wait: 30-60 seconds for TWAMP to measure new delay
  4. Observe: FlexAlgo recalculates and traffic shifts!
  5. Verify: Check ISIS SPF log and path trace

πŸ“š References

Nokia Documentation

Standards

Tools


🧹 Lab Cleanup

# Destroy the lab and remove all resources
clab destroy --cleanup

πŸ“ License

This lab is provided for educational purposes. Nokia SR OS requires a valid license.


Built with ❀️ for the Network Community

Star History

About

Demonstrating Nokia SR OS SRv6 with FlexAlgo capabilities

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •