pt_build
Builds a complete Cisco Packet Tracer network from one spec—devices, links, configs, hosts, auto-addressing/routing, and optional ping checks.
Instructions
Build a whole network in one call. spec = {
devices: [{name, model, x?, y?, modules?: [{module, slot?}]}],
links: [{a, b, a_port?, b_port?, cable?}], # ports auto-picked when omitted
configs: {device: ["ios line", ...]}, # global-config lines, applied + saved
hosts: {pc: {ip, mask | cidr, gateway, dns} | {dhcp: true}},
auto: {routing: 'ospf'|'eigrp'|'rip'|'static'|'none', lan_pool, p2p_pool, dhcp, lan_prefix}, # optional
checks: [[src, dst], ...] # ping pairs, run when verify=true
}
auto runs pt_auto_address after cabling, so addresses fit whatever ports were chosen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | ||
| verify | No |