pt_apply_nat
Applies static, dynamic, or PAT NAT rules to a Packet Tracer router through IOS CLI, configuring inside/outside interfaces, mappings, pools, and overload to enable LAN-to-WAN address translation.
Instructions
Applies NAT or PAT to a router in PT's active topology (IOS CLI through the bridge).
router: device name in PT (e.g. "R1"; see pt_query_topology).
mode: "static" (1:1 fixed mapping, e.g. a server reachable from outside), "dynamic" (pool of public IPs) or "pat" (overload: many hosts share one public IP, the usual case).
inside_interface / outside_interface: LAN-side and WAN-side interfaces.
static_mappings: static only. [{"inside_local": "192.168.1.10", "inside_global": "200.1.1.5"}]
inside_networks: dynamic/pat. "network wildcard" strings, e.g. ["192.168.1.0 0.0.0.255"] (not CIDR); emitted as an inline access-list.
acl_number: ACL number or name for the inside hosts (default "1").
pool_name, pool_start, pool_end, pool_netmask ("255.255.255.0" form): the public pool (dynamic, or pat without interface overload).
use_interface_overload: pat only. True = use outside_interface's IP instead of a pool.
dry_run: validate and return the payload without sending.
Typical PAT: mode="pat", inside_networks=["192.168.1.0 0.0.0.255"], use_interface_overload=True. Mode guidance and a full example: resource pt://guide, "Tool notes".
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": {
"router": "<router>",
"mode": "<mode>",
"inside_interface": "<inside_interface>",
"outside_interface": "<outside_interface>"
},
"name": "pt_apply_nat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| router | Yes | ||
| dry_run | No | ||
| pool_end | No | ||
| pool_name | No | NAT-POOL | |
| acl_number | No | 1 | |
| pool_start | No | ||
| pool_netmask | No | ||
| inside_networks | No | ||
| static_mappings | No | ||
| inside_interface | Yes | ||
| outside_interface | Yes | ||
| use_interface_overload | No |