packet-tracer
/packet-tracer
Buduje, konfiguruje i diagnozuje sieci w Cisco Packet Tracer przez serwer MCP: ACL, NAT, VLAN, BGP, QoS i Wi-Fi, z odczytem tras i śledzeniem pakietów.
- Autor
- Masmas99 ↗
- Repozytorium
- MCP-Packet-Tracer ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 05.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 05.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Buduje, konfiguruje i diagnozuje sieci w Cisco Packet Tracer przez serwer MCP: ACL, NAT, VLAN, BGP, QoS i Wi-Fi, z odczytem tras i śledzeniem pakietów.
Oryginalny opis (EN)
Use when building, configuring, or debugging Cisco Packet Tracer networks through the `packet-tracer` MCP (`pt_*` tools): plan and live-deploy topologies, apply ACL / NAT / VLAN / HSRP / BGP / QoS / EtherChannel / CME voice / Wi-Fi, read routes, OSPF, STP, DHCP leases, trace PDUs, or write raw Script-Engine JS. Holds the discover→deploy→verify workflow, measured recipes, the exact PT API and its traps. Load it before driving the MCP.
Jak działa
- ⛔ Prime directive: DISCOVER, never invent
- The bridge
- Mandatory workflow
- Recipes
- What is NOT possible (do not try, say so)
- Common mistakes
- Reference files: read on demand
Podgląd SKILL.md
---
name: packet-tracer
description: >-
Use when building, configuring, or debugging Cisco Packet Tracer networks through the
`packet-tracer` MCP (`pt_*` tools): plan and live-deploy topologies, apply ACL / NAT / VLAN /
HSRP / BGP / QoS / EtherChannel / CME voice / Wi-Fi, read routes, OSPF, STP, DHCP leases, trace
PDUs, or write raw Script-Engine JS. Holds the discover→deploy→verify workflow, measured recipes,
the exact PT API and its traps. Load it before driving the MCP.
---
# Packet Tracer MCP — operating guide
The `packet-tracer` MCP (98 tools) plans, deploys, configures and **reads back** a *running* Packet
Tracer. The `pt_*` tools are your only interface, plus raw JS via `pt_send_raw`.
## ⛔ Prime directive: DISCOVER, never invent
Never guess a model, port, slot, cable, module, parameter or Script-Engine method: all are
discoverable, and a wrong raw-JS guess can **freeze PT**.
1. If you did not read it from a tool result, an MCP resource, or this skill, **you do not know it**.
2. Before planning/deploying: `pt_list_devices`, `pt_list_templates`, `pt_get_device_details`,
`pt_list_modules` (if installing modules). On a live canvas: `pt_query_topology` for real names/ports.
3. Raw JS: only methods in [reference/script-engine-api.md](reference/script-engine-api.md), each
probed inside `try/catch`.
4. **After every change, check the reply and read the device back** (next section).
5. When something isn't in the catalog or isn't possible, say so — do not fabricate.
6. Name devices with letters, digits, `-` and `_` only: no quotes, slashes or line breaks (a `.pkt`
holding `R"evil` was followed by a PT crash on reopen; cause not isolated).
## The bridge
MCP server → HTTP bridge `:54321` → PT extension (MCP BUILDER) → PT Script Engine. Confirm with
**`pt_bridge_status`** → *"ACTIVE and CONNECTED"*; after an MCP restart call it once before asking the
user to open **Extensions → MCP BUILDER** (or dismiss a stuck error modal).
## Mandatory workflow
- **New topology, one shot:** `pt_full_build(routers=2, routing="ospf")` (refuses an invalid plan). Stepwise:
`pt_list_devices` → `pt_plan_topology` → `pt_validate_plan` → `pt_live_deploy`. Read `errors[]` first.
The deploy report is the truth: hosts take DHCP (servers static), so ping the addresses in
`DHCP leases (live…)`, not the table. A router out of Ethernet gets serial links + an HWIC-2T/NIM-2T
in `plan.modules` (measured: no clock rate needed); a `Planner:` warning means a link was left out.
- **Edit a live topology:** `pt_bridge_status` → `pt_query_topology` → `pt_add_device` / `pt_add_link` /
`pt_delete_link` / `pt_move_device` / `pt_rename_device` → **`pt_fast_forward()`** after cabling
(STP converges at once instead of ~30 s; measured) → verify.
- **Modules:** `pt_list_modules(router_model=…)` → `pt_install_modules_batch(modules=[…])`. The
device is power-cycled; IOS devices get `write memory` first and the reply says so.
- **Large design:** a TopologyPlan `.json` → `pt_validate_plan(plan_path=…)` → `pt_live_deploy(plan_path=…)`.
- **Save:** `pt_save_project(filename="lab1")` (`overwrite=True` to replace); `pt_open_project(path=…)`
replaces the open topology.
### Canvas and layout
- The visible view depends on the screen: **`pt_canvas_info()`** gives its size (1512x599 on a 14"
MacBook, ~1900x700 on 1920x1080), zoom and `usable_x`/`usable_y`. Call it before placing devices by
hand; x/y is an icon's top-left (~50x40 px, labels below).
- `pt_full_build` / `pt_plan_topology` already lay out **by topology** and fit that view (routers as
the core: row, ring or star; each LAN off its router, away from the core; WAN on the free side).
Don't move devices afterwards unless asked.
- After building or extending by hand: **`pt_auto_layout()`** (`apply=False` previews). "needs about
WxH" = bigger than the view: suggest maximising PT or zooming out.
- **Canvas annotations (mandatory):** subnet notes along cables (`pt_add_note(x, y, "NETWORK\n<subnet>/<cidr>")` at link midpoint) and full host IP notes directly under every device (`pt_add_note(x, y+68, "<ip>")` or `"IP ADDRESS PC\n<ip>"`).
### Verify every change, then read it back
Config tools (`pt_apply_*`) send IOS line by line and reply `verified`, `verification`
(`verified`/`rejected`/`error`/`unverified` = no answer) and `rejected_lines` (line, command, IOS
reason). **Only `verified: true` means it landed**; fix a rejected line, never resend blind; preview with
`dry_run=True`. `pt_move_device`, `pt_rename_device`, `pt_delete_link` also reply `verified`. Read back:
VLAN/port-security → `pt_read_vlans`; ACL → `pt_read_acl`; NAT → `pt_read_nat`; STP → `pt_read_stp`;
QoS → `pt_read_qos`; routing → `pt_read_routes` (`convergence_gaps`) + `pt_read_ospf`; DHCP/voice →
`pt_read_dhcp_leases`; host IP/gateway → `pt_read_device_panel`; cabling → `pt_inspect_ports` (`cable`, `peer`).
### Diagnose with reads and PDUs, not by parsing `show`
`pt_health_check()` → `pt_inspect_ports(device="R1", only_linked=True)` → `pt_read_routes()` /
`pt_read_ospf()` / `pt_read_arp(device="R1")` / `pt_read_mac_table(switch="SW1")` → **why**:
`pt_send_pdu(source="PC1", destination="PC4", steps=10)` (PT's per-layer reason, e.g. an ACL deny;
then `pt_simulation_mode(on=False)`) → `pt_verify_connectivity(from_device="PC1", to_ip="192.168.1.1")`.
The first ping/PDU can die on ARP: repeat once. `pt_read_cdp` is empty ~60 s after a deploy.
## Recipes
Take real names from `pt_query_topology`. **(measured)** = run live on PT 9.
- **HSRP** (measured, with failover): both routers need an interface on the SAME LAN; `pt_full_build` does not
give that, so cable and address the second one first. `pt_apply_hsrp(router="R1", interface="GigabitEthernet0/1", group=1, virtual_ip="192.168.0.254", priority=110)`,
same on R2 with `priority=100`, then `pt_host_ip_config(device="PC1", gateway="192.168.0.254")`. Check: `show standby brief`
(Active/Standby); shutting R1's interface makes R2 Active and the VIP keeps answering.
- **EtherChannel** (measured on two 2960-24TT: `Po1(SU)`), cable the links, then on both switches:
`pt_apply_etherchannel(switch="SW1", ports=["FastEthernet0/10","FastEthernet0/11"], group=1, mode="active", trunk=True)`
→ `pt_fast_forward()` → `pt_cli(device="SW1", commands=["show etherchannel summary"])`.
- **BGP, two AS** (measured: session up, routes learned as `B`):
`pt_apply_bgp(router="R1", asn=65001, neighbors=[{"ip":"10.0.0.2","remote_as":65002}], networks=["192.168.1.0/24"])`,
mirror on R2 → `pt_cli(device="R1", commands=["show ip bgp summary"])`.
- **QoS for voice** (measured, 2911 and 2811):
`pt_apply_qos(router="R1", interface="GigabitEthernet0/1", policy_name="WAN-OUT", classes=[{"name":"VOICE","match_protocol":"rtp","match_dscp":"ef","priority_kbps":512}])`
→ `pt_read_qos(device="R1")`.
- **2811 network** (measured: OSPF FULL, leases): `pt_full_build(router_model="2811", routing="ospf")`.
- **Wi-Fi** (measured): `pt_full_build(laptops_per_lan=2, wireless_laptops=True)` pins each laptop to its
LAN's AP (MAC filter per AP; report line `📶 WiFi clients pinned`). By hand: `pt_wireless_ap(device="AP2",
mac_filter=True, allow_listed=True, mac_list=[Wireless0 MACs])` then `pt_host_ip_config(device="LT3", mode="dhcp")`.
Laptops only join "Default": renaming an AP's SSID drops its clients. Judge association by the address, not the port.
- **CME voice, static host IPv6, mail domain**: recipes in [reference/tools.md](reference/tools.md#recipes).
## What is NOT possible (do not try, say so)
- **WPA/WEP on a wireless client**: `WirelessClientProcess.addProfile`/`setCurrentProfile*` always throw "invalid vector subscript" (GUI only).
- **CME on a 2911**: `telephony-service` is status 2 even with the uck9 license + reload; use a 2811.
- **IoT programs as files**: `FileManager` answers "File not exist" for every path.
- **NetFlow flows**: the exporter manager has no flow getters; only the exporter is configured.
- **QoS class names by API**: a class only says "PolicyMapQosClass"; names come from the running-config.
## Common mistakes
`slot="0/0"` is a string, never `0`. Cable `"cross"`, never `"crossover"`. `pt_delete_link` takes
`interface_name`, `pt_save_project` takes `filename`. Never trust a config call that merely returned:
check `verified`. Never sleep 30 s after cabling: `pt_fast_forward()`. Several IOS lines → `pt_cli`,
not raw `enterCommand`. Raw JS: `ipc.network().getDevice("R1")` (no global `getDevice`), `getPorts()`
returns strings, wrap everything in `try/catch`; `getProcess("Aaa")` and `PolicyMap.toString()` throw.
## Reference files: read on demand
| Read | When |
|---|---|
| [reference/tools.md](reference/tools.md) | full catalog (98 tools) with arguments, advanced builds, more recipes |
| [reference/script-engine-api.md](reference/script-engine-api.md) | raw JS for `pt_send_raw`, modules, plans too big for a parameter |
| [reference/rough-edges.md](reference/rough-edges.md) | something behaves oddly: measured PT 9 traps and workarounds |
The MCP also serves its usage guide as the resource `pt://guide`.
Pliki w paczce (4)
- SKILL.md 9 KB
- reference/rough-edges.md 18 KB
- reference/script-engine-api.md 18 KB
- reference/tools.md 20 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · Masmas99/MCP-Packet-Tracer | 85 | MIT |
| potatko/pkt2shell | 95 | BSD-2-Clause |
| aymenmerabta5/MCP-Packet-Tracer | 95 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki df6843c4d4a7 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100packet-tracer-lab
Buduje, konfiguruje i sprawdza laboratoria Cisco Packet Tracer w notebooku ModelScope, odczytuje wyniki i tworzy raport. - 90cisco-certified-network-professional
Wyjaśnia i rozwiązuje problemy z sieciami przedsiębiorstw na poziomie CCNP: VLAN, OSPF, EIGRP, BGP, FHRP i QoS. - 90meraki-switch-ops
Sprawdza porty, VLAN-y, ACL, QoS, STP i agregację łączy przełączników Cisco Meraki w trybie tylko do odczytu. - 90routing-switching
Porównuje technologie routingu i przełączania, np. BGP, OSPF, VLAN, VXLAN/EVPN i spine-leaf, i doradza w projektowaniu sieci kampusowych i centrów danych. - 90net-lab
Prowadzi krok po kroku przez praktykum sieciowe w Packet Tracer: konfiguruje po jednym urządzeniu, sprawdza każdy etap i uspokaja przy drobnych pomyłkach. - 100markmap-viz
Tworzy interaktywne mapy myśli z Markdown dla inwentarza sieci, obszarów OSPF, topologii BGP, wyników audytu bezpieczeństwa i struktur VLAN.