pt_apply_acl
Validates ACL rules, checks the router and interface in Packet Tracer, generates Cisco IOS CLI, and applies or dry-runs the ACL, optionally binding it to an interface.
Instructions
Applies an ACL to a router in PT's active topology: validates (ranges, types, IPs/wildcards, unreachable rules), checks router/interface against PT, generates IOS CLI and sends it through configureIosDevice.
router: device name in PT (see pt_query_topology).
name_or_number: 1-99/1300-1999 standard, 100-199/2000-2699 extended, any word = named ACL.
acl_type: "standard" (source only) or "extended" (source, destination, protocol, ports).
entries: list of dicts: action "permit"|"deny" (required); protocol "ip"|"icmp"|"tcp"|"udp"|... (default "ip"); source "any" | "host A.B.C.D" | "A.B.C.D wildcard" (required); destination (extended); source_port_op/source_port, dest_port_op/dest_port/dest_port_end (TCP/UDP, e.g. "eq"/80); icmp_type ("echo", "echo-reply", ...); tcp_flags (["established"]); log (bool); remark.
binding_interface: apply the ACL to this interface; empty = only define it.
binding_direction: "in" (default) or "out"; used only with binding_interface.
dry_run: validate and return the CLI/JS without sending.
Example entry: {"action": "deny", "protocol": "icmp", "source": "192.168.1.0 0.0.0.255", "destination": "192.168.0.0 0.0.0.255", "icmp_type": "echo"}. 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>",
"name_or_number": "<name_or_number>",
"acl_type": "<acl_type>",
"entries": "<entries>"
},
"name": "pt_apply_acl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| router | Yes | ||
| dry_run | No | ||
| entries | Yes | ||
| acl_type | Yes | ||
| name_or_number | Yes | ||
| binding_direction | No | in | |
| binding_interface | No |