Skip to main content

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

plan_json
string
required
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

configs
string
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:
SectionIOS commands generated
Interface IPsinterface {iface}, ip address {ip} {mask}, no shutdown, exit
DHCP exclusionsip dhcp excluded-address {start} {end}
DHCP poolsip dhcp pool {name}, network, default-router, dns-server
Static routesip route {dest} {mask} {next_hop} [AD]
OSPFrouter ospf {pid}, router-id, network {net} {wildcard} area {area}
EIGRProuter eigrp {as}, network {net} {wildcard}, no auto-summary
RIProuter rip, version 2, network {net}, no auto-summary
Persistenceend, write memory
Switch configs include only 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:
=== R1 ===
enable
configure terminal
hostname R1
no ip domain-lookup

interface GigabitEthernet0/0
 ip address 192.168.0.1 255.255.255.0
 no shutdown
 exit

interface GigabitEthernet0/1
 ip address 10.0.0.1 255.255.255.252
 no shutdown
 exit

ip dhcp excluded-address 192.168.0.1 192.168.0.1
ip dhcp pool LAN1
 network 192.168.0.0 255.255.255.0
 default-router 192.168.0.1
 dns-server 8.8.8.8
 exit

router ospf 1
 router-id 1.1.1.1
 network 192.168.0.0 0.0.0.255 area 0
 network 10.0.0.0 0.0.0.3 area 0
 exit

end
write memory

=== Configuración de hosts ===

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:
--- PC1 ---
IP Address: 192.168.0.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.1
DNS Server: 8.8.8.8
Configurar como DHCP para obtener IP automáticamente.
When the plan includes DHCP pools, the summary instructs you to set the PC to DHCP mode; otherwise it provides static IP values to enter manually.

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.
Pass the same plan_json to both pt_generate_script and pt_generate_configs to get the full PTBuilder script and all device configs independently — useful when you want to apply configs manually after auto-building the topology.

Build docs developers (and LLMs) love