TopoGen - Network Topology Generator

Phase 22/25

← Back to Network Automation


Concept

Generating realistic, validated network topologies for testing often requires custom, brittle scripts. The Topology Generator consolidates topology generation logic into a Rust core, producing structured data center and WAN graphs with consistent YAML output for the simulation and visualization ecosystem.

Quick Facts

   
Status Phase 22/25
Language N/A
Started 2026

What This Is

A Rust library with Python bindings for generating realistic network topologies. Consolidates scattered topology generation logic from AutoNetKit, simulation tools, and visualization tools into one well-tested implementation.

Key Features

Example: Data Center Leaf-Spine

Configuration file (leaf-spine-lab.yaml):

name: dc-lab-leaf-spine-2s-4l-100g
seed: 42

type: leaf-spine
spines: 2
leaves: 4
full_mesh: true
spine_bandwidth_gbps: 100.0

Generate topology:

$ topogen generate leaf-spine-lab.yaml --output topology.yaml

Generated topology: dc-lab-leaf-spine-2s-4l-100g
  Nodes: 6 (2 spines, 4 leaves)
  Links: 8 (full mesh spine-leaf connectivity)
  Total bandwidth: 800 Gbps
  Oversubscription: 2:1 (standard)

Output written to: topology.yaml

Generated output (excerpt):

name: dc-lab-leaf-spine-2s-4l-100g
topology_type: leaf-spine

nodes:
  - name: spine-1
    type: spine
    tier: 1
  - name: spine-2
    type: spine
    tier: 1
  - name: leaf-1
    type: leaf
    tier: 2
  - name: leaf-2
    type: leaf
    tier: 2
  - name: leaf-3
    type: leaf
    tier: 2
  - name: leaf-4
    type: leaf
    tier: 2

links:
  - src: leaf-1
    dst: spine-1
    bandwidth_gbps: 100.0
    latency_ms: 0.1
  - src: leaf-1
    dst: spine-2
    bandwidth_gbps: 100.0
    latency_ms: 0.1
  # ... (full mesh: 4 leaves × 2 spines = 8 links)

Python API

from topogen import DataCenter

topo = DataCenter.spine_leaf(
    spines=2,
    leaves=4,
    full_mesh=True,
    spine_bandwidth_gbps=100.0
)

topo.export_yaml("topology.yaml")
topo.export_json("topology.json")

# TopoGen - Network Topology Generator
from ank_pydantic import Topology
ank_topo = topo.to_ank_pydantic()

Milestones

v1.0-alpha Foundation (Shipped Jan 28, 2026) Core topology generators, validation framework, and output format.

v0.9 User Interfaces (Shipped Feb 5, 2026) CLI, Python API, config-driven generation, and documentation.

v0.10 Gap Closure (Shipped Feb 11, 2026) Output converters, traffic patterns, and POP design patterns.

v1.0 Production Features (In Progress — Phases 22-24)

Tech Stack

Rust core, PyO3 for Python bindings, Maturin build system


← Back to Network Automation