Configure host IP
configure_pcSet a Packet Tracer host's IPv4 configuration on FastEthernet0 by assigning a static IP, mask, gateway, and DNS, or enabling DHCP; replaces the previous address setup.
Instructions
Set the IPv4 configuration of a host: PC-PT and Server-PT (Laptop-PT and Printer-PT are accepted but unverified). PTBuilder configures only the FastEthernet0 interface. dhcp: true enables DHCP (ip, mask and gateway are ignored; dns is kept). Otherwise ip and mask are required; mask accepts 255.255.255.0 or /24. Replaces the host's previous IP configuration. For routers and switches use configure_device instead.
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>"
},
"name": "configure_pc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | IPv4 address, e.g. 192.168.1.10 (or 192.168.1.10/24 to include the mask). | |
| dns | No | DNS server IPv4 address (kept with DHCP too). | |
| dhcp | No | true = obtain the address by DHCP (ip/mask/gateway are ignored). | |
| mask | No | Subnet mask, e.g. 255.255.255.0 or /24. | |
| name | Yes | Device name, e.g. R1, S1, PC1 (case-insensitive). | |
| gateway | No | Default gateway IPv4 address. |