TopoGen - Network Topology Generator

Phase 18/24 (15%)

← Back to Projects


The Concept

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

Quick Facts

   
Status Phase 18/24 (15%)
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):

# TopoGen - Network Topology Generator
# TopoGen - Network Topology Generator

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

# TopoGen - Network Topology Generator
topo = DataCenter.spine_leaf(
    spines=2,
    leaves=4,
    full_mesh=True,
    spine_bandwidth_gbps=100.0
)

# TopoGen - Network Topology Generator
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()

Current Status

Early development, focusing on core algorithms and Python bindings.

Tech Stack

Rust core, PyO3 for Python bindings


← Back to Network Automation ← Back to Projects