Nextmini

Controller Configuration

Reference for controller settings, topology, routing, flows, and database fields.

The controller binary reads ./config.toml at startup (get_config("config.toml")). Examples often keep a source file named controller-config.toml and mount or copy it to ./config.toml at runtime. This file defines network topology, routing, flows, and database settings.

Server Settings

FieldTypeDefaultDescription
portu163000Port for the controller WebSocket server.
max_server_portu168081Port for connection-on-demand TCP server.

Network Address Configuration

FieldTypeDefaultDescription
base_addrIpv4Addr10.0.0.0Base IPv4 address for the TUN network.
net_maskIpv4Addr255.255.0.0Network mask (accommodates up to 65,535 nodes).
user_space_base_addrIpv4Addr192.168.0.0Base address for user-space smoltcp network.
external_base_addrIpv4Addr172.16.8.3Base address for external network traffic.

Multicast Configuration

FieldTypeDefaultDescription
multicast_pool_baseIpv4Addr239.255.0.0Base address for multicast group IP allocation.
multicast_pool_maskIpv4Addr255.255.0.0Netmask for multicast pool (/16 = 65,535 groups).

Protocol Settings

FieldTypeDefaultDescription
protocolProtocoltcpTransport protocol: tcp, udp, or quic.
flow_transportFlowTransporttcpTransport for controller-managed flows: tcp or lossless_unicast.
scheduler_typeSchedulingDisciplinefifoScheduler discipline: fifo or wrr (weighted round-robin).

Topology Configuration

[topology]
type = "full_mesh"  # full_mesh | ring | fat_tree | torus

type is the canonical key. The legacy alias topology is still accepted for backward compatibility.

Full Mesh

[topology]
type = "full_mesh"
full_mesh_config = { n_nodes = 4 }

Ring

[topology]
type = "ring"
ring_config = { n_nodes = 4 }

Fat Tree

[topology]
type = "fat_tree"
fat_tree_config = { k = 4 }  # k must be even

The fat tree topology creates k^3/4 server nodes and 5k^2/4 switch nodes.

Torus

[topology]
type = "torus"
torus_config = { dim = 2, n = 4 }  # 2D torus with 4 nodes per dimension = 16 nodes

Supports 1D, 2D, and 3D torus topologies. Total nodes = n^dim.

Custom Edges

[topology]
edges = [[1, 2], [2, 3], [3, 4], [4, 1]]
n_nodes = 4  # Required when using custom edges

Routing Configuration

[routing]
protocol = "shortest_path"

Currently only shortest_path is supported. The [routing] section is optional; when omitted, no topology-derived routes are generated and only explicit [[routes]] entries are used.

Custom Routes

Routes can be defined as simple paths or DAGs:

# Simple path: 1 -> 2 -> 3 -> 4
[[routes]]
route = [1, 2, 3, 4]

# DAG with multiple paths
[[routes]]
route = [[1, 2], [2, 4], [1, 3], [3, 4]]
[[link_rates]]
src_node_id = 1
dst_node_id = 2
rate = 100_000_000         # bytes per second
bucket_size = 312_000_000  # token bucket size in bytes

Flow Configuration

[[flows]]
src_node_id = 1
dst_node_id = 2
flow_spec = { flow_len = { Bytes = 10_000_000 }, flow_rate = 10_000_000, flow_weight = 1, transport = "tcp" }

FlowSpec Fields

FieldTypeDescription
flow_lenFlowLen{ Bytes = n } or { Duration = seconds }
flow_rateOption<usize>Rate in bytes per second (required for Duration flows with lossless_unicast).
flow_weightOption<usize>Weight for weighted round-robin scheduling.
transportFlowTransporttcp or lossless_unicast.

Node Specifications

Per-node configuration overrides:

[[nodes]]
node_id = 1
operating_mode = "max"  # normal (default) | max

Database Configuration

[db]
user = "pgusr"
password = "pgpwrd"
host = "172.16.8.2"
database = "nextmini"
port = "5432"

On this page