configure_host
Set a PC, laptop, or server's IPv4 configuration to DHCP or static with mask, gateway, and DNS, validating for common mistakes before applying to Packet Tracer.
Instructions
Set the IPv4 configuration of a PC, laptop or server: either DHCP, or a static ip and mask with optional gateway and DNS. Catches classic mistakes (invalid mask, host address equal to the network or broadcast, gateway outside the subnet) before touching Packet Tracer.
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": {
"device": "<device>"
},
"name": "configure_host"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | Static IPv4 address, for example `192.168.10.10`. Required unless `dhcp` is true. | |
| dns | No | DNS server address. | |
| dhcp | No | Get the address from a DHCP server instead of setting it statically. | |
| mask | No | Subnet mask, for example `255.255.255.0`. Required unless `dhcp` is true. | |
| port | No | Network port to configure. Defaults to `FastEthernet0`. | |
| device | Yes | PC, laptop or server name. | |
| gateway | No | Default gateway; must be inside the host's subnet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | ||
| dns | No | ||
| dhcp | Yes | ||
| mask | No | ||
| port | Yes | ||
| device | Yes | ||
| gateway | No |