From networklabs
Use when deploying, destroying, inspecting, or interacting with containerlab topologies and SR Linux nodes. Triggers on containerlab, clab, srlinux, topology files, or network lab setup and teardown.
How this skill is triggered — by the user, by Claude, or both
Slash command
/networklabs:containerlabThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reference for deploying, inspecting, and tearing down containerlab-based SR Linux labs.
Reference for deploying, inspecting, and tearing down containerlab-based SR Linux labs.
containerlab deploy -t <path>.clab.yml
containerlab deploy -t <path>.clab.yml --reconfigure # destroy lab first, then redeploy clean
containerlab deploy -t <path>.clab.yml --node-filter <node1,node2>
containerlab destroy -t <path>.clab.yml --cleanup
containerlab destroy --name <lab-name> --cleanup
Always use --cleanup to remove generated certs and artifacts.
containerlab inspect --all # all running labs
containerlab inspect -t <path>.clab.yml # specific topology
containerlab inspect --name <lab-name> # by name
Output includes: node name, container ID, image, kind, state, management IPs, mapped ports.
Use --format json | jq to minimize output when scripting or reporting.
Expected JSON structure from containerlab inspect --format json:
{
"<lab-name>": [
{
"lab_name": "<lab>",
"labPath": "<relative-path>",
"name": "clab-<lab>-<node>",
"container_id": "<id>",
"image": "<image>",
"kind": "<kind>",
"group": "<group>",
"state": "running",
"status": "Up 2 hours",
"ipv4_address": "<cidr>",
"ipv6_address": "<cidr>",
"ports": {},
"owner": "<user>"
}
]
}
Top-level keys are lab names; values are arrays of containers.
Container naming convention: clab--
# SR Linux CLI
docker exec -it clab-<lab>-<node> sr_cli "<command>"
# Shell access
docker exec -it clab-<lab>-<node> bash
# SSH (default creds: admin / NokiaSrl1!)
ssh admin@clab-<lab>-<node>
For multi-node command execution:
# All nodes in a lab
containerlab exec -t <path>.clab.yml --cmd '<command>'
# Specific node by label
containerlab exec -t <path>.clab.yml --label clab-node-name=<node> --cmd '<command>'
# SR Linux CLI via containerlab exec
containerlab exec -t <path>.clab.yml --cmd 'sr_cli "show version"'
When a quick test lab is needed and the user has no custom topology, create this:
name: srlinux-lab
topology:
nodes:
srl1:
kind: nokia_srlinux
image: ghcr.io/nokia/srlinux:latest
srl2:
kind: nokia_srlinux
image: ghcr.io/nokia/srlinux:latest
links:
- endpoints: ["srl1:e1-1", "srl2:e1-1"]
When the user provides a .clab.yml:
Conventions: use .clab.yml extension, place in project root or lab/ directory.
containerlab version
docker info --format '{{.ServerVersion}}'
containerlab inspect --all --format json 2>/dev/null | jq -r 'keys[]'
If same-name lab exists, ask user: redeploy or reuse?containerlab deploy -t <path>.clab.yml
containerlab inspect -t <path>.clab.yml --format json | jq '[.[][] | {name, state, ipv4: .ipv4_address}]'
docker exec clab-<lab>-<node> sr_cli "show version" 2>/dev/null
containerlab inspect --all --format json 2>/dev/null | jq -r 'keys[]'
containerlab destroy -t <path>.clab.yml --cleanup
containerlab inspect --all --format json 2>/dev/null | jq length
docker ps --filter "label=containerlab" --format "{{.Names}}" 2>/dev/null
sr_cli "show version"
sr_cli "show system information"
sr_cli "show interface brief"
sr_cli "show network-instance default route-table all"
Use the state column from inspect output:
containerlab inspect -t <path>.clab.yml --format json | jq '[.[][] | {name, state}]'
Healthy nodes show "state": "running".
These practices minimize context window consumption when executing commands:
| Problem | Quick Fix |
|---|---|
| Image pull failure | docker pull ghcr.io/nokia/srlinux:latest, check auth/network |
| Node stuck starting | Check docker logs clab--, likely RAM (need ~2GB/node) |
| Cannot SSH | Wait 30-60s post-deploy, verify IP via containerlab inspect |
| Orphan containers after destroy | docker ps -a --filter label=containerlab then docker rm -f |
| Permission denied (rootless) | Verify docker info works, check ~/.config/containers/ |
| Lab name already exists | containerlab inspect --all --format json | jq -r 'keys[]' to check; ask user to redeploy (--reconfigure) or destroy first |
| Topology YAML parse error | Validate YAML syntax; check for missing topology.nodes or topology.links keys |
| Docker daemon not running | Verify with docker info; for rootless check systemctl --user status docker |
| Node filter matches nothing | Verify node names in topology file match --node-filter values exactly |
npx claudepluginhub hyposcaler/claude-code-plugins --plugin networklabsGenerates runtime-automation playbooks (solve/validation/setup.yml) for existing RHDP labs. Adds Zero Touch Solve/Validate buttons to showroom without altering setup. Supports OCP tenant/dedicated, RHEL VM+bastion, AAP.
Configures Docker Compose networks for service communication and isolation, covering default bridge networks, custom bridges, overlay networks, aliases, and service discovery in multi-container apps.
Maps Layer 2 network topology and discovers neighbors using LLDP/CDP protocols via lldpd/lldpcli and ARP scanning with arp-scan-rs and arping. For switch port mapping and local host detection on isolated networks.