# Cisco Modeling Labs

Published articles for Cisco Modeling Labs.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## No Lab, No Problem: Record CML2 Devices into pyATS Mocks for CI

DevFeed: [No Lab, No Problem: Record CML2 Devices into pyATS Mocks for CI](<https://devfeed.tech/articles/no-lab-no-problem-record-cml2-devices-into-pyats-mocks-for-ci-30873.md>)

Original publisher: [Read original article](<https://brent.leekley.me/blog/record-once-test-forever/>)

Author: Brent Leekley

Published: 2026-06-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [brent.leekley.me blog](<https://devfeed.tech/sources/brent-leekley-me-blog.md>)

Topics: [GitHub Actions](<https://devfeed.tech/topics/github-actions.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Network](<https://devfeed.tech/topics/network.md>)

Tags: [ci](<https://devfeed.tech/tags/ci.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [cisco](<https://devfeed.tech/tags/cisco.md>), [cisco-modeling-labs](<https://devfeed.tech/tags/cisco-modeling-labs.md>), [cml](<https://devfeed.tech/tags/cml.md>), [cml2](<https://devfeed.tech/tags/cml2.md>), [genie](<https://devfeed.tech/tags/genie.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [mock-devices](<https://devfeed.tech/tags/mock-devices.md>), [network-automation](<https://devfeed.tech/tags/network-automation.md>), [network-testing](<https://devfeed.tech/tags/network-testing.md>), [ospf](<https://devfeed.tech/tags/ospf.md>), [playback](<https://devfeed.tech/tags/playback.md>), [pyats](<https://devfeed.tech/tags/pyats.md>), [record-and-replay](<https://devfeed.tech/tags/record-and-replay.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unicon](<https://devfeed.tech/tags/unicon.md>)

### AI overview

This tutorial explains how to record responses from real Cisco Modeling Labs 2 devices with pyATS and unicon, commit the recordings, and replay the same test suite in GitHub Actions. Replay allows the tests to run offline without booting or connecting to the lab.

### Source excerpt

Develop against the live CML2 lab, then record it once with unicon playback and replay the exact same pyATS suite in GitHub Actions with no lab to license or reach. Point the testbed at an unreachable address and the suite still passes, because replay never opens a socket. Includes a real companion repo with a green Actions run. Fourth in a pyATS + CML2 network programmability series.

## The Snapshot Machine: genie learn and diff as a Change-Validation Safety Net on CML2

DevFeed: [The Snapshot Machine: genie learn and diff as a Change-Validation Safety Net on CML2](<https://devfeed.tech/articles/the-snapshot-machine-genie-learn-and-diff-as-a-change-validation-safety-net-on-cml2-30875.md>)

Original publisher: [Read original article](<https://brent.leekley.me/blog/snapshot-machine/>)

Author: Brent Leekley

Published: 2026-06-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [brent.leekley.me blog](<https://devfeed.tech/sources/brent-leekley-me-blog.md>)

Topics: [networking](<https://devfeed.tech/topics/networking.md>), [Cisco](<https://devfeed.tech/topics/cisco.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [change-validation](<https://devfeed.tech/tags/change-validation.md>), [cisco](<https://devfeed.tech/tags/cisco.md>), [cisco-modeling-labs](<https://devfeed.tech/tags/cisco-modeling-labs.md>), [cli](<https://devfeed.tech/tags/cli.md>), [cml2](<https://devfeed.tech/tags/cml2.md>), [genie](<https://devfeed.tech/tags/genie.md>), [genie-diff](<https://devfeed.tech/tags/genie-diff.md>), [genie-learn](<https://devfeed.tech/tags/genie-learn.md>), [maintenance-window](<https://devfeed.tech/tags/maintenance-window.md>), [network-automation](<https://devfeed.tech/tags/network-automation.md>), [network-testing](<https://devfeed.tech/tags/network-testing.md>), [ospf](<https://devfeed.tech/tags/ospf.md>), [pyats](<https://devfeed.tech/tags/pyats.md>), [routing-table](<https://devfeed.tech/tags/routing-table.md>), [snapshot](<https://devfeed.tech/tags/snapshot.md>), [structured](<https://devfeed.tech/tags/structured.md>), [validation](<https://devfeed.tech/tags/validation.md>)

### AI overview

This tutorial demonstrates using Cisco Modeling Labs 2 with Genie learn and diff to validate network changes. It snapshots structured operational state before and after a maintenance change, then compares the snapshots to reveal side effects that routine show commands may miss. The source summary reports that a changed OSPF cost reroutes three destinations while adjacencies remain FULL.

### Source excerpt

Snapshot a CML2 fabric with genie learn before and after a maintenance change, then genie diff the structured state. One fat-fingered OSPF cost quietly reroutes three destinations while every adjacency stays FULL. Structured before-and-after diffs catch the side effects that show commands miss.

## From Intent to Reality: Driving pyATS Tests from NetBox Against a CML2 Fabric

DevFeed: [From Intent to Reality: Driving pyATS Tests from NetBox Against a CML2 Fabric](<https://devfeed.tech/articles/from-intent-to-reality-driving-pyats-tests-from-netbox-against-a-cml2-fabric-30871.md>)

Original publisher: [Read original article](<https://brent.leekley.me/blog/netbox-intent/>)

Author: Brent Leekley

Published: 2026-06-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [brent.leekley.me blog](<https://devfeed.tech/sources/brent-leekley-me-blog.md>)

Topics: [NetBox](<https://devfeed.tech/topics/netbox.md>), [Network](<https://devfeed.tech/topics/network.md>), [Cisco](<https://devfeed.tech/topics/cisco.md>), [data](<https://devfeed.tech/topics/data.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [cisco-modeling-labs](<https://devfeed.tech/tags/cisco-modeling-labs.md>), [cml](<https://devfeed.tech/tags/cml.md>), [cml2](<https://devfeed.tech/tags/cml2.md>), [custom-fields](<https://devfeed.tech/tags/custom-fields.md>), [genie](<https://devfeed.tech/tags/genie.md>), [ids](<https://devfeed.tech/tags/ids.md>), [intent-based-networking](<https://devfeed.tech/tags/intent-based-networking.md>), [netbox](<https://devfeed.tech/tags/netbox.md>), [network](<https://devfeed.tech/tags/network.md>), [network-automation](<https://devfeed.tech/tags/network-automation.md>), [network-testing](<https://devfeed.tech/tags/network-testing.md>), [ospf](<https://devfeed.tech/tags/ospf.md>), [pyats](<https://devfeed.tech/tags/pyats.md>), [pynetbox](<https://devfeed.tech/tags/pynetbox.md>), [router-id](<https://devfeed.tech/tags/router-id.md>), [source-of-truth](<https://devfeed.tech/tags/source-of-truth.md>), [spine-leaf](<https://devfeed.tech/tags/spine-leaf.md>), [structured](<https://devfeed.tech/tags/structured.md>), [testbed](<https://devfeed.tech/tags/testbed.md>)

### AI overview

This tutorial shows how to store declared OSPF router-IDs in NetBox and use Cisco pyATS to compare them with the router-IDs on a live CML2 spine-leaf fabric. The comparison turns network intent validation into a pass-or-fail test.

### Source excerpt

NetBox holds the intent (declared OSPF router-IDs), a CML2 spine-leaf is the network under test, and pyATS is the judge. Close the loop and prove the live network matches what you said it should be, with real pass and fail output.

## Build the Lab Once, Test It Forever: A CML2 Spine-Leaf Wired for pyATS

DevFeed: [Build the Lab Once, Test It Forever: A CML2 Spine-Leaf Wired for pyATS](<https://devfeed.tech/articles/build-the-lab-once-test-it-forever-a-cml2-spine-leaf-wired-for-pyats-30867.md>)

Original publisher: [Read original article](<https://brent.leekley.me/blog/build-the-lab-once/>)

Author: Brent Leekley

Published: 2026-06-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [brent.leekley.me blog](<https://devfeed.tech/sources/brent-leekley-me-blog.md>)

Topics: [Network](<https://devfeed.tech/topics/network.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Cisco](<https://devfeed.tech/topics/cisco.md>), [Code](<https://devfeed.tech/topics/code.md>), [API](<https://devfeed.tech/topics/api.md>), [Parser](<https://devfeed.tech/topics/parser.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [cisco](<https://devfeed.tech/tags/cisco.md>), [cisco-modeling-labs](<https://devfeed.tech/tags/cisco-modeling-labs.md>), [cml](<https://devfeed.tech/tags/cml.md>), [cml2](<https://devfeed.tech/tags/cml2.md>), [code](<https://devfeed.tech/tags/code.md>), [genie](<https://devfeed.tech/tags/genie.md>), [iol-xe](<https://devfeed.tech/tags/iol-xe.md>), [network-automation](<https://devfeed.tech/tags/network-automation.md>), [network-testing](<https://devfeed.tech/tags/network-testing.md>), [ospf](<https://devfeed.tech/tags/ospf.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [pyats](<https://devfeed.tech/tags/pyats.md>), [spine-leaf](<https://devfeed.tech/tags/spine-leaf.md>), [testbed](<https://devfeed.tech/tags/testbed.md>), [virl2-client](<https://devfeed.tech/tags/virl2-client.md>)

### AI overview

This tutorial describes a four-node spine-leaf lab in Cisco Modeling Labs 2 (CML2) that generates a Cisco pyATS testbed from the CML API. The approach treats the lab definition as the source of truth so regenerated inventories remain aligned with topology changes, and uses an OSPF underlay with a management network.

### Source excerpt

Stop hand-maintaining your pyATS testbed. Build a four-node spine-leaf in CML2 as code, then generate the testbed straight from the CML API so it never drifts from the lab, with live Genie-parsed proof over a System Bridge management network.

## Using an AI Agent and MCP to Build and Verify Cisco Modeling Labs Network Labs

DevFeed: [Using an AI Agent and MCP to Build and Verify Cisco Modeling Labs Network Labs](<https://devfeed.tech/articles/why-your-next-network-lab-might-be-built-by-an-ai-agent-30868.md>)

Original publisher: [Read original article](<https://brent.leekley.me/blog/cml-mcp/>)

Author: Brent Leekley

Published: 2026-06-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [brent.leekley.me blog](<https://devfeed.tech/sources/brent-leekley-me-blog.md>)

Topics: [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Model Context Protocol](<https://devfeed.tech/topics/model-context-protocol.md>), [Cisco](<https://devfeed.tech/topics/cisco.md>), [Claude](<https://devfeed.tech/topics/claude.md>), [Network](<https://devfeed.tech/topics/network.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [api](<https://devfeed.tech/tags/api.md>), [cat9000v](<https://devfeed.tech/tags/cat9000v.md>), [cisco-modeling-labs](<https://devfeed.tech/tags/cisco-modeling-labs.md>), [claude](<https://devfeed.tech/tags/claude.md>), [cml](<https://devfeed.tech/tags/cml.md>), [cml-mcp](<https://devfeed.tech/tags/cml-mcp.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [mcp-server](<https://devfeed.tech/tags/mcp-server.md>), [model-context-protocol](<https://devfeed.tech/tags/model-context-protocol.md>), [network](<https://devfeed.tech/tags/network.md>), [network-automation](<https://devfeed.tech/tags/network-automation.md>), [pyats](<https://devfeed.tech/tags/pyats.md>)

### AI overview

This article explains how to use an AI agent through the Model Context Protocol to build and verify network labs in Cisco Modeling Labs. It discusses CML 2.10's first-party MCP server, natural-language lab creation, and verification workflows that observe network state and retry until OSPF adjacency converges.

### Source excerpt

CML 2.10 ships a first-party MCP server, and Claude can now build and verify network labs. Field lessons from running an AI agent against Cisco Modeling Labs: dataplane readiness gates, the cat9000v interface trap, SSH host-key rotation, and guardrails that live in docstrings.