pt_apply_vlan
Apply VLANs, access ports, trunks, and inter-VLAN subinterfaces to an active Packet Tracer topology via IOS CLI, with dry-run validation before deployment.
Instructions
Applies VLANs / trunks / inter-VLAN routing to the active PT topology through IOS CLI: switch side (VLANs, access ports, trunks) and optionally router side (.1q subinterfaces, router-on-a-stick). Use pt_query_topology for the real names/ports.
switch: switch name (e.g. "SW1"). router: only for subinterfaces.
vlans: [{"vlan_id": 10, "name": "SALES"}] (name optional).
access_ports: [{"switch": "SW1", "port": "FastEthernet0/1", "vlan_id": 10}].
trunks: [{"switch", "port", "allowed_vlans"?, "native_vlan"?, "encapsulation"?}]. A 2960 (dot1q only) gets no
switchport trunk encapsulation; a 3560 does.subinterfaces: [{"router": "R1", "parent_port": "GigabitEthernet0/0", "vlan_id": 10, "ip_cidr": "192.168.10.1/24"}].
dry_run: validate and return the CLI/payload without sending.
Router-on-a-stick example: resource pt://guide, "Tool notes".
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pt_apply_vlan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vlans | No | ||
| router | No | ||
| switch | No | ||
| trunks | No | ||
| dry_run | No | ||
| access_ports | No | ||
| subinterfaces | No |