Think in topologies¶
A .clab.yml file describes the nodes and links in your network. The apps turn that file into an interactive canvas, and changes in the editor become changes in the topology.
Follow the connections¶
This fabric has two spines, three leaves, and three clients. Each leaf connects to both spines. Scroll over the diagram to zoom, or drag the canvas to pan.
name: fabric
topology:
defaults:
kind: nokia_srlinux
image: ghcr.io/nokia/srlinux:latest
nodes:
spine1:
type: ixrd3
spine2:
type: ixrd3
leaf1:
type: ixrd2
leaf2:
type: ixrd2
leaf3:
type: ixrd2
client1:
kind: linux
image: ghcr.io/srl-labs/network-multitool:latest
client2:
kind: linux
image: ghcr.io/srl-labs/network-multitool:latest
client3:
kind: linux
image: ghcr.io/srl-labs/network-multitool:latest
links:
- endpoints: [spine1:e1-1, leaf1:e1-49]
- endpoints: [spine1:e1-2, leaf2:e1-49]
- endpoints: [spine1:e1-3, leaf3:e1-49]
- endpoints: [spine2:e1-1, leaf1:e1-50]
- endpoints: [spine2:e1-2, leaf2:e1-50]
- endpoints: [spine2:e1-3, leaf3:e1-50]
- endpoints: [leaf1:e1-1, client1:eth1]
- endpoints: [leaf2:e1-1, client2:eth1]
- endpoints: [leaf3:e1-1, client3:eth1]
name: fabric
topology:
defaults:
kind: nokia_srlinux
image: ghcr.io/nokia/srlinux:latest
nodes:
spine1:
type: ixrd3
spine2:
type: ixrd3
leaf1:
type: ixrd2
leaf2:
type: ixrd2
leaf3:
type: ixrd2
client1:
kind: linux
image: ghcr.io/srl-labs/network-multitool:latest
client2:
kind: linux
image: ghcr.io/srl-labs/network-multitool:latest
client3:
kind: linux
image: ghcr.io/srl-labs/network-multitool:latest
links:
- endpoints: [spine1:e1-1, leaf1:e1-49]
- endpoints: [spine1:e1-2, leaf2:e1-49]
- endpoints: [spine1:e1-3, leaf3:e1-49]
- endpoints: [spine2:e1-1, leaf1:e1-50]
- endpoints: [spine2:e1-2, leaf2:e1-50]
- endpoints: [spine2:e1-3, leaf3:e1-50]
- endpoints: [leaf1:e1-1, client1:eth1]
- endpoints: [leaf2:e1-1, client2:eth1]
- endpoints: [leaf3:e1-1, client3:eth1]Open the fabric example to inspect nodes alongside their YAML and download the topology.
Topology editor¶
TopoViewer is the shared canvas and source editor.
Use it to:
- add nodes from built-in or custom templates
- drag nodes, networks, and annotations from the palette to the canvas
- create links between nodes
- edit node, link, lab, and annotation properties
- move nodes and arrange the lab
- add free text, shapes, groups, and interface labels
- edit the topology YAML and annotations JSON, including in split view
- save topology changes back to files
When the lab is not running, TopoViewer opens in editor mode. Editor mode allows topology changes and writes them back to the topology file.
When the lab is running, TopoViewer opens in viewer mode. Viewer mode focuses on operational actions and avoids accidental topology changes while the deployed lab is active. You can unlock the canvas when you need to edit visual annotations.
The toolbar also includes Bulk Link Devices, Find Node, Fit to Viewport, Link Labels, and Toggle YAML Split View. Bulk linking is useful for leaf-spine and numbered topologies: match node names with patterns such as leaf*, spine*, srl?, or leaf(\d+) to spine$1, then confirm the generated links before they are added.
Keep topology and presentation separate¶
The YAML defines the actual lab: device kinds, images, interfaces, and configuration. An optional .annotations.json file stores how that topology is presented: positions, icon choices, text, and groups.
Moving a node on the canvas does not change its network connections. Editing the topology file does.
Work visually or in YAML¶
In the app, use the node palette to add devices and the link tools to connect their interfaces. The YAML editor is useful for repeated configurations, defaults, and more detailed node properties. Use layouts and templates to arrange the canvas and reuse device definitions. See export and share to capture or publish the result.
The diagrams in this documentation use a read-only version of that viewer. You can pan, zoom, inspect, and download a topology; edit or deploy it in one of the apps.
Go deeper¶
The core containerlab documentation remains the reference for topology syntax, node properties, supported kinds, and networking.