Configure a Cisco Device
configure_deviceApply multi-line Cisco IOS configuration to a Packet Tracer device and save it when needed. Skips CLI prompts and returns rejected commands so you can verify changes.
Instructions
Apply a block of IOS configuration to a Cisco device, like pasting it into the CLI in global
config mode. Accepts output of show running-config as-is: "!" lines, "end", "enable",
"configure terminal", "version", and prompt lines are skipped. Indentation does not matter.
Returns how many commands were sent and only the ones IOS rejected. save=true runs
"write memory" afterwards.
Prefer this over send_cli_command for multi-line configs (VLANs, OSPF, ACLs, interface blocks).
CRITICAL: Changes device configuration. Show the user the config and confirm before applying.
Examples:
"Configure OSPF area 0 on R1 for 10.0.0.0/8"
"Apply this config to SW1 and save it"
"Create VLANs 10 and 20 on the switch and assign Fa0/1-12 to VLAN 10"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Device display name as shown in Packet Tracer (e.g. 'Router0', 'PC1') | |
| save | No | ||
| config | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| saved | No | ||
| device | Yes | ||
| errors | No | Commands IOS rejected (status != ok) | |
| commands_sent | Yes |