pt_host_ip_config
Configure static or DHCP IP settings on Packet Tracer PCs, laptops, or servers, including IPv4/IPv6 address, mask, gateway, and DNS, and optionally capture the dialog.
Instructions
Desktop > IP Configuration (and Config > Global) of a PC/Laptop/Server: static IP or DHCP, mask, gateway, DNS, IPv6 (automatic or static).
Parameters (empty = leave alone):
mode: "static" | "dhcp". With "dhcp" a lease is requested and the tool waits up to wait_dhcp_s seconds (0-120) for it.
ip, mask: IPv4 and mask ("255.255.255.0" or "24").
gateway, dns: IPv4. "0.0.0.0" to clear.
interface: port (default: the first Ethernet, or Wireless0).
ipv6_mode: "auto" (SLAAC) | "off".
ipv6_address: static IPv6 with its prefix, "2001:db8:0:1::10/64". Added to the port (it does not remove other addresses) and read back.
ipv6_gateway, ipv6_dns.
show / capture: opens Desktop > IP Configuration (per pt_ui_mode).
For routers/switches use pt_cli (ip address ... on the interface).
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": "pt_host_ip_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | ||
| dns | No | ||
| mask | No | ||
| mode | No | ||
| show | No | ||
| device | Yes | ||
| capture | No | ||
| gateway | No | ||
| ipv6_dns | No | ||
| interface | No | ||
| ipv6_mode | No | ||
| output_dir | No | screenshots | |
| wait_dhcp_s | No | ||
| ipv6_address | No | ||
| ipv6_gateway | No |