Skip to content

Leaf-spine topology

Description A Full Meshed X Leaf(s), Y Spine(s) Clos topology
Components Nokia SR Linux
Topology template file templated01.clab.gotmpl
Topology variable file templated01.clab_vars.yaml
Name templated01


This lab consists of a customizable Leaf and Spine Clos topology. The number and type of SR Linux Leaf and Spine nodes is configurable, it can be set using the topology variable file templated01.clab_vars.yaml.

The type of SR Linux used and the naming prefixes can be customized as well.

  # SRL spine type
  type: ixrd3
  # number of spines
  num: 2
  # prefix of spines name: ${prefix}${index}
  prefix: spine
  # SRL leaf type
  type: ixrd3
  # number of leaves
  num: 4
  # prefix of leaf name: ${prefix}${index}
  prefix: leaf


Deploy the lab

clab deploy -t templated01.clab.gotmpl

Run script to configure the lab


The script relies on gomplate and gnmic.

  • gomplate is used to generate the necessary configuration variables based on the number of spines and leaves, their type and prefix.
  • gnmic is used to generate configuration payloads per node and push it using a gNMI Set RPC.