Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mats2208/MCP-Packet-Tracer/llms.txt
Use this file to discover all available pages before exploring further.
pt_generate_configs reads a validated TopologyPlan and generates complete, copy-paste-ready IOS CLI configuration blocks for every router and switch in the topology. Each block starts from enable / configure terminal, configures all interfaces with their assigned IP addresses and no shutdown, builds DHCP pools, and adds the full routing protocol configuration — all derived automatically from the plan’s IP assignments and routing settings. PC, laptop, and server configurations are appended as human-readable IP/gateway summaries under a separate host section.
Parameters
The
TopologyPlan JSON produced by pt_plan_topology or pt_full_build. The plan must contain at least one device with interfaces or routing configuration for meaningful output.Return value
A plain-text string containing one labeled section per device. Each router and switch section is a full IOS CLI block ready to paste into the device’s CLI tab. End-device sections show static IP values or DHCP instructions. Router and switch sections are separated by
=== DeviceName === headers; the host summary section is introduced by === Configuración de hosts ===. The output is plain text, not JSON.What configs cover
Each router config block includes every applicable section in this order:| Section | IOS commands generated |
|---|---|
| Interface IPs | interface {iface}, ip address {ip} {mask}, no shutdown, exit |
| DHCP exclusions | ip dhcp excluded-address {start} {end} |
| DHCP pools | ip dhcp pool {name}, network, default-router, dns-server |
| Static routes | ip route {dest} {mask} {next_hop} [AD] |
| OSPF | router ospf {pid}, router-id, network {net} {wildcard} area {area} |
| EIGRP | router eigrp {as}, network {net} {wildcard}, no auto-summary |
| RIP | router rip, version 2, network {net}, no auto-summary |
| Persistence | end, write memory |
hostname and write memory — L2 switches carry no IP routing configuration by default.
Example output format
The return value is a plain-text string structured as shown below. Each device block is introduced by an=== DeviceName === header followed by the CLI commands on subsequent lines:
PC and host configurations
For end devices (PC-PT, Laptop-PT, Server-PT), the tool generates a plain-text summary rather than IOS commands, because Packet Tracer configures PCs through a graphical IP Configuration panel, not a CLI. The summary shows:Relationship to pt_export
pt_generate_configs returns the configs as an in-memory string. pt_export calls the same generator internally and writes the output to disk — one {DeviceName}_config.txt file per router or switch in the project directory. Use pt_export when you need persistent files on disk; use pt_generate_configs when you want to inspect or forward the configs without writing files.