Skip to main content

TopoGen for CML/simple

TopoGen generates CML/simple YAML topologies offline. It does not connect to a CML controller (the previous/legacy version did).

Features

  • generate router topologies with simple or nx mode
  • add an Alpine DNS host and an external connector to every generated lab
  • assign router loopbacks and /30 point-to-point networks
  • render day-zero configuration for IOSv, IOL-XE, and FRR
  • write a YAML file that can be imported into CML/simple

Installation

uv sync --dev --frozen

NumPy and SciPy are installed as normal runtime dependencies because nx mode uses them for graph layout. Run the CLI with uv run topogen if the environment is not active.

Usage

uv run topogen 3 --mode nx --template frr --output topogen_lab.yaml

nodes is the router count. The generated lab also includes an Alpine DNS host and an external connector.

Modes

  • nx: the default; a connected random-shell router graph
  • simple: an alternate router chain on square-spiral coordinates

Both modes write offline YAML and include the DNS host and external connector.

Router templates

Offline generation supports these CML node definitions:

  • iosv
  • iol-xe
  • frr

Choose one with --template, for example --template=iosv or --template=frr. TopoGen uses copied physical-interface maps for these node definitions and rejects a topology that needs more interfaces than the selected definition supports.

For a mixed router lab, repeat --router-type NAME=PERCENT; values must total 100. For example, this creates 20 routers with a 10/20/70 type mix:

topogen 20 --mode nx --router-type iol-xe=10 --router-type frr=20 --router-type iosv=70

Use --seed NUMBER to make random-shell graph generation and mixed router-type assignment reproducible.

FRR configuration uses node.cfg, boot.sh, and protocols. IOSv and IOL-XE configuration uses ios_config.txt.

Configuration

Use --config to load an optional TOML file. It controls address pools, domain name, and device credentials:

loopbacks = "10.0.0.0/8"
p2pnets = "172.16.0.0/12"
nameserver = "8.8.8.8"
domainname = "virl.lab"
username = "cisco"
password = "cisco"

The generated DNS host replaces nameserver with its router-facing address. The user name and password are included in generated device configuration.

Import and run

Import the resulting YAML file into CML/simple. TopoGen does not upload or start the lab. The generated DNS host installs dnsmasq at first boot, which needs Internet access. After the lab starts, configured router loopbacks and interfaces resolve through that DNS host.

Metadata

Release files for topogen 0.3.1.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for topogen 0.3.1.post1
File Size Uploaded Provenance Actions
topogen-0.3.1.post1.tar.gz 80.7 kB With provenance Details for topogen-0.3.1.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for topogen 0.3.1.post1
File Interpreter ABI Platform Actions
topogen-0.3.1.post1-py3-none-any.whl Python 3 none any Details for topogen-0.3.1.post1-py3-none-any.whl

Total release size: 102.3 kB

Release files / topogen-0.3.1.post1.tar.gz

Download URL topogen-0.3.1.post1.tar.gz
Size 80.7 kB
Tags Source
SHA-256 checksum
How to use checksums
814f981fec6593784c12c951763bfca241a856e3f259ff12289503675c0308bf
BLAKE2b-256 checksum
How to use checksums
ecf493b8d7a612cbeb82235b76a7c20f178839e0bc65cac2f592d14e45175e6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / topogen-0.3.1.post1-py3-none-any.whl

Download URL topogen-0.3.1.post1-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2daf0010e4ea573e1032ad009dc60cae13161d4aecf29a56917730bb4cfffc7
BLAKE2b-256 checksum
How to use checksums
326ace8e4aab3641402312a8c8b6c338bcdd7e0a527aa10f7a12e14d57b0793f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for topogen 0.3.1.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for topogen-0.3.1.post1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page