Configure IOS device
configure_deviceAdds IOS global-configuration commands to routers, switches, and multilayer switches for Packet Tracer topologies, appending to or replacing existing device commands.
Instructions
Add IOS configuration commands to a router, switch or multilayer switch (not PCs, servers, ASAs, access points or wireless routers). Commands run in GLOBAL CONFIGURATION MODE: do not send enable, configure terminal, end or write memory (PTBuilder saves automatically); such lines are dropped and reported. Leave sub-modes (interface, router ospf, line) with exit. Use full interface names (interface GigabitEthernet0/0). Commands are appended to earlier ones; set replace: true to overwrite the device's previous commands. Invalid commands fail silently in PT.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"ios_commands": "<ios_commands>"
},
"name": "configure_device"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Device name, e.g. R1, S1, PC1 (case-insensitive). | |
| replace | No | true = discard this device's previous commands first. | |
| ios_commands | Yes | IOS commands in global configuration mode, one per item, e.g. ["hostname R1", "interface GigabitEthernet0/0", "ip address 192.168.1.1 255.255.255.0", "no shutdown", "exit"]. At most 2000 items of 512 characters; a device keeps at most 2000 commands. |